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  * Conversion parameters:
26  * inFile  = GIcon.html
27  * outPack = gio
28  * outFile = IconIF
29  * strct   = GIcon
30  * realStrct=
31  * ctorStrct=
32  * clss    = IconT
33  * interf  = IconIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- g_icon_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * 	- g_icon_new_for_string
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- glib.ErrorG
49  * 	- glib.GException
50  * structWrap:
51  * module aliases:
52  * local aliases:
53  * overrides:
54  * 	- toString
55  */
56 
57 module gio.IconIF;
58 
59 public  import gtkc.giotypes;
60 
61 private import gtkc.gio;
62 private import glib.ConstructionException;
63 private import gobject.ObjectG;
64 
65 
66 private import glib.Str;
67 private import glib.ErrorG;
68 private import glib.GException;
69 
70 
71 
72 
73 /**
74  * Description
75  * GIcon is a very minimal interface for icons. It provides functions
76  * for checking the equality of two icons, hashing of icons and
77  * serializing an icon to and from strings.
78  * GIcon does not provide the actual pixmap for the icon as this is out
79  * of GIO's scope, however implementations of GIcon may contain the name
80  * of an icon (see GThemedIcon), or the path to an icon (see GLoadableIcon).
81  * To obtain a hash of a GIcon, see g_icon_hash().
82  * To check if two GIcons are equal, see g_icon_equal().
83  * For serializing a GIcon, use g_icon_to_string() and
84  * g_icon_new_for_string().
85  * If your application or library provides one or more GIcon
86  * implementations you need to ensure that each GType is registered
87  * with the type system prior to calling g_icon_new_for_string().
88  */
89 public interface IconIF
90 {
91 	
92 	
93 	public GIcon* getIconTStruct();
94 	
95 	/** the main Gtk struct as a void* */
96 	protected void* getStruct();
97 	
98 	
99 	/**
100 	 */
101 	
102 	/**
103 	 * Gets a hash for an icon.
104 	 * Virtual: hash
105 	 * Params:
106 	 * icon = gconstpointer to an icon object.
107 	 * Returns: a guint containing a hash for the icon, suitable for use in a GHashTable or similar data structure.
108 	 */
109 	public static uint hash(void* icon);
110 	
111 	/**
112 	 * Checks if two icons are equal.
113 	 * Params:
114 	 * icon2 = pointer to the second GIcon.
115 	 * Returns: TRUE if icon1 is equal to icon2. FALSE otherwise.
116 	 */
117 	public int equal(GIcon* icon2);
118 	
119 	/**
120 	 * Generates a textual representation of icon that can be used for
121 	 * serialization such as when passing icon to a different process or
122 	 * saving it to persistent storage. Use g_icon_new_for_string() to
123 	 * get icon back from the returned string.
124 	 * The encoding of the returned string is proprietary to GIcon except
125 	 * in the following two cases
126 	 *  If icon is a GFileIcon, the returned string is a native path
127 	 *  (such as /path/to/my icon.png) without escaping
128 	 *  if the GFile for icon is a native file. If the file is not
129 	 *  native, the returned string is the result of g_file_get_uri()
130 	 *  (such as sftp://path/to/my%20icon.png).
131 	 *  If icon is a GThemedIcon with exactly one name, the encoding is
132 	 *  simply the name (such as network-server).
133 	 * Virtual: to_tokens
134 	 * Since 2.20
135 	 * Returns: An allocated NUL-terminated UTF8 string or NULL if icon can't be serialized. Use g_free() to free.
136 	 */
137 	public string toString();
138 }