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 private import gobject.ObjectG;
62 
63 
64 private import glib.Str;
65 
66 
67 
68 
69 /**
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  *
74  * An extension point is identified by a name, and it may optionally
75  * require that any implementation must by of a certain type (or derived
76  * thereof). Use g_io_extension_point_register() to register an
77  * extension point, and g_io_extension_point_set_required_type() to
78  * set a required type.
79  *
80  * A module can implement an extension point by specifying the GType
81  * that implements the functionality. Additionally, each implementation
82  * of an extension point has a name, and a priority. Use
83  * g_io_extension_point_implement() to implement an extension point.
84  *
85  * $(DDOC_COMMENT example)
86  *
87  * $(DDOC_COMMENT example)
88  *
89  *  It is up to the code that registered the extension point how
90  *  it uses the implementations that have been associated with it.
91  *  Depending on the use case, it may use all implementations, or
92  *  only the one with the highest priority, or pick a specific
93  *  one by name.
94  *
95  *  To avoid opening all modules just to find out what extension
96  *  points they implement, GIO makes use of a caching mechanism,
97  *  see gio-querymodules.
98  *  You are expected to run this command after installing a
99  *  GIO module.
100  *
101  *  The GIO_EXTRA_MODULES environment variable can be
102  *  used to specify additional directories to automatically load modules
103  *  from. This environment variable has the same syntax as the
104  *  PATH. If two modules have the same base name in different
105  *  directories, then the latter one will be ignored. If additional
106  *  directories are specified GIO will load modules from the built-in
107  *  directory last.
108  */
109 public class IOExtension
110 {
111 	
112 	/** the main Gtk struct */
113 	protected GIOExtension* gIOExtension;
114 	
115 	
116 	public GIOExtension* getIOExtensionStruct()
117 	{
118 		return gIOExtension;
119 	}
120 	
121 	
122 	/** the main Gtk struct as a void* */
123 	protected void* getStruct()
124 	{
125 		return cast(void*)gIOExtension;
126 	}
127 	
128 	/**
129 	 * Sets our main struct and passes it to the parent class
130 	 */
131 	public this (GIOExtension* gIOExtension)
132 	{
133 		this.gIOExtension = gIOExtension;
134 	}
135 	
136 	/**
137 	 */
138 	
139 	/**
140 	 * Gets the name under which extension was registered.
141 	 * Note that the same type may be registered as extension
142 	 * for multiple extension points, under different names.
143 	 * Returns: the name of extension.
144 	 */
145 	public string getName()
146 	{
147 		// const char * g_io_extension_get_name (GIOExtension *extension);
148 		return Str.toString(g_io_extension_get_name(gIOExtension));
149 	}
150 	
151 	/**
152 	 * Gets the priority with which extension was registered.
153 	 * Returns: the priority of extension
154 	 */
155 	public int getPriority()
156 	{
157 		// gint g_io_extension_get_priority (GIOExtension *extension);
158 		return g_io_extension_get_priority(gIOExtension);
159 	}
160 	
161 	/**
162 	 * Gets the type associated with extension.
163 	 * Returns: the type of extension
164 	 */
165 	public GType getType()
166 	{
167 		// GType g_io_extension_get_type (GIOExtension *extension);
168 		return g_io_extension_get_type(gIOExtension);
169 	}
170 	
171 	/**
172 	 * Gets a reference to the class for the type that is
173 	 * associated with extension.
174 	 * Returns: the GTypeClass for the type of extension. [transfer full]
175 	 */
176 	public GTypeClass* refClass()
177 	{
178 		// GTypeClass * g_io_extension_ref_class (GIOExtension *extension);
179 		return g_io_extension_ref_class(gIOExtension);
180 	}
181 }