/* Copyright (C) 2011 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
_CONFIGINCLUDE(gtkmmconfig.h)
#include
#include
//#include
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/interface_p.h)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
typedef struct _GtkAppChooserIface GtkAppChooserIface;
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gtk
{
/** Interface implemented by widgets for choosing an application.
*
* This interface can be implemented by widgets which allow the user to choose
* an application (typically for the purpose of opening a file). The main
* objects that implement this interface are AppChooserWidget, AppChooserDialog
* and AppChooserButton.
*
* Applications are represented by Gio::AppInfo objects here.
* GIO has a concept of recommended and fallback applications for a
* given content type. Recommended applications are those that claim
* to handle the content type itself, while fallback also includes
* applications that handle a more generic content type. GIO also
* knows the default and last-used application for a given content
* type. The AppChooserWidget provides detailed control over
* whether the shown list of applications should include default,
* recommended or fallback applications.
*
* To obtain the application that has been selected in an AppChooser,
* use get_app_info().
*
* See @ref giommContentType in glibmm for more information about content types.
*
* @newin{3,0}
*/
class GTKMM_API AppChooser : public Glib::Interface
{
_CLASS_INTERFACE(AppChooser, GtkAppChooser, GTK_APP_CHOOSER, GtkAppChooserIface, , , GTKMM_API)
public:
_WRAP_METHOD(Glib::RefPtr get_app_info(), gtk_app_chooser_get_app_info, refreturn)
_WRAP_METHOD(Glib::RefPtr get_app_info() const, gtk_app_chooser_get_app_info, refreturn, constversion)
_WRAP_METHOD(Glib::ustring get_content_type() const, gtk_app_chooser_get_content_type)
_WRAP_METHOD(void refresh(), gtk_app_chooser_refresh)
_WRAP_PROPERTY("content_type", Glib::ustring)
};
} // namespace Gtk