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 	protected bool ownedRef;
43 
44 	/** Get the main Gtk struct */
45 	public GIOExtension* getIOExtensionStruct()
46 	{
47 		return gIOExtension;
48 	}
49 
50 	/** the main Gtk struct as a void* */
51 	protected void* getStruct()
52 	{
53 		return cast(void*)gIOExtension;
54 	}
55 
56 	/**
57 	 * Sets our main struct and passes it to the parent class.
58 	 */
59 	public this (GIOExtension* gIOExtension, bool ownedRef = false)
60 	{
61 		this.gIOExtension = gIOExtension;
62 		this.ownedRef = ownedRef;
63 	}
64 
65 
66 	/**
67 	 * Gets the name under which @extension was registered.
68 	 *
69 	 * Note that the same type may be registered as extension
70 	 * for multiple extension points, under different names.
71 	 *
72 	 * Return: the name of @extension.
73 	 */
74 	public string getName()
75 	{
76 		return Str.toString(g_io_extension_get_name(gIOExtension));
77 	}
78 
79 	/**
80 	 * Gets the priority with which @extension was registered.
81 	 *
82 	 * Return: the priority of @extension
83 	 */
84 	public int getPriority()
85 	{
86 		return g_io_extension_get_priority(gIOExtension);
87 	}
88 
89 	/**
90 	 * Gets the type associated with @extension.
91 	 *
92 	 * Return: the type of @extension
93 	 */
94 	public GType getType()
95 	{
96 		return g_io_extension_get_type(gIOExtension);
97 	}
98 
99 	/**
100 	 * Gets a reference to the class for the type that is
101 	 * associated with @extension.
102 	 *
103 	 * Return: the #GTypeClass for the type of @extension
104 	 */
105 	public TypeClass refClass()
106 	{
107 		auto p = g_io_extension_ref_class(gIOExtension);
108 		
109 		if(p is null)
110 		{
111 			return null;
112 		}
113 		
114 		return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p, true);
115 	}
116 }