| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Clipboard.Unsafe
Synopsis
- sDL_SetClipboardText :: PtrConst CChar -> IO CBool
- sDL_GetClipboardText :: IO (Ptr CChar)
- sDL_HasClipboardText :: IO CBool
- sDL_SetPrimarySelectionText :: PtrConst CChar -> IO CBool
- sDL_GetPrimarySelectionText :: IO (Ptr CChar)
- sDL_HasPrimarySelectionText :: IO CBool
- sDL_SetClipboardData :: SDL_ClipboardDataCallback -> SDL_ClipboardCleanupCallback -> Ptr Void -> PtrConst (PtrConst CChar) -> CSize -> IO CBool
- sDL_ClearClipboardData :: IO CBool
- sDL_GetClipboardData :: PtrConst CChar -> Ptr CSize -> IO (Ptr Void)
- sDL_HasClipboardData :: PtrConst CChar -> IO CBool
- sDL_GetClipboardMimeTypes :: Ptr CSize -> IO (Ptr (Ptr CChar))
Documentation
- C declaration
SDL_SetClipboardText, defined atSDL3/SDL_clipboard.h 104:34
sDL_GetClipboardText :: IO (Ptr CChar) Source #
Get UTF-8 text from the clipboard.
This function returns an empty string if there is not enough memory left for a copy of the clipboard's content.
- Returns
- the clipboard text on success or an empty string on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_HasClipboardText,sDL_SetClipboardText- C declaration
SDL_GetClipboardText, defined atSDL3/SDL_clipboard.h 123:36
Since: 3.2.0
sDL_HasClipboardText :: IO CBool Source #
Query whether the clipboard exists and contains a non-empty text string.
- Returns
- true if the clipboard has text, or false if it does not.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_GetClipboardText,sDL_SetClipboardText- C declaration
SDL_HasClipboardText, defined atSDL3/SDL_clipboard.h 137:34
Since: 3.2.0
sDL_SetPrimarySelectionText Source #
Put UTF-8 text into the primary selection.
- Returns
- true on success or false on failure; call SDL_GetError() for more information.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_GetPrimarySelectionText,sDL_HasPrimarySelectionText- C declaration
SDL_SetPrimarySelectionText, defined atSDL3/SDL_clipboard.h 153:34
Since: 3.2.0
sDL_GetPrimarySelectionText :: IO (Ptr CChar) Source #
Get UTF-8 text from the primary selection.
This function returns an empty string if there is not enough memory left for a copy of the primary selection's content.
- Returns
- the primary selection text on success or an empty string on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_HasPrimarySelectionText,sDL_SetPrimarySelectionText- C declaration
SDL_GetPrimarySelectionText, defined atSDL3/SDL_clipboard.h 172:36
Since: 3.2.0
sDL_HasPrimarySelectionText :: IO CBool Source #
Query whether the primary selection exists and contains a non-empty text string.
- Returns
- true if the primary selection has text, or false if it does not.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_GetPrimarySelectionText,sDL_SetPrimarySelectionText- C declaration
SDL_HasPrimarySelectionText, defined atSDL3/SDL_clipboard.h 187:34
Since: 3.2.0
Arguments
| :: SDL_ClipboardDataCallback |
|
| -> SDL_ClipboardCleanupCallback |
|
| -> Ptr Void |
|
| -> PtrConst (PtrConst CChar) |
|
| -> CSize |
|
| -> IO CBool |
Offer clipboard data to the OS.
Tell the operating system that the application is offering clipboard data for each of the provided mime-types. Once another application requests the data the callback function will be called, allowing it to generate and respond with the data for the requested mime-type.
The size of text data does not include any terminator, and the text does not need to be null-terminated (e.g., you can directly copy a portion of a document).
- Returns
- true on success or false on failure; call SDL_GetError() for more information.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_ClearClipboardData,sDL_GetClipboardData,sDL_HasClipboardData- C declaration
SDL_SetClipboardData, defined atSDL3/SDL_clipboard.h 255:34
Since: 3.2.0
sDL_ClearClipboardData :: IO CBool Source #
Clear the clipboard data.
- Returns
- true on success or false on failure; call SDL_GetError() for more information.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_SetClipboardData- C declaration
SDL_ClearClipboardData, defined atSDL3/SDL_clipboard.h 269:34
Since: 3.2.0
Arguments
| :: PtrConst CChar |
|
| -> Ptr CSize |
|
| -> IO (Ptr Void) |
Get the data from the clipboard for a given mime type.
The size of text data does not include the terminator, but the text is guaranteed to be null-terminated.
- Returns
- the retrieved data buffer or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_HasClipboardData,sDL_SetClipboardData- C declaration
SDL_GetClipboardData, defined atSDL3/SDL_clipboard.h 290:36
Since: 3.2.0
Query whether there is data in the clipboard for the provided mime type.
- Returns
- true if data exists in the clipboard for the provided mime type, false if it does not.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_SetClipboardData,sDL_GetClipboardData- C declaration
SDL_HasClipboardData, defined atSDL3/SDL_clipboard.h 306:34
Since: 3.2.0
sDL_GetClipboardMimeTypes Source #
Arguments
| :: Ptr CSize |
|
| -> IO (Ptr (Ptr CChar)) |
Retrieve the list of mime types available in the clipboard.
- Returns
- a null-terminated array of strings with mime types, or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_SetClipboardData- C declaration
SDL_GetClipboardMimeTypes, defined atSDL3/SDL_clipboard.h 323:37
Since: 3.2.0