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. pragma Ada_2005; 
  25.  
  26. pragma Warnings (Off, "*is already use-visible*"); 
  27. with Cairo;                   use Cairo; 
  28. with Cairo.Region;            use Cairo.Region; 
  29. with Gdk;                     use Gdk; 
  30. with Gdk.Color;               use Gdk.Color; 
  31. with Gdk.Device;              use Gdk.Device; 
  32. with Gdk.Display;             use Gdk.Display; 
  33. with Gdk.Event;               use Gdk.Event; 
  34. with Gdk.Frame_Clock;         use Gdk.Frame_Clock; 
  35. with Gdk.RGBA;                use Gdk.RGBA; 
  36. with Gdk.Rectangle;           use Gdk.Rectangle; 
  37. with Gdk.Screen;              use Gdk.Screen; 
  38. with Gdk.Types;               use Gdk.Types; 
  39. with Gdk.Visual;              use Gdk.Visual; 
  40. with Glib;                    use Glib; 
  41. with Glib.Generic_Properties; use Glib.Generic_Properties; 
  42. with Glib.Glist;              use Glib.Glist; 
  43. with Glib.Object;             use Glib.Object; 
  44. with Glib.Properties;         use Glib.Properties; 
  45.  
  46. package Gdk.Window is 
  47.  
  48.    type Gdk_Window_Class is ( 
  49.       Input_Output, 
  50.       Input_Only); 
  51.    pragma Convention (C, Gdk_Window_Class); 
  52.    --  Gdk_Input_Output windows are the standard kind of window you might 
  53.    --  expect. Such windows receive events and are also displayed on screen. 
  54.    --  Gdk_Input_Only windows are invisible; they are usually placed above 
  55.    --  other windows in order to trap or filter the events. You can't draw on 
  56.    --  Gdk_Input_Only windows. 
  57.  
  58.    type Gdk_Window_Edge is ( 
  59.       Window_Edge_North_West, 
  60.       Window_Edge_North, 
  61.       Window_Edge_North_East, 
  62.       Window_Edge_West, 
  63.       Window_Edge_East, 
  64.       Window_Edge_South_West, 
  65.       Window_Edge_South, 
  66.       Window_Edge_South_East); 
  67.    pragma Convention (C, Gdk_Window_Edge); 
  68.    --  Determines a window edge or corner. 
  69.  
  70.    type Gdk_Window_Type is ( 
  71.       Window_Root, 
  72.       Window_Toplevel, 
  73.       Window_Child, 
  74.       Window_Temp, 
  75.       Window_Foreign, 
  76.       Window_Offscreen); 
  77.    pragma Convention (C, Gdk_Window_Type); 
  78.    --  Describes the kind of window. 
  79.  
  80.    type Gdk_Window_Attributes_Type is mod 2 ** Integer'Size; 
  81.    pragma Convention (C, Gdk_Window_Attributes_Type); 
  82.    --  Used to indicate which fields in the Gdk_Window_Attr struct should be 
  83.    --  honored. For example, if you filled in the "cursor" and "x" fields of 
  84.    --  Gdk_Window_Attr, pass "Gdk_Wa_X | Gdk_Wa_Cursor" to gdk_window_new. 
  85.    --  Fields in Gdk_Window_Attr not covered by a bit in this enum are 
  86.    --  required; for example, the Width/Height, Wclass, and Window_Type fields 
  87.    --  are required, they have no corresponding flag in 
  88.    --  Gdk.Window.Gdk_Window_Attributes_Type. 
  89.  
  90.    Wa_Title : constant Gdk_Window_Attributes_Type := 2; 
  91.    Wa_X : constant Gdk_Window_Attributes_Type := 4; 
  92.    Wa_Y : constant Gdk_Window_Attributes_Type := 8; 
  93.    Wa_Cursor : constant Gdk_Window_Attributes_Type := 16; 
  94.    Wa_Visual : constant Gdk_Window_Attributes_Type := 32; 
  95.    Wa_Wmclass : constant Gdk_Window_Attributes_Type := 64; 
  96.    Wa_Noredir : constant Gdk_Window_Attributes_Type := 128; 
  97.    Wa_Type_Hint : constant Gdk_Window_Attributes_Type := 256; 
  98.  
  99.    type Gdk_Window_Hints is mod 2 ** Integer'Size; 
  100.    pragma Convention (C, Gdk_Window_Hints); 
  101.    --  Used to indicate which fields of a Gdk.Window.Gdk_Geometry struct 
  102.    --  should be paid attention to. Also, the presence/absence of Gdk_Hint_Pos, 
  103.    --  Gdk_Hint_User_Pos, and Gdk_Hint_User_Size is significant, though they 
  104.    --  don't directly refer to Gdk.Window.Gdk_Geometry fields. 
  105.    --  Gdk_Hint_User_Pos will be set automatically by Gtk.Window.Gtk_Window if 
  106.    --  you call Gtk.Window.Move. Gdk_Hint_User_Pos and Gdk_Hint_User_Size 
  107.    --  should be set if the user specified a size/position using a --geometry 
  108.    --  command-line argument; Gtk.Window.Parse_Geometry automatically sets 
  109.    --  these flags. 
  110.  
  111.    Hint_Pos : constant Gdk_Window_Hints := 1; 
  112.    Hint_Min_Size : constant Gdk_Window_Hints := 2; 
  113.    Hint_Max_Size : constant Gdk_Window_Hints := 4; 
  114.    Hint_Base_Size : constant Gdk_Window_Hints := 8; 
  115.    Hint_Aspect : constant Gdk_Window_Hints := 16; 
  116.    Hint_Resize_Inc : constant Gdk_Window_Hints := 32; 
  117.    Hint_Win_Gravity : constant Gdk_Window_Hints := 64; 
  118.    Hint_User_Pos : constant Gdk_Window_Hints := 128; 
  119.    Hint_User_Size : constant Gdk_Window_Hints := 256; 
  120.  
  121.    type Gdk_Window_Type_Hint is ( 
  122.       Window_Type_Hint_Normal, 
  123.       Window_Type_Hint_Dialog, 
  124.       Window_Type_Hint_Menu, 
  125.       Window_Type_Hint_Toolbar, 
  126.       Window_Type_Hint_Splashscreen, 
  127.       Window_Type_Hint_Utility, 
  128.       Window_Type_Hint_Dock, 
  129.       Window_Type_Hint_Desktop, 
  130.       Window_Type_Hint_Dropdown_Menu, 
  131.       Window_Type_Hint_Popup_Menu, 
  132.       Window_Type_Hint_Tooltip, 
  133.       Window_Type_Hint_Notification, 
  134.       Window_Type_Hint_Combo, 
  135.       Window_Type_Hint_Dnd); 
  136.    pragma Convention (C, Gdk_Window_Type_Hint); 
  137.    --  These are hints for the window manager that indicate what type of 
  138.    --  function the window has. The window manager can use this when 
  139.    --  determining decoration and behaviour of the window. The hint must be set 
  140.    --  before mapping the window. 
  141.    -- 
  142.    --  See the <ulink 
  143.    --  url="http://www.freedesktop.org/Standards/wm-spec">Extended Window 
  144.    --  Manager Hints</ulink> specification for more details about window types. 
  145.  
  146.    type Gdk_WMDecoration is mod 2 ** Integer'Size; 
  147.    pragma Convention (C, Gdk_WMDecoration); 
  148.    --  These are hints originally defined by the Motif toolkit. The window 
  149.    --  manager can use them when determining how to decorate the window. The 
  150.    --  hint must be set before mapping the window. 
  151.  
  152.    Decor_All : constant Gdk_WMDecoration := 1; 
  153.    Decor_Border : constant Gdk_WMDecoration := 2; 
  154.    Decor_Resizeh : constant Gdk_WMDecoration := 4; 
  155.    Decor_Title : constant Gdk_WMDecoration := 8; 
  156.    Decor_Menu : constant Gdk_WMDecoration := 16; 
  157.    Decor_Minimize : constant Gdk_WMDecoration := 32; 
  158.    Decor_Maximize : constant Gdk_WMDecoration := 64; 
  159.  
  160.    type Gdk_WMFunction is mod 2 ** Integer'Size; 
  161.    pragma Convention (C, Gdk_WMFunction); 
  162.    --  These are hints originally defined by the Motif toolkit. The window 
  163.    --  manager can use them when determining the functions to offer for the 
  164.    --  window. The hint must be set before mapping the window. 
  165.  
  166.    Func_All : constant Gdk_WMFunction := 1; 
  167.    Func_Resize : constant Gdk_WMFunction := 2; 
  168.    Func_Move : constant Gdk_WMFunction := 4; 
  169.    Func_Minimize : constant Gdk_WMFunction := 8; 
  170.    Func_Maximize : constant Gdk_WMFunction := 16; 
  171.    Func_Close : constant Gdk_WMFunction := 32; 
  172.  
  173.    type Gdk_Gravity is ( 
  174.       Gravity_North_West, 
  175.       Gravity_North, 
  176.       Gravity_North_East, 
  177.       Gravity_West, 
  178.       Gravity_Center, 
  179.       Gravity_East, 
  180.       Gravity_South_West, 
  181.       Gravity_South, 
  182.       Gravity_South_East, 
  183.       Gravity_Static); 
  184.    pragma Convention (C, Gdk_Gravity); 
  185.    --  Defines the reference point of a window and the meaning of coordinates 
  186.    --  passed to Gtk.Window.Move. See Gtk.Window.Move and the "implementation 
  187.    --  notes" section of the <ulink 
  188.    --  url="http://www.freedesktop.org/Standards/wm-spec">Extended Window 
  189.    --  Manager Hints</ulink> specification for more details. 
  190.  
  191.    for Gdk_Gravity use ( 
  192.       Gravity_North_West => 1, 
  193.       Gravity_North => 2, 
  194.       Gravity_North_East => 3, 
  195.       Gravity_West => 4, 
  196.       Gravity_Center => 5, 
  197.       Gravity_East => 6, 
  198.       Gravity_South_West => 7, 
  199.       Gravity_South => 8, 
  200.       Gravity_South_East => 9, 
  201.       Gravity_Static => 10); 
  202.  
  203.    type Gdk_Fullscreen_Mode is ( 
  204.       On_Current_Monitor, 
  205.       On_All_Monitors); 
  206.    pragma Convention (C, Gdk_Fullscreen_Mode); 
  207.    --  Indicates which monitor (in a multi-head setup) a window should span 
  208.    --  over when in fullscreen mode. 
  209.  
  210.    type Gdk_Geometry is record 
  211.       Min_Width : Gint; 
  212.       Min_Height : Gint; 
  213.       Max_Width : Gint; 
  214.       Max_Height : Gint; 
  215.       Base_Width : Gint; 
  216.       Base_Height : Gint; 
  217.       Width_Inc : Gint; 
  218.       Height_Inc : Gint; 
  219.       Min_Aspect : Gdouble; 
  220.       Max_Aspect : Gdouble; 
  221.       Win_Gravity : Gdk_Gravity; 
  222.    end record; 
  223.    pragma Convention (C, Gdk_Geometry); 
  224.  
  225.    function From_Object_Free (B : access Gdk_Geometry) return Gdk_Geometry; 
  226.    pragma Inline (From_Object_Free); 
  227.    --  The Gdk.Window.Gdk_Geometry struct gives the window manager information 
  228.    --  about a window's geometry constraints. Normally you would set these on 
  229.    --  the GTK+ level using Gtk.Window.Set_Geometry_Hints. 
  230.    --  Gtk.Window.Gtk_Window then sets the hints on the Gdk.Gdk_Window it 
  231.    --  creates. 
  232.    -- 
  233.    --  Gdk.Window.Set_Geometry_Hints expects the hints to be fully valid 
  234.    --  already and simply passes them to the window manager; in contrast, 
  235.    --  Gtk.Window.Set_Geometry_Hints performs some interpretation. For example, 
  236.    --  Gtk.Window.Gtk_Window will apply the hints to the geometry widget 
  237.    --  instead of the toplevel window, if you set a geometry widget. Also, the 
  238.    --  Min_Width/Min_Height/Max_Width/Max_Height fields may be set to -1, and 
  239.    --  Gtk.Window.Gtk_Window will substitute the size request of the window or 
  240.    --  geometry widget. If the minimum size hint is not provided, 
  241.    --  Gtk.Window.Gtk_Window will use its requisition as the minimum size. If 
  242.    --  the minimum size is provided and a geometry widget is set, 
  243.    --  Gtk.Window.Gtk_Window will take the minimum size as the minimum size of 
  244.    --  the geometry widget rather than the entire window. The base size is 
  245.    --  treated similarly. 
  246.    -- 
  247.    --  The canonical use-case for Gtk.Window.Set_Geometry_Hints is to get a 
  248.    --  terminal widget to resize properly. Here, the terminal text area should 
  249.    --  be the geometry widget; Gtk.Window.Gtk_Window will then automatically 
  250.    --  set the base size to the size of other widgets in the terminal window, 
  251.    --  such as the menubar and scrollbar. Then, the Width_Inc and Height_Inc 
  252.    --  fields should be set to the size of one character in the terminal. 
  253.    --  Finally, the base size should be set to the size of one character. The 
  254.    --  net effect is that the minimum size of the terminal will have a 1x1 
  255.    --  character terminal area, and only terminal sizes on the "character grid" 
  256.    --  will be allowed. 
  257.    -- 
  258.    --  Here's an example of how the terminal example would be implemented, 
  259.    --  assuming a terminal area widget called "terminal" and a toplevel window 
  260.    --  "toplevel": 
  261.    -- 
  262.    --    GdkGeometry hints; 
  263.    --    hints.base_width = terminal->char_width; 
  264.    --    hints.base_height = terminal->char_height; 
  265.    --    hints.min_width = terminal->char_width; 
  266.    --    hints.min_height = terminal->char_height; 
  267.    --    hints.width_inc = terminal->char_width; 
  268.    --    hints.height_inc = terminal->char_height; 
  269.    --    gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), 
  270.    --       GTK_WIDGET (terminal), 
  271.    --       &hints, 
  272.    --       GDK_HINT_RESIZE_INC | 
  273.    --       GDK_HINT_MIN_SIZE | 
  274.    --       GDK_HINT_BASE_SIZE); 
  275.    -- 
  276.    --  The other useful fields are the Min_Aspect and Max_Aspect fields; these 
  277.    --  contain a width/height ratio as a floating point number. If a geometry 
  278.    --  widget is set, the aspect applies to the geometry widget rather than the 
  279.    --  entire window. The most common use of these hints is probably to set 
  280.    --  Min_Aspect and Max_Aspect to the same value, thus forcing the window to 
  281.    --  keep a constant aspect ratio. 
  282.  
  283.    function Convert (R : Gdk.Gdk_Window) return System.Address; 
  284.    function Convert (R : System.Address) return Gdk.Gdk_Window; 
  285.    package Gdk_Window_List is new Generic_List (Gdk.Gdk_Window); 
  286.  
  287.    --------------- 
  288.    -- Callbacks -- 
  289.    --------------- 
  290.  
  291.    type Gdk_Window_Child_Func is access function (Window : Gdk.Gdk_Window) return Boolean; 
  292.    --  A function of this type is passed to 
  293.    --  Gdk.Window.Invalidate_Maybe_Recurse. It gets called for each child of 
  294.    --  the window to determine whether to recursively invalidate it or now. 
  295.    --  "window": a Gdk.Gdk_Window 
  296.  
  297.    ---------------------------- 
  298.    -- Enumeration Properties -- 
  299.    ---------------------------- 
  300.  
  301.    package Gdk_Window_Class_Properties is 
  302.       new Generic_Internal_Discrete_Property (Gdk_Window_Class); 
  303.    type Property_Gdk_Window_Class is new Gdk_Window_Class_Properties.Property; 
  304.  
  305.    package Gdk_Window_Edge_Properties is 
  306.       new Generic_Internal_Discrete_Property (Gdk_Window_Edge); 
  307.    type Property_Gdk_Window_Edge is new Gdk_Window_Edge_Properties.Property; 
  308.  
  309.    package Gdk_Window_Type_Properties is 
  310.       new Generic_Internal_Discrete_Property (Gdk_Window_Type); 
  311.    type Property_Gdk_Window_Type is new Gdk_Window_Type_Properties.Property; 
  312.  
  313.    package Gdk_Window_Attributes_Type_Properties is 
  314.       new Generic_Internal_Discrete_Property (Gdk_Window_Attributes_Type); 
  315.    type Property_Gdk_Window_Attributes_Type is new Gdk_Window_Attributes_Type_Properties.Property; 
  316.  
  317.    package Gdk_Window_Hints_Properties is 
  318.       new Generic_Internal_Discrete_Property (Gdk_Window_Hints); 
  319.    type Property_Gdk_Window_Hints is new Gdk_Window_Hints_Properties.Property; 
  320.  
  321.    package Gdk_Window_Type_Hint_Properties is 
  322.       new Generic_Internal_Discrete_Property (Gdk_Window_Type_Hint); 
  323.    type Property_Gdk_Window_Type_Hint is new Gdk_Window_Type_Hint_Properties.Property; 
  324.  
  325.    package Gdk_WMDecoration_Properties is 
  326.       new Generic_Internal_Discrete_Property (Gdk_WMDecoration); 
  327.    type Property_Gdk_WMDecoration is new Gdk_WMDecoration_Properties.Property; 
  328.  
  329.    package Gdk_WMFunction_Properties is 
  330.       new Generic_Internal_Discrete_Property (Gdk_WMFunction); 
  331.    type Property_Gdk_WMFunction is new Gdk_WMFunction_Properties.Property; 
  332.  
  333.    package Gdk_Gravity_Properties is 
  334.       new Generic_Internal_Discrete_Property (Gdk_Gravity); 
  335.    type Property_Gdk_Gravity is new Gdk_Gravity_Properties.Property; 
  336.  
  337.    package Gdk_Fullscreen_Mode_Properties is 
  338.       new Generic_Internal_Discrete_Property (Gdk_Fullscreen_Mode); 
  339.    type Property_Gdk_Fullscreen_Mode is new Gdk_Fullscreen_Mode_Properties.Property; 
  340.  
  341.    ------------------ 
  342.    -- Constructors -- 
  343.    ------------------ 
  344.  
  345.    procedure Gdk_New 
  346.       (Self            : out Gdk_Window; 
  347.        Parent          : Gdk.Gdk_Window; 
  348.        Attributes      : Gdk.Gdk_Window_Attr; 
  349.        Attributes_Mask : Gint); 
  350.    --  Creates a new Gdk.Gdk_Window using the attributes from Attributes. See 
  351.    --  Gdk_Window_Attr and Gdk.Window.Gdk_Window_Attributes_Type for more 
  352.    --  details. Note: to use this on displays other than the default display, 
  353.    --  Parent must be specified. 
  354.    --  "parent": a Gdk.Gdk_Window, or null to create the window as a child of 
  355.    --  the default root window for the default display. 
  356.    --  "attributes": attributes of the new window 
  357.    --  "attributes_mask": mask indicating which fields in Attributes are valid 
  358.  
  359.    function Gdk_Window_New 
  360.       (Parent          : Gdk.Gdk_Window; 
  361.        Attributes      : Gdk.Gdk_Window_Attr; 
  362.        Attributes_Mask : Gint) return Gdk_Window; 
  363.    --  Creates a new Gdk.Gdk_Window using the attributes from Attributes. See 
  364.    --  Gdk_Window_Attr and Gdk.Window.Gdk_Window_Attributes_Type for more 
  365.    --  details. Note: to use this on displays other than the default display, 
  366.    --  Parent must be specified. 
  367.    --  "parent": a Gdk.Gdk_Window, or null to create the window as a child of 
  368.    --  the default root window for the default display. 
  369.    --  "attributes": attributes of the new window 
  370.    --  "attributes_mask": mask indicating which fields in Attributes are valid 
  371.  
  372.    function Get_Type return Glib.GType; 
  373.    pragma Import (C, Get_Type, "gdk_window_get_type"); 
  374.  
  375.    ------------- 
  376.    -- Methods -- 
  377.    ------------- 
  378.  
  379.    procedure Beep (Self : Gdk.Gdk_Window); 
  380.    pragma Import (C, Beep, "gdk_window_beep"); 
  381.    --  Emits a short beep associated to Window in the appropriate display, if 
  382.    --  supported. Otherwise, emits a short beep on the display just as 
  383.    --  Gdk.Display.Beep. 
  384.    --  Since: gtk+ 2.12 
  385.  
  386.    procedure Begin_Move_Drag 
  387.       (Self      : Gdk.Gdk_Window; 
  388.        Button    : Gint; 
  389.        Root_X    : Gint; 
  390.        Root_Y    : Gint; 
  391.        Timestamp : Guint32); 
  392.    pragma Import (C, Begin_Move_Drag, "gdk_window_begin_move_drag"); 
  393.    --  Begins a window move operation (for a toplevel window). 
  394.    --  This function assumes that the drag is controlled by the client pointer 
  395.    --  device, use Gdk.Window.Begin_Move_Drag_For_Device to begin a drag with a 
  396.    --  different device. 
  397.    --  "button": the button being used to drag 
  398.    --  "root_x": root window X coordinate of mouse click that began the drag 
  399.    --  "root_y": root window Y coordinate of mouse click that began the drag 
  400.    --  "timestamp": timestamp of mouse click that began the drag 
  401.  
  402.    procedure Begin_Move_Drag_For_Device 
  403.       (Self      : Gdk.Gdk_Window; 
  404.        Device    : not null access Gdk.Device.Gdk_Device_Record'Class; 
  405.        Button    : Gint; 
  406.        Root_X    : Gint; 
  407.        Root_Y    : Gint; 
  408.        Timestamp : Guint32); 
  409.    --  Begins a window move operation (for a toplevel window). You might use 
  410.    --  this function to implement a "window move grip," for example. The 
  411.    --  function works best with window managers that support the <ulink 
  412.    --  url="http://www.freedesktop.org/Standards/wm-spec">Extended Window 
  413.    --  Manager Hints</ulink>, but has a fallback implementation for other 
  414.    --  window managers. 
  415.    --  Since: gtk+ 3.4 
  416.    --  "device": the device used for the operation 
  417.    --  "button": the button being used to drag 
  418.    --  "root_x": root window X coordinate of mouse click that began the drag 
  419.    --  "root_y": root window Y coordinate of mouse click that began the drag 
  420.    --  "timestamp": timestamp of mouse click that began the drag 
  421.  
  422.    procedure Begin_Paint_Rect 
  423.       (Self      : Gdk.Gdk_Window; 
  424.        Rectangle : Gdk.Rectangle.Gdk_Rectangle); 
  425.    pragma Import (C, Begin_Paint_Rect, "gdk_window_begin_paint_rect"); 
  426.    --  A convenience wrapper around Gdk.Window.Begin_Paint_Region which 
  427.    --  creates a rectangular region for you. See Gdk.Window.Begin_Paint_Region 
  428.    --  for details. 
  429.    --  "rectangle": rectangle you intend to draw to 
  430.  
  431.    procedure Begin_Paint_Region 
  432.       (Self   : Gdk.Gdk_Window; 
  433.        Region : Cairo.Region.Cairo_Region); 
  434.    pragma Import (C, Begin_Paint_Region, "gdk_window_begin_paint_region"); 
  435.    --  Indicates that you are beginning the process of redrawing Region. A 
  436.    --  backing store (offscreen buffer) large enough to contain Region will be 
  437.    --  created. The backing store will be initialized with the background color 
  438.    --  or background surface for Window. Then, all drawing operations performed 
  439.    --  on Window will be diverted to the backing store. When you call 
  440.    --  Gdk.Window.End_Paint, the backing store will be copied to Window, making 
  441.    --  it visible onscreen. Only the part of Window contained in Region will be 
  442.    --  modified; that is, drawing operations are clipped to Region. 
  443.    --  The net result of all this is to remove flicker, because the user sees 
  444.    --  the finished product appear all at once when you call 
  445.    --  Gdk.Window.End_Paint. If you draw to Window directly without calling 
  446.    --  Gdk.Window.Begin_Paint_Region, the user may see flicker as individual 
  447.    --  drawing operations are performed in sequence. The clipping and 
  448.    --  background-initializing features of Gdk.Window.Begin_Paint_Region are 
  449.    --  conveniences for the programmer, so you can avoid doing that work 
  450.    --  yourself. 
  451.    --  When using GTK+, the widget system automatically places calls to 
  452.    --  Gdk.Window.Begin_Paint_Region and Gdk.Window.End_Paint around emissions 
  453.    --  of the expose_event signal. That is, if you're writing an expose event 
  454.    --  handler, you can assume that the exposed area in 
  455.    --  Gdk.Event.Gdk_Event_Expose has already been cleared to the window 
  456.    --  background, is already set as the clip region, and already has a backing 
  457.    --  store. Therefore in most cases, application code need not call 
  458.    --  Gdk.Window.Begin_Paint_Region. (You can disable the automatic calls 
  459.    --  around expose events on a widget-by-widget basis by calling 
  460.    --  Gtk.Widget.Set_Double_Buffered.) 
  461.    --  If you call this function multiple times before calling the matching 
  462.    --  Gdk.Window.End_Paint, the backing stores are pushed onto a stack. 
  463.    --  Gdk.Window.End_Paint copies the topmost backing store onscreen, 
  464.    --  subtracts the topmost region from all other regions in the stack, and 
  465.    --  pops the stack. All drawing operations affect only the topmost backing 
  466.    --  store in the stack. One matching call to Gdk.Window.End_Paint is 
  467.    --  required for each call to Gdk.Window.Begin_Paint_Region. 
  468.    --  "region": region you intend to draw to 
  469.  
  470.    procedure Begin_Resize_Drag 
  471.       (Self      : Gdk.Gdk_Window; 
  472.        Edge      : Gdk_Window_Edge; 
  473.        Button    : Gint; 
  474.        Root_X    : Gint; 
  475.        Root_Y    : Gint; 
  476.        Timestamp : Guint32); 
  477.    pragma Import (C, Begin_Resize_Drag, "gdk_window_begin_resize_drag"); 
  478.    --  Begins a window resize operation (for a toplevel window). 
  479.    --  This function assumes that the drag is controlled by the client pointer 
  480.    --  device, use Gdk.Window.Begin_Resize_Drag_For_Device to begin a drag with 
  481.    --  a different device. 
  482.    --  "edge": the edge or corner from which the drag is started 
  483.    --  "button": the button being used to drag 
  484.    --  "root_x": root window X coordinate of mouse click that began the drag 
  485.    --  "root_y": root window Y coordinate of mouse click that began the drag 
  486.    --  "timestamp": timestamp of mouse click that began the drag (use 
  487.    --  Gdk.Event.Get_Time) 
  488.  
  489.    procedure Begin_Resize_Drag_For_Device 
  490.       (Self      : Gdk.Gdk_Window; 
  491.        Edge      : Gdk_Window_Edge; 
  492.        Device    : not null access Gdk.Device.Gdk_Device_Record'Class; 
  493.        Button    : Gint; 
  494.        Root_X    : Gint; 
  495.        Root_Y    : Gint; 
  496.        Timestamp : Guint32); 
  497.    --  Begins a window resize operation (for a toplevel window). You might use 
  498.    --  this function to implement a "window resize grip," for example; in fact 
  499.    --  Gtk.Status_Bar.Gtk_Status_Bar uses it. The function works best with 
  500.    --  window managers that support the <ulink 
  501.    --  url="http://www.freedesktop.org/Standards/wm-spec">Extended Window 
  502.    --  Manager Hints</ulink>, but has a fallback implementation for other 
  503.    --  window managers. 
  504.    --  Since: gtk+ 3.4 
  505.    --  "edge": the edge or corner from which the drag is started 
  506.    --  "device": the device used for the operation 
  507.    --  "button": the button being used to drag 
  508.    --  "root_x": root window X coordinate of mouse click that began the drag 
  509.    --  "root_y": root window Y coordinate of mouse click that began the drag 
  510.    --  "timestamp": timestamp of mouse click that began the drag (use 
  511.    --  Gdk.Event.Get_Time) 
  512.  
  513.    procedure Configure_Finished (Self : Gdk.Gdk_Window); 
  514.    pragma Import (C, Configure_Finished, "gdk_window_configure_finished"); 
  515.    pragma Obsolescent (Configure_Finished); 
  516.    --  Does nothing, present only for compatiblity. 
  517.    --  Since: gtk+ 2.6 
  518.    --  Deprecated since 3.8, this function is no longer needed 
  519.  
  520.    procedure Coords_From_Parent 
  521.       (Self     : Gdk.Gdk_Window; 
  522.        Parent_X : Gdouble; 
  523.        Parent_Y : Gdouble; 
  524.        X        : out Gdouble; 
  525.        Y        : out Gdouble); 
  526.    pragma Import (C, Coords_From_Parent, "gdk_window_coords_from_parent"); 
  527.    --  Transforms window coordinates from a parent window to a child window, 
  528.    --  where the parent window is the normal parent as returned by 
  529.    --  Gdk.Window.Get_Parent for normal windows, and the window's embedder as 
  530.    --  returned by gdk_offscreen_window_get_embedder for offscreen windows. 
  531.    --  For normal windows, calling this function is equivalent to subtracting 
  532.    --  the return values of Gdk.Window.Get_Position from the parent 
  533.    --  coordinates. For offscreen windows however (which can be arbitrarily 
  534.    --  transformed), this function calls the GdkWindow::from-embedder: signal 
  535.    --  to translate the coordinates. 
  536.    --  You should always use this function when writing generic code that 
  537.    --  walks down a window hierarchy. 
  538.    --  See also: Gdk.Window.Coords_To_Parent 
  539.    --  Since: gtk+ 2.22 
  540.    --  "parent_x": X coordinate in parent's coordinate system 
  541.    --  "parent_y": Y coordinate in parent's coordinate system 
  542.    --  "x": return location for X coordinate in child's coordinate system 
  543.    --  "y": return location for Y coordinate in child's coordinate system 
  544.  
  545.    procedure Coords_To_Parent 
  546.       (Self     : Gdk.Gdk_Window; 
  547.        X        : Gdouble; 
  548.        Y        : Gdouble; 
  549.        Parent_X : out Gdouble; 
  550.        Parent_Y : out Gdouble); 
  551.    pragma Import (C, Coords_To_Parent, "gdk_window_coords_to_parent"); 
  552.    --  Transforms window coordinates from a child window to its parent window, 
  553.    --  where the parent window is the normal parent as returned by 
  554.    --  Gdk.Window.Get_Parent for normal windows, and the window's embedder as 
  555.    --  returned by gdk_offscreen_window_get_embedder for offscreen windows. 
  556.    --  For normal windows, calling this function is equivalent to adding the 
  557.    --  return values of Gdk.Window.Get_Position to the child coordinates. For 
  558.    --  offscreen windows however (which can be arbitrarily transformed), this 
  559.    --  function calls the GdkWindow::to-embedder: signal to translate the 
  560.    --  coordinates. 
  561.    --  You should always use this function when writing generic code that 
  562.    --  walks up a window hierarchy. 
  563.    --  See also: Gdk.Window.Coords_From_Parent 
  564.    --  Since: gtk+ 2.22 
  565.    --  "x": X coordinate in child's coordinate system 
  566.    --  "y": Y coordinate in child's coordinate system 
  567.    --  "parent_x": return location for X coordinate in parent's coordinate 
  568.    --  system, or null 
  569.    --  "parent_y": return location for Y coordinate in parent's coordinate 
  570.    --  system, or null 
  571.  
  572.    function Create_Similar_Surface 
  573.       (Self    : Gdk.Gdk_Window; 
  574.        Content : Cairo.Cairo_Content; 
  575.        Width   : Gint; 
  576.        Height  : Gint) return Cairo.Cairo_Surface; 
  577.    pragma Import (C, Create_Similar_Surface, "gdk_window_create_similar_surface"); 
  578.    --  Create a new surface that is as compatible as possible with the given 
  579.    --  Window. For example the new surface will have the same fallback 
  580.    --  resolution and font options as Window. Generally, the new surface will 
  581.    --  also use the same backend as Window, unless that is not possible for 
  582.    --  some reason. The type of the returned surface may be examined with 
  583.    --  cairo_surface_get_type. 
  584.    --  Initially the surface contents are all 0 (transparent if contents have 
  585.    --  transparency, black otherwise.) 
  586.    --  Since: gtk+ 2.22 
  587.    --  "content": the content for the new surface 
  588.    --  "width": width of the new surface 
  589.    --  "height": height of the new surface 
  590.  
  591.    procedure Deiconify (Self : Gdk.Gdk_Window); 
  592.    pragma Import (C, Deiconify, "gdk_window_deiconify"); 
  593.    --  Attempt to deiconify (unminimize) Window. On X11 the window manager may 
  594.    --  choose to ignore the request to deiconify. When using GTK+, use 
  595.    --  Gtk.Window.Deiconify instead of the Gdk.Gdk_Window variant. Or better 
  596.    --  yet, you probably want to use Gtk.Window.Present, which raises the 
  597.    --  window, focuses it, unminimizes it, and puts it on the current desktop. 
  598.  
  599.    procedure Destroy (Self : Gdk.Gdk_Window); 
  600.    pragma Import (C, Destroy, "gdk_window_destroy"); 
  601.    --  Destroys the window system resources associated with Window and 
  602.    --  decrements Window's reference count. The window system resources for all 
  603.    --  children of Window are also destroyed, but the children's reference 
  604.    --  counts are not decremented. 
  605.    --  Note that a window will not be destroyed automatically when its 
  606.    --  reference count reaches zero. You must call this function yourself 
  607.    --  before that happens. 
  608.  
  609.    procedure Destroy_Notify (Self : Gdk.Gdk_Window); 
  610.    pragma Import (C, Destroy_Notify, "gdk_window_destroy_notify"); 
  611.  
  612.    procedure Enable_Synchronized_Configure (Self : Gdk.Gdk_Window); 
  613.    pragma Import (C, Enable_Synchronized_Configure, "gdk_window_enable_synchronized_configure"); 
  614.    pragma Obsolescent (Enable_Synchronized_Configure); 
  615.    --  Does nothing, present only for compatiblity. 
  616.    --  Since: gtk+ 2.6 
  617.    --  Deprecated since 3.8, this function is no longer needed 
  618.  
  619.    procedure End_Paint (Self : Gdk.Gdk_Window); 
  620.    pragma Import (C, End_Paint, "gdk_window_end_paint"); 
  621.    --  Indicates that the backing store created by the most recent call to 
  622.    --  Gdk.Window.Begin_Paint_Region should be copied onscreen and deleted, 
  623.    --  leaving the next-most-recent backing store or no backing store at all as 
  624.    --  the active paint region. See Gdk.Window.Begin_Paint_Region for full 
  625.    --  details. It is an error to call this function without a matching 
  626.    --  Gdk.Window.Begin_Paint_Region first. 
  627.  
  628.    function Ensure_Native (Self : Gdk.Gdk_Window) return Boolean; 
  629.    --  Tries to ensure that there is a window-system native window for this 
  630.    --  GdkWindow. This may fail in some situations, returning False. 
  631.    --  Offscreen window and children of them can never have native windows. 
  632.    --  Some backends may not support native child windows. 
  633.    --  Since: gtk+ 2.18 
  634.  
  635.    procedure Flush (Self : Gdk.Gdk_Window); 
  636.    pragma Import (C, Flush, "gdk_window_flush"); 
  637.    --  Flush all outstanding cached operations on a window, leaving the window 
  638.    --  in a state which reflects all that has been drawn before. 
  639.    --  Gdk uses multiple kinds of caching to get better performance and nicer 
  640.    --  drawing. For instance, during exposes all paints to a window using 
  641.    --  double buffered rendering are keep on a surface until the last window 
  642.    --  has been exposed. It also delays window moves/scrolls until as long as 
  643.    --  possible until next update to avoid tearing when moving windows. 
  644.    --  Normally this should be completely invisible to applications, as we 
  645.    --  automatically flush the windows when required, but this might be needed 
  646.    --  if you for instance mix direct native drawing with gdk drawing. For Gtk 
  647.    --  widgets that don't use double buffering this will be called 
  648.    --  automatically before sending the expose event. 
  649.    --  Since: gtk+ 2.18 
  650.  
  651.    procedure Focus (Self : Gdk.Gdk_Window; Timestamp : Guint32); 
  652.    pragma Import (C, Focus, "gdk_window_focus"); 
  653.    --  Sets keyboard focus to Window. In most cases, Gtk.Window.Present should 
  654.    --  be used on a Gtk.Window.Gtk_Window, rather than calling this function. 
  655.    --  "timestamp": timestamp of the event triggering the window focus 
  656.  
  657.    procedure Freeze_Toplevel_Updates_Libgtk_Only (Self : Gdk.Gdk_Window); 
  658.    pragma Import (C, Freeze_Toplevel_Updates_Libgtk_Only, "gdk_window_freeze_toplevel_updates_libgtk_only"); 
  659.    --  Temporarily freezes a window and all its descendants such that it won't 
  660.    --  receive expose events. The window will begin receiving expose events 
  661.    --  again when Gdk.Window.Thaw_Toplevel_Updates_Libgtk_Only is called. If 
  662.    --  Gdk.Window.Freeze_Toplevel_Updates_Libgtk_Only has been called more than 
  663.    --  once, Gdk.Window.Thaw_Toplevel_Updates_Libgtk_Only must be called an 
  664.    --  equal number of times to begin processing exposes. 
  665.    --  This function is not part of the GDK public API and is only for use by 
  666.    --  GTK+. 
  667.  
  668.    procedure Freeze_Updates (Self : Gdk.Gdk_Window); 
  669.    pragma Import (C, Freeze_Updates, "gdk_window_freeze_updates"); 
  670.    --  Temporarily freezes a window such that it won't receive expose events. 
  671.    --  The window will begin receiving expose events again when 
  672.    --  Gdk.Window.Thaw_Updates is called. If Gdk.Window.Freeze_Updates has been 
  673.    --  called more than once, Gdk.Window.Thaw_Updates must be called an equal 
  674.    --  number of times to begin processing exposes. 
  675.  
  676.    procedure Fullscreen (Self : Gdk.Gdk_Window); 
  677.    pragma Import (C, Fullscreen, "gdk_window_fullscreen"); 
  678.    --  Moves the window into fullscreen mode. This means the window covers the 
  679.    --  entire screen and is above any panels or task bars. 
  680.    --  If the window was already fullscreen, then this function does nothing. 
  681.    --  On X11, asks the window manager to put Window in a fullscreen state, if 
  682.    --  the window manager supports this operation. Not all window managers 
  683.    --  support this, and some deliberately ignore it or don't have a concept of 
  684.    --  "fullscreen"; so you can't rely on the fullscreenification actually 
  685.    --  happening. But it will happen with most standard window managers, and 
  686.    --  GDK makes a best effort to get it to happen. 
  687.    --  Since: gtk+ 2.2 
  688.  
  689.    procedure Geometry_Changed (Self : Gdk.Gdk_Window); 
  690.    pragma Import (C, Geometry_Changed, "gdk_window_geometry_changed"); 
  691.    --  This function informs GDK that the geometry of an embedded offscreen 
  692.    --  window has changed. This is necessary for GDK to keep track of which 
  693.    --  offscreen window the pointer is in. 
  694.    --  Since: gtk+ 2.18 
  695.  
  696.    function Get_Accept_Focus (Self : Gdk.Gdk_Window) return Boolean; 
  697.    --  Determines whether or not the desktop environment shuld be hinted that 
  698.    --  the window does not want to receive input focus. 
  699.    --  Since: gtk+ 2.22 
  700.  
  701.    procedure Set_Accept_Focus 
  702.       (Self         : Gdk.Gdk_Window; 
  703.        Accept_Focus : Boolean); 
  704.    --  Setting Accept_Focus to False hints the desktop environment that the 
  705.    --  window doesn't want to receive input focus. 
  706.    --  On X, it is the responsibility of the window manager to interpret this 
  707.    --  hint. ICCCM-compliant window manager usually respect it. 
  708.    --  Since: gtk+ 2.4 
  709.    --  "accept_focus": True if the window should receive input focus 
  710.  
  711.    function Get_Background_Pattern 
  712.       (Self : Gdk.Gdk_Window) return Cairo.Cairo_Pattern; 
  713.    pragma Import (C, Get_Background_Pattern, "gdk_window_get_background_pattern"); 
  714.    --  Gets the pattern used to clear the background on Window. If Window does 
  715.    --  not have its own background and reuses the parent's, null is returned 
  716.    --  and you'll have to query it yourself. 
  717.    --  Since: gtk+ 2.22 
  718.  
  719.    procedure Set_Background_Pattern 
  720.       (Self    : Gdk.Gdk_Window; 
  721.        Pattern : Cairo.Cairo_Pattern); 
  722.    pragma Import (C, Set_Background_Pattern, "gdk_window_set_background_pattern"); 
  723.    --  Sets the background of Window. 
  724.    --  A background of null means that the window will inherit its background 
  725.    --  form its parent window. 
  726.    --  The windowing system will normally fill a window with its background 
  727.    --  when the window is obscured then exposed. 
  728.    --  "pattern": a pattern to use, or null 
  729.  
  730.    function Get_Children 
  731.       (Self : Gdk.Gdk_Window) return Gdk_Window_List.Glist; 
  732.    --  Gets the list of children of Window known to GDK. This function only 
  733.    --  returns children created via GDK, so for example it's useless when used 
  734.    --  with the root window; it only returns windows an application created 
  735.    --  itself. 
  736.    --  The returned list must be freed, but the elements in the list need not 
  737.    --  be. 
  738.  
  739.    function Get_Clip_Region 
  740.       (Self : Gdk.Gdk_Window) return Cairo.Region.Cairo_Region; 
  741.    pragma Import (C, Get_Clip_Region, "gdk_window_get_clip_region"); 
  742.    --  Computes the region of a window that potentially can be written to by 
  743.    --  drawing primitives. This region may not take into account other factors 
  744.    --  such as if the window is obscured by other windows, but no area outside 
  745.    --  of this region will be affected by drawing primitives. 
  746.  
  747.    function Get_Composited (Self : Gdk.Gdk_Window) return Boolean; 
  748.    --  Determines whether Window is composited. 
  749.    --  See Gdk.Window.Set_Composited. 
  750.    --  Since: gtk+ 2.22 
  751.  
  752.    procedure Set_Composited (Self : Gdk.Gdk_Window; Composited : Boolean); 
  753.    --  Sets a Gdk.Gdk_Window as composited, or unsets it. Composited windows 
  754.    --  do not automatically have their contents drawn to the screen. Drawing is 
  755.    --  redirected to an offscreen buffer and an expose event is emitted on the 
  756.    --  parent of the composited window. It is the responsibility of the 
  757.    --  parent's expose handler to manually merge the off-screen content onto 
  758.    --  the screen in whatever way it sees fit. See <xref 
  759.    --  linkend="composited-window-example"/> for an example. 
  760.    --  It only makes sense for child windows to be composited; see 
  761.    --  Gdk.Window.Set_Opacity if you need translucent toplevel windows. 
  762.    --  An additional effect of this call is that the area of this window is no 
  763.    --  longer clipped from regions marked for invalidation on its parent. Draws 
  764.    --  done on the parent window are also no longer clipped by the child. 
  765.    --  This call is only supported on some systems (currently, only X11 with 
  766.    --  new enough Xcomposite and Xdamage extensions). You must call 
  767.    --  Gdk.Display.Supports_Composite to check if setting a window as 
  768.    --  composited is supported before attempting to do so. 
  769.    --  Since: gtk+ 2.12 
  770.    --  "composited": True to set the window as composited 
  771.  
  772.    function Get_Cursor (Self : Gdk.Gdk_Window) return Gdk.Gdk_Cursor; 
  773.    pragma Import (C, Get_Cursor, "gdk_window_get_cursor"); 
  774.    --  Retrieves a Gdk.Gdk_Cursor pointer for the cursor currently set on the 
  775.    --  specified Gdk.Gdk_Window, or null. If the return value is null then 
  776.    --  there is no custom cursor set on the specified window, and it is using 
  777.    --  the cursor for its parent window. 
  778.    --  Since: gtk+ 2.18 
  779.  
  780.    procedure Set_Cursor (Self : Gdk.Gdk_Window; Cursor : Gdk.Gdk_Cursor); 
  781.    pragma Import (C, Set_Cursor, "gdk_window_set_cursor"); 
  782.    --  Sets the default mouse pointer for a Gdk.Gdk_Window. Use 
  783.    --  gdk_cursor_new_for_display or gdk_cursor_new_from_pixbuf to create the 
  784.    --  cursor. To make the cursor invisible, use Gdk.Blank_Cursor. Passing null 
  785.    --  for the Cursor argument to Gdk.Window.Set_Cursor means that Window will 
  786.    --  use the cursor of its parent window. Most windows should use this 
  787.    --  default. 
  788.    --  "cursor": a cursor 
  789.  
  790.    procedure Get_Decorations 
  791.       (Self            : Gdk.Gdk_Window; 
  792.        Decorations     : out Gdk_WMDecoration; 
  793.        Has_Decorations : out Boolean); 
  794.    --  Returns the decorations set on the GdkWindow with 
  795.    --  Gdk.Window.Set_Decorations. 
  796.    --  "decorations": The window decorations will be written here 
  797.  
  798.    procedure Set_Decorations 
  799.       (Self        : Gdk.Gdk_Window; 
  800.        Decorations : Gdk_WMDecoration); 
  801.    pragma Import (C, Set_Decorations, "gdk_window_set_decorations"); 
  802.    --  "Decorations" are the features the window manager adds to a toplevel 
  803.    --  Gdk.Gdk_Window. This function sets the traditional Motif window manager 
  804.    --  hints that tell the window manager which decorations you would like your 
  805.    --  window to have. Usually you should use Gtk.Window.Set_Decorated on a 
  806.    --  Gtk.Window.Gtk_Window instead of using the GDK function directly. 
  807.    --  The Decorations argument is the logical OR of the fields in the 
  808.    --  Gdk.Window.Gdk_WMDecoration enumeration. If GDK_DECOR_ALL is included in 
  809.    --  the mask, the other bits indicate which decorations should be turned 
  810.    --  off. If GDK_DECOR_ALL is not included, then the other bits indicate 
  811.    --  which decorations should be turned on. 
  812.    --  Most window managers honor a decorations hint of 0 to disable all 
  813.    --  decorations, but very few honor all possible combinations of bits. 
  814.    --  "decorations": decoration hint mask 
  815.  
  816.    function Get_Device_Cursor 
  817.       (Self   : Gdk.Gdk_Window; 
  818.        Device : not null access Gdk.Device.Gdk_Device_Record'Class) 
  819.        return Gdk.Gdk_Cursor; 
  820.    --  Retrieves a Gdk.Gdk_Cursor pointer for the Device currently set on the 
  821.    --  specified Gdk.Gdk_Window, or null. If the return value is null then 
  822.    --  there is no custom cursor set on the specified window, and it is using 
  823.    --  the cursor for its parent window. 
  824.    --  Since: gtk+ 3.0 
  825.    --  "device": a master, pointer Gdk.Device.Gdk_Device. 
  826.  
  827.    procedure Set_Device_Cursor 
  828.       (Self   : Gdk.Gdk_Window; 
  829.        Device : not null access Gdk.Device.Gdk_Device_Record'Class; 
  830.        Cursor : Gdk.Gdk_Cursor); 
  831.    --  Sets a specific Gdk.Gdk_Cursor for a given device when it gets inside 
  832.    --  Window. Use gdk_cursor_new_for_display or gdk_cursor_new_from_pixbuf to 
  833.    --  create the cursor. To make the cursor invisible, use Gdk.Blank_Cursor. 
  834.    --  Passing null for the Cursor argument to Gdk.Window.Set_Cursor means that 
  835.    --  Window will use the cursor of its parent window. Most windows should use 
  836.    --  this default. 
  837.    --  Since: gtk+ 3.0 
  838.    --  "device": a master, pointer Gdk.Device.Gdk_Device 
  839.    --  "cursor": a Gdk.Gdk_Cursor 
  840.  
  841.    function Get_Device_Events 
  842.       (Self   : Gdk.Gdk_Window; 
  843.        Device : not null access Gdk.Device.Gdk_Device_Record'Class) 
  844.        return Gdk.Event.Gdk_Event_Mask; 
  845.    --  Returns the event mask for Window corresponding to an specific device. 
  846.    --  Since: gtk+ 3.0 
  847.    --  "device": a Gdk.Device.Gdk_Device. 
  848.  
  849.    procedure Set_Device_Events 
  850.       (Self       : Gdk.Gdk_Window; 
  851.        Device     : not null access Gdk.Device.Gdk_Device_Record'Class; 
  852.        Event_Mask : Gdk.Event.Gdk_Event_Mask); 
  853.    --  Sets the event mask for a given device (Normally a floating device, not 
  854.    --  attached to any visible pointer) to Window. For example, an event mask 
  855.    --  including GDK_BUTTON_PRESS_MASK means the window should report button 
  856.    --  press events. The event mask is the bitwise OR of values from the 
  857.    --  Gdk.Event.Gdk_Event_Mask enumeration. 
  858.    --  Since: gtk+ 3.0 
  859.    --  "device": Gdk.Device.Gdk_Device to enable events for. 
  860.    --  "event_mask": event mask for Window 
  861.  
  862.    procedure Get_Device_Position 
  863.       (Self   : Gdk.Gdk_Window; 
  864.        Device : not null access Gdk.Device.Gdk_Device_Record'Class; 
  865.        X      : out Gint; 
  866.        Y      : out Gint; 
  867.        Mask   : out Gdk.Types.Gdk_Modifier_Type; 
  868.        Window : out Gdk.Gdk_Window); 
  869.    --  Obtains the current device position and modifier state. The position is 
  870.    --  given in coordinates relative to the upper left corner of Window. 
  871.    --  Since: gtk+ 3.0 
  872.    --  "device": pointer Gdk.Device.Gdk_Device to query to. 
  873.    --  "x": return location for the X coordinate of Device, or null. 
  874.    --  "y": return location for the Y coordinate of Device, or null. 
  875.    --  "mask": return location for the modifier mask, or null. 
  876.  
  877.    function Get_Display 
  878.       (Self : Gdk.Gdk_Window) return Gdk.Display.Gdk_Display; 
  879.    --  Gets the Gdk.Display.Gdk_Display associated with a Gdk.Gdk_Window. 
  880.    --  Since: gtk+ 2.24 
  881.  
  882.    function Get_Effective_Parent 
  883.       (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window; 
  884.    pragma Import (C, Get_Effective_Parent, "gdk_window_get_effective_parent"); 
  885.    --  Obtains the parent of Window, as known to GDK. Works like 
  886.    --  Gdk.Window.Get_Parent for normal windows, but returns the window's 
  887.    --  embedder for offscreen windows. 
  888.    --  See also: gdk_offscreen_window_get_embedder 
  889.    --  Since: gtk+ 2.22 
  890.  
  891.    function Get_Effective_Toplevel 
  892.       (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window; 
  893.    pragma Import (C, Get_Effective_Toplevel, "gdk_window_get_effective_toplevel"); 
  894.    --  Gets the toplevel window that's an ancestor of Window. 
  895.    --  Works like Gdk.Window.Get_Toplevel, but treats an offscreen window's 
  896.    --  embedder as its parent, using Gdk.Window.Get_Effective_Parent. 
  897.    --  See also: gdk_offscreen_window_get_embedder 
  898.    --  Since: gtk+ 2.22 
  899.  
  900.    function Get_Events 
  901.       (Self : Gdk.Gdk_Window) return Gdk.Event.Gdk_Event_Mask; 
  902.    pragma Import (C, Get_Events, "gdk_window_get_events"); 
  903.    --  Gets the event mask for Window for all master input devices. See 
  904.    --  Gdk.Window.Set_Events. 
  905.  
  906.    procedure Set_Events 
  907.       (Self       : Gdk.Gdk_Window; 
  908.        Event_Mask : Gdk.Event.Gdk_Event_Mask); 
  909.    pragma Import (C, Set_Events, "gdk_window_set_events"); 
  910.    --  The event mask for a window determines which events will be reported 
  911.    --  for that window from all master input devices. For example, an event 
  912.    --  mask including GDK_BUTTON_PRESS_MASK means the window should report 
  913.    --  button press events. The event mask is the bitwise OR of values from the 
  914.    --  Gdk.Event.Gdk_Event_Mask enumeration. 
  915.    --  "event_mask": event mask for Window 
  916.  
  917.    function Get_Focus_On_Map (Self : Gdk.Gdk_Window) return Boolean; 
  918.    --  Determines whether or not the desktop environment should be hinted that 
  919.    --  the window does not want to receive input focus when it is mapped. 
  920.    --  Since: gtk+ 2.22 
  921.  
  922.    procedure Set_Focus_On_Map 
  923.       (Self         : Gdk.Gdk_Window; 
  924.        Focus_On_Map : Boolean); 
  925.    --  Setting Focus_On_Map to False hints the desktop environment that the 
  926.    --  window doesn't want to receive input focus when it is mapped. 
  927.    --  focus_on_map should be turned off for windows that aren't triggered 
  928.    --  interactively (such as popups from network activity). 
  929.    --  On X, it is the responsibility of the window manager to interpret this 
  930.    --  hint. Window managers following the freedesktop.org window manager 
  931.    --  extension specification should respect it. 
  932.    --  Since: gtk+ 2.6 
  933.    --  "focus_on_map": True if the window should receive input focus when 
  934.    --  mapped 
  935.  
  936.    function Get_Frame_Clock 
  937.       (Self : Gdk.Gdk_Window) return Gdk.Frame_Clock.Gdk_Frame_Clock; 
  938.    --  Gets the frame clock for the window. The frame clock for a window never 
  939.    --  changes unless the window is reparented to a new toplevel window. 
  940.    --  Since: gtk+ 3.8 
  941.  
  942.    procedure Get_Frame_Extents 
  943.       (Self : Gdk.Gdk_Window; 
  944.        Rect : out Gdk.Rectangle.Gdk_Rectangle); 
  945.    pragma Import (C, Get_Frame_Extents, "gdk_window_get_frame_extents"); 
  946.    --  Obtains the bounding box of the window, including window manager 
  947.    --  titlebar/borders if any. The frame position is given in root window 
  948.    --  coordinates. To get the position of the window itself (rather than the 
  949.    --  frame) in root window coordinates, use Gdk.Window.Get_Origin. 
  950.    --  "rect": rectangle to fill with bounding box of the window frame 
  951.  
  952.    function Get_Fullscreen_Mode 
  953.       (Self : Gdk.Gdk_Window) return Gdk_Fullscreen_Mode; 
  954.    pragma Import (C, Get_Fullscreen_Mode, "gdk_window_get_fullscreen_mode"); 
  955.    --  Obtains the Gdk.Window.Gdk_Fullscreen_Mode of the Window. 
  956.    --  Since: gtk+ 3.8 
  957.  
  958.    procedure Set_Fullscreen_Mode 
  959.       (Self : Gdk.Gdk_Window; 
  960.        Mode : Gdk_Fullscreen_Mode); 
  961.    pragma Import (C, Set_Fullscreen_Mode, "gdk_window_set_fullscreen_mode"); 
  962.    --  Specifies whether the Window should span over all monitors (in a 
  963.    --  multi-head setup) or only the current monitor when in fullscreen mode. 
  964.    --  The Mode argument is from the Gdk.Window.Gdk_Fullscreen_Mode 
  965.    --  enumeration. If GDK_FULLSCREEN_ON_ALL_MONITORS is specified, the 
  966.    --  fullscreen Window will span over all monitors from the 
  967.    --  Gdk.Screen.Gdk_Screen. 
  968.    --  On X11, searches through the list of monitors from the 
  969.    --  Gdk.Screen.Gdk_Screen the ones which delimit the 4 edges of the entire 
  970.    --  Gdk.Screen.Gdk_Screen and will ask the window manager to span the Window 
  971.    --  over these monitors. 
  972.    --  If the XINERAMA extension is not available or not usable, this function 
  973.    --  has no effect. 
  974.    --  Not all window managers support this, so you can't rely on the 
  975.    --  fullscreen window to span over the multiple monitors when 
  976.    --  GDK_FULLSCREEN_ON_ALL_MONITORS is specified. 
  977.    --  Since: gtk+ 3.8 
  978.    --  "mode": fullscreen mode 
  979.  
  980.    procedure Get_Geometry 
  981.       (Self   : Gdk.Gdk_Window; 
  982.        X      : out Gint; 
  983.        Y      : out Gint; 
  984.        Width  : out Gint; 
  985.        Height : out Gint); 
  986.    pragma Import (C, Get_Geometry, "gdk_window_get_geometry"); 
  987.    --  Any of the return location arguments to this function may be null, if 
  988.    --  you aren't interested in getting the value of that field. 
  989.    --  The X and Y coordinates returned are relative to the parent window of 
  990.    --  Window, which for toplevels usually means relative to the window 
  991.    --  decorations (titlebar, etc.) rather than relative to the root window 
  992.    --  (screen-size background window). 
  993.    --  On the X11 platform, the geometry is obtained from the X server, so 
  994.    --  reflects the latest position of Window; this may be out-of-sync with the 
  995.    --  position of Window delivered in the most-recently-processed 
  996.    --  Gdk.Event.Gdk_Event_Configure. Gdk.Window.Get_Position in contrast gets 
  997.    --  the position from the most recent configure event. 
  998.    --  Note: If Window is not a toplevel, it is *much* better to call 
  999.    --  Gdk.Window.Get_Position, Gdk.Window.Get_Width and Gdk.Window.Get_Height 
  1000.    --  instead, because it avoids the roundtrip to the X server and because 
  1001.    --  these functions support the full 32-bit coordinate space, whereas 
  1002.    --  Gdk.Window.Get_Geometry is restricted to the 16-bit coordinates of X11. 
  1003.    --  "x": return location for X coordinate of window (relative to its 
  1004.    --  parent) 
  1005.    --  "y": return location for Y coordinate of window (relative to its 
  1006.    --  parent) 
  1007.    --  "width": return location for width of window 
  1008.    --  "height": return location for height of window 
  1009.  
  1010.    function Get_Group (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window; 
  1011.    pragma Import (C, Get_Group, "gdk_window_get_group"); 
  1012.    --  Returns the group leader window for Window. See Gdk.Window.Set_Group. 
  1013.    --  Since: gtk+ 2.4 
  1014.  
  1015.    procedure Set_Group (Self : Gdk.Gdk_Window; Leader : Gdk.Gdk_Window); 
  1016.    pragma Import (C, Set_Group, "gdk_window_set_group"); 
  1017.    --  Sets the group leader window for Window. By default, GDK sets the group 
  1018.    --  leader for all toplevel windows to a global window implicitly created by 
  1019.    --  GDK. With this function you can override this default. 
  1020.    --  The group leader window allows the window manager to distinguish all 
  1021.    --  windows that belong to a single application. It may for example allow 
  1022.    --  users to minimize/unminimize all windows belonging to an application at 
  1023.    --  once. You should only set a non-default group window if your application 
  1024.    --  pretends to be multiple applications. 
  1025.    --  "leader": group leader window, or null to restore the default group 
  1026.    --  leader window 
  1027.  
  1028.    function Get_Height (Self : Gdk.Gdk_Window) return Gint; 
  1029.    pragma Import (C, Get_Height, "gdk_window_get_height"); 
  1030.    --  Returns the height of the given Window. 
  1031.    --  On the X11 platform the returned size is the size reported in the 
  1032.    --  most-recently-processed configure event, rather than the current size on 
  1033.    --  the X server. 
  1034.    --  Since: gtk+ 2.24 
  1035.  
  1036.    function Get_Modal_Hint (Self : Gdk.Gdk_Window) return Boolean; 
  1037.    --  Determines whether or not the window manager is hinted that Window has 
  1038.    --  modal behaviour. 
  1039.    --  Since: gtk+ 2.22 
  1040.  
  1041.    procedure Set_Modal_Hint (Self : Gdk.Gdk_Window; Modal : Boolean); 
  1042.    --  The application can use this hint to tell the window manager that a 
  1043.    --  certain window has modal behaviour. The window manager can use this 
  1044.    --  information to handle modal windows in a special way. 
  1045.    --  You should only use this on windows for which you have previously 
  1046.    --  called Gdk.Window.Set_Transient_For 
  1047.    --  "modal": True if the window is modal, False otherwise. 
  1048.  
  1049.    procedure Get_Origin (Self : Gdk.Gdk_Window; X : out Gint; Y : out Gint); 
  1050.    pragma Import (C, Get_Origin, "gdk_window_get_origin"); 
  1051.    --  Obtains the position of a window in root window coordinates. (Compare 
  1052.    --  with Gdk.Window.Get_Position and Gdk.Window.Get_Geometry which return 
  1053.    --  the position of a window relative to its parent window.) 
  1054.    --  "x": return location for X coordinate 
  1055.    --  "y": return location for Y coordinate 
  1056.  
  1057.    function Get_Parent (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window; 
  1058.    pragma Import (C, Get_Parent, "gdk_window_get_parent"); 
  1059.    --  Obtains the parent of Window, as known to GDK. Does not query the X 
  1060.    --  server; thus this returns the parent as passed to gdk_window_new, not 
  1061.    --  the actual parent. This should never matter unless you're using Xlib 
  1062.    --  calls mixed with GDK calls on the X11 platform. It may also matter for 
  1063.    --  toplevel windows, because the window manager may choose to reparent 
  1064.    --  them. 
  1065.    --  Note that you should use Gdk.Window.Get_Effective_Parent when writing 
  1066.    --  generic code that walks up a window hierarchy, because 
  1067.    --  Gdk.Window.Get_Parent will most likely not do what you expect if there 
  1068.    --  are offscreen windows in the hierarchy. 
  1069.  
  1070.    procedure Get_Pointer 
  1071.       (Self   : Gdk.Gdk_Window; 
  1072.        X      : out Gint; 
  1073.        Y      : out Gint; 
  1074.        Mask   : out Gdk.Types.Gdk_Modifier_Type; 
  1075.        Window : out Gdk.Gdk_Window); 
  1076.    pragma Obsolescent (Get_Pointer); 
  1077.    --  Obtains the current pointer position and modifier state. The position 
  1078.    --  is given in coordinates relative to the upper left corner of Window. 
  1079.    --  Deprecated since 3.0, Use Gdk.Window.Get_Device_Position instead. 
  1080.    --  "x": return location for X coordinate of pointer or null to not return 
  1081.    --  the X coordinate 
  1082.    --  "y": return location for Y coordinate of pointer or null to not return 
  1083.    --  the Y coordinate 
  1084.    --  "mask": return location for modifier mask or null to not return the 
  1085.    --  modifier mask 
  1086.  
  1087.    procedure Get_Position 
  1088.       (Self : Gdk.Gdk_Window; 
  1089.        X    : out Gint; 
  1090.        Y    : out Gint); 
  1091.    pragma Import (C, Get_Position, "gdk_window_get_position"); 
  1092.    --  Obtains the position of the window as reported in the 
  1093.    --  most-recently-processed Gdk.Event.Gdk_Event_Configure. Contrast with 
  1094.    --  Gdk.Window.Get_Geometry which queries the X server for the current 
  1095.    --  window position, regardless of which events have been received or 
  1096.    --  processed. 
  1097.    --  The position coordinates are relative to the window's parent window. 
  1098.    --  "x": X coordinate of window 
  1099.    --  "y": Y coordinate of window 
  1100.  
  1101.    procedure Get_Root_Coords 
  1102.       (Self   : Gdk.Gdk_Window; 
  1103.        X      : Gint; 
  1104.        Y      : Gint; 
  1105.        Root_X : out Gint; 
  1106.        Root_Y : out Gint); 
  1107.    pragma Import (C, Get_Root_Coords, "gdk_window_get_root_coords"); 
  1108.    --  Obtains the position of a window position in root window coordinates. 
  1109.    --  This is similar to Gdk.Window.Get_Origin but allows you go pass in any 
  1110.    --  position in the window, not just the origin. 
  1111.    --  Since: gtk+ 2.18 
  1112.    --  "x": X coordinate in window 
  1113.    --  "y": Y coordinate in window 
  1114.    --  "root_x": return location for X coordinate 
  1115.    --  "root_y": return location for Y coordinate 
  1116.  
  1117.    procedure Get_Root_Origin 
  1118.       (Self : Gdk.Gdk_Window; 
  1119.        X    : out Gint; 
  1120.        Y    : out Gint); 
  1121.    pragma Import (C, Get_Root_Origin, "gdk_window_get_root_origin"); 
  1122.    --  Obtains the top-left corner of the window manager frame in root window 
  1123.    --  coordinates. 
  1124.    --  "x": return location for X position of window frame 
  1125.    --  "y": return location for Y position of window frame 
  1126.  
  1127.    function Get_Screen (Self : Gdk.Gdk_Window) return Gdk.Screen.Gdk_Screen; 
  1128.    --  Gets the Gdk.Screen.Gdk_Screen associated with a Gdk.Gdk_Window. 
  1129.    --  Since: gtk+ 2.24 
  1130.  
  1131.    function Get_Source_Events 
  1132.       (Self   : Gdk.Gdk_Window; 
  1133.        Source : Gdk_Input_Source) return Gdk.Event.Gdk_Event_Mask; 
  1134.    pragma Import (C, Get_Source_Events, "gdk_window_get_source_events"); 
  1135.    --  Returns the event mask for Window corresponding to the device class 
  1136.    --  specified by Source. 
  1137.    --  "source": a Gdk_Input_Source to define the source class. 
  1138.  
  1139.    procedure Set_Source_Events 
  1140.       (Self       : Gdk.Gdk_Window; 
  1141.        Source     : Gdk_Input_Source; 
  1142.        Event_Mask : Gdk.Event.Gdk_Event_Mask); 
  1143.    pragma Import (C, Set_Source_Events, "gdk_window_set_source_events"); 
  1144.    --  Sets the event mask for any floating device (i.e. not attached to any 
  1145.    --  visible pointer) that has the source defined as Source. This event mask 
  1146.    --  will be applied both to currently existing, newly added devices after 
  1147.    --  this call, and devices being attached/detached. 
  1148.    --  Since: gtk+ 3.0 
  1149.    --  "source": a Gdk_Input_Source to define the source class. 
  1150.    --  "event_mask": event mask for Window 
  1151.  
  1152.    function Get_State 
  1153.       (Self : Gdk.Gdk_Window) return Gdk.Event.Gdk_Window_State; 
  1154.    pragma Import (C, Get_State, "gdk_window_get_state"); 
  1155.    --  Gets the bitwise OR of the currently active window state flags, from 
  1156.    --  the Gdk.Event.Gdk_Window_State enumeration. 
  1157.  
  1158.    function Get_Support_Multidevice (Self : Gdk.Gdk_Window) return Boolean; 
  1159.    --  Returns True if the window is aware of the existence of multiple 
  1160.    --  devices. 
  1161.    --  Since: gtk+ 3.0 
  1162.  
  1163.    procedure Set_Support_Multidevice 
  1164.       (Self                : Gdk.Gdk_Window; 
  1165.        Support_Multidevice : Boolean); 
  1166.    --  This function will enable multidevice features in Window. 
  1167.    --  Multidevice aware windows will need to handle properly multiple, per 
  1168.    --  device enter/leave events, device grabs and grab ownerships. 
  1169.    --  Since: gtk+ 3.0 
  1170.    --  "support_multidevice": True to enable multidevice support in Window. 
  1171.  
  1172.    function Get_Toplevel (Self : Gdk.Gdk_Window) return Gdk.Gdk_Window; 
  1173.    pragma Import (C, Get_Toplevel, "gdk_window_get_toplevel"); 
  1174.    --  Gets the toplevel window that's an ancestor of Window. 
  1175.    --  Any window type but Gdk.Window_Child is considered a toplevel window, 
  1176.    --  as is a Gdk.Window_Child window that has a root window as parent. 
  1177.    --  Note that you should use Gdk.Window.Get_Effective_Toplevel when you 
  1178.    --  want to get to a window's toplevel as seen on screen, because 
  1179.    --  Gdk.Window.Get_Toplevel will most likely not do what you expect if there 
  1180.    --  are offscreen windows in the hierarchy. 
  1181.  
  1182.    function Get_Type_Hint 
  1183.       (Self : Gdk.Gdk_Window) return Gdk_Window_Type_Hint; 
  1184.    pragma Import (C, Get_Type_Hint, "gdk_window_get_type_hint"); 
  1185.    --  This function returns the type hint set for a window. 
  1186.    --  Since: gtk+ 2.10 
  1187.  
  1188.    procedure Set_Type_Hint 
  1189.       (Self : Gdk.Gdk_Window; 
  1190.        Hint : Gdk_Window_Type_Hint); 
  1191.    pragma Import (C, Set_Type_Hint, "gdk_window_set_type_hint"); 
  1192.    --  The application can use this call to provide a hint to the window 
  1193.    --  manager about the functionality of a window. The window manager can use 
  1194.    --  this information when determining the decoration and behaviour of the 
  1195.    --  window. 
  1196.    --  The hint must be set before the window is mapped. 
  1197.    --  "hint": A hint of the function this window will have 
  1198.  
  1199.    function Get_Update_Area 
  1200.       (Self : Gdk.Gdk_Window) return Cairo.Region.Cairo_Region; 
  1201.    pragma Import (C, Get_Update_Area, "gdk_window_get_update_area"); 
  1202.    --  Transfers ownership of the update area from Window to the caller of the 
  1203.    --  function. That is, after calling this function, Window will no longer 
  1204.    --  have an invalid/dirty region; the update area is removed from Window and 
  1205.    --  handed to you. If a window has no update area, 
  1206.    --  Gdk.Window.Get_Update_Area returns null. You are responsible for calling 
  1207.    --  cairo_region_destroy on the returned region if it's non-null. 
  1208.  
  1209.    function Get_Visible_Region 
  1210.       (Self : Gdk.Gdk_Window) return Cairo.Region.Cairo_Region; 
  1211.    pragma Import (C, Get_Visible_Region, "gdk_window_get_visible_region"); 
  1212.    --  Computes the region of the Window that is potentially visible. This 
  1213.    --  does not necessarily take into account if the window is obscured by 
  1214.    --  other windows, but no area outside of this region is visible. 
  1215.  
  1216.    function Get_Visual (Self : Gdk.Gdk_Window) return Gdk.Visual.Gdk_Visual; 
  1217.    pragma Import (C, Get_Visual, "gdk_window_get_visual"); 
  1218.    --  Gets the Gdk.Visual.Gdk_Visual describing the pixel format of Window. 
  1219.    --  Since: gtk+ 2.24 
  1220.  
  1221.    function Get_Width (Self : Gdk.Gdk_Window) return Gint; 
  1222.    pragma Import (C, Get_Width, "gdk_window_get_width"); 
  1223.    --  Returns the width of the given Window. 
  1224.    --  On the X11 platform the returned size is the size reported in the 
  1225.    --  most-recently-processed configure event, rather than the current size on 
  1226.    --  the X server. 
  1227.    --  Since: gtk+ 2.24 
  1228.  
  1229.    function Get_Window_Type (Self : Gdk.Gdk_Window) return Gdk_Window_Type; 
  1230.    pragma Import (C, Get_Window_Type, "gdk_window_get_window_type"); 
  1231.    --  Gets the type of the window. See Gdk.Window.Gdk_Window_Type. 
  1232.  
  1233.    function Has_Native (Self : Gdk.Gdk_Window) return Boolean; 
  1234.    --  Checks whether the window has a native window or not. Note that you can 
  1235.    --  use Gdk.Window.Ensure_Native if a native window is needed. 
  1236.    --  Since: gtk+ 2.22 
  1237.  
  1238.    procedure Hide (Self : Gdk.Gdk_Window); 
  1239.    pragma Import (C, Hide, "gdk_window_hide"); 
  1240.    --  For toplevel windows, withdraws them, so they will no longer be known 
  1241.    --  to the window manager; for all windows, unmaps them, so they won't be 
  1242.    --  displayed. Normally done automatically as part of Gtk.Widget.Hide. 
  1243.  
  1244.    procedure Iconify (Self : Gdk.Gdk_Window); 
  1245.    pragma Import (C, Iconify, "gdk_window_iconify"); 
  1246.    --  Asks to iconify (minimize) Window. The window manager may choose to 
  1247.    --  ignore the request, but normally will honor it. Using Gtk.Window.Iconify 
  1248.    --  is preferred, if you have a Gtk.Window.Gtk_Window widget. 
  1249.    --  This function only makes sense when Window is a toplevel window. 
  1250.  
  1251.    procedure Input_Shape_Combine_Region 
  1252.       (Self         : Gdk.Gdk_Window; 
  1253.        Shape_Region : Cairo.Region.Cairo_Region; 
  1254.        Offset_X     : Gint; 
  1255.        Offset_Y     : Gint); 
  1256.    pragma Import (C, Input_Shape_Combine_Region, "gdk_window_input_shape_combine_region"); 
  1257.    --  Like Gdk.Window.Shape_Combine_Region, but the shape applies only to 
  1258.    --  event handling. Mouse events which happen while the pointer position 
  1259.    --  corresponds to an unset bit in the mask will be passed on the window 
  1260.    --  below Window. 
  1261.    --  An input shape is typically used with RGBA windows. The alpha channel 
  1262.    --  of the window defines which pixels are invisible and allows for nicely 
  1263.    --  antialiased borders, and the input shape controls where the window is 
  1264.    --  "clickable". 
  1265.    --  On the X11 platform, this requires version 1.1 of the shape extension. 
  1266.    --  On the Win32 platform, this functionality is not present and the 
  1267.    --  function does nothing. 
  1268.    --  Since: gtk+ 2.10 
  1269.    --  "shape_region": region of window to be non-transparent 
  1270.    --  "offset_x": X position of Shape_Region in Window coordinates 
  1271.    --  "offset_y": Y position of Shape_Region in Window coordinates 
  1272.  
  1273.    procedure Invalidate_Maybe_Recurse 
  1274.       (Self       : Gdk.Gdk_Window; 
  1275.        Region     : Cairo.Region.Cairo_Region; 
  1276.        Child_Func : Gdk_Window_Child_Func); 
  1277.    --  Adds Region to the update area for Window. The update area is the 
  1278.    --  region that needs to be redrawn, or "dirty region." The call 
  1279.    --  Gdk.Window.Process_Updates sends one or more expose events to the 
  1280.    --  window, which together cover the entire update area. An application 
  1281.    --  would normally redraw the contents of Window in response to those expose 
  1282.    --  events. 
  1283.    --  GDK will call Gdk.Window.Process_All_Updates on your behalf whenever 
  1284.    --  your program returns to the main loop and becomes idle, so normally 
  1285.    --  there's no need to do that manually, you just need to invalidate regions 
  1286.    --  that you know should be redrawn. 
  1287.    --  The Child_Func parameter controls whether the region of each child 
  1288.    --  window that intersects Region will also be invalidated. Only children 
  1289.    --  for which Child_Func returns TRUE will have the area invalidated. 
  1290.    --  "region": a cairo_region_t 
  1291.    --  "child_func": function to use to decide if to recurse to a child, null 
  1292.    --  means never recurse. 
  1293.  
  1294.    generic 
  1295.       type User_Data_Type (<>) is private; 
  1296.       with procedure Destroy (Data : in out User_Data_Type) is null; 
  1297.    package Invalidate_Maybe_Recurse_User_Data is 
  1298.  
  1299.       type Gdk_Window_Child_Func is access function 
  1300.         (Window    : Gdk.Gdk_Window; 
  1301.          User_Data : User_Data_Type) return Boolean; 
  1302.       --  A function of this type is passed to 
  1303.       --  Gdk.Window.Invalidate_Maybe_Recurse. It gets called for each child of 
  1304.       --  the window to determine whether to recursively invalidate it or now. 
  1305.       --  "window": a Gdk.Gdk_Window 
  1306.       --  "user_data": user data 
  1307.  
  1308.       procedure Invalidate_Maybe_Recurse 
  1309.          (Self       : Gdk.Gdk_Window; 
  1310.           Region     : Cairo.Region.Cairo_Region; 
  1311.           Child_Func : Gdk_Window_Child_Func; 
  1312.           User_Data  : User_Data_Type); 
  1313.       --  Adds Region to the update area for Window. The update area is the 
  1314.       --  region that needs to be redrawn, or "dirty region." The call 
  1315.       --  Gdk.Window.Process_Updates sends one or more expose events to the 
  1316.       --  window, which together cover the entire update area. An application 
  1317.       --  would normally redraw the contents of Window in response to those 
  1318.       --  expose events. 
  1319.       --  GDK will call Gdk.Window.Process_All_Updates on your behalf whenever 
  1320.       --  your program returns to the main loop and becomes idle, so normally 
  1321.       --  there's no need to do that manually, you just need to invalidate 
  1322.       --  regions that you know should be redrawn. 
  1323.       --  The Child_Func parameter controls whether the region of each child 
  1324.       --  window that intersects Region will also be invalidated. Only children 
  1325.       --  for which Child_Func returns TRUE will have the area invalidated. 
  1326.       --  "region": a cairo_region_t 
  1327.       --  "child_func": function to use to decide if to recurse to a child, 
  1328.       --  null means never recurse. 
  1329.       --  "user_data": data passed to Child_Func 
  1330.  
  1331.    end Invalidate_Maybe_Recurse_User_Data; 
  1332.  
  1333.    procedure Invalidate_Rect 
  1334.       (Self                : Gdk.Gdk_Window; 
  1335.        Rect                : Gdk.Rectangle.Gdk_Rectangle; 
  1336.        Invalidate_Children : Boolean); 
  1337.    --  A convenience wrapper around Gdk.Window.Invalidate_Region which 
  1338.    --  invalidates a rectangular region. See Gdk.Window.Invalidate_Region for 
  1339.    --  details. 
  1340.    --  "rect": rectangle to invalidate or null to invalidate the whole window 
  1341.    --  "invalidate_children": whether to also invalidate child windows 
  1342.  
  1343.    procedure Invalidate_Region 
  1344.       (Self                : Gdk.Gdk_Window; 
  1345.        Region              : Cairo.Region.Cairo_Region; 
  1346.        Invalidate_Children : Boolean); 
  1347.    --  Adds Region to the update area for Window. The update area is the 
  1348.    --  region that needs to be redrawn, or "dirty region." The call 
  1349.    --  Gdk.Window.Process_Updates sends one or more expose events to the 
  1350.    --  window, which together cover the entire update area. An application 
  1351.    --  would normally redraw the contents of Window in response to those expose 
  1352.    --  events. 
  1353.    --  GDK will call Gdk.Window.Process_All_Updates on your behalf whenever 
  1354.    --  your program returns to the main loop and becomes idle, so normally 
  1355.    --  there's no need to do that manually, you just need to invalidate regions 
  1356.    --  that you know should be redrawn. 
  1357.    --  The Invalidate_Children parameter controls whether the region of each 
  1358.    --  child window that intersects Region will also be invalidated. If False, 
  1359.    --  then the update area for child windows will remain unaffected. See 
  1360.    --  gdk_window_invalidate_maybe_recurse if you need fine grained control 
  1361.    --  over which children are invalidated. 
  1362.    --  "region": a cairo_region_t 
  1363.    --  "invalidate_children": True to also invalidate child windows 
  1364.  
  1365.    function Is_Destroyed (Self : Gdk.Gdk_Window) return Boolean; 
  1366.    --  Check to see if a window is destroyed.. 
  1367.    --  Since: gtk+ 2.18 
  1368.  
  1369.    function Is_Input_Only (Self : Gdk.Gdk_Window) return Boolean; 
  1370.    --  Determines whether or not the window is an input only window. 
  1371.    --  Since: gtk+ 2.22 
  1372.  
  1373.    function Is_Shaped (Self : Gdk.Gdk_Window) return Boolean; 
  1374.    --  Determines whether or not the window is shaped. 
  1375.    --  Since: gtk+ 2.22 
  1376.  
  1377.    function Is_Viewable (Self : Gdk.Gdk_Window) return Boolean; 
  1378.    --  Check if the window and all ancestors of the window are mapped. (This 
  1379.    --  is not necessarily "viewable" in the X sense, since we only check as far 
  1380.    --  as we have GDK window parents, not to the root window.) 
  1381.  
  1382.    function Is_Visible (Self : Gdk.Gdk_Window) return Boolean; 
  1383.    --  Checks whether the window has been mapped (with Gdk.Window.Show or 
  1384.    --  Gdk.Window.Show_Unraised). 
  1385.  
  1386.    procedure Lower (Self : Gdk.Gdk_Window); 
  1387.    pragma Import (C, Lower, "gdk_window_lower"); 
  1388.    --  Lowers Window to the bottom of the Z-order (stacking order), so that 
  1389.    --  other windows with the same parent window appear above Window. This is 
  1390.    --  true whether or not the other windows are visible. 
  1391.    --  If Window is a toplevel, the window manager may choose to deny the 
  1392.    --  request to move the window in the Z-order, Gdk.Window.Lower only 
  1393.    --  requests the restack, does not guarantee it. 
  1394.    --  Note that Gdk.Window.Show raises the window again, so don't call this 
  1395.    --  function before Gdk.Window.Show. (Try Gdk.Window.Show_Unraised.) 
  1396.  
  1397.    procedure Maximize (Self : Gdk.Gdk_Window); 
  1398.    pragma Import (C, Maximize, "gdk_window_maximize"); 
  1399.    --  Maximizes the window. If the window was already maximized, then this 
  1400.    --  function does nothing. 
  1401.    --  On X11, asks the window manager to maximize Window, if the window 
  1402.    --  manager supports this operation. Not all window managers support this, 
  1403.    --  and some deliberately ignore it or don't have a concept of "maximized"; 
  1404.    --  so you can't rely on the maximization actually happening. But it will 
  1405.    --  happen with most standard window managers, and GDK makes a best effort 
  1406.    --  to get it to happen. 
  1407.    --  On Windows, reliably maximizes the window. 
  1408.  
  1409.    procedure Merge_Child_Input_Shapes (Self : Gdk.Gdk_Window); 
  1410.    pragma Import (C, Merge_Child_Input_Shapes, "gdk_window_merge_child_input_shapes"); 
  1411.    --  Merges the input shape masks for any child windows into the input shape 
  1412.    --  mask for Window. i.e. the union of all input masks for Window and its 
  1413.    --  children will become the new input mask for Window. See 
  1414.    --  Gdk.Window.Input_Shape_Combine_Region. 
  1415.    --  This function is distinct from Gdk.Window.Set_Child_Input_Shapes 
  1416.    --  because it includes Window's input shape mask in the set of shapes to be 
  1417.    --  merged. 
  1418.    --  Since: gtk+ 2.10 
  1419.  
  1420.    procedure Merge_Child_Shapes (Self : Gdk.Gdk_Window); 
  1421.    pragma Import (C, Merge_Child_Shapes, "gdk_window_merge_child_shapes"); 
  1422.    --  Merges the shape masks for any child windows into the shape mask for 
  1423.    --  Window. i.e. the union of all masks for Window and its children will 
  1424.    --  become the new mask for Window. See Gdk.Window.Shape_Combine_Region. 
  1425.    --  This function is distinct from Gdk.Window.Set_Child_Shapes because it 
  1426.    --  includes Window's shape mask in the set of shapes to be merged. 
  1427.  
  1428.    procedure Move (Self : Gdk.Gdk_Window; X : Gint; Y : Gint); 
  1429.    pragma Import (C, Move, "gdk_window_move"); 
  1430.    --  Repositions a window relative to its parent window. For toplevel 
  1431.    --  windows, window managers may ignore or modify the move; you should 
  1432.    --  probably use Gtk.Window.Move on a Gtk.Window.Gtk_Window widget anyway, 
  1433.    --  instead of using GDK functions. For child windows, the move will 
  1434.    --  reliably succeed. 
  1435.    --  If you're also planning to resize the window, use 
  1436.    --  Gdk.Window.Move_Resize to both move and resize simultaneously, for a 
  1437.    --  nicer visual effect. 
  1438.    --  "x": X coordinate relative to window's parent 
  1439.    --  "y": Y coordinate relative to window's parent 
  1440.  
  1441.    procedure Move_Region 
  1442.       (Self   : Gdk.Gdk_Window; 
  1443.        Region : Cairo.Region.Cairo_Region; 
  1444.        Dx     : Gint; 
  1445.        Dy     : Gint); 
  1446.    pragma Import (C, Move_Region, "gdk_window_move_region"); 
  1447.    --  Move the part of Window indicated by Region by Dy pixels in the Y 
  1448.    --  direction and Dx pixels in the X direction. The portions of Region that 
  1449.    --  not covered by the new position of Region are invalidated. 
  1450.    --  Child windows are not moved. 
  1451.    --  Since: gtk+ 2.8 
  1452.    --  "region": The cairo_region_t to move 
  1453.    --  "dx": Amount to move in the X direction 
  1454.    --  "dy": Amount to move in the Y direction 
  1455.  
  1456.    procedure Move_Resize 
  1457.       (Self   : Gdk.Gdk_Window; 
  1458.        X      : Gint; 
  1459.        Y      : Gint; 
  1460.        Width  : Gint; 
  1461.        Height : Gint); 
  1462.    pragma Import (C, Move_Resize, "gdk_window_move_resize"); 
  1463.    --  Equivalent to calling Gdk.Window.Move and Gdk.Window.Resize, except 
  1464.    --  that both operations are performed at once, avoiding strange visual 
  1465.    --  effects. (i.e. the user may be able to see the window first move, then 
  1466.    --  resize, if you don't use Gdk.Window.Move_Resize.) 
  1467.    --  "x": new X position relative to window's parent 
  1468.    --  "y": new Y position relative to window's parent 
  1469.    --  "width": new width 
  1470.    --  "height": new height 
  1471.  
  1472.    function Peek_Children 
  1473.       (Self : Gdk.Gdk_Window) return Gdk_Window_List.Glist; 
  1474.    --  Like Gdk.Window.Get_Children, but does not copy the list of children, 
  1475.    --  so the list does not need to be freed. 
  1476.  
  1477.    procedure Process_Updates 
  1478.       (Self            : Gdk.Gdk_Window; 
  1479.        Update_Children : Boolean); 
  1480.    --  Sends one or more expose events to Window. The areas in each expose 
  1481.    --  event will cover the entire update area for the window (see 
  1482.    --  Gdk.Window.Invalidate_Region for details). Normally GDK calls 
  1483.    --  Gdk.Window.Process_All_Updates on your behalf, so there's no need to 
  1484.    --  call this function unless you want to force expose events to be 
  1485.    --  delivered immediately and synchronously (vs. the usual case, where GDK 
  1486.    --  delivers them in an idle handler). Occasionally this is useful to 
  1487.    --  produce nicer scrolling behavior, for example. 
  1488.    --  "update_children": whether to also process updates for child windows 
  1489.  
  1490.    procedure Gdk_Raise (Self : Gdk.Gdk_Window); 
  1491.    pragma Import (C, Gdk_Raise, "gdk_window_raise"); 
  1492.    --  Raises Window to the top of the Z-order (stacking order), so that other 
  1493.    --  windows with the same parent window appear below Window. This is true 
  1494.    --  whether or not the windows are visible. 
  1495.    --  If Window is a toplevel, the window manager may choose to deny the 
  1496.    --  request to move the window in the Z-order, Gdk.Window.Gdk_Raise only 
  1497.    --  requests the restack, does not guarantee it. 
  1498.  
  1499.    procedure Register_Dnd (Self : Gdk.Gdk_Window); 
  1500.    pragma Import (C, Register_Dnd, "gdk_window_register_dnd"); 
  1501.    --  Registers a window as a potential drop destination. 
  1502.  
  1503.    procedure Reparent 
  1504.       (Self       : Gdk.Gdk_Window; 
  1505.        New_Parent : Gdk.Gdk_Window; 
  1506.        X          : Gint; 
  1507.        Y          : Gint); 
  1508.    pragma Import (C, Reparent, "gdk_window_reparent"); 
  1509.    --  Reparents Window into the given New_Parent. The window being reparented 
  1510.    --  will be unmapped as a side effect. 
  1511.    --  "new_parent": new parent to move Window into 
  1512.    --  "x": X location inside the new parent 
  1513.    --  "y": Y location inside the new parent 
  1514.  
  1515.    procedure Resize (Self : Gdk.Gdk_Window; Width : Gint; Height : Gint); 
  1516.    pragma Import (C, Resize, "gdk_window_resize"); 
  1517.    --  Resizes Window; for toplevel windows, asks the window manager to resize 
  1518.    --  the window. The window manager may not allow the resize. When using 
  1519.    --  GTK+, use Gtk.Window.Resize instead of this low-level GDK function. 
  1520.    --  Windows may not be resized below 1x1. 
  1521.    --  If you're also planning to move the window, use Gdk.Window.Move_Resize 
  1522.    --  to both move and resize simultaneously, for a nicer visual effect. 
  1523.    --  "width": new width of the window 
  1524.    --  "height": new height of the window 
  1525.  
  1526.    procedure Restack 
  1527.       (Self    : Gdk.Gdk_Window; 
  1528.        Sibling : Gdk.Gdk_Window; 
  1529.        Above   : Boolean); 
  1530.    --  Changes the position of Window in the Z-order (stacking order), so that 
  1531.    --  it is above Sibling (if Above is True) or below Sibling (if Above is 
  1532.    --  False). 
  1533.    --  If Sibling is null, then this either raises (if Above is True) or 
  1534.    --  lowers the window. 
  1535.    --  If Window is a toplevel, the window manager may choose to deny the 
  1536.    --  request to move the window in the Z-order, Gdk.Window.Restack only 
  1537.    --  requests the restack, does not guarantee it. 
  1538.    --  Since: gtk+ 2.18 
  1539.    --  "sibling": a Gdk.Gdk_Window that is a sibling of Window, or null 
  1540.    --  "above": a boolean 
  1541.  
  1542.    procedure Scroll (Self : Gdk.Gdk_Window; Dx : Gint; Dy : Gint); 
  1543.    pragma Import (C, Scroll, "gdk_window_scroll"); 
  1544.    --  Scroll the contents of Window, both pixels and children, by the given 
  1545.    --  amount. Window itself does not move. Portions of the window that the 
  1546.    --  scroll operation brings in from offscreen areas are invalidated. The 
  1547.    --  invalidated region may be bigger than what would strictly be necessary. 
  1548.    --  For X11, a minimum area will be invalidated if the window has no 
  1549.    --  subwindows, or if the edges of the window's parent do not extend beyond 
  1550.    --  the edges of the window. In other cases, a multi-step process is used to 
  1551.    --  scroll the window which may produce temporary visual artifacts and 
  1552.    --  unnecessary invalidations. 
  1553.    --  "dx": Amount to scroll in the X direction 
  1554.    --  "dy": Amount to scroll in the Y direction 
  1555.  
  1556.    procedure Set_Background 
  1557.       (Self  : Gdk.Gdk_Window; 
  1558.        Color : Gdk.Color.Gdk_Color); 
  1559.    pragma Import (C, Set_Background, "gdk_window_set_background"); 
  1560.    pragma Obsolescent (Set_Background); 
  1561.    --  Sets the background color of Window. (However, when using GTK+, set the 
  1562.    --  background of a widget with Gtk.Widget.Modify_Bg - if you're an 
  1563.    --  application - or Gtk.Style.Set_Background - if you're implementing a 
  1564.    --  custom widget.) 
  1565.    --  See also Gdk.Window.Set_Background_Pattern. 
  1566.    --  Deprecated since 3.4, Use Gdk.Window.Set_Background_Rgba instead. 
  1567.    --  "color": a Gdk.Color.Gdk_Color 
  1568.  
  1569.    procedure Set_Background_Rgba 
  1570.       (Self : Gdk.Gdk_Window; 
  1571.        Rgba : Gdk.RGBA.Gdk_RGBA); 
  1572.    pragma Import (C, Set_Background_Rgba, "gdk_window_set_background_rgba"); 
  1573.    --  Sets the background color of Window. 
  1574.    --  See also Gdk.Window.Set_Background_Pattern. 
  1575.    --  "rgba": a Gdk.RGBA.Gdk_RGBA color 
  1576.  
  1577.    procedure Set_Child_Input_Shapes (Self : Gdk.Gdk_Window); 
  1578.    pragma Import (C, Set_Child_Input_Shapes, "gdk_window_set_child_input_shapes"); 
  1579.    --  Sets the input shape mask of Window to the union of input shape masks 
  1580.    --  for all children of Window, ignoring the input shape mask of Window 
  1581.    --  itself. Contrast with Gdk.Window.Merge_Child_Input_Shapes which includes 
  1582.    --  the input shape mask of Window in the masks to be merged. 
  1583.    --  Since: gtk+ 2.10 
  1584.  
  1585.    procedure Set_Child_Shapes (Self : Gdk.Gdk_Window); 
  1586.    pragma Import (C, Set_Child_Shapes, "gdk_window_set_child_shapes"); 
  1587.    --  Sets the shape mask of Window to the union of shape masks for all 
  1588.    --  children of Window, ignoring the shape mask of Window itself. Contrast 
  1589.    --  with Gdk.Window.Merge_Child_Shapes which includes the shape mask of 
  1590.    --  Window in the masks to be merged. 
  1591.  
  1592.    procedure Set_Functions 
  1593.       (Self      : Gdk.Gdk_Window; 
  1594.        Functions : Gdk_WMFunction); 
  1595.    pragma Import (C, Set_Functions, "gdk_window_set_functions"); 
  1596.    --  Sets hints about the window management functions to make available via 
  1597.    --  buttons on the window frame. 
  1598.    --  On the X backend, this function sets the traditional Motif window 
  1599.    --  manager hint for this purpose. However, few window managers do anything 
  1600.    --  reliable or interesting with this hint. Many ignore it entirely. 
  1601.    --  The Functions argument is the logical OR of values from the 
  1602.    --  Gdk.Window.Gdk_WMFunction enumeration. If the bitmask includes 
  1603.    --  GDK_FUNC_ALL, then the other bits indicate which functions to disable; 
  1604.    --  if it doesn't include GDK_FUNC_ALL, it indicates which functions to 
  1605.    --  enable. 
  1606.    --  "functions": bitmask of operations to allow on Window 
  1607.  
  1608.    procedure Set_Geometry_Hints 
  1609.       (Self      : Gdk.Gdk_Window; 
  1610.        Geometry  : Gdk_Geometry; 
  1611.        Geom_Mask : Gdk_Window_Hints); 
  1612.    pragma Import (C, Set_Geometry_Hints, "gdk_window_set_geometry_hints"); 
  1613.    --  Sets the geometry hints for Window. Hints flagged in Geom_Mask are set, 
  1614.    --  hints not flagged in Geom_Mask are unset. To unset all hints, use a 
  1615.    --  Geom_Mask of 0 and a Geometry of null. 
  1616.    --  This function provides hints to the windowing system about acceptable 
  1617.    --  sizes for a toplevel window. The purpose of this is to constrain user 
  1618.    --  resizing, but the windowing system will typically (but is not required 
  1619.    --  to) also constrain the current size of the window to the provided values 
  1620.    --  and constrain programatic resizing via Gdk.Window.Resize or 
  1621.    --  Gdk.Window.Move_Resize. 
  1622.    --  Note that on X11, this effect has no effect on windows of type 
  1623.    --  Gdk.Window_Temp or windows where override redirect has been turned on 
  1624.    --  via Gdk.Window.Set_Override_Redirect since these windows are not 
  1625.    --  resizable by the user. 
  1626.    --  Since you can't count on the windowing system doing the constraints for 
  1627.    --  programmatic resizes, you should generally call 
  1628.    --  Gdk.Window.Constrain_Size yourself to determine appropriate sizes. 
  1629.    --  "geometry": geometry hints 
  1630.    --  "geom_mask": bitmask indicating fields of Geometry to pay attention to 
  1631.  
  1632.    procedure Set_Icon_Name (Self : Gdk.Gdk_Window; Name : UTF8_String := ""); 
  1633.    --  Windows may have a name used while minimized, distinct from the name 
  1634.    --  they display in their titlebar. Most of the time this is a bad idea from 
  1635.    --  a user interface standpoint. But you can set such a name with this 
  1636.    --  function, if you like. 
  1637.    --  After calling this with a non-null Name, calls to Gdk.Window.Set_Title 
  1638.    --  will not update the icon title. 
  1639.    --  Using null for Name unsets the icon title; further calls to 
  1640.    --  Gdk.Window.Set_Title will again update the icon title as well. 
  1641.    --  "name": name of window while iconified (minimized) 
  1642.  
  1643.    procedure Set_Keep_Above (Self : Gdk.Gdk_Window; Setting : Boolean); 
  1644.    --  Set if Window must be kept above other windows. If the window was 
  1645.    --  already above, then this function does nothing. 
  1646.    --  On X11, asks the window manager to keep Window above, if the window 
  1647.    --  manager supports this operation. Not all window managers support this, 
  1648.    --  and some deliberately ignore it or don't have a concept of "keep above"; 
  1649.    --  so you can't rely on the window being kept above. But it will happen 
  1650.    --  with most standard window managers, and GDK makes a best effort to get 
  1651.    --  it to happen. 
  1652.    --  Since: gtk+ 2.4 
  1653.    --  "setting": whether to keep Window above other windows 
  1654.  
  1655.    procedure Set_Keep_Below (Self : Gdk.Gdk_Window; Setting : Boolean); 
  1656.    --  Set if Window must be kept below other windows. If the window was 
  1657.    --  already below, then this function does nothing. 
  1658.    --  On X11, asks the window manager to keep Window below, if the window 
  1659.    --  manager supports this operation. Not all window managers support this, 
  1660.    --  and some deliberately ignore it or don't have a concept of "keep below"; 
  1661.    --  so you can't rely on the window being kept below. But it will happen 
  1662.    --  with most standard window managers, and GDK makes a best effort to get 
  1663.    --  it to happen. 
  1664.    --  Since: gtk+ 2.4 
  1665.    --  "setting": whether to keep Window below other windows 
  1666.  
  1667.    procedure Set_Opacity (Self : Gdk.Gdk_Window; Opacity : Gdouble); 
  1668.    pragma Import (C, Set_Opacity, "gdk_window_set_opacity"); 
  1669.    --  Set Window to render as partially transparent, with opacity 0 being 
  1670.    --  fully transparent and 1 fully opaque. (Values of the opacity parameter 
  1671.    --  are clamped to the [0,1] range.) 
  1672.    --  For toplevel windows this depends on support from the windowing system 
  1673.    --  that may not always be there. For instance, On X11, this works only on X 
  1674.    --  screens with a compositing manager running. 
  1675.    --  For child windows this function only works for non-native windows. 
  1676.    --  For setting up per-pixel alpha topelevels, see 
  1677.    --  Gdk.Screen.Get_Rgba_Visual, and for non-toplevels, see 
  1678.    --  Gdk.Window.Set_Composited. 
  1679.    --  Support for non-toplevel windows was added in 3.8. 
  1680.    --  Since: gtk+ 2.12 
  1681.    --  "opacity": opacity 
  1682.  
  1683.    procedure Set_Override_Redirect 
  1684.       (Self              : Gdk.Gdk_Window; 
  1685.        Override_Redirect : Boolean); 
  1686.    --  An override redirect window is not under the control of the window 
  1687.    --  manager. This means it won't have a titlebar, won't be minimizable, etc. 
  1688.    --  - it will be entirely under the control of the application. The window 
  1689.    --  manager can't see the override redirect window at all. 
  1690.    --  Override redirect should only be used for short-lived temporary 
  1691.    --  windows, such as popup menus. Gtk.Menu.Gtk_Menu uses an override 
  1692.    --  redirect window in its implementation, for example. 
  1693.    --  "override_redirect": True if window should be override redirect 
  1694.  
  1695.    procedure Set_Role (Self : Gdk.Gdk_Window; Role : UTF8_String); 
  1696.    --  When using GTK+, typically you should use Gtk.Window.Set_Role instead 
  1697.    --  of this low-level function. 
  1698.    --  The window manager and session manager use a window's role to 
  1699.    --  distinguish it from other kinds of window in the same application. When 
  1700.    --  an application is restarted after being saved in a previous session, all 
  1701.    --  windows with the same title and role are treated as interchangeable. So 
  1702.    --  if you have two windows with the same title that should be distinguished 
  1703.    --  for session management purposes, you should set the role on those 
  1704.    --  windows. It doesn't matter what string you use for the role, as long as 
  1705.    --  you have a different role for each non-interchangeable kind of window. 
  1706.    --  "role": a string indicating its role 
  1707.  
  1708.    procedure Set_Skip_Pager_Hint 
  1709.       (Self        : Gdk.Gdk_Window; 
  1710.        Skips_Pager : Boolean); 
  1711.    --  Toggles whether a window should appear in a pager (workspace switcher, 
  1712.    --  or other desktop utility program that displays a small thumbnail 
  1713.    --  representation of the windows on the desktop). If a window's semantic 
  1714.    --  type as specified with Gdk.Window.Set_Type_Hint already fully describes 
  1715.    --  the window, this function should *not* be called in addition, instead 
  1716.    --  you should allow the window to be treated according to standard policy 
  1717.    --  for its semantic type. 
  1718.    --  Since: gtk+ 2.2 
  1719.    --  "skips_pager": True to skip the pager 
  1720.  
  1721.    procedure Set_Skip_Taskbar_Hint 
  1722.       (Self          : Gdk.Gdk_Window; 
  1723.        Skips_Taskbar : Boolean); 
  1724.    --  Toggles whether a window should appear in a task list or window list. 
  1725.    --  If a window's semantic type as specified with Gdk.Window.Set_Type_Hint 
  1726.    --  already fully describes the window, this function should *not* be called 
  1727.    --  in addition, instead you should allow the window to be treated according 
  1728.    --  to standard policy for its semantic type. 
  1729.    --  Since: gtk+ 2.2 
  1730.    --  "skips_taskbar": True to skip the taskbar 
  1731.  
  1732.    procedure Set_Startup_Id 
  1733.       (Self       : Gdk.Gdk_Window; 
  1734.        Startup_Id : UTF8_String); 
  1735.    --  When using GTK+, typically you should use Gtk.Window.Set_Startup_Id 
  1736.    --  instead of this low-level function. 
  1737.    --  Since: gtk+ 2.12 
  1738.    --  "startup_id": a string with startup-notification identifier 
  1739.  
  1740.    function Set_Static_Gravities 
  1741.       (Self       : Gdk.Gdk_Window; 
  1742.        Use_Static : Boolean) return Boolean; 
  1743.    --  Set the bit gravity of the given window to static, and flag it so all 
  1744.    --  children get static subwindow gravity. This is used if you are 
  1745.    --  implementing scary features that involve deep knowledge of the windowing 
  1746.    --  system. Don't worry about it unless you have to. 
  1747.    --  "use_static": True to turn on static gravity 
  1748.  
  1749.    procedure Set_Title (Self : Gdk.Gdk_Window; Title : UTF8_String); 
  1750.    --  Sets the title of a toplevel window, to be displayed in the titlebar. 
  1751.    --  If you haven't explicitly set the icon name for the window (using 
  1752.    --  Gdk.Window.Set_Icon_Name), the icon name will be set to Title as well. 
  1753.    --  Title must be in UTF-8 encoding (as with all user-readable strings in 
  1754.    --  GDK/GTK+). Title may not be null. 
  1755.    --  "title": title of Window 
  1756.  
  1757.    procedure Set_Transient_For 
  1758.       (Self   : Gdk.Gdk_Window; 
  1759.        Parent : Gdk.Gdk_Window); 
  1760.    pragma Import (C, Set_Transient_For, "gdk_window_set_transient_for"); 
  1761.    --  Indicates to the window manager that Window is a transient dialog 
  1762.    --  associated with the application window Parent. This allows the window 
  1763.    --  manager to do things like center Window on Parent and keep Window above 
  1764.    --  Parent. 
  1765.    --  See Gtk.Window.Set_Transient_For if you're using Gtk.Window.Gtk_Window 
  1766.    --  or Gtk.Dialog.Gtk_Dialog. 
  1767.    --  "parent": another toplevel Gdk.Gdk_Window 
  1768.  
  1769.    procedure Set_Urgency_Hint (Self : Gdk.Gdk_Window; Urgent : Boolean); 
  1770.    --  Toggles whether a window needs the user's urgent attention. 
  1771.    --  Since: gtk+ 2.8 
  1772.    --  "urgent": True if the window is urgent 
  1773.  
  1774.    procedure Set_User_Data 
  1775.       (Self      : Gdk.Gdk_Window; 
  1776.        User_Data : System.Address); 
  1777.    pragma Import (C, Set_User_Data, "gdk_window_set_user_data"); 
  1778.    --  For most purposes this function is deprecated in favor of 
  1779.    --  g_object_set_data. However, for historical reasons GTK+ stores the 
  1780.    --  Gtk.Widget.Gtk_Widget that owns a Gdk.Gdk_Window as user data on the 
  1781.    --  Gdk.Gdk_Window. So, custom widget implementations should use this 
  1782.    --  function for that. If GTK+ receives an event for a Gdk.Gdk_Window, and 
  1783.    --  the user data for the window is non-null, GTK+ will assume the user data 
  1784.    --  is a Gtk.Widget.Gtk_Widget, and forward the event to that widget. 
  1785.    --  "user_data": user data 
  1786.  
  1787.    procedure Shape_Combine_Region 
  1788.       (Self         : Gdk.Gdk_Window; 
  1789.        Shape_Region : Cairo.Region.Cairo_Region; 
  1790.        Offset_X     : Gint; 
  1791.        Offset_Y     : Gint); 
  1792.    pragma Import (C, Shape_Combine_Region, "gdk_window_shape_combine_region"); 
  1793.    --  Makes pixels in Window outside Shape_Region be transparent, so that the 
  1794.    --  window may be nonrectangular. 
  1795.    --  If Shape_Region is null, the shape will be unset, so the whole window 
  1796.    --  will be opaque again. Offset_X and Offset_Y are ignored if Shape_Region 
  1797.    --  is null. 
  1798.    --  On the X11 platform, this uses an X server extension which is widely 
  1799.    --  available on most common platforms, but not available on very old X 
  1800.    --  servers, and occasionally the implementation will be buggy. On servers 
  1801.    --  without the shape extension, this function will do nothing. 
  1802.    --  This function works on both toplevel and child windows. 
  1803.    --  "shape_region": region of window to be non-transparent 
  1804.    --  "offset_x": X position of Shape_Region in Window coordinates 
  1805.    --  "offset_y": Y position of Shape_Region in Window coordinates 
  1806.  
  1807.    procedure Show (Self : Gdk.Gdk_Window); 
  1808.    pragma Import (C, Show, "gdk_window_show"); 
  1809.    --  Like Gdk.Window.Show_Unraised, but also raises the window to the top of 
  1810.    --  the window stack (moves the window to the front of the Z-order). 
  1811.    --  This function maps a window so it's visible onscreen. Its opposite is 
  1812.    --  Gdk.Window.Hide. 
  1813.    --  When implementing a Gtk.Widget.Gtk_Widget, you should call this 
  1814.    --  function on the widget's Gdk.Gdk_Window as part of the "map" method. 
  1815.  
  1816.    procedure Show_Unraised (Self : Gdk.Gdk_Window); 
  1817.    pragma Import (C, Show_Unraised, "gdk_window_show_unraised"); 
  1818.    --  Shows a Gdk.Gdk_Window onscreen, but does not modify its stacking 
  1819.    --  order. In contrast, Gdk.Window.Show will raise the window to the top of 
  1820.    --  the window stack. 
  1821.    --  On the X11 platform, in Xlib terms, this function calls XMapWindow (it 
  1822.    --  also updates some internal GDK state, which means that you can't really 
  1823.    --  use XMapWindow directly on a GDK window). 
  1824.  
  1825.    procedure Stick (Self : Gdk.Gdk_Window); 
  1826.    pragma Import (C, Stick, "gdk_window_stick"); 
  1827.    --  "Pins" a window such that it's on all workspaces and does not scroll 
  1828.    --  with viewports, for window managers that have scrollable viewports. 
  1829.    --  (When using Gtk.Window.Gtk_Window, Gtk.Window.Stick may be more useful.) 
  1830.    --  On the X11 platform, this function depends on window manager support, 
  1831.    --  so may have no effect with many window managers. However, GDK will do 
  1832.    --  the best it can to convince the window manager to stick the window. For 
  1833.    --  window managers that don't support this operation, there's nothing you 
  1834.    --  can do to force it to happen. 
  1835.  
  1836.    procedure Thaw_Toplevel_Updates_Libgtk_Only (Self : Gdk.Gdk_Window); 
  1837.    pragma Import (C, Thaw_Toplevel_Updates_Libgtk_Only, "gdk_window_thaw_toplevel_updates_libgtk_only"); 
  1838.    --  Thaws a window frozen with 
  1839.    --  Gdk.Window.Freeze_Toplevel_Updates_Libgtk_Only. 
  1840.    --  This function is not part of the GDK public API and is only for use by 
  1841.    --  GTK+. 
  1842.  
  1843.    procedure Thaw_Updates (Self : Gdk.Gdk_Window); 
  1844.    pragma Import (C, Thaw_Updates, "gdk_window_thaw_updates"); 
  1845.    --  Thaws a window frozen with Gdk.Window.Freeze_Updates. 
  1846.  
  1847.    procedure Unfullscreen (Self : Gdk.Gdk_Window); 
  1848.    pragma Import (C, Unfullscreen, "gdk_window_unfullscreen"); 
  1849.    --  Moves the window out of fullscreen mode. If the window was not 
  1850.    --  fullscreen, does nothing. 
  1851.    --  On X11, asks the window manager to move Window out of the fullscreen 
  1852.    --  state, if the window manager supports this operation. Not all window 
  1853.    --  managers support this, and some deliberately ignore it or don't have a 
  1854.    --  concept of "fullscreen"; so you can't rely on the unfullscreenification 
  1855.    --  actually happening. But it will happen with most standard window 
  1856.    --  managers, and GDK makes a best effort to get it to happen. 
  1857.    --  Since: gtk+ 2.2 
  1858.  
  1859.    procedure Unmaximize (Self : Gdk.Gdk_Window); 
  1860.    pragma Import (C, Unmaximize, "gdk_window_unmaximize"); 
  1861.    --  Unmaximizes the window. If the window wasn't maximized, then this 
  1862.    --  function does nothing. 
  1863.    --  On X11, asks the window manager to unmaximize Window, if the window 
  1864.    --  manager supports this operation. Not all window managers support this, 
  1865.    --  and some deliberately ignore it or don't have a concept of "maximized"; 
  1866.    --  so you can't rely on the unmaximization actually happening. But it will 
  1867.    --  happen with most standard window managers, and GDK makes a best effort 
  1868.    --  to get it to happen. 
  1869.    --  On Windows, reliably unmaximizes the window. 
  1870.  
  1871.    procedure Unstick (Self : Gdk.Gdk_Window); 
  1872.    pragma Import (C, Unstick, "gdk_window_unstick"); 
  1873.    --  Reverse operation for Gdk.Window.Stick; see Gdk.Window.Stick, and 
  1874.    --  Gtk.Window.Unstick. 
  1875.  
  1876.    procedure Withdraw (Self : Gdk.Gdk_Window); 
  1877.    pragma Import (C, Withdraw, "gdk_window_withdraw"); 
  1878.    --  Withdraws a window (unmaps it and asks the window manager to forget 
  1879.    --  about it). This function is not really useful as Gdk.Window.Hide 
  1880.    --  automatically withdraws toplevel windows before hiding them. 
  1881.  
  1882.    ---------------------- 
  1883.    -- GtkAda additions -- 
  1884.    ---------------------- 
  1885.  
  1886.    function Get_User_Data (Window : Gdk_Window) return Glib.Object.GObject; 
  1887.    --  Return the widget to which events are reported when they happen on 
  1888.    --  Window. This is the widget that was set through the call to 
  1889.    --  Set_User_data. 
  1890.  
  1891.    procedure Set_User_Data 
  1892.      (Window : Gdk_Window; 
  1893.       Widget : access Glib.Object.GObject_Record'Class); 
  1894.    --  Sets a special field in the window. 
  1895.    --  All the events reported by the Xserver (or the Windows server) for 
  1896.    --  Window will be redirected to Widget through the standard signals 
  1897.    --  "expose_event", "button_press_event", ... 
  1898.    --  You almost always need to call this function after creating a new 
  1899.    --  Gdk_Window yourself, or you won't be able to handle the events. 
  1900.  
  1901.    procedure Ref (Window : Gdk_Window); 
  1902.    procedure Unref (Window : Gdk_Window); 
  1903.    pragma Import (C, Ref, "g_object_ref"); 
  1904.    pragma Import (C, Unref, "g_object_unref"); 
  1905.  
  1906.    --------------- 
  1907.    -- Functions -- 
  1908.    --------------- 
  1909.  
  1910.    procedure At_Pointer 
  1911.       (Win_X  : out Gint; 
  1912.        Win_Y  : out Gint; 
  1913.        Window : out Gdk.Gdk_Window); 
  1914.    pragma Obsolescent (At_Pointer); 
  1915.    --  Obtains the window underneath the mouse pointer, returning the location 
  1916.    --  of that window in Win_X, Win_Y. Returns null if the window under the 
  1917.    --  mouse pointer is not known to GDK (if the window belongs to another 
  1918.    --  application and a Gdk.Gdk_Window hasn't been created for it with 
  1919.    --  gdk_window_foreign_new) 
  1920.    --  NOTE: For multihead-aware widgets or applications use 
  1921.    --  gdk_display_get_window_at_pointer instead. 
  1922.    --  Deprecated since 3.0, Use gdk_device_get_window_at_position instead. 
  1923.    --  "win_x": return location for origin of the window under the pointer 
  1924.    --  "win_y": return location for origin of the window under the pointer 
  1925.  
  1926.    procedure Constrain_Size 
  1927.       (Geometry   : Gdk_Geometry; 
  1928.        Flags      : Guint; 
  1929.        Width      : Gint; 
  1930.        Height     : Gint; 
  1931.        New_Width  : out Gint; 
  1932.        New_Height : out Gint); 
  1933.    pragma Import (C, Constrain_Size, "gdk_window_constrain_size"); 
  1934.    --  Constrains a desired width and height according to a set of geometry 
  1935.    --  hints (such as minimum and maximum size). 
  1936.    --  "geometry": a Gdk.Window.Gdk_Geometry structure 
  1937.    --  "flags": a mask indicating what portions of Geometry are set 
  1938.    --  "width": desired width of window 
  1939.    --  "height": desired height of the window 
  1940.    --  "new_width": location to store resulting width 
  1941.    --  "new_height": location to store resulting height 
  1942.  
  1943.    procedure Process_All_Updates; 
  1944.    pragma Import (C, Process_All_Updates, "gdk_window_process_all_updates"); 
  1945.    --  Calls Gdk.Window.Process_Updates for all windows (see Gdk.Gdk_Window) 
  1946.    --  in the application. 
  1947.  
  1948.    procedure Set_Debug_Updates (Setting : Boolean); 
  1949.    --  With update debugging enabled, calls to Gdk.Window.Invalidate_Region 
  1950.    --  clear the invalidated region of the screen to a noticeable color, and 
  1951.    --  GDK pauses for a short time before sending exposes to windows during 
  1952.    --  Gdk.Window.Process_Updates. The net effect is that you can see the 
  1953.    --  invalid region for each window and watch redraws as they occur. This 
  1954.    --  allows you to diagnose inefficiencies in your application. 
  1955.    --  In essence, because the GDK rendering model prevents all flicker, if 
  1956.    --  you are redrawing the same region 400 times you may never notice, aside 
  1957.    --  from noticing a speed problem. Enabling update debugging causes GTK to 
  1958.    --  flicker slowly and noticeably, so you can see exactly what's being 
  1959.    --  redrawn when, in what order. 
  1960.    --  The --gtk-debug=updates command line option passed to GTK+ programs 
  1961.    --  enables this debug option at application startup time. That's usually 
  1962.    --  more useful than calling Gdk.Window.Set_Debug_Updates yourself, though 
  1963.    --  you might want to use this function to enable updates sometime after 
  1964.    --  application startup time. 
  1965.    --  "setting": True to turn on update debugging 
  1966.  
  1967.    ---------------- 
  1968.    -- Properties -- 
  1969.    ---------------- 
  1970.    --  The following properties are defined for this widget. See 
  1971.    --  Glib.Properties for more information on properties) 
  1972.  
  1973.    Cursor_Property : constant Glib.Properties.Property_Boxed; 
  1974.    --  Type: Cursor 
  1975.    --  The mouse pointer for a Gdk.Gdk_Window. See Gdk.Window.Set_Cursor and 
  1976.    --  Gdk.Window.Get_Cursor for details. 
  1977.  
  1978.    ------------- 
  1979.    -- Signals -- 
  1980.    ------------- 
  1981.  
  1982.    Signal_Create_Surface : constant Glib.Signal_Name := "create-surface"; 
  1983.    --  The ::create-surface signal is emitted when an offscreen window needs 
  1984.    --  its surface (re)created, which happens either when the the window is 
  1985.    --  first drawn to, or when the window is being resized. The first signal 
  1986.    --  handler that returns a non-null surface will stop any further signal 
  1987.    --  emission, and its surface will be used. 
  1988.    -- 
  1989.    --  Note that it is not possible to access the window's previous surface 
  1990.    --  from within any callback of this signal. Calling 
  1991.    --  gdk_offscreen_window_get_surface will lead to a crash. 
  1992.    --    function Handler 
  1993.    --       (Self   : Gdk_Window; 
  1994.    --        Width  : Gint; 
  1995.    --        Height : Gint) return Cairo.Cairo_Surface 
  1996.    --  
  1997.    --  Callback parameters: 
  1998.    --    --  "width": the width of the offscreen surface to create 
  1999.    --    --  "height": the height of the offscreen surface to create 
  2000.    --    --  Returns the newly created cairo_surface_t for the offscreen window 
  2001.  
  2002.    Signal_From_Embedder : constant Glib.Signal_Name := "from-embedder"; 
  2003.    --  The ::from-embedder signal is emitted to translate coordinates in the 
  2004.    --  embedder of an offscreen window to the offscreen window. 
  2005.    -- 
  2006.    --  See also Gtk.Window.Gtk_Window::to-embedder. 
  2007.    --    procedure Handler 
  2008.    --       (Self        : Gdk_Window; 
  2009.    --        Embedder_X  : Gdouble; 
  2010.    --        Embedder_Y  : Gdouble; 
  2011.    --        Offscreen_X : out System.Address; 
  2012.    --        Offscreen_Y : out System.Address) 
  2013.    --  
  2014.    --  Callback parameters: 
  2015.    --    --  "embedder_x": x coordinate in the embedder window 
  2016.    --    --  "embedder_y": y coordinate in the embedder window 
  2017.    --    --  "offscreen_x": return location for the x coordinate in the offscreen 
  2018.    --    --  window 
  2019.    --    --  "offscreen_y": return location for the y coordinate in the offscreen 
  2020.    --    --  window 
  2021.  
  2022.    Signal_Pick_Embedded_Child : constant Glib.Signal_Name := "pick-embedded-child"; 
  2023.    --  The ::pick-embedded-child signal is emitted to find an embedded child 
  2024.    --  at the given position. 
  2025.    --    function Handler 
  2026.    --       (Self : Gdk_Window; 
  2027.    --        X    : Gdouble; 
  2028.    --        Y    : Gdouble) return Gtk.Window.Gtk_Window 
  2029.    --  
  2030.    --  Callback parameters: 
  2031.    --    --  "x": x coordinate in the window 
  2032.    --    --  "y": y coordinate in the window 
  2033.    --    --  Returns the Gdk.Gdk_Window of the embedded child at X, Y, or null 
  2034.  
  2035.    Signal_To_Embedder : constant Glib.Signal_Name := "to-embedder"; 
  2036.    --  The ::to-embedder signal is emitted to translate coordinates in an 
  2037.    --  offscreen window to its embedder. 
  2038.    -- 
  2039.    --  See also Gtk.Window.Gtk_Window::from-embedder. 
  2040.    --    procedure Handler 
  2041.    --       (Self        : Gdk_Window; 
  2042.    --        Offscreen_X : Gdouble; 
  2043.    --        Offscreen_Y : Gdouble; 
  2044.    --        Embedder_X  : out System.Address; 
  2045.    --        Embedder_Y  : out System.Address) 
  2046.    --  
  2047.    --  Callback parameters: 
  2048.    --    --  "offscreen_x": x coordinate in the offscreen window 
  2049.    --    --  "offscreen_y": y coordinate in the offscreen window 
  2050.    --    --  "embedder_x": return location for the x coordinate in the embedder 
  2051.    --    --  window 
  2052.    --    --  "embedder_y": return location for the y coordinate in the embedder 
  2053.    --    --  window 
  2054.  
  2055. private 
  2056.    Cursor_Property : constant Glib.Properties.Property_Boxed := 
  2057.      Glib.Properties.Build ("cursor"); 
  2058. end Gdk.Window;