ClipboardProtocol

public protocol ClipboardProtocol : ObjectProtocol

The ClipboardProtocol protocol exposes the methods and properties of an underlying GtkClipboard instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Clipboard. Alternatively, use ClipboardRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkClipboard instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • clipboard_ptr Default implementation

    Typed pointer to the underlying GtkClipboard instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkClipboard instance.

    Declaration

    Swift

    var clipboard_ptr: UnsafeMutablePointer<GtkClipboard>! { get }
  • Required Initialiser for types conforming to ClipboardProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Clipboard signals

  • Connect a Swift signal handler to the given, typed ClipboardSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: ClipboardSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    handler

    The Swift signal handler (function or callback) to invoke on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Connect a C signal handler to the given, typed ClipboardSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: ClipboardSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Note

    This represents the underlying owner-change signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onOwnerChange(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ClipboardRef, _ event: Gdk.EventOwnerChangeRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    event

    none

    handler

    The signal handler to call Run the given callback whenever the ownerChange signal is emitted

  • ownerChangeSignal Extension method

    Typed owner-change signal for using the connect(signal:) methods

    Declaration

    Swift

    static var ownerChangeSignal: ClipboardSignalName { get }

Clipboard Class: ClipboardProtocol extension (methods and fields)