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.WindowT;
26 
27 public  import gobject.Signals;
28 public  import gtkc.atk;
29 public  import gtkc.atktypes;
30 public  import gtkc.gdktypes;
31 
32 
33 /**
34  * #AtkWindow should be implemented by the UI elements that represent
35  * a top-level window, such as the main window of an application or
36  * dialog.
37  */
38 public template WindowT(TStruct)
39 {
40 	/** Get the main Gtk struct */
41 	public AtkWindow* getWindowStruct()
42 	{
43 		return cast(AtkWindow*)getStruct();
44 	}
45 
46 	/**
47 	 */
48 
49 	int[string] connectedSignals;
50 
51 	void delegate(WindowIF)[] _onActivateListeners;
52 	@property void delegate(WindowIF)[] onActivateListeners()
53 	{
54 		return _onActivateListeners;
55 	}
56 	/**
57 	 * The signal #AtkWindow::activate is emitted when a window
58 	 * becomes the active window of the application or session.
59 	 *
60 	 * Since: 2.2
61 	 */
62 	void addOnActivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
63 	{
64 		if ( "activate" !in connectedSignals )
65 		{
66 			Signals.connectData(
67 				this,
68 				"activate",
69 				cast(GCallback)&callBackActivate,
70 				cast(void*)cast(WindowIF)this,
71 				null,
72 				connectFlags);
73 			connectedSignals["activate"] = 1;
74 		}
75 		_onActivateListeners ~= dlg;
76 	}
77 	extern(C) static void callBackActivate(AtkWindow* windowStruct, WindowIF _window)
78 	{
79 		foreach ( void delegate(WindowIF) dlg; _window.onActivateListeners )
80 		{
81 			dlg(_window);
82 		}
83 	}
84 
85 	void delegate(WindowIF)[] _onCreateListeners;
86 	@property void delegate(WindowIF)[] onCreateListeners()
87 	{
88 		return _onCreateListeners;
89 	}
90 	/**
91 	 * The signal #AtkWindow::create is emitted when a new window
92 	 * is created.
93 	 *
94 	 * Since: 2.2
95 	 */
96 	void addOnCreate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
97 	{
98 		if ( "create" !in connectedSignals )
99 		{
100 			Signals.connectData(
101 				this,
102 				"create",
103 				cast(GCallback)&callBackCreate,
104 				cast(void*)cast(WindowIF)this,
105 				null,
106 				connectFlags);
107 			connectedSignals["create"] = 1;
108 		}
109 		_onCreateListeners ~= dlg;
110 	}
111 	extern(C) static void callBackCreate(AtkWindow* windowStruct, WindowIF _window)
112 	{
113 		foreach ( void delegate(WindowIF) dlg; _window.onCreateListeners )
114 		{
115 			dlg(_window);
116 		}
117 	}
118 
119 	void delegate(WindowIF)[] _onDeactivateListeners;
120 	@property void delegate(WindowIF)[] onDeactivateListeners()
121 	{
122 		return _onDeactivateListeners;
123 	}
124 	/**
125 	 * The signal #AtkWindow::deactivate is emitted when a window is
126 	 * no longer the active window of the application or session.
127 	 *
128 	 * Since: 2.2
129 	 */
130 	void addOnDeactivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
131 	{
132 		if ( "deactivate" !in connectedSignals )
133 		{
134 			Signals.connectData(
135 				this,
136 				"deactivate",
137 				cast(GCallback)&callBackDeactivate,
138 				cast(void*)cast(WindowIF)this,
139 				null,
140 				connectFlags);
141 			connectedSignals["deactivate"] = 1;
142 		}
143 		_onDeactivateListeners ~= dlg;
144 	}
145 	extern(C) static void callBackDeactivate(AtkWindow* windowStruct, WindowIF _window)
146 	{
147 		foreach ( void delegate(WindowIF) dlg; _window.onDeactivateListeners )
148 		{
149 			dlg(_window);
150 		}
151 	}
152 
153 	void delegate(WindowIF)[] _onDestroyListeners;
154 	@property void delegate(WindowIF)[] onDestroyListeners()
155 	{
156 		return _onDestroyListeners;
157 	}
158 	/**
159 	 * The signal #AtkWindow::destroy is emitted when a window is
160 	 * destroyed.
161 	 *
162 	 * Since: 2.2
163 	 */
164 	void addOnDestroy(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
165 	{
166 		if ( "destroy" !in connectedSignals )
167 		{
168 			Signals.connectData(
169 				this,
170 				"destroy",
171 				cast(GCallback)&callBackDestroy,
172 				cast(void*)cast(WindowIF)this,
173 				null,
174 				connectFlags);
175 			connectedSignals["destroy"] = 1;
176 		}
177 		_onDestroyListeners ~= dlg;
178 	}
179 	extern(C) static void callBackDestroy(AtkWindow* windowStruct, WindowIF _window)
180 	{
181 		foreach ( void delegate(WindowIF) dlg; _window.onDestroyListeners )
182 		{
183 			dlg(_window);
184 		}
185 	}
186 
187 	void delegate(WindowIF)[] _onMaximizeListeners;
188 	@property void delegate(WindowIF)[] onMaximizeListeners()
189 	{
190 		return _onMaximizeListeners;
191 	}
192 	/**
193 	 * The signal #AtkWindow::maximize is emitted when a window
194 	 * is maximized.
195 	 *
196 	 * Since: 2.2
197 	 */
198 	void addOnMaximize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
199 	{
200 		if ( "maximize" !in connectedSignals )
201 		{
202 			Signals.connectData(
203 				this,
204 				"maximize",
205 				cast(GCallback)&callBackMaximize,
206 				cast(void*)cast(WindowIF)this,
207 				null,
208 				connectFlags);
209 			connectedSignals["maximize"] = 1;
210 		}
211 		_onMaximizeListeners ~= dlg;
212 	}
213 	extern(C) static void callBackMaximize(AtkWindow* windowStruct, WindowIF _window)
214 	{
215 		foreach ( void delegate(WindowIF) dlg; _window.onMaximizeListeners )
216 		{
217 			dlg(_window);
218 		}
219 	}
220 
221 	void delegate(WindowIF)[] _onMinimizeListeners;
222 	@property void delegate(WindowIF)[] onMinimizeListeners()
223 	{
224 		return _onMinimizeListeners;
225 	}
226 	/**
227 	 * The signal #AtkWindow::minimize is emitted when a window
228 	 * is minimized.
229 	 *
230 	 * Since: 2.2
231 	 */
232 	void addOnMinimize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
233 	{
234 		if ( "minimize" !in connectedSignals )
235 		{
236 			Signals.connectData(
237 				this,
238 				"minimize",
239 				cast(GCallback)&callBackMinimize,
240 				cast(void*)cast(WindowIF)this,
241 				null,
242 				connectFlags);
243 			connectedSignals["minimize"] = 1;
244 		}
245 		_onMinimizeListeners ~= dlg;
246 	}
247 	extern(C) static void callBackMinimize(AtkWindow* windowStruct, WindowIF _window)
248 	{
249 		foreach ( void delegate(WindowIF) dlg; _window.onMinimizeListeners )
250 		{
251 			dlg(_window);
252 		}
253 	}
254 
255 	void delegate(WindowIF)[] _onMoveListeners;
256 	@property void delegate(WindowIF)[] onMoveListeners()
257 	{
258 		return _onMoveListeners;
259 	}
260 	/**
261 	 * The signal #AtkWindow::move is emitted when a window
262 	 * is moved.
263 	 *
264 	 * Since: 2.2
265 	 */
266 	void addOnMove(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
267 	{
268 		if ( "move" !in connectedSignals )
269 		{
270 			Signals.connectData(
271 				this,
272 				"move",
273 				cast(GCallback)&callBackMove,
274 				cast(void*)cast(WindowIF)this,
275 				null,
276 				connectFlags);
277 			connectedSignals["move"] = 1;
278 		}
279 		_onMoveListeners ~= dlg;
280 	}
281 	extern(C) static void callBackMove(AtkWindow* windowStruct, WindowIF _window)
282 	{
283 		foreach ( void delegate(WindowIF) dlg; _window.onMoveListeners )
284 		{
285 			dlg(_window);
286 		}
287 	}
288 
289 	void delegate(WindowIF)[] _onResizeListeners;
290 	@property void delegate(WindowIF)[] onResizeListeners()
291 	{
292 		return _onResizeListeners;
293 	}
294 	/**
295 	 * The signal #AtkWindow::resize is emitted when a window
296 	 * is resized.
297 	 *
298 	 * Since: 2.2
299 	 */
300 	void addOnResize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
301 	{
302 		if ( "resize" !in connectedSignals )
303 		{
304 			Signals.connectData(
305 				this,
306 				"resize",
307 				cast(GCallback)&callBackResize,
308 				cast(void*)cast(WindowIF)this,
309 				null,
310 				connectFlags);
311 			connectedSignals["resize"] = 1;
312 		}
313 		_onResizeListeners ~= dlg;
314 	}
315 	extern(C) static void callBackResize(AtkWindow* windowStruct, WindowIF _window)
316 	{
317 		foreach ( void delegate(WindowIF) dlg; _window.onResizeListeners )
318 		{
319 			dlg(_window);
320 		}
321 	}
322 
323 	void delegate(WindowIF)[] _onRestoreListeners;
324 	@property void delegate(WindowIF)[] onRestoreListeners()
325 	{
326 		return _onRestoreListeners;
327 	}
328 	/**
329 	 * The signal #AtkWindow::restore is emitted when a window
330 	 * is restored.
331 	 *
332 	 * Since: 2.2
333 	 */
334 	void addOnRestore(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
335 	{
336 		if ( "restore" !in connectedSignals )
337 		{
338 			Signals.connectData(
339 				this,
340 				"restore",
341 				cast(GCallback)&callBackRestore,
342 				cast(void*)cast(WindowIF)this,
343 				null,
344 				connectFlags);
345 			connectedSignals["restore"] = 1;
346 		}
347 		_onRestoreListeners ~= dlg;
348 	}
349 	extern(C) static void callBackRestore(AtkWindow* windowStruct, WindowIF _window)
350 	{
351 		foreach ( void delegate(WindowIF) dlg; _window.onRestoreListeners )
352 		{
353 			dlg(_window);
354 		}
355 	}
356 }