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 atk.NoOpObject; 26 27 private import atk.ActionIF; 28 private import atk.ActionT; 29 private import atk.ComponentIF; 30 private import atk.ComponentT; 31 private import atk.DocumentIF; 32 private import atk.DocumentT; 33 private import atk.EditableTextIF; 34 private import atk.EditableTextT; 35 private import atk.HypertextIF; 36 private import atk.HypertextT; 37 private import atk.ImageIF; 38 private import atk.ImageT; 39 private import atk.ObjectAtk; 40 private import atk.SelectionIF; 41 private import atk.SelectionT; 42 private import atk.TableCellIF; 43 private import atk.TableCellT; 44 private import atk.TableIF; 45 private import atk.TableT; 46 private import atk.TextIF; 47 private import atk.TextT; 48 private import atk.ValueIF; 49 private import atk.ValueT; 50 private import atk.WindowIF; 51 private import atk.WindowT; 52 private import atk.c.functions; 53 public import atk.c.types; 54 private import glib.ConstructionException; 55 private import gobject.ObjectG; 56 public import gtkc.atktypes; 57 58 59 /** 60 * An AtkNoOpObject is an AtkObject which purports to implement all 61 * ATK interfaces. It is the type of AtkObject which is created if an 62 * accessible object is requested for an object type for which no 63 * factory type is specified. 64 */ 65 public class NoOpObject : ObjectAtk, ActionIF, ComponentIF, DocumentIF, EditableTextIF, HypertextIF, ImageIF, SelectionIF, TableIF, TableCellIF, TextIF, ValueIF, WindowIF 66 { 67 /** the main Gtk struct */ 68 protected AtkNoOpObject* atkNoOpObject; 69 70 /** Get the main Gtk struct */ 71 public AtkNoOpObject* getNoOpObjectStruct(bool transferOwnership = false) 72 { 73 if (transferOwnership) 74 ownedRef = false; 75 return atkNoOpObject; 76 } 77 78 /** the main Gtk struct as a void* */ 79 protected override void* getStruct() 80 { 81 return cast(void*)atkNoOpObject; 82 } 83 84 protected override void setStruct(GObject* obj) 85 { 86 atkNoOpObject = cast(AtkNoOpObject*)obj; 87 super.setStruct(obj); 88 } 89 90 /** 91 * Sets our main struct and passes it to the parent class. 92 */ 93 public this (AtkNoOpObject* atkNoOpObject, bool ownedRef = false) 94 { 95 this.atkNoOpObject = atkNoOpObject; 96 super(cast(AtkObject*)atkNoOpObject, ownedRef); 97 } 98 99 // add the Action capabilities 100 mixin ActionT!(AtkNoOpObject); 101 102 // add the Component capabilities 103 mixin ComponentT!(AtkNoOpObject); 104 105 // add the Document capabilities 106 mixin DocumentT!(AtkNoOpObject); 107 108 // add the EditableText capabilities 109 mixin EditableTextT!(AtkNoOpObject); 110 111 // add the Hypertext capabilities 112 mixin HypertextT!(AtkNoOpObject); 113 114 // add the Image capabilities 115 mixin ImageT!(AtkNoOpObject); 116 117 // add the Selection capabilities 118 mixin SelectionT!(AtkNoOpObject); 119 120 // add the Table capabilities 121 mixin TableT!(AtkNoOpObject); 122 123 // add the TableCell capabilities 124 mixin TableCellT!(AtkNoOpObject); 125 126 // add the Text capabilities 127 mixin TextT!(AtkNoOpObject); 128 129 // add the Value capabilities 130 mixin ValueT!(AtkNoOpObject); 131 132 // add the Window capabilities 133 mixin WindowT!(AtkNoOpObject); 134 135 /** 136 * Removes the specified child of the object from the object's selection. 137 * 138 * Params: 139 * i = a #gint specifying the index in the selection set. (e.g. the 140 * ith selection as opposed to the ith child). 141 * 142 * Return: TRUE if success, FALSE otherwise. 143 */ 144 public bool removeSelection(int i) 145 { 146 return atk_selection_remove_selection(getSelectionStruct(), i) != 0; 147 } 148 149 /** 150 */ 151 152 /** */ 153 public static GType getType() 154 { 155 return atk_no_op_object_get_type(); 156 } 157 158 /** 159 * Provides a default (non-functioning stub) #AtkObject. 160 * Application maintainers should not use this method. 161 * 162 * Params: 163 * obj = a #GObject 164 * 165 * Returns: a default (non-functioning stub) #AtkObject 166 * 167 * Throws: ConstructionException GTK+ fails to create the object. 168 */ 169 public this(ObjectG obj) 170 { 171 auto p = atk_no_op_object_new((obj is null) ? null : obj.getObjectGStruct()); 172 173 if(p is null) 174 { 175 throw new ConstructionException("null returned by new"); 176 } 177 178 this(cast(AtkNoOpObject*) p, true); 179 } 180 }