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  * Conversion parameters:
26  * inFile  = AtkGObjectAccessible.html
27  * outPack = atk
28  * outFile = GObjectAccessible
29  * strct   = AtkGObjectAccessible
30  * realStrct=
31  * ctorStrct=
32  * clss    = GObjectAccessible
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- atk_gobject_accessible_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- atk.ObjectAtk
47  * 	- gobject.ObjectG
48  * structWrap:
49  * 	- AtkObject* -> ObjectAtk
50  * 	- GObject* -> ObjectG
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module atk.GObjectAccessible;
57 
58 public  import gtkc.atktypes;
59 
60 private import gtkc.atk;
61 private import glib.ConstructionException;
62 private import gobject.ObjectG;
63 
64 
65 private import atk.ObjectAtk;
66 private import gobject.ObjectG;
67 
68 
69 
70 private import atk.ObjectAtk;
71 
72 /**
73  * Description
74  * This object class is derived from AtkObject. It can be used as a basis for
75  * implementing accessible objects for GObjects which are not derived from
76  * GtkWidget. One example of its use is in providing an accessible object
77  * for GnomeCanvasItem in the GAIL library.
78  */
79 public class GObjectAccessible : ObjectAtk
80 {
81 	
82 	/** the main Gtk struct */
83 	protected AtkGObjectAccessible* atkGObjectAccessible;
84 	
85 	
86 	public AtkGObjectAccessible* getGObjectAccessibleStruct()
87 	{
88 		return atkGObjectAccessible;
89 	}
90 	
91 	
92 	/** the main Gtk struct as a void* */
93 	protected override void* getStruct()
94 	{
95 		return cast(void*)atkGObjectAccessible;
96 	}
97 	
98 	/**
99 	 * Sets our main struct and passes it to the parent class
100 	 */
101 	public this (AtkGObjectAccessible* atkGObjectAccessible)
102 	{
103 		super(cast(AtkObject*)atkGObjectAccessible);
104 		this.atkGObjectAccessible = atkGObjectAccessible;
105 	}
106 	
107 	protected override void setStruct(GObject* obj)
108 	{
109 		super.setStruct(obj);
110 		atkGObjectAccessible = cast(AtkGObjectAccessible*)obj;
111 	}
112 	
113 	/**
114 	 */
115 	
116 	/**
117 	 * Gets the accessible object for the specified obj.
118 	 * Params:
119 	 * obj = a GObject
120 	 * Returns: a AtkObject which is the accessible object for the obj. [transfer none]
121 	 */
122 	public static ObjectAtk forObject(ObjectG obj)
123 	{
124 		// AtkObject * atk_gobject_accessible_for_object (GObject *obj);
125 		auto p = atk_gobject_accessible_for_object((obj is null) ? null : obj.getObjectGStruct());
126 		
127 		if(p is null)
128 		{
129 			return null;
130 		}
131 		
132 		return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p);
133 	}
134 	
135 	/**
136 	 * Gets the GObject for which obj is the accessible object.
137 	 * Returns: a GObject which is the object for which obj is the accessible object. [transfer none]
138 	 */
139 	public ObjectG getObject()
140 	{
141 		// GObject * atk_gobject_accessible_get_object (AtkGObjectAccessible *obj);
142 		auto p = atk_gobject_accessible_get_object(atkGObjectAccessible);
143 		
144 		if(p is null)
145 		{
146 			return null;
147 		}
148 		
149 		return ObjectG.getDObject!(ObjectG)(cast(GObject*) p);
150 	}
151 }