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