Lazy WinAPI
clipboard.h
Go to the documentation of this file.
1 #pragma once
2 
8 #include <stdbool.h>
9 #include <stdint.h>
10 #include <wchar.h>
11 
12 #include <windows.h>
13 
140 
146 #define Clipboard_get_seq_num() GetClipboardSequenceNumber()
147 
154 bool Clipboard_open();
155 
164 bool Clipboard_close();
165 
174 bool Clipboard_empty();
175 
188 size_t Clipboard_get_size(UINT format);
189 
203 size_t Clipboard_get(UINT format, uint8_t *ptr, size_t size);
204 
217 bool Clipboard_set(UINT format, const uint8_t *ptr, size_t size);
218 
229 bool Clipboard_set_wide_string(const wchar_t *text);
230 
241 bool Clipboard_set_string(const char *text);
242 
250 #define Clipboard_next_avail_format() EnumClipboardFormats(0)
251 
257 bool Clipboard_is_format_avail(UINT format);
258 
263 #define Clipboard_count_avail_formats() CountClipboardFormats()
264 
275 UINT Clipboard_register_format(const wchar_t *name);
276 
287 int Clipboard_get_format_name(UINT format, wchar_t* buffer, size_t size);
288 
size_t Clipboard_get_size(UINT format)
Retrieves size in bytes of clipboard content.
Definition: clipboard.c:21
bool Clipboard_set_wide_string(const wchar_t *text)
Sets string onto clipboard as format CF_UNICODETEXT.
Definition: clipboard.c:73
UINT Clipboard_register_format(const wchar_t *name)
Registers new clipboard format.
Definition: clipboard.c:82
int Clipboard_get_format_name(UINT format, wchar_t *buffer, size_t size)
Retrieves the name of clipboard format.
Definition: clipboard.c:146
bool Clipboard_set_string(const char *text)
Sets wide string onto clipboard as format CF_TEXT.
Definition: clipboard.c:68
bool Clipboard_empty()
Empties clipboard.
Definition: clipboard.c:17
bool Clipboard_is_format_avail(UINT format)
Definition: clipboard.c:78
bool Clipboard_open()
Opens clipboard for use in the current thread.
Definition: clipboard.c:9
size_t Clipboard_get(UINT format, uint8_t *ptr, size_t size)
Gets clipboard content of specific format.
Definition: clipboard.c:27
bool Clipboard_close()
Closes clipboard.
Definition: clipboard.c:13
bool Clipboard_set(UINT format, const uint8_t *ptr, size_t size)
Sets clipboard content of specific format.
Definition: clipboard.c:48