MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Clipboard_GetText

Function Clipboard_GetText

src/Window_BeOS.cpp:393–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393void Clipboard_GetText(cc_string* value) {
394 if (!be_clipboard->Lock()) return;
395
396 BMessage* clip = be_clipboard->Data();
397 char* str = NULL;
398 ssize_t str_len = 0;
399
400 clip->FindData("text/plain", B_MIME_TYPE, (const void**)&str, &str_len);
401 if (str) String_AppendUtf8(value, str, str_len);
402
403 be_clipboard->Unlock();
404}
405
406void Clipboard_SetText(const cc_string* value) {
407 char str[NATIVE_STR_LEN];

Callers

nothing calls this directly

Calls 1

String_AppendUtf8Function · 0.85

Tested by

no test coverage detected