Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: EventControllerScrollDecelerateCallback

[306:7] extends: object

Generated low-level callback wrapper for GIR callback decelerate.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EventControllerScrollDecelerateCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, vel_x, vel_y, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: EventControllerScrollScrollendCallback

[516:7] extends: object

Generated low-level callback wrapper for GIR callback scroll-end.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EventControllerScrollScrollendCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: EventControllerScroll

[38:7] extends: object

Handles scroll events. It is capable of handling both discrete and continuous scroll events from mice or touchpads, abstracting them both with the [signal@Gtk.EventControllerScroll::scroll] signal. Deltas in the discrete case are multiples of 1. In the case of continuous scroll events, GtkEventControllerScroll encloses all [signal@Gtk.EventControllerScroll::scroll] emissions between two [signal@Gtk.EventControllerScroll::scroll-begin] and [signal@Gtk.EventControllerScroll::scroll-end] signals. The behavior of the event controller can be modified by the flags given at creation time, or modified at a later point through [method@Gtk.EventControllerScroll.set_flags] (e.g. because the scrolling conditions of the widget changed). The controller can be set up to emit motion for either/both vertical and horizontal scroll events through %GTK_EVENT_CONTROLLER_SCROLL_VERTICAL, %GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL and %GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES. If any axis is disabled, the respective [signal@Gtk.EventControllerScroll::scroll] delta will be 0. Vertical scroll events will be translated to horizontal motion for the devices incapable of horizontal scrolling. The event controller can also be forced to emit discrete events on all devices through %GTK_EVENT_CONTROLLER_SCROLL_DISCRETE. This can be used to implement discrete actions triggered through scroll events (e.g. switching across combobox options). The %GTK_EVENT_CONTROLLER_SCROLL_KINETIC flag toggles the emission of the [signal@Gtk.EventControllerScroll::decelerate] signal, emitted at the end of scrolling with two X/Y velocity arguments that are consistent with the motion that was received.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • EventControllerScroll (flags = null)

    Creates a new event controller that will handle scroll events.

    • @p flags is flags affecting the controller behavior.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asEventController ()

    Wraps this handle as EventController.

    • @r A EventController object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnDecelerate (callback Fn, UserData = null)

    Emitted after scroll is finished if the %GTK_EVENT_CONTROLLER_SCROLL_KINETIC flag is set. @vel_x and @vel_y express the initial velocity that was imprinted by the scroll events.

    • @vel_x and @vel_y are expressed in pixels/ms.
    • @p Fn is the Aussom callback.
    • @p Fn is called with (EventControllerScroll Self, double Vel_x, double Vel_y).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnScroll (callback Fn, UserData = null)

    Signals that the widget should scroll by the amount specified by @dx and

    • @dy. For the representation unit of the deltas, see [method@Gtk.EventControllerScroll.get_unit].
    • @p Fn is the Aussom callback.
    • @p Fn is called with (EventControllerScroll Self, double Dx, double Dy).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnScrollbegin (callback Fn, UserData = null)

    Signals that a new scrolling operation has begun. It will only be emitted on devices capable of it.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (EventControllerScroll Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnScrollend (callback Fn, UserData = null)

    Signals that a scrolling operation has finished. It will only be emitted on devices capable of it.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (EventControllerScroll Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setFlags (string Value)

    The flags affecting event controller behavior.

    • @p Value is the new property value.
    • @r None.
  • get_flags ()

    Gets the flags conditioning the scroll controller behavior.

  • get_unit ()

    Gets the scroll unit of the last [signal@Gtk.EventControllerScroll::scroll] signal received. Always returns %GDK_SCROLL_UNIT_WHEEL if the %GTK_EVENT_CONTROLLER_SCROLL_DISCRETE flag is set.

  • set_flags (string flags)

    Sets the flags conditioning scroll controller behavior.

    • @p flags is flags affecting the controller behavior.
    • @r None.

class: EventControllerScrollMeta

[586:14] static extends: object

Generated metadata helpers for EventControllerScroll class surfaces.

Methods

  • properties ()

    Returns property metadata for EventControllerScroll.

    • @r A list.
  • signals ()

    Returns signal metadata for EventControllerScroll.

    • @r A list.

class: EventControllerScrollScrollCallback

[376:7] extends: object

Generated low-level callback wrapper for GIR callback scroll.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EventControllerScrollScrollCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, dx, dy, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: EventControllerScrollScrollbeginCallback

[446:7] extends: object

Generated low-level callback wrapper for GIR callback scroll-begin.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EventControllerScrollScrollbeginCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.