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