Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DragCancelCallback

[344:7] extends: object

Generated low-level callback wrapper for GIR callback cancel.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • DragCancelCallback (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, reason, 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: DragDropperformedCallback

[485:7] extends: object

Generated low-level callback wrapper for GIR callback drop-performed.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • DragDropperformedCallback (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: DragDndfinishedCallback

[415:7] extends: object

Generated low-level callback wrapper for GIR callback dnd-finished.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • DragDndfinishedCallback (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: DragMeta

[555:14] static extends: object

Generated metadata helpers for Drag class surfaces.

Methods

  • properties ()

    Returns property metadata for Drag.

    • @r A list.
  • signals ()

    Returns signal metadata for Drag.

    • @r A list.

class: Drag

[19:7] extends: object

Represents the source of an ongoing DND operation. A GdkDrag is created when a drag is started, and stays alive for duration of the DND operation. After a drag has been started with [func@Gdk.Drag.begin], the caller gets informed about the status of the ongoing drag operation with signals on the GdkDrag object. GTK provides a higher level abstraction based on top of these functions, and so they are not normally needed in GTK applications. See the "Drag and Drop" section of the GTK documentation for more information.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • Drag (Handle = null)

    Creates a new Drag by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • 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.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object 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.
  • setOnCancel (callback Fn, UserData = null)

    Emitted when the drag operation is cancelled.

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

    Emitted when the destination side has finished reading all data. The drag object can now free all miscellaneous data.

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

    Emitted when the drop operation is performed on an accepting client.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (Drag 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.

  • setActions (string Value)

    The possible actions of this drag.

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

    The currently selected action of the drag.

    • @p Value is the new property value.
    • @r None.
  • drop_done (bool success)

    Informs GDK that the drop ended. Passing %FALSE for @success may trigger a drag cancellation animation. This function is called by the drag source, and should be the last call before dropping the reference to the

    • @drag. The GdkDrag will only take the first [method@Gdk.Drag.drop_done] call as effective, if this function is called multiple times, all subsequent calls will be ignored.
    • @p success is whether the drag was ultimatively successful.
    • @r None.
  • get_actions ()

    Determines the bitmask of possible actions proposed by the source.

  • get_content ()

    Returns the GdkContentProvider associated to the GdkDrag object.

  • get_device ()

    Returns the GdkDevice associated to the GdkDrag object.

  • get_display ()

    Gets the GdkDisplay that the drag object was created for.

  • get_drag_surface ()

    Returns the surface on which the drag icon should be rendered during the drag operation. Note that the surface may not be available until the drag operation has begun. GDK will move the surface in accordance with the ongoing drag operation. The surface is owned by @drag and will be destroyed when the drag operation is over.

  • get_formats ()

    Retrieves the formats supported by this GdkDrag object.

  • get_selected_action ()

    Determines the action chosen by the drag destination.

  • get_surface ()

    Returns the GdkSurface where the drag originates.

  • set_hotspot (int hot_x, int hot_y)

    Sets the position of the drag surface that will be kept under the cursor hotspot. Initially, the hotspot is at the top left corner of the drag surface.

    • @p hot_x is x coordinate of the drag surface hotspot.
    • @p hot_y is y coordinate of the drag surface hotspot.
    • @r None.