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 gio.LoadableIconIF;
26 
27 private import gio.AsyncResultIF;
28 private import gio.Cancellable;
29 private import gio.InputStream;
30 private import gio.c.functions;
31 public  import gio.c.types;
32 private import glib.ErrorG;
33 private import glib.GException;
34 private import glib.Str;
35 private import glib.c.functions;
36 private import gobject.ObjectG;
37 
38 
39 /**
40  * Extends the #GIcon interface and adds the ability to
41  * load icons from streams.
42  */
43 public interface LoadableIconIF{
44 	/** Get the main Gtk struct */
45 	public GLoadableIcon* getLoadableIconStruct(bool transferOwnership = false);
46 
47 	/** the main Gtk struct as a void* */
48 	protected void* getStruct();
49 
50 
51 	/** */
52 	public static GType getType()
53 	{
54 		return g_loadable_icon_get_type();
55 	}
56 
57 	/**
58 	 * Loads a loadable icon. For the asynchronous version of this function,
59 	 * see g_loadable_icon_load_async().
60 	 *
61 	 * Params:
62 	 *     size = an integer.
63 	 *     type = a location to store the type of the loaded
64 	 *         icon, %NULL to ignore.
65 	 *     cancellable = optional #GCancellable object, %NULL to
66 	 *         ignore.
67 	 *
68 	 * Returns: a #GInputStream to read the icon from.
69 	 *
70 	 * Throws: GException on failure.
71 	 */
72 	public InputStream load(int size, out string type, Cancellable cancellable);
73 
74 	/**
75 	 * Loads an icon asynchronously. To finish this function, see
76 	 * g_loadable_icon_load_finish(). For the synchronous, blocking
77 	 * version of this function, see g_loadable_icon_load().
78 	 *
79 	 * Params:
80 	 *     size = an integer.
81 	 *     cancellable = optional #GCancellable object, %NULL to ignore.
82 	 *     callback = a #GAsyncReadyCallback to call when the
83 	 *         request is satisfied
84 	 *     userData = the data to pass to callback function
85 	 */
86 	public void loadAsync(int size, Cancellable cancellable, GAsyncReadyCallback callback, void* userData);
87 
88 	/**
89 	 * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
90 	 *
91 	 * Params:
92 	 *     res = a #GAsyncResult.
93 	 *     type = a location to store the type of the loaded
94 	 *         icon, %NULL to ignore.
95 	 *
96 	 * Returns: a #GInputStream to read the icon from.
97 	 *
98 	 * Throws: GException on failure.
99 	 */
100 	public InputStream loadFinish(AsyncResultIF res, out string type);
101 }