| 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 = gio-Extension-Points.html |
|---|
| 27 |
* outPack = gio |
|---|
| 28 |
* outFile = IOExtension |
|---|
| 29 |
* strct = GIOExtension |
|---|
| 30 |
* realStrct= |
|---|
| 31 |
* ctorStrct= |
|---|
| 32 |
* clss = IOExtension |
|---|
| 33 |
* interf = |
|---|
| 34 |
* class Code: No |
|---|
| 35 |
* interface Code: No |
|---|
| 36 |
* template for: |
|---|
| 37 |
* extend = |
|---|
| 38 |
* implements: |
|---|
| 39 |
* prefixes: |
|---|
| 40 |
* - g_io_extension_ |
|---|
| 41 |
* omit structs: |
|---|
| 42 |
* omit prefixes: |
|---|
| 43 |
* - g_io_extension_point_ |
|---|
| 44 |
* omit code: |
|---|
| 45 |
* omit signals: |
|---|
| 46 |
* imports: |
|---|
| 47 |
* - glib.Str |
|---|
| 48 |
* structWrap: |
|---|
| 49 |
* - GIOExtension* -> IOExtension |
|---|
| 50 |
* module aliases: |
|---|
| 51 |
* local aliases: |
|---|
| 52 |
* overrides: |
|---|
| 53 |
*/ |
|---|
| 54 |
|
|---|
| 55 |
module gio.IOExtension; |
|---|
| 56 |
|
|---|
| 57 |
public import gtkc.giotypes; |
|---|
| 58 |
|
|---|
| 59 |
private import gtkc.gio; |
|---|
| 60 |
private import glib.ConstructionException; |
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
private import glib.Str; |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
/** |
|---|
| 69 |
* Description |
|---|
| 70 |
* GIOExtensionPoint provides a mechanism for modules to extend the |
|---|
| 71 |
* functionality of the library or application that loaded it in an |
|---|
| 72 |
* organized fashion. |
|---|
| 73 |
* An extension point is identified by a name, and it may optionally |
|---|
| 74 |
* require that any implementation must by of a certain type (or derived |
|---|
| 75 |
* thereof). Use g_io_extension_point_register() to register an |
|---|
| 76 |
* extension point, and g_io_extension_point_set_required_type() to |
|---|
| 77 |
* set a required type. |
|---|
| 78 |
* A module can implement an extension point by specifying the GType |
|---|
| 79 |
* that implements the functionality. Additionally, each implementation |
|---|
| 80 |
* of an extension point has a name, and a priority. Use |
|---|
| 81 |
* g_io_extension_point_implement() to implement an extension point. |
|---|
| 82 |
* $(DDOC_COMMENT example) |
|---|
| 83 |
* $(DDOC_COMMENT example) |
|---|
| 84 |
* It is up to the code that registered the extension point how |
|---|
| 85 |
* it uses the implementations that have been associated with it. |
|---|
| 86 |
* Depending on the use case, it may use all implementations, or |
|---|
| 87 |
* only the one with the highest priority, or pick a specific |
|---|
| 88 |
* one by name. |
|---|
| 89 |
* To avoid opening all modules just to find out what extension |
|---|
| 90 |
* points they implement, GIO makes use of a caching mechanism, |
|---|
| 91 |
* see gio-querymodules. |
|---|
| 92 |
* You are expected to run this command after installing a |
|---|
| 93 |
* GIO module. |
|---|
| 94 |
*/ |
|---|
| 95 |
public class IOExtension |
|---|
| 96 |
{ |
|---|
| 97 |
|
|---|
| 98 |
/** the main Gtk struct */ |
|---|
| 99 |
protected GIOExtension* gIOExtension; |
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 |
public GIOExtension* getIOExtensionStruct() |
|---|
| 103 |
{ |
|---|
| 104 |
return gIOExtension; |
|---|
| 105 |
} |
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
/** the main Gtk struct as a void* */ |
|---|
| 109 |
protected void* getStruct() |
|---|
| 110 |
{ |
|---|
| 111 |
return cast(void*)gIOExtension; |
|---|
| 112 |
} |
|---|
| 113 |
|
|---|
| 114 |
/** |
|---|
| 115 |
* Sets our main struct and passes it to the parent class |
|---|
| 116 |
*/ |
|---|
| 117 |
public this (GIOExtension* gIOExtension) |
|---|
| 118 |
{ |
|---|
| 119 |
if(gIOExtension is null) |
|---|
| 120 |
{ |
|---|
| 121 |
this = null; |
|---|
| 122 |
return; |
|---|
| 123 |
} |
|---|
| 124 |
this.gIOExtension = gIOExtension; |
|---|
| 125 |
} |
|---|
| 126 |
|
|---|
| 127 |
/** |
|---|
| 128 |
*/ |
|---|
| 129 |
|
|---|
| 130 |
/** |
|---|
| 131 |
* Gets the name under which extension was registered. |
|---|
| 132 |
* Note that the same type may be registered as extension |
|---|
| 133 |
* for multiple extension points, under different names. |
|---|
| 134 |
* Returns: the name of extension. |
|---|
| 135 |
*/ |
|---|
| 136 |
public string getName() |
|---|
| 137 |
{ |
|---|
| 138 |
// const char * g_io_extension_get_name (GIOExtension *extension); |
|---|
| 139 |
return Str.toString(g_io_extension_get_name(gIOExtension)); |
|---|
| 140 |
} |
|---|
| 141 |
|
|---|
| 142 |
/** |
|---|
| 143 |
* Gets the priority with which extension was registered. |
|---|
| 144 |
* Returns: the priority of extension |
|---|
| 145 |
*/ |
|---|
| 146 |
public int getPriority() |
|---|
| 147 |
{ |
|---|
| 148 |
// gint g_io_extension_get_priority (GIOExtension *extension); |
|---|
| 149 |
return g_io_extension_get_priority(gIOExtension); |
|---|
| 150 |
} |
|---|
| 151 |
|
|---|
| 152 |
/** |
|---|
| 153 |
* Gets the type associated with extension. |
|---|
| 154 |
* Returns: the type of extension |
|---|
| 155 |
*/ |
|---|
| 156 |
public GType getType() |
|---|
| 157 |
{ |
|---|
| 158 |
// GType g_io_extension_get_type (GIOExtension *extension); |
|---|
| 159 |
return g_io_extension_get_type(gIOExtension); |
|---|
| 160 |
} |
|---|
| 161 |
|
|---|
| 162 |
/** |
|---|
| 163 |
* Gets a reference to the class for the type that is |
|---|
| 164 |
* associated with extension. |
|---|
| 165 |
* Returns: the GTypeClass for the type of extension. [transfer full] |
|---|
| 166 |
*/ |
|---|
| 167 |
public GTypeClass* refClass() |
|---|
| 168 |
{ |
|---|
| 169 |
// GTypeClass * g_io_extension_ref_class (GIOExtension *extension); |
|---|
| 170 |
return g_io_extension_ref_class(gIOExtension); |
|---|
| 171 |
} |
|---|
| 172 |
} |
|---|