home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / ODTypesM.idl < prev    next >
Text File  |  1997-04-02  |  15KB  |  560 lines

  1. /* @(#)Z 1.42 com/src/include/idl/ODTypesM.idl, odcore, od96os2, odos29712d 97/03/21 17:18:31 (97/02/13 13:40:14) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odcore
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27
  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. //#     Copyright:      (r) 1993-1995 by Apple Computer, Inc., all rights reserved.
  30.  
  31. #ifndef _ODTYPESM_
  32. #define _ODTYPESM_
  33.  
  34.  
  35. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_)
  36. #ifndef _PLATFORM_LITTLE_ENDIAN_
  37. #define _PLATFORM_LITTLE_ENDIAN_
  38. #endif
  39. #endif
  40.  
  41. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_AIX_)
  42. #ifndef _PLATFORM_BIG_ENDIAN_
  43. #define _PLATFORM_BIG_ENDIAN_
  44. #endif
  45. #endif
  46.  
  47. // Platform-specific types. Four byte types are defined as unsigned long,
  48. // rather than
  49. // foreign, so that they can be marshalled. They are not emitted however,
  50. // so that the actual type definitions in ODTypesF.h are used, so that type
  51. // casting is not necessary where these types are used.
  52.  
  53. #ifdef _PLATFORM_MACINTOSH_
  54. typedef unsigned long ODPlatformCanvas;
  55. #endif  // _PLATFORM_MACINTOSH_
  56.  
  57. typedef unsigned long ODPlatformPrintJob;
  58. typedef unsigned long ODPlatformShape;            // Graphics-system-dependent shape data
  59. typedef unsigned long ODPlatformTransform;  // Graphics-system-dependent transform data
  60. typedef unsigned long ODRgnHandle;
  61. typedef unsigned long ODgxShape;
  62. typedef unsigned long ODPlatformWindow;
  63.  
  64. #ifdef _PLATFORM_UNIX_
  65. typedef void * ODPlatformMenu;
  66. #else
  67. typedef unsigned long ODPlatformMenu;
  68. #endif // PLATFORM_UNIX
  69.  
  70. typedef unsigned long ODPlatformMenuBar;
  71. typedef unsigned long ODOSType;
  72. typedef unsigned long ODPlatformType;           // Host platform file & data type
  73. typedef unsigned long ODHandle;
  74. typedef unsigned long ODPlatformDragReference;
  75.  
  76. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  77. typedef unsigned long HACCEL;
  78. typedef HACCEL  ODPlatformAccelTable;
  79.  
  80. struct ACCEL{
  81.    unsigned short fs;
  82.    unsigned short key;
  83.    unsigned short cmd;
  84. };
  85.  
  86. #define ACCELMAX 20
  87. struct ODACCEL{
  88.    ACCEL aAccel[ACCELMAX];
  89. };
  90.  
  91. struct ODACCELTABLE{
  92.    unsigned short cAccel;
  93.    unsigned short codepage;
  94.    ACCEL    aaccel[1];
  95. };
  96.  
  97. #endif // PLATFORM_OS2 || PLATFORM_WIN32 || PLATFORM_AIX
  98.  
  99.  
  100. #ifdef _PLATFORM_MACINTOSH_
  101. struct Point {          // This is a QuickDraw "Point" structure.
  102.         short v;                        // It's 32 bits, but still a struct, and for things to work
  103.         short h;                        // at runtime, SOM has to _know_ that it's really a struct.
  104. };                                              // ("Don't fool SOM!" --Erik Eidt)               --jpa
  105.  
  106. struct Rect {           // This is a QuickDraw "Rect" structure.
  107.         short top;
  108.         short left;
  109.         short bottom;
  110.         short right;
  111. };
  112. #endif  // _PLATFORM_MACINTOSH_
  113.  
  114. #ifdef _PLATFORM_UNIX_
  115.  
  116. typedef struct tagPOINT { // Taken from Xlib.h, more or less -CHB
  117.     short x, y;
  118. } Point;
  119.  
  120. typedef struct tagRECT { // Taken from Xlib.h, more or less -CHB
  121.     short x, y;
  122.     unsigned short width, height;
  123. } Rect;
  124.  
  125. #endif // _PLATFORM_UNIX_
  126.  
  127. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  128. typedef void* HWND;
  129. #endif
  130.  
  131. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_)
  132. //
  133. // Defines needed for idl files in imaging.
  134. //
  135. typedef struct tagPOINT {
  136.         long x;
  137.         long y;
  138. } Point;
  139.  
  140. typedef struct tagRECT {
  141.         long left;
  142.         long top;
  143.         long right;
  144.         long bottom;
  145. } Rect;
  146.  
  147. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_)
  148. typedef void* HDC;
  149.  
  150. typedef struct tagSIZE {
  151.     long cx;
  152.     long cy;
  153. } SIZE;
  154.  
  155. #endif
  156.  
  157. #ifdef _PLATFORM_OS2_
  158. typedef unsigned long HWND;
  159. typedef unsigned long HPS;
  160. typedef unsigned long MRESULT;
  161. typedef unsigned long MPARAM;
  162. typedef unsigned long ULONG;
  163. #endif
  164.  
  165. #endif  // _PLATFORM_NT_ || _PLATFORM_WIN32_ || _PLATFORM_OS2_
  166.  
  167.  
  168. //#struct AEDesc {                      // This is the Apple events structure of the same name.
  169. //#     unsigned long   descriptorType;
  170. //#     unsigned long   dataHandle;
  171. //#};
  172.  
  173.  
  174. typedef unsigned long   DescType;
  175. typedef unsigned long   AEEventClass;
  176. typedef unsigned long   AEEventID;
  177. typedef long                    AESendMode;
  178. typedef short                   AESendPriority;
  179.  
  180. #ifdef  _PLATFORM_MACINTOSH_
  181. struct EventRecord {
  182.         short                                           what;
  183.         long                                            message;
  184.         long                                            when;
  185.         Point                                           where;
  186.         short                                           modifiers;
  187. };
  188. #endif //  _PLATFORM_MACINTOSH_
  189.  
  190. // End of platform types
  191.  
  192. #ifndef _ODTYPESB_
  193. #include "ODTypesB.idl"
  194. #endif
  195.  
  196. #ifndef _GEOTYPES_
  197. #include "GeoTypes.idl"
  198. #endif
  199.  
  200. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
  201. #pragma somemittypes on
  202. #endif
  203.  
  204. //#ifdef _PLATFORM_MACINTOSH_
  205. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_UNIX_)
  206.  
  207. //#=============================================================================
  208. //# Emitted Types, Consts, Enums, etc.
  209. //#=============================================================================
  210.  
  211. //# // Semantic Interface
  212.  
  213. #ifdef _PLATFORM_MACINTOSH_
  214. typedef DescType        ODDescType;
  215.  
  216. //#typedef AEDesc               ODDesc;
  217.  
  218. typedef AESendMode              ODSendMode;
  219. typedef AESendPriority  ODSendPriority;
  220.  
  221. typedef AEEventClass    ODEventClass;
  222. typedef AEEventID               ODEventID;
  223.  
  224. // Types added for OSAObject support
  225.  
  226. typedef ODULong  ODScriptingSubType;
  227. typedef ODULong  ODScriptingConnection;
  228. typedef ODULong  ODOSAID;
  229. #endif
  230.  
  231.  
  232. // OS specific types
  233. //
  234. //  The following typedefs are OS specific. They are put together in this file for the
  235. //  time being. However, they can be put into separate files if desired. For example,
  236. //  all the primitive types will be put in ODPlatformMisc.h;
  237. //  all graphics system types will be put in ODPlatformGraphics.h;
  238. //  all File system types will be put in ODPlatformFiles.h; and so on.
  239. //  The advantage of splitting them in separate files is the changing one type will not
  240. //  require recompiling all the files which includea ODTypes.h. Also, there may be a lot
  241. //  of OS-specific types. If that's the case, we don't want them all in one file.
  242. //
  243.  
  244. // Text
  245.  
  246. typedef long ODITextFormat;
  247.  
  248.  
  249. struct ODIText {
  250.         ODITextFormat   format;
  251.         ODByteArray             text;
  252. };
  253.  
  254. typedef ODIText ODName;
  255. typedef ODName  ODContainerName;
  256. typedef ODName  ODDocumentName;
  257.  
  258. // Imaging
  259.  
  260. typedef ODHandle        ODIconFamily;
  261.  
  262. // Events
  263.  
  264. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_)
  265. typedef ODULong      ODEventType;
  266. #endif // OS2, WIN32
  267. #ifdef _PLATFORM_MACINTOSH_
  268. typedef ODUShort     ODEventType;
  269. #endif // Mac
  270. #ifdef _PLATFORM_UNIX_
  271. typedef ODSLong      ODEventType;
  272. #endif // Unix
  273.  
  274. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_)
  275. typedef struct tagEVENTRECORD {
  276.          void*         hwnd;
  277.          unsigned long message;
  278.          unsigned long wParam;
  279.          unsigned long lParam;
  280.          unsigned long time;
  281.          Point         pt;
  282. } EventRecord;
  283. #endif // _PLATFORM_NT_, _PLATFORM_WIN32_
  284.  
  285. #ifdef _PLATFORM_OS2_
  286. typedef struct tagEVENTRECORD {
  287.   HWND            hwnd;
  288.   ULONG           msg;
  289.   MPARAM          mp1;
  290.   MPARAM          mp2;
  291.   MRESULT         result;
  292. } EventRecord;
  293. #endif // _PLATFORM_OS2_
  294.  
  295. #ifdef _PLATFORM_UNIX_
  296.  
  297. typedef struct tagEVENTRECORD {
  298.     ODEventType      type;
  299.     unsigned long    serial;
  300.     boolean          send_event;
  301.     void*            display;
  302.     ODPlatformWindow window;
  303. } EventRecord;
  304.  
  305. #endif // _PLATFORM_UNIX_
  306.  
  307. typedef EventRecord     ODEventData;
  308.  
  309. interface ODFrame;
  310. interface ODFacet;
  311.  
  312. #if (defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_) || defined(_PLATFORM_NT_))
  313.  
  314. interface ODPlatformCanvas;
  315.  
  316. #endif  // IBM Platforms
  317.  
  318.  
  319. struct ODEventInfo
  320. {
  321.         ODFrame embeddedFrame;
  322.         ODFacet embeddedFacet;
  323.         ODPoint where;
  324. #ifdef _PLATFORM_OS2_
  325.         ODULong flags;
  326. #else
  327.         ODBoolean propagated;
  328. #endif
  329.     ODEventType originalType;
  330. };
  331.  
  332. #ifdef _PLATFORM_OS2_
  333. // opendoc messages
  334. const ODULong OD_PRINT =  0x00000491;
  335. const ODULong OD_HELP =   0x00000492;
  336.  
  337. // Event info flags
  338.  
  339. const ODULong kODPropagated = 1;
  340. const ODULong kODInBorder   = 2;
  341. const ODULong kODInEmbedded = 3;
  342. #endif // _PLATFORM_OS2_
  343.  
  344.  
  345. typedef ODULong                 ODIdleFrequency;
  346.  
  347. #ifdef _PLATFORM_MACINTOSH_
  348. typedef ODULong                 ODTime;
  349. #endif
  350. #if defined(_PLATFORM_NT_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_UNIX_)
  351. typedef ODSLong                 ODTime;
  352.  
  353. // opendoc document shell menu.
  354. const ODSLong HLPM_ODMENU   = 1;
  355. const ODSLong HLPM_ODWINDOW = 2;
  356. #endif
  357.  
  358. // Menus
  359.  
  360. typedef ODSShort    ODMenuID;
  361. typedef ODSShort    ODMenuItemID;
  362. typedef ODSLong    ODCommandID;
  363.  
  364. #ifdef _PLATFORM_WIN32_
  365.  
  366. // structure used to associate ODMenuIDs with menus on Windows NT
  367. typedef void* HMENU;
  368.  
  369. struct ODMenuIDInfo {
  370.     HMENU    hMenu;
  371.     ODMenuID id;
  372.     ODUShort reserved;
  373. };
  374.  
  375. #endif // PLATFORM_WIN32
  376.  
  377. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_)
  378. struct ODPlatformMenuItem {
  379.    short  iPosition;
  380.    unsigned short  afStyle;
  381.    unsigned short  afAttribute;
  382.    unsigned short  id;
  383.    unsigned long  hwndSubMenu;
  384.    unsigned long  hItem;
  385. };
  386. //typedef struct ODPlatformMenuItem ODPlatformMenuItem ;
  387. #endif
  388.  
  389. #ifdef _PLATFORM_UNIX_
  390. struct ODPlatformMenuItem {
  391.    ODMenuItemID id;
  392.    string       text;
  393. };
  394.  
  395. const string ODX11MenuAtomString = "OpenDoc:X11:Menu:Atom:String";
  396.  
  397. struct ODMenuEventData {
  398.         ODEventType      type;
  399.         unsigned long    serial;
  400.         boolean          send_event;
  401.         void*            display;
  402.         ODPlatformWindow window;
  403.         ODMenuID         menu;
  404.         ODMenuItemID     item;
  405.         boolean          toggle_state;
  406. };
  407. #endif // PLATFORM_UNIX
  408.  
  409. // @SESH [142206]     // BRR 2/28/96
  410. //==============================================================================
  411. // Structures defined for OLE menu manipulation
  412. //==============================================================================
  413. struct NewSubMenu{
  414.    ODUShort  Position;
  415.    ODUShort  MenuId;
  416.    char      SubMenuString[40];
  417.    char      hasSubMenu; // A flag used to find if this sub menu has a cascade menu
  418. };
  419.  
  420. struct NewMenu{
  421.    ODUShort  Position;
  422.    ODUShort  MenuId;
  423.    char      MenuString[40];
  424.    short     nSubMenuCount;    // no. of items for this menu item on the menu bar
  425.    NewSubMenu newsubmenu[20];  // structure contains position and sub menu string
  426. };
  427.  
  428. // Name Binding
  429.  
  430. typedef ODISOStr ODEditor;              // An opaque type identifying a specific part editor
  431. typedef ODISOStr ODContainerSuite;  // An opaque type identifying a specific container suite
  432.  
  433. typedef ODULong ODUpdateID;                     // Content update IDs
  434.  
  435. typedef ODULong ODDraftKey;
  436.  
  437. // Drag and Drop
  438.  
  439. typedef ODBoolean ODDragResult;
  440.  
  441. // Link Protocol
  442.  
  443. #ifdef _PLATFORM_OS2_
  444. typedef ODIText ODLinkDescription;
  445.  
  446. struct ODLinkConnectionData {
  447.         ODLinkDescription LinkDesc;
  448.         ODIText DocumentName;
  449.         ODIText HostName;
  450. };
  451.  
  452. // Link Service Dialogs
  453. struct ODMoveCopyResult
  454. {
  455.   char*          fOldDocPathName;
  456.   char*          fNewDocPathName;
  457.   ODBoolean      FileMoved;
  458.   ODBoolean      FileCopied;
  459. };
  460.  
  461. #endif // _PLATFORM_OS2_
  462.  
  463. typedef ODULong ODLinkUpdateResult;
  464.  
  465.  
  466. typedef ODULong ODPasteAsMergeSetting;
  467.  
  468.  
  469. struct ODLinkInfo
  470. {
  471.         ODType                  kind;
  472.         ODTime                  creationTime;
  473.         ODTime                  changeTime;
  474.         ODUpdateID              change;
  475.         ODBoolean               autoUpdate;
  476. };
  477.  
  478.  
  479. // Link Dialogs
  480.  
  481. struct ODPasteAsResult
  482. {
  483.         ODBoolean               pasteLinkSetting;
  484.         ODBoolean               autoUpdateSetting;
  485.         ODBoolean               mergeSetting;
  486.         ODTypeToken             selectedView;
  487.         ODType                  selectedKind;
  488.         ODType                  translateKind;
  489.         ODEditor                editor;
  490. };
  491.  
  492. enum ODLinkInfoAction
  493. {
  494.         kODLinkInfoCancel,      /* = 0 */
  495.         kODLinkInfoOk,
  496.         kODLinkInfoBreakLink,
  497.         kODLinkInfoUpdateNow,
  498.         kODLinkInfoFindSource
  499. };
  500.  
  501. struct ODLinkInfoResult
  502. {
  503.         ODLinkInfoAction        action;
  504.         ODBoolean                       autoUpdate;
  505. };
  506.  
  507. #if defined (_PLATFORM_WIN32_) || defined(_PLATFORM_UNIX_)
  508. const   ODUpdateID      kODUnknownChange = 0;
  509. #endif // _PLATFORM_WIN32_, _PLATFORM_UNIX_
  510.  
  511. //==============================================================================
  512. // Constants
  513. //==============================================================================
  514.  
  515. //==========================================
  516. // Registration types
  517. //==========================================
  518.  
  519. enum OperatingSystem
  520. {
  521.   OS2,
  522.   AIX,
  523.   MAC,
  524.   WINDOWS
  525. };
  526.  
  527. typedef char * ISOString;
  528.  
  529. struct PartKindInfo
  530. {
  531.   ISOString partKindName;
  532.   string    partKindDisplayName;
  533.   string    filenameFilters;
  534.   string    filenameTypes;
  535.   string    categories;
  536.   string    categoryDisplayName;
  537.   string    objectID;
  538. };
  539. //========================================
  540. // Registration types - END
  541. //========================================
  542.  
  543.  
  544.  
  545.  
  546. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
  547. #pragma somemittypes off
  548. #endif
  549.  
  550.  
  551. #endif // _PLATFORM_NT_ || _PLATFORM_WIN32_
  552.  
  553. module OpenDoc_Global_Types
  554. {
  555.         const string OpenDoc_Types_Version = "1.0.";
  556. };
  557.  
  558. #endif  // _ODTYPESM
  559.  
  560.