### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/Window.rakumod
### ----------------------------------------------------
### -- Chunk 3 of 4
width, gint $height
) is native(&gtk-lib)
  { * }

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

By default, windows have a close button in the window frame. Some [window managers][gtk-X11-arch] allow GTK+ to disable this button. If you set the deletable property to C<False> using this function, GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling C<Gnome::Gtk3::Widget.show()>.

On Windows, this function always works, since there’s no window manager policy involved.

  method set-deletable ( Bool $setting )

=item Bool $setting; C<True> to decorate the window as deletable
=end pod

method set-deletable ( Bool $setting ) {

  gtk_window_set_deletable(
    self._f('GtkWindow'), $setting
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-destroy-with-parent:
=begin pod
=head2 set-destroy-with-parent

If I<setting> is C<True>, then destroying the transient parent of I<window> will also destroy I<window> itself. This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they're associated with, for example.

  method set-destroy-with-parent ( Bool $setting )

=item Bool $setting; whether to destroy I<window> with its transient parent
=end pod

method set-destroy-with-parent ( Bool $setting ) {

  gtk_window_set_destroy_with_parent(
    self._f('GtkWindow'), $setting
  );
}

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

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

If I<focus> is not the current focus widget, and is focusable, sets it as the focus widget for the window. If I<focus> is C<undefined>, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use C<Gnome::Gtk3::Widget.grab-focus()> instead of this function.

  method set-focus ( N-GObject $focus )

=item N-GObject $focus; widget to be the new focus widget, or C<undefined> to unset any focus widget for the toplevel window.
=end pod

method set-focus ( $focus is copy ) {
  $focus .= _get-native-object-no-reffing unless $focus ~~ N-GObject;

  gtk_window_set_focus(
    self._f('GtkWindow'),
  );
}

sub gtk_window_set_focus (
  N-GObject $window, N-GObject $focus
) is native(&gtk-lib)
  { * }

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

Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped. This function sets this hint.

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

=item Bool $setting; C<True> to let this window receive input focus on map
=end pod

method set-focus-on-map ( Bool $setting ) {

  gtk_window_set_focus_on_map(
    self._f('GtkWindow'), $setting
  );
}

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

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

Sets the  I<focus-visible> property.

  method set-focus-visible ( Bool $setting )

=item Bool $setting; the new value
=end pod

method set-focus-visible ( Bool $setting ) {

  gtk_window_set_focus_visible(
    self._f('GtkWindow'), $setting
  );
}

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

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

This function sets up hints about how a window can be resized by the user. You can set a minimum and maximum size; allowed resize increments (e.g. for xterm, you can only resize by the size of a character); aspect ratios; and more. See the B<Gnome::Gtk3::Geometry> struct.

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

=item N-GObject $geometry_widget; widget the geometry hints used to be applied to or C<undefined>. Since 3.20 this argument is ignored and GTK behaves as if C<undefined> was set.
=item N-GdkGeometry $geometry; struct containing geometry information or C<undefined>
=item GdkWindowHints $geom_mask; mask indicating which struct fields should be paid attention to
=end pod

method set-geometry-hints ( $geometry_widget is copy, N-GdkGeometry $geometry, GdkWindowHints $geom_mask ) {
  $geometry_widget .= _get-native-object-no-reffing unless $geometry_widget ~~ N-GObject;

  gtk_window_set_geometry_hints(
    self._f('GtkWindow'), $geometry, $geom_mask
  );
}

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

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

Window gravity defines the meaning of coordinates passed to C<move()>. See C<move()> and B<Gnome::Gtk3::Gravity> for more details.

The default window gravity is C<GDK_GRAVITY_NORTH_WEST> which will typically “do what you mean.”

  method set-gravity ( GdkGravity $gravity )

=item GdkGravity $gravity; window gravity
=end pod

method set-gravity ( GdkGravity $gravity ) {

  gtk_window_set_gravity(
    self._f('GtkWindow'), $gravity
  );
}

sub gtk_window_set_gravity (
  N-GObject $window, GEnum $gravity
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-has-user-ref-count:
=begin pod
=head2 set-has-user-ref-count

Tells GTK+ whether to drop its extra reference to the window when C<Gnome::Gtk3::Widget.destroy()> is called.

This function is only exported for the benefit of language bindings which may need to keep the window alive until their wrapper object is garbage collected. There is no justification for ever calling this function in an application.

  method set-has-user-ref-count ( Bool $setting )

=item Bool $setting; the new value
=end pod

method set-has-user-ref-count ( Bool $setting ) {

  gtk_window_set_has_user_ref_count(
    self._f('GtkWindow'), $setting
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-hide-titlebar-when-maximized:
=begin pod
=head2 set-hide-titlebar-when-maximized

If I<setting> is C<True>, then I<window> will request that it’s titlebar should be hidden when maximized. This is useful for windows that don’t convey any information other than the application name in the titlebar, to put the available screen space to better use. If the underlying window system does not support the request, the setting will not have any effect.

Note that custom titlebars set with C<set-titlebar()> are not affected by this. The application is in full control of their content and visibility anyway.

  method set-hide-titlebar-when-maximized ( Bool $setting )

=item Bool $setting; whether to hide the titlebar when I<window> is maximized
=end pod

method set-hide-titlebar-when-maximized ( Bool $setting ) {

  gtk_window_set_hide_titlebar_when_maximized(
    self._f('GtkWindow'), $setting
  );
}

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

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

Sets up the icon representing a B<Gnome::Gtk3::Window>. This icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary.

The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.

If you have your icon hand-drawn in multiple sizes, use C<set-icon-list()>. Then the best size will be used.

This function is equivalent to calling C<set-icon-list()> with a 1-element list.

See also C<set-default-icon-list()> to set the icon for all windows in your application in one go.

  method set-icon ( N-GObject $icon )

=item N-GObject $icon; icon image, or C<undefined>
=end pod

method set-icon ( $icon is copy ) {
  $icon .= _get-native-object-no-reffing unless $icon ~~ N-GObject;

  gtk_window_set_icon(
    self._f('GtkWindow'), $icon
  );
}

sub gtk_window_set_icon (
  N-GObject $window, N-GObject $icon
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-icon-from-file:
=begin pod
=head2 set-icon-from-file

Sets the icon for I<window>.
=comment Warns on failure if I<err> is C<undefined>.

This function is equivalent to calling C<set-icon()> with a pixbuf created by loading the image from I<filename>.

Returns: an invalid error object if setting the icon succeeded.

  method set-icon-from-file ( Str $filename --> Gnome::Glib::Error )

=item Str $filename; location of icon file
=end pod

method set-icon-from-file ( Str $filename --> Gnome::Glib::Error ) {
  my CArray[N-GError] $e .= new(N-GError);

  my Int $r = gtk_window_set_icon_from_file(
    self._f('GtkWindow'), $filename, $e
  );

  if $r {
    Gnome::Glib::Error.new(:native-object(N-GError))
  }

  else {
    Gnome::Glib::Error.new(:native-object($e[0]))
  }
}

sub gtk_window_set_icon_from_file (
  N-GObject $window, gchar-ptr $filename, CArray[N-GError] $err --> gboolean
) is native(&gtk-lib)
  { * }

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

Sets up the icon representing a B<Gnome::Gtk3::Window>. The icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary.

C<set-icon-list()> allows you to pass in the same icon in several hand-drawn sizes. The list should contain the natural sizes your icon is available in; that is, don’t scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.

By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling.

Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them.

See also C<set-default-icon-list()> to set the icon for all windows in your application in one go.

Note that transient windows (those who have been set transient for another window using C<set-transient-for()>) will inherit their icon from their transient parent. So there’s no need to explicitly set the icon on transient windows.

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

=item N-GList $list; list of native B<Gnome::Gdk3::Pixbuf> objects
=end pod

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

  gtk_window_set_icon_list(
    self._f('GtkWindow'),
  );
}

sub gtk_window_set_icon_list (
  N-GObject $window, N-GList $list
) is native(&gtk-lib)
  { * }

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

Sets the icon for the window from a named themed icon. See the docs for B<Gnome::Gtk3::IconTheme> for more details. On some platforms, the window icon is not used at all.

Note that this has nothing to do with the WM-ICON-NAME property which is mentioned in the ICCCM.

  method set-icon-name ( Str $name )

=item Str $name; the name of the themed icon
=end pod

method set-icon-name ( Str $name ) {

  gtk_window_set_icon_name(
    self._f('GtkWindow'), $name
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-interactive-debugging:
=begin pod
=head2 set-interactive-debugging

Opens or closes the [interactive debugger][interactive-debugging], which offers access to the widget hierarchy of the application and to useful debugging tools.

  method set-interactive-debugging ( Bool $enable )

=item Bool $enable; C<True> to enable interactive debugging
=end pod

method set-interactive-debugging ( Bool $enable ) {

  gtk_window_set_interactive_debugging(
    self._f('GtkWindow'), $enable
  );
}

sub gtk_window_set_interactive_debugging (
  gboolean $enable
) is native(&gtk-lib)
  { * }

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

Asks to keep I<window> above, so that it stays on top. Note that you shouldn’t assume the window is definitely above afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch]) could not keep it above, and not all window managers support keeping windows above. But normally the window will end kept above. Just don’t write code that crashes if not.

It’s permitted to call this function before showing a window, in which case the window will be kept above when it appears onscreen initially.

You can track the above state via the “window-state-event” signal on B<Gnome::Gtk3::Widget>.

Note that, according to the [Extended Window Manager Hints Specification](http://www.freedesktop.org/Standards/wm-spec), the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs.

  method set-keep-above ( Bool $setting )

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

method set-keep-above ( Bool $setting ) {

  gtk_window_set_keep_above(
    self._f('GtkWindow'), $setting
  );
}

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

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

Asks to keep I<window> below, so that it stays in bottom. Note that you shouldn’t assume the window is definitely below afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch]) could not keep it below, and not all window managers support putting windows below. But normally the window will be kept below. Just don’t write code that crashes if not.

It’s permitted to call this function before showing a window, in which case the window will be kept below when it appears onscreen initially.

You can track the below state via the “window-state-event” signal on B<Gnome::Gtk3::Widget>.

Note that, according to the [Extended Window Manager Hints Specification](http://www.freedesktop.org/Standards/wm-spec), the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs.

  method set-keep-below ( Bool $setting )

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

method set-keep-below ( Bool $setting ) {

  gtk_window_set_keep_below(
    self._f('GtkWindow'), $setting
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-mnemonic-modifier:
=begin pod
=head2 set-mnemonic-modifier

Sets the mnemonic modifier for this window.

  method set-mnemonic-modifier ( GdkModifierType $modifier )

=item GdkModifierType $modifier; the modifier mask used to activate mnemonics on this window.
=end pod

method set-mnemonic-modifier ( GdkModifierType $modifier ) {

  gtk_window_set_mnemonic_modifier(
    self._f('GtkWindow'), $modifier
  );
}

sub gtk_window_set_mnemonic_modifier (
  N-GObject $window, GEnum $modifier
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-mnemonics-visible:
=begin pod
=head2 set-mnemonics-visible

Sets the  I<mnemonics-visible> property.

  method set-mnemonics-visible ( Bool $setting )

=item Bool $setting; the new value
=end pod

method set-mnemonics-visible ( Bool $setting ) {

  gtk_window_set_mnemonics_visible(
    self._f('GtkWindow'), $setting
  );
}

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

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

Sets a window modal or non-modal. Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use C<set-transient-for()> to make the dialog transient for the parent; most [window managers][gtk-X11-arch] will then disallow lowering the dialog below the parent.

  method set-modal ( Bool $modal )

=item Bool $modal; whether the window is modal
=end pod

method set-modal ( Bool $modal ) {
  gtk_window_set_modal( self._f('GtkWindow'), $modal);
}

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

#-------------------------------------------------------------------------------
#TM:1:set-position:
=begin pod
=head2 set-position

Sets a position constraint for this window. If the old or new constraint is C<GTK-WIN-POS-CENTER-ALWAYS>, this will also cause the window to be repositioned to satisfy the new constraint.

  method set-position ( GtkWindowPosition $position )

=item GtkWindowPosition $position; a position constraint.
=end pod

method set-position ( GtkWindowPosition $position ) {
  gtk_window_set_position( self._f('GtkWindow'), $position);
}

sub gtk_window_set_position (
  N-GObject $window, GEnum $position
) is native(&gtk-lib)
  { * }

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

Sets whether the user can resize a window. Windows are user resizable by default.

  method set-resizable ( Bool $resizable )

=item Bool $resizable; C<True> if the user can resize this window
=end pod

method set-resizable ( Bool $resizable ) {
  gtk_window_set_resizable( self._f('GtkWindow'), $resizable);
}

sub gtk_window_set_resizable (
  N-GObject $window, gboolean $resizable
) is native(&gtk-lib)
  { * }

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

This function is only useful on X11, not with other GTK+ targets.

In combination with the window title, the window role allows a [window manager][gtk-X11-arch] to identify "the same" window when an application is restarted. So for example you might set the “toolbox” role on your app’s toolbox window, so that when the user restarts their session, the window manager can put the toolbox back in the same place.

If a window already has a unique title, you don’t need to set the role, since the WM can use the title to identify the window when restoring the session.

  method set-role ( Str $role )

=item Str $role; unique identifier for the window to be used when restoring a session
=end pod

method set-role ( Str $role ) {

  gtk_window_set_role(
    self._f('GtkWindow'), $role
  );
}

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

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

Sets the B<Gnome::Gdk3::Screen> where the I<window> is displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.

  method set-screen ( N-GObject $screen )

=item N-GObject $screen; a B<Gnome::Gdk3::Screen>.
=end pod

method set-screen ( $screen is copy ) {
  $screen .= _get-native-object-no-reffing unless $screen ~~ N-GObject;

  gtk_window_set_screen(
    self._f('GtkWindow'),
  );
}

sub gtk_window_set_screen (
  N-GObject $window, N-GObject $screen
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-skip-pager-hint:
=begin pod
=head2 set-skip-pager-hint

Windows may set a hint asking the desktop environment not to display the window in the pager. This function sets this hint. (A "pager" is any desktop navigation tool such as a workspace switcher that displays a thumbnail representation of the windows on the screen.)

  method set-skip-pager-hint ( Bool $setting )

=item Bool $setting; C<True> to keep this window from appearing in the pager
=end pod

method set-skip-pager-hint ( Bool $setting ) {

  gtk_window_set_skip_pager_hint(
    self._f('GtkWindow'), $setting
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-skip-taskbar-hint:
=begin pod
=head2 set-skip-taskbar-hint

Windows may set a hint asking the desktop environment not to display the window in the task bar. This function sets this hint.

  method set-skip-taskbar-hint ( Bool $setting )

=item Bool $setting; C<True> to keep this window from appearing in the task bar
=end pod

method set-skip-taskbar-hint ( Bool $setting ) {

  gtk_window_set_skip_taskbar_hint(
    self._f('GtkWindow'), $setting
  );
}

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

#-------------------------------------------------------------------------------
#TM:0:set-startup-id:
=begin pod
=head2 set-startup-id

Startup notification identifiers are used by desktop environment to track application startup, to provide user feedback and other features. This function changes the corresponding property on the underlying GdkWindow. Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling C<present()> or any equivalent function generating a window map event.

This function is only useful on X11, not with other GTK+ targets.

  method set-startup-id ( Str $startup_id )

=item Str $startup_id; a string with startup-notification identifier
=end pod

method set-startup-id ( Str $startup_id ) {

  gtk_window_set_startup_id(
    self._f('GtkWindow'), $startup_id
  );
}

sub gtk_window_set_startup_id (
  N-GObject $window, gchar-ptr $startup_id
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-title:
=begin pod
=head2 set-title

Sets the title of the B<Gnome::Gtk3::Window>. The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the [window manager][gtk-X11-arch], so exactly how the title appears to users may vary according to a user’s exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.

  method set-title ( Str $title )

=item Str $title; title of the window
=end pod

method set-title ( Str $title ) {

  gtk_window_set_title(
    self._f('GtkWindow'), $title
  );
}

sub gtk_window_set_title (
  N-GObject $window, gchar-ptr $title
) is native(&gtk-lib)
  { * }

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

Sets a custom titlebar for I<window>.

A typical widget used here is B<Gnome::Gtk3::HeaderBar>, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.

If you set a custom titlebar, GTK+ will do its best to convince the window manager not to put its own titlebar on the window. Depending on the system, this function may not work for a window that is already visible, so you set the titlebar before calling C<Gnome::Gtk3::Widget.show()>.

  method set-titlebar ( N-GObject $titlebar )

=item N-GObject $titlebar; the widget to use as titlebar
=end pod

method set-titlebar ( $titlebar is copy ) {
  $titlebar .= _get-native-object-no-reffing unless $titlebar ~~ N-GObject;

  gtk_window_set_titlebar(
    self._f('GtkWindow'),
  );
}

sub gtk_window_set_titlebar (
  N-GObject $window, N-GObject $titlebar
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-transient-for:
=begin pod
=head2 set-transient-for

Dialog windows should be set transient for the main application window they were spawned from. This allows [window managers][gtk-X11-arch] to e.g. keep the dialog on top of the main window, or center the dialog over the main window. C<gtk-dialog-new-with-buttons()> and other convenience functions in GTK+ will sometimes call C<set-transient-for()> on your behalf.

Passing C<undefined> for I<parent> unsets the current transient window.

On Wayland, this function can also be used to attach a new C<GTK_WINDOW_POPUP> to a C<GTK_WINDOW_TOPLEVEL> parent already mapped on screen so that the C<GTK_WINDOW_POPUP> will be created as a subsurface-based window C<GDK_WINDOW_SUBSURFACE> which can be positioned at will relatively to the C<GTK_WINDOW_TOPLEVEL> surface.

On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.

  method set-transient-for ( N-GObject $parent )

=item N-GObject $parent; parent window, or C<undefined>
=end pod

method set-transient-for ( $parent is copy ) {
  $parent .= _get-native-object-no-reffing unless $parent ~~ N-GObject;

  gtk_window_set_transient_for(
    self._f('GtkWindow'), $parent
  );
}

sub gtk_window_set_transient_for (
  N-GObject $window, N-GObject $parent
) is native(&gtk-lib)
  { * }

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

By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.

This function should be called before the window becomes visible.

C<gtk-dialog-new-with-buttons()> and other convenience functions in GTK+ will sometimes call C<set-type-hint()> on your behalf.

  method set-type-hint ( GdkWindowTypeHint $hint )

=item GdkWindowTypeHint $hint; the window type
=end pod

method set-type-hint ( GdkWindowTypeHint $hint ) {

  gtk_window_set_type_hint(
    self._f('GtkWindow'), $hint
  );
}

sub gtk_window_set_type_hint (
  N-GObject $window, GEnum $hint
) is native(&gtk-lib)
  { * }

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

Windows may set a hint asking the desktop environment to draw the users attention to the window. This function sets this hint.

  method set-urgency-hint ( Bool $setting )

=item Bool $setting; C<True> to mark this window as urgent
=end pod

method set-urgency-hint ( Bool $setting ) {

  gtk_window_set_urgency_hint(
    self._f('GtkWindow'), $setting
  );
}

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

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

Asks to stick I<window>, which means that it will appear on all user desktops. Note that you shouldn’t assume the window is definitely stuck afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch] could unstick it again, and some window managers do not support sticking windows. But normally the window will end up stuck. Just don't write code that crashes if not.

It’s permitted to call this function before showing a window.

You can track stickiness via the “window-state-event” signal on B<Gnome::Gtk3::Widget>.

  method stick ( )

=end pod

method stick ( ) {

  gtk_window_stick(
    self._f('GtkWindow'),
  );
}

sub gtk_window_stick (
  N-GObject $window
) is native(&gtk-lib)
  { * }

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

Asks to toggle off the fullscreen state for I<window>. Note that you shouldn’t assume the window is definitely not full screen afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch]) could fullscreen it again, and not all window managers honor requests to unfullscreen windows. But normally the window will end up restored to its normal state. Just don’t write code that crashes if not.

You can track the fullscreen state via the “window-state-event” signal on B<Gnome::Gtk3::Widget>.

  method unfullscreen ( )

=end pod

method unfullscreen ( ) {

  gtk_window_unfullscreen(
    self._f('GtkWindow'),
  );
}

sub gtk_window_unfullscreen (
  N-GObject $window
) is native(&gtk-lib)
  { * }

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

Asks to unmaximize I<window>. Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch]) could maximize it again, and not all window managers honor requests to unmaximize. But normally the window will end up unmaximized. Just don’t write code that crashes if not.

You can track maximization via the “window-state-event” signal on B<Gnome::Gtk3::Widget>.

  method unmaximize ( )

=end pod

method unmaximize ( ) {

  gtk_window_unmaximize(
    self._f('GtkWindow'),
  );
}

sub gtk_window_unmaximize (
  N-GObject $window
) is native(&gtk-lib)
  { * }

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

Asks to unstick I<window>, which means that it will appear on only one of the user’s desktops. Note that you shouldn’t assume the window is definitely unstuck afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch]) could stick it again. But normally the window will end up stuck. Just don’t write code that crashes if not.

You can track stickiness via the “window-state-event” signal on B<Gnome::Gtk3::Widget>.

  method unstick ( )

=end pod

method unstick ( ) {

  gtk_window_unstick(
    self._f('GtkWindow'),
  );
}

sub gtk_window_unstick (
  N-GObject $window
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:_gtk_window_new:
#`{{
=begin pod
=head2 _gtk_window_new

Creates a new B<Gnome::Gtk3::Window>, which is a toplevel window that can contain other widgets. Nearly always, the type of the window should be C<GTK_WINDOW_TOPLEVEL>. If you’re implementing something like a popup menu from scratch (which is a bad idea, just use B<Gnome::Gtk3::Menu>), you might use C<GTK_WINDOW_POPUP>. C<GTK_WINDOW_POPUP> is not for dialogs, though in some other toolkits dialogs are called “popups”. In GTK+, C<GTK_WINDOW_POPUP> means a pop-up menu or pop-up tooltip. On X11, popup windows are not controlled by the [window manager][gtk-X11-arch].

If you simply want an undecorated window (no window borders), use C<set-decorated()>, don’t use C<GTK_WINDOW_POPUP>.

All top-level windows created by C<new()> are stored in an internal top-level window list. This list can be obtained from C<list-toplevels()>. Due to Gtk+ keeping a reference to the window internally, C<new()> does not return a reference to the caller.

To delete a B<Gnome::Gtk3::Window>, call C<Gnome::Gtk3::Widget.destroy()>.

Returns: a new B<Gnome::Gtk3::Window>.

  method _gtk_window_new ( GtkWindowType $type --> N-GObject )

=item GtkWindowType $type; type of window
=end pod
}}

sub _gtk_window_new ( GEnum $type --> N-GObject )
  is native(&gtk-lib)
  is symbol('gtk_window_new')
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head1 Signals

There are two ways to connect to a signal. The first option you have is to use C<register-signal()> from B<Gnome::GObject::Object>. The second option is to use C<connect-object()> directly from B<Gnome::GObject::Signal>.

=head2 First method

The positional arguments of the signal handler are all obligatory as well as their types. The named attributes C<:$widget> and user data are optional.

  # handler method
  method mouse-event ( N-GdkEvent $event, :$widget ) { ... }

  # connect a signal on window object
  my Gnome::Gtk3::Window $w .= new( ... );
  $w.register-signal( self, 'mouse-event', 'button-press-event');

=head2 Second method

  my Gnome::Gtk3::Window $w .= new( ... );
  my Callable $handler = sub (
    N-GObject $native, N-GdkEvent $event, OpaquePointer $data
  ) {
    ...
  }

  $w.connect-object( 'button-press-event', $handler);

Also here, the types of positional arguments in the signal handler are important. This is because both methods C<register-signal()> and C<connect-object()> are using the signatures of the handler routines to setup the native call interface.

=head2 Supported signals


=comment -----------------------------------------------------------------------
=comment #TS:0:activate-default:
=head3 activate-default

The ::activate-default signal is a
[keybinding signal][GtkBindingSignal]
which gets emitted when the user activates the default widget
of I<window>.

  method handler (
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($window),
    *%user-options
  );

=item $window; the window which received the signal


=comment -----------------------------------------------------------------------
=comment #TS:0:activate-focus:
=head3 activate-focus

The ::activate-focus signal is a
[keybinding signal][GtkBindingSignal]
which gets emitted when the user activates the currently
focused widget of I<window