### ----------------------------------------------------
### -- Gnome::Gdk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gdk3/Events.rakumod
### ----------------------------------------------------
### -- Chunk 4 of 4

) is native(&gdk-lib)
  { * }

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

Sets whether a trace of received events is output. Note that GTK+ must be compiled with debugging (that is, configured using the `--enable-debug` option) to use this option.

  method set-show-events ( Bool $show_events )

=item $show_events; C<True> to output event debugging information.
=end pod

method set-show-events ( Bool $show_events ) {
  gdk_set_show_events($show_events);
}

sub gdk_set_show_events (
  gboolean $show_events
) is native(&gdk-lib)
  { * }

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

Sets the slave device for I<event> to I<device>.

The event must have been allocated by GTK+, for instance by C<gdk_event_copy()>.

  method set-source-device ( N-GObject() $device )

=item $device; a B<Gnome::Gdk3::Device>
=end pod

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

sub gdk_event_set_source_device (
  N-GdkEvent $event, N-GObject $device
) is native(&gdk-lib)
  { * }

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

Obtains a desktop-wide setting, such as the double-click time, for the default screen. See C<Gnome::Gdk3::Screen.get_setting()>.

Returns: C<True> if the setting existed and a value was stored in I<value>, C<False> otherwise.

  method setting-get ( Str $name, N-GObject() $value --> Bool )

=item $name; the name of the setting.
=item $value; location to store the value of the setting.
=end pod

method setting-get ( Str $name, N-GObject() $value --> Bool ) {
  gdk_setting_get( $name, $value).Bool
}

sub gdk_setting_get (
  gchar-ptr $name, N-GObject $value --> gboolean
) is native(&gdk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:triggers-context-menu:
=begin pod
=head2 triggers-context-menu

This function returns whether this event (a GdkEventButton type) should trigger a context menu, according to platform conventions. The right mouse button always triggers context menus. Additionally, if C<gdk_keymap_get_modifier_mask()> returns a non-0 mask for C<GDK_MODIFIER_INTENT_CONTEXT_MENU>, then the left mouse button will also trigger a context menu if this modifier is pressed.

This function should always be used instead of simply checking for event->button == C<GDK_BUTTON_SECONDARY>.

Returns: C<True> if the event should trigger a context menu.

  method triggers-context-menu ( --> Bool )

=end pod

method triggers-context-menu ( --> Bool ) {
  gdk_event_triggers_context_menu(self._get-native-object-no-reffing).Bool
}

sub gdk_event_triggers_context_menu (
  N-GdkEvent $event --> gboolean
) is native(&gdk-lib)
  { * }


