Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
4.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: dragopt.h
  7. //
  8. // Contents: Intercomponent definitions to support the Drag/Drop optimization
  9. //
  10. // Functions:
  11. //
  12. // History: dd-mmm-yy Author Comment
  13. // 08-Nov-94 alexgo added PrivDragDrop
  14. // 30-Sep-94 ricksa Created
  15. //
  16. // Notes:
  17. //
  18. //--------------------------------------------------------------------------
  19. #ifndef _DRAGOPT_H
  20. //+-------------------------------------------------------------------------
  21. //
  22. // Function: UnmarshalDragDataObject
  23. //
  24. // Synopsis: Handles unmarshaling of a marshaled data object
  25. //
  26. // Arguments: [pvMarshaledDataObject] - the marshaled buffer
  27. //
  28. // Returns: NULL - could not unmarshal
  29. // ~NULL - remote IDataObject
  30. //
  31. // Algorithms: see com\rot\getif.cxx
  32. //
  33. // History: dd-mmm-yy Author Comment
  34. // 30-Sep-94 Ricksa Created
  35. //
  36. //--------------------------------------------------------------------------
  37. IDataObject *UnmarshalDragDataObject(void *pvMarshaledDataObject);
  38. //+-------------------------------------------------------------------------
  39. //
  40. // Function: CreateDragDataObject
  41. //
  42. // Synopsis: Handles unmarshaling of a marshaled data object
  43. //
  44. // Arguments: [pvMarshaledDataObject] - the marshaled buffer for data object
  45. // [dwSmId] - id of shared memory for formats.
  46. // [ppIDataObject] - where to put Drag data object
  47. //
  48. // Returns: NOERROR - created a data object
  49. // E_OUTOFMEMORY - could not allocate the Drag data object
  50. //
  51. // Algorithms: see ole232\drag\ido.cpp
  52. //
  53. // History: dd-mmm-yy Author Comment
  54. // 30-Sep-94 Ricksa Created
  55. //
  56. //--------------------------------------------------------------------------
  57. HRESULT CreateDragDataObject(
  58. void *pvMarshaledDataObject,
  59. DWORD dwSmId,
  60. IDataObject **ppIDataObject);
  61. typedef void * DDInfo;
  62. //+-------------------------------------------------------------------------
  63. //
  64. // Function: FreeDragDropInfo
  65. //
  66. // Synopsis: frees a DDInfo handle (aka as a SPrivDragDrop struct)
  67. //
  68. // Effects:
  69. //
  70. // Arguments: [hDDInfo] -- handle to free
  71. //
  72. // Requires:
  73. //
  74. // Returns: void
  75. //
  76. // Signals:
  77. //
  78. // Modifies:
  79. //
  80. // Algorithm:
  81. //
  82. // History: dd-mmm-yy Author Comment
  83. // 07-Jan-95 alexgo author
  84. //
  85. // Notes:
  86. //
  87. //--------------------------------------------------------------------------
  88. void FreeDragDropInfo( DDInfo hDDInfo );
  89. //
  90. // Drag Drop interpreter op codes
  91. //
  92. typedef enum tagDRAGOP
  93. {
  94. DRAGOP_ENTER = 1,
  95. DRAGOP_OVER = 2,
  96. DRAGOP_LEAVE = 3,
  97. DRAGOP_DROP = 4
  98. } DRAGOP;
  99. //+-------------------------------------------------------------------------
  100. //
  101. // Function: PrivDragDrop
  102. //
  103. // Synopsis: Main entry point for the private version of the OLE
  104. // protocol. Instead of using IDropTarget proxy/stubs,
  105. // we use a private rpc and do most of the work on the
  106. // drop target side.
  107. //
  108. // Effects:
  109. //
  110. // Arguments: [hwnd] -- the target hwnd
  111. // [dop] -- the drag drop operation to perform
  112. // [DOBuffer] -- the data object buffer to send
  113. // [pIDataObject] -- the data object interface (for the
  114. // local case)
  115. // [grfKeyState] -- the keyboard state
  116. // [ptl] -- the mouse position
  117. // [pdwEffect] -- the drag drop effect
  118. // [hwndSource] -- the window of the drag source. Used
  119. // to attach input queues for 16bit targets
  120. // [phDDInfo] -- pointer to a DragDropInfo handle, for
  121. // caching rpc info about the drop target.
  122. // May not be NULL, but on DragEnter,
  123. // should be a pointer to NULL.
  124. //
  125. // Requires:
  126. //
  127. // Returns: HRESULT
  128. //
  129. // Signals:
  130. //
  131. // Modifies:
  132. //
  133. // Algorithm: see getif.cxx
  134. //
  135. // History: dd-mmm-yy Author Comment
  136. // 30-Sep-94 Ricksa Created
  137. // 08-Nov-94 alexgo modified to use DRAGOP's
  138. // 08-Jan-95 alexgo added caching of RPC binding handles via
  139. // DDInfo handles
  140. // Notes:
  141. //
  142. //--------------------------------------------------------------------------
  143. HRESULT PrivDragDrop( HWND hwnd, DRAGOP dop, IFBuffer DOBuffer, IDataObject *
  144. pIDataObject, DWORD grfKeyState, POINTL ptl, DWORD *pdwEffect,
  145. HWND hwndSource, DDInfo *phDDInfo);
  146. #endif // _DRAGOPT_H