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.

125 lines
5.0 KiB

  1. /*-----------------------------------------------------------------------------+
  2. | SERVER.H |
  3. | |
  4. | (C) Copyright Microsoft Corporation 1992. All rights reserved. |
  5. | |
  6. | Revision History |
  7. | Oct-1992 MikeTri Ported to WIN32 / WIN16 common code |
  8. | |
  9. +-----------------------------------------------------------------------------*/
  10. //
  11. // global variables of doom!!
  12. //
  13. extern BOOL gfEmbeddedObject; // TRUE if editing embedded OLE object
  14. extern BOOL gfRunWithEmbeddingFlag; // TRUE if we are run with "-Embedding"
  15. extern BOOL gfCloseAfterPlaying; // TRUE if we are to hide after play
  16. extern BOOL gfPlayingInPlace; // TRUE if playing in place
  17. extern BOOL gfParentWasEnabled; // TRUE if parent was enabled
  18. extern BOOL gfShowWhilePlaying; //
  19. extern BOOL gfDirty; //
  20. extern int gfErrorBox; // TRUE if we have a message box active
  21. extern BOOL gfErrorDeath; // Die when errorbox is up
  22. // server related stuff.
  23. #define REDEFINITION
  24. typedef struct _SRVR *PSRVR;
  25. typedef struct _SRVR FAR *LPSRVR;
  26. void FAR PASCAL ServerUnblock(void);
  27. void FAR PASCAL BlockServer(void);
  28. void FAR PASCAL UnblockServer(void);
  29. void FAR PASCAL PlayInPlace(HWND hwndApp, HWND hwndClient, LPRECT prc);
  30. void FAR PASCAL EndPlayInPlace(HWND hwndApp);
  31. void FAR PASCAL DelayedFixLink(UINT verb, BOOL fShow, BOOL fActivate);
  32. void CleanObject(void);
  33. void UpdateObject(void);
  34. BOOL FAR PASCAL IsObjectDirty(void);
  35. typedef struct _SRVR {
  36. OLESERVER olesrvr;
  37. LHSERVER lhsrvr; // registration handle
  38. HWND hwnd; // corresponding server window
  39. }SRVR;
  40. //BOOL FAR PASCAL InitServer (HWND, HANDLE, LPTSTR);
  41. void FAR PASCAL TermServer (void);
  42. typedef struct _OLECLIENT FAR* LPOLECLIENT;
  43. OLESTATUS FAR PASCAL SrvrOpen (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, LPOLESERVERDOC FAR *);
  44. OLESTATUS FAR PASCAL SrvrCreate (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR *);
  45. OLESTATUS FAR PASCAL SrvrCreateFromTemplate (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR *);
  46. OLESTATUS FAR PASCAL SrvrEdit (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR *);
  47. OLESTATUS FAR PASCAL SrvrExit (LPOLESERVER);
  48. OLESTATUS FAR PASCAL SrvrRelease1 (LPOLESERVER);
  49. OLESTATUS FAR PASCAL SrvrExecute (LPOLESERVER, HGLOBAL);
  50. // server related stuff.
  51. typedef struct _OLE1DOC *POLE1DOC;
  52. typedef struct _OLE1DOC {
  53. OLESERVERDOC oledoc;
  54. LHSERVERDOC lhdoc; // registration handle
  55. HWND hwnd; // corresponding server window
  56. ATOM aName; // docmnet name.
  57. } OLE1DOC ;
  58. OLESTATUS FAR PASCAL DocSave (LPOLESERVERDOC);
  59. OLESTATUS FAR PASCAL DocClose (LPOLESERVERDOC);
  60. OLESTATUS FAR PASCAL DocRelease (LPOLESERVERDOC);
  61. OLESTATUS FAR PASCAL DocGetObject (LPOLESERVERDOC, OLE_LPCSTR, LPOLEOBJECT FAR *, LPOLECLIENT);
  62. OLESTATUS FAR PASCAL DocSetDocDimensions (LPOLESERVERDOC, OLE_CONST RECT FAR*);
  63. OLESTATUS FAR PASCAL DocSetHostNames (LPOLESERVERDOC, OLE_LPCSTR, OLE_LPCSTR);
  64. OLESTATUS FAR PASCAL DocExecute (LPOLESERVERDOC, HANDLE);
  65. OLESTATUS FAR PASCAL DocSetColorScheme (LPOLESERVERDOC, OLE_CONST LOGPALETTE FAR*);
  66. typedef struct _ITEM *PITEM;
  67. typedef struct _ITEM FAR *LPITEM;
  68. typedef struct _ITEM { /*OLEOBJECT*/
  69. OLEOBJECT oleobject;
  70. LPOLECLIENT lpoleclient;
  71. HWND hwnd;
  72. }ITEM;
  73. OLESTATUS FAR PASCAL ItemOpen (LPOLEOBJECT, BOOL);
  74. OLESTATUS FAR PASCAL ItemDoVerb (LPOLEOBJECT, UINT, BOOL, BOOL);
  75. OLESTATUS FAR PASCAL ItemRelease (LPOLEOBJECT);
  76. OLESTATUS FAR PASCAL ItemGetData (LPOLEOBJECT, OLECLIPFORMAT, LPHANDLE);
  77. OLESTATUS FAR PASCAL ItemSetData (LPOLEOBJECT, OLECLIPFORMAT, HANDLE);
  78. OLESTATUS FAR PASCAL ItemSetTargetDevice (LPOLEOBJECT, HANDLE);
  79. OLECLIPFORMAT FAR PASCAL ItemEnumFormats (LPOLEOBJECT, OLECLIPFORMAT);
  80. OLESTATUS FAR PASCAL ItemSetColorScheme (LPOLEOBJECT, OLE_CONST LOGPALETTE FAR*);
  81. OLESTATUS FAR PASCAL ItemSetBounds (LPOLEOBJECT, OLE_CONST RECT FAR*);
  82. extern SRVR gSrvr;
  83. extern OLE1DOC gDoc;
  84. extern ITEM gItem;
  85. int FAR PASCAL SendChangeMsg(UINT options); //!!!
  86. void FAR PASCAL TerminateServer(void);
  87. void FAR PASCAL NewDoc(BOOL fUntitled);
  88. BOOL FAR PASCAL RegisterDocument(LHSERVERDOC lhdoc, LPOLESERVERDOC FAR *lplpoledoc);
  89. void FAR PASCAL RevokeDocument(void);
  90. /* ole.h:
  91. */
  92. typedef WORD OLECLIPFORMAT;
  93. extern OLECLIPFORMAT cfLink;
  94. extern OLECLIPFORMAT cfOwnerLink;
  95. extern OLECLIPFORMAT cfNative;
  96. void FAR PASCAL SetEmbeddedObjectFlag(BOOL flag);
  97. void FAR PASCAL CopyObject(HWND hwnd);
  98. #define WM_USER_DESTROY (WM_USER+120)
  99. #define WM_DO_VERB (WM_USER+121) /* Perform the ItemSetData */
  100.