ipstdrop.idl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. // ipstdrop.idl : IDL source for the post-drop (drop with right button mouse) API
  13. //
  14. //
  15. import "oaidl.idl";
  16. import "ocidl.idl";
  17. [
  18. object,
  19. #if !defined(_WIN64) && !defined (_AC64)
  20. uuid(17FFF82D-2C82-11d2-BA24-0060B0B5E151),
  21. #else
  22. uuid(21E36561-85E4-40C2-81DD-EC5DECA63A5D),
  23. #endif
  24. helpstring("IAcPostDrop Interface"),
  25. pointer_default(unique)
  26. ]
  27. // The purpose of this interface is to allow a component to handle right drag and drop
  28. // in the most flexible way.
  29. // A component may or may not want to handle the drop. Its reply to QueryDoDrop() indicates
  30. // that the default processing will occur, or that the component will handle the drop.
  31. // If the component wants to handle the drop, the interface allows two situations. The first one
  32. // is that the component wants an immediate action for the drop. Then it will run the drop code from
  33. // the PreparePostDrop() method, and will return a value indicating that the drop is done. The second situation
  34. // is that the component wants to present a menu for the user to choose an action. PreparePostDrop() will then
  35. // return a value indicating the drop is not done yet. In this situation, QueryContextMenu() will be called,
  36. // allowing the component to supply a menu. The user selection will be giving to the component by the component
  37. // by the InvokeCommand() method. Finally, in both situation where PreparePostDrop() has been called,
  38. // EndPostDrop() is called to let the component performing some cleanup if necessary.
  39. interface IAcPostDrop : IUnknown
  40. {
  41. // called to ask the component if it wants to handle the drop by its own. or let
  42. // the default processing happen
  43. [helpstring ("method QueryDoDrop")]
  44. HRESULT QueryDoDrop (
  45. [out, retval] boolean *pbHandleDrop // true if the component handle the drop
  46. );
  47. // called to prepare the drop.
  48. [helpstring ("method PreparePostDrop")]
  49. HRESULT PreparePostDrop (
  50. [out, retval] boolean *pbContinue // tells if QueryContextMenu will be called or not
  51. );
  52. // called to get from the component a popup menu
  53. [helpstring ("method QueryContextMenu")]
  54. HRESULT QueryContextMenu (
  55. [out] INT_PTR *phMenu // handle of popup menu returned by the component
  56. );
  57. // called when the user selected a command a the popup menu
  58. [helpstring ("method InvokeCommand")]
  59. HRESULT InvokeCommand (
  60. [in] int nMenuItemID, // menu ID
  61. [out, retval] boolean *pbCancelled // if set to true the ongoing drop is finally canceled by the component
  62. );
  63. // called to allow cleanup
  64. [helpstring ("method EndPostDrop")]
  65. HRESULT EndPostDrop ();
  66. }