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