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