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