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.

87 lines
3.2 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: rops.h
  3. *
  4. * Utility defines and routines for manipulation of rop codes.
  5. *
  6. * Copyright (c) 1998 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. #ifndef __ROPS__
  10. #define __ROPS__
  11. //------------------------------------------------------------------------------
  12. //
  13. // ULONG MixToRop4(MIX mix) - Translates a MIX into a ROP3.
  14. //
  15. //------------------------------------------------------------------------------
  16. extern ULONG gaMix[];
  17. #define MixToRop4(mix) \
  18. (( gaMix[mix >> 8] << 8) | gaMix[mix & 0xf])
  19. //------------------------------------------------------------------------------
  20. //
  21. // Some usefull ROP3 code defines
  22. //
  23. //------------------------------------------------------------------------------
  24. #define ROP3_NOP 0xAA
  25. #define ROP3_SRCCOPY (SRCCOPY >> 16) // 0xCC
  26. #define ROP3_SRCPAINT (SRCPAINT >> 16) // 0xEE
  27. #define ROP3_SRCAND (SRCAND >> 16) // 0x88
  28. #define ROP3_SRCINVERT (SRCINVERT >> 16) // 0x66
  29. #define ROP3_SRCERASE (SRCERASE >> 16) // 0x44
  30. #define ROP3_NOTSRCCOPY (NOTSRCCOPY >> 16) // 0x33
  31. #define ROP3_NOTSRCERASE (NOTSRCERASE >> 16) // 0x11
  32. #define ROP3_MERGECOPY (MERGECOPY >> 16) // 0xC0
  33. #define ROP3_MERGEPAINT (MERGEPAINT >> 16) // 0xBB
  34. #define ROP3_PATCOPY (PATCOPY >> 16) // 0xF0
  35. #define ROP3_PATPAINT (PATPAINT >> 16) // 0xFB
  36. #define ROP3_PATINVERT (PATINVERT >> 16) // 0x5A
  37. #define ROP3_DSTINVERT (DSTINVERT >> 16) // 0x55
  38. #define ROP3_BLACKNESS (BLACKNESS >> 16) // 0x00
  39. #define ROP3_WHITENESS (WHITENESS >> 16) // 0xFF
  40. //------------------------------------------------------------------------------
  41. //
  42. // Some usefull ROP4 code defines
  43. //
  44. //------------------------------------------------------------------------------
  45. #define ROP4_SRCCOPY (ROP3_SRCCOPY | (ROP3_SRCCOPY << 8)) // 0xCCCC
  46. #define ROP4_NOTSRCCOPY (ROP3_NOTSRCCOPY | (ROP3_NOTSRCCOPY << 8)) // 0x3333
  47. #define ROP4_NOP (ROP3_NOP | (ROP3_NOP << 8)) // 0xAAAA
  48. #define ROP4_PATCOPY (ROP3_PATCOPY | (ROP3_PATCOPY << 8)) // 0xFOFO
  49. #define ROP4_BLACKNESS (ROP3_BLACKNESS | (ROP3_BLACKNESS << 8)) // 0x0000
  50. #define ROP4_WHITENESS (ROP3_WHITENESS | (ROP3_WHITENESS << 8)) // 0xFFFF
  51. //------------------------------------------------------------------------------
  52. //
  53. // ULONG ulRop3ToLogicop
  54. //
  55. //
  56. // Convert a source invariant rop3 code into a hardware specific logical
  57. // operation.
  58. // Note we could instead define this routine as a macro.
  59. //
  60. //------------------------------------------------------------------------------
  61. extern ULONG ulRop3ToLogicop(ULONG ucRop3);
  62. //------------------------------------------------------------------------------
  63. //
  64. // ULONG ulRop2ToLogicop
  65. //
  66. // Convert a rop2 code into a hardware dependent logical operation.
  67. // Note we could instead define this routine as a macro.
  68. //
  69. //------------------------------------------------------------------------------
  70. extern ULONG ulRop2ToLogicop(ULONG ucRop2);
  71. #endif // __ROPS__