### ----------------------------------------------------
### -- Gnome::Gdk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gdk3/Window.rakumod
### ----------------------------------------------------
### -- Chunk 2 of 5
root_x, gint $root_y, guint32 $timestamp
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:begin-resize-drag-for-device:
=begin pod
=head2 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 B<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
  )

=item $edge; the edge or corner from which the drag is started
=item $device; the device used for the operation
=item $button; the button being used to drag, or 0 for a keyboard-initiated drag
=item $root_x; root window X coordinate of mouse click that began the drag
=item $root_y; root window Y coordinate of mouse click that began the drag
=item $timestamp; timestamp of mouse click that began the drag (use C<gdk_event_get_time()>)
=end pod

method begin-resize-drag-for-device (
  GdkWindowEdge $edge, N-GObject() $device, Int() $button,
  Int() $root_x, Int() $root_y, UInt $timestamp
) {
  gdk_window_begin_resize_drag_for_device(
    self._get-native-object-no-reffing, $edge, $device, $button, $root_x, $root_y, $timestamp
  );
}

sub gdk_window_begin_resize_drag_for_device (
  N-GObject $window, GEnum $edge, N-GObject $device, gint $button, gint $root_x, gint $root_y, guint32 $timestamp
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:constrain-size:
=begin pod
=head2 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
  )

=item $geometry; a B<Gnome::Gdk3::Geometry> structure
=item $flags; a mask indicating what portions of I<geometry> are set
=item $width; desired width of window
=item $height; desired height of the window
=item $new_width; location to store resulting width
=item $new_height; location to store resulting height
=end pod

method constrain-size (
  N-GdkGeometry $geometry, GdkWindowHints $flags, Int() $width, Int() $height
) {
  gdk_window_constrain_size(
    self._get-native-object-no-reffing, $geometry, $flags,
    $width, $height, my gint $new_width, my gint $new_height
  );
}

sub gdk_window_constrain_size (
  N-GdkGeometry $geometry, GEnum $flags, gint $width, gint $height, gint $new_width is rw, gint $new_height is rw
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:coords-from-parent:
=begin pod
=head2 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 C<get_parent()> for normal windows, and the window's embedder as returned by C<gdk_offscreen_window_get_embedder()> for offscreen windows.

For normal windows, calling this function is equivalent to subtracting the return values of C<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: C<coords_to_parent()>

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

=item $parent_x; X coordinate in parent’s coordinate system
=item $parent_y; Y coordinate in parent’s coordinate system
=item $x; return location for X coordinate in child’s coordinate system
=item $y; return location for Y coordinate in child’s coordinate system
=end pod

method coords-from-parent (
  Num() $parent_x, Num() $parent_y, Num() $x, Num() $y
) {
  gdk_window_coords_from_parent(
    self._get-native-object-no-reffing, $parent_x, $parent_y, $x, $y
  );
}

sub gdk_window_coords_from_parent (
  N-GObject $window, gdouble $parent_x, gdouble $parent_y, gdouble $x, gdouble $y
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:coords-to-parent:
=begin pod
=head2 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 C<get_parent()> for normal windows, and the window's embedder as returned by C<gdk_offscreen_window_get_embedder()> for offscreen windows.

For normal windows, calling this function is equivalent to adding the return values of C<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: C<coords_from_parent()>

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

=item $x; X coordinate in child’s coordinate system
=item $y; Y coordinate in child’s coordinate system
=item $parent_x; return location for X coordinate in parent’s coordinate system, or C<undefined>
=item $parent_y; return location for Y coordinate in parent’s coordinate system, or C<undefined>
=end pod

method coords-to-parent (
  Num() $x, Num() $y, Num() $parent_x, Num() $parent_y
) {
  gdk_window_coords_to_parent(
    self._get-native-object-no-reffing, $x, $y, $parent_x, $parent_y
  );
}

sub gdk_window_coords_to_parent (
  N-GObject $window, gdouble $x, gdouble $y, gdouble $parent_x, gdouble $parent_y
) is native(&gdk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:create-gl-context:
=begin pod
=head2 create-gl-context

Creates a new B<Gnome::Gdk3::GLContext> matching the framebuffer format to the visual of the B<Gnome::Gdk3::Window>. The context is disconnected from any particular window or surface.

If the creation of the B<Gnome::Gdk3::GLContext> failed, I<error> will be set.

Before using the returned B<Gnome::Gdk3::GLContext>, you will need to call C<gdk_gl_context_make_current()> or C<gdk_gl_context_realize()>.

  method create-gl-context ( --> List )

The returned list holds
=item an error object. This object is valid when there is an error.
=item a native B<Gnome::Gdk3::GLContext>. The object is invalid on error.

=end pod

method create-gl-context ( $error is copy --> N-GObject ) {
  my CArray[N-GError] $error .= new;
  my $no = gdk_window_create_gl_context(
    self._get-native-object-no-reffing, $error
  );

  ( N-GError.new($no.defined ?? $error[0] !! N-GError),
    self._wrap-native-type( 'Gnome::Gdk3::GLContext', $no)
  )
}

sub gdk_window_create_gl_context (
  N-GObject $window, N-GError $error --> N-GObject
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:1:create-similar-image-surface:
=begin pod
=head2 create-similar-image-surface

Create a new image surface that is efficient to draw on the given I<window>.

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

The I<width> and I<height> of the new surface are not affected by the scaling factor of the I<window>, or by the I<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 I<window> you can use:

=begin comment
|[<!-- language="C" --> int scale = get_scale_factor (window); int width = get_width (window) * scale; int height = get_height (window) * scale;

// format is set elsewhere cairo_surface_t *surface = create_similar_image_surface (window, format, width, height, scale); ]|
=end comment

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

Returns: a pointer to the newly allocated surface. The caller owns the surface and should call C<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 I<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
  )

=item $format; (type int): the format for the new surface
=item $width; width of the new surface
=item $height; height of the new surface
=item $scale; the scale of the new surface, or 0 to use same as I<window>
=end pod

method create-similar-image-surface (
  cairo_format_t $format, Int() $width, Int() $height, Int() $scale
  --> cairo_surface_t
) {
  gdk_window_create_similar_image_surface(
    self._get-native-object-no-reffing, $format, $width, $height, $scale
  )
}

sub gdk_window_create_similar_image_surface (
  N-GObject $window, GEnum $format, gint $width, gint $height, gint $scale --> cairo_surface_t
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:create-similar-surface:
=begin pod
=head2 create-similar-surface

Create a new surface that is as compatible as possible with the given I<window>. For example the new surface will have the same fallback resolution and font options as I<window>. Generally, the new surface will also use the same backend as I<window>, unless that is not possible for some reason. The type of the returned surface may be examined with C<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 C<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 I<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
  )

=item $content; the content for the new surface
=item $width; width of the new surface
=item $height; height of the new surface
=end pod

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

  gdk_window_create_similar_surface(
    self._get-native-object-no-reffing, $content, $width, $height
  )
}

sub gdk_window_create_similar_surface (
  N-GObject $window, GEnum $content, gint $width, gint $height --> cairo_surface_t
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:deiconify:
=begin pod
=head2 deiconify

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

  method deiconify ( )

=end pod

method deiconify ( ) {
  gdk_window_deiconify(self._get-native-object-no-reffing);
}

sub gdk_window_deiconify (
  N-GObject $window
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:destroy:
=begin pod
=head2 destroy

Destroys the window system resources associated with I<window> and decrements I<window>'s reference count. The window system resources for all children of I<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 ( )

=end pod

method destroy ( ) {
  gdk_window_destroy(self._get-native-object-no-reffing);
  self._set-native-object(N-GObject);
}

sub gdk_window_destroy (
  N-GObject $window
) is native(&gdk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:end-draw-frame:
=begin pod
=head2 end-draw-frame

Indicates that the drawing of the contents of I<window> started with C<begin-draw-frame()> has been completed.

This function will take care of destroying the B<Gnome::Gdk3::DrawingContext>.

It is an error to call this function without a matching C<begin-draw-frame()> first.

  method end-draw-frame ( N-GObject() $context )

=item $context; the B<Gnome::Gdk3::DrawingContext> created by C<begin_draw_frame()>
=end pod

method end-draw-frame ( N-GObject() $context ) {
  gdk_window_end_draw_frame( self._get-native-object-no-reffing, $context);
}

sub gdk_window_end_draw_frame (
  N-GObject $window, N-GObject $context
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:1:ensure-native:
=begin pod
=head2 ensure-native

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

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

Some backends may not support native child windows.

Returns: C<True> if the window has a native window, C<False> otherwise

  method ensure-native ( --> Bool )

=end pod

method ensure-native ( --> Bool ) {
  gdk_window_ensure_native(self._get-native-object-no-reffing).Bool
}

sub gdk_window_ensure_native (
  N-GObject $window --> gboolean
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:focus:
=begin pod
=head2 focus

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

  method focus ( UInt $timestamp )

=item $timestamp; timestamp of the event triggering the window focus
=end pod

method focus ( UInt $timestamp ) {
  gdk_window_focus( self._get-native-object-no-reffing, $timestamp);
}

sub gdk_window_focus (
  N-GObject $window, guint32 $timestamp
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:freeze-updates:
=begin pod
=head2 freeze-updates

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

  method freeze-updates ( )

=end pod

method freeze-updates ( ) {
  gdk_window_freeze_updates(self._get-native-object-no-reffing);
}

sub gdk_window_freeze_updates (
  N-GObject $window
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:fullscreen:
=begin pod
=head2 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 I<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 ( )

=end pod

method fullscreen ( ) {
  gdk_window_fullscreen(self._get-native-object-no-reffing);
}

sub gdk_window_fullscreen (
  N-GObject $window
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:fullscreen-on-monitor:
=begin pod
=head2 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 )

=item $monitor; Which monitor to display fullscreen on.
=end pod

method fullscreen-on-monitor ( Int() $monitor ) {
  gdk_window_fullscreen_on_monitor(
    self._get-native-object-no-reffing, $monitor
  );
}

sub gdk_window_fullscreen_on_monitor (
  N-GObject $window, gint $monitor
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:geometry-changed:
=begin pod
=head2 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 ( )

=end pod

method geometry-changed ( ) {
  gdk_window_geometry_changed(self._get-native-object-no-reffing);
}

sub gdk_window_geometry_changed (
  N-GObject $window
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-accept-focus:
=begin pod
=head2 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 )

=end pod

method get-accept-focus ( --> Bool ) {
  gdk_window_get_accept_focus(self._get-native-object-no-reffing).Bool
}

sub gdk_window_get_accept_focus (
  N-GObject $window --> gboolean
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-children:
=begin pod
=head2 get-children

Gets the list of children of I<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 I<window>

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

=end pod

method get-children ( --> N-GList ) {
  gdk_window_get_children(self._get-native-object-no-reffing)
}

sub gdk_window_get_children (
  N-GObject $window --> N-GList
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-children-with-user-data:
=begin pod
=head2 get-children-with-user-data

Gets the list of children of I<window> known to GDK with a particular I<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 I<window>

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

=item $user_data; user data to look for
=end pod

method get-children-with-user-data ( Pointer $user_data --> N-GList ) {
  gdk_window_get_children_with_user_data(
    self._get-native-object-no-reffing, $user_data
  )
}

sub gdk_window_get_children_with_user_data (
  N-GObject $window, gpointer $user_data --> N-GList
) is native(&gdk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:get-clip-region:
=begin pod
=head2 get-clip-region

Computes the region of a window that potentially can be written to by drawing primitives. This region may not take into account other factors such as if the window is obscured by other windows, but no area outside of this region will be affected by drawing primitives.

Returns: a B<cairo_region_t>. This must be freed with C<cairo_region_destroy()> when you are done.

  method get-clip-region ( --> cairo_region_t )

=end pod

method get-clip-region ( --> cairo_region_t ) {
  gdk_window_get_clip_region(self._get-native-object-no-reffing)
}

sub gdk_window_get_clip_region (
  N-GObject $window --> cairo_region_t
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:get-cursor:
=begin pod
=head2 get-cursor

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

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

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

=end pod

method get-cursor ( --> N-GObject ) {
  gdk_window_get_cursor(self._get-native-object-no-reffing)
}

sub gdk_window_get_cursor (
  N-GObject $window --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-decorations:
=begin pod
=head2 get-decorations

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

  method get-decorations ( --> Int )

=end pod

method get-decorations ( --> Int ) {
  my Bool $r = gdk_window_get_decorations(
    self._get-native-object-no-reffing, my GFlag $decorations
  ).Bool;

  $r ?? $decorations !! -1;
}

sub gdk_window_get_decorations (
  N-GObject $window, GFlag $decorations is rw --> gboolean
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-default-root-window:
=begin pod
=head2 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 )

=end pod

method get-default-root-window ( --> N-GObject ) {
  gdk_get_default_root_window(self._get-native-object-no-reffing)
}

sub gdk_get_default_root_window (
   --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-device-cursor:
=begin pod
=head2 get-device-cursor

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

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

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

=item $device; a master, pointer B<Gnome::Gdk3::Device>.
=end pod

method get-device-cursor ( N-GObject() $device --> N-GObject ) {
  gdk_window_get_device_cursor( self._get-native-object-no-reffing, $device)
}

sub gdk_window_get_device_cursor (
  N-GObject $window, N-GObject $device --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-device-events:
=begin pod
=head2 get-device-events

Returns the event mask for I<window> corresponding to an specific device.

Returns: device event mask for I<window>

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

=item $device; a B<Gnome::Gdk3::Device>.
=end pod

method get-device-events ( N-GObject() $device --> GdkEventMask ) {
  GdkEventMask(
    gdk_window_get_device_events( self._get-native-object-no-reffing, $device)
  )
}

sub gdk_window_get_device_events (
  N-GObject $window, N-GObject $device --> GEnum
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-device-position:
=begin pod
=head2 get-device-position

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

Use C<get_device_position_double()> if you need subpixel precision.

Returns: The window underneath I<device> (as with C<gdk_device_get_window_at_position()>), or C<undefined> if the window is not known to GDK.

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

=item $device; pointer B<Gnome::Gdk3::Device> to query to.
=item $x; return location for the X coordinate of I<device>, or C<undefined>.
=item $y; return location for the Y coordinate of I<device>, or C<undefined>.
=item $mask; return location for the modifier mask, or C<undefined>.
=end pod

method get-device-position (
  N-GObject() $device, GdkModifierType $mask --> N-GObject
) {
  gdk_window_get_device_position(
    self._get-native-object-no-reffing, $device, my gint $x, my gint $y, $mask
  )
}

sub gdk_window_get_device_position (
  N-GObject $window, N-GObject $device, gint $x is rw, gint $y is rw, GEnum $mask --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-device-position-double:
=begin pod
=head2 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 I<window>.

Returns: The window underneath I<device> (as with C<gdk_device_get_window_at_position()>), or C<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
  )

=item $device; pointer B<Gnome::Gdk3::Device> to query to.
=item $x; return location for the X coordinate of I<device>, or C<undefined>.
=item $y; return location for the Y coordinate of I<device>, or C<undefined>.
=item $mask; return location for the modifier mask, or C<undefined>.
=end pod

method get-device-position-double (
  N-GObject() $device, Num() $x, Num() $y,
  GdkModifierType $mask --> N-GObject
) {
  gdk_window_get_device_position_double(
    self._get-native-object-no-reffing, $device, $x, $y, $mask
  )
}

sub gdk_window_get_device_position_double (
  N-GObject $window, N-GObject $device, gdouble $x, gdouble $y, GEnum $mask --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-display:
=begin pod
=head2 get-display

Gets the B<Gnome::Gdk3::Display> associated with a B<Gnome::Gdk3::Window>.

Returns: the B<Gnome::Gdk3::Display> associated with I<window>

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

=end pod

method get-display ( --> N-GObject ) {
  gdk_window_get_display(self._get-native-object-no-reffing)
}

sub gdk_window_get_display (
  N-GObject $window --> N-GObject
) is native(&gdk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:get-drag-protocol:
=begin pod
=head2 get-drag-protocol

Finds out the DND protocol supported by a window.

Returns: the supported DND protocol.

  method get-drag-protocol ( N-GObject() $target --> GdkDragProtocol )

=item $target; location of the window where the drop should happen. This may be I<window> or a proxy window, or C<undefined> if I<window> does not support Drag and Drop.
=end pod

method get-drag-protocol ( N-GObject() $target --> GdkDragProtocol ) {
  GdkDragProtocol(
    gdk_window_get_drag_protocol( self._get-native-object-no-reffing, $target)
  )
}

sub gdk_window_get_drag_protocol (
  N-GObject $window, N-GObject $target --> GEnum
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:get-effective-parent:
=begin pod
=head2 get-effective-parent

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

See also: C<gdk_offscreen_window_get_embedder()>

Returns: effective parent of I<window>

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

=end pod

method get-effective-parent ( --> N-GObject ) {
  gdk_window_get_effective_parent(self._get-native-object-no-reffing)
}

sub gdk_window_get_effective_parent (
  N-GObject $window --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-effective-toplevel:
=begin pod
=head2 get-effective-toplevel

Gets the toplevel window that’s an ancestor of I<window>.

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

See also: C<gdk_offscreen_window_get_embedder()>

Returns: the effective toplevel window containing I<window>

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

=end pod

method get-effective-toplevel ( --> N-GObject ) {
  gdk_window_get_effective_toplevel(self._get-native-object-no-reffing)
}

sub gdk_window_get_effective_toplevel (
  N-GObject $window --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-event-compression:
=begin pod
=head2 get-event-compression

Get the current event compression setting for this window.

Returns: C<True> if motion events will be compressed

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

=end pod

method get-event-compression ( --> Bool ) {
  gdk_window_get_event_compression(self._get-native-object-no-reffing).Bool
}

sub gdk_window_get_event_compression (
  N-GObject $window --> gboolean
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-events:
=begin pod
=head2 get-events

Gets the event mask for I<window> for all master input devices. See C<set_events()>.

Returns: event mask for I<window>

  method get-events ( --> GdkEventMask )

=end pod

method get-events ( --> GdkEventMask ) {
  GdkEventMask(
    gdk_window_get_events(self._get-native-object-no-reffing)
  )
}

sub gdk_window_get_events (
  N-GObject $window --> GEnum
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-focus-on-map:
=begin pod
=head2 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 )

=end pod

method get-focus-on-map ( --> Bool ) {
  gdk_window_get_focus_on_map(self._get-native-object-no-reffing).Bool
}

sub gdk_window_get_focus_on_map (
  N-GObject $window --> gboolean
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-frame-clock:
=begin pod
=head2 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 )

=end pod

method get-frame-clock ( --> N-GObject ) {
  gdk_window_get_frame_clock(self._get-native-object-no-reffing)
}

sub gdk_window_get_frame_clock (
  N-GObject $window --> N-GObject
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-frame-extents:
=begin pod
=head2 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 C<get_origin()>.

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

=item $rect; rectangle to fill with bounding box of the window frame
=end pod

method get-frame-extents ( N-GObject() $rect ) {
  gdk_window_get_frame_extents( self._get-native-object-no-reffing, $rect);
}

sub gdk_window_get_frame_extents (
  N-GObject $window, N-GObject $rect
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-fullscreen-mode:
=begin pod
=head2 get-fullscreen-mode

Obtains the B<Gnome::Gdk3::FullscreenMode> of the I<window>.

Returns: The B<Gnome::Gdk3::FullscreenMode> applied to the window when fullscreen.

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

=end pod

method get-fullscreen-mode ( --> GdkFullscreenMode ) {
  GdkFullscreenMode(
    gdk_window_get_fullscreen_mode(self._get-native-object-no-reffing)
  )
}

sub gdk_window_get_fullscreen_mode (
  N-GObject $window --> GEnum
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:get-geometry:
=begin pod
=head2 get-geometry

Any of the return location arguments to this function may be C<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 I<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 I<window>; this may be out-of-sync with the position of I<window> delivered in the most-recently-processed B<Gnome::Gdk3::EventConfigure>. C<get_position()> in contrast gets the position from the most recent configure event.

Note: If I<window> is not a toplevel, it is much better to call C<get_position()>, C<get_width()> and C<get_height()> instead, because it avoids the roundtrip to the X server and because these functions support the full 32-bit coordinate space, whereas C<get