home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / odtlktv4.zip / ODTLKT / TOOLKIT / IDL / ODTYPESB.IDL < prev    next >
Text File  |  1995-12-13  |  11KB  |  323 lines

  1. /********************************************************************/
  2. /*  Licensed Materials - Property of IBM                            */
  3. /*                                                                  */
  4. /*                                                                  */
  5. /* Copyright (C) International Business Machines Corp., 1994.       */
  6. /* Copyright (C) Apple Computer, Inc., 1994                         */
  7. /*                                                                  */
  8. /*  US Government Users Restricted Rights -                         */
  9. /*  Use, duplication, or disclosure restricted                      */
  10. /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  11. /*                                                                  */
  12. /*                                                                  */
  13. /********************************************************************/
  14.  
  15. #ifndef _ODTYPESB_
  16. #define _ODTYPESB_
  17.  
  18. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPESB)
  19. #pragma somemittypes on
  20. #endif
  21.  
  22. const long kODNULL = 0;
  23.  
  24. //==============================================================================
  25. // Constants
  26. //==============================================================================
  27. // for Undo protocol
  28. enum ODDoneState
  29. {
  30.   kODDone,
  31.   kODUndone,
  32.   kODRedone
  33. };
  34.  
  35. //==============================================================================
  36. // Scalar Types
  37. //==============================================================================
  38.  
  39. // Common OD Types
  40.  
  41. typedef boolean        ODBoolean;    // boolean value. Do not count on its size.
  42. typedef octet          ODUByte;    // unsigned >= 8-bit value
  43. typedef char           ODSByte;    // signed >= 8-bit value
  44. typedef unsigned short ODUShort;    // unsigned >= 16-bit value
  45. typedef short          ODSShort;    // signed >= 16-bit value
  46. typedef unsigned long  ODULong;    // unsigned >= 32-bit value
  47. typedef long           ODSLong;    // signed >= 32-bit value
  48. typedef float          ODFloat;    // floating-point value
  49.  
  50. typedef void*          ODPtr;      // OD pointer
  51.  
  52. typedef string  ODISOStr;      // 7 bit ascii. No embedded NULLs. NULL
  53.                     //  terminated.
  54.  
  55. typedef ODISOStr  ODType;      // Used for storage types, focus types,
  56.                     //  data types, etc.
  57.  
  58. typedef ODULong   ODTypeToken;    // Tokenized form of ODType
  59.  
  60. typedef ODULong  ODID;        // Storage Unit IDs
  61.  
  62. typedef ODULong  ODPersistentObjectID;  // Persistent Object ID used for scripting
  63.  
  64. typedef ODType    ODValueType;    // Used to identify the type of the value, e.g., TEXT, PICT and so
  65.                     //  on. Obviously, the type doesn't need to be an OSType.
  66.  
  67. typedef ODSLong  ODError;      // >= 32-bit exception code
  68.  
  69. typedef ODULong  ODToken;      // >= 32-bit unsigned value for tokens
  70.  
  71. typedef ODULong  ODSize;      // >= 32-bit unsigned value for size
  72.  
  73. typedef ODULong   ODInfoType;    // The type for the part info stored in a frame
  74.  
  75. typedef ODULong  ODFlags;      // >= 32-bit unsigned value for flags
  76.  
  77. typedef sequence<octet> ODByteArray;  // ODByteArray should be used for foreign types larger than 4 bytes
  78.                     // and for variable length data in general
  79.  
  80.  
  81. typedef ODByteArray ODContainerID;
  82. typedef ODISOStr ODContainerType;
  83.  
  84. typedef ODType   ODObjectType;
  85. const ODObjectType kODPartObject = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ObjectType:Part";
  86. const ODObjectType kODFrameObject = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ObjectType:Frame";
  87. const ODObjectType kODNonPersistentFrameObject = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ObjectType:NonPersistentFrame";
  88.  
  89. typedef ODType   ODFocusType;      // This is a string, which can be tokenized
  90.  
  91. typedef ODByteArray    ODActionData;      // Action data for undo/redo
  92.  
  93. const ODID kODNULLID = 0;
  94.  
  95. enum ODFramePosition
  96. {
  97.   kODFrameBehind,
  98.   kODFrameInFront
  99. };
  100.  
  101. enum ODTraversalType
  102. {
  103.   kODTopDown,
  104.   kODBottomUp,
  105.   kODChildrenOnly
  106. };
  107.  
  108. enum ODSiblingOrder
  109. {
  110.   kODFrontToBack,
  111.   kODBackToFront
  112. };
  113.  
  114. enum ODNSTypeSpec
  115. {
  116.   kODNSDataTypeODObject,
  117.   kODNSDataTypeODValue
  118. };
  119.  
  120. enum ODRespectMarksChoices
  121. {
  122.   kODDontRespectMarks,
  123.   kODRespectMarks
  124. };
  125.  
  126. enum ODActionType
  127. {
  128.   kODSingleAction,
  129.   kODBeginAction,
  130.   kODEndAction
  131. };
  132.  
  133. //==============================================================================
  134. // Imaging Types
  135. //==============================================================================
  136.  
  137. typedef ODSLong     ODFixed;    // 16.16 fixed-point value
  138. typedef ODSLong    ODFract;    //  2.30 fixed-point value
  139.  
  140. struct ODMatrix       // Transform matrix for translation, scaling,
  141. {             // skewing, rotation or any combination.
  142.   ODFixed m[3][3];    // Same as "mapping" in QuickDraw GX.
  143. };
  144.  
  145. typedef ODSShort     ODGraphicsSystem;    // Type of graphics system
  146. const ODGraphicsSystem kODNoGraphicsSystem = 0;
  147.   /* Graphics systems are of course platform dependent, but their numeric IDs
  148.      should be globally registered to avoid overlaps; otherwise confusion may
  149.      occur when documents are moved between platforms, or objects on different
  150.      platforms attempt to communicate via DSOM. */
  151.  
  152. typedef ODSShort ODTransformType;
  153.  
  154. const ODTransformType kODIdentityXform     = 0;  // Identity (no-op) transform
  155. const ODTransformType kODTranslateXform     = 1;  // Pure translation/offset
  156. const ODTransformType kODScaleXform        = 2;  // Pure scale, no offset
  157. const ODTransformType kODScaleTranslateXform = 3;  // Scale and offset
  158. const ODTransformType kODLinearXform     = 4;  // Scale/rotate/skew, but no offset
  159. const ODTransformType kODLinearTranslateXform= 5;  // Linear as above, but with offset
  160. const ODTransformType kODPerspectiveXform   = 6;  // Perspective: m[0][2]!=0 or m[1][2]!=0
  161.  
  162. const ODTransformType kODUnknownXform     =-1;  // Type not known yet [internal use only]
  163. const ODTransformType kODInvalidXform     = 7;  // Bad matrix [internal use only]
  164.  
  165. // tokens, viewTypes and presentations
  166.  
  167. const ODTypeToken kODNullTypeToken        = 0;
  168.  
  169. const ODType kODViewAsSmallIcon    = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:SmallIcon";
  170. const ODType kODViewAsLargeIcon    = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:LargeIcon";
  171. const ODType kODViewAsThumbnail    = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:Thumbnail";
  172. const ODType kODViewAsFrame      = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:Frame";
  173.  
  174. const ODType kODPresDefault      = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:Presentation:Default";
  175.  
  176. enum ODGeometryMode {
  177.   kODLoseGeometry,      // Toss out geometric info to save time or space.
  178.   kODPreserveGeometry,    // Preserve geometric info as long as possible
  179.   kODNeedsGeometry      // Must keep geometric info.
  180. };
  181.  
  182. enum ODLinkStatus
  183. {
  184.   kODInLinkDestination,
  185.   kODInLinkSource,
  186.   kODNotInLink
  187. };
  188.  
  189. enum ODHighlight{
  190.   kODNoHighlight,
  191.   kODFullHighlight,
  192.   kODDimHighlight
  193. };
  194.  
  195. enum  ODDropResult
  196. {
  197.   kODDropFail,
  198.   kODDropCopy,
  199.   kODDropMove,
  200.   kODDropUnfinished,   // Used only when DragAndDrop::StartDrag returns immediately.
  201.   kODDropLink
  202. };
  203.  
  204. const ODULong kODDragIsInSourceFrame  = 0x00000001;
  205. const ODULong kODDragIsInSourcePart    = 0x00000002;
  206.  
  207. const ODULong kODDropIsInSourceFrame  = kODDragIsInSourceFrame;
  208. const ODULong kODDropIsInSourcePart    = kODDragIsInSourcePart;
  209. const ODULong kODDropIsMove        = 0x00000004;
  210. const ODULong kODDropIsCopy        = 0x00000008;
  211. const ODULong kODDropIsPasteAs      = 0x00000010;
  212. const ODULong kODDropIsLink        = 0x00000020;
  213.  
  214. typedef ODULong  ODLinkKey;
  215.  
  216. const ODULong kODNoWait = 0;  // For the wait parameter to Lock()
  217.  
  218. enum ODTranslateResult {
  219.   kODCannotTranslate,
  220.   kODCanTranslate
  221. };
  222.  
  223. typedef ODULong ODPlatformTypeSpace; // [120604]
  224.  
  225. const ODULong kODPosUndefined = 0xFFFFFFFF;
  226. const ODULong kODPosSame = 0x00;
  227. const ODULong kODPosAll = 1;
  228. const ODULong kODPosFirstSib = 2;
  229. const ODULong kODPosLastSib = 3;
  230. const ODULong kODPosNextSib = 4;
  231. const ODULong kODPosPrevSib = 5;
  232. const ODULong kODPosFirstBelow = 6;
  233. const ODULong kODPosLastBelow = 7;
  234. const ODULong kODPosFirstAbove = 8;
  235. const ODULong kODPosLastAbove = 9;
  236. const ODULong kODPosReserved11 = 10;
  237. const ODULong kODPosReserved12 = 11;
  238. const ODULong kODPosReserved13 = 12;
  239. const ODULong kODPosReserved14 = 13;
  240. const ODULong kODPosReserved15 = 14;
  241. const ODULong kODPosMWrap = 0x10;
  242. const ODULong kODPosTop = 0x20;
  243.  
  244. const ODID  kODIDAll  = 0;
  245. const ODID  kODIndexAll  = 0;
  246. const ODID  kODIDWild  = 0;
  247. const ODValueType  kODTypeAll = kODNULL;
  248.  
  249. typedef void*  ODValue;
  250. typedef ODID  ODValueIndex;
  251. typedef ODID  ODStorageUnitID;
  252.  
  253. const  ODULong kODStorageUnitRefSize = 4;
  254. typedef ODUByte ODStorageUnitRef[kODStorageUnitRefSize];
  255.  
  256. typedef ODULong ODStorageUnitKey;
  257. const ODStorageUnitKey  kODNULLKey = 0;
  258.  
  259. typedef ODISOStr  ODPropertyName;
  260. typedef ODISOStr  ODStorageUnitName;
  261. typedef ODULong ODPositionCode;
  262.  
  263. typedef  ODID    ODDocumentID;
  264.  
  265. const ODDocumentID  kODDefaultDocument = 1;
  266.  
  267. enum ODPurgePriority {
  268.   kODInvisibleBlocks,
  269.   kODAllBlocks,
  270.   kODVisibleBlocks
  271. };
  272.  
  273. enum ODCloneKind {
  274.   kODCloneCopy,
  275.   kODCloneCut,
  276.   kODClonePaste,
  277.   kODCloneDropCopy,
  278.   kODCloneDropMove,
  279.   kODCloneToLink,
  280. #ifndef _PLATFORM_OS2_
  281.   kODCloneFromLink
  282. #else // _PLATFORM_OS2_
  283.   kODCloneFromLink,
  284.   kODCloneAll
  285. #endif
  286. };
  287.  
  288. enum ODDraftPermissions {
  289.   kODDPNone,
  290.   kODDPTransient,
  291.   kODDPReadOnly,
  292.   kODDPSharedWrite,
  293.   kODDPExclusiveWrite
  294. };
  295.  
  296. typedef  ODID  ODDraftID;
  297. #ifdef _PLATFORM_OS2_
  298. typedef  ODID  ODLinkID;
  299. #endif
  300. typedef  ODISOStr  ODDraftName;
  301.  
  302. const ODContainerType kODDefaultFileContainer   = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ContainerType:File";
  303. const ODContainerType kODDefaultMemoryContainer = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ContainerType:Memory";
  304.  
  305. const ODContainerType kODBentoFileContainer   = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:Bento Container Suite:ContainerType:File";
  306. const ODContainerType kODBentoMemoryContainer   = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:Bento Container Suite:ContainerType:Memory";
  307.  
  308. exception ODException {
  309.   ODError  error;
  310.   char  message[256];    // $$$$$ Do we really need this field???
  311. };
  312.  
  313. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
  314. #pragma somemittypes off
  315. #endif
  316.  
  317. module OpenDoc_Global_TypesB
  318. {
  319.   const string OpenDoc_Types_Version = "1.0.";
  320. };
  321.  
  322. #endif // _ODTYPESB_
  323.