/usr/include/d/gtkd-3/atk/WindowT.d is in libgtkd-3-dev 3.7.5-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | /*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version, with
* some exceptions, please read the COPYING file.
*
* gtkD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
module atk.WindowT;
public import atk.c.functions;
public import atk.c.types;
public import gobject.Signals;
public import gtkc.atktypes;
public import std.algorithm;
/**
* #AtkWindow should be implemented by the UI elements that represent
* a top-level window, such as the main window of an application or
* dialog.
*/
public template WindowT(TStruct)
{
/** Get the main Gtk struct */
public AtkWindow* getWindowStruct(bool transferOwnership = false)
{
if (transferOwnership)
ownedRef = false;
return cast(AtkWindow*)getStruct();
}
protected class OnActivateDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onActivateListeners ~= this;
}
void remove(OnActivateDelegateWrapper source)
{
foreach(index, wrapper; onActivateListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onActivateListeners[index] = null;
onActivateListeners = std.algorithm.remove(onActivateListeners, index);
break;
}
}
}
}
OnActivateDelegateWrapper[] onActivateListeners;
/**
* The signal #AtkWindow::activate is emitted when a window
* becomes the active window of the application or session.
*
* Since: 2.2
*/
gulong addOnActivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnActivateDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"activate",
cast(GCallback)&callBackActivate,
cast(void*)wrapper,
cast(GClosureNotify)&callBackActivateDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackActivate(AtkWindow* windowStruct, OnActivateDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackActivateDestroy(OnActivateDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnCreateDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onCreateListeners ~= this;
}
void remove(OnCreateDelegateWrapper source)
{
foreach(index, wrapper; onCreateListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onCreateListeners[index] = null;
onCreateListeners = std.algorithm.remove(onCreateListeners, index);
break;
}
}
}
}
OnCreateDelegateWrapper[] onCreateListeners;
/**
* The signal #AtkWindow::create is emitted when a new window
* is created.
*
* Since: 2.2
*/
gulong addOnCreate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnCreateDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"create",
cast(GCallback)&callBackCreate,
cast(void*)wrapper,
cast(GClosureNotify)&callBackCreateDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackCreate(AtkWindow* windowStruct, OnCreateDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackCreateDestroy(OnCreateDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnDeactivateDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onDeactivateListeners ~= this;
}
void remove(OnDeactivateDelegateWrapper source)
{
foreach(index, wrapper; onDeactivateListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onDeactivateListeners[index] = null;
onDeactivateListeners = std.algorithm.remove(onDeactivateListeners, index);
break;
}
}
}
}
OnDeactivateDelegateWrapper[] onDeactivateListeners;
/**
* The signal #AtkWindow::deactivate is emitted when a window is
* no longer the active window of the application or session.
*
* Since: 2.2
*/
gulong addOnDeactivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnDeactivateDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"deactivate",
cast(GCallback)&callBackDeactivate,
cast(void*)wrapper,
cast(GClosureNotify)&callBackDeactivateDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackDeactivate(AtkWindow* windowStruct, OnDeactivateDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackDeactivateDestroy(OnDeactivateDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnDestroyDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onDestroyListeners ~= this;
}
void remove(OnDestroyDelegateWrapper source)
{
foreach(index, wrapper; onDestroyListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onDestroyListeners[index] = null;
onDestroyListeners = std.algorithm.remove(onDestroyListeners, index);
break;
}
}
}
}
OnDestroyDelegateWrapper[] onDestroyListeners;
/**
* The signal #AtkWindow::destroy is emitted when a window is
* destroyed.
*
* Since: 2.2
*/
gulong addOnDestroy(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnDestroyDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"destroy",
cast(GCallback)&callBackDestroy,
cast(void*)wrapper,
cast(GClosureNotify)&callBackDestroyDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackDestroy(AtkWindow* windowStruct, OnDestroyDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackDestroyDestroy(OnDestroyDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnMaximizeDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onMaximizeListeners ~= this;
}
void remove(OnMaximizeDelegateWrapper source)
{
foreach(index, wrapper; onMaximizeListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onMaximizeListeners[index] = null;
onMaximizeListeners = std.algorithm.remove(onMaximizeListeners, index);
break;
}
}
}
}
OnMaximizeDelegateWrapper[] onMaximizeListeners;
/**
* The signal #AtkWindow::maximize is emitted when a window
* is maximized.
*
* Since: 2.2
*/
gulong addOnMaximize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnMaximizeDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"maximize",
cast(GCallback)&callBackMaximize,
cast(void*)wrapper,
cast(GClosureNotify)&callBackMaximizeDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackMaximize(AtkWindow* windowStruct, OnMaximizeDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackMaximizeDestroy(OnMaximizeDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnMinimizeDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onMinimizeListeners ~= this;
}
void remove(OnMinimizeDelegateWrapper source)
{
foreach(index, wrapper; onMinimizeListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onMinimizeListeners[index] = null;
onMinimizeListeners = std.algorithm.remove(onMinimizeListeners, index);
break;
}
}
}
}
OnMinimizeDelegateWrapper[] onMinimizeListeners;
/**
* The signal #AtkWindow::minimize is emitted when a window
* is minimized.
*
* Since: 2.2
*/
gulong addOnMinimize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnMinimizeDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"minimize",
cast(GCallback)&callBackMinimize,
cast(void*)wrapper,
cast(GClosureNotify)&callBackMinimizeDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackMinimize(AtkWindow* windowStruct, OnMinimizeDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackMinimizeDestroy(OnMinimizeDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnMoveDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onMoveListeners ~= this;
}
void remove(OnMoveDelegateWrapper source)
{
foreach(index, wrapper; onMoveListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onMoveListeners[index] = null;
onMoveListeners = std.algorithm.remove(onMoveListeners, index);
break;
}
}
}
}
OnMoveDelegateWrapper[] onMoveListeners;
/**
* The signal #AtkWindow::move is emitted when a window
* is moved.
*
* Since: 2.2
*/
gulong addOnMove(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnMoveDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"move",
cast(GCallback)&callBackMove,
cast(void*)wrapper,
cast(GClosureNotify)&callBackMoveDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackMove(AtkWindow* windowStruct, OnMoveDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackMoveDestroy(OnMoveDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnResizeDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onResizeListeners ~= this;
}
void remove(OnResizeDelegateWrapper source)
{
foreach(index, wrapper; onResizeListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onResizeListeners[index] = null;
onResizeListeners = std.algorithm.remove(onResizeListeners, index);
break;
}
}
}
}
OnResizeDelegateWrapper[] onResizeListeners;
/**
* The signal #AtkWindow::resize is emitted when a window
* is resized.
*
* Since: 2.2
*/
gulong addOnResize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnResizeDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"resize",
cast(GCallback)&callBackResize,
cast(void*)wrapper,
cast(GClosureNotify)&callBackResizeDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackResize(AtkWindow* windowStruct, OnResizeDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackResizeDestroy(OnResizeDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnRestoreDelegateWrapper
{
void delegate(WindowIF) dlg;
gulong handlerId;
this(void delegate(WindowIF) dlg)
{
this.dlg = dlg;
onRestoreListeners ~= this;
}
void remove(OnRestoreDelegateWrapper source)
{
foreach(index, wrapper; onRestoreListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onRestoreListeners[index] = null;
onRestoreListeners = std.algorithm.remove(onRestoreListeners, index);
break;
}
}
}
}
OnRestoreDelegateWrapper[] onRestoreListeners;
/**
* The signal #AtkWindow::restore is emitted when a window
* is restored.
*
* Since: 2.2
*/
gulong addOnRestore(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnRestoreDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"restore",
cast(GCallback)&callBackRestore,
cast(void*)wrapper,
cast(GClosureNotify)&callBackRestoreDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackRestore(AtkWindow* windowStruct, OnRestoreDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackRestoreDestroy(OnRestoreDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
}
|