home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / H / PMWP.H < prev    next >
C/C++ Source or Header  |  1995-08-30  |  11KB  |  312 lines

  1. /****************************** Module Header ******************************\
  2. *
  3. * Module Name: PMWP.H
  4. *
  5. * OS/2 Presentation Manager Workplace include file.
  6. *
  7. * Copyright (c) International Business Machines Corporation 1981, 1988-1992
  8. *
  9. * ===========================================================================
  10. *
  11. * The folowing symbols are used in this file for conditional sections.
  12. *
  13. *   #define:                To include:
  14. *
  15. *   INCL_WINWORKPLACE       All of Workplace Shell
  16. *   INCL_WPCLASS            Workplace object class API's
  17. *
  18. * ===========================================================================
  19. *
  20. * Comments at the end of each typedef line give the name tags used in
  21. * the assembler include version of this file.
  22. *
  23. * The assembler include version of this file excludes lines between NOINC
  24. * and INC comments.
  25. *
  26. \***************************************************************************/
  27.  
  28. #if __IBMC__ || __IBMCPP__
  29.    #pragma info( none )
  30.    #ifndef __CHKHDR__
  31.       #pragma info( none )
  32.    #endif
  33.    #pragma info( restore )
  34. #endif
  35. #ifdef __cplusplus
  36.       extern "C" {
  37. #endif
  38.  
  39. /* NOINC */
  40. #ifndef PMWP_INCLUDED  /* multiple include protection */
  41.    /* INC */
  42.    #define PMWP_INCLUDED
  43.    
  44.    #ifdef INCL_WINWORKPLACE
  45.       #define INCL_WPCLASS
  46.    #endif
  47.    
  48.    /*** Common types *******************************************************/
  49.    
  50.    typedef LHANDLE HOBJECT;
  51.    
  52.    /*** Object management calls ********************************************/
  53.    #if (defined(INCL_WPCLASS) || !defined(INCL_NOCOMMON))
  54.       /*** Standard object classes *****************************************/
  55.       
  56.       
  57.       #define CCHMAXCLASS              3      /* Length of a classname     */
  58.       
  59.       #define QC_First                 0      /* Codes for OA_QueryContent */
  60.       #define QC_Next                  1
  61.       #define QC_Last                  2
  62.       #define QC_FIRST              QC_First
  63.       #define QC_NEXT               QC_Next
  64.       #define QC_LAST               QC_Last
  65.       
  66.       #ifndef LOCATION_DESKTOP
  67.          #define LOCATION_DESKTOP ((PSZ)0xFFFF0001) /* Current Desktop             */
  68.          /* use instead of <WP_DESKTOP> */
  69.       #endif
  70.       
  71.       /*** An object's appearance (icon or bitmap or outline) **************/
  72.       
  73.       typedef struct _OBJECTIMAGE     /* oimg */
  74.       {
  75.          HPOINTER hptrObject;
  76.       } OBJECTIMAGE;
  77.       typedef OBJECTIMAGE *POBJECTIMAGE;
  78.       
  79.       /*** Class info structure returned by WinEnumObjectClasses ***********/
  80.       typedef struct _OBJCLASS         /* ocls */
  81.       {
  82.          struct _OBJCLASS *pNext;         /* Null for the last structure.. */
  83.          PSZ               pszClassName;  /* Class name                    */
  84.          PSZ               pszModName;    /* Module name                   */
  85.       } OBJCLASS;
  86.       typedef OBJCLASS *POBJCLASS;
  87.       
  88.       
  89.       /*** Workplace object management functions ***************************/
  90.       
  91. #ifdef __cplusplus
  92.       BOOL APIENTRY WinRegisterObjectClass(PCSZ  pszClassName,
  93.                                            PCSZ  pszModName);
  94. #else
  95.       BOOL APIENTRY WinRegisterObjectClass(PSZ pszClassName,
  96.                                            PSZ pszModName);
  97. #endif
  98.       
  99. #ifdef __cplusplus
  100.       BOOL APIENTRY WinDeregisterObjectClass(PCSZ  pszClassName);
  101. #else
  102.       BOOL APIENTRY WinDeregisterObjectClass(PSZ pszClassName);
  103. #endif
  104.       
  105. #ifdef __cplusplus
  106.       BOOL APIENTRY WinReplaceObjectClass(PCSZ  pszOldClassName,
  107.                                           PCSZ  pszNewClassName,
  108.                                           BOOL fReplace);
  109. #else
  110.       BOOL APIENTRY WinReplaceObjectClass(PSZ pszOldClassName,
  111.                                           PSZ pszNewClassName,
  112.                                           BOOL fReplace);
  113. #endif
  114.       
  115.       BOOL APIENTRY WinEnumObjectClasses(POBJCLASS pObjClass,
  116.                                          PULONG pulSize);
  117.       
  118. #ifdef __cplusplus
  119.       HOBJECT APIENTRY WinCreateObject(PCSZ  pszClassName,
  120.                                        PCSZ  pszTitle,
  121.                                        PCSZ  pszSetupString,
  122.                                        PCSZ  pszLocation,
  123.                                        ULONG ulFlags );
  124. #else
  125.       HOBJECT APIENTRY WinCreateObject(PSZ pszClassName,
  126.                                        PSZ pszTitle,
  127.                                        PSZ pszSetupString,
  128.                                        PSZ pszLocation,
  129.                                        ULONG ulFlags );
  130. #endif
  131.       #define CO_FAILIFEXISTS     0
  132.       #define CO_REPLACEIFEXISTS  1
  133.       #define CO_UPDATEIFEXISTS   2
  134.       
  135. #ifdef __cplusplus
  136.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  137.                                      PCSZ  pszSetupString);
  138. #else
  139.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  140.                                      PSZ pszSetupString);
  141. #endif
  142.       
  143.       BOOL APIENTRY WinDestroyObject(HOBJECT hObject);
  144.       
  145. #ifdef __cplusplus
  146.       HOBJECT APIENTRY WinQueryObject(PCSZ  pszObjectID);
  147. #else
  148.       HOBJECT APIENTRY WinQueryObject(PSZ pszObjectID);
  149. #endif
  150.       
  151.       BOOL APIENTRY WinSaveObject(HOBJECT hObject,
  152.                                   BOOL    fAsync);
  153.       
  154.       BOOL APIENTRY WinOpenObject(HOBJECT hObject,
  155.                                   ULONG   ulView,
  156.                                   BOOL    Flag);
  157.       
  158.       HOBJECT APIENTRY WinMoveObject(HOBJECT hObjectofObject,
  159.                                      HOBJECT hObjectofDest,
  160.                                      ULONG   ulReserved);
  161.       
  162.       HOBJECT APIENTRY WinCopyObject(HOBJECT hObjectofObject,
  163.                                      HOBJECT hObjectofDest,
  164.                                      ULONG   ulReserved);
  165.       
  166.       HOBJECT APIENTRY WinCreateShadow(HOBJECT hObjectofObject,
  167.                                        HOBJECT hObjectofDest,
  168.                                        ULONG   ulReserved);
  169. #ifdef __cplusplus
  170.       BOOL APIENTRY WinQueryActiveDesktopPathname(PCSZ  pszPathName,
  171.                                                   ULONG ulSize);
  172. #else
  173.       BOOL APIENTRY WinQueryActiveDesktopPathname(PSZ pszPathName,
  174.                                                   ULONG ulSize);
  175. #endif
  176. #ifdef __cplusplus
  177.       BOOL APIENTRY WinQueryObjectPath(HOBJECT hobject,
  178.                                        PCSZ  pszPathName,
  179.                                        ULONG ulSize);
  180. #else
  181.       BOOL APIENTRY WinQueryObjectPath(HOBJECT hobject,
  182.                                        PSZ pszPathName,
  183.                                        ULONG ulSize);
  184. #endif
  185.       
  186.       APIRET  APIENTRY WinRestartWPDServer( BOOL fState );
  187.       BOOL    APIENTRY WinIsWPDServerReady( VOID );
  188.       APIRET  APIENTRY WinRestartSOMDD( BOOL fState );
  189.       BOOL    APIENTRY WinIsSOMDDReady( VOID );
  190.       
  191.    #endif  /*WPCLASS*/
  192.    
  193.    /*** Error codes ********************************************************/
  194.    #define INCL_WPERRORS
  195.    #include <pmerr.h>
  196.    
  197.    /*** Object settings notebook page insertion structure ******************/
  198.    
  199.    typedef struct _PAGEINFO     /* pginf */
  200.    {
  201.       ULONG   cb;
  202.       HWND    hwndPage;
  203.       PFNWP   pfnwp;
  204.       ULONG   resid;
  205.       PVOID   pCreateParams;
  206.       USHORT  dlgid;
  207.       USHORT  usPageStyleFlags;
  208.       USHORT  usPageInsertFlags;
  209.       USHORT  usSettingsFlags;
  210.       PSZ     pszName;
  211.       USHORT  idDefaultHelpPanel;
  212.       USHORT  usReserved2;
  213.       PSZ     pszHelpLibraryName;
  214.       PUSHORT pHelpSubtable;   /* PHELPSUBTABLE when PMHELP.H is included*/
  215.       HMODULE hmodHelpSubtable;
  216.       ULONG   ulPageInsertId;
  217.    } PAGEINFO;
  218.    typedef PAGEINFO *PPAGEINFO;
  219.    
  220.    #define  SETTINGS_PAGE_NUMBERS     0x01
  221.    
  222.    /*** Utility apis +******************************************************/
  223.    
  224.    #if (!defined(INCL_NOCOMMON))
  225.       typedef struct _ICONPOS     /* icp */
  226.       {
  227.          POINTL  ptlIcon;                    /* Location */
  228.          CHAR    szIdentity[1];              /* Object identity string */
  229.       } ICONPOS;
  230.       typedef ICONPOS *PICONPOS;
  231.       
  232.       /*********************************************************************/
  233.       #ifdef INCL_WINPOINTERS
  234. #ifdef __cplusplus
  235.          BOOL APIENTRY WinSetFileIcon(PCSZ  pszFileName,
  236.                                       PICONINFO pIcnInfo);
  237. #else
  238.          BOOL APIENTRY WinSetFileIcon(PSZ pszFileName,
  239.                                       PICONINFO pIcnInfo);
  240. #endif
  241.          
  242. #ifdef __cplusplus
  243.          BOOL APIENTRY WinSetFileIconN(PCSZ  pszFileName,
  244.                                        PICONINFO pIcnInfo,
  245.                                        ULONG ulIconIndex);
  246. #else
  247.          BOOL APIENTRY WinSetFileIconN(PSZ pszFileName,
  248.                                        PICONINFO pIcnInfo,
  249.                                        ULONG ulIconIndex);
  250. #endif
  251.       #endif
  252.       BOOL APIENTRY WinFreeFileIcon(HPOINTER hptr);
  253.       
  254. #ifdef __cplusplus
  255.       HPOINTER APIENTRY WinLoadFileIcon(PCSZ  pszFileName,
  256.                                         BOOL fPrivate);
  257. #else
  258.       HPOINTER APIENTRY WinLoadFileIcon(PSZ pszFileName,
  259.                                         BOOL fPrivate);
  260. #endif
  261.       
  262. #ifdef __cplusplus
  263.       HPOINTER APIENTRY WinLoadFileIconN(PCSZ  pszFileName,
  264.                                          BOOL fPrivate,
  265.                                          ULONG ulIconIndex);
  266. #else
  267.       HPOINTER APIENTRY WinLoadFileIconN(PSZ pszFileName,
  268.                                          BOOL fPrivate,
  269.                                          ULONG ulIconIndex);
  270. #endif
  271.       
  272. #ifdef __cplusplus
  273.       BOOL APIENTRY WinStoreWindowPos(PCSZ  pszAppName,
  274.                                       PCSZ  pszKeyName,
  275.                                       HWND hwnd);
  276. #else
  277.       BOOL APIENTRY WinStoreWindowPos(PSZ pszAppName,
  278.                                       PSZ pszKeyName,
  279.                                       HWND hwnd);
  280. #endif
  281.       
  282. #ifdef __cplusplus
  283.       BOOL APIENTRY WinRestoreWindowPos(PCSZ  pszAppName,
  284.                                         PCSZ  pszKeyName,
  285.                                         HWND hwnd);
  286. #else
  287.       BOOL APIENTRY WinRestoreWindowPos(PSZ pszAppName,
  288.                                         PSZ pszKeyName,
  289.                                         HWND hwnd);
  290. #endif
  291.       
  292.       BOOL APIENTRY WinShutdownSystem(HAB hab,
  293.                                       HMQ hmq);
  294.    #endif
  295.    
  296.    /* NOINC */
  297. #endif /* PMWP_INCLUDED */
  298. /* INC */
  299.  
  300. #ifdef __cplusplus
  301.         }
  302. #endif
  303. #if __IBMC__ || __IBMCPP__
  304.    #pragma info( none )
  305.    #ifndef __CHKHDR__
  306.       #pragma info( restore )
  307.    #endif
  308.    #pragma info( restore )
  309. #endif
  310.  
  311. /**************************** end of file **********************************/
  312.