### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/Widget.rakumod
### ----------------------------------------------------
### -- Chunk 6 of 8
 CSS file. See the documentation for the CSS syntax (on the same page as the docs for B<Gnome::Gtk3::StyleContext>).

Note that the CSS syntax has certain special characters to delimit and represent elements in a selector (period, #, >, *…), so using these will make your widget impossible to match by name. Any combination of alphanumeric symbols, dashes and underscores will suffice.

  method set-name ( Str $name )

=item Str $name; name for the widget

=end pod

method set-name ( Str $name ) {
  gtk_widget_set_name( self._f('GtkWidget'), $name);
}

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

#-------------------------------------------------------------------------------
#TM:1:set-no-show-all:
=begin pod
=head2 set-no-show-all

Sets the  I<no-show-all> property, which determines whether calls to C<show-all()> will affect this widget.

This is mostly for use in constructing widget hierarchies with externally controlled visibility, see B<Gnome::Gtk3::UIManager>.

  method set-no-show-all ( Bool $no_show_all )

=item Bool $no_show_all; the new value for the “no-show-all” property

=end pod

method set-no-show-all ( Bool $no_show_all ) {
  gtk_widget_set_no_show_all( self._f('GtkWidget'), $no_show_all);
}

sub gtk_widget_set_no_show_all (
  N-GObject $widget, gboolean $no_show_all
) is native(&gtk-lib)
  { * }

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

Request the I<widget> to be rendered partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Opacity values are clamped to the [0,1] range.). This works on both toplevel widget, and child widgets, although there are some limitations:

For toplevel widgets this depends on the capabilities of the windowing system. On X11 this has any effect only on X screens with a compositing manager running. See C<is-composited()>. On Windows it should work always, although setting a window’s opacity after the window has been shown causes it to flicker once on Windows.

For child widgets it doesn’t work if any affected widget has a native window, or disables double buffering.

  method set-opacity ( Num() $opacity )

=item Num() $opacity; desired opacity, between 0 and 1

=end pod

method set-opacity ( $opacity ) {
  gtk_widget_set_opacity( self._f('GtkWidget'), $opacity.Num);
}

sub gtk_widget_set_opacity (
  N-GObject $widget, gdouble $opacity
) is native(&gtk-lib)
  { * }

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

This function is useful only when implementing subclasses of B<Gnome::Gtk3::Container>. Sets the container as the parent of I<widget>, and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is C<unparent()>.

  method set-parent ( N-GObject $parent )

=item N-GObject $parent; parent container

=end pod

method set-parent ( $parent is copy ) {
  $parent .= _get-native-object-no-reffing unless $parent ~~ N-GObject;
  gtk_widget_set_parent( self._f('GtkWidget'), $parent);
}

sub gtk_widget_set_parent (
  N-GObject $widget, N-GObject $parent
) is native(&gtk-lib)
  { * }
}}
#`{{
#-------------------------------------------------------------------------------
#TM:0:set-parent-window:
=begin pod
=head2 set-parent-window

Sets a non default parent window for I<widget>.

For B<Gnome::Gtk3::Window> classes, setting a I<parent-window> effects whether the window is a toplevel window or can be embedded into other widgets.

For B<Gnome::Gtk3::Window> classes, this needs to be called before the window is realized.

  method set-parent-window ( N-GObject $parent_window )

=item N-GObject $parent_window; the new parent window.

=end pod

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

  gtk_widget_set_parent_window(
    self._f('GtkWidget'), $parent_window
  );
}

sub gtk_widget_set_parent_window (
  N-GObject $widget, N-GObject $parent_window
) is native(&gtk-lib)
  { * }
}}

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

Marks the widget as being realized. This function must only be called after all B<Gnome::Gtk3::Windows> for the I<widget> have been created and registered.

This function should only ever be called in a derived widget's “realize” or “unrealize” implementation.

  method set-realized ( Bool $realized )

=item Bool $realized; C<True> to mark the widget as realized

=end pod

method set-realized ( Bool $realized ) {
  gtk_widget_set_realized( self._f('GtkWidget'), $realized);
}

sub gtk_widget_set_realized (
  N-GObject $widget, gboolean $realized
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-receives-default:
=begin pod
=head2 set-receives-default

Specifies whether I<widget> will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

See C<grab-default()> for details about the meaning of “default”.

  method set-receives-default ( Bool $receives_default )

=item Bool $receives_default; whether or not I<widget> can be a default widget.

=end pod

method set-receives-default ( Bool $receives_default ) {
  gtk_widget_set_receives_default( self._f('GtkWidget'), $receives_default);
}

sub gtk_widget_set_receives_default (
  N-GObject $widget, gboolean $receives_default
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-redraw-on-allocate:
=begin pod
=head2 set-redraw-on-allocate

Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is C<True> and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance. Note that for widgets where C<get-has-window()> is C<False> setting this flag to C<False> turns off all allocation on resizing: the widget will not even redraw if its position changes; this is to allow containers that don’t draw anything to avoid excess invalidations. If you set this flag on a widget with no window that does draw on I<widget>->window, you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size.

  method set-redraw-on-allocate ( Bool $redraw_on_allocate )

=item Bool $redraw_on_allocate; if C<True>, the entire widget will be redrawn when it is allocated to a new size. Otherwise, only the new portion of the widget will be redrawn.

=end pod

method set-redraw-on-allocate ( Bool $redraw_on_allocate ) {
  gtk_widget_set_redraw_on_allocate( self._f('GtkWidget'), $redraw_on_allocate);
}

sub gtk_widget_set_redraw_on_allocate (
  N-GObject $widget, gboolean $redraw_on_allocate
) is native(&gtk-lib)
  { * }

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

Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits.

  method set-sensitive ( Bool $sensitive )

=item Bool $sensitive; C<True> to make the widget sensitive

=end pod

method set-sensitive ( Bool $sensitive ) {
  gtk_widget_set_sensitive( self._f('GtkWidget'), $sensitive);
}

sub gtk_widget_set_sensitive (
  N-GObject $widget, gboolean $sensitive
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-size-request:
=begin pod
=head2 set-size-request

Sets the minimum size of a widget; that is, the widget’s size request will be at least I<width> by I<height>. You can use this function to force a widget to be larger than it normally would be.

In most cases, C<gtk-window-set-default-size()> is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, C<gtk-window-set-geometry-hints()> can be a useful function as well.

Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct.

The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested.

If the size request in a given direction is -1 (unset), then the “natural” size request of the widget will be used instead.

The size request set here does not include any margin from the B<Gnome::Gtk3::Widget> properties margin-left, margin-right, margin-top, and margin-bottom, but it does include pretty much all other padding or border properties set by any subclass of B<Gnome::Gtk3::Widget>.

  method set-size-request ( Int $width, Int $height )

=item Int $width; width I<widget> should request, or -1 to unset
=item Int $height; height I<widget> should request, or -1 to unset

=end pod

method set-size-request ( Int $width, Int $height ) {
  gtk_widget_set_size_request( self._f('GtkWidget'), $width, $height);
}

sub gtk_widget_set_size_request (
  N-GObject $widget, gint $width, gint $height
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-state-flags:
=begin pod
=head2 set-state-flags

This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.).

This function accepts the values C<GTK-STATE-FLAG-DIR-LTR> and C<GTK-STATE-FLAG-DIR-RTL> but ignores them. If you want to set the widget's direction, use C<set-direction()>.

It is worth mentioning that any other state than C<GTK-STATE-FLAG-INSENSITIVE>, will be propagated down to all non-internal children if I<widget> is a B<Gnome::Gtk3::Container>, while C<GTK-STATE-FLAG-INSENSITIVE> itself will be propagated down to all B<Gnome::Gtk3::Container> children by different means than turning on the state flag down the hierarchy, both C<get-state-flags()> and C<is-sensitive()> will make use of these.

  method set-state-flags ( UInt $flags, Bool $clear )

=item UInt $flags; State flags to turn on. Flags are defined by GtkStateFlags.
=item Bool $clear; Whether to clear state before turning on I<flags>

=end pod

method set-state-flags ( UInt $flags, Bool $clear ) {
  gtk_widget_set_state_flags( self._f('GtkWidget'), $flags, $clear);
}

sub gtk_widget_set_state_flags (
  N-GObject $widget, GEnum $flags, gboolean $clear
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-support-multidevice:
=begin pod
=head2 set-support-multidevice

Enables or disables multiple pointer awareness. If this setting is C<True>, I<widget> will start receiving multiple, per device enter/leave events. Note that if custom B<Gnome::Gtk3::Windows> are created in a I<realize> signal handler, C<Gnome::Gdk3::Window.set-support-multidevice()> will have to be called manually on them.

  method set-support-multidevice ( Bool $support_multidevice )

=item Bool $support_multidevice; C<True> to support input from multiple devices.

=end pod

method set-support-multidevice ( Bool $support_multidevice ) {
  gtk_widget_set_support_multidevice(
    self._f('GtkWidget'), $support_multidevice
  );
}

sub gtk_widget_set_support_multidevice (
  N-GObject $widget, gboolean $support_multidevice
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tooltip-markup:
=begin pod
=head2 set-tooltip-markup

Sets I<markup> as the contents of the tooltip, which is marked up with the [Pango text markup language][PangoMarkupFormat].

This function will take care of setting  I<has-tooltip> to C<True> and of the default handler for the  I<query-tooltip> signal.

See also the  I<tooltip-markup> property and C<gtk-tooltip-set-markup()>.

  method set-tooltip-markup ( Str $markup )

=item Str $markup; the contents of the tooltip for I<widget>, or C<undefined>

=end pod

method set-tooltip-markup ( Str $markup ) {
  gtk_widget_set_tooltip_markup( self._f('GtkWidget'), $markup);
}

sub gtk_widget_set_tooltip_markup (
  N-GObject $widget, gchar-ptr $markup
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tooltip-text:
=begin pod
=head2 set-tooltip-text

Sets I<text> as the contents of the tooltip. This function will take care of setting  I<has-tooltip> to C<True> and of the default handler for the  I<query-tooltip> signal.

See also the  I<tooltip-text> property and C<gtk-tooltip-set-text()>.

  method set-tooltip-text ( Str $text )

=item Str $text; the contents of the tooltip for I<widget>

=end pod

method set-tooltip-text ( Str $text ) {
  gtk_widget_set_tooltip_text( self._f('GtkWidget'), $text);
}

sub gtk_widget_set_tooltip_text (
  N-GObject $widget, gchar-ptr $text
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-tooltip-window:
=begin pod
=head2 set-tooltip-window

Replaces the default window used for displaying tooltips with I<custom-window>. GTK+ will take care of showing and hiding I<custom-window> at the right moment, to behave likewise as the default tooltip window. If I<custom-window> is C<undefined>, the default tooltip window will be used.

  method set-tooltip-window ( N-GObject $custom_window )

=item N-GObject $custom_window; a B<Gnome::Gtk3::Window>, or C<undefined>

=end pod

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

  gtk_widget_set_tooltip_window( self._f('GtkWidget'), $custom_window);
}

sub gtk_widget_set_tooltip_window (
  N-GObject $widget, N-GObject $custom_window
) is native(&gtk-lib)
  { * }

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

Sets the vertical alignment of I<widget>. See the  I<valign> property.

  method set-valign ( GtkAlign $align )

=item GtkAlign $align; the vertical alignment

=end pod

method set-valign ( GtkAlign $align ) {
  gtk_widget_set_valign( self._f('GtkWidget'), $align);
}

sub gtk_widget_set_valign (
  N-GObject $widget, GEnum $align
) is native(&gtk-lib)
  { * }

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

Sets whether the widget would like any available extra vertical space.

See C<set-hexpand()> for more detail.

  method set-vexpand ( Bool $expand )

=item Bool $expand; whether to expand

=end pod

method set-vexpand ( Bool $expand ) {
  gtk_widget_set_vexpand( self._f('GtkWidget'), $expand);
}

sub gtk_widget_set_vexpand (
  N-GObject $widget, gboolean $expand
) is native(&gtk-lib)
  { * }

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

Sets whether the vexpand flag (see C<get-vexpand()>) will be used.

See C<set-hexpand-set()> for more detail.

  method set-vexpand-set ( Bool $set )

=item Bool $set; value for vexpand-set property

=end pod

method set-vexpand-set ( Bool $set ) {
  gtk_widget_set_vexpand_set( self._f('GtkWidget'), $set);
}

sub gtk_widget_set_vexpand_set (
  N-GObject $widget, gboolean $set
) is native(&gtk-lib)
  { * }

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

Sets the visibility state of I<widget>. Note that setting this to C<True> doesn’t mean the widget is actually viewable, see C<get-visible()>.

This function simply calls C<show()> or C<hide()> but is nicer to use when the visibility of the widget depends on some condition.

  method set-visible ( Bool $visible )

=item Bool $visible; whether the widget should be shown or not

=end pod

method set-visible ( Bool $visible ) {
  gtk_widget_set_visible( self._f('GtkWidget'), $visible);
}

sub gtk_widget_set_visible (
  N-GObject $widget, gboolean $visible
) is native(&gtk-lib)
  { * }

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

Sets the visual that should be used for by widget and its children for creating B<Gnome::Gtk3::Windows>. The visual must be on the same B<Gnome::Gdk3::Screen> as returned by C<get-screen()>, so handling the  I<screen-changed> signal is necessary.

Setting a new I<visual> will not cause I<widget> to recreate its windows, so you should call this function before I<widget> is realized.

  method set-visual ( N-GObject $visual )

=item N-GObject $visual; visual to be used or C<undefined> to unset a previous one

=end pod

method set-visual ( $visual is copy ) {
  $visual .= _get-native-object-no-reffing unless $visual ~~ N-GObject;
  gtk_widget_set_visual( self._f('GtkWidget'), $visual);
}

sub gtk_widget_set_visual (
  N-GObject $widget, N-GObject $visual
) is native(&gtk-lib)
  { * }

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

Sets a widget’s window. This function should only be used in a widget’s  I<realize> implementation. The C<window> passed is usually either new window created with C<gdk-window-new()>, or the window of its parent widget as returned by C<get-parent-window()>.

Widgets must indicate whether they will create their own B<Gnome::Gtk3::Window> by calling C<set-has-window()>. This is usually done in the widget’s C<init()> function.

Note that this function does not add any reference to I<window>.

  method set-window ( N-GObject $window )

=item N-GObject $window; a B<Gnome::Gtk3::Window>

=end pod

method set-window ( $window is copy ) {
  $window .= _get-native-object-no-reffing unless $window ~~ N-GObject;
  gtk_widget_set_window( self._f('GtkWidget'), $window);
}

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

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

Sets a shape for this widget’s GDK window. This allows for transparent windows etc., see C<gdk-window-shape-combine-region()> for more information.

  method shape-combine-region ( cairo_region_t $region )

=item cairo_region_t $region; shape to be added, or C<undefined> to remove an existing shape

=end pod

method shape-combine-region ( cairo_region_t $region ) {

  gtk_widget_shape_combine_region(
    self._f('GtkWidget'), $region
  );
}

sub gtk_widget_shape_combine_region (
  N-GObject $widget, cairo_region_t $region
) is native(&gtk-lib)
  { * }
}}

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

Flags a widget to be displayed. Any widget that isn’t shown will not appear on the screen. If you want to show all the widgets in a container, it’s easier to call C<show-all()> on the container, instead of individually showing the widgets.

Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen.

When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.

  method show ( )

=end pod

method show ( ) {
  gtk_widget_show(self._f('GtkWidget'));
}

sub gtk_widget_show (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:show-all:
=begin pod
=head2 show-all

Recursively shows a widget, and any child widgets (if the widget is a container).

  method show-all ( )

=end pod

method show-all ( ) {
  gtk_widget_show_all(self._f('GtkWidget'));
}

sub gtk_widget_show_all (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:show-now:
=begin pod
=head2 show-now

Shows a widget. If the widget is an unmapped toplevel widget (i.e. a B<Gnome::Gtk3::Window> that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.

  method show-now ( )

=end pod

method show-now ( ) {
  gtk_widget_show_now(self._f('GtkWidget'));
}

sub gtk_widget_show_now (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:size-allocate:
=begin pod
=head2 size-allocate

This function is only used by B<Gnome::Gtk3::Container> subclasses, to assign a size and position to their child widgets.

In this function, the allocation may be adjusted. It will be forced to a 1x1 minimum size, and the adjust-size-allocation virtual method on the child will be used to adjust the allocation. Standard adjustments include removing the widget’s margins, and applying the widget’s  I<halign> and  I<valign> properties.

For baseline support in containers you need to use C<size-allocate-with-baseline()> instead.

  method size-allocate ( N-GtkAllocation $allocation )

=item N-GtkAllocation $allocation; position and size to be allocated to I<widget>

=end pod

method size-allocate ( N-GtkAllocation $allocation ) {
  gtk_widget_size_allocate( self._f('GtkWidget'), $allocation);
}

sub gtk_widget_size_allocate (
  N-GObject $widget, N-GtkAllocation $allocation
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:size-allocate-with-baseline:
=begin pod
=head2 size-allocate-with-baseline

This function is only used by B<Gnome::Gtk3::Container> subclasses, to assign a size, position and (optionally) baseline to their child widgets.

In this function, the allocation and baseline may be adjusted. It will be forced to a 1x1 minimum size, and the adjust-size-allocation virtual and adjust-baseline-allocation methods on the child will be used to adjust the allocation and baseline. Standard adjustments include removing the widget's margins, and applying the widget’s  I<halign> and  I<valign> properties.

If the child widget does not have a valign of C<GTK-ALIGN-BASELINE> the baseline argument is ignored and -1 is used instead.

  method size-allocate-with-baseline ( N-GtkAllocation $allocation, Int $baseline )

=item N-GtkAllocation $allocation; position and size to be allocated to I<widget>
=item Int $baseline; The baseline of the child, or -1

=end pod

method size-allocate-with-baseline (
  N-GtkAllocation $allocation, Int $baseline
) {

  gtk_widget_size_allocate_with_baseline(
    self._f('GtkWidget'), $allocation, $baseline
  );
}

sub gtk_widget_size_allocate_with_baseline (
  N-GObject $widget, N-GtkAllocation $allocation, gint $baseline
) is native(&gtk-lib)
  { * }

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

Gets the values of a multiple style properties of I<widget>.

  method style-get ( Str $first_property_name )

=item Str $first_property_name; the name of the first property to get @…: pairs of property names and locations to return the property values, starting with the location for I<first-property-name>, terminated by C<undefined>.

=end pod

method style-get ( Str $first_property_name ) {

  gtk_widget_style_get(
    self._f('GtkWidget'), $first_property_name
  );
}

sub gtk_widget_style_get (
  N-GObject $widget, gchar-ptr $first_property_name, Any $any = Any
) is native(&gtk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:style-get-property:
=begin pod
=head2 style-get-property

Gets the value of a style property of I<widget>.

  method style-get-property ( Str $property_name, N-GObject $value )

=item Str $property_name; the name of a style property
=item N-GObject $value; location to return the property value

=end pod

method style-get-property ( Str $property_name, $value is copy ) {
  $value .= _get-native-object-no-reffing unless $value ~~ N-GObject;
  gtk_widget_style_get_property( self._f('GtkWidget'), $property_name, $value);
}

sub gtk_widget_style_get_property (
  N-GObject $widget, gchar-ptr $property_name, N-GObject $value
) is native(&gtk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
# TM:0:style-get-valist:
=begin pod
=head2 style-get-valist

Non-vararg variant of C<style-get()>. Used primarily by language bindings.

  method style-get-valist ( Str $first_property_name, va_list $var_args )

=item Str $first_property_name; the name of the first property to get
=item va_list $var_args; a va-list of pairs of property names and locations to return the property values, starting with the location for I<first-property-name>.

=end pod

method style-get-valist ( Str $first_property_name, va_list $var_args ) {

  gtk_widget_style_get_valist(
    self._f('GtkWidget'), $first_property_name, $var_args
  );
}

sub gtk_widget_style_get_valist (
  N-GObject $widget, gchar-ptr $first_property_name, va_list $var_args
) is native(&gtk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:thaw-child-notify:
=begin pod
=head2 thaw-child-notify

Reverts the effect of a previous call to C<freeze-child-notify()>. This causes all queued  I<child-notify> signals on I<widget> to be emitted.

  method thaw-child-notify ( )

=end pod

method thaw-child-notify ( ) {
  gtk_widget_thaw_child_notify(self._f('GtkWidget'));
}

sub gtk_widget_thaw_child_notify (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:translate-coordinates:
=begin pod
=head2 translate-coordinates

Translate coordinates relative to this widget’s allocation to coordinates relative to I<$dest-widget>’s allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel.

  method translate-coordinates (
    N-GObject $dest_widget, Int $src_x, Int $src_y --> List
  )

=item N-GObject $dest_widget; a B<Gnome::Gtk3::Widget>
=item Int $src_x; X position relative to this widget
=item Int $src_y; Y position relative to this widget

Returns a List which holds;
=item Bool result; <False> if either widget was not realized, or there was no common ancestor. In this case, the next values are undefined. Otherwise C<True> and the next values are defined Int.
=item Int dest_x; X position relative to I<$dest-widget>
=item Int dest_y; Y position relative to I<$dest-widget>

=end pod

method translate-coordinates (
  $dest_widget is copy, Int $src_x, Int $src_y --> List
) {
  $dest_widget .= _get-native-object-no-reffing unless $dest_widget ~~ N-GObject;
  my gint $dest_x;
  my gint $dest_y;
  my Bool $r = gtk_widget_translate_coordinates(
    self._f('GtkWidget'), $dest_widget, $src_x, $src_y, $dest_x, $dest_y
  );

  ( $r, $dest_x, $dest_y);
}

sub gtk_widget_translate_coordinates (
  N-GObject $src_widget, N-GObject $dest_widget, gint $src_x, gint $src_y,
  gint $dest_x is rw, gint $dest_y is rw --> gboolean
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:trigger-tooltip-query:
=begin pod
=head2 trigger-tooltip-query

Triggers a tooltip query on the display where the toplevel of I<widget> is located. See C<gtk-tooltip-trigger-tooltip-query()> for more information.

  method trigger-tooltip-query ( )

=end pod

method trigger-tooltip-query ( ) {
  gtk_widget_trigger_tooltip_query(self._f('GtkWidget'));
}

sub gtk_widget_trigger_tooltip_query (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

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

This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.

  method unmap ( )

=end pod

method unmap ( ) {
  gtk_widget_unmap(self._f('GtkWidget'));
}

sub gtk_widget_unmap (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

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

This function is only for use in widget implementations. Should be called by implementations of the remove method on B<Gnome::Gtk3::Container>, to dissociate a child from the container.

  method unparent ( )

=end pod

method unparent ( ) {
  gtk_widget_unparent(self._f('GtkWidget'));
}

sub gtk_widget_unparent (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

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

This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as I<widget>->window).

  method unrealize ( )

=end pod

method unrealize ( ) {
  gtk_widget_unrealize(self._f('GtkWidget'));
}

sub gtk_widget_unrealize (
  N-GObject $widget
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:unregister-window:
=begin pod
=head2 unregister-window

Unregisters a B<Gnome::Gtk3::Window> from the widget that was previously set up with C<register-window()>. You need to call this when the window is no longer used by the widget, such as when you destroy it.

  method unregister-window ( N-GObject $window )

=item N-GObject $window; a B<Gnome::Gtk3::Window>

=end pod

method unregister-window ( $window is copy ) {
  $window .= _get-native-object-no-reffing unless $window ~~ N-GObject;
  gtk_widget_unregister_window( self._f('GtkWidget'), $window);
}

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

#-------------------------------------------------------------------------------
#TM:1:unset-state-flags:
=begin pod
=head2 unset-state-flags

This function is for use in widget implementations. Turns off flag values for the current widget state (insensitive, prelighted, etc.). See C<set-state-flags()>.

  method unset-state-flags ( UInt $flags )

=item UInt $flags; State flags to turn off. Flags are bits defined by GtkStateFlags

=end pod

method unset-state-flags ( UInt $flags ) {
  gtk_widget_unset_state_flags( self._f('GtkWidget'), $flags);
}

sub gtk_widget_unset_state_flags (
  N-GObject $widget, GEnum $flags
) is native(&gtk-lib)
  { * }

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

This is a convenience function for creating a widget and setting its properties in one go. For example you might write: `new (GTK-TYPE-LABEL, "label", "Hello World", "xalign", 0.0, NULL)` to create a left-aligned label. Equivalent to C<g-object-new()>, but returns a widget so you don’t have to cast the object yourself.

Returns: a new B<Gnome::Gtk3::Widget> of type I<widget-type>

  method _gtk_widget_new ( N-GObject $type, Str $first_property_name --> N-GObject )

=item N-GObject $type; type ID of the widget to create
=item Str $first_property_name; name of first property to set @…: value of first property, followed by more properties, C<undefined>-terminated

=end pod
}}

sub _gtk_widget_new ( N-GObject $type, gchar-ptr $first_property_name, Any $any = Any --> N-GObject )
  is native(&gtk-lib)
  is symbol('gtk_widget_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 ( 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, 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:accel-closures-changed:
=head3 accel-closures-changed

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

=item $widget; the object which received the signal.
=item $_handle_id; the registered event handler id

=comment -----------------------------------------------------------------------
=comment #TS:4:button-press-event:gnome-gobject/xt/Signal.raku
=head3 button-press-event

The I<button-press-event> signal will be emitted when a button (typically from a mouse) is pressed.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-BUTTON-PRESS-MASK> mask.

This signal will be sent to the grab widget if there is one.

Returns: C<True> to stop other handlers from being invoked for the event. C<False> to propagate the event further.

  method handler (
    N-GdkEvent $event,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($widget),
    *%user-options
   