Changeset 80847 in vbox for trunk/src/VBox/Additions/darwin
- Timestamp:
- Sep 17, 2019 9:38:16 AM (5 years ago)
- Location:
- trunk/src/VBox/Additions/darwin/VBoxClient
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboard.cpp
r80627 r80847 104 104 { 105 105 /* The host is terminating */ 106 case VBOX_SH ARED_CLIPBOARD_HOST_MSG_QUIT:106 case VBOX_SHCL_HOST_MSG_QUIT: 107 107 VBoxClientVerbose(2, "host requested quit\n"); 108 108 fQuit = true; … … 110 110 111 111 /* The host needs data in the specified format */ 112 case VBOX_SH ARED_CLIPBOARD_HOST_MSG_READ_DATA:112 case VBOX_SHCL_HOST_MSG_READ_DATA: 113 113 VBoxClientVerbose(2, "host requested guest's clipboard read\n"); 114 114 rc = vbclClipboardForwardToHost(g_u32ClientId, g_PasteboardRef, fFormats); … … 117 117 118 118 /* The host has announced available clipboard formats */ 119 case VBOX_SH ARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT:119 case VBOX_SHCL_HOST_MSG_FORMATS_REPORT: 120 120 VBoxClientVerbose(2, "host requested guest's clipboard write\n"); 121 121 rc = vbclClipboardForwardToGuest(g_u32ClientId, g_PasteboardRef, fFormats); -
trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp
r78188 r80847 67 67 if (rc == noErr) 68 68 { 69 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeUTF16PlainText, VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT);70 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeUTF8PlainText, VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT);71 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeBMP, VBOX_SH ARED_CLIPBOARD_FMT_BITMAP );72 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeHTML, VBOX_SH ARED_CLIPBOARD_FMT_HTML );69 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeUTF16PlainText, VBOX_SHCL_FMT_UNICODETEXT); 70 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeUTF8PlainText, VBOX_SHCL_FMT_UNICODETEXT); 71 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeBMP, VBOX_SHCL_FMT_BITMAP ); 72 VBOXCL_ADD_FORMAT_IF_PRESENT(kUTTypeHTML, VBOX_SHCL_FMT_HTML ); 73 73 74 74 #ifdef CLIPBOARD_DUMP_CONTENT_FORMATS … … 230 230 rc = vboxClipboardUtf16LinToWin(pwszData, cbData / sizeof(RTUTF16), pwszWinTmp, cwcActual); 231 231 if (RT_SUCCESS(rc)) 232 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT,232 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_UNICODETEXT, 233 233 pwszWinTmp, cwcActual * sizeof(RTUTF16)); 234 234 … … 253 253 AssertRCReturn(rc, rc); 254 254 255 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_BITMAP, pvDib, cbDib);255 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_BITMAP, pvDib, cbDib); 256 256 257 257 return rc; … … 282 282 while (fFormatsLeft) 283 283 { 284 if (fFormatsLeft & VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT)285 { 286 VBoxClientVerbose(3, "requested VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT: %d\n", fFormats);284 if (fFormatsLeft & VBOX_SHCL_FMT_UNICODETEXT) 285 { 286 VBoxClientVerbose(3, "requested VBOX_SHCL_FMT_UNICODETEXT: %d\n", fFormats); 287 287 288 288 RTUTF16 *pUtf16Str = NULL; … … 324 324 { 325 325 /* No data found or error occurred: send empty buffer */ 326 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT, NULL, 0);327 } 328 329 fFormatsLeft &= ~(uint32_t)VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT;330 } 331 332 else if (fFormatsLeft & VBOX_SH ARED_CLIPBOARD_FMT_BITMAP)333 { 334 VBoxClientVerbose(3, "requested VBOX_SH ARED_CLIPBOARD_FMT_BITMAP: %d\n", fFormats);326 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_UNICODETEXT, NULL, 0); 327 } 328 329 fFormatsLeft &= ~(uint32_t)VBOX_SHCL_FMT_UNICODETEXT; 330 } 331 332 else if (fFormatsLeft & VBOX_SHCL_FMT_BITMAP) 333 { 334 VBoxClientVerbose(3, "requested VBOX_SHCL_FMT_BITMAP: %d\n", fFormats); 335 335 336 336 rc = vbclClipboardReadGuestData(pPasteboard, kUTTypeBMP, &pvData, &cbData, &cbAlloc); … … 343 343 { 344 344 /* No data found or error occurred: send empty buffer */ 345 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_BITMAP, NULL, 0);346 } 347 348 fFormatsLeft &= ~(uint32_t)VBOX_SH ARED_CLIPBOARD_FMT_BITMAP;349 } 350 351 else if (fFormatsLeft & VBOX_SH ARED_CLIPBOARD_FMT_HTML)352 { 353 VBoxClientVerbose(3, "requested VBOX_SH ARED_CLIPBOARD_FMT_HTML: %d\n", fFormats);345 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_BITMAP, NULL, 0); 346 } 347 348 fFormatsLeft &= ~(uint32_t)VBOX_SHCL_FMT_BITMAP; 349 } 350 351 else if (fFormatsLeft & VBOX_SHCL_FMT_HTML) 352 { 353 VBoxClientVerbose(3, "requested VBOX_SHCL_FMT_HTML: %d\n", fFormats); 354 354 355 355 rc = vbclClipboardReadGuestData(pPasteboard, kUTTypeHTML, &pvData, &cbData, &cbAlloc); 356 356 if (RT_SUCCESS(rc)) 357 357 { 358 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_HTML, pvData, cbData);358 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_HTML, pvData, cbData); 359 359 vbclClipboardReleaseGuestData(&pvData, cbAlloc); 360 360 } … … 362 362 { 363 363 /* No data found or error occurred: send empty buffer */ 364 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_HTML, NULL, 0);365 } 366 367 fFormatsLeft &= ~(uint32_t)VBOX_SH ARED_CLIPBOARD_FMT_HTML;364 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_HTML, NULL, 0); 365 } 366 367 fFormatsLeft &= ~(uint32_t)VBOX_SHCL_FMT_HTML; 368 368 } 369 369 -
trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp
r78188 r80847 245 245 while (fFormatsInternal) 246 246 { 247 if (fFormatsInternal & VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT)248 { 249 VBoxClientVerbose(3, "found VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT: %d\n", fFormatsInternal);250 251 rc = vbclClipboardReadHostData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT, &pData, &cbDataSize, &cbMemSize);247 if (fFormatsInternal & VBOX_SHCL_FMT_UNICODETEXT) 248 { 249 VBoxClientVerbose(3, "found VBOX_SHCL_FMT_UNICODETEXT: %d\n", fFormatsInternal); 250 251 rc = vbclClipboardReadHostData(u32ClientId, VBOX_SHCL_FMT_UNICODETEXT, &pData, &cbDataSize, &cbMemSize); 252 252 if (RT_SUCCESS(rc)) 253 253 { … … 259 259 } 260 260 261 fFormatsInternal &= ~((uint32_t)VBOX_SH ARED_CLIPBOARD_FMT_UNICODETEXT);262 } 263 264 else if (fFormatsInternal & VBOX_SH ARED_CLIPBOARD_FMT_BITMAP)265 { 266 VBoxClientVerbose(3, "found VBOX_SH ARED_CLIPBOARD_FMT_BITMAP: %d\n", fFormatsInternal);267 268 rc = vbclClipboardReadHostData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_BITMAP, &pData, &cbDataSize, &cbMemSize);261 fFormatsInternal &= ~((uint32_t)VBOX_SHCL_FMT_UNICODETEXT); 262 } 263 264 else if (fFormatsInternal & VBOX_SHCL_FMT_BITMAP) 265 { 266 VBoxClientVerbose(3, "found VBOX_SHCL_FMT_BITMAP: %d\n", fFormatsInternal); 267 268 rc = vbclClipboardReadHostData(u32ClientId, VBOX_SHCL_FMT_BITMAP, &pData, &cbDataSize, &cbMemSize); 269 269 if (RT_SUCCESS(rc)) 270 270 { … … 276 276 } 277 277 278 fFormatsInternal &= ~((uint32_t)VBOX_SH ARED_CLIPBOARD_FMT_BITMAP);279 } 280 281 else if (fFormatsInternal & VBOX_SH ARED_CLIPBOARD_FMT_HTML)282 { 283 VBoxClientVerbose(3, "found VBOX_SH ARED_CLIPBOARD_FMT_HTML: %d\n", fFormatsInternal);284 285 rc = vbclClipboardReadHostData(u32ClientId, VBOX_SH ARED_CLIPBOARD_FMT_HTML, &pData, &cbDataSize, &cbMemSize);278 fFormatsInternal &= ~((uint32_t)VBOX_SHCL_FMT_BITMAP); 279 } 280 281 else if (fFormatsInternal & VBOX_SHCL_FMT_HTML) 282 { 283 VBoxClientVerbose(3, "found VBOX_SHCL_FMT_HTML: %d\n", fFormatsInternal); 284 285 rc = vbclClipboardReadHostData(u32ClientId, VBOX_SHCL_FMT_HTML, &pData, &cbDataSize, &cbMemSize); 286 286 if (RT_SUCCESS(rc)) 287 287 { … … 293 293 } 294 294 295 fFormatsInternal &= ~((uint32_t)VBOX_SH ARED_CLIPBOARD_FMT_HTML);295 fFormatsInternal &= ~((uint32_t)VBOX_SHCL_FMT_HTML); 296 296 } 297 297
Note:
See TracChangeset
for help on using the changeset viewer.