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.

70 lines
1.1 KiB

  1. //
  2. // Order Decoder
  3. //
  4. #ifndef _H_OD
  5. #define _H_OD
  6. //
  7. // Max # of accumulated bound rects we'll save in the total invalid
  8. // region before simplifying it.
  9. //
  10. #define MAX_UPDATE_REGION_ORDERS 300
  11. //
  12. // Constants used by ODAdjustVGAColor (qv)
  13. //
  14. enum
  15. {
  16. OD_BACK_COLOR = 0,
  17. OD_FORE_COLOR = 1,
  18. OD_PEN_COLOR = 2,
  19. // number of the above colors.
  20. OD_NUM_COLORS = 3
  21. };
  22. COLORREF __inline ODCustomRGB(BYTE r, BYTE g, BYTE b, BOOL fPaletteRGB)
  23. {
  24. if (fPaletteRGB)
  25. {
  26. return(PALETTERGB(r, g, b));
  27. }
  28. else
  29. {
  30. return(RGB(r, g, b));
  31. }
  32. }
  33. //
  34. // Structure used by ODAdjustVGAColor (qv)
  35. //
  36. typedef struct tagOD_ADJUST_VGA_STRUCT
  37. {
  38. COLORREF color;
  39. UINT addMask;
  40. UINT andMask;
  41. UINT testMask;
  42. TSHR_COLOR result;
  43. }
  44. OD_ADJUST_VGA_STRUCT;
  45. //
  46. // This internal routine is implemented as a macro rather than a function.
  47. //
  48. UINT __inline ODConvertToWindowsROP(UINT bRop)
  49. {
  50. extern const UINT s_odWindowsROPs[256];
  51. ASSERT(bRop < 256);
  52. return(s_odWindowsROPs[bRop]);
  53. }
  54. #endif // _H_OD