Changeset 85694 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h
- Timestamp:
- Aug 11, 2020 4:30:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h
r85681 r85694 38 38 enum Status 39 39 { 40 Uninitialized = 0, 41 Initialized, 42 Dropping, 43 Dropped, 44 Aborted 40 Status_Uninitialized = 0, 41 Status_Initialized, 42 Status_Dropping, 43 Status_Dropped, 44 Status_Aborted, 45 Status_32Bit_Hack = 0x7fffffff 45 46 }; 46 47 … … 79 80 80 81 bool LookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex); 81 static HGLOBAL MemDup(HGLOBAL hMemSource);82 82 void RegisterFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat, TYMED tyMed = TYMED_HGLOBAL, 83 83 LONG lindex = -1, DWORD dwAspect = DVASPECT_CONTENT, DVTARGETDEVICE *pTargetDevice = NULL); 84 84 85 85 /** Current drag and drop status. */ 86 Status m Status;86 Status m_enmStatus; 87 87 /** Internal reference count of this object. */ 88 LONG m RefCount;88 LONG m_cRefs; 89 89 /** Number of native formats registered. This can be a different number than supplied with m_lstFormats. */ 90 ULONG m cFormats;90 ULONG m_cFormats; 91 91 /** Array of registered FORMATETC structs. Matches m_cFormats. */ 92 LPFORMATETC m pFormatEtc;92 LPFORMATETC m_paFormatEtc; 93 93 /** Array of registered STGMEDIUM structs. Matches m_cFormats. */ 94 LPSTGMEDIUM m pStgMedium;94 LPSTGMEDIUM m_paStgMedium; 95 95 /** Event semaphore used for waiting on status changes. */ 96 RTSEMEVENT m EventDropped;96 RTSEMEVENT m_EvtDropped; 97 97 /** Format of currently retrieved data. */ 98 RTCString m strFormat;98 RTCString m_strFormat; 99 99 /** The retrieved data as a raw buffer. */ 100 void *m pvData;100 void *m_pvData; 101 101 /** Raw buffer size (in bytes). */ 102 size_t m cbData;102 size_t m_cbData; 103 103 }; 104 104 … … 115 115 public: 116 116 117 VBOXDNDACTION GetCurrentAction(void) { return m DnDActionCurrent; }117 VBOXDNDACTION GetCurrentAction(void) { return m_enmActionCurrent; } 118 118 119 119 public: /* IUnknown methods. */ … … 131 131 132 132 /** Reference count of this object. */ 133 LONG m RefCount;133 LONG m_cRefs; 134 134 /** Pointer to parent proxy window. */ 135 VBoxDnDWnd *m pWndParent;135 VBoxDnDWnd *m_pWndParent; 136 136 /** Current drag effect. */ 137 DWORD m dwCurEffect;137 DWORD m_dwCurEffect; 138 138 /** Current action to perform on the host. */ 139 VBOXDNDACTION m DnDActionCurrent;139 VBOXDNDACTION m_enmActionCurrent; 140 140 }; 141 141 … … 172 172 173 173 /** Returns the data as mutable raw. Use with caution! */ 174 void *DataMutableRaw(void) const { return m pvData; }174 void *DataMutableRaw(void) const { return m_pvData; } 175 175 176 176 /** Returns the data size (in bytes). */ 177 size_t DataSize(void) const { return m cbData; }177 size_t DataSize(void) const { return m_cbData; } 178 178 179 179 RTCString Formats(void) const; … … 183 183 184 184 /** Reference count of this object. */ 185 LONG m RefCount;185 LONG m_cRefs; 186 186 /** Pointer to parent proxy window. */ 187 VBoxDnDWnd *m pWndParent;187 VBoxDnDWnd *m_pWndParent; 188 188 /** Current drop effect. */ 189 DWORD m dwCurEffect;189 DWORD m_dwCurEffect; 190 190 /** Copy of the data object's current FORMATETC struct. 191 191 * Note: We don't keep the pointer of the DVTARGETDEVICE here! */ 192 FORMATETC m FormatEtc;193 /** Stringified data object's format s string. */194 RTCString m strFormats;192 FORMATETC m_FormatEtc; 193 /** Stringified data object's format currently in use. */ 194 RTCString m_strFormat; 195 195 /** Pointer to actual format data. */ 196 void *m pvData;196 void *m_pvData; 197 197 /** Size (in bytes) of format data. */ 198 size_t m cbData;198 size_t m_cbData; 199 199 /** Event for waiting on the "drop" event. */ 200 RTSEMEVENT hEventDrop;200 RTSEMEVENT m_EvtDrop; 201 201 /** Result of the drop event. */ 202 int m DroppedRc;202 int m_rcDropped; 203 203 }; 204 204 … … 232 232 233 233 /** Reference count of this object. */ 234 LONG m_ lRefCount;234 LONG m_cRefs; 235 235 /** Current index for format iteration. */ 236 ULONG m_ nIndex;236 ULONG m_uIdxCur; 237 237 /** Number of format this object contains. */ 238 ULONG m_ nNumFormats;239 /** Array of FORMATETC formats this object contains. Matches m_ nNumFormats. */240 LPFORMATETC m_p FormatEtc;238 ULONG m_cFormats; 239 /** Array of FORMATETC formats this object contains. Matches m_cFormats. */ 240 LPFORMATETC m_paFormatEtc; 241 241 }; 242 242 … … 343 343 344 344 /** The window's thread for the native message pump and OLE context. */ 345 static DECLCALLBACK(int) Thread(RTTHREAD hThread, void *pvUser);345 static DECLCALLBACK(int) Thread(RTTHREAD m_hThread, void *pvUser); 346 346 347 347 public: … … 366 366 367 367 /* Host -> Guest */ 368 int OnHgEnter(const RTCList<RTCString> &formats, VBOXDNDACTIONLIST dndLstActionsAllowed);368 int OnHgEnter(const RTCList<RTCString> &formats, VBOXDNDACTIONLIST m_lstActionsAllowed); 369 369 int OnHgMove(uint32_t u32xPos, uint32_t u32yPos, VBOXDNDACTION dndAction); 370 370 int OnHgDrop(void); … … 396 396 397 397 /** Pointer to DnD context. */ 398 PVBOXDNDCONTEXT pCtx;398 PVBOXDNDCONTEXT m_pCtx; 399 399 /** The proxy window's main thread for processing 400 400 * window messages. */ 401 RTTHREAD hThread;401 RTTHREAD m_hThread; 402 402 /** Critical section to serialize access. */ 403 RTCRITSECT m CritSect;403 RTCRITSECT m_CritSect; 404 404 /** Event semaphore to wait for new DnD events. */ 405 RTSEMEVENT m EventSem;405 RTSEMEVENT m_EvtSem; 406 406 #ifdef RT_OS_WINDOWS 407 407 /** The window's handle. */ 408 HWND hWnd;408 HWND m_hWnd; 409 409 /** List of allowed MIME types this 410 410 * client can handle. Make this a per-instance 411 411 * property so that we can selectively allow/forbid 412 412 * certain types later on runtime. */ 413 RTCList<RTCString> lstFmtSup;413 RTCList<RTCString> m_lstFmtSup; 414 414 /** List of formats for the current 415 415 * drag'n drop operation. */ 416 RTCList<RTCString> lstFmtActive;416 RTCList<RTCString> m_lstFmtActive; 417 417 /** List of all current drag'n drop actions allowed. */ 418 VBOXDNDACTIONLIST dndLstActionsAllowed;418 VBOXDNDACTIONLIST m_lstActionsAllowed; 419 419 /** The startup information required 420 420 * for the actual DoDragDrop() call. */ 421 VBOXDNDSTARTUPINFO startupInfo;421 VBOXDNDSTARTUPINFO m_startupInfo; 422 422 /** Is the left mouse button being pressed 423 423 * currently while being in this window? */ 424 bool m fMouseButtonDown;424 bool m_fMouseButtonDown; 425 425 # ifdef VBOX_WITH_DRAG_AND_DROP_GH 426 426 /** Pointer to IDropTarget implementation for 427 427 * guest -> host support. */ 428 VBoxDnDDropTarget * pDropTarget;428 VBoxDnDDropTarget *m_pDropTarget; 429 429 # endif /* VBOX_WITH_DRAG_AND_DROP_GH */ 430 430 #else /* !RT_OS_WINDOWS */ … … 433 433 434 434 /** The window's own DnD context. */ 435 VBGLR3GUESTDNDCMDCTX m DnDCtx;435 VBGLR3GUESTDNDCMDCTX m_cmdCtx; 436 436 /** The current operation mode. */ 437 Mode m Mode;437 Mode m_enmMode; 438 438 /** The current state. */ 439 State m State;439 State m_enmState; 440 440 /** Format being requested. */ 441 RTCString m FormatRequested;441 RTCString m_strFmtReq; 442 442 }; 443 443
Note:
See TracChangeset
for help on using the changeset viewer.