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.
-
Untyped pointer to the underlying
GtkClipboardinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
clipboard_ptrDefault implementationTyped pointer to the underlying
GtkClipboardinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkClipboardinstance.Declaration
Swift
var clipboard_ptr: UnsafeMutablePointer<GtkClipboard>! { get } -
Required Initialiser for types conforming to
ClipboardProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
ClipboardSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: ClipboardSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe 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(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
ClipboardSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: ClipboardSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onOwnerChange(flags:Extension methodhandler: ) Note
This represents the underlyingowner-changesignalDeclaration
Swift
@discardableResult @inlinable func onOwnerChange(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: ClipboardRef, _ event: Gdk.EventOwnerChangeRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
eventnone
handlerThe signal handler to call Run the given callback whenever the
ownerChangesignal is emitted -
ownerChangeSignalExtension methodTyped
owner-changesignal for using theconnect(signal:)methodsDeclaration
Swift
static var ownerChangeSignal: ClipboardSignalName { get }
-
clear()Extension methodUndocumented
Declaration
Swift
@inlinable func clear() -
getDisplay()Extension methodUndocumented
Declaration
Swift
@inlinable func getDisplay() -> Gdk.DisplayRef! -
getOwner()Extension methodUndocumented
Declaration
Swift
@inlinable func getOwner() -> GLibObject.ObjectRef! -
getSelection()Extension methodUndocumented
Declaration
Swift
@inlinable func getSelection() -> GdkAtom! -
requestContents(target:Extension methodcallback: userData: ) Undocumented
Declaration
Swift
@inlinable func requestContents(target: GdkAtom, callback: GtkClipboardReceivedFunc?, userData: gpointer! = nil) -
requestImage(callback:Extension methoduserData: ) Undocumented
Declaration
Swift
@inlinable func requestImage(callback: GtkClipboardImageReceivedFunc?, userData: gpointer! = nil) -
requestRichText(buffer:Extension methodcallback: userData: ) Undocumented
Declaration
Swift
@inlinable func requestRichText<TextBufferT>(buffer: TextBufferT, callback: GtkClipboardRichTextReceivedFunc?, userData: gpointer! = nil) where TextBufferT : TextBufferProtocol -
requestTargets(callback:Extension methoduserData: ) Undocumented
Declaration
Swift
@inlinable func requestTargets(callback: GtkClipboardTargetsReceivedFunc?, userData: gpointer! = nil) -
requestText(callback:Extension methoduserData: ) Undocumented
Declaration
Swift
@inlinable func requestText(callback: GtkClipboardTextReceivedFunc?, userData: gpointer! = nil) -
requestURIs(callback:Extension methoduserData: ) Undocumented
Declaration
Swift
@inlinable func requestURIs(callback: GtkClipboardURIReceivedFunc?, userData: gpointer! = nil) -
setCanStore(targets:Extension methodnTargets: ) Undocumented
Declaration
Swift
@inlinable func setCanStore(targets: UnsafePointer<GtkTargetEntry>! = nil, nTargets: Int) -
setImage(pixbuf:Extension method) Undocumented
Declaration
Swift
@inlinable func setImage<PixbufT>(pixbuf: PixbufT) where PixbufT : PixbufProtocol -
set(text:Extension methodlen: ) Undocumented
Declaration
Swift
@inlinable func set(text: UnsafePointer<gchar>!, len: Int) -
setWithData(targets:Extension methodnTargets: getFunc: clearFunc: userData: ) Undocumented
Declaration
Swift
@inlinable func setWithData(targets: UnsafePointer<GtkTargetEntry>!, nTargets: Int, getFunc: GtkClipboardGetFunc?, clearFunc: GtkClipboardClearFunc?, userData: gpointer! = nil) -> Bool -
setWithOwner(targets:Extension methodnTargets: getFunc: clearFunc: owner: ) Undocumented
Declaration
Swift
@inlinable func setWithOwner<ObjectT>(targets: UnsafePointer<GtkTargetEntry>!, nTargets: Int, getFunc: GtkClipboardGetFunc?, clearFunc: GtkClipboardClearFunc?, owner: ObjectT) -> Bool where ObjectT : ObjectProtocol -
store()Extension methodUndocumented
Declaration
Swift
@inlinable func store() -
waitForContents(target:Extension method) Undocumented
Declaration
Swift
@inlinable func waitForContents(target: GdkAtom) -> SelectionDataRef! -
waitForImage()Extension methodUndocumented
Declaration
Swift
@inlinable func waitForImage() -> PixbufRef! -
waitForRichText(buffer:Extension methodformat: length: ) Undocumented
Declaration
Swift
@inlinable func waitForRichText<TextBufferT>(buffer: TextBufferT, format: UnsafeMutablePointer<GdkAtom?>, length: UnsafeMutablePointer<gsize>!) -> UnsafeMutablePointer<guint8>? where TextBufferT : TextBufferProtocol -
waitFor(targets:Extension methodnTargets: ) Returns a list of targets that are present on the clipboard, or
nilif there aren’t any targets available. The returned list must be freed withg_free(). This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.Declaration
Swift
@inlinable func waitFor(targets: UnsafeMutablePointer<UnsafeMutablePointer<GdkAtom?>?>!, nTargets: UnsafeMutablePointer<gint>!) -> Bool -
waitForText()Extension methodUndocumented
Declaration
Swift
@inlinable func waitForText() -> String! -
waitForURIs()Extension methodUndocumented
Declaration
Swift
@inlinable func waitForURIs() -> UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>! -
waitIsImageAvailable()Extension methodUndocumented
Declaration
Swift
@inlinable func waitIsImageAvailable() -> Bool -
waitIsRichTextAvailable(buffer:Extension method) Undocumented
Declaration
Swift
@inlinable func waitIsRichTextAvailable<TextBufferT>(buffer: TextBufferT) -> Bool where TextBufferT : TextBufferProtocol -
waitIsTargetAvailable(target:Extension method) Undocumented
Declaration
Swift
@inlinable func waitIsTargetAvailable(target: GdkAtom) -> Bool -
waitIsTextAvailable()Extension methodUndocumented
Declaration
Swift
@inlinable func waitIsTextAvailable() -> Bool -
waitIsURIsAvailable()Extension methodUndocumented
Declaration
Swift
@inlinable func waitIsURIsAvailable() -> Bool -
displayExtension methodUndocumented
Declaration
Swift
@inlinable var display: Gdk.DisplayRef! { get } -
ownerExtension methodUndocumented
Declaration
Swift
@inlinable var owner: GLibObject.ObjectRef! { get } -
selectionExtension methodUndocumented
Declaration
Swift
@inlinable var selection: GdkAtom! { get }
View on GitHub
Install in Dash
ClipboardProtocol Protocol Reference