home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / PMTKTP.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  10KB  |  256 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: PMTKTP.H
  15. *
  16. * Private OS/2 Presentation Manager Help Toolkit include file
  17. *
  18. *
  19. *
  20. * ===========================================================================
  21. *
  22. * Comments at the end of each typedef line give the name tags used in
  23. * the assembler include version of this file.
  24. *
  25. * The assembler include version of this file excludes lines between NOINC
  26. * and INC comments.
  27. *
  28. #ifndef __IBMC__
  29.    * The 32-bit version of this file (as placed into the IBMH directory)
  30.    * excludes all non 32-bit material marked in this file as well
  31.    * as any areas specifically marked with __IBMC__ conditional
  32.    * sections - including this paragraph. The H2IBMH rexx command file
  33.    * removes these sections.
  34. #endif
  35. * ===========================================================================
  36. *
  37. */
  38.  
  39. /* NOINC */
  40. #ifdef __IBMC__
  41.    #pragma checkout( suspend )
  42.       #ifndef __CHKHDR__
  43.          #pragma checkout( suspend )
  44.       #endif
  45.    #pragma checkout( resume )
  46. #endif
  47. /* INC */
  48.  
  49. #define PMTKTP_INCLUDED
  50.  
  51. #ifndef INCL_32         /* If neither INCL_32 or INCL_16 set already */
  52.    #ifndef INCL_16      /* find out from compiler if 32-bit or not.  */
  53.      #ifdef M_I386
  54.         #define INCL_32 /* Compiling for 32-bit */
  55.      #else
  56.         #define INCL_16 /* Compiling for 16-bit */
  57.      #endif
  58.   #endif
  59. #endif
  60.  
  61. #ifdef INCL_HELP
  62. /* values for help resources and predefined resource ids */
  63. #define RT_TEXT   256        /* text resource type */
  64.  
  65. #define THI_UNDEFINED -1        /* unknown index (do not use !!!) */
  66. #define THI_INDEX      1        /* index panel */
  67. #define THI_KEYS       2        /* keys panel */
  68. #define THI_ABOUT      3        /* first panel number available for user */
  69.  
  70. #ifndef RC_INVOKED
  71.  
  72. /* Help handle */
  73. typedef ULONG HHELP;
  74.  
  75. /* Help Initialization structure */
  76. typedef struct _HIS {   /* his */
  77.     USHORT cxWidth;
  78.     USHORT cyHeight;
  79. } HIS;
  80. typedef HIS FAR *PHIS;
  81.  
  82. #ifdef INCL_16
  83. /*** Toolkit Help functions */
  84. HHELP EXPENTRY HlpInit (HAB hab, HMODULE hmod, HWND hwndReg, PSZ pszApp,
  85.         USHORT cb, PHIS lphis);
  86. BOOL  EXPENTRY HlpRegisterContext (HHELP hhelp, HMODULE hmod, SHORT idRes);
  87. BOOL  EXPENTRY HlpDestroy (HHELP hhelp);
  88. BOOL  EXPENTRY HlpRequest (HHELP hhelp, SHORT idRes, SHORT idMainRes,
  89.         USHORT cch, PSZ pszText, SHORT x, SHORT y, USHORT cx, USHORT cy);
  90. BOOL  EXPENTRY HlpQueryStatus (HHELP hhelp, PHWND phwndFrame);
  91. BOOL  EXPENTRY HlpHide (HHELP hhelp);
  92. #endif
  93.  
  94. #endif /* RC_INVOKED */
  95.  
  96. #endif /* INCL_HELP */
  97.  
  98. #ifdef INCL_TKTP
  99. /* Common strings (for use by WtiAlertBox() */
  100.  
  101. #define IDS_MERGE1      0      /* merge string (%%) */
  102. #define IDS_IFN         1      /* %% is not a valid filename. */
  103. #define IDS_FNF         2      /* %% not found - Create new file? */
  104. #define IDS_REF         3      /* Replace existing %%? */
  105. #define IDS_SCC         4      /* %% has changed. Save current changes? */
  106. #define IDS_EOF         5      /* Error opening %% */
  107. #define IDS_ECF         6      /* Error creating %% */
  108.  
  109. /* Common msg     box Help Ids */
  110. #define IDMB_IFN        -1
  111. #define IDMB_FNF        -2
  112. #define IDMB_REF        -3
  113. #define IDMB_SCC        -4
  114. #define IDMB_EOF        -5
  115. #define IDMB_ECF        -6
  116.  
  117. /* Dialog box IDs Open/Save IDs */
  118. #define IDD_FILEOPEN    -1
  119. #define IDD_FILESAVE    -2
  120. #define IDD_PMTKT_OPEN          255
  121. #define IDD_PMTKT_SAVEAS        254
  122. #define IDD_PMTKT_LOGO          253
  123.  
  124. #define ATTRDIRLIST     0x4010 /* include directories and drives in listbox */
  125.  
  126. #define APPNAMEMAX        40   /* for help use, truncated if larger */
  127. #define MAX_FNAME_LEN     260
  128. #define CBEXTMAX           6
  129. #define CBROOTNAMEMAX    (MAX_FNAME_LEN - CBEXTMAX - 1)
  130. #define MAXMESSAGELENGTH (MAX_FNAME_LEN + 120) /* maximum cb of a msg
  131.                                 (instruction or warning). */
  132.  
  133. /* Action value for WtiDlgFile, the values may be ORed, except DLG_OPENDLG */
  134. /* and DLG_SAVEDLG. */
  135. #define DLG_OPENDLG 0x00        /* Use the Open dialog box. */
  136. #define DLG_SAVEDLG 0x01        /* Use the Save (As) dialog box */
  137. #define DLG_NOOPEN  0x02        /* Don't Open the file we selected */
  138. #define DLG_HELP    0x04        /* The dialog box supports Help */
  139.  
  140. /* Return values from WtiDlgFile : */
  141. #define TDF_ERRMEM   0
  142. #define TDF_INVALID  1
  143. #define TDF_NOOPEN   2
  144. #define TDF_NEWOPEN  3
  145. #define TDF_OLDOPEN  4
  146. #define TDF_NOSAVE   5
  147. #define TDF_NEWSAVE  6
  148. #define TDF_OLDSAVE  7
  149.  
  150.  
  151. /* Some ROP GPICALLS.H doesn't define */
  152. #define ROP_Pn           (LONG)0x0000000f
  153. #define ROP_DSan         (LONG)0x00000077
  154.  
  155. /* Flags for WtiOpenFile */
  156. #define OF_REOPEN 0x8000
  157. #define OF_EXIST  0x4000
  158. #define OF_PROMPT 0x2000
  159. #define OF_CREATE 0x1000
  160. #define OF_CANCEL 0x0800
  161. #define OF_VERIFY 0x0400
  162. #define OF_DELETE 0x0200
  163. #define OF_PARSE  0x0100
  164.  
  165. #define OF_READ      0x0080
  166. #define OF_WRITE     0x0040
  167. #define OF_READWRITE 0x0020
  168.  
  169. /* flAttributes used to filter entries provided by DlgFillListBox */
  170. #define BITATTRDRIVE 0x4000
  171. #define BITATTRDIR   0x0010
  172.  
  173. #ifndef RC_INVOKED
  174.  
  175. /* Useful abreviations */
  176. typedef char *PSTR;
  177. typedef SHANDLE FAR *PHANDLE;
  178.  
  179. /* Data structure used to pass information to WtiDlgFile(). */
  180. typedef struct _DLF {   /* dlf */
  181.         USHORT   rgbAction;             /* action usType:  eg. DLG_OPEN     */
  182.         USHORT   rgbFlags;              /* open file flAttributes         */
  183.         PHANDLE  phFile;                /* file handle                    */
  184.         PSZ      pszExt;                /* default file extension "\.ext" */
  185.         PSZ      pszAppName;            /* application name               */
  186.         PSZ      pszTitle;              /* panel title or NULL            */
  187.         PSZ      pszInstructions;       /* panel instructions or NULL     */
  188.         CHAR szFileName[MAX_FNAME_LEN]; /* relative file name             */
  189.         CHAR szOpenFile[MAX_FNAME_LEN]; /* full path name of current file */
  190. } DLF;
  191. typedef DLF *NPDLF;
  192. typedef DLF FAR *PDLF;
  193.  
  194. /*  Brush structure */
  195. typedef struct _BRUSH { /* tkbr */
  196.     LONG   lColor;
  197.     USHORT usSymbol;
  198.     ULONG  rop;
  199.     } BRUSH;
  200. typedef BRUSH *NPBRUSH;
  201. typedef BRUSH FAR *PBRUSH;
  202.  
  203. #ifdef INCL_16
  204. /*  Exported functions of the Tool Kit library. */
  205. PSZ   EXPENTRY WtiItoa (int n, PSZ pszResult);
  206. int   EXPENTRY WtiAlertBox (HWND hwndOwner, int idMes, PSZ pszTextIns,
  207.         PSZ pszCaption, USHORT idMB, USHORT usStyle);
  208. BOOL  EXPENTRY WtiMergeStrings (PSZ pszSrc, PSZ pszMerge, PSZ pszDst);
  209. VOID  EXPENTRY WtiLCopyStruct (PCH pchSrc, PCH pchDst, int cb);
  210. VOID  EXPENTRY WtiLFillStruct (PCH pchDst, int cb, BYTE fillByte);
  211. int   EXPENTRY Wtilstrlen (PSZ psz);
  212. PSZ   EXPENTRY Wtilstrcpy (PSZ pszDst, PSZ pszSrc);
  213. PSZ   EXPENTRY Wtilstrcat (PSZ pszDst, PSZ pszSrc);
  214. int   EXPENTRY Wtilstrcmp (PSZ psz1, PSZ psz2);
  215. USHORT  EXPENTRY WtiMultDiv (USHORT num1, USHORT num2, USHORT denominator);
  216. VOID  EXPENTRY WtiBitBlt(HPS hpsDst, int xDst, int yDst, int cx, int cy,
  217.         HPS hpsSrc, int xSrc, int ySrc, ULONG rop);
  218. VOID  EXPENTRY WtiPatBlt(HPS hpsDst, int xDst, int yDst, int cx, int cy,
  219.         ULONG rop);
  220. VOID  EXPENTRY WtiStretchBlt(HPS hpsDst, int xDst, int yDst, int cxDst,
  221.         int cyDst, HPS hpsSrc, int xSrc, int ySrc, int cxSrc, int cySrc,
  222.         ULONG rop, USHORT mode);
  223. BOOL  EXPENTRY WtiSetEAString(HFILE hfile,PSZ pszName,PSZ pszString);
  224. HPS   EXPENTRY WtiCreateMemoryPS(HDC hdsCompat, HDC FAR * lphdcOut);
  225. ULONG EXPENTRY WtiGetTextExtent(HPS hps, PCH lpstr, int cch);
  226. int   EXPENTRY WtiSetBitmapBits (HDC hdc, HBITMAP hbm, BOOL fSelect,
  227.         USHORT cLines, PBYTE pBits);
  228. int   EXPENTRY WtiGetBitmapBits (HDC hdc, HBITMAP hbm, BOOL fSelect,
  229.         USHORT cLines, PBYTE pBits);
  230. HBITMAP EXPENTRY WtiCreateCompatibleBitmap (HPS hps, USHORT cx, USHORT cy);
  231. ULONG EXPENTRY WtiDevQueryCaps (HDC hdc, USHORT index);
  232.  
  233. int EXPENTRY WtiDlgFile(HWND hwndOwner, PDLF pdlf);
  234. BOOL EXPENTRY WtiOpenFile(PSZ pszFileIn, PHANDLE hf, PSZ pszFileOpen,
  235.         USHORT usOFMode);
  236. VOID EXPENTRY WtiAddExt(PSZ pszFile, PSZ pszExt);
  237. PSZ  EXPENTRY WtiFileInPath(PSZ pszPath);
  238. SHORT EXPENTRY WtiLogo(HWND hwndMainFrame, PSZ pszApp, PSZ pszVersion,
  239.         PSZ pszIBM, PSZ pszMS);
  240. #endif
  241. #endif
  242.  
  243. #endif /* INCL_TKTP */
  244.  
  245. /* NOINC */
  246. #ifdef __IBMC__
  247.    #pragma checkout( suspend )
  248.       #ifndef __CHKHDR__
  249.          #pragma checkout( resume )
  250.       #endif
  251.    #pragma checkout( resume )
  252. #endif
  253. /* INC */
  254.  
  255. /**************************** end of file **********************************/
  256.