1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.AppChooserIF;
26 
27 private import gio.AppInfo;
28 private import gio.AppInfoIF;
29 private import glib.Str;
30 private import gobject.ObjectG;
31 private import gtkc.gtk;
32 public  import gtkc.gtktypes;
33 
34 
35 /**
36  * #GtkAppChooser is an interface that can be implemented by widgets which
37  * allow the user to choose an application (typically for the purpose of
38  * opening a file). The main objects that implement this interface are
39  * #GtkAppChooserWidget, #GtkAppChooserDialog and #GtkAppChooserButton.
40  * 
41  * Applications are represented by GIO #GAppInfo objects here.
42  * GIO has a concept of recommended and fallback applications for a
43  * given content type. Recommended applications are those that claim
44  * to handle the content type itself, while fallback also includes
45  * applications that handle a more generic content type. GIO also
46  * knows the default and last-used application for a given content
47  * type. The #GtkAppChooserWidget provides detailed control over
48  * whether the shown list of applications should include default,
49  * recommended or fallback applications.
50  * 
51  * To obtain the application that has been selected in a #GtkAppChooser,
52  * use gtk_app_chooser_get_app_info().
53  */
54 public interface AppChooserIF{
55 	/** Get the main Gtk struct */
56 	public GtkAppChooser* getAppChooserStruct();
57 
58 	/** the main Gtk struct as a void* */
59 	protected void* getStruct();
60 
61 
62 	/**
63 	 * Returns the currently selected application.
64 	 *
65 	 * Return: a #GAppInfo for the currently selected
66 	 *     application, or %NULL if none is selected. Free with g_object_unref()
67 	 *
68 	 * Since: 3.0
69 	 */
70 	public AppInfoIF getAppInfo();
71 
72 	/**
73 	 * Returns the current value of the #GtkAppChooser:content-type property.
74 	 *
75 	 * Return: the content type of @self. Free with g_free()
76 	 *
77 	 * Since: 3.0
78 	 */
79 	public string getContentType();
80 
81 	/**
82 	 * Reloads the list of applications.
83 	 *
84 	 * Since: 3.0
85 	 */
86 	public void refresh();
87 }