home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / Clipbd.idl < prev    next >
Text File  |  1997-03-21  |  12KB  |  366 lines

  1. /* @(#)Z 1.20 com/src/storage/idl/Clipbd.idl, oddataxfer, od96os2, odos29712d 97/03/21 17:20:07 (96/10/29 09:32:09) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: oddataxfer
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27,94
  10. //#
  11. //#
  12. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //#   All Rights Reserved
  14. //#   Licensed Materials - Property of IBM
  15. //#   US Government Users Restricted Rights - Use, duplication or
  16. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //#       
  18. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //#   OR PERFORMANCE OF THIS SOFTWARE.
  25. //#
  26. //#====END_GENERATED_PROLOG========================================
  27. //#
  28.  
  29. #ifdef __PRIVATE__
  30. //#
  31. //#    File:        Clipbd.idl
  32. //#
  33. //#    Contains:    Interface of ODClipboard class
  34. //#
  35. //#    Owned by:    Craig Carper
  36. //#
  37. //#    Copyright:    (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  38. //#
  39. //#    Change History (most recent first):
  40. //#
  41. //#        <14>     8/31/95    DM        1273863, 1275336: add DraftSaved()
  42. //#        <13>     8/25/95    CC        1264154: Added ActionDone, ActionUndone,
  43. //#                                    and ActionRedone methods.
  44. //#        <12>     8/15/95    CC        1275241: IDL review.
  45. //#        <11>      8/3/95    RR         #1257260: Collapse B classes. Remove
  46. //#                                    somInit methods. Don't call IsInitialized
  47. //#                                    or SubclassResponsibility
  48. //#        <10>     5/25/95    VL        1251403: Multithreading naming support.
  49. //#         <9>     5/16/95    CC        1244991: Added private fExportedLinkSpec
  50. //#                                    field.
  51. //#         <8>     3/22/95    CC        1230322: Changed parameter to
  52. //#                                    ShowPasteAsDialog().
  53. //#         <7>     3/10/95    CC        1225050: Override DraftClosing; added
  54. //#                                    fOriginalDraft field.
  55. //#         <6>      9/9/94    jpa        Renamed "result" param to avoid d14 emitter
  56. //#                                    bug.
  57. //#         <5>      8/3/94    CC        Removed ODClipboardKey parameter from
  58. //#                                    methods; eliminated fLockCount data member.
  59. //#                                    (1160484)
  60. //#         <4>      8/2/94    CC        #1178169 - ShowPasteAsDialog() takes
  61. //#                                    ODFacet* instead of ODFrame*.
  62. //#         <3>     7/12/94    CC        Removed kODNoWait (now in ODTypesB.idl).
  63. //#         <2>     6/21/94    CC        Added functionprefix.
  64. //#         <1>      6/8/94    VL        first checked in
  65. //#
  66. //#    To Do:
  67. //#
  68. #else
  69. //#    Copyright:    (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  70. #endif
  71.  
  72. #ifndef _CLIPBD_
  73. #define _CLIPBD_
  74.  
  75. #ifndef _ODOBJECT_
  76. #include "ODObject.idl"
  77. #endif
  78.  
  79. //=====================================================================================
  80. // Classes defined in this interface
  81. //=====================================================================================
  82. interface  ODClipboard;
  83.  
  84. //=====================================================================================
  85. // Classes used by this interface
  86. //=====================================================================================
  87. interface  ODStorageUnit;
  88. interface  ODDraft;
  89. interface  ODPlatformTypeList;
  90. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  91. interface  ODFacet;
  92. interface  ODTypeList;
  93. #endif //# _PLATFORM_MACINTOSH_ or OS/2 or WIN32
  94. #ifdef __PRIVATE__
  95. interface  ODSession;
  96. interface  ODDocument;
  97. interface  ODContainer;
  98. #endif //# __PRIVATE__
  99. #ifdef _PLATFORM_OS2_
  100. interface  ODTypeList;
  101. interface  ODPart;
  102. interface OrderedCollection;
  103. #endif
  104.  
  105. //=====================================================================================
  106. // Implementation Types
  107. //=====================================================================================
  108. #define PROMISEKEEPER
  109. #ifdef _PLATFORM_WIN32_
  110. #ifdef PROMISEKEEPER
  111. typedef somToken OLEPromiseKeeper;
  112. #endif
  113. typedef somToken DWORD;
  114. //typedef somToken HWND;
  115. typedef somToken LPVOID;
  116. typedef somToken POINTL;
  117. typedef somToken Handle;
  118. typedef somToken ODOLEManager;
  119. #endif //# _PLATFORM_WIN32_
  120. #ifdef _PLATFORM_OS2_
  121. #ifdef __PRIVATE__
  122. typedef somToken HAB;
  123. #endif
  124. #endif
  125.  
  126. //=====================================================================================
  127. // ODClipboard
  128. //=====================================================================================
  129.  
  130.  
  131. interface ODClipboard :  ODObject
  132. {
  133.     ODUpdateID GetUpdateID();
  134.                           
  135.     void Clear();
  136.     
  137.     ODStorageUnit GetContentStorageUnit();
  138.  
  139.     ODUpdateID ActionDone(in ODCloneKind cloneKind);
  140.  
  141.     void ActionUndone(in ODUpdateID update, in ODCloneKind originalCloneKind);
  142.  
  143.     void ActionRedone(in ODUpdateID update, in ODCloneKind originalCloneKind);
  144.  
  145.     void SetPlatformClipboard(in ODPlatformTypeList typeList);
  146.     
  147.     void ExportClipboard();
  148.  
  149.     void DraftSaved(in ODDraft draft);
  150.  
  151.     void DraftClosing(in ODDraft draft);
  152. #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  153.     ODBoolean CanEmbed();
  154. #endif
  155.  
  156. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  157.  
  158.     ODBoolean ShowPasteAsDialog(
  159.                     in        ODBoolean                canPasteLink,
  160.                     in        ODPasteAsMergeSetting    mergeSetting,
  161.                     in        ODFacet                    facet,
  162.                     in        ODTypeToken                viewType,
  163.                     out        ODPasteAsResult            theResult);
  164.  
  165. #endif //# _PLATFORM_MACINTOSH_  or _PLATFORM_WIN32_ or _PLATFORM_OS2_
  166.  
  167. #ifdef _PLATFORM_OS2_
  168.         ODBoolean RegisterClipboardFormat(in ODType odType,
  169.                                     in ODPlatformType odPlatformType,
  170.                                     in ODULong formatInfo );
  171.  
  172.         ODBoolean DeregisterClipboardFormat(in ODType odType );
  173.         ODBoolean CanEmbed();                         // [140007]
  174.         ODBoolean CanIncorporate(in ODType kind);     // [140007]
  175. #endif
  176. #ifdef __PRIVATE__
  177.     void InitClipboard(in ODSession session);
  178.     
  179.     //# Private to implementation
  180.  
  181.     void NewClipboard();
  182.     
  183.     void DiscardClipboard();
  184.     
  185. #ifdef _PLATFORM_WIN32_
  186.     void ImportContent(in void *pDataObject);
  187. #endif    
  188. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  189.     void ImportContent();
  190.  
  191.         void PutContentOnPlatformClipboard();
  192.  
  193.     void ExportPlatformTypes(in ODPlatformTypeList typeList);
  194. #endif // mac or os/2 or AIX 
  195.  
  196.     
  197. #ifdef _PLATFORM_WIN32_
  198.     void ExportPlatformTypes(in ODPlatformTypeList typeList, in ODBoolean bExportClipboard);
  199.  
  200.     void PutClipboardOnPlatformClipboard(in void *pDataObject);
  201.     
  202.     ODBoolean ImportClipboard(in void *pDataObject);
  203. #endif    
  204. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  205.     void PutClipboardOnPlatformClipboard();
  206.     
  207.     ODBoolean ImportClipboard();
  208. #endif // mac or os/2 or AIX
  209.     
  210. #ifdef _PLATFORM_OS2_
  211.   ODBoolean DispatchHandler(in ODEventData evt);
  212.  
  213.   void QueryContent(in ODTypeList typeList); // [140007]
  214.  
  215.   void ResolvePMPromises(); // [146749]
  216. #endif // _PLATFORM_OS2_
  217.  
  218. #ifdef _PLATFORM_WIN32_
  219.  
  220.     ODBoolean PlatformClipboardHasType( in void *pDataObject , in ODPlatformType type);
  221.  
  222.     void ClipboardChanged();
  223.  
  224.     void QueryContent(in ODTypeList typeList);
  225.  
  226. #endif //# _PLATFORM_WIN32_
  227.  
  228. #ifdef _PLATFORM_AIX_
  229.     void QueryContent(in ODTypeList typeList);
  230. #endif // _PLATFORM_AIX_
  231.  
  232. #endif //# __PRIVATE__
  233.  
  234. #ifdef __SOMIDL__
  235. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  236.     implementation
  237.     {
  238.         majorversion = 1; minorversion = 0;
  239.             
  240.         functionprefix = ODClipboard;
  241.  
  242.         override:
  243.             somUninit,
  244.             Purge;
  245.  
  246.         releaseorder:
  247.             GetUpdateID,
  248.             Clear,
  249.             GetContentStorageUnit,
  250.             ActionDone,
  251.             ActionUndone,         
  252.             ActionRedone,
  253.             SetPlatformClipboard,
  254.             ExportClipboard,
  255.             DraftSaved,
  256.             DraftClosing,
  257.             ShowPasteAsDialog,
  258.                 #ifdef _PLATFORM_WIN32_
  259.                         PlatformClipboardHasType,
  260.                         ClipboardChanged,
  261.             CanEmbed,
  262.                         ReservedA,
  263.                         ReservedB,
  264.                 #endif // _PLATFORM_WIN32_
  265.                 #ifdef _PLATFORM_OS2_
  266.                         RegisterClipboardFormat,
  267.                         DeregisterClipboardFormat,
  268.                         CanEmbed,
  269.                         CanIncorporate,
  270.                         PutContentOnPlatformClipboard,
  271.                 #endif // _PLATFORM_OS2_
  272.                 #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_AIX_)
  273.                         PutContentOnPlatformClipboard,
  274.                         CanEmbed,
  275.                         ReservedA,
  276.                         ReservedB,
  277.                         ReservedC,
  278.                 #endif // MAC or AIX
  279.         #ifdef __PRIVATE__
  280.             #ifdef _PLATFORM_WIN32_
  281.             QueryContent,
  282.                         reserved1,
  283.                         reserved2,
  284.             #endif // _PLATFORM_WIN32_
  285.                     #ifdef _PLATFORM_OS2_
  286.                         DispatchHandler,
  287.                         QueryContent,
  288.                         ResolvePMPromises,
  289.                     #endif // _PLATFORM_OS2_
  290.                     #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_AIX_)
  291.             QueryContent,
  292.                         reserved1,
  293.                         reserved2,
  294.                     #endif // _PLATFORM_OS2_
  295.             InitClipboard,
  296.             NewClipboard,
  297.             DiscardClipboard,
  298.             ImportContent,
  299.             ExportPlatformTypes,
  300.             PutClipboardOnPlatformClipboard,
  301.             ImportClipboard;
  302.         #else
  303.             reserved1,
  304.             reserved2,
  305.             reserved3,
  306.             reserved4,
  307.             reserved5,
  308.             reserved6,
  309.             reserved7,
  310.             reserved8,
  311.             reserved9,
  312.             reserved10;
  313.                 #endif //# __PRIVATE__
  314.         
  315.         #ifdef __PRIVATE__
  316.            #ifdef PROMISEKEEPER
  317.             passthru C_xh = ""
  318.                                                         "#ifdef _PLATFORM_WIN32_"
  319.                             "#ifndef _SOM_OLEPromiseKeeper_xh"
  320.                             "#include <oledpkpr.xh>"
  321.                             "#endif"
  322.                             "#ifndef _OLEMGRW_"
  323.                             "#include <OleMgrW.h>"
  324.                             "#endif"
  325.                             "#endif";
  326.            #endif
  327.             ODSession        fSession;
  328.             ODHandle        fContainerHandle;
  329.             ODContainer        fContainer;
  330.             ODDocument        fDocument;
  331.             ODDraft            fDraft;
  332.             ODStorageUnit    fSU;
  333.             ODDraft            fOriginalDraft;
  334.             ODUpdateID        fUpdateID;
  335.             ODUpdateID        fNextUpdateID;
  336.             ODSShort        fScrapCount;
  337.             ODSShort        fScrapCountLastChange;
  338.             ODBoolean        fExportedLinkSpec;
  339.             ODCloneKind        fOriginalCloneKind;
  340.             ODUShort        fClonePasteCount;
  341.                 #ifdef _PLATFORM_WIN32_
  342.             ODBoolean        fbClear;    /* Clear was the last operation */
  343.             void            *fpIDataObjectLast;
  344.                         ODUpdateID              fUpdateIDAtLastPlatformClipboardSet;
  345.         #ifdef PROMISEKEEPER
  346.             OLEPromiseKeeper    *fPromiseKeeper;    
  347.         #endif
  348.             HWND            fhwndClipboardMonitor;
  349.             ODOLEManager            *fOleManager;
  350.                 #endif //# _PLATFORM_WIN32_
  351.                 #ifdef _PLATFORM_OS2_
  352.                         ODPart     fClipboardOwner;
  353.                         HAB        fHab;
  354.                         OrderedCollection fTypeCollection;
  355.                         ODUpdateID    fLastImportUpdateID;
  356.                         ODBoolean     fArePromises;
  357.                 #endif
  358.     #endif //# __PRIVATE__
  359.  
  360.   };
  361. #endif //# _PLATFORM_MACINTOSH_ or WIN32 or OS2
  362. #endif //# __SOMIDL__
  363. };
  364.  
  365. #endif // _CLIPBD_
  366.