home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / PMWP.H < prev    next >
C/C++ Source or Header  |  1997-08-17  |  11KB  |  314 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.       /* NOINC */
  63.       #define QC_FIRST              QC_First
  64.       #define QC_NEXT               QC_Next
  65.       #define QC_LAST               QC_Last
  66.       /* INC */
  67.       
  68.       #ifndef LOCATION_DESKTOP
  69.          #define LOCATION_DESKTOP ((PSZ)0xFFFF0001) /* Current Desktop             */
  70.          /* use instead of <WP_DESKTOP> */
  71.       #endif
  72.       
  73.       /*** An object's appearance (icon or bitmap or outline) **************/
  74.       
  75.       typedef struct _OBJECTIMAGE     /* oimg */
  76.       {
  77.          HPOINTER hptrObject;
  78.       } OBJECTIMAGE;
  79.       typedef OBJECTIMAGE *POBJECTIMAGE;
  80.       
  81.       /*** Class info structure returned by WinEnumObjectClasses ***********/
  82.       typedef struct _OBJCLASS         /* ocls */
  83.       {
  84.          struct _OBJCLASS *pNext;         /* Null for the last structure.. */
  85.          PSZ               pszClassName;  /* Class name                    */
  86.          PSZ               pszModName;    /* Module name                   */
  87.       } OBJCLASS;
  88.       typedef OBJCLASS *POBJCLASS;
  89.       
  90.       
  91.       /*** Workplace object management functions ***************************/
  92.       
  93. #ifdef __cplusplus
  94.       BOOL APIENTRY WinRegisterObjectClass(PCSZ  pszClassName,
  95.                                            PCSZ  pszModName);
  96. #else
  97.       BOOL APIENTRY WinRegisterObjectClass(PSZ pszClassName,
  98.                                            PSZ pszModName);
  99. #endif
  100.       
  101. #ifdef __cplusplus
  102.       BOOL APIENTRY WinDeregisterObjectClass(PCSZ  pszClassName);
  103. #else
  104.       BOOL APIENTRY WinDeregisterObjectClass(PSZ pszClassName);
  105. #endif
  106.       
  107. #ifdef __cplusplus
  108.       BOOL APIENTRY WinReplaceObjectClass(PCSZ  pszOldClassName,
  109.                                           PCSZ  pszNewClassName,
  110.                                           BOOL fReplace);
  111. #else
  112.       BOOL APIENTRY WinReplaceObjectClass(PSZ pszOldClassName,
  113.                                           PSZ pszNewClassName,
  114.                                           BOOL fReplace);
  115. #endif
  116.       
  117.       BOOL APIENTRY WinEnumObjectClasses(POBJCLASS pObjClass,
  118.                                          PULONG pulSize);
  119.       
  120. #ifdef __cplusplus
  121.       HOBJECT APIENTRY WinCreateObject(PCSZ  pszClassName,
  122.                                        PCSZ  pszTitle,
  123.                                        PCSZ  pszSetupString,
  124.                                        PCSZ  pszLocation,
  125.                                        ULONG ulFlags );
  126. #else
  127.       HOBJECT APIENTRY WinCreateObject(PSZ pszClassName,
  128.                                        PSZ pszTitle,
  129.                                        PSZ pszSetupString,
  130.                                        PSZ pszLocation,
  131.                                        ULONG ulFlags );
  132. #endif
  133.       #define CO_FAILIFEXISTS     0
  134.       #define CO_REPLACEIFEXISTS  1
  135.       #define CO_UPDATEIFEXISTS   2
  136.       
  137. #ifdef __cplusplus
  138.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  139.                                      PCSZ  pszSetupString);
  140. #else
  141.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  142.                                      PSZ pszSetupString);
  143. #endif
  144.       
  145.       BOOL APIENTRY WinDestroyObject(HOBJECT hObject);
  146.       
  147. #ifdef __cplusplus
  148.       HOBJECT APIENTRY WinQueryObject(PCSZ  pszObjectID);
  149. #else
  150.       HOBJECT APIENTRY WinQueryObject(PSZ pszObjectID);
  151. #endif
  152.       
  153.       BOOL APIENTRY WinSaveObject(HOBJECT hObject,
  154.                                   BOOL    fAsync);
  155.       
  156.       BOOL APIENTRY WinOpenObject(HOBJECT hObject,
  157.                                   ULONG   ulView,
  158.                                   BOOL    Flag);
  159.       
  160.       HOBJECT APIENTRY WinMoveObject(HOBJECT hObjectofObject,
  161.                                      HOBJECT hObjectofDest,
  162.                                      ULONG   ulReserved);
  163.       
  164.       HOBJECT APIENTRY WinCopyObject(HOBJECT hObjectofObject,
  165.                                      HOBJECT hObjectofDest,
  166.                                      ULONG   ulReserved);
  167.       
  168.       HOBJECT APIENTRY WinCreateShadow(HOBJECT hObjectofObject,
  169.                                        HOBJECT hObjectofDest,
  170.                                        ULONG   ulReserved);
  171. #ifdef __cplusplus
  172.       BOOL APIENTRY WinQueryActiveDesktopPathname(PCSZ  pszPathName,
  173.                                                   ULONG ulSize);
  174. #else
  175.       BOOL APIENTRY WinQueryActiveDesktopPathname(PSZ pszPathName,
  176.                                                   ULONG ulSize);
  177. #endif
  178. #ifdef __cplusplus
  179.       BOOL APIENTRY WinQueryObjectPath(HOBJECT hobject,
  180.                                        PCSZ  pszPathName,
  181.                                        ULONG ulSize);
  182. #else
  183.       BOOL APIENTRY WinQueryObjectPath(HOBJECT hobject,
  184.                                        PSZ pszPathName,
  185.                                        ULONG ulSize);
  186. #endif
  187.       
  188.       APIRET  APIENTRY WinRestartWPDServer( BOOL fState );
  189.       BOOL    APIENTRY WinIsWPDServerReady( VOID );
  190.       APIRET  APIENTRY WinRestartSOMDD( BOOL fState );
  191.       BOOL    APIENTRY WinIsSOMDDReady( VOID );
  192.       
  193.    #endif  /*WPCLASS*/
  194.    
  195.    /*** Error codes ********************************************************/
  196.    #define INCL_WPERRORS
  197.    #include <pmerr.h>
  198.    
  199.    /*** Object settings notebook page insertion structure ******************/
  200.    
  201.    typedef struct _PAGEINFO     /* pginf */
  202.    {
  203.       ULONG   cb;
  204.       HWND    hwndPage;
  205.       PFNWP   pfnwp;
  206.       ULONG   resid;
  207.       PVOID   pCreateParams;
  208.       USHORT  dlgid;
  209.       USHORT  usPageStyleFlags;
  210.       USHORT  usPageInsertFlags;
  211.       USHORT  usSettingsFlags;
  212.       PSZ     pszName;
  213.       USHORT  idDefaultHelpPanel;
  214.       USHORT  usReserved2;
  215.       PSZ     pszHelpLibraryName;
  216.       PUSHORT pHelpSubtable;   /* PHELPSUBTABLE when PMHELP.H is included*/
  217.       HMODULE hmodHelpSubtable;
  218.       ULONG   ulPageInsertId;
  219.    } PAGEINFO;
  220.    typedef PAGEINFO *PPAGEINFO;
  221.    
  222.    #define  SETTINGS_PAGE_NUMBERS     0x01
  223.    
  224.    /*** Utility apis +******************************************************/
  225.    
  226.    #if (!defined(INCL_NOCOMMON))
  227.       typedef struct _ICONPOS     /* icp */
  228.       {
  229.          POINTL  ptlIcon;                    /* Location */
  230.          CHAR    szIdentity[1];              /* Object identity string */
  231.       } ICONPOS;
  232.       typedef ICONPOS *PICONPOS;
  233.       
  234.       /*********************************************************************/
  235.       #ifdef INCL_WINPOINTERS
  236. #ifdef __cplusplus
  237.          BOOL APIENTRY WinSetFileIcon(PCSZ  pszFileName,
  238.                                       PICONINFO pIcnInfo);
  239. #else
  240.          BOOL APIENTRY WinSetFileIcon(PSZ pszFileName,
  241.                                       PICONINFO pIcnInfo);
  242. #endif
  243.          
  244. #ifdef __cplusplus
  245.          BOOL APIENTRY WinSetFileIconN(PCSZ  pszFileName,
  246.                                        PICONINFO pIcnInfo,
  247.                                        ULONG ulIconIndex);
  248. #else
  249.          BOOL APIENTRY WinSetFileIconN(PSZ pszFileName,
  250.                                        PICONINFO pIcnInfo,
  251.                                        ULONG ulIconIndex);
  252. #endif
  253.       #endif
  254.       BOOL APIENTRY WinFreeFileIcon(HPOINTER hptr);
  255.       
  256. #ifdef __cplusplus
  257.       HPOINTER APIENTRY WinLoadFileIcon(PCSZ  pszFileName,
  258.                                         BOOL fPrivate);
  259. #else
  260.       HPOINTER APIENTRY WinLoadFileIcon(PSZ pszFileName,
  261.                                         BOOL fPrivate);
  262. #endif
  263.       
  264. #ifdef __cplusplus
  265.       HPOINTER APIENTRY WinLoadFileIconN(PCSZ  pszFileName,
  266.                                          BOOL fPrivate,
  267.                                          ULONG ulIconIndex);
  268. #else
  269.       HPOINTER APIENTRY WinLoadFileIconN(PSZ pszFileName,
  270.                                          BOOL fPrivate,
  271.                                          ULONG ulIconIndex);
  272. #endif
  273.       
  274. #ifdef __cplusplus
  275.       BOOL APIENTRY WinStoreWindowPos(PCSZ  pszAppName,
  276.                                       PCSZ  pszKeyName,
  277.                                       HWND hwnd);
  278. #else
  279.       BOOL APIENTRY WinStoreWindowPos(PSZ pszAppName,
  280.                                       PSZ pszKeyName,
  281.                                       HWND hwnd);
  282. #endif
  283.       
  284. #ifdef __cplusplus
  285.       BOOL APIENTRY WinRestoreWindowPos(PCSZ  pszAppName,
  286.                                         PCSZ  pszKeyName,
  287.                                         HWND hwnd);
  288. #else
  289.       BOOL APIENTRY WinRestoreWindowPos(PSZ pszAppName,
  290.                                         PSZ pszKeyName,
  291.                                         HWND hwnd);
  292. #endif
  293.       
  294.       BOOL APIENTRY WinShutdownSystem(HAB hab,
  295.                                       HMQ hmq);
  296.    #endif
  297.    
  298.    /* NOINC */
  299. #endif /* PMWP_INCLUDED */
  300. /* INC */
  301.  
  302. #ifdef __cplusplus
  303.         }
  304. #endif
  305. #if __IBMC__ || __IBMCPP__
  306.    #pragma info( none )
  307.    #ifndef __CHKHDR__
  308.       #pragma info( restore )
  309.    #endif
  310.    #pragma info( restore )
  311. #endif
  312.  
  313. /**************************** end of file **********************************/
  314.