Changeset 80664 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- Sep 9, 2019 10:00:04 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r80662 r80664 87 87 static SHCLCONTEXT g_Ctx = { NULL }; 88 88 /** Static window class name. */ 89 static char s_szClipWndClassName[] = VBOX_CLIPBOARD_WNDCLASS_NAME;89 static char s_szClipWndClassName[] = SHCL_WIN_WNDCLASS_NAME; 90 90 91 91 … … 428 428 * Report available formats to the host. */ 429 429 SHCLFORMATDATA Formats; 430 int rc = VBoxClipboardWinGetFormats(&pCtx->Win, &Formats);430 int rc = SharedClipboardWinGetFormats(&pCtx->Win, &Formats); 431 431 if (RT_SUCCESS(rc)) 432 432 { … … 442 442 { 443 443 LogFunc(("WM_CHANGECBCHAIN\n")); 444 lresultRc = VBoxClipboardWinHandleWMChangeCBChain(pWinCtx, hwnd, msg, wParam, lParam);444 lresultRc = SharedClipboardWinHandleWMChangeCBChain(pWinCtx, hwnd, msg, wParam, lParam); 445 445 break; 446 446 } … … 455 455 /* WM_DRAWCLIPBOARD always expects a return code of 0, so don't change "rc" here. */ 456 456 SHCLFORMATDATA Formats; 457 int rc = VBoxClipboardWinGetFormats(pWinCtx, &Formats);457 int rc = SharedClipboardWinGetFormats(pWinCtx, &Formats); 458 458 if (RT_SUCCESS(rc)) 459 459 rc = VbglR3ClipboardFormatsSend(&pCtx->CmdCtx, &Formats); 460 460 } 461 461 462 lresultRc = VBoxClipboardWinChainPassToNext(pWinCtx, msg, wParam, lParam);462 lresultRc = SharedClipboardWinChainPassToNext(pWinCtx, msg, wParam, lParam); 463 463 break; 464 464 } … … 466 466 case WM_TIMER: 467 467 { 468 int rc = VBoxClipboardWinHandleWMTimer(pWinCtx);468 int rc = SharedClipboardWinHandleWMTimer(pWinCtx); 469 469 AssertRC(rc); 470 470 … … 485 485 const UINT cfFormat = (UINT)wParam; 486 486 487 const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);487 const SHCLFORMAT fFormat = SharedClipboardWinClipboardFormatToVBox(cfFormat); 488 488 489 489 LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat)); … … 492 492 { 493 493 LogFunc(("WM_RENDERFORMAT: Unsupported format requested\n")); 494 VBoxClipboardWinClear();494 SharedClipboardWinClear(); 495 495 } 496 496 else … … 632 632 LogFunc(("WM_RENDERALLFORMATS\n")); 633 633 634 int rc = VBoxClipboardWinHandleWMRenderAllFormats(pWinCtx, hwnd);634 int rc = SharedClipboardWinHandleWMRenderAllFormats(pWinCtx, hwnd); 635 635 AssertRC(rc); 636 636 … … 638 638 } 639 639 640 case VBOX_CLIPBOARD_WM_REPORT_FORMATS:640 case SHCL_WIN_WM_REPORT_FORMATS: 641 641 { 642 642 LogFunc(("VBOX_CLIPBOARD_WM_REPORT_FORMATS\n")); … … 651 651 if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */ 652 652 { 653 int rc = VBoxClipboardWinOpen(hwnd);653 int rc = SharedClipboardWinOpen(hwnd); 654 654 if (RT_SUCCESS(rc)) 655 655 { 656 VBoxClipboardWinClear();656 SharedClipboardWinClear(); 657 657 658 658 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST … … 665 665 if (pTransfer) 666 666 { 667 rc = VBoxClipboardWinURITransferCreate(pWinCtx, pTransfer);667 rc = SharedClipboardWinURITransferCreate(pWinCtx, pTransfer); 668 668 669 669 /* Note: The actual requesting + retrieving of data will be done in the IDataObject implementation … … 673 673 AssertFailedStmt(rc = VERR_NOT_FOUND); 674 674 675 /* Note: VBoxClipboardWinURITransferCreate() takes care of closing the clipboard. */675 /* Note: SharedClipboardWinURITransferCreate() takes care of closing the clipboard. */ 676 676 } 677 677 else 678 678 { 679 679 #endif 680 rc = VBoxClipboardWinAnnounceFormats(pWinCtx, fFormats);681 682 VBoxClipboardWinClose();680 rc = SharedClipboardWinAnnounceFormats(pWinCtx, fFormats); 681 682 SharedClipboardWinClose(); 683 683 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 684 684 } … … 691 691 } 692 692 693 case VBOX_CLIPBOARD_WM_READ_DATA:693 case SHCL_WIN_WM_READ_DATA: 694 694 { 695 695 /* Send data in the specified format to the host. */ … … 704 704 LogFlowFunc(("VBOX_CLIPBOARD_WM_READ_DATA: uFormat=0x%x\n", uFormat)); 705 705 706 int rc = VBoxClipboardWinOpen(hwnd);706 int rc = SharedClipboardWinOpen(hwnd); 707 707 if (RT_SUCCESS(rc)) 708 708 { … … 749 749 else if (uFormat == VBOX_SHARED_CLIPBOARD_FMT_HTML) 750 750 { 751 UINT format = RegisterClipboardFormat( VBOX_CLIPBOARD_WIN_REGFMT_HTML);751 UINT format = RegisterClipboardFormat(SHCL_WIN_REGFMT_HTML); 752 752 if (format != 0) 753 753 { … … 777 777 LogFunc(("cTransfersRunning=%RU32\n", SharedClipboardURICtxGetRunningTransfers(&pCtx->URI))); 778 778 779 int rc = VBoxClipboardWinOpen(hwnd);779 int rc = SharedClipboardWinOpen(hwnd); 780 780 if (RT_SUCCESS(rc)) 781 781 { … … 799 799 char *papszList; 800 800 uint32_t cbList; 801 rc = VBoxClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList);801 rc = SharedClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList); 802 802 803 803 GlobalUnlock(hClip); … … 840 840 } 841 841 842 VBoxClipboardWinClose();842 SharedClipboardWinClose(); 843 843 } 844 844 … … 859 859 } 860 860 861 VBoxClipboardWinClose();861 SharedClipboardWinClose(); 862 862 } 863 863 break; … … 871 871 SharedClipboardURICtxGetRunningTransfers(&pCtx->URI))); 872 872 873 int rc = VBoxClipboardWinOpen(hwnd);873 int rc = SharedClipboardWinOpen(hwnd); 874 874 if (RT_SUCCESS(rc)) 875 875 { … … 893 893 char *papszList; 894 894 uint32_t cbList; 895 rc = VBoxClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList);895 rc = SharedClipboardWinDropFilesToStringList((DROPFILES *)hDrop, &papszList, &cbList); 896 896 897 897 GlobalUnlock(hClip); … … 934 934 } 935 935 936 VBoxClipboardWinClose();936 SharedClipboardWinClose(); 937 937 } 938 938 … … 989 989 if (RT_SUCCESS(rc)) 990 990 { 991 rc = VBoxClipboardWinURITransferCreate(pWinCtx, pTransfer);991 rc = SharedClipboardWinURITransferCreate(pWinCtx, pTransfer); 992 992 } 993 993 } … … 1004 1004 LogFunc(("WM_DESTROY\n")); 1005 1005 1006 int rc = VBoxClipboardWinHandleWMDestroy(pWinCtx);1006 int rc = SharedClipboardWinHandleWMDestroy(pWinCtx); 1007 1007 AssertRC(rc); 1008 1008 … … 1074 1074 SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_NOSIZE); 1075 1075 1076 VBoxClipboardWinChainAdd(pWinCtx);1077 if (! VBoxClipboardWinIsNewAPI(&pWinCtx->newAPI))1076 SharedClipboardWinChainAdd(pWinCtx); 1077 if (!SharedClipboardWinIsNewAPI(&pWinCtx->newAPI)) 1078 1078 pWinCtx->oldAPI.timerRefresh = SetTimer(pWinCtx->hWnd, 0, 10 * 1000 /* 10s */, NULL); 1079 1079 } … … 1146 1146 { 1147 1147 /* Check if new Clipboard API is available. */ 1148 /* ignore rc */ VBoxClipboardWinCheckAndInitNewAPI(&pCtx->Win.newAPI);1148 /* ignore rc */ SharedClipboardWinCheckAndInitNewAPI(&pCtx->Win.newAPI); 1149 1149 1150 1150 rc = VbglR3ClipboardConnectEx(&pCtx->CmdCtx); … … 1268 1268 * Forward the information to the window, so it can later 1269 1269 * respond to WM_RENDERFORMAT message. */ 1270 ::PostMessage(pWinCtx->hWnd, VBOX_CLIPBOARD_WM_REPORT_FORMATS,1270 ::PostMessage(pWinCtx->hWnd, SHCL_WIN_WM_REPORT_FORMATS, 1271 1271 0 /* wParam */, (LPARAM)pEvent /* lParam */); 1272 1272 break; … … 1276 1276 { 1277 1277 /* The host needs data in the specified format. */ 1278 ::PostMessage(pWinCtx->hWnd, VBOX_CLIPBOARD_WM_READ_DATA,1278 ::PostMessage(pWinCtx->hWnd, SHCL_WIN_WM_READ_DATA, 1279 1279 0 /* wParam */, (LPARAM)pEvent /* lParam */); 1280 1280 break;
Note:
See TracChangeset
for help on using the changeset viewer.