### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/Widget.rakumod
### ----------------------------------------------------
### -- Chunk 7 of 8
 --> Int
  );

=item $widget; the object which received the signal.
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventButton): the event which triggered this signal.

=comment -----------------------------------------------------------------------
=comment #TS:0:button-release-event:
=head3 button-release-event

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

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

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

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

  method handler (
    N-GdkEvent $event,
    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
=item $event; (type N-GdkEventButton): the event which triggered this signal.

=begin comment
=comment -----------------------------------------------------------------------
=comment #TS:1:can-activate-accel:
=head3 can-activate-accel

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

=item $signal-id;
=item $_handle_id; the registered event handler id
=item $widget;
=end comment

=begin comment
=comment -----------------------------------------------------------------------
=comment # TS:0:child-notify:
=head3 child-notify

The I<child-notify> signal is emitted for each child property that has changed on an object. The signal's detail holds the property name.

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

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $child_property; the B<Gnome::Gtk3::ParamSpec> of the changed child property
=end comment


=comment -----------------------------------------------------------------------
=comment #TS:0:configure-event:
=head3 configure-event

The I<configure-event> signal will be emitted when the size, position or stacking of the I<widget>'s window has changed.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-STRUCTURE-MASK> mask. GDK will enable this mask automatically for all new windows.

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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventConfigure): the event which triggered this signal.

=comment -----------------------------------------------------------------------
=comment #TS:0:damage-event:
=head3 damage-event

Emitted when a redirected window belonging to I<widget> gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.

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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventExpose): the event event


=comment -----------------------------------------------------------------------
=comment #TS:4:delete-event:issue-22.raku
=head3 delete-event

The I<delete-event> signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting C<hide-on-delete()> to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

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
    --> Int
  );

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


=comment -----------------------------------------------------------------------
=comment #TS:0:destroy:
=head3 destroy

Signals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released.

This signal is not suitable for saving widget state.

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

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


=comment -----------------------------------------------------------------------
=comment #TS:0:destroy-event:
=head3 destroy-event

The I<destroy-event> signal is emitted when a B<Gnome::Gtk3::Window> is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-STRUCTURE-MASK> mask. GDK will enable this mask automatically for all new windows.

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
    --> Int
  );

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


=comment -----------------------------------------------------------------------
=comment #TS:0:direction-changed:
=head3 direction-changed

The I<direction-changed> signal is emitted when the text direction
of a widget changes.

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

=item $widget; the object on which the signal is emitted
=item $_handle_id; the registered event handler id
=item $previous_direction; the previous text direction of I<widget> as a GTK_TYPE_TEXT_DIRECTION enum


=comment -----------------------------------------------------------------------
=comment #TS:4:drag-begin:xt/dnd-01.raku
=head3 drag-begin

The I<drag-begin> signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with e.g. C<gtk-drag-source-set-icon-pixbuf()>.

Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use C<g-signal-connect-after()> to override what the default handler did.

  method handler (
    N-GObject $context,
    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
=item $context; the drag context


=comment -----------------------------------------------------------------------
=comment #TS:0:drag-data-delete:
=head3 drag-data-delete

The I<drag-data-delete> signal is emitted on the drag source when a drag
with the action C<GDK-ACTION-MOVE> is successfully completed. The signal
handler is responsible for deleting the data that has been dropped. What
"delete" means depends on the context of the drag operation.

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

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


=comment -----------------------------------------------------------------------
=comment #TS:4:drag-data-get:xt/dnd-01.raku
=head3 drag-data-get

The I<drag-data-get> signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill I<$data> with the data in the format which is indicated by I<info>. See C<gtk-selection-data-set()> and C<gtk-selection-data-set-text()>.

  method handler (
    N-GObject $context,
    N-GObject $data,
    UInt $info,
    UInt $time,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($widget),
    *%user-options
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $context; the drag context, a native
=item $data; the native B<Gnome::Gtk3::SelectionData> to be filled with the dragged data
=item $info; the info that has been registered with the target in the B<Gnome::Gtk3::TargetList>
=item $time; the timestamp at which the data was requested


=comment -----------------------------------------------------------------------
=comment #TS:4:drag-data-received:xt/dnd-01.raku
=head3 drag-data-received

The I<drag-data-received> signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call C<gdk-drag-status()> and not finish the drag. If the data was received in response to a  I<drag-drop> signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call C<gtk-drag-finish()>, setting the I<success> parameter depending on whether the data was processed successfully.

Applications must create some means to determine why the signal was emitted and therefore whether to call C<gdk-drag-status()> or C<gtk-drag-finish()>.

=begin comment
The handler may inspect the selected action with C<gdk-drag-context-get-selected-action()> before calling C<gtk-drag-finish()>, e.g. to implement C<GDK-ACTION-ASK> as shown in the following example:

  void
  drag-data-received (GtkWidget          *widget,
  GdkDragContext     *context,
  gint                x,
  gint                y,
  GtkSelectionData   *data,
  guint               info,
  guint               time)
  {
  if ((data->length >= 0) && (data->format == 8))
  {
  GdkDragAction action;

  // handle data here

  action = gdk-drag-context-get-selected-action (context);
  if (action == GDK-ACTION-ASK)
  {
  GtkWidget *dialog;
  gint response;

  dialog = gtk-message-dialog-new (NULL,
  GTK-DIALOG-MODAL |
  GTK-DIALOG-DESTROY-WITH-PARENT,
  GTK-MESSAGE-INFO,
  GTK-BUTTONS-YES-NO,
  "Move the data ?\n");
  response = gtk-dialog-run (GTK-DIALOG (dialog));
  destroy (dialog);

  if (response == GTK-RESPONSE-YES)
  action = GDK-ACTION-MOVE;
  else
  action = GDK-ACTION-COPY;
  }

  gtk-drag-finish (context, TRUE, action == GDK-ACTION-MOVE, time);
  }
  else
  gtk-drag-finish (context, FALSE, FALSE, time);
  }
=end comment

The handler method API:

  method handler (
    N-GObject $context,
    Int $x,
    Int $y,
    N-GObject $data,
    UInt $info,
    UInt $time,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($widget),
    *%user-options
  );

=item $widget; the object which received the signal
=item $context; the drag context
=item $_handle_id; the registered event handler id
=item $x; where the drop happened
=item $y; where the drop happened
=item $data; the received data
=item $info; the info that has been registered with the target in the
B<Gnome::Gtk3::TargetList>
=item $time; the timestamp at which the data was received


=comment -----------------------------------------------------------------------
=comment #TS:0:drag-drop:
=head3 drag-drop

The I<drag-drop> signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns C<False> and no further processing is necessary. Otherwise, the handler returns C<True>. In this case, the handler must ensure that C<gtk-drag-finish()> is called to let the source know that the drop is done. The call to C<gtk-drag-finish()> can be done either directly or in a  I<drag-data-received> handler which gets triggered by calling C<gtk-drag-get-data()> to receive the data for one or more of the supported targets.

Returns: whether the cursor position is in a drop zone

  method handler (
    N-GObject $context,
    Int $x,
    Int $y,
    UInt $time,
    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
=item $context; the drag context
=item $x; the x coordinate of the current cursor position
=item $y; the y coordinate of the current cursor position
=item $time; the timestamp of the motion event


=comment -----------------------------------------------------------------------
=comment #TS:0:drag-end:
=head3 drag-end

The I<drag-end> signal is emitted on the drag source when a drag is finished.  A typical reason to connect to this signal is to undo things done in  I<drag-begin>.

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

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


=comment -----------------------------------------------------------------------
=comment #TS:4:drag-failed:xt/dnd-01.raku
=head3 drag-failed

The I<drag-failed> signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DnD operation based on the type of error, it returns C<True> is the failure has been already handled (not showing the default "drag operation failed" animation), otherwise it returns C<False>.

Returns: C<True> if the failed drag operation has been already handled.

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

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $context; the drag context
=item $result; the result of the drag operation. a enum from GtkDragResult


=comment -----------------------------------------------------------------------
=comment #TS:0:drag-leave:
=head3 drag-leave

The I<drag-leave> signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in  I<drag-motion>, e.g. undo highlighting with C<gtk-drag-unhighlight()>.

Likewise, the  I<drag-leave> signal is also emitted before the  I<drag-drop> signal, for instance to allow cleaning up of a preview item created in the  I<drag-motion> signal handler.

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

=item $widget; the object which received the signal.
=item $_handle_id; the registered event handler id
=item $context; the drag context
=item $time; the timestamp of the motion event

=comment -----------------------------------------------------------------------
=comment # TS:0:drag-motion:
=head3 drag-motion

The I<drag-motion> signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns C<False> and no further processing is necessary. Otherwise, the handler returns C<True>. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling C<gdk-drag-status()>.

If the decision whether the drop will be accepted or rejected can't be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling C<gtk-drag-get-data()> and defer the C<gdk-drag-status()> call to the  I<drag-data-received> handler. Note that you must pass C<GTK-DEST-DEFAULT-DROP>, C<GTK-DEST-DEFAULT-MOTION> or C<GTK-DEST-DEFAULT-ALL> to C<gtk-drag-dest-set()> when using the drag-motion signal that way.

Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last  I<drag-leave> and if not, treat the drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with C<gtk-drag-highlight()>.

=begin comment
|[<!-- language="C" -->
static void
drag-motion (GtkWidget      *widget,
GdkDragContext *context,
gint            x,
gint            y,
guint           time)
{
GdkAtom target;

PrivateData *private-data = GET-PRIVATE-DATA (widget);

if (!private-data->drag-highlight)
{
private-data->drag-highlight = 1;
gtk-drag-highlight (widget);
}

target = gtk-drag-dest-find-target (widget, context, NULL);
if (target == GDK-NONE)
gdk-drag-status (context, 0, time);
else
{
private-data->pending-status
= gdk-drag-context-get-suggested-action (context);
gtk-drag-get-data (widget, context, target, time);
}

return TRUE;
}

static void
drag-data-received (GtkWidget        *widget,
GdkDragContext   *context,
gint              x,
gint              y,
GtkSelectionData *selection-data,
guint             info,
guint             time)
{
PrivateData *private-data = GET-PRIVATE-DATA (widget);

if (private-data->suggested-action)
{
private-data->suggested-action = 0;

// We are getting this data due to a request in drag-motion,
// rather than due to a request in drag-drop, so we are just
// supposed to call C<gdk-drag-status()>, not actually paste in
// the data.

str = gtk-selection-data-get-text (selection-data);
if (!data-is-acceptable (str))
gdk-drag-status (context, 0, time);
else
gdk-drag-status (context,
private-data->suggested-action,
time);
}
else
{
// accept the drop
}
}
]|
=end comment

Returns: whether the cursor position is in a drop zone

  method handler (
    N-GObject $context,
    Int $x,
    Int $y,
    Int $time,
    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
=item $context; the drag context
=item $x; the x coordinate of the current cursor position
=item $y; the y coordinate of the current cursor position
=item $time; the timestamp of the motion event


=comment -----------------------------------------------------------------------
=comment #TS:4:draw:Gnome::Cairo tests
=head3 draw

This signal is emitted when a widget is supposed to render itself. The I<widget>'s top left corner must be painted at the origin of the passed in context and be sized to the values returned by C<get-allocated-width()> and C<get-allocated-height()>.

Signal handlers connected to this signal can modify the cairo context passed as I<cr> in any way they like and don't need to restore it. The signal emission takes care of calling C<cairo-save()> before and C<cairo-restore()> after invoking the handler.

The signal handler will get a I<cr> with a clip region already set to the widget's dirty region, i.e. to the area that needs repainting.  Complicated widgets that want to avoid redrawing themselves completely can get the full extents of the clip region with C<gdk-cairo-get-clip-rectangle()>, or they can get a finer-grained representation of the dirty region with C<cairo-copy-clip-rectangle-list()>.

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

  method handler (
    cairo_t $cr,
    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
=item $cr; the cairo context to draw to


=comment -----------------------------------------------------------------------
=comment #TS:0:enter-notify-event:
=head3 enter-notify-event

The I<enter-notify-event> will be emitted when the pointer enters the I<widget>'s window.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-ENTER-NOTIFY-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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventCrossing): the event which triggered
this signal.

=comment -----------------------------------------------------------------------
=comment #TS:0:event:
=head3 event

The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic I<event> signal, another, more specific, signal that matches the type of event delivered (e.g. I<key-press-event>) and finally a generic  I<event-after> signal.

Returns: C<True> to stop other handlers from being invoked for the event and to cancel the emission of the second specific I<event> signal. C<False> to propagate the event further and to allow the emission of the second signal. The I<event-after> signal is emitted regardless of the return value.

  method handler (
    N-GdkEvent $event,
    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
=item $event; the B<Gnome::Gtk3::Event> which triggered this signal


=comment -----------------------------------------------------------------------
=comment #TS:0:event-after:
=head3 event-after

After the emission of the  I<event> signal and (optionally) the second more specific signal, I<event-after> will be emitted regardless of the previous two signals handlers return values.

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

=item $widget; the object which received the signal.
=item $_handle_id; the registered event handler id
=item $event; the B<Gnome::Gtk3::Event> which triggered this signal


=comment -----------------------------------------------------------------------
=comment #TS:4:focus:gnome-gobject/xt/Signal.raku
=head3 focus

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

  method handler (
    Int $direction,
    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
=item $direction; it is an enumeration C<GtkDirectionType>.


=comment -----------------------------------------------------------------------
=comment #TS:0:focus-in-event:
=head3 focus-in-event

The I<focus-in-event> signal will be emitted when the keyboard focus enters the I<widget>'s window.

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

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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventFocus): the event which triggered this signal.

=comment -----------------------------------------------------------------------
=comment #TS:0:focus-out-event:
=head3 focus-out-event

The I<focus-out-event> signal will be emitted when the keyboard focus leaves the I<widget>'s window.

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

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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventFocus): the event which triggered this signal.

=comment -----------------------------------------------------------------------
=comment #TS:0:grab-broken-event:
=head3 grab-broken-event

Emitted when a pointer or keyboard grab on a window belonging to I<widget> gets broken.

On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.

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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventGrabBroken): the event event


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

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

=item $widget; the object which received the signal.


=comment -----------------------------------------------------------------------
=comment #TS:0:grab-notify:
=head3 grab-notify

The I<grab-notify> signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed.

A widget is shadowed by a C<gtk-grab-add()> when the topmost grab widget in the grab stack of its window group is not its ancestor.

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

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $was_grabbed; C<False> if the widget becomes shadowed, C<True> if it becomes unshadowed

=comment -----------------------------------------------------------------------
=comment #TS:0:hide:
=head3 hide

The I<hide> signal is emitted when I<widget> is hidden, for example with C<hide()>.

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

=item $widget; the object which received the signal.


=comment -----------------------------------------------------------------------
=comment #TS:0:hierarchy-changed:
=head3 hierarchy-changed

The I<hierarchy-changed> signal is emitted when the anchored state of a widget changes. A widget is “anchored” when its toplevel ancestor is a B<Gnome::Gtk3::Window>. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

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

=item $widget; the object on which the signal is emitted
=item $_handle_id; the registered event handler id
=item $previous_toplevel; (allow-none): the previous toplevel ancestor, or C<undefined> if the widget was previously unanchored

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

The I<key-press-event> signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-KEY-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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventKey): the event which triggered this signal.


=comment -----------------------------------------------------------------------
=comment #TS:0:key-release-event:
=head3 key-release-event

The I<key-release-event> signal is emitted when a key is released.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-KEY-RELEASE-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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventKey): the event which triggered this signal.


=comment -----------------------------------------------------------------------
=comment #TS:1:keynav-failed:
=head3 keynav-failed

Gets emitted if keyboard navigation fails. See C<keynav-failed()> for details.

Returns: C<1> if stopping keyboard navigation is fine, C<0> if the emitting widget should try to handle the keyboard navigation attempt in its parent container(s).

  method handler (
    Int $direction,
    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
=item $direction; the direction of movement, an enum GtkDirectionType value


=comment -----------------------------------------------------------------------
=comment #TS:0:leave-notify-event:
=head3 leave-notify-event

The I<leave-notify-event> will be emitted when the pointer leaves the I<widget>'s window.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-LEAVE-NOTIFY-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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventCrossing): the event which triggered this signal.

=comment -----------------------------------------------------------------------
=comment #TS:0:map:
=head3 map

The I<map> signal is emitted when I<widget> is going to be mapped, that is when the widget is visible (which is controlled with C<set-visible()>) and all its parents up to the toplevel widget are also visible. Once the map has occurred,  I<map-event> will be emitted.

The I<map> signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of  I<unmap>.

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

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


=comment -----------------------------------------------------------------------
=comment #TS:0:map-event:
=head3 map-event

The I<map-event> signal will be emitted when the I<widget>'s window is mapped. A window is mapped when it becomes visible on the screen.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-STRUCTURE-MASK> mask. GDK will enable this mask automatically for all new windows.

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
    --> Int
  );

=item $widget; the object which received the signal
=item $_handle_id; the registered event handler id
=item $event; (type N-GdkEventAny): the event which triggered this signal.


=comment -----------------------------------------------------------------------
=comment #TS:1:mnemonic-activate:
=head3 mnemonic-activate

The default handler for this signal activates I<widget> if I<group-cycling> is C<False>, or just makes I<widget> grab focus if I<group-cycling> is C<True>.

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

  method handler (
    Bool $group_cycling,
    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
=item $group_cycling; C<True> if there are other widgets with the same mnemonic


=comment -----------------------------------------------------------------------
=comment #TS:0:motion-notify-event:
=head3 motion-notify-event

The I<motion-notify-event> signal is emitted when the pointer moves over the widget's B<Gnome::Gtk3::Window>.

To receive this signal, the B<Gnome::Gtk3::Window> associated to the widget needs to enable the C<GDK-POINTER-MOTION-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.

