Source code of Windows XP (NT5)
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.

88 lines
2.4 KiB

  1. //
  2. // Update Shared Regions
  3. //
  4. #ifndef _H_USR
  5. #define _H_USR
  6. //
  7. //
  8. // CONSTANTS
  9. //
  10. //
  11. //
  12. // Drawing order support constants.
  13. //
  14. #define MAX_X_SIZE 128
  15. #define MEGA_X_SIZE 256
  16. #define MEGA_WIDE_X_SIZE 1024
  17. //
  18. // Used for bitmap and cache hatching.
  19. //
  20. #define USR_HATCH_COLOR_RED 1
  21. #define USR_HATCH_COLOR_BLUE 2
  22. //
  23. // Default order packet sizes.
  24. //
  25. // Note that this is the size of the initially allocated packet. After the
  26. // packet has been processed by the General Data Compressor (GDC) the
  27. // transmitted packet size may well be smaller than the specified value.
  28. //
  29. // Also note that (in general) the smaller the order packets are, the worse
  30. // the GDC compression ratio will be (it prefers to compress big packets).
  31. //
  32. //
  33. #define SMALL_ORDER_PACKET_SIZE 0x0C00
  34. #define LARGE_ORDER_PACKET_SIZE 0x7800
  35. //
  36. //
  37. // PROTOTYPES
  38. //
  39. //
  40. //
  41. //
  42. // Force the window to redraw along with all its children. (Need to use
  43. // RDW_ERASENOW flag because otherwise RedrawWindow makes the mistake of
  44. // posting the WM_PAINT before the WM_ERASE. BeginPaint call will validate
  45. // all of the window so the WM_ERASE will have a null update region).
  46. //
  47. #if defined(DLL_CORE) || defined(DLL_HOOK)
  48. void __inline USR_RepaintWindow(HWND hwnd)
  49. {
  50. UINT flags = RDW_FRAME | RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN;
  51. if (hwnd)
  52. {
  53. //
  54. // Only erasenow/updatenow for top level windows. The desktop's
  55. // children are all on different threads, this would cause out-of-
  56. // order results.
  57. //
  58. flags |= RDW_ERASENOW | RDW_UPDATENOW;
  59. }
  60. RedrawWindow(hwnd, NULL, NULL, flags);
  61. }
  62. #endif // DLL_CORE or DLL_HOOK
  63. #endif // _H_USR