Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.2 KiB

  1. /*
  2. File: PMRaster.h
  3. Contains: Mac OS X Printing Manager Raster Definitions.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1999-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __MACTYPES__
  11. #include <MacTypes.h>
  12. #endif
  13. /* MIME type for our raster format (will move to PMDefinitions.h) */
  14. #if PRAGMA_ONCE
  15. #pragma once
  16. #endif
  17. #if PRAGMA_IMPORT
  18. #pragma import on
  19. #endif
  20. #if PRAGMA_STRUCT_ALIGN
  21. #pragma options align=mac68k
  22. #elif PRAGMA_STRUCT_PACKPUSH
  23. #pragma pack(push, 2)
  24. #elif PRAGMA_STRUCT_PACK
  25. #pragma pack(2)
  26. #endif
  27. #define kPMDataFormatRaster CFSTR("application/vnd.apple.printing-raster")
  28. typedef UInt32 PMPixelLayout;
  29. enum {
  30. kPMDataPlanar = 0x0001, /* One color for all pixels, followed by next color. */
  31. kPMDataChunky = 0x0002, /* All colors for each pixel before next pixel. */
  32. kPMDataUnused = 0xFFFC /* Remaining bits not used at this time. */
  33. };
  34. /* Pixel formats supported at this time: */
  35. typedef UInt32 PMPixelFormat;
  36. enum {
  37. kPMGray_1 = 0x0001, /* 1 bit gray scale (B/W) data only (not implemented). */
  38. kPMGray_8 = 0x0002, /* 8 bit grayscale. 256 possible values, no color table assumed */
  39. kPMRGB_16 = 0x0004, /* 16 bit, 5-5-5 RGB data, with MSB unused. */
  40. kPMRGB_24 = 0x0008, /* 24 bit, 8-8-8 RGB data, no unused bits or bytes. */
  41. kPMXRGB_32 = 0x0010, /* 32 bit x-8-8-8 RGB data, first byte unused in each pixel. */
  42. kPMRGBX_32 = 0x0020, /* 32 bit 8-8-8-x RGB data, last byte unused in each pixel. */
  43. kPMRGBX_32_Sep_Gray_8 = 0x0040, /* Same as kPMRGBX_32 but with an extra plane of 8-bit K-separation. */
  44. kPMCMYK_32 = 0x0080, /* 32 bit 8-8-8-8 CMYK data. All bytes used. */
  45. kPMUnused = 0xFF00 /* Remaining bits are unused for now and should be clear. */
  46. };
  47. typedef UInt32 PMBandOrder;
  48. enum {
  49. kPMFirstBand = 0x0000, /* First band of the frame */
  50. kPMMiddleBand = 0x0001, /* Mid-pack band */
  51. kPMLastBand = 0x0002, /* Last band */
  52. kPMLoneBand = 0x0003 /* The only band (whole frame) */
  53. };
  54. /* PMRasterBand: */
  55. struct PMRasterBand {
  56. Ptr baseAddress; /* ptr to where data is stored */
  57. UInt32 size; /* #bytes in band */
  58. UInt32 yOffset; /* Band position in the page. */
  59. UInt32 height; /* How many scanlines in this band. */
  60. UInt32 depth; /* How many bits per pixel for this band. */
  61. PMBandOrder order; /* band order in page: first, middle, last, lone. */
  62. };
  63. typedef struct PMRasterBand PMRasterBand;
  64. #if PRAGMA_STRUCT_ALIGN
  65. #pragma options align=reset
  66. #elif PRAGMA_STRUCT_PACKPUSH
  67. #pragma pack(pop)
  68. #elif PRAGMA_STRUCT_PACK
  69. #pragma pack()
  70. #endif
  71. #ifdef PRAGMA_IMPORT_OFF
  72. #pragma import off
  73. #elif PRAGMA_IMPORT
  74. #pragma import reset
  75. #endif