home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gbmos2pm.zip / gbmv2 / bmputils.h < prev    next >
C/C++ Source or Header  |  1996-11-15  |  1KB  |  54 lines

  1. /*
  2.  
  3. bmputils.h - PM Bitmap utilities
  4.  
  5. All bitmaps referred to below should not be selected into a hps at time of
  6. call. They will be selected into screen or printer compatible hps's during the
  7. call and be unselected afterwards. Because of this, you will find that the
  8. colours change in the bitmap when using the BmpPrint call. The solution is
  9. to copy the desired bitmap, call BmpPrint on it, then to discard it.
  10.  
  11. */
  12.  
  13. #ifndef BMPUTILS_H
  14. #define    BMPUTILS_H
  15.  
  16. typedef USHORT BMP_ERR;
  17. #define    BMP_ERR_OK    0        /* All went ok                       */
  18. #define    BMP_ERR_MEM    1        /* Out of memory                     */
  19. #define    BMP_ERR_RES    2        /* Out of PM resources (DC, PS etc.) */
  20. #define    BMP_ERR_QUERY    3        /* Can't query queue info            */
  21. #define    BMP_ERR_PRINTER    4        /* Can't find the printer            */
  22. #define    BMP_ERR_PRINT    5        /* Error in the printing itself      */
  23.  
  24. #ifndef _BMPUTILS_
  25.  
  26. extern BMP_ERR BmpBlitter(
  27.     HAB hab,
  28.     HBITMAP hbmSrc, RECTL rclSrc,
  29.     HBITMAP hbmDst, RECTL rclDst
  30.     );
  31.  
  32. extern BMP_ERR BmpCopySubrectangle(
  33.     HAB hab,
  34.     HBITMAP hbmSrc,
  35.     RECTL rclSrc,
  36.     HBITMAP *phbmDst
  37.     );
  38.  
  39. extern BMP_ERR BmpCopy(HAB hab, HBITMAP hbmSrc, HBITMAP *phbmDst);
  40.  
  41. extern BMP_ERR BmpPrint(
  42.     HAB hab,
  43.     HBITMAP hbm, LONG lColorFg, LONG lColorBg,
  44.     const CHAR *szDocName,
  45.     const CHAR *szComment,
  46.     CHAR *szQueueToUse
  47.     );
  48.  
  49. extern CHAR *BmpErrorMessage(BMP_ERR rc, CHAR *sz);
  50.  
  51. #endif
  52.  
  53. #endif
  54.