home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / c / os2h / pmwp.h__ / pmwp.h
Encoding:
C/C++ Source or Header  |  1993-04-22  |  6.3 KB  |  187 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. #ifdef __IBMC__
  29.    #pragma checkout( suspend )
  30.    #ifndef __CHKHDR__
  31.       #pragma checkout( suspend )
  32.    #endif
  33.    #pragma checkout( resume )
  34. #endif
  35.  
  36. /* NOINC */
  37. #ifndef PMWP_INCLUDED  /* multiple include protection */
  38.    /* INC */
  39.    #define PMWP_INCLUDED
  40.    
  41.    #ifdef INCL_WINWORKPLACE
  42.       #define INCL_WPCLASS
  43.    #endif
  44.    
  45.    /*** Common types *******************************************************/
  46.    
  47.    typedef LHANDLE HOBJECT;
  48.    
  49.    /*** Object management calls ********************************************/
  50.    #if (defined(INCL_WPCLASS) || !defined(INCL_NOCOMMON))
  51.       /*** Standard object classes *****************************************/
  52.       
  53.       
  54.       #define CCHMAXCLASS              3      /* Length of a classname     */
  55.       
  56.       #define QC_First                 0      /* Codes for OA_QueryContent */
  57.       #define QC_Next                  1
  58.       #define QC_Last                  2
  59.       #define QC_FIRST              QC_First
  60.       #define QC_NEXT               QC_Next
  61.       #define QC_LAST               QC_Last
  62.       
  63.       /*** An object's appearance (icon or bitmap or outline) **************/
  64.       
  65.       typedef struct _OBJECTIMAGE     /* oimg */
  66.       {
  67.          HPOINTER hptrObject;
  68.       } OBJECTIMAGE;
  69.       typedef OBJECTIMAGE *POBJECTIMAGE;
  70.       
  71.       /*** Class info structure returned by WinEnumObjectClasses ***********/
  72.       typedef struct _OBJCLASS         /* ocls */
  73.       {
  74.          struct _OBJCLASS *pNext;         /* Null for the last structure.. */
  75.          PSZ               pszClassName;  /* Class name                    */
  76.          PSZ               pszModName;    /* Module name                   */
  77.       } OBJCLASS;
  78.       typedef OBJCLASS *POBJCLASS;
  79.       
  80.       
  81.       /*** Workplace object management functions ***************************/
  82.       
  83.       BOOL APIENTRY WinRegisterObjectClass(PSZ pszClassName,
  84.                                            PSZ pszModName);
  85.       
  86.       BOOL APIENTRY WinDeregisterObjectClass(PSZ pszClassName);
  87.       
  88.       BOOL APIENTRY WinReplaceObjectClass(PSZ pszOldClassName,
  89.                                           PSZ pszNewClassName,
  90.                                           BOOL fReplace);
  91.       
  92.       BOOL APIENTRY WinEnumObjectClasses(POBJCLASS pObjClass,
  93.                                          PULONG pulSize);
  94.       
  95.       HOBJECT APIENTRY WinCreateObject(PSZ pszClassName,
  96.                                        PSZ pszTitle,
  97.                                        PSZ pszSetupString,
  98.                                        PSZ pszLocation,
  99.                                        ULONG ulFlags );
  100.       #define CO_FAILIFEXISTS     0
  101.       #define CO_REPLACEIFEXISTS  1
  102.       #define CO_UPDATEIFEXISTS   2
  103.       
  104.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  105.                                      PSZ pszSetupString);
  106.       
  107.       BOOL APIENTRY WinDestroyObject(HOBJECT hObject);
  108.       
  109.       HOBJECT APIENTRY WinQueryObject(PSZ pszObjectID);
  110.       
  111.    #endif  /*WPCLASS*/
  112.    
  113.    /*** Error codes ********************************************************/
  114.    #define INCL_WPERRORS
  115.    #include <pmerr.h>
  116.    
  117.    /*** Object settings notebook page insertion structure ******************/
  118.    
  119.    typedef struct _PAGEINFO     /* pginf */
  120.    {
  121.       ULONG   cb;
  122.       HWND    hwndPage;
  123.       PFNWP   pfnwp;
  124.       ULONG   resid;
  125.       PVOID   pCreateParams;
  126.       USHORT  dlgid;
  127.       USHORT  usPageStyleFlags;
  128.       USHORT  usPageInsertFlags;
  129.       USHORT  usSettingsFlags;
  130.       PSZ     pszName;
  131.       USHORT  idDefaultHelpPanel;
  132.       USHORT  usReserved2;
  133.       PSZ     pszHelpLibraryName;
  134.       PUSHORT pHelpSubtable;   /* PHELPSUBTABLE when PMHELP.H is included*/
  135.       HMODULE hmodHelpSubtable;
  136.       ULONG   ulPageInsertId;
  137.    } PAGEINFO;
  138.    typedef PAGEINFO *PPAGEINFO;
  139.    
  140.    #define  SETTINGS_PAGE_NUMBERS     0x01
  141.    
  142.    /*** Utility apis +******************************************************/
  143.    
  144.    #if (!defined(INCL_NOCOMMON))
  145.       typedef struct _ICONPOS     /* icp */
  146.       {
  147.          POINTL  ptlIcon;                    /* Location */
  148.          CHAR    szIdentity[1];              /* Object identity string */
  149.       } ICONPOS;
  150.       typedef ICONPOS *PICONPOS;
  151.       
  152.       /*********************************************************************/
  153.       #ifdef INCL_WINPOINTERS
  154.          BOOL APIENTRY WinSetFileIcon(PSZ pszFileName,
  155.                                       PICONINFO pIcnInfo);
  156.       #endif
  157.       BOOL APIENTRY WinFreeFileIcon(HPOINTER hptr);
  158.       
  159.       HPOINTER APIENTRY WinLoadFileIcon(PSZ pszFileName,
  160.                                         BOOL fPrivate);
  161.       
  162.       BOOL APIENTRY WinStoreWindowPos(PSZ pszAppName,
  163.                                       PSZ pszKeyName,
  164.                                       HWND hwnd);
  165.       
  166.       BOOL APIENTRY WinRestoreWindowPos(PSZ pszAppName,
  167.                                         PSZ pszKeyName,
  168.                                         HWND hwnd);
  169.       
  170.       BOOL APIENTRY WinShutdownSystem(HAB hab,
  171.                                       HMQ hmq);
  172.    #endif
  173.    
  174.    /* NOINC */
  175. #endif /* PMWP_INCLUDED */
  176. /* INC */
  177.  
  178. #ifdef __IBMC__
  179.    #pragma checkout( suspend )
  180.    #ifndef __CHKHDR__
  181.       #pragma checkout( resume )
  182.    #endif
  183.    #pragma checkout( resume )
  184. #endif
  185.  
  186. /**************************** end of file **********************************/
  187.