### ----------------------------------------------------
### -- Gnome::Gdk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gdk3/Window.rakumod
### ----------------------------------------------------
### -- Chunk 3 of 5
_geometry()> is restricted to the 16-bit coordinates of X11.

  method get-geometry ( --> List )

The List returns
=item Int; X coordinate of window (relative to its parent)
=item Int; Y coordinate of window (relative to its parent)
=item Int; width of window
=item Int; height of window
=end pod

method get-geometry ( ) {
  gdk_window_get_geometry(
    self._get-native-object-no-reffing, my gint $x, my gint $y, my gint $width, my gint $height
  );

  ( $x, $y, $width, $height)
}

sub gdk_window_get_geometry (
  N-GObject $window, gint $x is rw, gint $y is rw, gint $width is rw, gint $height is rw
) is native(&gdk-lib)
  { * }

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

Returns the group leader window for I<window>. See C<set_group()>.

Returns: the group leader window for I<window>

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

=end pod

method get-group ( --> N-GObject ) {

  gdk_window_get_group(
    self._get-native-object-no-reffing,
  )
}

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

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

Returns the height of the given I<window>.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

Returns: The height of I<window>

  method get-height ( --> Int )

=end pod

method get-height ( --> Int ) {

  gdk_window_get_height(
    self._get-native-object-no-reffing,
  )
}

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

#-------------------------------------------------------------------------------
#TM:0:get-modal-hint:
=begin pod
=head2 get-modal-hint

Determines whether or not the window manager is hinted that I<window> has modal behaviour.

Returns: whether or not the window has the modal hint set.

  method get-modal-hint ( --> Bool )

=end pod

method get-modal-hint ( --> Bool ) {

  gdk_window_get_modal_hint(
    self._get-native-object-no-reffing,
  ).Bool
}

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

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

Obtains the position of a window in root window coordinates. (Compare with C<get_position()> and C<get_geometry()> which return the position of a window relative to its parent window.)

Returns: not meaningful, ignore

  method get-origin ( --> Int )

=item $x; return location for X coordinate
=item $y; return location for Y coordinate
=end pod

method get-origin ( --> Int ) {

  gdk_window_get_origin(
    self._get-native-object-no-reffing, my gint $x, my gint $y
  )
}

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

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

Obtains the parent of I<window>, as known to GDK. Does not query the X server; thus this returns the parent as passed to C<new()>, not the actual parent. This should never matter unless you’re using Xlib calls mixed with GDK calls on the X11 platform. It may also matter for toplevel windows, because the window manager may choose to reparent them.

Note that you should use C<get_effective_parent()> when writing generic code that walks up a window hierarchy, because C<get_parent()> will most likely not do what you expect if there are offscreen windows in the hierarchy.

Returns: parent of I<window>

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

=end pod

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

  gdk_window_get_parent(
    self._get-native-object-no-reffing,
  )
}

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

#-------------------------------------------------------------------------------
#TM:0:get-pass-through:
=begin pod
=head2 get-pass-through

Returns whether input to the window is passed through to the window below.

See C<set_pass_through()> for details

  method get-pass-through ( --> Bool )

=end pod

method get-pass-through ( --> Bool ) {

  gdk_window_get_pass_through(
    self._get-native-object-no-reffing,
  ).Bool
}

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

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

Obtains the position of the window as reported in the most-recently-processed B<Gnome::Gdk3::EventConfigure>. Contrast with C<get_geometry()> which queries the X server for the current window position, regardless of which events have been received or processed.

The position coordinates are relative to the window’s parent window.

  method get-position ( )

=item $x; X coordinate of window
=item $y; Y coordinate of window
=end pod

method get-position ( ) {

  gdk_window_get_position(
    self._get-native-object-no-reffing, my gint $x, my gint $y
  );
}

sub gdk_window_get_position (
  N-GObject $window, gint $x is rw, gint $y is rw
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-root-coords:
=begin pod
=head2 get-root-coords

Obtains the position of a window position in root window coordinates. This is similar to C<get_origin()> but allows you to pass in any position in the window, not just the origin.

  method get-root-coords ( Int() $x, Int() $y )

=item $x; X coordinate in window
=item $y; Y coordinate in window
=item $root_x; return location for X coordinate
=item $root_y; return location for Y coordinate
=end pod

method get-root-coords ( Int() $x, Int() $y ) {

  gdk_window_get_root_coords(
    self._get-native-object-no-reffing, $x, $y, my gint $root_x, my gint $root_y
  );
}

sub gdk_window_get_root_coords (
  N-GObject $window, gint $x, gint $y, gint $root_x is rw, gint $root_y is rw
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-root-origin:
=begin pod
=head2 get-root-origin

Obtains the top-left corner of the window manager frame in root window coordinates.

  method get-root-origin ( )

=item $x; return location for X position of window frame
=item $y; return location for Y position of window frame
=end pod

method get-root-origin ( ) {

  gdk_window_get_root_origin(
    self._get-native-object-no-reffing, my gint $x, my gint $y
  );
}

sub gdk_window_get_root_origin (
  N-GObject $window, gint $x is rw, gint $y is rw
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-scale-factor:
=begin pod
=head2 get-scale-factor

Returns the internal scale factor that maps from window coordiantes to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

A higher value means that drawing is automatically scaled up to a higher resolution, so any code doing drawing will automatically look nicer. However, if you are supplying pixel-based data the scale value can be used to determine whether to use a pixel resource with higher resolution data.

The scale of a window may change during runtime, if this happens a configure event will be sent to the toplevel window.

Returns: the scale factor

  method get-scale-factor ( --> Int )

=end pod

method get-scale-factor ( --> Int ) {

  gdk_window_get_scale_factor(
    self._get-native-object-no-reffing,
  )
}

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

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

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

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

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

=end pod

method get-screen ( --> N-GObject ) {

  gdk_window_get_screen(
    self._get-native-object-no-reffing,
  )
}

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:get-source-events:
=begin pod
=head2 get-source-events

Returns the event mask for I<window> corresponding to the device class specified by I<source>.

Returns: source event mask for I<window>

  method get-source-events ( GdkInputSource $source --> GdkEventMask )

=item $source; a B<Gnome::Gdk3::InputSource> to define the source class.
=end pod

method get-source-events ( GdkInputSource $source --> GdkEventMask ) {
  GdkEventMask(
    gdk_window_get_source_events( self._get-native-object-no-reffing, $source)
  )
}

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

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

Gets the bitwise OR of the currently active window state flags, from the B<Gnome::Gdk3::WindowState> enumeration.

Returns: window state bitfield

  method get-state ( --> GdkWindowState )

=end pod

method get-state ( --> GdkWindowState ) {
  GdkWindowState(gdk_window_get_state(self._get-native-object-no-reffing))
}

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

#-------------------------------------------------------------------------------
#TM:0:get-support-multidevice:
=begin pod
=head2 get-support-multidevice

Returns C<True> if the window is aware of the existence of multiple devices.

Returns: C<True> if the window handles multidevice features.

  method get-support-multidevice ( --> Bool )

=end pod

method get-support-multidevice ( --> Bool ) {

  gdk_window_get_support_multidevice(
    self._get-native-object-no-reffing,
  ).Bool
}

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

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

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

Any window type but C<GDK_WINDOW_CHILD> is considered a toplevel window, as is a C<GDK_WINDOW_CHILD> window that has a root window as parent.

Note that you should use C<get_effective_toplevel()> when you want to get to a window’s toplevel as seen on screen, because C<get_toplevel()> will most likely not do what you expect if there are offscreen windows in the hierarchy.

Returns: the toplevel window containing I<window>

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

=end pod

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

  gdk_window_get_toplevel(
    self._get-native-object-no-reffing,
  )
}

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

#-------------------------------------------------------------------------------
#TM:0:get-type-hint:
=begin pod
=head2 get-type-hint

This function returns the type hint set for a window.

Returns: The type hint set for I<window>

  method get-type-hint ( --> GdkWindowTypeHint )

=end pod

method get-type-hint ( --> GdkWindowTypeHint ) {
  GdkWindowTypeHint(
    gdk_window_get_type_hint(self._get-native-object-no-reffing)
  )
}

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:get-update-area:
=begin pod
=head2 get-update-area

Transfers ownership of the update area from I<window> to the caller of the function. That is, after calling this function, I<window> will no longer have an invalid/dirty region; the update area is removed from I<window> and handed to you. If a window has no update area, C<get_update_area()> returns C<undefined>. You are responsible for calling C<cairo_region_destroy()> on the returned region if it’s non-C<undefined>.

Returns: the update area for I<window>

  method get-update-area ( --> cairo_region_t )

=end pod

method get-update-area ( --> cairo_region_t ) {
  gdk_window_get_update_area(
    self._get-native-object-no-reffing,
  )
}

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

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

Retrieves the user data for I<window>, which is normally the widget that I<window> belongs to. See C<set_user_data()>.

  method get-user-data ( Pointer $data )

=item $data; return location for user data
=end pod

method get-user-data ( Pointer $data ) {
  gdk_window_get_user_data( self._get-native-object-no-reffing, $data);
}

sub gdk_window_get_user_data (
  N-GObject $window, gpointer $data
) is native(&gdk-lib)
  { * }

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

Computes the region of the I<window> that is potentially visible. This does not necessarily take into account if the window is obscured by other windows, but no area outside of this region is visible.

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

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

=end pod

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

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

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

Gets the B<Gnome::Gdk3::Visual> describing the pixel format of I<window>.

Returns: a native B<Gnome::Gdk3::Visual>

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

=end pod

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

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

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

Returns the width of the given I<window>.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

Returns: The width of I<window>

  method get-width ( --> Int )

=end pod

method get-width ( --> Int ) {
  gdk_window_get_width(self._get-native-object-no-reffing)
}

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

#-------------------------------------------------------------------------------
#TM:1:get-window-type:
=begin pod
=head2 get-window-type

Gets the type of the window. See B<Gnome::Gdk3::WindowType>.

Returns: type of window

  method get-window-type ( --> GdkWindowType )

=end pod

method get-window-type ( --> GdkWindowType ) {
  GdkWindowType(
    gdk_window_get_window_type(self._get-native-object-no-reffing)
  )
}

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

#-------------------------------------------------------------------------------
#TM:0:has-native:
=begin pod
=head2 has-native

Checks whether the window has a native window or not. Note that you can use C<ensure_native()> if a native window is needed.

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

  method has-native ( --> Bool )

=end pod

method has-native ( --> Bool ) {
  gdk_window_has_native(self._get-native-object-no-reffing).Bool
}

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

#-------------------------------------------------------------------------------
#TM:0:hide:
=begin pod
=head2 hide

For toplevel windows, withdraws them, so they will no longer be known to the window manager; for all windows, unmaps them, so they won’t be displayed. Normally done automatically as part of C<gtk_widget_hide()>.

  method hide ( )

=end pod

method hide ( ) {
  gdk_window_hide(self._get-native-object-no-reffing);
}

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

#-------------------------------------------------------------------------------
#TM:0:iconify:
=begin pod
=head2 iconify

Asks to iconify (minimize) I<window>. The window manager may choose to ignore the request, but normally will honor it. Using C<gtk_window_iconify()> is preferred, if you have a B<Gnome::Gdk3::Window> widget.

This function only makes sense when I<window> is a toplevel window.

  method iconify ( )

=end pod

method iconify ( ) {
  gdk_window_iconify(self._get-native-object-no-reffing);
}

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:input-shape-combine-region:
=begin pod
=head2 input-shape-combine-region

Like C<shape_combine_region()>, but the shape applies only to event handling. Mouse events which happen while the pointer position corresponds to an unset bit in the mask will be passed on the window below I<window>.

An input shape is typically used with RGBA windows. The alpha channel of the window defines which pixels are invisible and allows for nicely antialiased borders, and the input shape controls where the window is “clickable”.

On the X11 platform, this requires version 1.1 of the shape extension.

On the Win32 platform, this functionality is not present and the function does nothing.

  method input-shape-combine-region ( cairo_region_t $shape_region, Int() $offset_x, Int() $offset_y )

=item $shape_region; region of window to be non-transparent
=item $offset_x; X position of I<shape_region> in I<window> coordinates
=item $offset_y; Y position of I<shape_region> in I<window> coordinates
=end pod

method input-shape-combine-region (
  cairo_region_t $shape_region, Int() $offset_x, Int() $offset_y
) {
  gdk_window_input_shape_combine_region(
    self._get-native-object-no-reffing, $shape_region, $offset_x, $offset_y
  );
}

sub gdk_window_input_shape_combine_region (
  N-GObject $window, cairo_region_t $shape_region, gint $offset_x, gint $offset_y
) is native(&gdk-lib)
  { * }
}}

#`{{
#-------------------------------------------------------------------------------
#TM:0:invalidate-maybe-recurse:
=begin pod
=head2 invalidate-maybe-recurse

Adds I<region> to the update area for I<window>. The update area is the region that needs to be redrawn, or “dirty region.” The call C<process_updates()> sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of I<window> in response to those expose events.

GDK will call C<process_all_updates()> on your behalf whenever your program returns to the main loop and becomes idle, so normally there’s no need to do that manually, you just need to invalidate regions that you know should be redrawn.

The I<child_func> parameter controls whether the region of each child window that intersects I<region> will also be invalidated. Only children for which I<child_func> returns B<TRUE> will have the area invalidated.

  method invalidate-maybe-recurse ( cairo_region_t $region, GdkWindowChildFunc $child_func, Pointer $user_data )

=item $region; a B<cairo_region_t>
=item $child_func; (scope call) : function to use to decide if to recurse to a child, C<undefined> means never recurse.
=item $user_data; data passed to I<child_func>
=end pod

method invalidate-maybe-recurse ( cairo_region_t $region, GdkWindowChildFunc $child_func, Pointer $user_data ) {

  gdk_window_invalidate_maybe_recurse(
    self._get-native-object-no-reffing, $region, $child_func, $user_data
  );
}

sub gdk_window_invalidate_maybe_recurse (
  N-GObject $window, cairo_region_t $region, GdkWindowChildFunc $child_func, gpointer $user_data
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:invalidate-rect:
=begin pod
=head2 invalidate-rect

A convenience wrapper around C<invalidate_region()> which invalidates a rectangular region. See C<invalidate_region()> for details.

  method invalidate-rect ( N-GObject() $rect, Bool $invalidate_children )

=item $rect; rectangle to invalidate or C<undefined> to invalidate the whole window
=item $invalidate_children; whether to also invalidate child windows
=end pod

method invalidate-rect ( N-GObject() $rect, Bool $invalidate_children ) {
  gdk_window_invalidate_rect(
    self._get-native-object-no-reffing, $rect, $invalidate_children
  );
}

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

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

Adds I<region> to the update area for I<window>. The update area is the region that needs to be redrawn, or “dirty region.” The call C<process_updates()> sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of I<window> in response to those expose events.

GDK will call C<process_all_updates()> on your behalf whenever your program returns to the main loop and becomes idle, so normally there’s no need to do that manually, you just need to invalidate regions that you know should be redrawn.

The I<invalidate_children> parameter controls whether the region of each child window that intersects I<region> will also be invalidated. If C<False>, then the update area for child windows will remain unaffected. See invalidate_maybe_recurse if you need fine grained control over which children are invalidated.

  method invalidate-region ( cairo_region_t $region, Bool $invalidate_children )

=item $region; a B<cairo_region_t>
=item $invalidate_children; C<True> to also invalidate child windows
=end pod

method invalidate-region ( cairo_region_t $region, Bool $invalidate_children ) {
  gdk_window_invalidate_region(
    self._get-native-object-no-reffing, $region, $invalidate_children
  );
}

sub gdk_window_invalidate_region (
  N-GObject $window, cairo_region_t $region, gboolean $invalidate_children
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:is-destroyed:
=begin pod
=head2 is-destroyed

Check to see if a window is destroyed..

Returns: C<True> if the window is destroyed

  method is-destroyed ( --> Bool )

=end pod

method is-destroyed ( --> Bool ) {
  gdk_window_is_destroyed(self._get-native-object-no-reffing).Bool
}

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

#-------------------------------------------------------------------------------
#TM:0:is-input-only:
=begin pod
=head2 is-input-only

Determines whether or not the window is an input only window.

Returns: C<True> if I<window> is input only

  method is-input-only ( --> Bool )

=end pod

method is-input-only ( --> Bool ) {
  gdk_window_is_input_only(self._get-native-object-no-reffing).Bool
}

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

#-------------------------------------------------------------------------------
#TM:0:is-shaped:
=begin pod
=head2 is-shaped

Determines whether or not the window is shaped.

Returns: C<True> if I<window> is shaped

  method is-shaped ( --> Bool )

=end pod

method is-shaped ( --> Bool ) {
  gdk_window_is_shaped(self._get-native-object-no-reffing).Bool
}

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

#-------------------------------------------------------------------------------
#TM:0:is-viewable:
=begin pod
=head2 is-viewable

Check if the window and all ancestors of the window are mapped. (This is not necessarily "viewable" in the X sense, since we only check as far as we have GDK window parents, not to the root window.)

Returns: C<True> if the window is viewable

  method is-viewable ( --> Bool )

=end pod

method is-viewable ( --> Bool ) {
  gdk_window_is_viewable(self._get-native-object-no-reffing).Bool
}

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

#-------------------------------------------------------------------------------
#TM:0:is-visible:
=begin pod
=head2 is-visible

Checks whether the window has been mapped (with C<show()> or C<show_unraised()>).

Returns: C<True> if the window is mapped

  method is-visible ( --> Bool )

=end pod

method is-visible ( --> Bool ) {
  gdk_window_is_visible(self._get-native-object-no-reffing).Bool
}

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

#-------------------------------------------------------------------------------
#TM:0:lower:
=begin pod
=head2 lower

Lowers I<window> to the bottom of the Z-order (stacking order), so that other windows with the same parent window appear above I<window>. This is true whether or not the other windows are visible.

If I<window> is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, C<lower()> only requests the restack, does not guarantee it.

Note that C<show()> raises the window again, so don’t call this function before C<show()>. (Try C<show_unraised()>.)

  method lower ( )

=end pod

method lower ( ) {
  gdk_window_lower(self._get-native-object-no-reffing);
}

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

#-------------------------------------------------------------------------------
#TM:0:mark-paint-from-clip:
=begin pod
=head2 mark-paint-from-clip

If you call this during a paint (e.g. between C<begin_paint_region()> and C<end_paint()> then GDK will mark the current clip region of the window as being drawn. This is required when mixing GL rendering via C<gdk_cairo_draw_from_gl()> and cairo rendering, as otherwise GDK has no way of knowing when something paints over the GL-drawn regions.

This is typically called automatically by GTK+ and you don't need to care about this.

  method mark-paint-from-clip ( cairo_t $cr )

=item $cr; a B<cairo_t>
=end pod

method mark-paint-from-clip ( cairo_t $cr ) {
  gdk_window_mark_paint_from_clip( self._get-native-object-no-reffing, $cr);
}

sub gdk_window_mark_paint_from_clip (
  N-GObject $window, cairo_t $cr
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:maximize:
=begin pod
=head2 maximize

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

On X11, asks the window manager to maximize I<window>, 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 “maximized”; so you can’t rely on the maximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably maximizes the window.

  method maximize ( )

=end pod

method maximize ( ) {
  gdk_window_maximize(self._get-native-object-no-reffing);
}

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

#-------------------------------------------------------------------------------
#TM:0:merge-child-input-shapes:
=begin pod
=head2 merge-child-input-shapes

Merges the input shape masks for any child windows into the input shape mask for I<window>. i.e. the union of all input masks for I<window> and its children will become the new input mask for I<window>. See C<input_shape_combine_region()>.

This function is distinct from C<set_child_input_shapes()> because it includes I<window>’s input shape mask in the set of shapes to be merged.

  method merge-child-input-shapes ( )

=end pod

method merge-child-input-shapes ( ) {
  gdk_window_merge_child_input_shapes(self._get-native-object-no-reffing);
}

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

#-------------------------------------------------------------------------------
#TM:0:merge-child-shapes:
=begin pod
=head2 merge-child-shapes

Merges the shape masks for any child windows into the shape mask for I<window>. i.e. the union of all masks for I<window> and its children will become the new mask for I<window>. See C<shape_combine_region()>.

This function is distinct from C<set_child_shapes()> because it includes I<window>’s shape mask in the set of shapes to be merged.

  method merge-child-shapes ( )

=end pod

method merge-child-shapes ( ) {
  gdk_window_merge_child_shapes(self._get-native-object-no-reffing);
}

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

#-------------------------------------------------------------------------------
#TM:0:move:
=begin pod
=head2 move

Repositions a window relative to its parent window. For toplevel windows, window managers may ignore or modify the move; you should probably use C<gtk_window_move()> on a B<Gnome::Gdk3::Window> widget anyway, instead of using GDK functions. For child windows, the move will reliably succeed.

If you’re also planning to resize the window, use C<move_resize()> to both move and resize simultaneously, for a nicer visual effect.

  method move ( Int() $x, Int() $y )

=item $x; X coordinate relative to window’s parent
=item $y; Y coordinate relative to window’s parent
=end pod

method move ( Int() $x, Int() $y ) {
  gdk_window_move( self._get-native-object-no-reffing, $x, $y);
}

sub gdk_window_move (
  N-GObject $window, gint $x, gint $y
) is native(&gdk-lib)
  { * }

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

Move the part of I<window> indicated by I<region> by I<dy> pixels in the Y direction and I<dx> pixels in the X direction. The portions of I<region> that not covered by the new position of I<region> are invalidated.

Child windows are not moved.

  method move-region ( cairo_region_t $region, Int() $dx, Int() $dy )

=item $region; The B<cairo_region_t> to move
=item $dx; Amount to move in the X direction
=item $dy; Amount to move in the Y direction
=end pod

method move-region ( cairo_region_t $region, Int() $dx, Int() $dy ) {
  gdk_window_move_region(
    self._get-native-object-no-reffing, $region, $dx, $dy
  );
}

sub gdk_window_move_region (
  N-GObject $window, cairo_region_t $region, gint $dx, gint $dy
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:move-resize:
=begin pod
=head2 move-resize

Equivalent to calling C<move()> and C<resize()>, except that both operations are performed at once, avoiding strange visual effects. (i.e. the user may be able to see the window first move, then resize, if you don’t use C<move_resize()>.)

  method move-resize ( Int() $x, Int() $y, Int() $width, Int() $height )

=item $x; new X position relative to window’s parent
=item $y; new Y position relative to window’s parent
=item $width; new width
=item $height; new height
=end pod

method move-resize ( Int() $x, Int() $y, Int() $width, Int() $height ) {
  gdk_window_move_resize(
    self._get-native-object-no-reffing, $x, $y, $width, $height
  );
}

sub gdk_window_move_resize (
  N-GObject $window, gint $x, gint $y, gint $width, gint $height
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:move-to-rect:
=begin pod
=head2 move-to-rect

Moves I<window> to I<rect>, aligning their anchor points.

I<rect> is relative to the top-left corner of the window that I<window> is transient for. I<rect_anchor> and I<window_anchor> determine anchor points on I<rect> and I<window> to pin together. I<rect>'s anchor point can optionally be offset by I<rect_anchor_dx> and I<rect_anchor_dy>, which is equivalent to offsetting the position of I<window>.

I<anchor_hints> determines how I<window> will be moved if the anchor points cause it to move off-screen. For example, C<GDK_ANCHOR_FLIP_X> will replace C<GDK_GRAVITY_NORTH_WEST> with C<GDK_GRAVITY_NORTH_EAST> and vice versa if I<window> extends beyond the left or right edges of the monitor.

Connect to the  I<moved-to-rect> signal to find out how it was actually positioned.

  method move-to-rect (
    N-GdkRectangle $rect, GdkGravity $rect_anchor,
    GdkGravity $window_anchor, GdkAnchorHints $anchor_hints,
    Int() $rect_anchor_dx, Int() $rect_anchor_dy
  )

=item $rect; the destination rectangle to align I<window> with
=item $rect_anchor; the point on I<rect> to align with I<window>'s anchor point
=item $window_anchor; the point on I<window> to align with I<rect>'s anchor point
=item $anchor_hints; positioning hints to use when limited on space
=item $rect_anchor_dx; horizontal offset to shift I<window>, i.e. I<rect>'s anchor point
=item $rect_anchor_dy; vertical offset to shift I<window>, i.e. I<rect>'s anchor point
=end pod

method move-to-rect (
  N-GdkRectangle $rect, GdkGravity $rect_anchor, GdkGravity $window_anchor,
  GdkAnchorHints $anchor_hints, Int() $rect_anchor_dx, Int() $rect_anchor_dy
) {
  gdk_window_move_to_rect(
    self._get-native-object-no-reffing, $rect, $rect_anchor, $window_anchor,
    $anchor_hints, $rect_anchor_dx, $rect_anchor_dy
  );
}

sub gdk_window_move_to_rect (
  N-GObject $window, N-GdkRectangle $rect, GEnum $rect_anchor,
  GEnum $window_anchor, GEnum $anchor_hints, gint $rect_anchor_dx,
  gint $rect_anchor_dy
) is native