### ----------------------------------------------------
### -- Gnome::Gdk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gdk3/Window.rakumod
### ----------------------------------------------------
### -- Chunk 4 of 5
(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:offscreen-window-get-embedder:
=begin pod
=head2 offscreen-window-get-embedder

Gets the window that window is embedded in.

  method gdk-offscreen-window-get-embedder ( --> N-GObject )

=end pod

method offscreen-window-get-embedder ( --> N-GObject ) {
  gdk_offscreen_window_get_embedder(self._get-native-object-no-reffing)
}

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

#-------------------------------------------------------------------------------
#TM:0:offscreen-window-get-surface:
=begin pod
=head2 offscreen-window-get-surface

Gets the offscreen surface that an offscreen window renders into. If you need to keep this around over window resizes, you need to add a reference to it.

  method offscreen-window-get-surface ( --> cairo_surface_t )

=end pod

method offscreen-window-get-surface ( --> cairo_surface_t ) {
  gdk_offscreen_window_get_surface(self._get-native-object-no-reffing)
}

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

#-------------------------------------------------------------------------------
#TM:0:offscreen-window-set-embedder:
=begin pod
=head2 offscreen-window-set-embedder

Sets window to be embedded in embedder.

To fully embed an offscreen window, in addition to calling this function, it is also necessary to handle the “pick-embedded-child” signal on the embedder and the “to-embedder” and “from-embedder” signals on window .

  method offscreen-window-set-embedder ( N-GObject() $embedder )

=item $embedder;
=end pod

method offscreen-window-set-embedder ( N-GObject() $embedder ) {
  gdk_offscreen_window_set_embedder(
    self._get-native-object-no-reffing, $embedder
  );
}

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

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

Like C<get_children()>, but does not copy the list of children, so the list does not need to be freed.

Returns:  (element-type GdkWindow): a reference to the list of child windows in I<window>

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

=end pod

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

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

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

Raises I<window> to the top of the Z-order (stacking order), so that other windows with the same parent window appear below I<window>. This is true whether or not the 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<raise()> only requests the restack, does not guarantee it.

  method raise ( )

=end pod

method raise ( ) {
  gdk_window_raise(self._get-native-object-no-reffing);
}

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

#-------------------------------------------------------------------------------
#TM:0:register-dnd:
=begin pod
=head2 register-dnd

Registers a window as a potential drop destination.

  method register-dnd ( )

=end pod

method register-dnd ( ) {
  gdk_window_register_dnd(self._get-native-object-no-reffing);
}

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:remove-filter:
=begin pod
=head2 remove-filter

Remove a filter previously added with C<add_filter()>.

  method remove-filter ( GdkFilterFunc $function, Pointer $data )

=item $function; previously-added filter function
=item $data; user data for previously-added filter function
=end pod

method remove-filter ( GdkFilterFunc $function, Pointer $data ) {
  gdk_window_remove_filter(
    self._get-native-object-no-reffing, $function, $data
  );
}

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

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

Reparents I<window> into the given I<new_parent>. The window being reparented will be unmapped as a side effect.

  method reparent ( N-GObject() $new_parent, Int() $x, Int() $y )

=item $new_parent; new parent to move I<window> into
=item $x; X location inside the new parent
=item $y; Y location inside the new parent
=end pod

method reparent ( N-GObject() $new_parent, Int() $x, Int() $y ) {
  gdk_window_reparent( self._get-native-object-no-reffing, $new_parent, $x, $y);
}

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

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

Resizes I<window>; for toplevel windows, asks the window manager to resize the window. The window manager may not allow the resize. When using GTK+, use C<gtk_window_resize()> instead of this low-level GDK function.

Windows may not be resized below 1x1.

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

  method resize ( Int() $width, Int() $height )

=item $width; new width of the window
=item $height; new height of the window
=end pod

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

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

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

Changes the position of I<window> in the Z-order (stacking order), so that it is above I<sibling> (if I<above> is C<True>) or below I<sibling> (if I<above> is C<False>).

If I<sibling> is C<undefined>, then this either raises (if I<above> is C<True>) or lowers the window.

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

  method restack ( N-GObject() $sibling, Bool $above )

=item $sibling; a B<Gnome::Gdk3::Window> that is a sibling of I<window>, or C<undefined>
=item $above; a boolean
=end pod

method restack ( N-GObject() $sibling, Bool $above ) {
  gdk_window_restack( self._get-native-object-no-reffing, $sibling, $above);
}

sub gdk_window_restack (
  N-GObject $window, N-GObject $sibling, gboolean $above
) is native(&gdk-lib)
  { * }

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

Scroll the contents of I<window>, both pixels and children, by the given amount. I<window> itself does not move. Portions of the window that the scroll operation brings in from offscreen areas are invalidated. The invalidated region may be bigger than what would strictly be necessary.

For X11, a minimum area will be invalidated if the window has no subwindows, or if the edges of the window’s parent do not extend beyond the edges of the window. In other cases, a multi-step process is used to scroll the window which may produce temporary visual artifacts and unnecessary invalidations.

  method scroll ( Int() $dx, Int() $dy )

=item $dx; Amount to scroll in the X direction
=item $dy; Amount to scroll in the Y direction
=end pod

method scroll ( Int() $dx, Int() $dy ) {
  gdk_window_scroll( self._get-native-object-no-reffing, $dx, $dy);
}

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

#-------------------------------------------------------------------------------
#TM:0:set-accept-focus:
=begin pod
=head2 set-accept-focus

Setting I<accept_focus> to C<False> hints the desktop environment that the window doesn’t want to receive input focus.

On X, it is the responsibility of the window manager to interpret this hint. ICCCM-compliant window manager usually respect it.

  method set-accept-focus ( Bool $accept_focus )

=item $accept_focus; C<True> if the window should receive input focus
=end pod

method set-accept-focus ( Bool $accept_focus ) {
  gdk_window_set_accept_focus(
    self._get-native-object-no-reffing, $accept_focus
  );
}

sub gdk_window_set_accept_focus (
  N-GObject $window, gboolean $accept_focus
) is native(&gdk-lib)
  { * }

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

Sets the input shape mask of I<window> to the union of input shape masks for all children of I<window>, ignoring the input shape mask of I<window> itself. Contrast with C<merge_child_input_shapes()> which includes the input shape mask of I<window> in the masks to be merged.

  method set-child-input-shapes ( )

=end pod

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

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

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

Sets the shape mask of I<window> to the union of shape masks for all children of I<window>, ignoring the shape mask of I<window> itself. Contrast with C<merge_child_shapes()> which includes the shape mask of I<window> in the masks to be merged.

  method set-child-shapes ( )

=end pod

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

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:set-cursor:
=begin pod
=head2 set-cursor

Sets the default mouse pointer for a B<Gnome::Gdk3::Window>.

Note that I<cursor> must be for the same display as I<window>.

Use C<gdk_cursor_new_for_display()> or C<gdk_cursor_new_from_pixbuf()> to create the cursor. To make the cursor invisible, use C<GDK_BLANK_CURSOR>. Passing C<undefined> for the I<cursor> argument to C<set_cursor()> means that I<window> will use the cursor of its parent window. Most windows should use this default.

  method set-cursor ( N-GObject() $cursor )

=item $cursor; a B<Gnome;:Gdk3::Cursor>
=end pod

method set-cursor ( N-GObject() $cursor ) {
  gdk_window_set_cursor( self._get-native-object-no-reffing, $cursor);
}

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

#-------------------------------------------------------------------------------
#TM:4:set-decorations:
=begin pod
=head2 set-decorations

“Decorations” are the features the window manager adds to a toplevel B<Gnome::Gdk3::Window>. This function sets the traditional Motif window manager hints that tell the window manager which decorations you would like your window to have. Usually you should use C<Gnome::Gtk3::Window.set_decorated()> on a B<Gnome::Gdk3::Window> instead of using the GDK function directly.

The I<$decorations> argument is the logical OR of the fields in the C<GdkWMDecoration> enumeration. If C<GDK_DECOR_ALL> is included in the mask, the other bits indicate which decorations should be turned off. If C<GDK_DECOR_ALL> is not included, then the other bits indicate which decorations should be turned on.

Most window managers honor a decorations hint of 0 to disable all decorations, but very few honor all possible combinations of bits.

  method set-decorations ( Int $decorations )

=item $decorations; decoration hint mask
=end pod

method set-decorations ( Int $decorations ) {
  gdk_window_set_decorations( self._get-native-object-no-reffing, $decorations);
}

sub gdk_window_set_decorations (
  N-GObject $window, GFlag $decorations
) is native(&gdk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:set-device-cursor:
=begin pod
=head2 set-device-cursor

Sets a specific B<Gnome::Gdk3::Cursor> for a given device when it gets inside I<window>. Use C<gdk_cursor_new_for_display()> or C<gdk_cursor_new_from_pixbuf()> to create the cursor. To make the cursor invisible, use C<GDK_BLANK_CURSOR>. Passing C<undefined> for the I<cursor> argument to C<set_cursor()> means that I<window> will use the cursor of its parent window. Most windows should use this default.

  method set-device-cursor ( N-GObject() $device, N-GObject() $cursor )

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

method set-device-cursor ( N-GObject() $device, N-GObject() $cursor ) {
  gdk_window_set_device_cursor(
    self._get-native-object-no-reffing, $device, $cursor
  );
}

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

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

Sets the event mask for a given device (Normally a floating device, not attached to any visible pointer) to I<window>. For example, an event mask including B<Gnome::Gdk3::DK_BUTTON_PRESS_MASK> means the window should report button press events. The event mask is the bitwise OR of values from the B<Gnome::Gdk3::EventMask> enumeration.

See the [input handling overview][event-masks] for details.

  method set-device-events ( N-GObject() $device, GdkEventMask $event_mask )

=item $device; B<Gnome::Gdk3::Device> to enable events for.
=item $event_mask; event mask for I<window>
=end pod

method set-device-events ( N-GObject() $device, GdkEventMask $event_mask ) {
  gdk_window_set_device_events(
    self._get-native-object-no-reffing, $device, $event_mask
  );
}

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

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

Determines whether or not extra unprocessed motion events in the event queue can be discarded. If C<True> only the most recent event will be delivered.

Some types of applications, e.g. paint programs, need to see all motion events and will benefit from turning off event compression.

By default, event compression is enabled.

  method set-event-compression ( Bool $event_compression )

=item $event_compression; C<True> if motion events should be compressed
=end pod

method set-event-compression ( Bool $event_compression ) {
  gdk_window_set_event_compression(
    self._get-native-object-no-reffing, $event_compression
  );
}

sub gdk_window_set_event_compression (
  N-GObject $window, gboolean $event_compression
) is native(&gdk-lib)
  { * }

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

The event mask for a window determines which events will be reported for that window from all master input devices. For example, an event mask including B<Gnome::Gdk3::DK_BUTTON_PRESS_MASK> means the window should report button press events. The event mask is the bitwise OR of values from the B<Gnome::Gdk3::EventMask> enumeration.

See the [input handling overview][event-masks] for details.

  method set-events ( GdkEventMask $event_mask )

=item $event_mask; event mask for I<window>
=end pod

method set-events ( GdkEventMask $event_mask ) {
  gdk_window_set_events( self._get-native-object-no-reffing, $event_mask);
}

sub gdk_window_set_events (
  N-GObject $window, GEnum $event_mask
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-focus-on-map:
=begin pod
=head2 set-focus-on-map

Setting I<focus_on_map> to C<False> hints the desktop environment that the window doesn’t want to receive input focus when it is mapped. focus_on_map should be turned off for windows that aren’t triggered interactively (such as popups from network activity).

On X, it is the responsibility of the window manager to interpret this hint. Window managers following the freedesktop.org window manager extension specification should respect it.

  method set-focus-on-map ( Bool $focus_on_map )

=item $focus_on_map; C<True> if the window should receive input focus when mapped
=end pod

method set-focus-on-map ( Bool $focus_on_map ) {
  gdk_window_set_focus_on_map(
    self._get-native-object-no-reffing, $focus_on_map
  );
}

sub gdk_window_set_focus_on_map (
  N-GObject $window, gboolean $focus_on_map
) is native(&gdk-lib)
  { * }

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

Specifies whether the I<window> should span over all monitors (in a multi-head setup) or only the current monitor when in fullscreen mode.

The I<mode> argument is from the B<Gnome::Gdk3::FullscreenMode> enumeration. If B<Gnome::Gdk3::DK_FULLSCREEN_ON_ALL_MONITORS> is specified, the fullscreen I<window> will span over all monitors from the B<Gnome::Gdk3::Screen>.

On X11, searches through the list of monitors from the B<Gnome::Gdk3::Screen> the ones which delimit the 4 edges of the entire B<Gnome::Gdk3::Screen> and will ask the window manager to span the I<window> over these monitors.

If the XINERAMA extension is not available or not usable, this function has no effect.

Not all window managers support this, so you can’t rely on the fullscreen window to span over the multiple monitors when B<Gnome::Gdk3::DK_FULLSCREEN_ON_ALL_MONITORS> is specified.

  method set-fullscreen-mode ( GdkFullscreenMode $mode )

=item $mode; fullscreen mode
=end pod

method set-fullscreen-mode ( GdkFullscreenMode $mode ) {
  gdk_window_set_fullscreen_mode( self._get-native-object-no-reffing, $mode);
}

sub gdk_window_set_fullscreen_mode (
  N-GObject $window, GEnum $mode
) is native(&gdk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:set-functions:
=begin pod
=head2 set-functions

Sets hints about the window management functions to make available via buttons on the window frame.

On the X backend, this function sets the traditional Motif window manager hint for this purpose. However, few window managers do anything reliable or interesting with this hint. Many ignore it entirely.

The I<functions> argument is the logical OR of values from the B<Gnome::Gdk3::WMFunction> enumeration. If the bitmask includes B<Gnome::Gdk3::DK_FUNC_ALL>, then the other bits indicate which functions to disable; if it doesn’t include B<Gnome::Gdk3::DK_FUNC_ALL>, it indicates which functions to enable.

  method set-functions ( GdkWMFunction $functions )

=item $functions; bitmask of operations to allow on I<window>
=end pod

method set-functions ( GdkWMFunction $functions ) {
  gdk_window_set_functions( self._get-native-object-no-reffing, $functions);
}

sub gdk_window_set_functions (
  N-GObject $window, GEnum $functions
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:1:set-geometry-hints:
=begin pod
=head2 set-geometry-hints

Sets the geometry hints for I<window>. Hints flagged in I<geom_mask> are set, hints not flagged in I<geom_mask> are unset. To unset all hints, use a I<geom_mask> of 0 and a I<geometry> of C<undefined>.

This function provides hints to the windowing system about acceptable sizes for a toplevel window. The purpose of this is to constrain user resizing, but the windowing system will typically (but is not required to) also constrain the current size of the window to the provided values and constrain programatic resizing via C<resize()> or C<move_resize()>.

Note that on X11, this effect has no effect on windows of type C<GDK_WINDOW_TEMP> or windows where override redirect has been turned on via C<set_override_redirect()> since these windows are not resizable by the user.

Since you can’t count on the windowing system doing the constraints for programmatic resizes, you should generally call C<constrain_size()> yourself to determine appropriate sizes.

  method set-geometry-hints (
    N-GdkGeometry $geometry, GdkWindowHints $geom_mask
  )

=item $geometry; geometry hints
=item $geom_mask; bitmask indicating fields of I<geometry> to pay attention to
=end pod

method set-geometry-hints (
  N-GdkGeometry $geometry, GdkWindowHints $geom_mask
) {
  gdk_window_set_geometry_hints(
    self._get-native-object-no-reffing, $geometry, $geom_mask
  );
}

sub gdk_window_set_geometry_hints (
  N-GObject $window, N-GdkGeometry $geometry, GEnum $geom_mask
) is native(&gdk-lib)
  { * }

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

Sets the group leader window for I<window>. By default, GDK sets the group leader for all toplevel windows to a global window implicitly created by GDK. With this function you can override this default.

The group leader window allows the window manager to distinguish all windows that belong to a single application. It may for example allow users to minimize/unminimize all windows belonging to an application at once. You should only set a non-default group window if your application pretends to be multiple applications.

  method set-group ( N-GObject() $leader )

=item $leader; group leader window, or C<undefined> to restore the default group leader window
=end pod

method set-group ( N-GObject() $leader ) {
  gdk_window_set_group( self._get-native-object-no-reffing, $leader);
}

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

#-------------------------------------------------------------------------------
#TM:0:set-icon-list:
=begin pod
=head2 set-icon-list

Sets a list of icons for the window. One of these will be used to represent the window when it has been iconified. The icon is usually shown in an icon box or some sort of task bar. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality since the window manager may only need to scale the icon by a small amount or not at all.

Note that some platforms don't support window icons.

  method set-icon-list ( N-GList $pixbufs )

=item $pixbufs;  (element-type GdkPixbuf): A list of pixbufs, of different sizes.
=end pod

method set-icon-list ( $pixbufs is copy ) {
  $pixbufs .= _get-native-object-no-reffing unless $pixbufs ~~ N-GList;
  gdk_window_set_icon_list( self._get-native-object-no-reffing, $pixbufs);
}

sub gdk_window_set_icon_list (
  N-GObject $window, N-GList $pixbufs
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-icon-name:
=begin pod
=head2 set-icon-name

Windows may have a name used while minimized, distinct from the name they display in their titlebar. Most of the time this is a bad idea from a user interface standpoint. But you can set such a name with this function, if you like.

After calling this with a non-C<undefined> I<name>, calls to C<set_title()> will not update the icon title.

Using C<undefined> for I<name> unsets the icon title; further calls to C<set_title()> will again update the icon title as well.

Note that some platforms don't support window icons.

  method set-icon-name ( Str $name )

=item $name; name of window while iconified (minimized)
=end pod

method set-icon-name ( Str $name ) {
  gdk_window_set_icon_name( self._get-native-object-no-reffing, $name);
}

sub gdk_window_set_icon_name (
  N-GObject $window, gchar-ptr $name
) is native(&gdk-lib)
  { * }

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

Registers an invalidate handler for a specific window. This will get called whenever a region in the window or its children is invalidated.

This can be used to record the invalidated region, which is useful if you are keeping an offscreen copy of some region and want to keep it up to date. You can also modify the invalidated region in case you’re doing some effect where e.g. a child widget appears in multiple places.

  method set-invalidate-handler ( GdkWindowInvalidateHandlerFunc $handler )

=item $handler; a B<Gnome::Gdk3::WindowInvalidateHandlerFunc> callback function
=end pod

method set-invalidate-handler ( GdkWindowInvalidateHandlerFunc $handler ) {
  gdk_window_set_invalidate_handler(
    self._get-native-object-no-reffing, $handler
  );
}

sub gdk_window_set_invalidate_handler (
  N-GObject $window, GdkWindowInvalidateHandlerFunc $handler
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:set-keep-above:
=begin pod
=head2 set-keep-above

Set if I<window> must be kept above other windows. If the window was already above, then this function does nothing.

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

  method set-keep-above ( Bool $setting )

=item $setting; whether to keep I<window> above other windows
=end pod

method set-keep-above ( Bool $setting ) {
  gdk_window_set_keep_above( self._get-native-object-no-reffing, $setting);
}

sub gdk_window_set_keep_above (
  N-GObject $window, gboolean $setting
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-keep-below:
=begin pod
=head2 set-keep-below

Set if I<window> must be kept below other windows. If the window was already below, then this function does nothing.

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

  method set-keep-below ( Bool $setting )

=item $setting; whether to keep I<window> below other windows
=end pod

method set-keep-below ( Bool $setting ) {
  gdk_window_set_keep_below( self._get-native-object-no-reffing, $setting);
}

sub gdk_window_set_keep_below (
  N-GObject $window, gboolean $setting
) is native(&gdk-lib)
  { * }

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

The application can use this hint to tell the window manager that a certain window has modal behaviour. The window manager can use this information to handle modal windows in a special way.

You should only use this on windows for which you have previously called C<set_transient_for()>

  method set-modal-hint ( Bool $modal )

=item $modal; C<True> if the window is modal, C<False> otherwise.
=end pod

method set-modal-hint ( Bool $modal ) {
  gdk_window_set_modal_hint( self._get-native-object-no-reffing, $modal);
}

sub gdk_window_set_modal_hint (
  N-GObject $window, gboolean $modal
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-opacity:
=begin pod
=head2 set-opacity

Set I<window> to render as partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.)

For toplevel windows this depends on support from the windowing system that may not always be there. For instance, On X11, this works only on X screens with a compositing manager running. On Wayland, there is no per-window opacity value that the compositor would apply. Instead, use `set_opaque_region (window, NULL)` to tell the compositor that the entire window is (potentially) non-opaque, and draw your content with alpha, or use C<gtk_widget_set_opacity()> to set an overall opacity for your widgets.

For child windows this function only works for non-native windows.

For setting up per-pixel alpha topelevels, see C<gdk_screen_get_rgba_visual()>, and for non-toplevels, see C<set_composited()>.

Support for non-toplevel windows was added in 3.8.

  method set-opacity ( Num() $opacity )

=item $opacity; opacity
=end pod

method set-opacity ( Num() $opacity ) {
  gdk_window_set_opacity( self._get-native-object-no-reffing, $opacity);
}

sub gdk_window_set_opacity (
  N-GObject $window, gdouble $opacity
) is native(&gdk-lib)
  { * }

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

For optimisation purposes, compositing window managers may like to not draw obscured regions of windows, or turn off blending during for these regions. With RGB windows with no transparency, this is just the shape of the window, but with ARGB32 windows, the compositor does not know what regions of the window are transparent or not.

This function only works for toplevel windows.

GTK+ will update this property automatically if the I<window> background is opaque, as we know where the opaque regions are. If your window background is not opaque, please update this property in your  I<style-updated> handler.

  method set-opaque-region ( cairo_region_t $region )

=item $region; a region, or C<undefined>
=end pod

method set-opaque-region ( cairo_region_t $region ) {

  gdk_window_set_opaque_region(
    self._get-native-object-no-reffing, $region
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-override-redirect:
=begin pod
=head2 set-override-redirect

An override redirect window is not under the control of the window manager. This means it won’t have a titlebar, won’t be minimizable, etc. - it will be entirely under the control of the application. The window manager can’t see the override redirect window at all.

Override redirect should only be used for short-lived temporary windows, such as popup menus. B<Gnome::Gdk3::Menu> uses an override redirect window in its implementation, for example.

  method set-override-redirect ( Bool $override_redirect )

=item $override_redirect; C<True> if window should be override redirect
=end pod

method set-override-redirect ( Bool $override_redirect ) {
  gdk_window_set_override_redirect(
    self._get-native-object-no-reffing, $override_redirect
  );
}

sub gdk_window_set_override_redirect (
  N-GObject $window, gboolean $override_redirect
) is native(&gdk-lib)
  { * }

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

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

The default value of this is C<False>, which means that pointer events that happen inside the window are send first to the window, but if the event is not selected by the event mask then the event is sent to the parent window, and so on up the hierarchy.

If I<pass_through> is C<True> then such pointer events happen as if the window wasn't there at all, and thus will be sent first to any windows below I<window>. This is useful if the window is used in a transparent fashion. In the terminology of the web this would be called "pointer-events: none".

Note that a window with I<pass_through> C<True> can still have a subwindow without pass through, so you can get events on a subset of a window. And in that cases you would get the in-between related events such as the pointer enter/leave events on its way to the destination window.

  method set-pass-through ( Bool $pass_through )

=item $pass_through; a boolean
=end pod

method set-pass-through ( Bool $pass_through ) {
  gdk_window_set_pass_through(
    self._get-native-object-no-reffing, $pass_through
  );
}

sub gdk_window_set_pass_through (
  N-GObject $window, gboolean $pass_through
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-role:
=begin pod
=head2 set-role

When using GTK+, typically you should use C<gtk_window_set_role()> instead of this low-level function.

The window manager and session manager use a window’s role to distinguish it from other kinds of window in the same application. When an application is restarted after being saved in a previous session, all windows with the same title and role are treated as interchangeable. So if you have two windows with the same title that should be distinguished for session management purposes, you should set the role on those windows. It doesn’t matter what string you use for the role, as long as you have a different role for each non-interchangeable kind of window.

  method set-role ( Str $role )

=item $role; a string indicating its role
=end pod

method set-role ( Str $role ) {
  gdk_window_set_role( self._get-native-object-no-reffing, $role);
}

sub gdk_window_set_role (
  N-GObject $window, gchar-ptr $role
) is native(&gdk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-shadow-width:
=begin pod
=head2 set-shadow-width

Newer GTK+ windows using client-side decorations use extra geometry around their frames for effects like shadows and invisible borders. Window managers that want to maximize windows or snap to edges need to know where the extents of the actual frame lie, so that users don’t feel like windows are snapping against random invisible edges.

Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.

  method set-shadow-width (
    Int() $left, Int() $right, Int() $top, Int() $bottom
  )

=item $left; The left extent
=item $right; The right extent
=item $top; The top extent
=item $bottom; The bottom extent
=end pod

method set-shadow-width (
  Int() $left, Int() $right, Int() $top, Int() $bottom
) {
