home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / H_DBCS / PMWP.H < prev    next >
Text File  |  1995-04-14  |  8KB  |  230 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /****************************** Module Header ******************************\
  13. *
  14. * Module Name: PMWP.H
  15. *
  16. * OS/2 Presentation Manager Workplace include file.
  17. *
  18. *
  19. * ===========================================================================
  20. *
  21. * The folowing symbols are used in this file for conditional sections.
  22. *
  23. *   #define:                To include:
  24. *
  25. *   INCL_WINWORKPLACE       All of Workplace Shell
  26. *   INCL_WPCLASS            Workplace object class API's
  27. *
  28. * ===========================================================================
  29. *
  30. * Comments at the end of each typedef line give the name tags used in
  31. * the assembler include version of this file.
  32. *
  33. * The assembler include version of this file excludes lines between NOINC
  34. * and INC comments.
  35. *
  36. #ifndef __IBMC__
  37.    * The public version of this file (as shipped with the OS/2 Toolkit
  38.    * product) excludes all non 32-bit material marked in this file
  39.    * as well as any areas specifically marked with __IBMC__ conditional
  40.    * sections - including this paragraph. The H2IBMH rexx command file
  41.    * removes these sections.
  42. #endif
  43. \***************************************************************************/
  44.  
  45. #ifdef __IBMC__
  46.    #pragma checkout( suspend )
  47.       #ifndef __CHKHDR__
  48.          #pragma checkout( suspend )
  49.       #endif
  50.    #pragma checkout( resume )
  51. #endif
  52.  
  53. /* NOINC */
  54. #ifndef PMWP_INCLUDED  /* multiple include protection */
  55.    /* INC */
  56.    #define PMWP_INCLUDED
  57.  
  58. #ifndef __IBMC__
  59.    /* TEMP HACK, should be INCL_WINWORKPLACE for both IBM and MS */
  60.    /* but I don't want to risk breaking anyone yet! David Kerr */
  61.    #if (defined(INCL_WP) || defined(INCL_WINWORKPLACE))
  62.       #define INCL_WPCLASS
  63.    #endif
  64. #else
  65.    #ifdef INCL_WINWORKPLACE
  66.       #define INCL_WPCLASS
  67.    #endif
  68. #endif
  69.  
  70.    /*** Common types *******************************************************/
  71.  
  72.    typedef LHANDLE HOBJECT;
  73.  
  74.    /*** Object management calls ********************************************/
  75.    #if (defined(INCL_WPCLASS) || !defined(INCL_NOCOMMON))
  76.       /*** Standard object classes *****************************************/
  77.  
  78.  
  79.       #define CCHMAXCLASS              3      /* Length of a classname     */
  80.  
  81.       #define QC_First                 0      /* Codes for OA_QueryContent */
  82.       #define QC_Next                  1
  83.       #define QC_Last                  2
  84.       #define QC_FIRST              QC_First
  85.       #define QC_NEXT               QC_Next
  86.       #define QC_LAST               QC_Last
  87.  
  88.       /*** An object's appearance (icon or bitmap or outline) **************/
  89.  
  90.       typedef struct _OBJECTIMAGE {   /* oimg */
  91.          HPOINTER hptrObject;
  92.       } OBJECTIMAGE;
  93.       typedef OBJECTIMAGE FAR * POBJECTIMAGE;
  94.  
  95.       /*** Class info structure returned by WinEnumObjectClasses ***********/
  96.       typedef struct _OBJCLASS {       /* ocls */
  97.          struct _OBJCLASS *pNext;         /* Null for the last structure.. */
  98.          PSZ               pszClassName;  /* Class name                    */
  99.          PSZ               pszModName;    /* Module name                   */
  100.       } OBJCLASS;
  101.       typedef OBJCLASS FAR *POBJCLASS;
  102.  
  103.  
  104.       /*** Workplace object management functions ***************************/
  105.  
  106.       BOOL APIENTRY WinRegisterObjectClass(PSZ pszClassName,
  107.                                            PSZ pszModName);
  108.  
  109.       BOOL APIENTRY WinDeregisterObjectClass(PSZ pszClassName);
  110.  
  111.       BOOL APIENTRY WinReplaceObjectClass(PSZ pszOldClassName,
  112.                                           PSZ pszNewClassName,
  113.                                           BOOL fReplace);
  114.  
  115.       BOOL APIENTRY WinEnumObjectClasses(POBJCLASS pObjClass,
  116.                                          PULONG pulSize);
  117.  
  118.       HOBJECT APIENTRY WinCreateObject(PSZ pszClassName,
  119.                                        PSZ pszTitle,
  120.                                        PSZ pszSetupString,
  121.                                        PSZ pszLocation,
  122.                                        ULONG ulFlags );
  123.       #define CO_FAILIFEXISTS     0
  124.       #define CO_REPLACEIFEXISTS  1
  125.       #define CO_UPDATEIFEXISTS   2
  126.  
  127.       BOOL APIENTRY WinSetObjectData(HOBJECT hObject,
  128.                                      PSZ pszSetupString);
  129.  
  130.       BOOL APIENTRY WinDestroyObject(HOBJECT hObject);
  131.  
  132.       HOBJECT APIENTRY WinQueryObject(PSZ pszObjectID);
  133.  
  134.    #endif  /*WPCLASS*/
  135.  
  136.    /*** Error codes ********************************************************/
  137.    #define INCL_WPERRORS
  138.    #include <pmerr.h>
  139.  
  140.    /*** Object settings notebook page insertion structure ******************/
  141.  
  142.    typedef struct _PAGEINFO {   /* pginf */
  143.       ULONG   cb;
  144.       HWND    hwndPage;
  145.       PFNWP   pfnwp;
  146.       ULONG   resid;
  147.       PVOID   pCreateParams;
  148.       USHORT  dlgid;
  149.       USHORT  usPageStyleFlags;
  150.       USHORT  usPageInsertFlags;
  151.       USHORT  usSettingsFlags;
  152.       PSZ     pszName;
  153.       USHORT  idDefaultHelpPanel;
  154.       USHORT  usReserved2;
  155.       PSZ     pszHelpLibraryName;
  156.       PUSHORT pHelpSubtable;   /* PHELPSUBTABLE when PMHELP.H is included*/
  157.       HMODULE hmodHelpSubtable;
  158.       ULONG   ulPageInsertId;
  159.    } PAGEINFO;
  160.    typedef PAGEINFO FAR *PPAGEINFO;
  161.  
  162.    #define  SETTINGS_PAGE_NUMBERS     0x01
  163.  
  164.    /*** Utility apis +******************************************************/
  165.  
  166.    #if (!defined(INCL_NOCOMMON))
  167.       typedef struct _ICONPOS {   /* icp */
  168.          POINTL  ptlIcon;                    /* Location */
  169.          CHAR    szIdentity[1];              /* Object identity string */
  170.       } ICONPOS;
  171.       typedef ICONPOS FAR * PICONPOS;
  172.  
  173.       /*********************************************************************/
  174.       #ifdef INCL_WINPOINTERS
  175.          BOOL APIENTRY WinSetFileIcon(PSZ pszFileName,
  176.                                       PICONINFO pIcnInfo);
  177.       #endif
  178.       BOOL APIENTRY WinFreeFileIcon(HPOINTER hptr);
  179.  
  180.       HPOINTER APIENTRY WinLoadFileIcon(PSZ pszFileName,
  181.                                         BOOL fPrivate);
  182.  
  183.       BOOL APIENTRY WinStoreWindowPos(PSZ pszAppName,
  184.                                       PSZ pszKeyName,
  185.                                       HWND hwnd);
  186.  
  187.       BOOL APIENTRY WinRestoreWindowPos(PSZ pszAppName,
  188.                                         PSZ pszKeyName,
  189.                                         HWND hwnd);
  190.  
  191.       BOOL APIENTRY WinShutdownSystem(HAB hab,
  192.                                       HMQ hmq);
  193.    #endif
  194. #ifndef __IBMC__
  195.    /* TEMP HACK, this is private, needs moving to private header - David Kerr */
  196.    /*** Picked up from PMSHLTKT.H ******************************************/
  197.    #define    DOTICON             ".ICON"
  198.    #define    ICONGEALENGTH       7
  199.  
  200.    #define WM_QUERYOBJECTPTR    0x0407
  201.    #define WM_SETOBJECTPTR      0x0408
  202.  
  203.    ULONG  APIENTRY MRILoadResource (HWND hwndOwner,
  204.                                     PHMODULE pulModHandle,
  205.                                     PSZ pszModuleName,
  206.                                     PSZ pszAppName);
  207.  
  208.    VOID APIENTRY WinStartShell(HAB hab,
  209.                                HMQ hmq);
  210.  
  211.    BOOL APIENTRY WinRestartWorkplace(VOID);
  212.  
  213.    #define UNREFERENCED( c ) c;
  214.  
  215. #endif
  216.  
  217.    /* NOINC */
  218. #endif /* PMWP_INCLUDED */
  219. /* INC */
  220.  
  221. #ifdef __IBMC__
  222.    #pragma checkout( suspend )
  223.       #ifndef __CHKHDR__
  224.          #pragma checkout( resume )
  225.       #endif
  226.    #pragma checkout( resume )
  227. #endif
  228.  
  229. /**************************** end of file **********************************/
  230.