20 #ifndef WINPR_CLIPBOARD_H
21 #define WINPR_CLIPBOARD_H
23 #include <winpr/winpr.h>
24 #include <winpr/wtypes.h>
28 typedef void* (*CLIPBOARD_SYNTHESIZE_FN)(wClipboard* clipboard, UINT32 formatId,
const void* data,
50 wClipboard* clipboard;
55 UINT(*ClipboardFileSizeSuccess)
57 UINT(*ClipboardFileSizeFailure)
61 UINT(*ClipboardFileRangeSuccess)
63 UINT(*ClipboardFileRangeFailure)
66 BOOL (*IsFileNameComponentValid)(LPCWSTR lpFileName);
74 WINPR_API
void ClipboardLock(wClipboard* clipboard);
75 WINPR_API
void ClipboardUnlock(wClipboard* clipboard);
77 WINPR_API BOOL ClipboardEmpty(wClipboard* clipboard);
78 WINPR_API UINT32 ClipboardCountFormats(wClipboard* clipboard);
79 WINPR_API UINT32 ClipboardGetFormatIds(wClipboard* clipboard, UINT32** ppFormatIds);
81 WINPR_API UINT32 ClipboardCountRegisteredFormats(wClipboard* clipboard);
82 WINPR_API UINT32 ClipboardGetRegisteredFormatIds(wClipboard* clipboard, UINT32** ppFormatIds);
83 WINPR_API UINT32 ClipboardRegisterFormat(wClipboard* clipboard,
const char* name);
85 WINPR_API BOOL ClipboardRegisterSynthesizer(wClipboard* clipboard, UINT32 formatId,
87 CLIPBOARD_SYNTHESIZE_FN pfnSynthesize);
89 WINPR_API UINT32 ClipboardGetFormatId(wClipboard* clipboard,
const char* name);
90 WINPR_API
const char* ClipboardGetFormatName(wClipboard* clipboard, UINT32 formatId);
91 WINPR_API
void* ClipboardGetData(wClipboard* clipboard, UINT32 formatId, UINT32* pSize);
92 WINPR_API BOOL ClipboardSetData(wClipboard* clipboard, UINT32 formatId,
const void* data,
95 WINPR_API UINT64 ClipboardGetOwner(wClipboard* clipboard);
96 WINPR_API
void ClipboardSetOwner(wClipboard* clipboard, UINT64 ownerId);
98 WINPR_API wClipboardDelegate* ClipboardGetDelegate(wClipboard* clipboard);
100 WINPR_API wClipboard* ClipboardCreate(
void);
101 WINPR_API
void ClipboardDestroy(wClipboard* clipboard);
103 WINPR_API
const char* ClipboardGetFormatIdString(UINT32 formatId);