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