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 = AtkNoOpObject.html 27 * outPack = atk 28 * outFile = NoOpObject 29 * strct = AtkNoOpObject 30 * realStrct= 31 * ctorStrct= 32 * clss = NoOpObject 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - atk_no_op_object_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - atk.ObjectAtk 47 * - gobject.ObjectG 48 * structWrap: 49 * - AtkObject* -> ObjectAtk 50 * - GObject* -> ObjectG 51 * module aliases: 52 * local aliases: 53 * overrides: 54 */ 55 56 module atk.NoOpObject; 57 58 public import gtkc.atktypes; 59 60 private import gtkc.atk; 61 private import glib.ConstructionException; 62 private import gobject.ObjectG; 63 64 65 private import atk.ObjectAtk; 66 private import gobject.ObjectG; 67 68 69 70 private import atk.ObjectAtk; 71 72 /** 73 * An AtkNoOpObject is an AtkObject which purports to implement all 74 * ATK interfaces. It is the type of AtkObject which is created if an 75 * accessible object is requested for an object type for which no 76 * factory type is specified. 77 */ 78 public class NoOpObject : ObjectAtk 79 { 80 81 /** the main Gtk struct */ 82 protected AtkNoOpObject* atkNoOpObject; 83 84 85 public AtkNoOpObject* getNoOpObjectStruct() 86 { 87 return atkNoOpObject; 88 } 89 90 91 /** the main Gtk struct as a void* */ 92 protected override void* getStruct() 93 { 94 return cast(void*)atkNoOpObject; 95 } 96 97 /** 98 * Sets our main struct and passes it to the parent class 99 */ 100 public this (AtkNoOpObject* atkNoOpObject) 101 { 102 super(cast(AtkObject*)atkNoOpObject); 103 this.atkNoOpObject = atkNoOpObject; 104 } 105 106 protected override void setStruct(GObject* obj) 107 { 108 super.setStruct(obj); 109 atkNoOpObject = cast(AtkNoOpObject*)obj; 110 } 111 112 /** 113 */ 114 115 /** 116 * Provides a default (non-functioning stub) AtkObject. 117 * Application maintainers should not use this method. 118 * Params: 119 * obj = a GObject 120 * Returns: a default (non-functioning stub) AtkObject 121 */ 122 public static ObjectAtk newNoOpObject(ObjectG obj) 123 { 124 // AtkObject * atk_no_op_object_new (GObject *obj); 125 auto p = atk_no_op_object_new((obj is null) ? null : obj.getObjectGStruct()); 126 127 if(p is null) 128 { 129 return null; 130 } 131 132 return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); 133 } 134 }