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 module gio.IOExtension;
26 
27 private import glib.Str;
28 private import gobject.ObjectG;
29 private import gobject.TypeClass;
30 private import gtkc.gio;
31 public  import gtkc.giotypes;
32 
33 
34 /**
35  * #GIOExtension is an opaque data structure and can only be accessed
36  * using the following functions.
37  */
38 public class IOExtension
39 {
40 	/** the main Gtk struct */
41 	protected GIOExtension* gIOExtension;
42 
43 	/** Get the main Gtk struct */
44 	public GIOExtension* getIOExtensionStruct()
45 	{
46 		return gIOExtension;
47 	}
48 
49 	/** the main Gtk struct as a void* */
50 	protected void* getStruct()
51 	{
52 		return cast(void*)gIOExtension;
53 	}
54 
55 	/**
56 	 * Sets our main struct and passes it to the parent class.
57 	 */
58 	public this (GIOExtension* gIOExtension)
59 	{
60 		this.gIOExtension = gIOExtension;
61 	}
62 
63 
64 	/**
65 	 * Gets the name under which @extension was registered.
66 	 *
67 	 * Note that the same type may be registered as extension
68 	 * for multiple extension points, under different names.
69 	 *
70 	 * Return: the name of @extension.
71 	 */
72 	public string getName()
73 	{
74 		return Str.toString(g_io_extension_get_name(gIOExtension));
75 	}
76 
77 	/**
78 	 * Gets the priority with which @extension was registered.
79 	 *
80 	 * Return: the priority of @extension
81 	 */
82 	public int getPriority()
83 	{
84 		return g_io_extension_get_priority(gIOExtension);
85 	}
86 
87 	/**
88 	 * Gets the type associated with @extension.
89 	 *
90 	 * Return: the type of @extension
91 	 */
92 	public GType getType()
93 	{
94 		return g_io_extension_get_type(gIOExtension);
95 	}
96 
97 	/**
98 	 * Gets a reference to the class for the type that is
99 	 * associated with @extension.
100 	 *
101 	 * Return: the #GTypeClass for the type of @extension
102 	 */
103 	public TypeClass refClass()
104 	{
105 		auto p = g_io_extension_ref_class(gIOExtension);
106 		
107 		if(p is null)
108 		{
109 			return null;
110 		}
111 		
112 		return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p);
113 	}
114 }