Loading...
Searching...
No Matches
CAPI_Clipboard.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * This file is a part of Ultralight. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2024 Ultralight, Inc. *
7 **************************************************************************************************/
8
9///
10/// @file CAPI_Clipboard.h
11///
12/// User-defined clipboard interface.
13///
14/// `#include <Ultralight/CAPI/CAPI_Clipboard.h>`
15///
16/// The library uses this to read and write data to the system's clipboard.
17///
18/// @see ulPlatformSetClipboard()
19///
20#ifndef ULTRALIGHT_CAPI_CLIPBOARD_H
21#define ULTRALIGHT_CAPI_CLIPBOARD_H
22
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/******************************************************************************
30 * Clipboard
31 *****************************************************************************/
32
33///
34/// The callback invoked when the library wants to clear the system's clipboard.
35///
36typedef void (*ULClipboardClearCallback)();
37
38///
39/// The callback invoked when the library wants to read from the system's clipboard.
40///
41/// You should store the result (if any) in 'result'.
42///
44
45///
46/// The callback invoked when the library wants to write to the system's clipboard.
47///
49
50///
51/// User-defined clipboard interface.
52///
53/// You should implement each of these callbacks, then pass an instance of this struct containing
54/// your callbacks to ulPlatformSetClipboard().
55///
61
62#ifdef __cplusplus
63} // extern "C"
64#endif
65
66#endif // ULTRALIGHT_CAPI_CLIPBOARD_H
void(* ULClipboardWritePlainTextCallback)(ULString text)
The callback invoked when the library wants to write to the system's clipboard.
Definition CAPI_Clipboard.h:48
void(* ULClipboardClearCallback)()
The callback invoked when the library wants to clear the system's clipboard.
Definition CAPI_Clipboard.h:36
void(* ULClipboardReadPlainTextCallback)(ULString result)
The callback invoked when the library wants to read from the system's clipboard.
Definition CAPI_Clipboard.h:43
Various defines and utility functions for the C API.
struct C_String * ULString
Definition CAPI_Defines.h:65
User-defined clipboard interface.
Definition CAPI_Clipboard.h:56
ULClipboardClearCallback clear
Definition CAPI_Clipboard.h:57
ULClipboardWritePlainTextCallback write_plain_text
Definition CAPI_Clipboard.h:59
ULClipboardReadPlainTextCallback read_plain_text
Definition CAPI_Clipboard.h:58