### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: docs/content-docs/reference/Gtk3/Window.md
### ----------------------------------------------------
### -- Chunk 1 of 3
Gnome::Gdk3::Window
===================

Onscreen display areas in the target window system

Description
===========

A **Gnome::Gdk3::Window** is a (usually) rectangular region on the screen. It’s a low-level object, used to implement high-level objects such as **Gnome::Gtk3::Widget** and **Gnome::Gtk3::Window** on the GTK+ level. A **Gnome::Gtk3::Window** is a toplevel window, the thing a user might think of as a “window” with a titlebar and so on; a **Gnome::Gtk3::Window** may contain many **Gnome::Gdk3::Windows**. For example, each **Gnome::Gtk3::Button** has a **Gnome::Gdk3::Window** associated with it.

Composited Windows
------------------

Normally, the windowing system takes care of rendering the contents of a child window onto its parent window. This mechanism can be intercepted by calling `gdk_window_set_composited()` on the child window. For a “composited” window it is the responsibility of the application to render the window contents at the right spot.

Offscreen Windows
-----------------

Offscreen windows are more general than composited windows, since they allow not only to modify the rendering of the child window onto its parent, but also to apply coordinate transformations.

To integrate an offscreen window into a window hierarchy, one has to call `gdk_offscreen_window_set_embedder()` and handle a number of signals. The *pick-embedded-child* signal on the embedder window is used to select an offscreen child at given coordinates, and the *to-embedder* and *from-embedder* signals on the offscreen window are used to translate coordinates between the embedder and the offscreen window.

For rendering an offscreen window onto its embedder, the contents of the offscreen window are available as a surface, via `gdk_offscreen_window_get_surface()`.

Testing
-------

Some routines are added to this module for GUI testing. They were in a separate C file but could be included here. These are test utilities to test some of the events generated by mouse and keyboard. This set of routines will not be of much use for the GUI developer. However, for interface testing, this module is may be of use. A package which will be using this, is in development and is called **Gnome::T**.

Synopsis
========

Declaration
-----------

    unit class Gnome::Gdk3::Window;
    also is Gnome::GObject::Object;

Types
=====

enum GdkAnchorHints
-------------------

Positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the window would fall off-screen if placed in its ideal position.

For example, `GDK_ANCHOR_FLIP_X` will replace `GDK_GRAVITY_NORTH_WEST` with `GDK_GRAVITY_NORTH_EAST` and vice versa if the window extends beyond the left or right edges of the monitor.

If `GDK_ANCHOR_SLIDE_X` is set, the window can be shifted horizontally to fit on-screen. If `GDK_ANCHOR_RESIZE_X` is set, the window can be shrunken horizontally to fit.

In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

Stability: Unstable

  * GDK_ANCHOR_FLIP_X: allow flipping anchors horizontally

  * GDK_ANCHOR_FLIP_Y: allow flipping anchors vertically

  * GDK_ANCHOR_SLIDE_X: allow sliding window horizontally

  * GDK_ANCHOR_SLIDE_Y: allow sliding window vertically

  * GDK_ANCHOR_RESIZE_X: allow resizing window horizontally

  * GDK_ANCHOR_RESIZE_Y: allow resizing window vertically

  * GDK_ANCHOR_FLIP: allow flipping anchors on both axes

  * GDK_ANCHOR_SLIDE: allow sliding window on both axes

  * GDK_ANCHOR_RESIZE: allow resizing window on both axes

enum GdkFullscreenMode
----------------------

Indicates which monitor (in a multi-head setup) a window should span over when in fullscreen mode.

  * GDK_FULLSCREEN_ON_CURRENT_MONITOR: Fullscreen on current monitor only.

  * GDK_FULLSCREEN_ON_ALL_MONITORS: Span across all monitors when fullscreen.

enum GdkGravity
---------------

Defines the reference point of a window and the meaning of coordinates passed to `gtk_window_move()`. See `gtk_window_move()` and the "implementation notes" section of the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) specification for more details.

  * GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner.

  * GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge.

  * GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner.

  * GDK_GRAVITY_WEST: the reference point is at the middle of the left edge.

  * GDK_GRAVITY_CENTER: the reference point is at the center of the window.

  * GDK_GRAVITY_EAST: the reference point is at the middle of the right edge.

  * GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner.

  * GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge.

  * GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner.

  * GDK_GRAVITY_STATIC: the reference point is at the top left corner of the window itself, ignoring window manager decorations.

enum GdkWMDecoration
--------------------

These are hints originally defined by the Motif toolkit. The window manager can use them when determining how to decorate the window. The hint must be set before mapping the window.

  * GDK_DECOR_ALL: all decorations should be applied.

  * GDK_DECOR_BORDER: a frame should be drawn around the window.

  * GDK_DECOR_RESIZEH: the frame should have resize handles.

  * GDK_DECOR_TITLE: a titlebar should be placed above the window.

  * GDK_DECOR_MENU: a button for opening a menu should be included.

  * GDK_DECOR_MINIMIZE: a minimize button should be included.

  * GDK_DECOR_MAXIMIZE: a maximize button should be included.

enum GdkWMFunction
------------------

These are hints originally defined by the Motif toolkit. The window manager can use them when determining the functions to offer for the window. The hint must be set before mapping the window.

  * GDK_FUNC_ALL: all functions should be offered.

  * GDK_FUNC_RESIZE: the window should be resizable.

  * GDK_FUNC_MOVE: the window should be movable.

  * GDK_FUNC_MINIMIZE: the window should be minimizable.

  * GDK_FUNC_MAXIMIZE: the window should be maximizable.

  * GDK_FUNC_CLOSE: the window should be closable.

enum GdkWindowAttributesType
----------------------------

Used to indicate which fields in the **Gnome::Gdk3::WindowAttr** struct should be honored. For example, if you filled in the “cursor” and “x” fields of **Gnome::Gdk3::WindowAttr**, pass “*GDK_WA_X* | *GDK_WA_CURSOR*” to `new()`. Fields in **Gnome::Gdk3::WindowAttr** not covered by a bit in this enum are required; for example, the *width*/*height*, *wclass*, and *window_type* fields are required, they have no corresponding flag in **Gnome::Gdk3::WindowAttributesType**.

  * GDK_WA_TITLE: Honor the title field

  * GDK_WA_X: Honor the X coordinate field

  * GDK_WA_Y: Honor the Y coordinate field

  * GDK_WA_CURSOR: Honor the cursor field

  * GDK_WA_VISUAL: Honor the visual field

  * GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields

  * GDK_WA_NOREDIR: Honor the override_redirect field

  * GDK_WA_TYPE_HINT: Honor the type_hint field

enum GdkWindowEdge
------------------

Determines a window edge or corner.

  * GDK_WINDOW_EDGE_NORTH_WEST: the top left corner.

  * GDK_WINDOW_EDGE_NORTH: the top edge.

  * GDK_WINDOW_EDGE_NORTH_EAST: the top right corner.

  * GDK_WINDOW_EDGE_WEST: the left edge.

  * GDK_WINDOW_EDGE_EAST: the right edge.

  * GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner.

  * GDK_WINDOW_EDGE_SOUTH: the lower edge.

  * GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner.

enum GdkWindowHints
-------------------

Used to indicate which fields of a **Gnome::Gdk3::Geometry** struct should be paid attention to. Also, the presence/absence of *GDK_HINT_POS*, *GDK_HINT_USER_POS*, and *GDK_HINT_USER_SIZE* is significant, though they don't directly refer to **Gnome::Gdk3::Geometry** fields. *GDK_HINT_USER_POS* will be set automatically by **Gnome::Gdk3::Window** if you call `gtk_window_move()`. *GDK_HINT_USER_POS* and *GDK_HINT_USER_SIZE* should be set if the user specified a size/position using a --geometry command-line argument; `gtk_window_parse_geometry()` automatically sets these flags.

  * GDK_HINT_POS: indicates that the program has positioned the window

  * GDK_HINT_MIN_SIZE: min size fields are set

  * GDK_HINT_MAX_SIZE: max size fields are set

  * GDK_HINT_BASE_SIZE: base size fields are set

  * GDK_HINT_ASPECT: aspect ratio fields are set

  * GDK_HINT_RESIZE_INC: resize increment fields are set

  * GDK_HINT_WIN_GRAVITY: window gravity field is set

  * GDK_HINT_USER_POS: indicates that the window’s position was explicitly set by the user

  * GDK_HINT_USER_SIZE: indicates that the window’s size was explicitly set by the user

enum GdkWindowType
------------------

Describes the kind of window.

  * GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire screen, and is created by the window system

  * GDK_WINDOW_TOPLEVEL: toplevel window (used to implement **Gnome::Gdk3::Window**)

  * GDK_WINDOW_CHILD: child window (used to implement e.g. **Gnome::Gdk3::Entry**)

  * GDK_WINDOW_TEMP: override redirect temporary window (used to implement **Gnome::Gdk3::Menu**)

  * GDK_WINDOW_FOREIGN: foreign window (see `foreign_new()`)

  * GDK_WINDOW_OFFSCREEN: offscreen window (see [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18

  * GDK_WINDOW_SUBSURFACE: subsurface-based window; This window is visually tied to a toplevel, and is moved/stacked with it. Currently this window type is only implemented in Wayland. Since 3.14

enum GdkWindowWindowClass
-------------------------

*GDK_INPUT_OUTPUT* windows are the standard kind of window you might expect. Such windows receive events and are also displayed on screen. *GDK_INPUT_ONLY* windows are invisible; they are usually placed above other windows in order to trap or filter the events. You can’t draw on *GDK_INPUT_ONLY* windows.

  * GDK_INPUT_OUTPUT: window for graphics and events

  * GDK_INPUT_ONLY: window for events only

class N-GdkGeometry
-------------------

The **Gnome::Gdk3::Geometry** struct gives the window manager information about a window’s geometry constraints. Normally you would set these on the GTK+ level using `gtk_window_set_geometry_hints()`. **Gnome::Gdk3::Window** then sets the hints on the **Gnome::Gdk3::Window** it creates.

`set_geometry_hints()` expects the hints to be fully valid already and simply passes them to the window manager; in contrast, `gtk_window_set_geometry_hints()` performs some interpretation. For example, **Gnome::Gdk3::Window** will apply the hints to the geometry widget instead of the toplevel window, if you set a geometry widget. Also, the *min_width*/*min_height*/*max_width*/*max_height* fields may be set to -1, and **Gnome::Gdk3::Window** will substitute the size request of the window or geometry widget. If the minimum size hint is not provided, **Gnome::Gdk3::Window** will use its requisition as the minimum size. If the minimum size is provided and a geometry widget is set, **Gnome::Gdk3::Window** will take the minimum size as the minimum size of the geometry widget rather than the entire window. The base size is treated similarly.

The canonical use-case for `gtk_window_set_geometry_hints()` is to get a terminal widget to resize properly. Here, the terminal text area should be the geometry widget; **Gnome::Gdk3::Window** will then automatically set the base size to the size of other widgets in the terminal window, such as the menubar and scrollbar. Then, the *width_inc* and *height_inc* fields should be set to the size of one character in the terminal. Finally, the base size should be set to the size of one character. The net effect is that the minimum size of the terminal will have a 1x1 character terminal area, and only terminal sizes on the “character grid” will be allowed.

Here’s an example of how the terminal example would be implemented, assuming a terminal area widget called “terminal” and a toplevel window “toplevel”:

The other useful fields are the *min_aspect* and *max_aspect* fields; these contain a width/height ratio as a floating point number. If a geometry widget is set, the aspect applies to the geometry widget rather than the entire window. The most common use of these hints is probably to set *min_aspect* and *max_aspect* to the same value, thus forcing the window to keep a constant aspect ratio.

  * `Int()` $.min_width: minimum width of window (or -1 to use requisition, with **Gnome::Gdk3::Window** only)

  * `Int()` $.min_height: minimum height of window (or -1 to use requisition, with **Gnome::Gdk3::Window** only)

  * `Int()` $.max_width: maximum width of window (or -1 to use requisition, with **Gnome::Gdk3::Window** only)

  * `Int()` $.max_height: maximum height of window (or -1 to use requisition, with **Gnome::Gdk3::Window** only)

  * `Int()` $.base_width: allowed window widths are *base_width* + *width_inc* * N where N is any integer (-1 allowed with **Gnome::Gdk3::Window**)

  * `Int()` $.base_height: allowed window widths are *base_height* + *height_inc* * N where N is any integer (-1 allowed with **Gnome::Gdk3::Window**)

  * `Int()` $.width_inc: width resize increment

  * `Int()` $.height_inc: height resize increment

  * `Num()` $.min_aspect: minimum width/height ratio

  * `Num()` $.max_aspect: maximum width/height ratio

  * GdkGravity $.win_gravity: window gravity, see `gtk_window_set_gravity()`

class N-GdkWindowAttr
---------------------

Attributes to use for a newly-created window.

  * Str $.title: title of the window (for toplevel windows)

  * `Int()` $.event_mask: event mask (see `set_events()`)

  * `Int()` $.x: X coordinate relative to parent window (see `move()`)

  * `Int()` $.y: Y coordinate relative to parent window (see `move()`)

  * `Int()` $.width: width of window

  * `Int()` $.height: height of window

  * GdkWindowWindowClass $.wclass: **Gnome::Gdk3::DK_INPUT_OUTPUT** (normal window) or **Gnome::Gdk3::DK_INPUT_ONLY** (invisible window that receives events)

  * N-GObject $.visual: **Gnome::Gdk3::Visual** for window

  * GdkWindowType $.window_type: type of window

  * N-GObject $.cursor: cursor for the window (see `set_cursor()`)

  * Str $.wmclass_name: don’t use (see `gtk_window_set_wmclass()`)

  * Str $.wmclass_class: don’t use (see `gtk_window_set_wmclass()`)

  * Bool $.override_redirect: `True` to bypass the window manager

  * GdkWindowTypeHint $.type_hint: a hint of the function of the window

Methods
=======

new
---

beep
----

Emits a short beep associated to *window* in the appropriate display, if supported. Otherwise, emits a short beep on the display just as `Gnome::Gdk3::Display.beep()`.

    method beep ( )

begin-move-drag
---------------

Begins a window move operation (for a toplevel window).

This function assumes that the drag is controlled by the client pointer device, use `begin_move_drag_for_device()` to begin a drag with a different device.

    method begin-move-drag (
      Int() $button, Int() $root_x, Int() $root_y, UInt $timestamp
    )

  * $button; the button being used to drag, or 0 for a keyboard-initiated drag

  * $root_x; root window X coordinate of mouse click that began the drag

  * $root_y; root window Y coordinate of mouse click that began the drag

  * $timestamp; timestamp of mouse click that began the drag

begin-move-drag-for-device
--------------------------

Begins a window move operation (for a toplevel window). You might use this function to implement a “window move grip,” for example. The function works best with window managers that support the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) but has a fallback implementation for other window managers.

    method begin-move-drag-for-device (
      N-GObject() $device, Int() $button,
      Int() $root_x, Int() $root_y, UInt $timestamp
    )

  * $device; the device used for the operation

  * $button; the button being used to drag, or 0 for a keyboard-initiated drag

  * $root_x; root window X coordinate of mouse click that began the drag

  * $root_y; root window Y coordinate of mouse click that began the drag

  * $timestamp; timestamp of mouse click that began the drag

begin-resize-drag
-----------------

Begins a window resize operation (for a toplevel window).

This function assumes that the drag is controlled by the client pointer device, use `begin_resize_drag_for_device()` to begin a drag with a different device.

    method begin-resize-drag (
      GdkWindowEdge $edge, Int() $button,
      Int() $root_x, Int() $root_y, UInt $timestamp
    )

  * $edge; the edge or corner from which the drag is started

  * $button; the button being used to drag, or 0 for a keyboard-initiated drag

  * $root_x; root window X coordinate of mouse click that began the drag

  * $root_y; root window Y coordinate of mouse click that began the drag

  * $timestamp; timestamp of mouse click that began the drag (use `gdk_event_get_time()`)

begin-resize-drag-for-device
----------------------------

Begins a window resize operation (for a toplevel window). You might use this function to implement a “window resize grip,” for example; in fact **Gnome::Gdk3::Statusbar** uses it. The function works best with window managers that support the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) but has a fallback implementation for other window managers.

    method begin-resize-drag-for-device (
      GdkWindowEdge $edge, N-GObject() $device, Int() $button,
      Int() $root_x, Int() $root_y, UInt $timestamp
    )

  * $edge; the edge or corner from which the drag is started

  * $device; the device used for the operation

  * $button; the button being used to drag, or 0 for a keyboard-initiated drag

  * $root_x; root window X coordinate of mouse click that began the drag

  * $root_y; root window Y coordinate of mouse click that began the drag

  * $timestamp; timestamp of mouse click that began the drag (use `gdk_event_get_time()`)

constrain-size
--------------

Constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size).

    method constrain-size (
      N-GdkGeometry $geometry, GdkWindowHints $flags,
      Int() $width, Int() $height
    )

  * $geometry; a **Gnome::Gdk3::Geometry** structure

  * $flags; a mask indicating what portions of *geometry* are set

  * $width; desired width of window

  * $height; desired height of the window

  * $new_width; location to store resulting width

  * $new_height; location to store resulting height

coords-from-parent
------------------

Transforms window coordinates from a parent window to a child window, where the parent window is the normal parent as returned by `get_parent()` for normal windows, and the window's embedder as returned by `gdk_offscreen_window_get_embedder()` for offscreen windows.

For normal windows, calling this function is equivalent to subtracting the return values of `get_position()` from the parent coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::from-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks down a window hierarchy.

See also: `coords_to_parent()`

    method coords-from-parent (
      Num() $parent_x, Num() $parent_y, Num() $x, Num() $y
    )

  * $parent_x; X coordinate in parent’s coordinate system

  * $parent_y; Y coordinate in parent’s coordinate system

  * $x; return location for X coordinate in child’s coordinate system

  * $y; return location for Y coordinate in child’s coordinate system

coords-to-parent
----------------

Transforms window coordinates from a child window to its parent window, where the parent window is the normal parent as returned by `get_parent()` for normal windows, and the window's embedder as returned by `gdk_offscreen_window_get_embedder()` for offscreen windows.

For normal windows, calling this function is equivalent to adding the return values of `get_position()` to the child coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::to-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks up a window hierarchy.

See also: `coords_from_parent()`

    method coords-to-parent (
      Num() $x, Num() $y, Num() $parent_x, Num() $parent_y
    )

  * $x; X coordinate in child’s coordinate system

  * $y; Y coordinate in child’s coordinate system

  * $parent_x; return location for X coordinate in parent’s coordinate system, or `undefined`

  * $parent_y; return location for Y coordinate in parent’s coordinate system, or `undefined`

create-similar-image-surface
----------------------------

Create a new image surface that is efficient to draw on the given *window*.

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

The *width* and *height* of the new surface are not affected by the scaling factor of the *window*, or by the *scale* argument; they are the size of the surface in device pixels. If you wish to create an image surface capable of holding the contents of *window* you can use:

Note that unlike `cairo_surface_create_similar_image()`, the new surface's device scale is set to *scale*, or to the scale factor of *window* if *scale* is 0.

Returns: a pointer to the newly allocated surface. The caller owns the surface and should call `cairo_surface_destroy()` when done with it.

This function always returns a valid pointer, but it will return a pointer to a “nil” surface if *other* is already in an error state or any other error occurs.

    method create-similar-image-surface (
      cairo_format_t $format, Int() $width, Int() $height, Int() $scale
      --> cairo_surface_t
    )

  * $format; (type int): the format for the new surface

  * $width; width of the new surface

  * $height; height of the new surface

  * $scale; the scale of the new surface, or 0 to use same as *window*

create-similar-surface
----------------------

Create a new surface that is as compatible as possible with the given *window*. For example the new surface will have the same fallback resolution and font options as *window*. Generally, the new surface will also use the same backend as *window*, unless that is not possible for some reason. The type of the returned surface may be examined with `cairo_surface_get_type()`.

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

Returns: a pointer to the newly allocated surface. The caller owns the surface and should call `cairo_surface_destroy()` when done with it.

This function always returns a valid pointer, but it will return a pointer to a “nil” surface if *other* is already in an error state or any other error occurs.

    method create-similar-surface (
      cairo_content_t $content, Int() $width, Int() $height
      --> cairo_surface_t
    )

  * $content; the content for the new surface

  * $width; width of the new surface

  * $height; height of the new surface

deiconify
---------

Attempt to deiconify (unminimize) *window*. On X11 the window manager may choose to ignore the request to deiconify. When using GTK+, use `gtk_window_deiconify()` instead of the **Gnome::Gdk3::Window** variant. Or better yet, you probably want to use `gtk_window_present_with_time()`, which raises the window, focuses it, unminimizes it, and puts it on the current desktop.

    method deiconify ( )

destroy
-------

Destroys the window system resources associated with *window* and decrements *window*'s reference count. The window system resources for all children of *window* are also destroyed, but the children’s reference counts are not decremented.

Note that a window will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens.

After this call the object becomes invalid and its native object lost.

    method destroy ( )

ensure-native
-------------

Tries to ensure that there is a window-system native window for this GdkWindow. This may fail in some situations, returning `False`.

Offscreen window and children of them can never have native windows.

Some backends may not support native child windows.

Returns: `True` if the window has a native window, `False` otherwise

    method ensure-native ( --> Bool )

focus
-----

Sets keyboard focus to *window*. In most cases, `Gnome::Gtk3::Window.present-with-time()` should be used on a **Gnome::Gtk3::Window**, rather than calling this function.

    method focus ( UInt $timestamp )

  * $timestamp; timestamp of the event triggering the window focus

freeze-updates
--------------

Temporarily freezes a window such that it won’t receive expose events. The window will begin receiving expose events again when `thaw_updates()` is called. If `freeze_updates()` has been called more than once, `thaw_updates()` must be called an equal number of times to begin processing exposes.

    method freeze-updates ( )

fullscreen
----------

Moves the window into fullscreen mode. This means the window covers the entire screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

On X11, asks the window manager to put *window* in a fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “fullscreen”; so you can’t rely on the fullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

    method fullscreen ( )

fullscreen-on-monitor
---------------------

Moves the window into fullscreen mode on the given monitor. This means the window covers the entire screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

    method fullscreen-on-monitor ( Int() $monitor )

  * $monitor; Which monitor to display fullscreen on.

geometry-changed
----------------

This function informs GDK that the geometry of an embedded offscreen window has changed. This is necessary for GDK to keep track of which offscreen window the pointer is in.

    method geometry-changed ( )

get-accept-focus
----------------

Determines whether or not the desktop environment shuld be hinted that the window does not want to receive input focus.

Returns: whether or not the window should receive input focus.

    method get-accept-focus ( --> Bool )

get-children
------------

Gets the list of children of *window* known to GDK. This function only returns children created via GDK, so for example it’s useless when used with the root window; it only returns windows an application created itself.

The returned list must be freed, but the elements in the list need not be.

Returns: (transfer container) (element-type GdkWindow): list of child windows inside *window*

    method get-children ( --> N-GList )

get-children-with-user-data
---------------------------

Gets the list of children of *window* known to GDK with a particular *user_data* set on it.

The returned list must be freed, but the elements in the list need not be.

The list is returned in (relative) stacking order, i.e. the lowest window is first.

Returns: (transfer container) (element-type GdkWindow): list of child windows inside *window*

    method get-children-with-user-data ( Pointer $user_data --> N-GList )

  * $user_data; user data to look for

get-cursor
----------

Retrieves a **Gnome::Gdk3::Cursor** pointer for the cursor currently set on the specified **Gnome::Gdk3::Window**, or `undefined`. If the return value is `undefined` then there is no custom cursor set on the specified window, and it is using the cursor for its parent window.

Returns: a **Gnome::Gdk3::Cursor**, or `undefined`. The returned object is owned by the **Gnome::Gdk3::Window** and should not be unreferenced directly. Use `set_cursor()` to unset the cursor of the window

    method get-cursor ( --> N-GObject )

get-decorations
---------------

Returns the decorations set on the GdkWindow with `set-decorations()`. Returns -1 if no decorations were set. The returned value is a mask with bits from `GdkWMDecoration` enumeration.

    method get-decorations ( --> Int )

get-default-root-window
-----------------------

Obtains the root window (parent all other windows are inside) for the default display and screen.

Returns: the default root window

    method get-default-root-window ( --> N-GObject )

get-device-cursor
-----------------

Retrieves a **Gnome::Gdk3::Cursor** pointer for the *device* currently set on the specified **Gnome::Gdk3::Window**, or `undefined`. If the return value is `undefined` then there is no custom cursor set on the specified window, and it is using the cursor for its parent window.

Returns: a **Gnome::Gdk3::Cursor**, or `undefined`. The returned object is owned by the **Gnome::Gdk3::Window** and should not be unreferenced directly. Use `set_cursor()` to unset the cursor of the window

    method get-device-cursor ( N-GObject() $device --> N-GObject )

  * $device; a master, pointer **Gnome::Gdk3::Device**.

get-device-events
-----------------

Returns the event mask for *window* corresponding to an specific device.

Returns: device event mask for *window*

    method get-device-events ( N-GObject() $device --> GdkEventMask )

  * $device; a **Gnome::Gdk3::Device**.

get-device-position
-------------------

Obtains the current device position and modifier state. The position is given in coordinates relative to the upper left corner of *window*.

Use `get_device_position_double()` if you need subpixel precision.

Returns: The window underneath *device* (as with `gdk_device_get_window_at_position()`), or `undefined` if the window is not known to GDK.

    method get-device-position (
      N-GObject() $device, GdkModifierType $mask --> N-GObject
    )

  * $device; pointer **Gnome::Gdk3::Device** to query to.

  * $x; return location for the X coordinate of *device*, or `undefined`.

  * $y; return location for the Y coordinate of *device*, or `undefined`.

  * $mask; return location for the modifier mask, or `undefined`.

get-device-position-double
--------------------------

Obtains the current device position in doubles and modifier state. The position is given in coordinates relative to the upper left corner of *window*.

Returns: The window underneath *device* (as with `gdk_device_get_window_at_position()`), or `undefined` if the window is not known to GDK.

    method get-device-position-double (
      N-GObject() $device, Num() $x, Num() $y, GdkModifierType $mask
      --> N-GObject
    )

  * $device; pointer **Gnome::Gdk3::Device** to query to.

  * $x; return location for the X coordinate of *device*, or `undefined`.

  * $y; return location for the Y coordinate of *device*, or `undefined`.

  * $mask; return location for the modifier mask, or `undefined`.

get-display
-----------

Gets the **Gnome::Gdk3::Display** associated with a **Gnome::Gdk3::Window**.

Returns: the **Gnome::Gdk3::Display** associated with *window*

    method get-display ( --> N-GObject )

get-effective-parent
--------------------

Obtains the parent of *window*, as known to GDK. Works like `get_parent()` for normal windows, but returns the window’s embedder for offscreen windows.

See also: `gdk_offscreen_window_get_embedder()`

Returns: effective parent of *window*

    method get-effective-parent ( --> N-GObject )

get-effective-toplevel
----------------------

Gets the toplevel window that’s an ancestor of *window*.

Works like `get_toplevel()`, but treats an offscreen window's embedder as its parent, using `get_effective_parent()`.

See also: `gdk_offscreen_window_get_embedder()`

Returns: the effective toplevel window containing *window*

    method get-effective-toplevel ( --> N-GObject )

get-event-compression
---------------------

Get the current event compression setting for this window.

Returns: `True` if motion events will be compressed

    method get-event-compression ( --> Bool )

get-events
----------

Gets the event mask for *window* for all master input devices. See `set_events()`.

Returns: event mask for *window*

    method get-events ( --> GdkEventMask )

get-focus-on-map
----------------

Determines whether or not the desktop environment should be hinted that the window does not want to receive input focus when it is mapped.

Returns: whether or not the window wants to receive input focus when it is mapped.

    method get-focus-on-map ( --> Bool )

get-frame-clock
---------------

Gets the frame clock for the window. The frame clock for a window never changes unless the window is reparented to a new toplevel window.

Returns: the frame clock

    method get-frame-clock ( --> N-GObject )

get-frame-extents
-----------------

Obtains the bounding box of the window, including window manager titlebar/borders if any. The frame position is given in root window coordinates. To get the position of the window itself (rather than the frame) in root window coordinates, use `get_origin()`.

    method get-frame-extents ( N-GObject() $rect )

  * $rect; rectangle to fill with bounding box of the window frame

get-fullscreen-mode
-------------------

Obtains the **Gnome::Gdk3::FullscreenMode** of the *window*.

Returns: The **Gnome::Gdk3::FullscreenMode** applied to the window when fullscreen.

    method get-fullscreen-mode ( --> GdkFullscreenMode )

get-geometry
------------

Any of the return location arguments to this function may be `undefined`, if you aren’t interested in getting the value of that field.

The X and Y coordinates returned are relative to the parent window of *window*, which for toplevels usually means relative to the window decorations (titlebar, etc.) rather than relative to the root window (screen-size background window).

On the X11 platform, the geometry is obtained from the X server, so reflects the latest position of *window*; this may be out-of-sync with the position of *window* delivered in the most-recently-processed **Gnome::Gdk3::EventConfigure**. `get_position