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  = GtkAccessible.html
27  * outPack = gtk
28  * outFile = Accessible
29  * strct   = GtkAccessible
30  * realStrct=
31  * ctorStrct=
32  * clss    = Accessible
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_accessible_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- gtk.Widget
48  * structWrap:
49  * 	- GtkWidget* -> Widget
50  * module aliases:
51  * local aliases:
52  * overrides:
53  */
54 
55 module gtk.Accessible;
56 
57 public  import gtkc.gtktypes;
58 
59 private import gtkc.gtk;
60 private import glib.ConstructionException;
61 private import gobject.ObjectG;
62 
63 
64 private import gtk.Widget;
65 
66 
67 
68 private import atk.ObjectAtk;
69 
70 /**
71  * Description
72  */
73 public class Accessible : ObjectAtk
74 {
75 	
76 	/** the main Gtk struct */
77 	protected GtkAccessible* gtkAccessible;
78 	
79 	
80 	public GtkAccessible* getAccessibleStruct()
81 	{
82 		return gtkAccessible;
83 	}
84 	
85 	
86 	/** the main Gtk struct as a void* */
87 	protected override void* getStruct()
88 	{
89 		return cast(void*)gtkAccessible;
90 	}
91 	
92 	/**
93 	 * Sets our main struct and passes it to the parent class
94 	 */
95 	public this (GtkAccessible* gtkAccessible)
96 	{
97 		super(cast(AtkObject*)gtkAccessible);
98 		this.gtkAccessible = gtkAccessible;
99 	}
100 	
101 	protected override void setStruct(GObject* obj)
102 	{
103 		super.setStruct(obj);
104 		gtkAccessible = cast(GtkAccessible*)obj;
105 	}
106 	
107 	/**
108 	 */
109 	
110 	/**
111 	 * This function specifies the callback function to be called when the widget
112 	 * corresponding to a GtkAccessible is destroyed.
113 	 */
114 	public void connectWidgetDestroyed()
115 	{
116 		// void gtk_accessible_connect_widget_destroyed  (GtkAccessible *accessible);
117 		gtk_accessible_connect_widget_destroyed(gtkAccessible);
118 	}
119 	
120 	/**
121 	 * Gets the GtkWidget corresponding to the GtkAccessible. The returned widget
122 	 * does not have a reference added, so you do not need to unref it.
123 	 * Since 2.22
124 	 * Returns: pointer to the GtkWidget corresponding to the GtkAccessible, or NULL. [transfer none]
125 	 */
126 	public Widget getWidget()
127 	{
128 		// GtkWidget * gtk_accessible_get_widget (GtkAccessible *accessible);
129 		auto p = gtk_accessible_get_widget(gtkAccessible);
130 		
131 		if(p is null)
132 		{
133 			return null;
134 		}
135 		
136 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
137 	}
138 	
139 	/**
140 	 * Sets the GtkWidget corresponding to the GtkAccessible.
141 	 * Since 2.22
142 	 * Params:
143 	 * widget = a GtkWidget
144 	 */
145 	public void setWidget(Widget widget)
146 	{
147 		// void gtk_accessible_set_widget (GtkAccessible *accessible,  GtkWidget *widget);
148 		gtk_accessible_set_widget(gtkAccessible, (widget is null) ? null : widget.getWidgetStruct());
149 	}
150 }