docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C API
1.4.0
Toggle main menu visibility
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
23
#include <
Ultralight/CAPI/CAPI_Defines.h
>
24
25
#ifdef __cplusplus
26
extern
"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
///
36
typedef
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
///
43
typedef
void (*
ULClipboardReadPlainTextCallback
)(
ULString
result);
44
45
///
46
/// The callback invoked when the library wants to write to the system's clipboard.
47
///
48
typedef
void (*
ULClipboardWritePlainTextCallback
)(
ULString
text);
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
///
56
typedef
struct
{
57
ULClipboardClearCallback
clear
;
58
ULClipboardReadPlainTextCallback
read_plain_text
;
59
ULClipboardWritePlainTextCallback
write_plain_text
;
60
}
ULClipboard
;
61
62
#ifdef __cplusplus
63
}
// extern "C"
64
#endif
65
66
#endif
// ULTRALIGHT_CAPI_CLIPBOARD_H
ULClipboardWritePlainTextCallback
void(*) ULClipboardWritePlainTextCallback(ULString text)
The callback invoked when the library wants to write to the system's clipboard.
Definition
CAPI_Clipboard.h:48
ULClipboardReadPlainTextCallback
void(*) ULClipboardReadPlainTextCallback(ULString result)
The callback invoked when the library wants to read from the system's clipboard.
Definition
CAPI_Clipboard.h:43
ULClipboardClearCallback
void(*) ULClipboardClearCallback()
The callback invoked when the library wants to clear the system's clipboard.
Definition
CAPI_Clipboard.h:36
CAPI_Defines.h
Various defines and utility functions for the C API.
ULString
struct C_String * ULString
Definition
CAPI_Defines.h:65
ULClipboard
User-defined clipboard interface.
Definition
CAPI_Clipboard.h:56
ULClipboard::clear
ULClipboardClearCallback clear
Definition
CAPI_Clipboard.h:57
ULClipboard::write_plain_text
ULClipboardWritePlainTextCallback write_plain_text
Definition
CAPI_Clipboard.h:59
ULClipboard::read_plain_text
ULClipboardReadPlainTextCallback read_plain_text
Definition
CAPI_Clipboard.h:58
Ultralight
CAPI
CAPI_Clipboard.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4