| 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 |
|
|---|
| 64 |
|
|---|
| 65 |
private import glib.Str; |
|---|
| 66 |
private import glib.ErrorG; |
|---|
| 67 |
private import glib.GException; |
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
/** |
|---|
| 73 |
* Description |
|---|
| 74 |
* GIcon is a very minimal interface for icons. It provides functions |
|---|
| 75 |
* for checking the equality of two icons, hashing of icons and |
|---|
| 76 |
* serializing an icon to and from strings. |
|---|
| 77 |
* GIcon does not provide the actual pixmap for the icon as this is out |
|---|
| 78 |
* of GIO's scope, however implementations of GIcon may contain the name |
|---|
| 79 |
* of an icon (see GThemedIcon), or the path to an icon (see GLoadableIcon). |
|---|
| 80 |
* To obtain a hash of a GIcon, see g_icon_hash(). |
|---|
| 81 |
* To check if two GIcons are equal, see g_icon_equal(). |
|---|
| 82 |
* For serializing a GIcon, use g_icon_to_string() and |
|---|
| 83 |
* g_icon_new_for_string(). |
|---|
| 84 |
* If your application or library provides one or more GIcon |
|---|
| 85 |
* implementations you need to ensure that each GType is registered |
|---|
| 86 |
* with the type system prior to calling g_icon_new_for_string(). |
|---|
| 87 |
*/ |
|---|
| 88 |
public interface IconIF |
|---|
| 89 |
{ |
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
public GIcon* getIconTStruct(); |
|---|
| 93 |
|
|---|
| 94 |
/** the main Gtk struct as a void* */ |
|---|
| 95 |
protected void* getStruct(); |
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
/** |
|---|
| 99 |
*/ |
|---|
| 100 |
|
|---|
| 101 |
/** |
|---|
| 102 |
* Gets a hash for an icon. |
|---|
| 103 |
* Virtual: hash |
|---|
| 104 |
* Params: |
|---|
| 105 |
* icon = gconstpointer to an icon object. |
|---|
| 106 |
* Returns: a guint containing a hash for the icon, suitable for use in a GHashTable or similar data structure. |
|---|
| 107 |
*/ |
|---|
| 108 |
public static uint hash(void* icon); |
|---|
| 109 |
|
|---|
| 110 |
/** |
|---|
| 111 |
* Checks if two icons are equal. |
|---|
| 112 |
* Params: |
|---|
| 113 |
* icon2 = pointer to the second GIcon. |
|---|
| 114 |
* Returns: TRUE if icon1 is equal to icon2. FALSE otherwise. |
|---|
| 115 |
*/ |
|---|
| 116 |
public int equal(GIcon* icon2); |
|---|
| 117 |
|
|---|
| 118 |
/** |
|---|
| 119 |
* Generates a textual representation of icon that can be used for |
|---|
| 120 |
* serialization such as when passing icon to a different process or |
|---|
| 121 |
* saving it to persistent storage. Use g_icon_new_for_string() to |
|---|
| 122 |
* get icon back from the returned string. |
|---|
| 123 |
* The encoding of the returned string is proprietary to GIcon except |
|---|
| 124 |
* in the following two cases |
|---|
| 125 |
* If icon is a GFileIcon, the returned string is a native path |
|---|
| 126 |
* (such as /path/to/my icon.png) without escaping |
|---|
| 127 |
* if the GFile for icon is a native file. If the file is not |
|---|
| 128 |
* native, the returned string is the result of g_file_get_uri() |
|---|
| 129 |
* (such as sftp://path/to/my%20icon.png). |
|---|
| 130 |
* If icon is a GThemedIcon with exactly one name, the encoding is |
|---|
| 131 |
* simply the name (such as network-server). |
|---|
| 132 |
* Virtual: to_tokens |
|---|
| 133 |
* Since 2.20 |
|---|
| 134 |
* Returns: An allocated NUL-terminated UTF8 string or NULL if icon can't be serialized. Use g_free() to free. |
|---|
| 135 |
*/ |
|---|
| 136 |
public string toString(); |
|---|
| 137 |
} |
|---|