/usr/share/ada/adainclude/gtkada/gtk-window.ads is in libgtkada16.1.0-dev 17.0.2017-2.
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 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet --
-- Copyright (C) 2000-2017, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 3, or (at your option) any later --
-- version. This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
------------------------------------------------------------------------------
-- <description>
-- A GtkWindow is a toplevel window which can contain other widgets. Windows
-- normally have decorations that are under the control of the windowing
-- system and allow the user to manipulate the window (resize it, move it,
-- close it,...).
--
-- # GtkWindow as GtkBuildable
--
-- The GtkWindow implementation of the GtkBuildable interface supports a
-- custom <accel-groups> element, which supports any number of <group>
-- elements representing the Gtk.Accel_Group.Gtk_Accel_Group objects you want
-- to add to your window (synonymous with Gtk.Window.Add_Accel_Group.
--
-- It also supports the <initial-focus> element, whose name property names
-- the widget to receive the focus when the window is mapped.
--
-- An example of a UI definition fragment with accel groups: |[ <object
-- class="GtkWindow"> <accel-groups> <group name="accelgroup1"/>
-- </accel-groups> <initial-focus name="thunderclap"/> </object>
--
-- ...
--
-- <object class="GtkAccelGroup" id="accelgroup1"/> ]|
-- The GtkWindow implementation of the GtkBuildable interface supports
-- setting a child as the titlebar by specifying "titlebar" as the "type"
-- attribute of a <child> element.
--
-- </description>
pragma Ada_2005;
pragma Warnings (Off, "*is already use-visible*");
with Gdk.Device; use Gdk.Device;
with Gdk.Event; use Gdk.Event;
with Gdk.Pixbuf; use Gdk.Pixbuf;
with Gdk.Rectangle; use Gdk.Rectangle;
with Gdk.Screen; use Gdk.Screen;
with Gdk.Types; use Gdk.Types;
with Gdk.Window; use Gdk.Window;
with Glib; use Glib;
with Glib.Object; use Glib.Object;
with Glib.Properties; use Glib.Properties;
with Glib.Types; use Glib.Types;
with Gtk.Accel_Group; use Gtk.Accel_Group;
with Gtk.Bin; use Gtk.Bin;
with Gtk.Buildable; use Gtk.Buildable;
with Gtk.Enums; use Gtk.Enums;
with Gtk.Widget; use Gtk.Widget;
package Gtk.Window is
type Gtk_Window_Record is new Gtk_Bin_Record with null record;
type Gtk_Window is access all Gtk_Window_Record'Class;
type Gtk_Window_Group_Record is new GObject_Record with null record;
type Gtk_Window_Group is access all Gtk_Window_Group_Record'Class;
------------------
-- Constructors --
------------------
procedure Gtk_New
(Window : out Gtk_Window;
The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel);
procedure Initialize
(Window : not null access Gtk_Window_Record'Class;
The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel);
-- Creates a new Gtk.Window.Gtk_Window, which is a toplevel window that
-- can contain other widgets. Nearly always, the type of the window should
-- be GTK_WINDOW_TOPLEVEL. If you're implementing something like a popup
-- menu from scratch (which is a bad idea, just use Gtk.Menu.Gtk_Menu), you
-- might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for dialogs, though
-- in some other toolkits dialogs are called "popups". In GTK+,
-- GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. On X11, popup
-- windows are not controlled by the [window manager][gtk-X11-arch].
-- If you simply want an undecorated window (no window borders), use
-- Gtk.Window.Set_Decorated, don't use GTK_WINDOW_POPUP.
-- All top-level windows created by Gtk.Window.Gtk_New are stored in an
-- internal top-level window list. This list can be obtained from
-- Gtk.Window.List_Toplevels. Due to Gtk+ keeping a reference to the window
-- internally, Gtk.Window.Gtk_New does not return a reference to the
-- caller.
-- To delete a Gtk.Window.Gtk_Window, call Gtk.Widget.Destroy.
-- Initialize does nothing if the object was already created with another
-- call to Initialize* or G_New.
-- "type": type of window
function Gtk_Window_New
(The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel)
return Gtk_Window;
-- Creates a new Gtk.Window.Gtk_Window, which is a toplevel window that
-- can contain other widgets. Nearly always, the type of the window should
-- be GTK_WINDOW_TOPLEVEL. If you're implementing something like a popup
-- menu from scratch (which is a bad idea, just use Gtk.Menu.Gtk_Menu), you
-- might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for dialogs, though
-- in some other toolkits dialogs are called "popups". In GTK+,
-- GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. On X11, popup
-- windows are not controlled by the [window manager][gtk-X11-arch].
-- If you simply want an undecorated window (no window borders), use
-- Gtk.Window.Set_Decorated, don't use GTK_WINDOW_POPUP.
-- All top-level windows created by Gtk.Window.Gtk_New are stored in an
-- internal top-level window list. This list can be obtained from
-- Gtk.Window.List_Toplevels. Due to Gtk+ keeping a reference to the window
-- internally, Gtk.Window.Gtk_New does not return a reference to the
-- caller.
-- To delete a Gtk.Window.Gtk_Window, call Gtk.Widget.Destroy.
-- "type": type of window
function Get_Type return Glib.GType;
pragma Import (C, Get_Type, "gtk_window_get_type");
procedure Gtk_New (Window_Group : out Gtk_Window_Group);
procedure Initialize
(Window_Group : not null access Gtk_Window_Group_Record'Class);
-- Creates a new Gtk.Window.Gtk_Window_Group object. Grabs added with
-- Gtk.Widget.Grab_Add only affect windows within the same
-- Gtk.Window.Gtk_Window_Group.
-- Initialize does nothing if the object was already created with another
-- call to Initialize* or G_New.
function Gtk_Window_Group_New return Gtk_Window_Group;
-- Creates a new Gtk.Window.Gtk_Window_Group object. Grabs added with
-- Gtk.Widget.Grab_Add only affect windows within the same
-- Gtk.Window.Gtk_Window_Group.
function Group_Get_Type return Glib.GType;
pragma Import (C, Group_Get_Type, "gtk_window_group_get_type");
-------------
-- Methods --
-------------
function Activate_Default
(Window : not null access Gtk_Window_Record) return Boolean;
-- Activates the default widget for the window, unless the current focused
-- widget has been configured to receive the default action (see
-- Gtk.Widget.Set_Receives_Default), in which case the focused widget is
-- activated.
function Activate_Focus
(Window : not null access Gtk_Window_Record) return Boolean;
-- Activates the current focused widget within the window.
function Activate_Key
(Window : not null access Gtk_Window_Record;
Event : Gdk.Event.Gdk_Event_Key) return Boolean;
-- Activates mnemonics and accelerators for this Gtk.Window.Gtk_Window.
-- This is normally called by the default ::key_press_event handler for
-- toplevel windows, however in some cases it may be useful to call this
-- directly when overriding the standard key handling for a toplevel
-- window.
-- Since: gtk+ 2.4
-- "event": a Gdk.Event.Gdk_Event_Key
procedure Add_Accel_Group
(Window : not null access Gtk_Window_Record;
Accel_Group : not null access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class);
-- Associate Accel_Group with Window, such that calling
-- Gtk.Accel_Group.Accel_Groups_Activate on Window will activate
-- accelerators in Accel_Group.
-- "accel_group": a Gtk.Accel_Group.Gtk_Accel_Group
procedure Add_Mnemonic
(Window : not null access Gtk_Window_Record;
Keyval : Gdk.Types.Gdk_Key_Type;
Target : not null access Gtk.Widget.Gtk_Widget_Record'Class);
-- Adds a mnemonic to this window.
-- "keyval": the mnemonic
-- "target": the widget that gets activated by the mnemonic
procedure Begin_Move_Drag
(Window : not null access Gtk_Window_Record;
Button : Gint;
Root_X : Gint;
Root_Y : Gint;
Timestamp : Guint32);
-- Starts moving a window. This function is used if an application has
-- window movement grips. When GDK can support it, the window movement will
-- be done using the standard mechanism for the [window
-- manager][gtk-X11-arch] or windowing system. Otherwise, GDK will try to
-- emulate window movement, potentially not all that well, depending on the
-- windowing system.
-- "button": mouse button that initiated the drag
-- "root_x": X position where the user clicked to initiate the drag, in
-- root window coordinates
-- "root_y": Y position where the user clicked to initiate the drag
-- "timestamp": timestamp from the click event that initiated the drag
procedure Begin_Resize_Drag
(Window : not null access Gtk_Window_Record;
Edge : Gdk.Window.Gdk_Window_Edge;
Button : Gint;
Root_X : Gint;
Root_Y : Gint;
Timestamp : Guint32);
-- Starts resizing a window. This function is used if an application has
-- window resizing controls. When GDK can support it, the resize will be
-- done using the standard mechanism for the [window manager][gtk-X11-arch]
-- or windowing system. Otherwise, GDK will try to emulate window resizing,
-- potentially not all that well, depending on the windowing system.
-- "edge": position of the resize control
-- "button": mouse button that initiated the drag
-- "root_x": X position where the user clicked to initiate the drag, in
-- root window coordinates
-- "root_y": Y position where the user clicked to initiate the drag
-- "timestamp": timestamp from the click event that initiated the drag
procedure Close (Window : not null access Gtk_Window_Record);
-- Requests that the window is closed, similar to what happens when a
-- window manager close button is clicked.
-- This function can be used with close buttons in custom titlebars.
-- Since: gtk+ 3.10
procedure Deiconify (Window : not null access Gtk_Window_Record);
-- Asks to deiconify (i.e. unminimize) the specified Window. Note that you
-- shouldn't assume the window is definitely deiconified afterward, because
-- other entities (e.g. the user or [window manager][gtk-X11-arch])) could
-- iconify it again before your code which assumes deiconification gets to
-- run.
-- You can track iconification via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
procedure Fullscreen (Window : not null access Gtk_Window_Record);
-- Asks to place Window in the fullscreen state. Note that you shouldn't
-- assume the window is definitely full screen afterward, because other
-- entities (e.g. the user or [window manager][gtk-X11-arch]) could
-- unfullscreen it again, and not all window managers honor requests to
-- fullscreen windows. But normally the window will end up fullscreen. Just
-- don't write code that crashes if not.
-- You can track the fullscreen state via the "window-state-event" signal
-- on Gtk.Widget.Gtk_Widget.
-- Since: gtk+ 2.2
function Get_Accept_Focus
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value set by Gtk.Window.Set_Accept_Focus.
-- Since: gtk+ 2.4
procedure Set_Accept_Focus
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Windows may set a hint asking the desktop environment not to receive
-- the input focus. This function sets this hint.
-- Since: gtk+ 2.4
-- "setting": True to let this window receive input focus
function Get_Attached_To
(Window : not null access Gtk_Window_Record)
return Gtk.Widget.Gtk_Widget;
-- Fetches the attach widget for this window. See
-- Gtk.Window.Set_Attached_To.
-- Since: gtk+ 3.4
procedure Set_Attached_To
(Window : not null access Gtk_Window_Record;
Attach_Widget : access Gtk.Widget.Gtk_Widget_Record'Class);
-- Marks Window as attached to Attach_Widget. This creates a logical
-- binding between the window and the widget it belongs to, which is used
-- by GTK+ to propagate information such as styling or accessibility to
-- Window as if it was a children of Attach_Widget.
-- Examples of places where specifying this relation is useful are for
-- instance a Gtk.Menu.Gtk_Menu created by a Gtk.Combo_Box.Gtk_Combo_Box, a
-- completion popup window created by Gtk.GEntry.Gtk_Entry or a typeahead
-- search entry created by Gtk.Tree_View.Gtk_Tree_View.
-- Note that this function should not be confused with
-- Gtk.Window.Set_Transient_For, which specifies a window manager relation
-- between two toplevels instead.
-- Passing null for Attach_Widget detaches the window.
-- Since: gtk+ 3.4
-- "attach_widget": a Gtk.Widget.Gtk_Widget, or null
function Get_Decorated
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the window has been set to have decorations such as a
-- title bar via Gtk.Window.Set_Decorated.
procedure Set_Decorated
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- By default, windows are decorated with a title bar, resize controls,
-- etc. Some [window managers][gtk-X11-arch] allow GTK+ to disable these
-- decorations, creating a borderless window. If you set the decorated
-- property to False using this function, GTK+ will do its best to convince
-- the window manager not to decorate the window. Depending on the system,
-- this function may not have any effect when called on a window that is
-- already visible, so you should call it before calling Gtk.Widget.Show.
-- On Windows, this function always works, since there's no window manager
-- policy involved.
-- "setting": True to decorate the window
procedure Get_Default_Size
(Window : not null access Gtk_Window_Record;
Width : out Gint;
Height : out Gint);
-- Gets the default size of the window. A value of -1 for the width or
-- height indicates that a default size has not been explicitly set for
-- that dimension, so the "natural" size of the window will be used.
-- "width": location to store the default width, or null
-- "height": location to store the default height, or null
procedure Set_Default_Size
(Window : not null access Gtk_Window_Record;
Width : Gint;
Height : Gint);
-- Sets the default size of a window. If the window's "natural" size (its
-- size request) is larger than the default, the default will be ignored.
-- More generally, if the default size does not obey the geometry hints for
-- the window (gtk_window_set_geometry_hints can be used to set these
-- explicitly), the default size will be clamped to the nearest permitted
-- size.
-- Unlike Gtk.Widget.Set_Size_Request, which sets a size request for a
-- widget and thus would keep users from shrinking the window, this
-- function only sets the initial size, just as if the user had resized the
-- window themselves. Users can still shrink the window again as they
-- normally would. Setting a default size of -1 means to use the "natural"
-- default size (the size request of the window).
-- For more control over a window's initial size and how resizing works,
-- investigate Gtk.Window.Set_Geometry_Hints.
-- For some uses, Gtk.Window.Resize is a more appropriate function.
-- Gtk.Window.Resize changes the current size of the window, rather than
-- the size to be used on initial display. Gtk.Window.Resize always affects
-- the window itself, not the geometry widget.
-- The default size of a window only affects the first time a window is
-- shown; if a window is hidden and re-shown, it will remember the size it
-- had prior to hiding, rather than using the default size.
-- Windows can't actually be 0x0 in size, they must be at least 1x1, but
-- passing 0 for Width and Height is OK, resulting in a 1x1 default size.
-- "width": width in pixels, or -1 to unset the default width
-- "height": height in pixels, or -1 to unset the default height
function Get_Default_Widget
(Window : not null access Gtk_Window_Record)
return Gtk.Widget.Gtk_Widget;
-- Returns the default widget for Window. See Gtk.Window.Set_Default for
-- more details.
-- Since: gtk+ 2.14
function Get_Deletable
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the window has been set to have a close button via
-- Gtk.Window.Set_Deletable.
-- Since: gtk+ 2.10
procedure Set_Deletable
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- By default, windows have a close button in the window frame. Some
-- [window managers][gtk-X11-arch] allow GTK+ to disable this button. If
-- you set the deletable property to False using this function, GTK+ will
-- do its best to convince the window manager not to show a close button.
-- Depending on the system, this function may not have any effect when
-- called on a window that is already visible, so you should call it before
-- calling Gtk.Widget.Show.
-- On Windows, this function always works, since there's no window manager
-- policy involved.
-- Since: gtk+ 2.10
-- "setting": True to decorate the window as deletable
function Get_Destroy_With_Parent
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the window will be destroyed with its transient parent.
-- See gtk_window_set_destroy_with_parent ().
procedure Set_Destroy_With_Parent
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- If Setting is True, then destroying the transient parent of Window will
-- also destroy Window itself. This is useful for dialogs that shouldn't
-- persist beyond the lifetime of the main window they're associated with,
-- for example.
-- "setting": whether to destroy Window with its transient parent
function Get_Focus
(Window : not null access Gtk_Window_Record)
return Gtk.Widget.Gtk_Widget;
-- Retrieves the current focused widget within the window. Note that this
-- is the widget that would have the focus if the toplevel window focused;
-- if the toplevel window is not focused then `gtk_widget_has_focus
-- (widget)` will not be True for the widget.
procedure Set_Focus
(Window : not null access Gtk_Window_Record;
Focus : access Gtk.Widget.Gtk_Widget_Record'Class);
-- If Focus is not the current focus widget, and is focusable, sets it as
-- the focus widget for the window. If Focus is null, unsets the focus
-- widget for this window. To set the focus to a particular widget in the
-- toplevel, it is usually more convenient to use Gtk.Widget.Grab_Focus
-- instead of this function.
-- "focus": widget to be the new focus widget, or null to unset any focus
-- widget for the toplevel window.
function Get_Focus_On_Map
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value set by Gtk.Window.Set_Focus_On_Map.
-- Since: gtk+ 2.6
procedure Set_Focus_On_Map
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Windows may set a hint asking the desktop environment not to receive
-- the input focus when the window is mapped. This function sets this hint.
-- Since: gtk+ 2.6
-- "setting": True to let this window receive input focus on map
function Get_Focus_Visible
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value of the Gtk.Window.Gtk_Window:focus-visible property.
-- Since: gtk+ 3.2
procedure Set_Focus_Visible
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Sets the Gtk.Window.Gtk_Window:focus-visible property.
-- Since: gtk+ 3.2
-- "setting": the new value
function Get_Gravity
(Window : not null access Gtk_Window_Record)
return Gdk.Window.Gdk_Gravity;
-- Gets the value set by Gtk.Window.Set_Gravity.
procedure Set_Gravity
(Window : not null access Gtk_Window_Record;
Gravity : Gdk.Window.Gdk_Gravity);
-- Window gravity defines the meaning of coordinates passed to
-- Gtk.Window.Move. See Gtk.Window.Move and Gdk.Window.Gdk_Gravity for more
-- details.
-- The default window gravity is GDK_GRAVITY_NORTH_WEST which will
-- typically "do what you mean."
-- "gravity": window gravity
function Get_Group
(Window : not null access Gtk_Window_Record) return Gtk_Window_Group;
-- Returns the group for Window or the default group, if Window is null or
-- if Window does not have an explicit window group.
-- Since: gtk+ 2.10
function Get_Has_Resize_Grip
(Window : not null access Gtk_Window_Record) return Boolean;
pragma Obsolescent (Get_Has_Resize_Grip);
-- Determines whether the window may have a resize grip.
-- Since: gtk+ 3.0
-- Deprecated since 3.14, 1
procedure Set_Has_Resize_Grip
(Window : not null access Gtk_Window_Record;
Value : Boolean);
pragma Obsolescent (Set_Has_Resize_Grip);
-- Sets whether Window has a corner resize grip.
-- Note that the resize grip is only shown if the window is actually
-- resizable and not maximized. Use Gtk.Window.Resize_Grip_Is_Visible to
-- find out if the resize grip is currently shown.
-- Since: gtk+ 3.0
-- Deprecated since 3.14, 1
-- "value": True to allow a resize grip
function Get_Hide_Titlebar_When_Maximized
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the window has requested to have its titlebar hidden
-- when maximized. See gtk_window_set_hide_titlebar_when_maximized ().
-- Since: gtk+ 3.4
procedure Set_Hide_Titlebar_When_Maximized
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- If Setting is True, then Window will request that it's titlebar should
-- be hidden when maximized. This is useful for windows that don't convey
-- any information other than the application name in the titlebar, to put
-- the available screen space to better use. If the underlying window
-- system does not support the request, the setting will not have any
-- effect.
-- Note that custom titlebars set with Gtk.Window.Set_Titlebar are not
-- affected by this. The application is in full control of their content
-- and visibility anyway.
-- Since: gtk+ 3.4
-- "setting": whether to hide the titlebar when Window is maximized
function Get_Icon
(Window : not null access Gtk_Window_Record)
return Gdk.Pixbuf.Gdk_Pixbuf;
-- Gets the value set by Gtk.Window.Set_Icon (or if you've called
-- Gtk.Window.Set_Icon_List, gets the first icon in the icon list).
procedure Set_Icon
(Window : not null access Gtk_Window_Record;
Icon : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class);
-- Sets up the icon representing a Gtk.Window.Gtk_Window. This icon is
-- used when the window is minimized (also known as iconified). Some window
-- managers or desktop environments may also place it in the window frame,
-- or display it in other contexts.
-- The icon should be provided in whatever size it was naturally drawn;
-- that is, don't scale the image before passing it to GTK+. Scaling is
-- postponed until the last minute, when the desired final size is known,
-- to allow best quality.
-- If you have your icon hand-drawn in multiple sizes, use
-- Gtk.Window.Set_Icon_List. Then the best size will be used.
-- This function is equivalent to calling Gtk.Window.Set_Icon_List with a
-- 1-element list.
-- See also Gtk.Window.Set_Default_Icon_List to set the icon for all
-- windows in your application in one go.
-- "icon": icon image, or null
function Get_Icon_List
(Window : not null access Gtk_Window_Record)
return Glib.Object.Object_Simple_List.Glist;
-- Retrieves the list of icons set by Gtk.Window.Set_Icon_List. The list
-- is copied, but the reference count on each member won't be incremented.
procedure Set_Icon_List
(Window : not null access Gtk_Window_Record;
List : Glib.Object.Object_Simple_List.Glist);
-- Sets up the icon representing a Gtk.Window.Gtk_Window. The icon is used
-- when the window is minimized (also known as iconified). Some window
-- managers or desktop environments may also place it in the window frame,
-- or display it in other contexts.
-- Gtk.Window.Set_Icon_List allows you to pass in the same icon in several
-- hand-drawn sizes. The list should contain the natural sizes your icon is
-- available in; that is, don't scale the image before passing it to GTK+.
-- Scaling is postponed until the last minute, when the desired final size
-- is known, to allow best quality.
-- By passing several sizes, you may improve the final image quality of
-- the icon, by reducing or eliminating automatic image scaling.
-- Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
-- larger images (64x64, 128x128) if you have them.
-- See also Gtk.Window.Set_Default_Icon_List to set the icon for all
-- windows in your application in one go.
-- Note that transient windows (those who have been set transient for
-- another window using Gtk.Window.Set_Transient_For) will inherit their
-- icon from their transient parent. So there's no need to explicitly set
-- the icon on transient windows.
-- "list": list of Gdk.Pixbuf.Gdk_Pixbuf
function Get_Icon_Name
(Window : not null access Gtk_Window_Record) return UTF8_String;
-- Returns the name of the themed icon for the window, see
-- Gtk.Window.Set_Icon_Name.
-- Since: gtk+ 2.6
procedure Set_Icon_Name
(Window : not null access Gtk_Window_Record;
Name : UTF8_String := "");
-- Sets the icon for the window from a named themed icon. See the docs for
-- Gtk.Icon_Theme.Gtk_Icon_Theme for more details.
-- Note that this has nothing to do with the WM_ICON_NAME property which
-- is mentioned in the ICCCM.
-- Since: gtk+ 2.6
-- "name": the name of the themed icon
function Get_Mnemonic_Modifier
(Window : not null access Gtk_Window_Record)
return Gdk.Types.Gdk_Modifier_Type;
-- Returns the mnemonic modifier for this window. See
-- Gtk.Window.Set_Mnemonic_Modifier.
procedure Set_Mnemonic_Modifier
(Window : not null access Gtk_Window_Record;
Modifier : Gdk.Types.Gdk_Modifier_Type);
-- Sets the mnemonic modifier for this window.
-- "modifier": the modifier mask used to activate mnemonics on this
-- window.
function Get_Mnemonics_Visible
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value of the Gtk.Window.Gtk_Window:mnemonics-visible property.
-- Since: gtk+ 2.20
procedure Set_Mnemonics_Visible
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Sets the Gtk.Window.Gtk_Window:mnemonics-visible property.
-- Since: gtk+ 2.20
-- "setting": the new value
function Get_Modal
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the window is modal. See Gtk.Window.Set_Modal.
procedure Set_Modal
(Window : not null access Gtk_Window_Record;
Modal : Boolean := True);
-- Sets a window modal or non-modal. Modal windows prevent interaction
-- with other windows in the same application. To keep modal dialogs on top
-- of main application windows, use Gtk.Window.Set_Transient_For to make
-- the dialog transient for the parent; most [window
-- managers][gtk-X11-arch] will then disallow lowering the dialog below the
-- parent.
-- "modal": whether the window is modal
procedure Get_Position
(Window : not null access Gtk_Window_Record;
Root_X : out Gint;
Root_Y : out Gint);
-- This function returns the position you need to pass to Gtk.Window.Move
-- to keep Window in its current position. This means that the meaning of
-- the returned value varies with window gravity. See Gtk.Window.Move for
-- more details.
-- If you haven't changed the window gravity, its gravity will be
-- GDK_GRAVITY_NORTH_WEST. This means that Gtk.Window.Get_Position gets the
-- position of the top-left corner of the window manager frame for the
-- window. Gtk.Window.Move sets the position of this same top-left corner.
-- Gtk.Window.Get_Position is not 100% reliable because the X Window
-- System does not specify a way to obtain the geometry of the decorations
-- placed on a window by the window manager. Thus GTK+ is using a "best
-- guess" that works with most window managers.
-- Moreover, nearly all window managers are historically broken with
-- respect to their handling of window gravity. So moving a window to its
-- current position as returned by Gtk.Window.Get_Position tends to result
-- in moving the window slightly. Window managers are slowly getting better
-- over time.
-- If a window has gravity GDK_GRAVITY_STATIC the window manager frame is
-- not relevant, and thus Gtk.Window.Get_Position will always produce
-- accurate results. However you can't use static gravity to do things like
-- place a window in a corner of the screen, because static gravity ignores
-- the window manager decorations.
-- If you are saving and restoring your application's window positions,
-- you should know that it's impossible for applications to do this without
-- getting it somewhat wrong because applications do not have sufficient
-- knowledge of window manager state. The Correct Mechanism is to support
-- the session management protocol (see the "GnomeClient" object in the
-- GNOME libraries for example) and allow the window manager to save your
-- window sizes and positions.
-- "root_x": return location for X coordinate of gravity-determined
-- reference point, or null
-- "root_y": return location for Y coordinate of gravity-determined
-- reference point, or null
procedure Set_Position
(Window : not null access Gtk_Window_Record;
Position : Gtk.Enums.Gtk_Window_Position);
-- Sets a position constraint for this window. If the old or new
-- constraint is Gtk.Enums.Win_Pos_Center_Always, this will also cause the
-- window to be repositioned to satisfy the new constraint.
-- "position": a position constraint.
function Get_Resizable
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value set by Gtk.Window.Set_Resizable.
procedure Set_Resizable
(Window : not null access Gtk_Window_Record;
Resizable : Boolean);
-- Sets whether the user can resize a window. Windows are user resizable
-- by default.
-- "resizable": True if the user can resize this window
procedure Get_Resize_Grip_Area
(Window : not null access Gtk_Window_Record;
Rect : out Gdk.Rectangle.Gdk_Rectangle;
retrieved : out Boolean);
pragma Obsolescent (Get_Resize_Grip_Area);
-- If a window has a resize grip, this will retrieve the grip position,
-- width and height into the specified Gdk.Rectangle.Gdk_Rectangle.
-- Since: gtk+ 3.0
-- Deprecated since 3.14, 1
-- "rect": a pointer to a Gdk.Rectangle.Gdk_Rectangle which we should
-- store the resize grip area
function Get_Role
(Window : not null access Gtk_Window_Record) return UTF8_String;
-- Returns the role of the window. See Gtk.Window.Set_Role for further
-- explanation.
procedure Set_Role
(Window : not null access Gtk_Window_Record;
Role : UTF8_String);
-- This function is only useful on X11, not with other GTK+ targets.
-- In combination with the window title, the window role allows a [window
-- manager][gtk-X11-arch] to identify "the same" window when an application
-- is restarted. So for example you might set the "toolbox" role on your
-- app's toolbox window, so that when the user restarts their session, the
-- window manager can put the toolbox back in the same place.
-- If a window already has a unique title, you don't need to set the role,
-- since the WM can use the title to identify the window when restoring the
-- session.
-- "role": unique identifier for the window to be used when restoring a
-- session
function Get_Screen
(Window : not null access Gtk_Window_Record)
return Gdk.Screen.Gdk_Screen;
-- Returns the Gdk.Screen.Gdk_Screen associated with Window.
-- Since: gtk+ 2.2
procedure Set_Screen
(Window : not null access Gtk_Window_Record;
Screen : not null access Gdk.Screen.Gdk_Screen_Record'Class);
-- Sets the Gdk.Screen.Gdk_Screen where the Window is displayed; if the
-- window is already mapped, it will be unmapped, and then remapped on the
-- new screen.
-- Since: gtk+ 2.2
-- "screen": a Gdk.Screen.Gdk_Screen.
procedure Get_Size
(Window : not null access Gtk_Window_Record;
Width : out Gint;
Height : out Gint);
-- Obtains the current size of Window. If Window is not onscreen, it
-- returns the size GTK+ will suggest to the [window manager][gtk-X11-arch]
-- for the initial window size (but this is not reliably the same as the
-- size the window manager will actually select). The size obtained by
-- Gtk.Window.Get_Size is the last size received in a
-- Gdk.Event.Gdk_Event_Configure, that is, GTK+ uses its locally-stored
-- size, rather than querying the X server for the size. As a result, if
-- you call Gtk.Window.Resize then immediately call Gtk.Window.Get_Size,
-- the size won't have taken effect yet. After the window manager processes
-- the resize request, GTK+ receives notification that the size has changed
-- via a configure event, and the size of the window gets updated.
-- Note 1: Nearly any use of this function creates a race condition,
-- because the size of the window may change between the time that you get
-- the size and the time that you perform some action assuming that size is
-- the current size. To avoid race conditions, connect to "configure-event"
-- on the window and adjust your size-dependent state to match the size
-- delivered in the Gdk.Event.Gdk_Event_Configure.
-- Note 2: The returned size does not include the size of the window
-- manager decorations (aka the window frame or border). Those are not
-- drawn by GTK+ and GTK+ has no reliable method of determining their size.
-- Note 3: If you are getting a window size in order to position the
-- window onscreen, there may be a better way. The preferred way is to
-- simply set the window's semantic type with Gtk.Window.Set_Type_Hint,
-- which allows the window manager to e.g. center dialogs. Also, if you set
-- the transient parent of dialogs with Gtk.Window.Set_Transient_For window
-- managers will often center the dialog over its parent window. It's much
-- preferred to let the window manager handle these things rather than
-- doing it yourself, because all apps will behave consistently and
-- according to user prefs if the window manager handles it. Also, the
-- window manager can take the size of the window decorations/border into
-- account, while your application cannot.
-- In any case, if you insist on application-specified window positioning,
-- there's still a better way than doing it yourself -
-- Gtk.Window.Set_Position will frequently handle the details for you.
-- "width": return location for width, or null
-- "height": return location for height, or null
function Get_Skip_Pager_Hint
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value set by Gtk.Window.Set_Skip_Pager_Hint.
-- Since: gtk+ 2.2
procedure Set_Skip_Pager_Hint
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Windows may set a hint asking the desktop environment not to display
-- the window in the pager. This function sets this hint. (A "pager" is any
-- desktop navigation tool such as a workspace switcher that displays a
-- thumbnail representation of the windows on the screen.)
-- Since: gtk+ 2.2
-- "setting": True to keep this window from appearing in the pager
function Get_Skip_Taskbar_Hint
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value set by Gtk.Window.Set_Skip_Taskbar_Hint
-- Since: gtk+ 2.2
procedure Set_Skip_Taskbar_Hint
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Windows may set a hint asking the desktop environment not to display
-- the window in the task bar. This function sets this hint.
-- Since: gtk+ 2.2
-- "setting": True to keep this window from appearing in the task bar
function Get_Title
(Window : not null access Gtk_Window_Record) return UTF8_String;
-- Retrieves the title of the window. See Gtk.Window.Set_Title.
procedure Set_Title
(Window : not null access Gtk_Window_Record;
Title : UTF8_String);
-- Sets the title of the Gtk.Window.Gtk_Window. The title of a window will
-- be displayed in its title bar; on the X Window System, the title bar is
-- rendered by the [window manager][gtk-X11-arch], so exactly how the title
-- appears to users may vary according to a user's exact configuration. The
-- title should help a user distinguish this window from other windows they
-- may have open. A good title might include the application name and
-- current document filename, for example.
-- "title": title of the window
function Get_Transient_For
(Window : not null access Gtk_Window_Record) return Gtk_Window;
-- Fetches the transient parent for this window. See
-- Gtk.Window.Set_Transient_For.
procedure Set_Transient_For
(Window : not null access Gtk_Window_Record;
Parent : access Gtk_Window_Record'Class);
-- Dialog windows should be set transient for the main application window
-- they were spawned from. This allows [window managers][gtk-X11-arch] to
-- e.g. keep the dialog on top of the main window, or center the dialog
-- over the main window. gtk_dialog_new_with_buttons and other convenience
-- functions in GTK+ will sometimes call Gtk.Window.Set_Transient_For on
-- your behalf.
-- Passing null for Parent unsets the current transient window.
-- On Windows, this function puts the child window on top of the parent,
-- much as the window manager would have done on X.
-- "parent": parent window, or null
function Get_Type_Hint
(Window : not null access Gtk_Window_Record)
return Gdk.Window.Gdk_Window_Type_Hint;
-- Gets the type hint for this window. See Gtk.Window.Set_Type_Hint.
procedure Set_Type_Hint
(Window : not null access Gtk_Window_Record;
Hint : Gdk.Window.Gdk_Window_Type_Hint);
-- By setting the type hint for the window, you allow the window manager
-- to decorate and handle the window in a way which is suitable to the
-- function of the window in your application.
-- This function should be called before the window becomes visible.
-- gtk_dialog_new_with_buttons and other convenience functions in GTK+
-- will sometimes call Gtk.Window.Set_Type_Hint on your behalf.
-- "hint": the window type
function Get_Urgency_Hint
(Window : not null access Gtk_Window_Record) return Boolean;
-- Gets the value set by Gtk.Window.Set_Urgency_Hint
-- Since: gtk+ 2.8
procedure Set_Urgency_Hint
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Windows may set a hint asking the desktop environment to draw the users
-- attention to the window. This function sets this hint.
-- Since: gtk+ 2.8
-- "setting": True to mark this window as urgent
function Get_Window_Type
(Window : not null access Gtk_Window_Record)
return Gtk.Enums.Gtk_Window_Type;
-- Gets the type of the window. See Gtk.Enums.Gtk_Window_Type.
-- Since: gtk+ 2.20
function Has_Group
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether Window has an explicit window group.
function Has_Toplevel_Focus
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the input focus is within this GtkWindow. For real
-- toplevel windows, this is identical to Gtk.Window.Is_Active, but for
-- embedded windows, like Gtk_Plug, the results will differ.
-- Since: gtk+ 2.4
procedure Iconify (Window : not null access Gtk_Window_Record);
-- Asks to iconify (i.e. minimize) the specified Window. Note that you
-- shouldn't assume the window is definitely iconified afterward, because
-- other entities (e.g. the user or [window manager][gtk-X11-arch]) could
-- deiconify it again, or there may not be a window manager in which case
-- iconification isn't possible, etc. But normally the window will end up
-- iconified. Just don't write code that crashes if not.
-- It's permitted to call this function before showing a window, in which
-- case the window will be iconified before it ever appears onscreen.
-- You can track iconification via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
function Is_Active
(Window : not null access Gtk_Window_Record) return Boolean;
-- Returns whether the window is part of the current active toplevel.
-- (That is, the toplevel window receiving keystrokes.) The return value is
-- True if the window is active toplevel itself, but also if it is, say, a
-- Gtk_Plug embedded in the active toplevel. You might use this function if
-- you wanted to draw a widget differently in an active window from a
-- widget in an inactive window. See Gtk.Window.Has_Toplevel_Focus
-- Since: gtk+ 2.4
function Is_Maximized
(Window : not null access Gtk_Window_Record) return Boolean;
-- Retrieves the current maximized state of Window.
-- Note that since maximization is ultimately handled by the window
-- manager and happens asynchronously to an application request, you
-- shouldn't assume the return value of this function changing immediately
-- (or at all), as an effect of calling Gtk.Window.Maximize or
-- Gtk.Window.Unmaximize.
-- Since: gtk+ 3.12
procedure Maximize (Window : not null access Gtk_Window_Record);
-- Asks to maximize Window, so that it becomes full-screen. Note that you
-- shouldn't assume the window is definitely maximized afterward, because
-- other entities (e.g. the user or [window manager][gtk-X11-arch]) could
-- unmaximize it again, and not all window managers support maximization.
-- But normally the window will end up maximized. Just don't write code
-- that crashes if not.
-- It's permitted to call this function before showing a window, in which
-- case the window will be maximized when it appears onscreen initially.
-- You can track maximization via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget, or by listening to notifications on the
-- Gtk.Window.Gtk_Window:is-maximized property.
function Mnemonic_Activate
(Window : not null access Gtk_Window_Record;
Keyval : Gdk.Types.Gdk_Key_Type;
Modifier : Gdk.Types.Gdk_Modifier_Type) return Boolean;
-- Activates the targets associated with the mnemonic.
-- "keyval": the mnemonic
-- "modifier": the modifiers
procedure Move
(Window : not null access Gtk_Window_Record;
X : Gint;
Y : Gint);
-- Asks the [window manager][gtk-X11-arch] to move Window to the given
-- position. Window managers are free to ignore this; most window managers
-- ignore requests for initial window positions (instead using a
-- user-defined placement algorithm) and honor requests after the window
-- has already been shown.
-- Note: the position is the position of the gravity-determined reference
-- point for the window. The gravity determines two things: first, the
-- location of the reference point in root window coordinates; and second,
-- which point on the window is positioned at the reference point.
-- By default the gravity is GDK_GRAVITY_NORTH_WEST, so the reference
-- point is simply the X, Y supplied to Gtk.Window.Move. The top-left
-- corner of the window decorations (aka window frame or border) will be
-- placed at X, Y. Therefore, to position a window at the top left of the
-- screen, you want to use the default gravity (which is
-- GDK_GRAVITY_NORTH_WEST) and move the window to 0,0.
-- To position a window at the bottom right corner of the screen, you
-- would set GDK_GRAVITY_SOUTH_EAST, which means that the reference point
-- is at X + the window width and Y + the window height, and the
-- bottom-right corner of the window border will be placed at that
-- reference point. So, to place a window in the bottom right corner you
-- would first set gravity to south east, then write: `gtk_window_move
-- (window, gdk_screen_width () - window_width, gdk_screen_height () -
-- window_height)` (note that this example does not take multi-head
-- scenarios into account).
-- The [Extended Window Manager Hints
-- Specification](http://www.freedesktop.org/Standards/wm-spec) has a nice
-- table of gravities in the "implementation notes" section.
-- The Gtk.Window.Get_Position documentation may also be relevant.
-- "x": X coordinate to move window to
-- "y": Y coordinate to move window to
function Parse_Geometry
(Window : not null access Gtk_Window_Record;
Geometry : UTF8_String) return Boolean;
-- Parses a standard X Window System geometry string - see the manual page
-- for X (type "man X") for details on this. Gtk.Window.Parse_Geometry does
-- work on all GTK+ ports including Win32 but is primarily intended for an
-- X environment.
-- If either a size or a position can be extracted from the geometry
-- string, Gtk.Window.Parse_Geometry returns True and calls
-- Gtk.Window.Set_Default_Size and/or Gtk.Window.Move to resize/move the
-- window.
-- If Gtk.Window.Parse_Geometry returns True, it will also set the
-- GDK_HINT_USER_POS and/or GDK_HINT_USER_SIZE hints indicating to the
-- window manager that the size/position of the window was user-specified.
-- This causes most window managers to honor the geometry.
-- Note that for Gtk.Window.Parse_Geometry to work as expected, it has to
-- be called when the window has its "final" size, i.e. after calling
-- Gtk.Widget.Show_All on the contents and Gtk.Window.Set_Geometry_Hints on
-- the window. |[<!-- language="C" --> include <gtk/gtk.h>
-- static void fill_with_content (GtkWidget *vbox) { // fill with
-- content... }
-- int main (int argc, char *argv[]) { GtkWidget *window, *vbox;
-- GdkGeometry size_hints = { 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0,
-- GDK_GRAVITY_NORTH_WEST };
-- gtk_init (&argc, &argv);
-- window = gtk_window_new (GTK_WINDOW_TOPLEVEL); vbox = gtk_box_new
-- (GTK_ORIENTATION_VERTICAL, 0);
-- gtk_container_add (GTK_CONTAINER (window), vbox); fill_with_content
-- (vbox); gtk_widget_show_all (vbox);
-- gtk_window_set_geometry_hints (GTK_WINDOW (window), window,
-- &size_hints, GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE |
-- GDK_HINT_RESIZE_INC);
-- if (argc > 1) { gboolean res; res = gtk_window_parse_geometry
-- (GTK_WINDOW (window), argv[1]); if (! res) fprintf (stderr, "Failed to
-- parse "%s"\n", argv[1]); }
-- gtk_widget_show_all (window); gtk_main ();
-- return 0; } ]|
-- "geometry": geometry string
procedure Present (Window : not null access Gtk_Window_Record);
-- Presents a window to the user. This may mean raising the window in the
-- stacking order, deiconifying it, moving it to the current desktop,
-- and/or giving it the keyboard focus, possibly dependent on the user's
-- platform, window manager, and preferences.
-- If Window is hidden, this function calls Gtk.Widget.Show as well.
-- This function should be used when the user tries to open a window
-- that's already open. Say for example the preferences dialog is currently
-- open, and the user chooses Preferences from the menu a second time; use
-- Gtk.Window.Present to move the already-open dialog where the user can
-- see it.
-- If you are calling this function in response to a user interaction, it
-- is preferable to use Gtk.Window.Present_With_Time.
procedure Present_With_Time
(Window : not null access Gtk_Window_Record;
Timestamp : Guint32);
-- Presents a window to the user in response to a user interaction. If you
-- need to present a window without a timestamp, use Gtk.Window.Present.
-- See Gtk.Window.Present for details.
-- Since: gtk+ 2.8
-- "timestamp": the timestamp of the user interaction (typically a button
-- or key press event) which triggered this call
function Propagate_Key_Event
(Window : not null access Gtk_Window_Record;
Event : Gdk.Event.Gdk_Event_Key) return Boolean;
-- Propagate a key press or release event to the focus widget and up the
-- focus container chain until a widget handles Event. This is normally
-- called by the default ::key_press_event and ::key_release_event handlers
-- for toplevel windows, however in some cases it may be useful to call
-- this directly when overriding the standard key handling for a toplevel
-- window.
-- Since: gtk+ 2.4
-- "event": a Gdk.Event.Gdk_Event_Key
procedure Remove_Accel_Group
(Window : not null access Gtk_Window_Record;
Accel_Group : not null access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class);
-- Reverses the effects of Gtk.Window.Add_Accel_Group.
-- "accel_group": a Gtk.Accel_Group.Gtk_Accel_Group
procedure Remove_Mnemonic
(Window : not null access Gtk_Window_Record;
Keyval : Gdk.Types.Gdk_Key_Type;
Target : not null access Gtk.Widget.Gtk_Widget_Record'Class);
-- Removes a mnemonic from this window.
-- "keyval": the mnemonic
-- "target": the widget that gets activated by the mnemonic
procedure Reshow_With_Initial_Size
(Window : not null access Gtk_Window_Record);
pragma Obsolescent (Reshow_With_Initial_Size);
-- Hides Window, then reshows it, resetting the default size and position
-- of the window. Used by GUI builders only.
-- Deprecated since 3.10, 1
procedure Resize
(Window : not null access Gtk_Window_Record;
Width : Gint;
Height : Gint);
-- Resizes the window as if the user had done so, obeying geometry
-- constraints. The default geometry constraint is that windows may not be
-- smaller than their size request; to override this constraint, call
-- Gtk.Widget.Set_Size_Request to set the window's request to a smaller
-- value.
-- If Gtk.Window.Resize is called before showing a window for the first
-- time, it overrides any default size set with
-- Gtk.Window.Set_Default_Size.
-- Windows may not be resized smaller than 1 by 1 pixels.
-- "width": width in pixels to resize the window to
-- "height": height in pixels to resize the window to
function Resize_Grip_Is_Visible
(Window : not null access Gtk_Window_Record) return Boolean;
pragma Obsolescent (Resize_Grip_Is_Visible);
-- Determines whether a resize grip is visible for the specified window.
-- Since: gtk+ 3.0
-- Deprecated since 3.14, 1
procedure Resize_To_Geometry
(Window : not null access Gtk_Window_Record;
Width : Gint;
Height : Gint);
-- Like Gtk.Window.Resize, but Width and Height are interpreted in terms
-- of the base size and increment set with gtk_window_set_geometry_hints.
-- Since: gtk+ 3.0
-- "width": width in resize increments to resize the window to
-- "height": height in resize increments to resize the window to
procedure Set_Default
(Window : not null access Gtk_Window_Record;
Default_Widget : access Gtk.Widget.Gtk_Widget_Record'Class);
-- The default widget is the widget that's activated when the user presses
-- Enter in a dialog (for example). This function sets or unsets the
-- default widget for a Gtk.Window.Gtk_Window. When setting (rather than
-- unsetting) the default widget it's generally easier to call
-- Gtk.Widget.Grab_Default on the widget. Before making a widget the
-- default widget, you must call Gtk.Widget.Set_Can_Default on the widget
-- you'd like to make the default.
-- "default_widget": widget to be the default, or null to unset the
-- default widget for the toplevel
procedure Set_Default_Geometry
(Window : not null access Gtk_Window_Record;
Width : Gint;
Height : Gint);
-- Like Gtk.Window.Set_Default_Size, but Width and Height are interpreted
-- in terms of the base size and increment set with
-- gtk_window_set_geometry_hints.
-- Since: gtk+ 3.0
-- "width": width in resize increments, or -1 to unset the default width
-- "height": height in resize increments, or -1 to unset the default
-- height
procedure Set_Geometry_Hints
(Window : not null access Gtk_Window_Record;
Geometry_Widget : access Gtk.Widget.Gtk_Widget_Record'Class;
Geometry : Gdk.Window.Gdk_Geometry;
Geom_Mask : Gdk.Window.Gdk_Window_Hints);
-- This function sets up hints about how a window can be resized by the
-- user. You can set a minimum and maximum size; allowed resize increments
-- (e.g. for xterm, you can only resize by the size of a character); aspect
-- ratios; and more. See the Gdk.Window.Gdk_Geometry struct.
-- "geometry_widget": widget the geometry hints will be applied to or null
-- "geometry": struct containing geometry information or null
-- "geom_mask": mask indicating which struct fields should be paid
-- attention to
procedure Set_Has_User_Ref_Count
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Tells GTK+ whether to drop its extra reference to the window when
-- Gtk.Widget.Destroy is called.
-- This function is only exported for the benefit of language bindings
-- which may need to keep the window alive until their wrapper object is
-- garbage collected. There is no justification for ever calling this
-- function in an application.
-- Since: gtk+ 3.0
-- "setting": the new value
function Set_Icon_From_File
(Window : not null access Gtk_Window_Record;
Filename : UTF8_String) return Boolean;
-- Sets the icon for Window. Warns on failure if Err is null.
-- This function is equivalent to calling Gtk.Window.Set_Icon with a
-- pixbuf created by loading the image from Filename.
-- Since: gtk+ 2.2
-- "filename": location of icon file
procedure Set_Keep_Above
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Asks to keep Window above, so that it stays on top. Note that you
-- shouldn't assume the window is definitely above afterward, because other
-- entities (e.g. the user or [window manager][gtk-X11-arch]) could not
-- keep it above, and not all window managers support keeping windows
-- above. But normally the window will end kept above. Just don't write
-- code that crashes if not.
-- It's permitted to call this function before showing a window, in which
-- case the window will be kept above when it appears onscreen initially.
-- You can track the above state via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
-- Note that, according to the [Extended Window Manager Hints
-- Specification](http://www.freedesktop.org/Standards/wm-spec), the above
-- state is mainly meant for user preferences and should not be used by
-- applications e.g. for drawing attention to their dialogs.
-- Since: gtk+ 2.4
-- "setting": whether to keep Window above other windows
procedure Set_Keep_Below
(Window : not null access Gtk_Window_Record;
Setting : Boolean);
-- Asks to keep Window below, so that it stays in bottom. Note that you
-- shouldn't assume the window is definitely below afterward, because other
-- entities (e.g. the user or [window manager][gtk-X11-arch]) could not
-- keep it below, and not all window managers support putting windows
-- below. But normally the window will be kept below. Just don't write code
-- that crashes if not.
-- It's permitted to call this function before showing a window, in which
-- case the window will be kept below when it appears onscreen initially.
-- You can track the below state via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
-- Note that, according to the [Extended Window Manager Hints
-- Specification](http://www.freedesktop.org/Standards/wm-spec), the above
-- state is mainly meant for user preferences and should not be used by
-- applications e.g. for drawing attention to their dialogs.
-- Since: gtk+ 2.4
-- "setting": whether to keep Window below other windows
procedure Set_Startup_Id
(Window : not null access Gtk_Window_Record;
Startup_Id : UTF8_String);
-- Startup notification identifiers are used by desktop environment to
-- track application startup, to provide user feedback and other features.
-- This function changes the corresponding property on the underlying
-- GdkWindow. Normally, startup identifier is managed automatically and you
-- should only use this function in special cases like transferring focus
-- from other processes. You should use this function before calling
-- Gtk.Window.Present or any equivalent function generating a window map
-- event.
-- This function is only useful on X11, not with other GTK+ targets.
-- Since: gtk+ 2.12
-- "startup_id": a string with startup-notification identifier
procedure Set_Titlebar
(Window : not null access Gtk_Window_Record;
Titlebar : access Gtk.Widget.Gtk_Widget_Record'Class);
-- Sets a custom titlebar for Window.
-- If you set a custom titlebar, GTK+ will do its best to convince the
-- window manager not to put its own titlebar on the window. Depending on
-- the system, this function may not work for a window that is already
-- visible, so you set the titlebar before calling Gtk.Widget.Show.
-- Since: gtk+ 3.10
-- "titlebar": the widget to use as titlebar
procedure Set_Wmclass
(Window : not null access Gtk_Window_Record;
Wmclass_Name : UTF8_String;
Wmclass_Class : UTF8_String);
-- Don't use this function. It sets the X Window System "class" and "name"
-- hints for a window. According to the ICCCM, you should always set these
-- to the same value for all windows in an application, and GTK+ sets them
-- to that value by default, so calling this function is sort of pointless.
-- However, you may want to call Gtk.Window.Set_Role on each window in your
-- application, for the benefit of the session manager. Setting the role
-- allows the window manager to restore window positions when loading a
-- saved session.
-- "wmclass_name": window name hint
-- "wmclass_class": window class hint
procedure Stick (Window : not null access Gtk_Window_Record);
-- Asks to stick Window, which means that it will appear on all user
-- desktops. Note that you shouldn't assume the window is definitely stuck
-- afterward, because other entities (e.g. the user or [window
-- manager][gtk-X11-arch] could unstick it again, and some window managers
-- do not support sticking windows. But normally the window will end up
-- stuck. Just don't write code that crashes if not.
-- It's permitted to call this function before showing a window.
-- You can track stickiness via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
procedure Unfullscreen (Window : not null access Gtk_Window_Record);
-- Asks to toggle off the fullscreen state for Window. Note that you
-- shouldn't assume the window is definitely not full screen afterward,
-- because other entities (e.g. the user or [window manager][gtk-X11-arch])
-- could fullscreen it again, and not all window managers honor requests to
-- unfullscreen windows. But normally the window will end up restored to
-- its normal state. Just don't write code that crashes if not.
-- You can track the fullscreen state via the "window-state-event" signal
-- on Gtk.Widget.Gtk_Widget.
-- Since: gtk+ 2.2
procedure Unmaximize (Window : not null access Gtk_Window_Record);
-- Asks to unmaximize Window. Note that you shouldn't assume the window is
-- definitely unmaximized afterward, because other entities (e.g. the user
-- or [window manager][gtk-X11-arch]) could maximize it again, and not all
-- window managers honor requests to unmaximize. But normally the window
-- will end up unmaximized. Just don't write code that crashes if not.
-- You can track maximization via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
procedure Unstick (Window : not null access Gtk_Window_Record);
-- Asks to unstick Window, which means that it will appear on only one of
-- the user's desktops. Note that you shouldn't assume the window is
-- definitely unstuck afterward, because other entities (e.g. the user or
-- [window manager][gtk-X11-arch]) could stick it again. But normally the
-- window will end up stuck. Just don't write code that crashes if not.
-- You can track stickiness via the "window-state-event" signal on
-- Gtk.Widget.Gtk_Widget.
procedure Add_Window
(Window_Group : not null access Gtk_Window_Group_Record;
Window : not null access Gtk_Window_Record'Class);
-- Adds a window to a Gtk.Window.Gtk_Window_Group.
-- "window": the Gtk.Window.Gtk_Window to add
function Get_Current_Device_Grab
(Window_Group : not null access Gtk_Window_Group_Record;
Device : not null access Gdk.Device.Gdk_Device_Record'Class)
return Gtk.Widget.Gtk_Widget;
-- Returns the current grab widget for Device, or null if none.
-- Since: gtk+ 3.0
-- "device": a Gdk.Device.Gdk_Device
function Get_Current_Grab
(Window_Group : not null access Gtk_Window_Group_Record)
return Gtk.Widget.Gtk_Widget;
-- Gets the current grab widget of the given group, see
-- Gtk.Widget.Grab_Add.
-- Since: gtk+ 2.22
function List_Windows
(Window_Group : not null access Gtk_Window_Group_Record)
return Gtk.Widget.Widget_List.Glist;
-- Returns a list of the Gtk_Windows that belong to Window_Group.
-- Since: gtk+ 2.14
procedure Remove_Window
(Window_Group : not null access Gtk_Window_Group_Record;
Window : not null access Gtk_Window_Record'Class);
-- Removes a window from a Gtk.Window.Gtk_Window_Group.
-- "window": the Gtk.Window.Gtk_Window to remove
---------------
-- Functions --
---------------
function Get_Default_Icon_List return Glib.Object.Object_Simple_List.Glist;
-- Gets the value set by Gtk.Window.Set_Default_Icon_List. The list is a
-- copy and should be freed with g_list_free, but the pixbufs in the list
-- have not had their reference count incremented.
procedure Set_Default_Icon_List
(List : Glib.Object.Object_Simple_List.Glist);
-- Sets an icon list to be used as fallback for windows that haven't had
-- Gtk.Window.Set_Icon_List called on them to set up a window-specific icon
-- list. This function allows you to set up the icon for all windows in
-- your app at once.
-- See Gtk.Window.Set_Icon_List for more details.
-- "list": a list of Gdk.Pixbuf.Gdk_Pixbuf
function Get_Default_Icon_Name return UTF8_String;
-- Returns the fallback icon name for windows that has been set with
-- Gtk.Window.Set_Default_Icon_Name. The returned string is owned by GTK+
-- and should not be modified. It is only valid until the next call to
-- Gtk.Window.Set_Default_Icon_Name.
-- Since: gtk+ 2.16
procedure Set_Default_Icon_Name (Name : UTF8_String);
-- Sets an icon to be used as fallback for windows that haven't had
-- Gtk.Window.Set_Icon_List called on them from a named themed icon, see
-- Gtk.Window.Set_Icon_Name.
-- Since: gtk+ 2.6
-- "name": the name of the themed icon
function List_Toplevels return Gtk.Widget.Widget_List.Glist;
-- Returns a list of all existing toplevel windows. The widgets in the
-- list are not individually referenced. If you want to iterate through the
-- list and perform actions involving callbacks that might destroy the
-- widgets, you must call `g_list_foreach (result, (GFunc)g_object_ref,
-- NULL)` first, and then unref all the widgets afterwards.
procedure Set_Auto_Startup_Notification (Setting : Boolean);
-- By default, after showing the first Gtk.Window.Gtk_Window, GTK+ calls
-- gdk_notify_startup_complete. Call this function to disable the automatic
-- startup notification. You might do this if your first window is a splash
-- screen, and you want to delay notification until after your real main
-- window has been shown, for example.
-- In that example, you would disable startup notification temporarily,
-- show your splash screen, then re-enable it so that showing the main
-- window would automatically result in notification.
-- Since: gtk+ 2.2
-- "setting": True to automatically do startup notification
procedure Set_Default_Icon
(Icon : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class);
-- Sets an icon to be used as fallback for windows that haven't had
-- Gtk.Window.Set_Icon called on them from a pixbuf.
-- Since: gtk+ 2.4
-- "icon": the icon
function Set_Default_Icon_From_File
(Filename : UTF8_String) return Boolean;
-- Sets an icon to be used as fallback for windows that haven't had
-- Gtk.Window.Set_Icon_List called on them from a file on disk. Warns on
-- failure if Err is null.
-- Since: gtk+ 2.2
-- "filename": location of icon file
procedure Set_Interactive_Debugging (Enable : Boolean);
-- Opens or closes the [interactive debugger][interactive-debugging],
-- which offers access to the widget hierarchy of the application and to
-- useful debugging tools.
-- Since: gtk+ 3.14
-- "enable": True to enable interactive debugging
----------------
-- Properties --
----------------
-- The following properties are defined for this widget. See
-- Glib.Properties for more information on properties)
Accept_Focus_Property : constant Glib.Properties.Property_Boolean;
-- Whether the window should receive the input focus.
Application_Property : constant Glib.Properties.Property_Object;
-- Type: Gtk.Application.Gtk_Application
-- The Gtk.Application.Gtk_Application associated with the window.
--
-- The application will be kept alive for at least as long as it has any
-- windows associated with it (see Glib.Application.Hold for a way to keep
-- it alive without windows).
--
-- Normally, the connection between the application and the window will
-- remain until the window is destroyed, but you can explicitly remove it
-- by setting the ::application property to null.
Attached_To_Property : constant Glib.Properties.Property_Object;
-- Type: Gtk.Widget.Gtk_Widget
-- The widget to which this window is attached. See
-- Gtk.Window.Set_Attached_To.
--
-- Examples of places where specifying this relation is useful are for
-- instance a Gtk.Menu.Gtk_Menu created by a Gtk.Combo_Box.Gtk_Combo_Box, a
-- completion popup window created by Gtk.GEntry.Gtk_Entry or a typeahead
-- search entry created by Gtk.Tree_View.Gtk_Tree_View.
Decorated_Property : constant Glib.Properties.Property_Boolean;
-- Whether the window should be decorated by the window manager.
Default_Height_Property : constant Glib.Properties.Property_Int;
Default_Width_Property : constant Glib.Properties.Property_Int;
Deletable_Property : constant Glib.Properties.Property_Boolean;
-- Whether the window frame should have a close button.
Destroy_With_Parent_Property : constant Glib.Properties.Property_Boolean;
Focus_On_Map_Property : constant Glib.Properties.Property_Boolean;
-- Whether the window should receive the input focus when mapped.
Focus_Visible_Property : constant Glib.Properties.Property_Boolean;
-- Whether 'focus rectangles' are currently visible in this window.
--
-- This property is maintained by GTK+ based on user input and should not
-- be set by applications.
Gravity_Property : constant Gdk.Window.Property_Gdk_Gravity;
-- Type: Gdk.Window.Gdk_Gravity
-- The window gravity of the window. See Gtk.Window.Move and
-- Gdk.Window.Gdk_Gravity for more details about window gravity.
Has_Resize_Grip_Property : constant Glib.Properties.Property_Boolean;
-- Whether the window has a corner resize grip.
--
-- Note that the resize grip is only shown if the window is actually
-- resizable and not maximized. Use
-- Gtk.Window.Gtk_Window:resize-grip-visible to find out if the resize grip
-- is currently shown.
Has_Toplevel_Focus_Property : constant Glib.Properties.Property_Boolean;
Hide_Titlebar_When_Maximized_Property : constant Glib.Properties.Property_Boolean;
-- Whether the titlebar should be hidden during maximization.
Icon_Property : constant Glib.Properties.Property_Object;
-- Type: Gdk.Pixbuf.Gdk_Pixbuf
Icon_Name_Property : constant Glib.Properties.Property_String;
-- The :icon-name property specifies the name of the themed icon to use as
-- the window icon. See Gtk.Icon_Theme.Gtk_Icon_Theme for more details.
Is_Active_Property : constant Glib.Properties.Property_Boolean;
Is_Maximized_Property : constant Glib.Properties.Property_Boolean;
Mnemonics_Visible_Property : constant Glib.Properties.Property_Boolean;
-- Whether mnemonics are currently visible in this window.
--
-- This property is maintained by GTK+ based on user input, and should not
-- be set by applications.
Modal_Property : constant Glib.Properties.Property_Boolean;
Resizable_Property : constant Glib.Properties.Property_Boolean;
Resize_Grip_Visible_Property : constant Glib.Properties.Property_Boolean;
-- Whether a corner resize grip is currently shown.
Role_Property : constant Glib.Properties.Property_String;
Screen_Property : constant Glib.Properties.Property_Object;
-- Type: Gdk.Screen.Gdk_Screen
Skip_Pager_Hint_Property : constant Glib.Properties.Property_Boolean;
Skip_Taskbar_Hint_Property : constant Glib.Properties.Property_Boolean;
Startup_Id_Property : constant Glib.Properties.Property_String;
-- Flags: write
-- The :startup-id is a write-only property for setting window's startup
-- notification identifier. See Gtk.Window.Set_Startup_Id for more details.
The_Type_Property : constant Gtk.Enums.Property_Gtk_Window_Type;
Title_Property : constant Glib.Properties.Property_String;
Transient_For_Property : constant Glib.Properties.Property_Object;
-- Type: Gtk_Window
-- The transient parent of the window. See Gtk.Window.Set_Transient_For
-- for more details about transient windows.
Type_Hint_Property : constant Gdk.Window.Property_Gdk_Window_Type_Hint;
-- Type: Gdk.Window.Gdk_Window_Type_Hint
Urgency_Hint_Property : constant Glib.Properties.Property_Boolean;
Window_Position_Property : constant Gtk.Enums.Property_Gtk_Window_Position;
-------------
-- Signals --
-------------
type Cb_Gtk_Window_Void is not null access procedure (Self : access Gtk_Window_Record'Class);
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
Signal_Activate_Default : constant Glib.Signal_Name := "activate-default";
procedure On_Activate_Default
(Self : not null access Gtk_Window_Record;
Call : Cb_Gtk_Window_Void;
After : Boolean := False);
procedure On_Activate_Default
(Self : not null access Gtk_Window_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False);
-- The ::activate-default signal is a [keybinding
-- signal][GtkBindingSignal] which gets emitted when the user activates the
-- default widget of Window.
Signal_Activate_Focus : constant Glib.Signal_Name := "activate-focus";
procedure On_Activate_Focus
(Self : not null access Gtk_Window_Record;
Call : Cb_Gtk_Window_Void;
After : Boolean := False);
procedure On_Activate_Focus
(Self : not null access Gtk_Window_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False);
-- The ::activate-focus signal is a [keybinding signal][GtkBindingSignal]
-- which gets emitted when the user activates the currently focused widget
-- of Window.
type Cb_Gtk_Window_Boolean_Boolean is not null access function
(Self : access Gtk_Window_Record'Class;
Toggle : Boolean) return Boolean;
type Cb_GObject_Boolean_Boolean is not null access function
(Self : access Glib.Object.GObject_Record'Class;
Toggle : Boolean) return Boolean;
Signal_Enable_Debugging : constant Glib.Signal_Name := "enable-debugging";
procedure On_Enable_Debugging
(Self : not null access Gtk_Window_Record;
Call : Cb_Gtk_Window_Boolean_Boolean;
After : Boolean := False);
procedure On_Enable_Debugging
(Self : not null access Gtk_Window_Record;
Call : Cb_GObject_Boolean_Boolean;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False);
-- The ::enable-debugging signal is a [keybinding
-- signal][GtkBindingSignal] which gets emitted when the user enables or
-- disables interactive debugging. When Toggle is True, interactive
-- debugging is toggled on or off, when it is False, the debugger will be
-- pointed at the widget under the pointer.
--
-- The default bindings for this signal are Ctrl-Shift-I and Ctrl-Shift-D.
--
-- Callback parameters:
-- -- "toggle": toggle the debugger
-- -- Returns True if the key binding was handled
Signal_Keys_Changed : constant Glib.Signal_Name := "keys-changed";
procedure On_Keys_Changed
(Self : not null access Gtk_Window_Record;
Call : Cb_Gtk_Window_Void;
After : Boolean := False);
procedure On_Keys_Changed
(Self : not null access Gtk_Window_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False);
-- The ::keys-changed signal gets emitted when the set of accelerators or
-- mnemonics that are associated with Window changes.
type Cb_Gtk_Window_Gtk_Widget_Void is not null access procedure
(Self : access Gtk_Window_Record'Class;
Object : access Gtk.Widget.Gtk_Widget_Record'Class);
type Cb_GObject_Gtk_Widget_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Object : access Gtk.Widget.Gtk_Widget_Record'Class);
Signal_Set_Focus : constant Glib.Signal_Name := "set-focus";
procedure On_Set_Focus
(Self : not null access Gtk_Window_Record;
Call : Cb_Gtk_Window_Gtk_Widget_Void;
After : Boolean := False);
procedure On_Set_Focus
(Self : not null access Gtk_Window_Record;
Call : Cb_GObject_Gtk_Widget_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False);
----------------
-- Interfaces --
----------------
-- This class implements several interfaces. See Glib.Types
--
-- - "Buildable"
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Window_Record, Gtk_Window);
function "+"
(Widget : access Gtk_Window_Record'Class)
return Gtk.Buildable.Gtk_Buildable
renames Implements_Gtk_Buildable.To_Interface;
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Window
renames Implements_Gtk_Buildable.To_Object;
private
Window_Position_Property : constant Gtk.Enums.Property_Gtk_Window_Position :=
Gtk.Enums.Build ("window-position");
Urgency_Hint_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("urgency-hint");
Type_Hint_Property : constant Gdk.Window.Property_Gdk_Window_Type_Hint :=
Gdk.Window.Build ("type-hint");
Transient_For_Property : constant Glib.Properties.Property_Object :=
Glib.Properties.Build ("transient-for");
Title_Property : constant Glib.Properties.Property_String :=
Glib.Properties.Build ("title");
The_Type_Property : constant Gtk.Enums.Property_Gtk_Window_Type :=
Gtk.Enums.Build ("type");
Startup_Id_Property : constant Glib.Properties.Property_String :=
Glib.Properties.Build ("startup-id");
Skip_Taskbar_Hint_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("skip-taskbar-hint");
Skip_Pager_Hint_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("skip-pager-hint");
Screen_Property : constant Glib.Properties.Property_Object :=
Glib.Properties.Build ("screen");
Role_Property : constant Glib.Properties.Property_String :=
Glib.Properties.Build ("role");
Resize_Grip_Visible_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("resize-grip-visible");
Resizable_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("resizable");
Modal_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("modal");
Mnemonics_Visible_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("mnemonics-visible");
Is_Maximized_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("is-maximized");
Is_Active_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("is-active");
Icon_Name_Property : constant Glib.Properties.Property_String :=
Glib.Properties.Build ("icon-name");
Icon_Property : constant Glib.Properties.Property_Object :=
Glib.Properties.Build ("icon");
Hide_Titlebar_When_Maximized_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("hide-titlebar-when-maximized");
Has_Toplevel_Focus_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("has-toplevel-focus");
Has_Resize_Grip_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("has-resize-grip");
Gravity_Property : constant Gdk.Window.Property_Gdk_Gravity :=
Gdk.Window.Build ("gravity");
Focus_Visible_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("focus-visible");
Focus_On_Map_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("focus-on-map");
Destroy_With_Parent_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("destroy-with-parent");
Deletable_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("deletable");
Default_Width_Property : constant Glib.Properties.Property_Int :=
Glib.Properties.Build ("default-width");
Default_Height_Property : constant Glib.Properties.Property_Int :=
Glib.Properties.Build ("default-height");
Decorated_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("decorated");
Attached_To_Property : constant Glib.Properties.Property_Object :=
Glib.Properties.Build ("attached-to");
Application_Property : constant Glib.Properties.Property_Object :=
Glib.Properties.Build ("application");
Accept_Focus_Property : constant Glib.Properties.Property_Boolean :=
Glib.Properties.Build ("accept-focus");
end Gtk.Window;
|