home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / os2tk20 / c / os2h / pmwp.h__ / PMWP.H
Encoding:
C/C++ Source or Header  |  1992-10-05  |  6.8 KB  |  199 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.       
  60.       /*** An object's appearance (icon or bitmap or outline) **************/
  61.       
  62.       typedef struct _OBJECTIMAGE     /* oimg */
  63.       {
  64.          HPOINTER hptrObject;
  65.       } OBJECTIMAGE;
  66.       typedef OBJECTIMAGE *POBJECTIMAGE;
  67.       
  68.       /*** Class info structure returned by WinEnumObjectClasses ***********/
  69.       typedef struct _OBJCLASS         /* ocls */
  70.       {
  71.          struct _OBJCLASS *pNext;         /* Null for the last structure.. */
  72.          PSZ               pszClassName;  /* Class name                    */
  73.          PSZ               pszModName;    /* Module name                   */
  74.       } OBJCLASS;
  75.       typedef OBJCLASS *POBJCLASS;
  76.       
  77.       
  78.       /*** Workplace object management functions ***************************/
  79.       
  80.       BOOL APIENTRY WinRegisterObjectClass(PSZ pszClassName,
  81.                                            PSZ pszModName);
  82.       
  83.       BOOL APIENTRY WinDeregisterObjectClass(PSZ pszClassName);
  84.       
  85.       BOOL APIENTRY WinReplaceObjectClass(PSZ pszOldClassName,
  86.                                           PSZ pszNewClassName,
  87.                                           BOOL fReplace);
  88.       
  89.       BOOL APIENTRY WinEnumObjectClasses(POBJCLASS pObjClass,
  90.                                          PULONG pulSize);
  91.       
  92.       HOBJECT APIENTRY WinCreateObject(PSZ pszClassName,
  93.                                        PSZ pszTitle,
  94.                                        PSZ pszSetupString,
  95.                                        PSZ pszLocation,
  96.                                        ULONG ulFlags );
  97.       #define CO_FAILIFEXISTS     0
  98.       #define CO_REPLACEIFEXISTS  1
  99.       #define CO_UPDATEIFEXISTS   2
  100.       
  101.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  102.                                      PSZ pszSetupString);
  103.       
  104.       BOOL APIENTRY WinDestroyObject(HOBJECT hObject);
  105.       
  106.       HOBJECT APIENTRY WinQueryObject(PSZ pszObjectID);
  107.       
  108.    #endif  /*WPCLASS*/
  109.    
  110.    /*** Error codes ********************************************************/
  111.    #define INCL_WPERRORS
  112.    #include <pmerr.h>
  113.    
  114.    /*** Object settings notebook page insertion structure ******************/
  115.    
  116.    typedef struct _PAGEINFO     /* pginf */
  117.    {
  118.       ULONG   cb;
  119.       HWND    hwndPage;
  120.       PFNWP   pfnwp;
  121.       ULONG   resid;
  122.       PVOID   pCreateParams;
  123.       USHORT  dlgid;
  124.       USHORT  usPageStyleFlags;
  125.       USHORT  usPageInsertFlags;
  126.       USHORT  usReserved;
  127.       PSZ     pszName;
  128.       USHORT  idDefaultHelpPanel;
  129.       USHORT  usReserved2;
  130.       PSZ     pszHelpLibraryName;
  131.       PUSHORT pHelpSubtable;   /* PHELPSUBTABLE when PMHELP.H is included*/
  132.       HMODULE hmodHelpSubtable;
  133.       ULONG   ulPageInsertId;
  134.    } PAGEINFO;
  135.    typedef PAGEINFO *PPAGEINFO;
  136.    
  137.    /*** Utility apis +******************************************************/
  138.    
  139.    #if (!defined(INCL_NOCOMMON))
  140.       typedef struct _ICONPOS     /* icp */
  141.       {
  142.          POINTL  ptlIcon;                    /* Location */
  143.          CHAR    szIdentity[1];              /* Object identity string */
  144.       } ICONPOS;
  145.       typedef ICONPOS *PICONPOS;
  146.       
  147.       typedef struct _ICONINFO    /* icinf */
  148.       {
  149.          ULONG   cb;                  /* size of ICONINFO structure */
  150.          ULONG   fFormat;
  151.          PSZ     pszFileName;         /* use when fFormat = ICON_FILE */
  152.          HMODULE hmod;                /* use when fFormat = ICON_RESOURCE */
  153.          ULONG   resid;               /* use when fFormat = ICON_RESOURCE */
  154.          ULONG   cbIconData;          /* use when fFormat = ICON_DATA     */
  155.          PVOID   pIconData;           /* use when fFormat = ICON_DATA     */
  156.       } ICONINFO;
  157.       typedef ICONINFO *PICONINFO;
  158.       
  159.       #define ICON_FILE     1         /* flags for fFormat */
  160.       #define ICON_RESOURCE 2
  161.       #define ICON_DATA     3
  162.       #define ICON_CLEAR    4
  163.       
  164.       /*********************************************************************/
  165.       
  166.       BOOL APIENTRY WinSetFileIcon(PSZ pszFileName,
  167.                                    PICONINFO pIcnInfo);
  168.       
  169.       BOOL APIENTRY WinFreeFileIcon(HPOINTER hptr);
  170.       
  171.       HPOINTER APIENTRY WinLoadFileIcon(PSZ pszFileName,
  172.                                         BOOL fPrivate);
  173.       
  174.       BOOL APIENTRY WinStoreWindowPos(PSZ pszAppName,
  175.                                       PSZ pszKeyName,
  176.                                       HWND hwnd);
  177.       
  178.       BOOL APIENTRY WinRestoreWindowPos(PSZ pszAppName,
  179.                                         PSZ pszKeyName,
  180.                                         HWND hwnd);
  181.       
  182.       BOOL APIENTRY WinShutdownSystem(HAB hab,
  183.                                       HMQ hmq);
  184.    #endif
  185.    
  186.    /* NOINC */
  187. #endif /* PMWP_INCLUDED */
  188. /* INC */
  189.  
  190. #ifdef __IBMC__
  191.    #pragma checkout( suspend )
  192.    #ifndef __CHKHDR__
  193.       #pragma checkout( resume )
  194.    #endif
  195.    #pragma checkout( resume )
  196. #endif
  197.  
  198. /**************************** end of file **********************************/
  199.