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  * Description
71  * GIOExtensionPoint provides a mechanism for modules to extend the
72  * functionality of the library or application that loaded it in an
73  * organized fashion.
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  * A module can implement an extension point by specifying the GType
80  * that implements the functionality. Additionally, each implementation
81  * of an extension point has a name, and a priority. Use
82  * g_io_extension_point_implement() to implement an extension point.
83  * $(DDOC_COMMENT example)
84  * $(DDOC_COMMENT example)
85  *  It is up to the code that registered the extension point how
86  *  it uses the implementations that have been associated with it.
87  *  Depending on the use case, it may use all implementations, or
88  *  only the one with the highest priority, or pick a specific
89  *  one by name.
90  *  To avoid opening all modules just to find out what extension
91  *  points they implement, GIO makes use of a caching mechanism,
92  *  see gio-querymodules.
93  *  You are expected to run this command after installing a
94  *  GIO module.
95  */
96 public class IOExtension
97 {
98 	
99 	/** the main Gtk struct */
100 	protected GIOExtension* gIOExtension;
101 	
102 	
103 	public GIOExtension* getIOExtensionStruct()
104 	{
105 		return gIOExtension;
106 	}
107 	
108 	
109 	/** the main Gtk struct as a void* */
110 	protected void* getStruct()
111 	{
112 		return cast(void*)gIOExtension;
113 	}
114 	
115 	/**
116 	 * Sets our main struct and passes it to the parent class
117 	 */
118 	public this (GIOExtension* gIOExtension)
119 	{
120 		this.gIOExtension = gIOExtension;
121 	}
122 	
123 	/**
124 	 */
125 	
126 	/**
127 	 * Gets the name under which extension was registered.
128 	 * Note that the same type may be registered as extension
129 	 * for multiple extension points, under different names.
130 	 * Returns: the name of extension.
131 	 */
132 	public string getName()
133 	{
134 		// const char * g_io_extension_get_name (GIOExtension *extension);
135 		return Str.toString(g_io_extension_get_name(gIOExtension));
136 	}
137 	
138 	/**
139 	 * Gets the priority with which extension was registered.
140 	 * Returns: the priority of extension
141 	 */
142 	public int getPriority()
143 	{
144 		// gint g_io_extension_get_priority (GIOExtension *extension);
145 		return g_io_extension_get_priority(gIOExtension);
146 	}
147 	
148 	/**
149 	 * Gets the type associated with extension.
150 	 * Returns: the type of extension
151 	 */
152 	public GType getType()
153 	{
154 		// GType g_io_extension_get_type (GIOExtension *extension);
155 		return g_io_extension_get_type(gIOExtension);
156 	}
157 	
158 	/**
159 	 * Gets a reference to the class for the type that is
160 	 * associated with extension.
161 	 * Returns: the GTypeClass for the type of extension. [transfer full]
162 	 */
163 	public GTypeClass* refClass()
164 	{
165 		// GTypeClass * g_io_extension_ref_class (GIOExtension *extension);
166 		return g_io_extension_ref_class(gIOExtension);
167 	}
168 }