Leaked source code of windows server 2003
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.

76 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. pdev.h
  5. Abstract:
  6. Unidrv PDEV and related infor header file.
  7. Environment:
  8. Windows NT Unidrv driver
  9. Revision History:
  10. dd-mm-yy -author-
  11. description
  12. --*/
  13. #ifndef _PALETTE_H_
  14. #define _PALETTE_H_
  15. #define PALETTE_MAX 256
  16. typedef struct _PAL_DATA {
  17. INT iWhiteIndex; // Index for white entry (background)
  18. INT iBlackIndex; // Index for black entry (background)
  19. WORD wPalGdi; // Number of colors in GDI palette
  20. WORD wPalDev; // Number of colors in printer palette
  21. WORD fFlags; // Various Bit Flags.
  22. WORD wIndexToUse; // Progammable index
  23. ULONG *pulDevPalCol; // Device Palette entry, only in planer mode.
  24. HPALETTE hPalette; // Palette Handle
  25. ULONG ulPalCol[ PALETTE_MAX ]; // GDI Palette enties
  26. } PAL_DATA;
  27. //
  28. // Macro Definitions
  29. //
  30. #define PALETTE_SIZE_DEFAULT 2
  31. #define PALETTE_SIZE_8BIT 256
  32. #define PALETTE_SIZE_24BIT 8
  33. #define PALETTE_SIZE_4BIT 16
  34. #define PALETTE_SIZE_3BIT 8
  35. #define PALETTE_SIZE_1BIT 2
  36. #define RGB_BLACK_COLOR 0x00000000
  37. #define RGB_WHITE_COLOR 0x00FFFFFF
  38. #define INVALID_COLOR 0xFFFFFFFF
  39. #define INVALID_INDEX 0xFFFF
  40. //fMode Flags
  41. #define PDF_DOWNLOAD_GDI_PALETTE 0x0001
  42. #define PDF_PALETTE_FOR_24BPP 0x0002
  43. #define PDF_PALETTE_FOR_8BPP 0x0004
  44. #define PDF_PALETTE_FOR_4BPP 0x0008
  45. #define PDF_PALETTE_FOR_1BPP 0x0010
  46. #define PDF_USE_WHITE_ENTRY 0x0020
  47. #define PDF_DL_PAL_EACH_PAGE 0x0040
  48. #define PDF_DL_PAL_EACH_DOC 0x0080
  49. #define PDF_PALETTE_FOR_8BPP_MONO 0x0100
  50. #define PDF_PALETTE_FOR_OEM_24BPP 0x0200
  51. /* defines for color manipulation */
  52. #define RED_VALUE(c) ((BYTE) c & 0xff)
  53. #define GREEN_VALUE(c) ((BYTE) (c >> 8) & 0xff)
  54. #define BLUE_VALUE(c) ((BYTE) (c >> 16) & 0xff)
  55. #endif // !_PALETTE_H