raw_clipboard library

Raw clipboard functions

Functions

closeClipboard() bool
Closes the clipboard. Returns false is the functions fails.
emptyClipboard() bool
Empties the clipboard and frees handles to data in the clipboard. Returns false is the functions fails.
getClipboardData(int format) Pointer<NativeType>
Retrieves data from the clipboard in a specified format. The clipboard must have been opened previously.
globalLock(Pointer<NativeType> mem) Pointer<NativeType>
Locks a global memory object and returns a pointer to the first byte of the object's memory block.
globalUnlock(Pointer<NativeType> mem) bool
Decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE. This function has no effect on memory objects allocated with GMEM_FIXED.
isClipboardFormatAvailable(int format) bool
Determines whether the clipboard contains data in the specified format. See ClipboardFormat
memcpy<T extends NativeType>(Pointer<T> destination, Pointer<T> source, int len) → void
memcpy from C
openClipboard([Pointer<NativeType> handle]) bool
Opens the clipboard for examination and prevents other applications from modifying the clipboard content. After this closeClipboard should be called. Returns false if this fails.
setClipboardData(int format, Pointer<NativeType> mem) Pointer<NativeType>
Places data on the clipboard in a specified clipboard format. The window must be the current clipboard owner, and the application must have called the OpenClipboard function. See ClipboardFormat for the format flags mem is a handle to the data in the specified format.

Enums

ClipboardErrorId
Info about the clipboard error.

Exceptions / Errors

ClipboardException
Exception throw when a clipboard operation fails.