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