1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  A GtkWindow is a toplevel window which can contain other widgets. Windows 
  26. --  normally have decorations that are under the control of the windowing 
  27. --  system and allow the user to manipulate the window (resize it, move it, 
  28. --  close it,...). 
  29. -- 
  30. --  GTK+ also allows windows to have a resize grip (a small area in the lower 
  31. --  right or left corner) which can be clicked to reszie the window. To control 
  32. --  whether a window has a resize grip, use Gtk.Window.Set_Has_Resize_Grip. 
  33. -- 
  34. --  == GtkWindow as GtkBuildable == 
  35. -- 
  36. --  The GtkWindow implementation of the GtkBuildable interface supports a 
  37. --  custom <tag class="starttag">accel-groups</tag> element, which supports any 
  38. --  number of <tag class="starttag">group</tag> elements representing the 
  39. --  Gtk.Accel_Group.Gtk_Accel_Group objects you want to add to your window 
  40. --  (synonymous with Gtk.Window.Add_Accel_Group. 
  41. -- 
  42. --  == A UI definition fragment with accel groups == 
  43. -- 
  44. --    <object class="GtkWindow"> 
  45. --    <accel-groups> 
  46. --    <group name="accelgroup1"/> 
  47. --    </accel-groups> 
  48. --    </object> 
  49. --    <!-- --> 
  50. --    ... 
  51. --    <!-- --> 
  52. --    <object class="GtkAccelGroup" id="accelgroup1"/> 
  53. --  </description> 
  54. pragma Ada_2005; 
  55.  
  56. pragma Warnings (Off, "*is already use-visible*"); 
  57. with Gdk.Device;      use Gdk.Device; 
  58. with Gdk.Event;       use Gdk.Event; 
  59. with Gdk.Pixbuf;      use Gdk.Pixbuf; 
  60. with Gdk.Rectangle;   use Gdk.Rectangle; 
  61. with Gdk.Screen;      use Gdk.Screen; 
  62. with Gdk.Types;       use Gdk.Types; 
  63. with Gdk.Window;      use Gdk.Window; 
  64. with Glib;            use Glib; 
  65. with Glib.Object;     use Glib.Object; 
  66. with Glib.Properties; use Glib.Properties; 
  67. with Glib.Types;      use Glib.Types; 
  68. with Gtk.Accel_Group; use Gtk.Accel_Group; 
  69. with Gtk.Bin;         use Gtk.Bin; 
  70. with Gtk.Buildable;   use Gtk.Buildable; 
  71. with Gtk.Enums;       use Gtk.Enums; 
  72. with Gtk.Widget;      use Gtk.Widget; 
  73.  
  74. package Gtk.Window is 
  75.  
  76.    type Gtk_Window_Record is new Gtk_Bin_Record with null record; 
  77.    type Gtk_Window is access all Gtk_Window_Record'Class; 
  78.  
  79.    type Gtk_Window_Group_Record is new GObject_Record with null record; 
  80.    type Gtk_Window_Group is access all Gtk_Window_Group_Record'Class; 
  81.  
  82.    ------------------ 
  83.    -- Constructors -- 
  84.    ------------------ 
  85.  
  86.    procedure Gtk_New 
  87.       (Window   : out Gtk_Window; 
  88.        The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel); 
  89.    procedure Initialize 
  90.       (Window   : not null access Gtk_Window_Record'Class; 
  91.        The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel); 
  92.    --  Creates a new Gtk.Window.Gtk_Window, which is a toplevel window that 
  93.    --  can contain other widgets. Nearly always, the type of the window should 
  94.    --  be GTK_WINDOW_TOPLEVEL. If you're implementing something like a popup 
  95.    --  menu from scratch (which is a bad idea, just use Gtk.Menu.Gtk_Menu), you 
  96.    --  might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for dialogs, though 
  97.    --  in some other toolkits dialogs are called "popups". In GTK+, 
  98.    --  GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. On X11, popup 
  99.    --  windows are not controlled by the <link linkend="gtk-X11-arch">window 
  100.    --  manager</link>. 
  101.    --  If you simply want an undecorated window (no window borders), use 
  102.    --  Gtk.Window.Set_Decorated, don't use GTK_WINDOW_POPUP. 
  103.    --  "type": type of window 
  104.  
  105.    function Gtk_Window_New 
  106.       (The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel) 
  107.        return Gtk_Window; 
  108.    --  Creates a new Gtk.Window.Gtk_Window, which is a toplevel window that 
  109.    --  can contain other widgets. Nearly always, the type of the window should 
  110.    --  be GTK_WINDOW_TOPLEVEL. If you're implementing something like a popup 
  111.    --  menu from scratch (which is a bad idea, just use Gtk.Menu.Gtk_Menu), you 
  112.    --  might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for dialogs, though 
  113.    --  in some other toolkits dialogs are called "popups". In GTK+, 
  114.    --  GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. On X11, popup 
  115.    --  windows are not controlled by the <link linkend="gtk-X11-arch">window 
  116.    --  manager</link>. 
  117.    --  If you simply want an undecorated window (no window borders), use 
  118.    --  Gtk.Window.Set_Decorated, don't use GTK_WINDOW_POPUP. 
  119.    --  "type": type of window 
  120.  
  121.    function Get_Type return Glib.GType; 
  122.    pragma Import (C, Get_Type, "gtk_window_get_type"); 
  123.  
  124.    procedure Gtk_New (Window_Group : out Gtk_Window_Group); 
  125.    procedure Initialize 
  126.       (Window_Group : not null access Gtk_Window_Group_Record'Class); 
  127.    --  Creates a new Gtk.Window.Gtk_Window_Group object. Grabs added with 
  128.    --  Gtk.Widget.Grab_Add only affect windows within the same 
  129.    --  Gtk.Window.Gtk_Window_Group. 
  130.  
  131.    function Gtk_Window_Group_New return Gtk_Window_Group; 
  132.    --  Creates a new Gtk.Window.Gtk_Window_Group object. Grabs added with 
  133.    --  Gtk.Widget.Grab_Add only affect windows within the same 
  134.    --  Gtk.Window.Gtk_Window_Group. 
  135.  
  136.    function Group_Get_Type return Glib.GType; 
  137.    pragma Import (C, Group_Get_Type, "gtk_window_group_get_type"); 
  138.  
  139.    ------------- 
  140.    -- Methods -- 
  141.    ------------- 
  142.  
  143.    function Activate_Default 
  144.       (Window : not null access Gtk_Window_Record) return Boolean; 
  145.    --  Activates the default widget for the window, unless the current focused 
  146.    --  widget has been configured to receive the default action (see 
  147.    --  Gtk.Widget.Set_Receives_Default), in which case the focused widget is 
  148.    --  activated. 
  149.  
  150.    function Activate_Focus 
  151.       (Window : not null access Gtk_Window_Record) return Boolean; 
  152.    --  Activates the current focused widget within the window. 
  153.  
  154.    function Activate_Key 
  155.       (Window : not null access Gtk_Window_Record; 
  156.        Event  : Gdk.Event.Gdk_Event_Key) return Boolean; 
  157.    --  Activates mnemonics and accelerators for this Gtk.Window.Gtk_Window. 
  158.    --  This is normally called by the default ::key_press_event handler for 
  159.    --  toplevel windows, however in some cases it may be useful to call this 
  160.    --  directly when overriding the standard key handling for a toplevel 
  161.    --  window. 
  162.    --  Since: gtk+ 2.4 
  163.    --  "event": a Gdk.Event.Gdk_Event_Key 
  164.  
  165.    procedure Add_Accel_Group 
  166.       (Window      : not null access Gtk_Window_Record; 
  167.        Accel_Group : not null access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class); 
  168.    --  Associate Accel_Group with Window, such that calling 
  169.    --  Gtk.Accel_Group.Accel_Groups_Activate on Window will activate 
  170.    --  accelerators in Accel_Group. 
  171.    --  "accel_group": a Gtk.Accel_Group.Gtk_Accel_Group 
  172.  
  173.    procedure Add_Mnemonic 
  174.       (Window : not null access Gtk_Window_Record; 
  175.        Keyval : Gdk.Types.Gdk_Key_Type; 
  176.        Target : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  177.    --  Adds a mnemonic to this window. 
  178.    --  "keyval": the mnemonic 
  179.    --  "target": the widget that gets activated by the mnemonic 
  180.  
  181.    procedure Begin_Move_Drag 
  182.       (Window    : not null access Gtk_Window_Record; 
  183.        Button    : Gint; 
  184.        Root_X    : Gint; 
  185.        Root_Y    : Gint; 
  186.        Timestamp : Guint32); 
  187.    --  Starts moving a window. This function is used if an application has 
  188.    --  window movement grips. When GDK can support it, the window movement will 
  189.    --  be done using the standard mechanism for the <link 
  190.    --  linkend="gtk-X11-arch">window manager</link> or windowing system. 
  191.    --  Otherwise, GDK will try to emulate window movement, potentially not all 
  192.    --  that well, depending on the windowing system. 
  193.    --  "button": mouse button that initiated the drag 
  194.    --  "root_x": X position where the user clicked to initiate the drag, in 
  195.    --  root window coordinates 
  196.    --  "root_y": Y position where the user clicked to initiate the drag 
  197.    --  "timestamp": timestamp from the click event that initiated the drag 
  198.  
  199.    procedure Begin_Resize_Drag 
  200.       (Window    : not null access Gtk_Window_Record; 
  201.        Edge      : Gdk.Window.Gdk_Window_Edge; 
  202.        Button    : Gint; 
  203.        Root_X    : Gint; 
  204.        Root_Y    : Gint; 
  205.        Timestamp : Guint32); 
  206.    --  Starts resizing a window. This function is used if an application has 
  207.    --  window resizing controls. When GDK can support it, the resize will be 
  208.    --  done using the standard mechanism for the <link 
  209.    --  linkend="gtk-X11-arch">window manager</link> or windowing system. 
  210.    --  Otherwise, GDK will try to emulate window resizing, potentially not all 
  211.    --  that well, depending on the windowing system. 
  212.    --  "edge": position of the resize control 
  213.    --  "button": mouse button that initiated the drag 
  214.    --  "root_x": X position where the user clicked to initiate the drag, in 
  215.    --  root window coordinates 
  216.    --  "root_y": Y position where the user clicked to initiate the drag 
  217.    --  "timestamp": timestamp from the click event that initiated the drag 
  218.  
  219.    procedure Deiconify (Window : not null access Gtk_Window_Record); 
  220.    --  Asks to deiconify (i.e. unminimize) the specified Window. Note that you 
  221.    --  shouldn't assume the window is definitely deiconified afterward, because 
  222.    --  other entities (e.g. the user or <link linkend="gtk-X11-arch">window 
  223.    --  manager</link>) could iconify it again before your code which assumes 
  224.    --  deiconification gets to run. 
  225.    --  You can track iconification via the "window-state-event" signal on 
  226.    --  Gtk.Widget.Gtk_Widget. 
  227.  
  228.    procedure Fullscreen (Window : not null access Gtk_Window_Record); 
  229.    --  Asks to place Window in the fullscreen state. Note that you shouldn't 
  230.    --  assume the window is definitely full screen afterward, because other 
  231.    --  entities (e.g. the user or <link linkend="gtk-X11-arch">window 
  232.    --  manager</link>) could unfullscreen it again, and not all window managers 
  233.    --  honor requests to fullscreen windows. But normally the window will end 
  234.    --  up fullscreen. Just don't write code that crashes if not. 
  235.    --  You can track the fullscreen state via the "window-state-event" signal 
  236.    --  on Gtk.Widget.Gtk_Widget. 
  237.    --  Since: gtk+ 2.2 
  238.  
  239.    function Get_Accept_Focus 
  240.       (Window : not null access Gtk_Window_Record) return Boolean; 
  241.    --  Gets the value set by Gtk.Window.Set_Accept_Focus. 
  242.    --  Since: gtk+ 2.4 
  243.  
  244.    procedure Set_Accept_Focus 
  245.       (Window  : not null access Gtk_Window_Record; 
  246.        Setting : Boolean); 
  247.    --  Windows may set a hint asking the desktop environment not to receive 
  248.    --  the input focus. This function sets this hint. 
  249.    --  Since: gtk+ 2.4 
  250.    --  "setting": True to let this window receive input focus 
  251.  
  252.    function Get_Attached_To 
  253.       (Window : not null access Gtk_Window_Record) 
  254.        return Gtk.Widget.Gtk_Widget; 
  255.    --  Fetches the attach widget for this window. See 
  256.    --  Gtk.Window.Set_Attached_To. 
  257.    --  Since: gtk+ 3.4 
  258.  
  259.    procedure Set_Attached_To 
  260.       (Window        : not null access Gtk_Window_Record; 
  261.        Attach_Widget : access Gtk.Widget.Gtk_Widget_Record'Class); 
  262.    --  Marks Window as attached to Attach_Widget. This creates a logical 
  263.    --  binding between the window and the widget it belongs to, which is used 
  264.    --  by GTK+ to propagate information such as styling or accessibility to 
  265.    --  Window as if it was a children of Attach_Widget. 
  266.    --  Examples of places where specifying this relation is useful are for 
  267.    --  instance a Gtk.Menu.Gtk_Menu created by a Gtk.Combo_Box.Gtk_Combo_Box, a 
  268.    --  completion popup window created by Gtk.GEntry.Gtk_Entry or a typeahead 
  269.    --  search entry created by Gtk.Tree_View.Gtk_Tree_View. 
  270.    --  Note that this function should not be confused with 
  271.    --  Gtk.Window.Set_Transient_For, which specifies a window manager relation 
  272.    --  between two toplevels instead. 
  273.    --  Passing null for Attach_Widget detaches the window. 
  274.    --  Since: gtk+ 3.4 
  275.    --  "attach_widget": a Gtk.Widget.Gtk_Widget, or null 
  276.  
  277.    function Get_Decorated 
  278.       (Window : not null access Gtk_Window_Record) return Boolean; 
  279.    --  Returns whether the window has been set to have decorations such as a 
  280.    --  title bar via Gtk.Window.Set_Decorated. 
  281.  
  282.    procedure Set_Decorated 
  283.       (Window  : not null access Gtk_Window_Record; 
  284.        Setting : Boolean); 
  285.    --  By default, windows are decorated with a title bar, resize controls, 
  286.    --  etc. Some <link linkend="gtk-X11-arch">window managers</link> allow GTK+ 
  287.    --  to disable these decorations, creating a borderless window. If you set 
  288.    --  the decorated property to False using this function, GTK+ will do its 
  289.    --  best to convince the window manager not to decorate the window. 
  290.    --  Depending on the system, this function may not have any effect when 
  291.    --  called on a window that is already visible, so you should call it before 
  292.    --  calling Gtk.Widget.Show. 
  293.    --  On Windows, this function always works, since there's no window manager 
  294.    --  policy involved. 
  295.    --  "setting": True to decorate the window 
  296.  
  297.    procedure Get_Default_Size 
  298.       (Window : not null access Gtk_Window_Record; 
  299.        Width  : out Gint; 
  300.        Height : out Gint); 
  301.    --  Gets the default size of the window. A value of -1 for the width or 
  302.    --  height indicates that a default size has not been explicitly set for 
  303.    --  that dimension, so the "natural" size of the window will be used. 
  304.    --  "width": location to store the default width, or null 
  305.    --  "height": location to store the default height, or null 
  306.  
  307.    procedure Set_Default_Size 
  308.       (Window : not null access Gtk_Window_Record; 
  309.        Width  : Gint; 
  310.        Height : Gint); 
  311.    --  Sets the default size of a window. If the window's "natural" size (its 
  312.    --  size request) is larger than the default, the default will be ignored. 
  313.    --  More generally, if the default size does not obey the geometry hints for 
  314.    --  the window (gtk_window_set_geometry_hints can be used to set these 
  315.    --  explicitly), the default size will be clamped to the nearest permitted 
  316.    --  size. 
  317.    --  Unlike Gtk.Widget.Set_Size_Request, which sets a size request for a 
  318.    --  widget and thus would keep users from shrinking the window, this 
  319.    --  function only sets the initial size, just as if the user had resized the 
  320.    --  window themselves. Users can still shrink the window again as they 
  321.    --  normally would. Setting a default size of -1 means to use the "natural" 
  322.    --  default size (the size request of the window). 
  323.    --  For more control over a window's initial size and how resizing works, 
  324.    --  investigate Gtk.Window.Set_Geometry_Hints. 
  325.    --  For some uses, Gtk.Window.Resize is a more appropriate function. 
  326.    --  Gtk.Window.Resize changes the current size of the window, rather than 
  327.    --  the size to be used on initial display. Gtk.Window.Resize always affects 
  328.    --  the window itself, not the geometry widget. 
  329.    --  The default size of a window only affects the first time a window is 
  330.    --  shown; if a window is hidden and re-shown, it will remember the size it 
  331.    --  had prior to hiding, rather than using the default size. 
  332.    --  Windows can't actually be 0x0 in size, they must be at least 1x1, but 
  333.    --  passing 0 for Width and Height is OK, resulting in a 1x1 default size. 
  334.    --  "width": width in pixels, or -1 to unset the default width 
  335.    --  "height": height in pixels, or -1 to unset the default height 
  336.  
  337.    function Get_Default_Widget 
  338.       (Window : not null access Gtk_Window_Record) 
  339.        return Gtk.Widget.Gtk_Widget; 
  340.    --  Returns the default widget for Window. See Gtk.Window.Set_Default for 
  341.    --  more details. 
  342.    --  Since: gtk+ 2.14 
  343.  
  344.    function Get_Deletable 
  345.       (Window : not null access Gtk_Window_Record) return Boolean; 
  346.    --  Returns whether the window has been set to have a close button via 
  347.    --  Gtk.Window.Set_Deletable. 
  348.    --  Since: gtk+ 2.10 
  349.  
  350.    procedure Set_Deletable 
  351.       (Window  : not null access Gtk_Window_Record; 
  352.        Setting : Boolean); 
  353.    --  By default, windows have a close button in the window frame. Some <link 
  354.    --  linkend="gtk-X11-arch">window managers</link> allow GTK+ to disable this 
  355.    --  button. If you set the deletable property to False using this function, 
  356.    --  GTK+ will do its best to convince the window manager not to show a close 
  357.    --  button. Depending on the system, this function may not have any effect 
  358.    --  when called on a window that is already visible, so you should call it 
  359.    --  before calling Gtk.Widget.Show. 
  360.    --  On Windows, this function always works, since there's no window manager 
  361.    --  policy involved. 
  362.    --  Since: gtk+ 2.10 
  363.    --  "setting": True to decorate the window as deletable 
  364.  
  365.    function Get_Destroy_With_Parent 
  366.       (Window : not null access Gtk_Window_Record) return Boolean; 
  367.    --  Returns whether the window will be destroyed with its transient parent. 
  368.    --  See gtk_window_set_destroy_with_parent (). 
  369.  
  370.    procedure Set_Destroy_With_Parent 
  371.       (Window  : not null access Gtk_Window_Record; 
  372.        Setting : Boolean); 
  373.    --  If Setting is True, then destroying the transient parent of Window will 
  374.    --  also destroy Window itself. This is useful for dialogs that shouldn't 
  375.    --  persist beyond the lifetime of the main window they're associated with, 
  376.    --  for example. 
  377.    --  "setting": whether to destroy Window with its transient parent 
  378.  
  379.    function Get_Focus 
  380.       (Window : not null access Gtk_Window_Record) 
  381.        return Gtk.Widget.Gtk_Widget; 
  382.    --  Retrieves the current focused widget within the window. Note that this 
  383.    --  is the widget that would have the focus if the toplevel window focused; 
  384.    --  if the toplevel window is not focused then 'gtk_widget_has_focus 
  385.    --  (widget)' will not be True for the widget. 
  386.  
  387.    procedure Set_Focus 
  388.       (Window : not null access Gtk_Window_Record; 
  389.        Focus  : access Gtk.Widget.Gtk_Widget_Record'Class); 
  390.    --  If Focus is not the current focus widget, and is focusable, sets it as 
  391.    --  the focus widget for the window. If Focus is null, unsets the focus 
  392.    --  widget for this window. To set the focus to a particular widget in the 
  393.    --  toplevel, it is usually more convenient to use Gtk.Widget.Grab_Focus 
  394.    --  instead of this function. 
  395.    --  "focus": widget to be the new focus widget, or null to unset any focus 
  396.    --  widget for the toplevel window. 
  397.  
  398.    function Get_Focus_On_Map 
  399.       (Window : not null access Gtk_Window_Record) return Boolean; 
  400.    --  Gets the value set by Gtk.Window.Set_Focus_On_Map. 
  401.    --  Since: gtk+ 2.6 
  402.  
  403.    procedure Set_Focus_On_Map 
  404.       (Window  : not null access Gtk_Window_Record; 
  405.        Setting : Boolean); 
  406.    --  Windows may set a hint asking the desktop environment not to receive 
  407.    --  the input focus when the window is mapped. This function sets this hint. 
  408.    --  Since: gtk+ 2.6 
  409.    --  "setting": True to let this window receive input focus on map 
  410.  
  411.    function Get_Focus_Visible 
  412.       (Window : not null access Gtk_Window_Record) return Boolean; 
  413.    --  Gets the value of the Gtk.Window.Gtk_Window:focus-visible property. 
  414.    --  Since: gtk+ 3.2 
  415.  
  416.    procedure Set_Focus_Visible 
  417.       (Window  : not null access Gtk_Window_Record; 
  418.        Setting : Boolean); 
  419.    --  Sets the Gtk.Window.Gtk_Window:focus-visible property. 
  420.    --  Since: gtk+ 3.2 
  421.    --  "setting": the new value 
  422.  
  423.    function Get_Gravity 
  424.       (Window : not null access Gtk_Window_Record) 
  425.        return Gdk.Window.Gdk_Gravity; 
  426.    --  Gets the value set by Gtk.Window.Set_Gravity. 
  427.  
  428.    procedure Set_Gravity 
  429.       (Window  : not null access Gtk_Window_Record; 
  430.        Gravity : Gdk.Window.Gdk_Gravity); 
  431.    --  Window gravity defines the meaning of coordinates passed to 
  432.    --  Gtk.Window.Move. See Gtk.Window.Move and Gdk.Window.Gdk_Gravity for more 
  433.    --  details. 
  434.    --  The default window gravity is GDK_GRAVITY_NORTH_WEST which will 
  435.    --  typically "do what you mean." 
  436.    --  "gravity": window gravity 
  437.  
  438.    function Get_Group 
  439.       (Window : not null access Gtk_Window_Record) return Gtk_Window_Group; 
  440.    --  Returns the group for Window or the default group, if Window is null or 
  441.    --  if Window does not have an explicit window group. 
  442.    --  Since: gtk+ 2.10 
  443.  
  444.    function Get_Has_Resize_Grip 
  445.       (Window : not null access Gtk_Window_Record) return Boolean; 
  446.    --  Determines whether the window may have a resize grip. 
  447.    --  Since: gtk+ 3.0 
  448.  
  449.    procedure Set_Has_Resize_Grip 
  450.       (Window : not null access Gtk_Window_Record; 
  451.        Value  : Boolean); 
  452.    --  Sets whether Window has a corner resize grip. 
  453.    --  Note that the resize grip is only shown if the window is actually 
  454.    --  resizable and not maximized. Use Gtk.Window.Resize_Grip_Is_Visible to 
  455.    --  find out if the resize grip is currently shown. 
  456.    --  Since: gtk+ 3.0 
  457.    --  "value": True to allow a resize grip 
  458.  
  459.    function Get_Hide_Titlebar_When_Maximized 
  460.       (Window : not null access Gtk_Window_Record) return Boolean; 
  461.    --  Returns whether the window has requested to have its titlebar hidden 
  462.    --  when maximized. See gtk_window_set_hide_titlebar_when_maximized (). 
  463.    --  Since: gtk+ 3.4 
  464.  
  465.    procedure Set_Hide_Titlebar_When_Maximized 
  466.       (Window  : not null access Gtk_Window_Record; 
  467.        Setting : Boolean); 
  468.    --  If Setting is True, then Window will request that it's titlebar should 
  469.    --  be hidden when maximized. This is useful for windows that don't convey 
  470.    --  any information other than the application name in the titlebar, to put 
  471.    --  the available screen space to better use. If the underlying window 
  472.    --  system does not support the request, the setting will not have any 
  473.    --  effect. 
  474.    --  Since: gtk+ 3.4 
  475.    --  "setting": whether to hide the titlebar when Window is maximized 
  476.  
  477.    function Get_Icon 
  478.       (Window : not null access Gtk_Window_Record) 
  479.        return Gdk.Pixbuf.Gdk_Pixbuf; 
  480.    --  Gets the value set by Gtk.Window.Set_Icon (or if you've called 
  481.    --  Gtk.Window.Set_Icon_List, gets the first icon in the icon list). 
  482.  
  483.    procedure Set_Icon 
  484.       (Window : not null access Gtk_Window_Record; 
  485.        Icon   : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  486.    --  Sets up the icon representing a Gtk.Window.Gtk_Window. This icon is 
  487.    --  used when the window is minimized (also known as iconified). Some window 
  488.    --  managers or desktop environments may also place it in the window frame, 
  489.    --  or display it in other contexts. 
  490.    --  The icon should be provided in whatever size it was naturally drawn; 
  491.    --  that is, don't scale the image before passing it to GTK+. Scaling is 
  492.    --  postponed until the last minute, when the desired final size is known, 
  493.    --  to allow best quality. 
  494.    --  If you have your icon hand-drawn in multiple sizes, use 
  495.    --  Gtk.Window.Set_Icon_List. Then the best size will be used. 
  496.    --  This function is equivalent to calling Gtk.Window.Set_Icon_List with a 
  497.    --  1-element list. 
  498.    --  See also Gtk.Window.Set_Default_Icon_List to set the icon for all 
  499.    --  windows in your application in one go. 
  500.    --  "icon": icon image, or null 
  501.  
  502.    function Get_Icon_List 
  503.       (Window : not null access Gtk_Window_Record) 
  504.        return Glib.Object.Object_Simple_List.Glist; 
  505.    --  Retrieves the list of icons set by Gtk.Window.Set_Icon_List. The list 
  506.    --  is copied, but the reference count on each member won't be incremented. 
  507.  
  508.    procedure Set_Icon_List 
  509.       (Window : not null access Gtk_Window_Record; 
  510.        List   : Glib.Object.Object_Simple_List.Glist); 
  511.    --  Sets up the icon representing a Gtk.Window.Gtk_Window. The icon is used 
  512.    --  when the window is minimized (also known as iconified). Some window 
  513.    --  managers or desktop environments may also place it in the window frame, 
  514.    --  or display it in other contexts. 
  515.    --  Gtk.Window.Set_Icon_List allows you to pass in the same icon in several 
  516.    --  hand-drawn sizes. The list should contain the natural sizes your icon is 
  517.    --  available in; that is, don't scale the image before passing it to GTK+. 
  518.    --  Scaling is postponed until the last minute, when the desired final size 
  519.    --  is known, to allow best quality. 
  520.    --  By passing several sizes, you may improve the final image quality of 
  521.    --  the icon, by reducing or eliminating automatic image scaling. 
  522.    --  Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and 
  523.    --  larger images (64x64, 128x128) if you have them. 
  524.    --  See also Gtk.Window.Set_Default_Icon_List to set the icon for all 
  525.    --  windows in your application in one go. 
  526.    --  Note that transient windows (those who have been set transient for 
  527.    --  another window using Gtk.Window.Set_Transient_For) will inherit their 
  528.    --  icon from their transient parent. So there's no need to explicitly set 
  529.    --  the icon on transient windows. 
  530.    --  "list": list of Gdk.Pixbuf.Gdk_Pixbuf 
  531.  
  532.    function Get_Icon_Name 
  533.       (Window : not null access Gtk_Window_Record) return UTF8_String; 
  534.    --  Returns the name of the themed icon for the window, see 
  535.    --  Gtk.Window.Set_Icon_Name. 
  536.    --  Since: gtk+ 2.6 
  537.  
  538.    procedure Set_Icon_Name 
  539.       (Window : not null access Gtk_Window_Record; 
  540.        Name   : UTF8_String := ""); 
  541.    --  Sets the icon for the window from a named themed icon. See the docs for 
  542.    --  Gtk.Icon_Theme.Gtk_Icon_Theme for more details. 
  543.    --  Note that this has nothing to do with the WM_ICON_NAME property which 
  544.    --  is mentioned in the ICCCM. 
  545.    --  Since: gtk+ 2.6 
  546.    --  "name": the name of the themed icon 
  547.  
  548.    function Get_Mnemonic_Modifier 
  549.       (Window : not null access Gtk_Window_Record) 
  550.        return Gdk.Types.Gdk_Modifier_Type; 
  551.    --  Returns the mnemonic modifier for this window. See 
  552.    --  Gtk.Window.Set_Mnemonic_Modifier. 
  553.  
  554.    procedure Set_Mnemonic_Modifier 
  555.       (Window   : not null access Gtk_Window_Record; 
  556.        Modifier : Gdk.Types.Gdk_Modifier_Type); 
  557.    --  Sets the mnemonic modifier for this window. 
  558.    --  "modifier": the modifier mask used to activate mnemonics on this 
  559.    --  window. 
  560.  
  561.    function Get_Mnemonics_Visible 
  562.       (Window : not null access Gtk_Window_Record) return Boolean; 
  563.    --  Gets the value of the Gtk.Window.Gtk_Window:mnemonics-visible property. 
  564.    --  Since: gtk+ 2.20 
  565.  
  566.    procedure Set_Mnemonics_Visible 
  567.       (Window  : not null access Gtk_Window_Record; 
  568.        Setting : Boolean); 
  569.    --  Sets the Gtk.Window.Gtk_Window:mnemonics-visible property. 
  570.    --  Since: gtk+ 2.20 
  571.    --  "setting": the new value 
  572.  
  573.    function Get_Modal 
  574.       (Window : not null access Gtk_Window_Record) return Boolean; 
  575.    --  Returns whether the window is modal. See Gtk.Window.Set_Modal. 
  576.  
  577.    procedure Set_Modal 
  578.       (Window : not null access Gtk_Window_Record; 
  579.        Modal  : Boolean := True); 
  580.    --  Sets a window modal or non-modal. Modal windows prevent interaction 
  581.    --  with other windows in the same application. To keep modal dialogs on top 
  582.    --  of main application windows, use Gtk.Window.Set_Transient_For to make 
  583.    --  the dialog transient for the parent; most <link 
  584.    --  linkend="gtk-X11-arch">window managers</link> will then disallow 
  585.    --  lowering the dialog below the parent. 
  586.    --  "modal": whether the window is modal 
  587.  
  588.    procedure Get_Position 
  589.       (Window : not null access Gtk_Window_Record; 
  590.        Root_X : out Gint; 
  591.        Root_Y : out Gint); 
  592.    --  This function returns the position you need to pass to Gtk.Window.Move 
  593.    --  to keep Window in its current position. This means that the meaning of 
  594.    --  the returned value varies with window gravity. See Gtk.Window.Move for 
  595.    --  more details. 
  596.    --  If you haven't changed the window gravity, its gravity will be 
  597.    --  GDK_GRAVITY_NORTH_WEST. This means that Gtk.Window.Get_Position gets the 
  598.    --  position of the top-left corner of the window manager frame for the 
  599.    --  window. Gtk.Window.Move sets the position of this same top-left corner. 
  600.    --  Gtk.Window.Get_Position is not 100% reliable because the X Window 
  601.    --  System does not specify a way to obtain the geometry of the decorations 
  602.    --  placed on a window by the window manager. Thus GTK+ is using a "best 
  603.    --  guess" that works with most window managers. 
  604.    --  Moreover, nearly all window managers are historically broken with 
  605.    --  respect to their handling of window gravity. So moving a window to its 
  606.    --  current position as returned by Gtk.Window.Get_Position tends to result 
  607.    --  in moving the window slightly. Window managers are slowly getting better 
  608.    --  over time. 
  609.    --  If a window has gravity GDK_GRAVITY_STATIC the window manager frame is 
  610.    --  not relevant, and thus Gtk.Window.Get_Position will always produce 
  611.    --  accurate results. However you can't use static gravity to do things like 
  612.    --  place a window in a corner of the screen, because static gravity ignores 
  613.    --  the window manager decorations. 
  614.    --  If you are saving and restoring your application's window positions, 
  615.    --  you should know that it's impossible for applications to do this without 
  616.    --  getting it somewhat wrong because applications do not have sufficient 
  617.    --  knowledge of window manager state. The Correct Mechanism is to support 
  618.    --  the session management protocol (see the "GnomeClient" object in the 
  619.    --  GNOME libraries for example) and allow the window manager to save your 
  620.    --  window sizes and positions. 
  621.    --  "root_x": return location for X coordinate of gravity-determined 
  622.    --  reference point, or null 
  623.    --  "root_y": return location for Y coordinate of gravity-determined 
  624.    --  reference point, or null 
  625.  
  626.    procedure Set_Position 
  627.       (Window   : not null access Gtk_Window_Record; 
  628.        Position : Gtk.Enums.Gtk_Window_Position); 
  629.    --  Sets a position constraint for this window. If the old or new 
  630.    --  constraint is Gtk.Enums.Win_Pos_Center_Always, this will also cause the 
  631.    --  window to be repositioned to satisfy the new constraint. 
  632.    --  "position": a position constraint. 
  633.  
  634.    function Get_Resizable 
  635.       (Window : not null access Gtk_Window_Record) return Boolean; 
  636.    --  Gets the value set by Gtk.Window.Set_Resizable. 
  637.  
  638.    procedure Set_Resizable 
  639.       (Window    : not null access Gtk_Window_Record; 
  640.        Resizable : Boolean); 
  641.    --  Sets whether the user can resize a window. Windows are user resizable 
  642.    --  by default. 
  643.    --  "resizable": True if the user can resize this window 
  644.  
  645.    procedure Get_Resize_Grip_Area 
  646.       (Window    : not null access Gtk_Window_Record; 
  647.        Rect      : out Gdk.Rectangle.Gdk_Rectangle; 
  648.        retrieved : out Boolean); 
  649.    --  If a window has a resize grip, this will retrieve the grip position, 
  650.    --  width and height into the specified Gdk.Rectangle.Gdk_Rectangle. 
  651.    --  Since: gtk+ 3.0 
  652.    --  "rect": a pointer to a Gdk.Rectangle.Gdk_Rectangle which we should 
  653.    --  store the resize grip area 
  654.  
  655.    function Get_Role 
  656.       (Window : not null access Gtk_Window_Record) return UTF8_String; 
  657.    --  Returns the role of the window. See Gtk.Window.Set_Role for further 
  658.    --  explanation. 
  659.  
  660.    procedure Set_Role 
  661.       (Window : not null access Gtk_Window_Record; 
  662.        Role   : UTF8_String); 
  663.    --  This function is only useful on X11, not with other GTK+ targets. 
  664.    --  In combination with the window title, the window role allows a <link 
  665.    --  linkend="gtk-X11-arch">window manager</link> to identify "the same" 
  666.    --  window when an application is restarted. So for example you might set 
  667.    --  the "toolbox" role on your app's toolbox window, so that when the user 
  668.    --  restarts their session, the window manager can put the toolbox back in 
  669.    --  the same place. 
  670.    --  If a window already has a unique title, you don't need to set the role, 
  671.    --  since the WM can use the title to identify the window when restoring the 
  672.    --  session. 
  673.    --  "role": unique identifier for the window to be used when restoring a 
  674.    --  session 
  675.  
  676.    function Get_Screen 
  677.       (Window : not null access Gtk_Window_Record) 
  678.        return Gdk.Screen.Gdk_Screen; 
  679.    --  Returns the Gdk.Screen.Gdk_Screen associated with Window. 
  680.    --  Since: gtk+ 2.2 
  681.  
  682.    procedure Set_Screen 
  683.       (Window : not null access Gtk_Window_Record; 
  684.        Screen : not null access Gdk.Screen.Gdk_Screen_Record'Class); 
  685.    --  Sets the Gdk.Screen.Gdk_Screen where the Window is displayed; if the 
  686.    --  window is already mapped, it will be unmapped, and then remapped on the 
  687.    --  new screen. 
  688.    --  Since: gtk+ 2.2 
  689.    --  "screen": a Gdk.Screen.Gdk_Screen. 
  690.  
  691.    procedure Get_Size 
  692.       (Window : not null access Gtk_Window_Record; 
  693.        Width  : out Gint; 
  694.        Height : out Gint); 
  695.    --  Obtains the current size of Window. If Window is not onscreen, it 
  696.    --  returns the size GTK+ will suggest to the <link 
  697.    --  linkend="gtk-X11-arch">window manager</link> for the initial window size 
  698.    --  (but this is not reliably the same as the size the window manager will 
  699.    --  actually select). The size obtained by Gtk.Window.Get_Size is the last 
  700.    --  size received in a Gdk.Event.Gdk_Event_Configure, that is, GTK+ uses its 
  701.    --  locally-stored size, rather than querying the X server for the size. As 
  702.    --  a result, if you call Gtk.Window.Resize then immediately call 
  703.    --  Gtk.Window.Get_Size, the size won't have taken effect yet. After the 
  704.    --  window manager processes the resize request, GTK+ receives notification 
  705.    --  that the size has changed via a configure event, and the size of the 
  706.    --  window gets updated. 
  707.    --  Note 1: Nearly any use of this function creates a race condition, 
  708.    --  because the size of the window may change between the time that you get 
  709.    --  the size and the time that you perform some action assuming that size is 
  710.    --  the current size. To avoid race conditions, connect to "configure-event" 
  711.    --  on the window and adjust your size-dependent state to match the size 
  712.    --  delivered in the Gdk.Event.Gdk_Event_Configure. 
  713.    --  Note 2: The returned size does *not* include the size of the window 
  714.    --  manager decorations (aka the window frame or border). Those are not 
  715.    --  drawn by GTK+ and GTK+ has no reliable method of determining their size. 
  716.    --  Note 3: If you are getting a window size in order to position the 
  717.    --  window onscreen, there may be a better way. The preferred way is to 
  718.    --  simply set the window's semantic type with Gtk.Window.Set_Type_Hint, 
  719.    --  which allows the window manager to e.g. center dialogs. Also, if you set 
  720.    --  the transient parent of dialogs with Gtk.Window.Set_Transient_For window 
  721.    --  managers will often center the dialog over its parent window. It's much 
  722.    --  preferred to let the window manager handle these things rather than 
  723.    --  doing it yourself, because all apps will behave consistently and 
  724.    --  according to user prefs if the window manager handles it. Also, the 
  725.    --  window manager can take the size of the window decorations/border into 
  726.    --  account, while your application cannot. 
  727.    --  In any case, if you insist on application-specified window positioning, 
  728.    --  there's *still* a better way than doing it yourself - 
  729.    --  Gtk.Window.Set_Position will frequently handle the details for you. 
  730.    --  "width": return location for width, or null 
  731.    --  "height": return location for height, or null 
  732.  
  733.    function Get_Skip_Pager_Hint 
  734.       (Window : not null access Gtk_Window_Record) return Boolean; 
  735.    --  Gets the value set by Gtk.Window.Set_Skip_Pager_Hint. 
  736.    --  Since: gtk+ 2.2 
  737.  
  738.    procedure Set_Skip_Pager_Hint 
  739.       (Window  : not null access Gtk_Window_Record; 
  740.        Setting : Boolean); 
  741.    --  Windows may set a hint asking the desktop environment not to display 
  742.    --  the window in the pager. This function sets this hint. (A "pager" is any 
  743.    --  desktop navigation tool such as a workspace switcher that displays a 
  744.    --  thumbnail representation of the windows on the screen.) 
  745.    --  Since: gtk+ 2.2 
  746.    --  "setting": True to keep this window from appearing in the pager 
  747.  
  748.    function Get_Skip_Taskbar_Hint 
  749.       (Window : not null access Gtk_Window_Record) return Boolean; 
  750.    --  Gets the value set by Gtk.Window.Set_Skip_Taskbar_Hint 
  751.    --  Since: gtk+ 2.2 
  752.  
  753.    procedure Set_Skip_Taskbar_Hint 
  754.       (Window  : not null access Gtk_Window_Record; 
  755.        Setting : Boolean); 
  756.    --  Windows may set a hint asking the desktop environment not to display 
  757.    --  the window in the task bar. This function sets this hint. 
  758.    --  Since: gtk+ 2.2 
  759.    --  "setting": True to keep this window from appearing in the task bar 
  760.  
  761.    function Get_Title 
  762.       (Window : not null access Gtk_Window_Record) return UTF8_String; 
  763.    --  Retrieves the title of the window. See Gtk.Window.Set_Title. 
  764.  
  765.    procedure Set_Title 
  766.       (Window : not null access Gtk_Window_Record; 
  767.        Title  : UTF8_String); 
  768.    --  Sets the title of the Gtk.Window.Gtk_Window. The title of a window will 
  769.    --  be displayed in its title bar; on the X Window System, the title bar is 
  770.    --  rendered by the <link linkend="gtk-X11-arch">window manager</link>, so 
  771.    --  exactly how the title appears to users may vary according to a user's 
  772.    --  exact configuration. The title should help a user distinguish this 
  773.    --  window from other windows they may have open. A good title might include 
  774.    --  the application name and current document filename, for example. 
  775.    --  "title": title of the window 
  776.  
  777.    function Get_Transient_For 
  778.       (Window : not null access Gtk_Window_Record) return Gtk_Window; 
  779.    --  Fetches the transient parent for this window. See 
  780.    --  Gtk.Window.Set_Transient_For. 
  781.  
  782.    procedure Set_Transient_For 
  783.       (Window : not null access Gtk_Window_Record; 
  784.        Parent : access Gtk_Window_Record'Class); 
  785.    --  Dialog windows should be set transient for the main application window 
  786.    --  they were spawned from. This allows <link linkend="gtk-X11-arch">window 
  787.    --  managers</link> to e.g. keep the dialog on top of the main window, or 
  788.    --  center the dialog over the main window. gtk_dialog_new_with_buttons and 
  789.    --  other convenience functions in GTK+ will sometimes call 
  790.    --  Gtk.Window.Set_Transient_For on your behalf. 
  791.    --  Passing null for Parent unsets the current transient window. 
  792.    --  On Windows, this function puts the child window on top of the parent, 
  793.    --  much as the window manager would have done on X. 
  794.    --  "parent": parent window, or null 
  795.  
  796.    function Get_Type_Hint 
  797.       (Window : not null access Gtk_Window_Record) 
  798.        return Gdk.Window.Gdk_Window_Type_Hint; 
  799.    --  Gets the type hint for this window. See Gtk.Window.Set_Type_Hint. 
  800.  
  801.    procedure Set_Type_Hint 
  802.       (Window : not null access Gtk_Window_Record; 
  803.        Hint   : Gdk.Window.Gdk_Window_Type_Hint); 
  804.    --  By setting the type hint for the window, you allow the window manager 
  805.    --  to decorate and handle the window in a way which is suitable to the 
  806.    --  function of the window in your application. 
  807.    --  This function should be called before the window becomes visible. 
  808.    --  gtk_dialog_new_with_buttons and other convenience functions in GTK+ 
  809.    --  will sometimes call Gtk.Window.Set_Type_Hint on your behalf. 
  810.    --  "hint": the window type 
  811.  
  812.    function Get_Urgency_Hint 
  813.       (Window : not null access Gtk_Window_Record) return Boolean; 
  814.    --  Gets the value set by Gtk.Window.Set_Urgency_Hint 
  815.    --  Since: gtk+ 2.8 
  816.  
  817.    procedure Set_Urgency_Hint 
  818.       (Window  : not null access Gtk_Window_Record; 
  819.        Setting : Boolean); 
  820.    --  Windows may set a hint asking the desktop environment to draw the users 
  821.    --  attention to the window. This function sets this hint. 
  822.    --  Since: gtk+ 2.8 
  823.    --  "setting": True to mark this window as urgent 
  824.  
  825.    function Get_Window_Type 
  826.       (Window : not null access Gtk_Window_Record) 
  827.        return Gtk.Enums.Gtk_Window_Type; 
  828.    --  Gets the type of the window. See Gtk.Enums.Gtk_Window_Type. 
  829.    --  Since: gtk+ 2.20 
  830.  
  831.    function Has_Group 
  832.       (Window : not null access Gtk_Window_Record) return Boolean; 
  833.    --  Returns whether Window has an explicit window group. 
  834.  
  835.    function Has_Toplevel_Focus 
  836.       (Window : not null access Gtk_Window_Record) return Boolean; 
  837.    --  Returns whether the input focus is within this GtkWindow. For real 
  838.    --  toplevel windows, this is identical to Gtk.Window.Is_Active, but for 
  839.    --  embedded windows, like Gtk_Plug, the results will differ. 
  840.    --  Since: gtk+ 2.4 
  841.  
  842.    procedure Iconify (Window : not null access Gtk_Window_Record); 
  843.    --  Asks to iconify (i.e. minimize) the specified Window. Note that you 
  844.    --  shouldn't assume the window is definitely iconified afterward, because 
  845.    --  other entities (e.g. the user or <link linkend="gtk-X11-arch">window 
  846.    --  manager</link>) could deiconify it again, or there may not be a window 
  847.    --  manager in which case iconification isn't possible, etc. But normally 
  848.    --  the window will end up iconified. Just don't write code that crashes if 
  849.    --  not. 
  850.    --  It's permitted to call this function before showing a window, in which 
  851.    --  case the window will be iconified before it ever appears onscreen. 
  852.    --  You can track iconification via the "window-state-event" signal on 
  853.    --  Gtk.Widget.Gtk_Widget. 
  854.  
  855.    function Is_Active 
  856.       (Window : not null access Gtk_Window_Record) return Boolean; 
  857.    --  Returns whether the window is part of the current active toplevel. 
  858.    --  (That is, the toplevel window receiving keystrokes.) The return value is 
  859.    --  True if the window is active toplevel itself, but also if it is, say, a 
  860.    --  Gtk_Plug embedded in the active toplevel. You might use this function if 
  861.    --  you wanted to draw a widget differently in an active window from a 
  862.    --  widget in an inactive window. See Gtk.Window.Has_Toplevel_Focus 
  863.    --  Since: gtk+ 2.4 
  864.  
  865.    procedure Maximize (Window : not null access Gtk_Window_Record); 
  866.    --  Asks to maximize Window, so that it becomes full-screen. Note that you 
  867.    --  shouldn't assume the window is definitely maximized afterward, because 
  868.    --  other entities (e.g. the user or <link linkend="gtk-X11-arch">window 
  869.    --  manager</link>) could unmaximize it again, and not all window managers 
  870.    --  support maximization. But normally the window will end up maximized. 
  871.    --  Just don't write code that crashes if not. 
  872.    --  It's permitted to call this function before showing a window, in which 
  873.    --  case the window will be maximized when it appears onscreen initially. 
  874.    --  You can track maximization via the "window-state-event" signal on 
  875.    --  Gtk.Widget.Gtk_Widget. 
  876.  
  877.    function Mnemonic_Activate 
  878.       (Window   : not null access Gtk_Window_Record; 
  879.        Keyval   : Gdk.Types.Gdk_Key_Type; 
  880.        Modifier : Gdk.Types.Gdk_Modifier_Type) return Boolean; 
  881.    --  Activates the targets associated with the mnemonic. 
  882.    --  "keyval": the mnemonic 
  883.    --  "modifier": the modifiers 
  884.  
  885.    procedure Move 
  886.       (Window : not null access Gtk_Window_Record; 
  887.        X      : Gint; 
  888.        Y      : Gint); 
  889.    --  Asks the <link linkend="gtk-X11-arch">window manager</link> to move 
  890.    --  Window to the given position. Window managers are free to ignore this; 
  891.    --  most window managers ignore requests for initial window positions 
  892.    --  (instead using a user-defined placement algorithm) and honor requests 
  893.    --  after the window has already been shown. 
  894.    --  Note: the position is the position of the gravity-determined reference 
  895.    --  point for the window. The gravity determines two things: first, the 
  896.    --  location of the reference point in root window coordinates; and second, 
  897.    --  which point on the window is positioned at the reference point. 
  898.    --  By default the gravity is GDK_GRAVITY_NORTH_WEST, so the reference 
  899.    --  point is simply the X, Y supplied to Gtk.Window.Move. The top-left 
  900.    --  corner of the window decorations (aka window frame or border) will be 
  901.    --  placed at X, Y. Therefore, to position a window at the top left of the 
  902.    --  screen, you want to use the default gravity (which is 
  903.    --  GDK_GRAVITY_NORTH_WEST) and move the window to 0,0. 
  904.    --  To position a window at the bottom right corner of the screen, you 
  905.    --  would set GDK_GRAVITY_SOUTH_EAST, which means that the reference point 
  906.    --  is at X + the window width and Y + the window height, and the 
  907.    --  bottom-right corner of the window border will be placed at that 
  908.    --  reference point. So, to place a window in the bottom right corner you 
  909.    --  would first set gravity to south east, then write: 'gtk_window_move 
  910.    --  (window, gdk_screen_width () - window_width, gdk_screen_height () - 
  911.    --  window_height)' (note that this example does not take multi-head 
  912.    --  scenarios into account). 
  913.    --  The Extended Window Manager Hints specification at <ulink 
  914.    --  url="http://www.freedesktop.org/Standards/wm-spec"> 
  915.    --  http://www.freedesktop.org/Standards/wm-spec</ulink> has a nice table of 
  916.    --  gravities in the "implementation notes" section. 
  917.    --  The Gtk.Window.Get_Position documentation may also be relevant. 
  918.    --  "x": X coordinate to move window to 
  919.    --  "y": Y coordinate to move window to 
  920.  
  921.    function Parse_Geometry 
  922.       (Window   : not null access Gtk_Window_Record; 
  923.        Geometry : UTF8_String) return Boolean; 
  924.    --  Parses a standard X Window System geometry string - see the manual page 
  925.    --  for X (type 'man X') for details on this. Gtk.Window.Parse_Geometry does 
  926.    --  work on all GTK+ ports including Win32 but is primarily intended for an 
  927.    --  X environment. 
  928.    --  If either a size or a position can be extracted from the geometry 
  929.    --  string, Gtk.Window.Parse_Geometry returns True and calls 
  930.    --  Gtk.Window.Set_Default_Size and/or Gtk.Window.Move to resize/move the 
  931.    --  window. 
  932.    --  If Gtk.Window.Parse_Geometry returns True, it will also set the 
  933.    --  GDK_HINT_USER_POS and/or GDK_HINT_USER_SIZE hints indicating to the 
  934.    --  window manager that the size/position of the window was user-specified. 
  935.    --  This causes most window managers to honor the geometry. 
  936.    --  Note that for Gtk.Window.Parse_Geometry to work as expected, it has to 
  937.    --  be called when the window has its "final" size, i.e. after calling 
  938.    --  Gtk.Widget.Show_All on the contents and Gtk.Window.Set_Geometry_Hints on 
  939.    --  the window. |[ include <gtk/gtk.h> static void fill_with_content 
  940.    --  (GtkWidget *vbox) { /* fill with content... */ } int main (int argc, 
  941.    --  char *argv[]) { GtkWidget *window, *vbox; GdkGeometry size_hints = { 
  942.    --  100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST }; 
  943.    --  gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
  944.    --  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0); 
  945.    --  gtk_container_add (GTK_CONTAINER (window), vbox); fill_with_content 
  946.    --  (vbox); gtk_widget_show_all (vbox); gtk_window_set_geometry_hints 
  947.    --  (GTK_WINDOW (window), window, &size_hints, GDK_HINT_MIN_SIZE | 
  948.    --  GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC); if (argc > 1) { if 
  949.    --  (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1])) fprintf 
  950.    --  (stderr, "Failed to parse '%s'\n", argv[1]); } gtk_widget_show_all 
  951.    --  (window); gtk_main (); return 0; } ]| 
  952.    --  "geometry": geometry string 
  953.  
  954.    procedure Present (Window : not null access Gtk_Window_Record); 
  955.    --  Presents a window to the user. This may mean raising the window in the 
  956.    --  stacking order, deiconifying it, moving it to the current desktop, 
  957.    --  and/or giving it the keyboard focus, possibly dependent on the user's 
  958.    --  platform, window manager, and preferences. 
  959.    --  If Window is hidden, this function calls Gtk.Widget.Show as well. 
  960.    --  This function should be used when the user tries to open a window 
  961.    --  that's already open. Say for example the preferences dialog is currently 
  962.    --  open, and the user chooses Preferences from the menu a second time; use 
  963.    --  Gtk.Window.Present to move the already-open dialog where the user can 
  964.    --  see it. 
  965.    --  If you are calling this function in response to a user interaction, it 
  966.    --  is preferable to use Gtk.Window.Present_With_Time. 
  967.  
  968.    procedure Present_With_Time 
  969.       (Window    : not null access Gtk_Window_Record; 
  970.        Timestamp : Guint32); 
  971.    --  Presents a window to the user in response to a user interaction. If you 
  972.    --  need to present a window without a timestamp, use Gtk.Window.Present. 
  973.    --  See Gtk.Window.Present for details. 
  974.    --  Since: gtk+ 2.8 
  975.    --  "timestamp": the timestamp of the user interaction (typically a button 
  976.    --  or key press event) which triggered this call 
  977.  
  978.    function Propagate_Key_Event 
  979.       (Window : not null access Gtk_Window_Record; 
  980.        Event  : Gdk.Event.Gdk_Event_Key) return Boolean; 
  981.    --  Propagate a key press or release event to the focus widget and up the 
  982.    --  focus container chain until a widget handles Event. This is normally 
  983.    --  called by the default ::key_press_event and ::key_release_event handlers 
  984.    --  for toplevel windows, however in some cases it may be useful to call 
  985.    --  this directly when overriding the standard key handling for a toplevel 
  986.    --  window. 
  987.    --  Since: gtk+ 2.4 
  988.    --  "event": a Gdk.Event.Gdk_Event_Key 
  989.  
  990.    procedure Remove_Accel_Group 
  991.       (Window      : not null access Gtk_Window_Record; 
  992.        Accel_Group : not null access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class); 
  993.    --  Reverses the effects of Gtk.Window.Add_Accel_Group. 
  994.    --  "accel_group": a Gtk.Accel_Group.Gtk_Accel_Group 
  995.  
  996.    procedure Remove_Mnemonic 
  997.       (Window : not null access Gtk_Window_Record; 
  998.        Keyval : Gdk.Types.Gdk_Key_Type; 
  999.        Target : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  1000.    --  Removes a mnemonic from this window. 
  1001.    --  "keyval": the mnemonic 
  1002.    --  "target": the widget that gets activated by the mnemonic 
  1003.  
  1004.    procedure Reshow_With_Initial_Size 
  1005.       (Window : not null access Gtk_Window_Record); 
  1006.    --  Hides Window, then reshows it, resetting the default size and position 
  1007.    --  of the window. Used by GUI builders only. 
  1008.  
  1009.    procedure Resize 
  1010.       (Window : not null access Gtk_Window_Record; 
  1011.        Width  : Gint; 
  1012.        Height : Gint); 
  1013.    --  Resizes the window as if the user had done so, obeying geometry 
  1014.    --  constraints. The default geometry constraint is that windows may not be 
  1015.    --  smaller than their size request; to override this constraint, call 
  1016.    --  Gtk.Widget.Set_Size_Request to set the window's request to a smaller 
  1017.    --  value. 
  1018.    --  If Gtk.Window.Resize is called before showing a window for the first 
  1019.    --  time, it overrides any default size set with 
  1020.    --  Gtk.Window.Set_Default_Size. 
  1021.    --  Windows may not be resized smaller than 1 by 1 pixels. 
  1022.    --  "width": width in pixels to resize the window to 
  1023.    --  "height": height in pixels to resize the window to 
  1024.  
  1025.    function Resize_Grip_Is_Visible 
  1026.       (Window : not null access Gtk_Window_Record) return Boolean; 
  1027.    --  Determines whether a resize grip is visible for the specified window. 
  1028.    --  Since: gtk+ 3.0 
  1029.  
  1030.    procedure Resize_To_Geometry 
  1031.       (Window : not null access Gtk_Window_Record; 
  1032.        Width  : Gint; 
  1033.        Height : Gint); 
  1034.    --  Like Gtk.Window.Resize, but Width and Height are interpreted in terms 
  1035.    --  of the base size and increment set with gtk_window_set_geometry_hints. 
  1036.    --  Since: gtk+ 3.0 
  1037.    --  "width": width in resize increments to resize the window to 
  1038.    --  "height": height in resize increments to resize the window to 
  1039.  
  1040.    procedure Set_Default 
  1041.       (Window         : not null access Gtk_Window_Record; 
  1042.        Default_Widget : access Gtk.Widget.Gtk_Widget_Record'Class); 
  1043.    --  The default widget is the widget that's activated when the user presses 
  1044.    --  Enter in a dialog (for example). This function sets or unsets the 
  1045.    --  default widget for a Gtk.Window.Gtk_Window about. When setting (rather 
  1046.    --  than unsetting) the default widget it's generally easier to call 
  1047.    --  Gtk.Widget.Grab_Focus on the widget. Before making a widget the default 
  1048.    --  widget, you must call Gtk.Widget.Set_Can_Default on the widget you'd 
  1049.    --  like to make the default. 
  1050.    --  "default_widget": widget to be the default, or null to unset the 
  1051.    --  default widget for the toplevel. 
  1052.  
  1053.    procedure Set_Default_Geometry 
  1054.       (Window : not null access Gtk_Window_Record; 
  1055.        Width  : Gint; 
  1056.        Height : Gint); 
  1057.    --  Like Gtk.Window.Set_Default_Size, but Width and Height are interpreted 
  1058.    --  in terms of the base size and increment set with 
  1059.    --  gtk_window_set_geometry_hints. 
  1060.    --  Since: gtk+ 3.0 
  1061.    --  "width": width in resize increments, or -1 to unset the default width 
  1062.    --  "height": height in resize increments, or -1 to unset the default 
  1063.    --  height 
  1064.  
  1065.    procedure Set_Geometry_Hints 
  1066.       (Window          : not null access Gtk_Window_Record; 
  1067.        Geometry_Widget : access Gtk.Widget.Gtk_Widget_Record'Class; 
  1068.        Geometry        : Gdk.Window.Gdk_Geometry; 
  1069.        Geom_Mask       : Gdk.Window.Gdk_Window_Hints); 
  1070.    --  This function sets up hints about how a window can be resized by the 
  1071.    --  user. You can set a minimum and maximum size; allowed resize increments 
  1072.    --  (e.g. for xterm, you can only resize by the size of a character); aspect 
  1073.    --  ratios; and more. See the Gdk.Window.Gdk_Geometry struct. 
  1074.    --  "geometry_widget": widget the geometry hints will be applied to or null 
  1075.    --  "geometry": struct containing geometry information or null 
  1076.    --  "geom_mask": mask indicating which struct fields should be paid 
  1077.    --  attention to 
  1078.  
  1079.    procedure Set_Has_User_Ref_Count 
  1080.       (Window  : not null access Gtk_Window_Record; 
  1081.        Setting : Boolean); 
  1082.    --  Tells GTK+ whether to drop its extra reference to the window when 
  1083.    --  Gtk.Widget.Destroy is called. 
  1084.    --  This function is only exported for the benefit of language bindings 
  1085.    --  which may need to keep the window alive until their wrapper object is 
  1086.    --  garbage collected. There is no justification for ever calling this 
  1087.    --  function in an application. 
  1088.    --  Since: gtk+ 3.0 
  1089.    --  "setting": the new value 
  1090.  
  1091.    function Set_Icon_From_File 
  1092.       (Window   : not null access Gtk_Window_Record; 
  1093.        Filename : UTF8_String) return Boolean; 
  1094.    --  Sets the icon for Window. Warns on failure if Err is null. 
  1095.    --  This function is equivalent to calling Gtk.Window.Set_Icon with a 
  1096.    --  pixbuf created by loading the image from Filename. 
  1097.    --  Since: gtk+ 2.2 
  1098.    --  "filename": location of icon file 
  1099.  
  1100.    procedure Set_Keep_Above 
  1101.       (Window  : not null access Gtk_Window_Record; 
  1102.        Setting : Boolean); 
  1103.    --  Asks to keep Window above, so that it stays on top. Note that you 
  1104.    --  shouldn't assume the window is definitely above afterward, because other 
  1105.    --  entities (e.g. the user or <link linkend="gtk-X11-arch">window 
  1106.    --  manager</link>) could not keep it above, and not all window managers 
  1107.    --  support keeping windows above. But normally the window will end kept 
  1108.    --  above. Just don't write code that crashes if not. 
  1109.    --  It's permitted to call this function before showing a window, in which 
  1110.    --  case the window will be kept above when it appears onscreen initially. 
  1111.    --  You can track the above state via the "window-state-event" signal on 
  1112.    --  Gtk.Widget.Gtk_Widget. 
  1113.    --  Note that, according to the <ulink 
  1114.    --  url="http://www.freedesktop.org/Standards/wm-spec">Extended Window 
  1115.    --  Manager Hints</ulink> specification, the above state is mainly meant for 
  1116.    --  user preferences and should not be used by applications e.g. for drawing 
  1117.    --  attention to their dialogs. 
  1118.    --  Since: gtk+ 2.4 
  1119.    --  "setting": whether to keep Window above other windows 
  1120.  
  1121.    procedure Set_Keep_Below 
  1122.       (Window  : not null access Gtk_Window_Record; 
  1123.        Setting : Boolean); 
  1124.    --  Asks to keep Window below, so that it stays in bottom. Note that you 
  1125.    --  shouldn't assume the window is definitely below afterward, because other 
  1126.    --  entities (e.g. the user or <link linkend="gtk-X11-arch">window 
  1127.    --  manager</link>) could not keep it below, and not all window managers 
  1128.    --  support putting windows below. But normally the window will be kept 
  1129.    --  below. Just don't write code that crashes if not. 
  1130.    --  It's permitted to call this function before showing a window, in which 
  1131.    --  case the window will be kept below when it appears onscreen initially. 
  1132.    --  You can track the below state via the "window-state-event" signal on 
  1133.    --  Gtk.Widget.Gtk_Widget. 
  1134.    --  Note that, according to the <ulink 
  1135.    --  url="http://www.freedesktop.org/Standards/wm-spec">Extended Window 
  1136.    --  Manager Hints</ulink> specification, the above state is mainly meant for 
  1137.    --  user preferences and should not be used by applications e.g. for drawing 
  1138.    --  attention to their dialogs. 
  1139.    --  Since: gtk+ 2.4 
  1140.    --  "setting": whether to keep Window below other windows 
  1141.  
  1142.    procedure Set_Startup_Id 
  1143.       (Window     : not null access Gtk_Window_Record; 
  1144.        Startup_Id : UTF8_String); 
  1145.    --  Startup notification identifiers are used by desktop environment to 
  1146.    --  track application startup, to provide user feedback and other features. 
  1147.    --  This function changes the corresponding property on the underlying 
  1148.    --  GdkWindow. Normally, startup identifier is managed automatically and you 
  1149.    --  should only use this function in special cases like transferring focus 
  1150.    --  from other processes. You should use this function before calling 
  1151.    --  Gtk.Window.Present or any equivalent function generating a window map 
  1152.    --  event. 
  1153.    --  This function is only useful on X11, not with other GTK+ targets. 
  1154.    --  Since: gtk+ 2.12 
  1155.    --  "startup_id": a string with startup-notification identifier 
  1156.  
  1157.    procedure Set_Wmclass 
  1158.       (Window        : not null access Gtk_Window_Record; 
  1159.        Wmclass_Name  : UTF8_String; 
  1160.        Wmclass_Class : UTF8_String); 
  1161.    --  Don't use this function. It sets the X Window System "class" and "name" 
  1162.    --  hints for a window. According to the ICCCM, you should always set these 
  1163.    --  to the same value for all windows in an application, and GTK+ sets them 
  1164.    --  to that value by default, so calling this function is sort of pointless. 
  1165.    --  However, you may want to call Gtk.Window.Set_Role on each window in your 
  1166.    --  application, for the benefit of the session manager. Setting the role 
  1167.    --  allows the window manager to restore window positions when loading a 
  1168.    --  saved session. 
  1169.    --  "wmclass_name": window name hint 
  1170.    --  "wmclass_class": window class hint 
  1171.  
  1172.    procedure Stick (Window : not null access Gtk_Window_Record); 
  1173.    --  Asks to stick Window, which means that it will appear on all user 
  1174.    --  desktops. Note that you shouldn't assume the window is definitely stuck 
  1175.    --  afterward, because other entities (e.g. the user or <link 
  1176.    --  linkend="gtk-X11-arch">window manager</link>) could unstick it again, 
  1177.    --  and some window managers do not support sticking windows. But normally 
  1178.    --  the window will end up stuck. Just don't write code that crashes if not. 
  1179.    --  It's permitted to call this function before showing a window. 
  1180.    --  You can track stickiness via the "window-state-event" signal on 
  1181.    --  Gtk.Widget.Gtk_Widget. 
  1182.  
  1183.    procedure Unfullscreen (Window : not null access Gtk_Window_Record); 
  1184.    --  Asks to toggle off the fullscreen state for Window. Note that you 
  1185.    --  shouldn't assume the window is definitely not full screen afterward, 
  1186.    --  because other entities (e.g. the user or <link 
  1187.    --  linkend="gtk-X11-arch">window manager</link>) could fullscreen it again, 
  1188.    --  and not all window managers honor requests to unfullscreen windows. But 
  1189.    --  normally the window will end up restored to its normal state. Just don't 
  1190.    --  write code that crashes if not. 
  1191.    --  You can track the fullscreen state via the "window-state-event" signal 
  1192.    --  on Gtk.Widget.Gtk_Widget. 
  1193.    --  Since: gtk+ 2.2 
  1194.  
  1195.    procedure Unmaximize (Window : not null access Gtk_Window_Record); 
  1196.    --  Asks to unmaximize Window. Note that you shouldn't assume the window is 
  1197.    --  definitely unmaximized afterward, because other entities (e.g. the user 
  1198.    --  or <link linkend="gtk-X11-arch">window manager</link>) could maximize it 
  1199.    --  again, and not all window managers honor requests to unmaximize. But 
  1200.    --  normally the window will end up unmaximized. Just don't write code that 
  1201.    --  crashes if not. 
  1202.    --  You can track maximization via the "window-state-event" signal on 
  1203.    --  Gtk.Widget.Gtk_Widget. 
  1204.  
  1205.    procedure Unstick (Window : not null access Gtk_Window_Record); 
  1206.    --  Asks to unstick Window, which means that it will appear on only one of 
  1207.    --  the user's desktops. Note that you shouldn't assume the window is 
  1208.    --  definitely unstuck afterward, because other entities (e.g. the user or 
  1209.    --  <link linkend="gtk-X11-arch">window manager</link>) could stick it 
  1210.    --  again. But normally the window will end up stuck. Just don't write code 
  1211.    --  that crashes if not. 
  1212.    --  You can track stickiness via the "window-state-event" signal on 
  1213.    --  Gtk.Widget.Gtk_Widget. 
  1214.  
  1215.    procedure Add_Window 
  1216.       (Window_Group : not null access Gtk_Window_Group_Record; 
  1217.        Window       : not null access Gtk_Window_Record'Class); 
  1218.    --  Adds a window to a Gtk.Window.Gtk_Window_Group. 
  1219.    --  "window": the Gtk.Window.Gtk_Window to add 
  1220.  
  1221.    function Get_Current_Device_Grab 
  1222.       (Window_Group : not null access Gtk_Window_Group_Record; 
  1223.        Device       : not null access Gdk.Device.Gdk_Device_Record'Class) 
  1224.        return Gtk.Widget.Gtk_Widget; 
  1225.    --  Returns the current grab widget for Device, or null if none. 
  1226.    --  Since: gtk+ 3.0 
  1227.    --  "device": a Gdk.Device.Gdk_Device 
  1228.  
  1229.    function Get_Current_Grab 
  1230.       (Window_Group : not null access Gtk_Window_Group_Record) 
  1231.        return Gtk.Widget.Gtk_Widget; 
  1232.    --  Gets the current grab widget of the given group, see 
  1233.    --  Gtk.Widget.Grab_Add. 
  1234.    --  Since: gtk+ 2.22 
  1235.  
  1236.    function List_Windows 
  1237.       (Window_Group : not null access Gtk_Window_Group_Record) 
  1238.        return Gtk.Widget.Widget_List.Glist; 
  1239.    --  Returns a list of the Gtk_Windows that belong to Window_Group. 
  1240.    --  Since: gtk+ 2.14 
  1241.  
  1242.    procedure Remove_Window 
  1243.       (Window_Group : not null access Gtk_Window_Group_Record; 
  1244.        Window       : not null access Gtk_Window_Record'Class); 
  1245.    --  Removes a window from a Gtk.Window.Gtk_Window_Group. 
  1246.    --  "window": the Gtk.Window.Gtk_Window to remove 
  1247.  
  1248.    --------------- 
  1249.    -- Functions -- 
  1250.    --------------- 
  1251.  
  1252.    function Get_Default_Icon_List return Glib.Object.Object_Simple_List.Glist; 
  1253.    --  Gets the value set by Gtk.Window.Set_Default_Icon_List. The list is a 
  1254.    --  copy and should be freed with g_list_free, but the pixbufs in the list 
  1255.    --  have not had their reference count incremented. 
  1256.  
  1257.    procedure Set_Default_Icon_List 
  1258.       (List : Glib.Object.Object_Simple_List.Glist); 
  1259.    --  Sets an icon list to be used as fallback for windows that haven't had 
  1260.    --  Gtk.Window.Set_Icon_List called on them to set up a window-specific icon 
  1261.    --  list. This function allows you to set up the icon for all windows in 
  1262.    --  your app at once. 
  1263.    --  See Gtk.Window.Set_Icon_List for more details. 
  1264.    --  "list": a list of Gdk.Pixbuf.Gdk_Pixbuf 
  1265.  
  1266.    function Get_Default_Icon_Name return UTF8_String; 
  1267.    --  Returns the fallback icon name for windows that has been set with 
  1268.    --  Gtk.Window.Set_Default_Icon_Name. The returned string is owned by GTK+ 
  1269.    --  and should not be modified. It is only valid until the next call to 
  1270.    --  Gtk.Window.Set_Default_Icon_Name. 
  1271.    --  Since: gtk+ 2.16 
  1272.  
  1273.    procedure Set_Default_Icon_Name (Name : UTF8_String); 
  1274.    --  Sets an icon to be used as fallback for windows that haven't had 
  1275.    --  Gtk.Window.Set_Icon_List called on them from a named themed icon, see 
  1276.    --  Gtk.Window.Set_Icon_Name. 
  1277.    --  Since: gtk+ 2.6 
  1278.    --  "name": the name of the themed icon 
  1279.  
  1280.    function List_Toplevels return Gtk.Widget.Widget_List.Glist; 
  1281.    --  Returns a list of all existing toplevel windows. The widgets in the 
  1282.    --  list are not individually referenced. If you want to iterate through the 
  1283.    --  list and perform actions involving callbacks that might destroy the 
  1284.    --  widgets, you *must* call 'g_list_foreach (result, (GFunc)g_object_ref, 
  1285.    --  NULL)' first, and then unref all the widgets afterwards. 
  1286.  
  1287.    procedure Set_Auto_Startup_Notification (Setting : Boolean); 
  1288.    --  By default, after showing the first Gtk.Window.Gtk_Window, GTK+ calls 
  1289.    --  gdk_notify_startup_complete. Call this function to disable the automatic 
  1290.    --  startup notification. You might do this if your first window is a splash 
  1291.    --  screen, and you want to delay notification until after your real main 
  1292.    --  window has been shown, for example. 
  1293.    --  In that example, you would disable startup notification temporarily, 
  1294.    --  show your splash screen, then re-enable it so that showing the main 
  1295.    --  window would automatically result in notification. 
  1296.    --  Since: gtk+ 2.2 
  1297.    --  "setting": True to automatically do startup notification 
  1298.  
  1299.    procedure Set_Default_Icon 
  1300.       (Icon : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  1301.    --  Sets an icon to be used as fallback for windows that haven't had 
  1302.    --  Gtk.Window.Set_Icon called on them from a pixbuf. 
  1303.    --  Since: gtk+ 2.4 
  1304.    --  "icon": the icon 
  1305.  
  1306.    function Set_Default_Icon_From_File 
  1307.       (Filename : UTF8_String) return Boolean; 
  1308.    --  Sets an icon to be used as fallback for windows that haven't had 
  1309.    --  Gtk.Window.Set_Icon_List called on them from a file on disk. Warns on 
  1310.    --  failure if Err is null. 
  1311.    --  Since: gtk+ 2.2 
  1312.    --  "filename": location of icon file 
  1313.  
  1314.    ---------------- 
  1315.    -- Properties -- 
  1316.    ---------------- 
  1317.    --  The following properties are defined for this widget. See 
  1318.    --  Glib.Properties for more information on properties) 
  1319.  
  1320.    Accept_Focus_Property : constant Glib.Properties.Property_Boolean; 
  1321.    --  Whether the window should receive the input focus. 
  1322.  
  1323.    Application_Property : constant Glib.Properties.Property_Object; 
  1324.    --  Type: Gtk.Application.Gtk_Application 
  1325.    --  The Gtk.Application.Gtk_Application associated with the window. 
  1326.    -- 
  1327.    --  The application will be kept alive for at least as long as it has any 
  1328.    --  windows associated with it (see Glib.Application.Hold for a way to keep 
  1329.    --  it alive without windows). 
  1330.    -- 
  1331.    --  Normally, the connection between the application and the window will 
  1332.    --  remain until the window is destroyed, but you can explicitly remove it 
  1333.    --  by setting the ::application property to null. 
  1334.  
  1335.    Attached_To_Property : constant Glib.Properties.Property_Object; 
  1336.    --  Type: Gtk.Widget.Gtk_Widget 
  1337.    --  The widget to which this window is attached. See 
  1338.    --  Gtk.Window.Set_Attached_To. 
  1339.    -- 
  1340.    --  Examples of places where specifying this relation is useful are for 
  1341.    --  instance a Gtk.Menu.Gtk_Menu created by a Gtk.Combo_Box.Gtk_Combo_Box, a 
  1342.    --  completion popup window created by Gtk.GEntry.Gtk_Entry or a typeahead 
  1343.    --  search entry created by Gtk.Tree_View.Gtk_Tree_View. 
  1344.  
  1345.    Decorated_Property : constant Glib.Properties.Property_Boolean; 
  1346.    --  Whether the window should be decorated by the window manager. 
  1347.  
  1348.    Default_Height_Property : constant Glib.Properties.Property_Int; 
  1349.  
  1350.    Default_Width_Property : constant Glib.Properties.Property_Int; 
  1351.  
  1352.    Deletable_Property : constant Glib.Properties.Property_Boolean; 
  1353.    --  Whether the window frame should have a close button. 
  1354.  
  1355.    Destroy_With_Parent_Property : constant Glib.Properties.Property_Boolean; 
  1356.  
  1357.    Focus_On_Map_Property : constant Glib.Properties.Property_Boolean; 
  1358.    --  Whether the window should receive the input focus when mapped. 
  1359.  
  1360.    Focus_Visible_Property : constant Glib.Properties.Property_Boolean; 
  1361.    --  Whether 'focus rectangles' are currently visible in this window. 
  1362.    -- 
  1363.    --  This property is maintained by GTK+ based on the 
  1364.    --  Gtk.Settings.Gtk_Settings:gtk-visible-focus setting and user input and 
  1365.    --  should not be set by applications. 
  1366.  
  1367.    Gravity_Property : constant Gdk.Window.Property_Gdk_Gravity; 
  1368.    --  Type: Gdk.Window.Gdk_Gravity 
  1369.    --  The window gravity of the window. See Gtk.Window.Move and 
  1370.    --  Gdk.Window.Gdk_Gravity for more details about window gravity. 
  1371.  
  1372.    Has_Resize_Grip_Property : constant Glib.Properties.Property_Boolean; 
  1373.    --  Whether the window has a corner resize grip. 
  1374.    -- 
  1375.    --  Note that the resize grip is only shown if the window is actually 
  1376.    --  resizable and not maximized. Use 
  1377.    --  Gtk.Window.Gtk_Window:resize-grip-visible to find out if the resize grip 
  1378.    --  is currently shown. 
  1379.  
  1380.    Has_Toplevel_Focus_Property : constant Glib.Properties.Property_Boolean; 
  1381.  
  1382.    Hide_Titlebar_When_Maximized_Property : constant Glib.Properties.Property_Boolean; 
  1383.    --  Whether the titlebar should be hidden during maximization. 
  1384.  
  1385.    Icon_Property : constant Glib.Properties.Property_Object; 
  1386.    --  Type: Gdk.Pixbuf.Gdk_Pixbuf 
  1387.  
  1388.    Icon_Name_Property : constant Glib.Properties.Property_String; 
  1389.    --  The :icon-name property specifies the name of the themed icon to use as 
  1390.    --  the window icon. See Gtk.Icon_Theme.Gtk_Icon_Theme for more details. 
  1391.  
  1392.    Is_Active_Property : constant Glib.Properties.Property_Boolean; 
  1393.  
  1394.    Mnemonics_Visible_Property : constant Glib.Properties.Property_Boolean; 
  1395.    --  Whether mnemonics are currently visible in this window. 
  1396.    -- 
  1397.    --  This property is maintained by GTK+ based on the 
  1398.    --  Gtk.Settings.Gtk_Settings:gtk-auto-mnemonics setting and user input, and 
  1399.    --  should not be set by applications. 
  1400.  
  1401.    Modal_Property : constant Glib.Properties.Property_Boolean; 
  1402.  
  1403.    Resizable_Property : constant Glib.Properties.Property_Boolean; 
  1404.  
  1405.    Resize_Grip_Visible_Property : constant Glib.Properties.Property_Boolean; 
  1406.    --  Whether a corner resize grip is currently shown. 
  1407.  
  1408.    Role_Property : constant Glib.Properties.Property_String; 
  1409.  
  1410.    Screen_Property : constant Glib.Properties.Property_Object; 
  1411.    --  Type: Gdk.Screen.Gdk_Screen 
  1412.  
  1413.    Skip_Pager_Hint_Property : constant Glib.Properties.Property_Boolean; 
  1414.  
  1415.    Skip_Taskbar_Hint_Property : constant Glib.Properties.Property_Boolean; 
  1416.  
  1417.    Startup_Id_Property : constant Glib.Properties.Property_String; 
  1418.    --  Flags: write 
  1419.    --  The :startup-id is a write-only property for setting window's startup 
  1420.    --  notification identifier. See Gtk.Window.Set_Startup_Id for more details. 
  1421.  
  1422.    Title_Property : constant Glib.Properties.Property_String; 
  1423.  
  1424.    Transient_For_Property : constant Glib.Properties.Property_Object; 
  1425.    --  Type: Gtk_Window 
  1426.    --  The transient parent of the window. See Gtk.Window.Set_Transient_For 
  1427.    --  for more details about transient windows. 
  1428.  
  1429.    The_Type_Property : constant Gtk.Enums.Property_Gtk_Window_Type; 
  1430.  
  1431.    Type_Hint_Property : constant Gdk.Window.Property_Gdk_Window_Type_Hint; 
  1432.    --  Type: Gdk.Window.Gdk_Window_Type_Hint 
  1433.  
  1434.    Urgency_Hint_Property : constant Glib.Properties.Property_Boolean; 
  1435.  
  1436.    Window_Position_Property : constant Gtk.Enums.Property_Gtk_Window_Position; 
  1437.  
  1438.    ------------- 
  1439.    -- Signals -- 
  1440.    ------------- 
  1441.  
  1442.    type Cb_Gtk_Window_Void is not null access procedure (Self : access Gtk_Window_Record'Class); 
  1443.  
  1444.    type Cb_GObject_Void is not null access procedure 
  1445.      (Self : access Glib.Object.GObject_Record'Class); 
  1446.  
  1447.    Signal_Activate_Default : constant Glib.Signal_Name := "activate-default"; 
  1448.    procedure On_Activate_Default 
  1449.       (Self  : not null access Gtk_Window_Record; 
  1450.        Call  : Cb_Gtk_Window_Void; 
  1451.        After : Boolean := False); 
  1452.    procedure On_Activate_Default 
  1453.       (Self  : not null access Gtk_Window_Record; 
  1454.        Call  : Cb_GObject_Void; 
  1455.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1456.        After : Boolean := False); 
  1457.    --  The ::activate-default signal is a <link 
  1458.    --  linkend="keybinding-signals">keybinding signal</link> which gets emitted 
  1459.    --  when the user activates the default widget of Window. 
  1460.  
  1461.    Signal_Activate_Focus : constant Glib.Signal_Name := "activate-focus"; 
  1462.    procedure On_Activate_Focus 
  1463.       (Self  : not null access Gtk_Window_Record; 
  1464.        Call  : Cb_Gtk_Window_Void; 
  1465.        After : Boolean := False); 
  1466.    procedure On_Activate_Focus 
  1467.       (Self  : not null access Gtk_Window_Record; 
  1468.        Call  : Cb_GObject_Void; 
  1469.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1470.        After : Boolean := False); 
  1471.    --  The ::activate-focus signal is a <link 
  1472.    --  linkend="keybinding-signals">keybinding signal</link> which gets emitted 
  1473.    --  when the user activates the currently focused widget of Window. 
  1474.  
  1475.    Signal_Keys_Changed : constant Glib.Signal_Name := "keys-changed"; 
  1476.    procedure On_Keys_Changed 
  1477.       (Self  : not null access Gtk_Window_Record; 
  1478.        Call  : Cb_Gtk_Window_Void; 
  1479.        After : Boolean := False); 
  1480.    procedure On_Keys_Changed 
  1481.       (Self  : not null access Gtk_Window_Record; 
  1482.        Call  : Cb_GObject_Void; 
  1483.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1484.        After : Boolean := False); 
  1485.    --  The ::keys-changed signal gets emitted when the set of accelerators or 
  1486.    --  mnemonics that are associated with Window changes. 
  1487.  
  1488.    type Cb_Gtk_Window_Gtk_Widget_Void is not null access procedure 
  1489.      (Self   : access Gtk_Window_Record'Class; 
  1490.       Object : access Gtk.Widget.Gtk_Widget_Record'Class); 
  1491.  
  1492.    type Cb_GObject_Gtk_Widget_Void is not null access procedure 
  1493.      (Self   : access Glib.Object.GObject_Record'Class; 
  1494.       Object : access Gtk.Widget.Gtk_Widget_Record'Class); 
  1495.  
  1496.    Signal_Set_Focus : constant Glib.Signal_Name := "set-focus"; 
  1497.    procedure On_Set_Focus 
  1498.       (Self  : not null access Gtk_Window_Record; 
  1499.        Call  : Cb_Gtk_Window_Gtk_Widget_Void; 
  1500.        After : Boolean := False); 
  1501.    procedure On_Set_Focus 
  1502.       (Self  : not null access Gtk_Window_Record; 
  1503.        Call  : Cb_GObject_Gtk_Widget_Void; 
  1504.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1505.        After : Boolean := False); 
  1506.  
  1507.    ---------------- 
  1508.    -- Interfaces -- 
  1509.    ---------------- 
  1510.    --  This class implements several interfaces. See Glib.Types 
  1511.    -- 
  1512.    --  - "Buildable" 
  1513.  
  1514.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  1515.      (Gtk.Buildable.Gtk_Buildable, Gtk_Window_Record, Gtk_Window); 
  1516.    function "+" 
  1517.      (Widget : access Gtk_Window_Record'Class) 
  1518.    return Gtk.Buildable.Gtk_Buildable 
  1519.    renames Implements_Gtk_Buildable.To_Interface; 
  1520.    function "-" 
  1521.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  1522.    return Gtk_Window 
  1523.    renames Implements_Gtk_Buildable.To_Object; 
  1524.  
  1525. private 
  1526.    Window_Position_Property : constant Gtk.Enums.Property_Gtk_Window_Position := 
  1527.      Gtk.Enums.Build ("window-position"); 
  1528.    Urgency_Hint_Property : constant Glib.Properties.Property_Boolean := 
  1529.      Glib.Properties.Build ("urgency-hint"); 
  1530.    Type_Hint_Property : constant Gdk.Window.Property_Gdk_Window_Type_Hint := 
  1531.      Gdk.Window.Build ("type-hint"); 
  1532.    The_Type_Property : constant Gtk.Enums.Property_Gtk_Window_Type := 
  1533.      Gtk.Enums.Build ("type"); 
  1534.    Transient_For_Property : constant Glib.Properties.Property_Object := 
  1535.      Glib.Properties.Build ("transient-for"); 
  1536.    Title_Property : constant Glib.Properties.Property_String := 
  1537.      Glib.Properties.Build ("title"); 
  1538.    Startup_Id_Property : constant Glib.Properties.Property_String := 
  1539.      Glib.Properties.Build ("startup-id"); 
  1540.    Skip_Taskbar_Hint_Property : constant Glib.Properties.Property_Boolean := 
  1541.      Glib.Properties.Build ("skip-taskbar-hint"); 
  1542.    Skip_Pager_Hint_Property : constant Glib.Properties.Property_Boolean := 
  1543.      Glib.Properties.Build ("skip-pager-hint"); 
  1544.    Screen_Property : constant Glib.Properties.Property_Object := 
  1545.      Glib.Properties.Build ("screen"); 
  1546.    Role_Property : constant Glib.Properties.Property_String := 
  1547.      Glib.Properties.Build ("role"); 
  1548.    Resize_Grip_Visible_Property : constant Glib.Properties.Property_Boolean := 
  1549.      Glib.Properties.Build ("resize-grip-visible"); 
  1550.    Resizable_Property : constant Glib.Properties.Property_Boolean := 
  1551.      Glib.Properties.Build ("resizable"); 
  1552.    Modal_Property : constant Glib.Properties.Property_Boolean := 
  1553.      Glib.Properties.Build ("modal"); 
  1554.    Mnemonics_Visible_Property : constant Glib.Properties.Property_Boolean := 
  1555.      Glib.Properties.Build ("mnemonics-visible"); 
  1556.    Is_Active_Property : constant Glib.Properties.Property_Boolean := 
  1557.      Glib.Properties.Build ("is-active"); 
  1558.    Icon_Name_Property : constant Glib.Properties.Property_String := 
  1559.      Glib.Properties.Build ("icon-name"); 
  1560.    Icon_Property : constant Glib.Properties.Property_Object := 
  1561.      Glib.Properties.Build ("icon"); 
  1562.    Hide_Titlebar_When_Maximized_Property : constant Glib.Properties.Property_Boolean := 
  1563.      Glib.Properties.Build ("hide-titlebar-when-maximized"); 
  1564.    Has_Toplevel_Focus_Property : constant Glib.Properties.Property_Boolean := 
  1565.      Glib.Properties.Build ("has-toplevel-focus"); 
  1566.    Has_Resize_Grip_Property : constant Glib.Properties.Property_Boolean := 
  1567.      Glib.Properties.Build ("has-resize-grip"); 
  1568.    Gravity_Property : constant Gdk.Window.Property_Gdk_Gravity := 
  1569.      Gdk.Window.Build ("gravity"); 
  1570.    Focus_Visible_Property : constant Glib.Properties.Property_Boolean := 
  1571.      Glib.Properties.Build ("focus-visible"); 
  1572.    Focus_On_Map_Property : constant Glib.Properties.Property_Boolean := 
  1573.      Glib.Properties.Build ("focus-on-map"); 
  1574.    Destroy_With_Parent_Property : constant Glib.Properties.Property_Boolean := 
  1575.      Glib.Properties.Build ("destroy-with-parent"); 
  1576.    Deletable_Property : constant Glib.Properties.Property_Boolean := 
  1577.      Glib.Properties.Build ("deletable"); 
  1578.    Default_Width_Property : constant Glib.Properties.Property_Int := 
  1579.      Glib.Properties.Build ("default-width"); 
  1580.    Default_Height_Property : constant Glib.Properties.Property_Int := 
  1581.      Glib.Properties.Build ("default-height"); 
  1582.    Decorated_Property : constant Glib.Properties.Property_Boolean := 
  1583.      Glib.Properties.Build ("decorated"); 
  1584.    Attached_To_Property : constant Glib.Properties.Property_Object := 
  1585.      Glib.Properties.Build ("attached-to"); 
  1586.    Application_Property : constant Glib.Properties.Property_Object := 
  1587.      Glib.Properties.Build ("application"); 
  1588.    Accept_Focus_Property : constant Glib.Properties.Property_Boolean := 
  1589.      Glib.Properties.Build ("accept-focus"); 
  1590. end Gtk.Window;