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.

68 lines
2.9 KiB

  1. //
  2. // Mirroring-Support APIs (astracted in \mailnews\lib\mirror\rtlmir.cpp)
  3. //
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifdef USE_MIRRORING
  8. BOOL IsBiDiLocalizedSystem( void );
  9. BOOL Mirror_IsEnabledOS( void );
  10. LANGID Mirror_GetUserDefaultUILanguage( void );
  11. LONG Mirror_EnableWindowLayoutInheritance( HWND hWnd );
  12. LONG Mirror_DisableWindowLayoutInheritance( HWND hWnd );
  13. BOOL Mirror_IsWindowMirroredRTL( HWND hWnd );
  14. DWORD Mirror_IsDCMirroredRTL( HDC hdc );
  15. DWORD Mirror_MirrorDC( HDC hdc );
  16. BOOL Mirror_MirrorProcessRTL( void );
  17. DWORD Mirror_SetLayout( HDC hdc , DWORD dwLayout );
  18. BOOL Mirror_GetProcessDefaultLayout( DWORD *pdwDefaultLayout );
  19. BOOL Mirror_IsProcessRTL( void );
  20. extern const DWORD dwNoMirrorBitmap;
  21. extern const DWORD dwExStyleRTLMirrorWnd;
  22. extern const DWORD dwPreserveBitmap;
  23. //
  24. // 'g_bMirroredOS' is defined in each component which will use the
  25. // mirroring APIs. I decided to put it here, in order to make sure
  26. // each component has validated that the OS supports the mirroring
  27. // APIs before calling them.
  28. //
  29. #define IS_BIDI_LOCALIZED_SYSTEM() IsBiDiLocalizedSystem()
  30. #define IS_MIRRORING_ENABLED() Mirror_IsEnabledOS()
  31. #define ENABLE_LAYOUT_INHERITANCE(hWnd) Mirror_EnableWindowLayoutInheritance( hWnd )
  32. #define DISABLE_LAYOUT_INHERITANCE(hWnd) Mirror_DisableWindowLayoutInheritance( hWnd )
  33. #define IS_WINDOW_RTL_MIRRORED(hwnd) (g_bMirroredOS && Mirror_IsWindowMirroredRTL(hwnd))
  34. #define IS_DC_RTL_MIRRORED(hdc) (g_bMirroredOS && Mirror_IsDCMirroredRTL(hdc))
  35. #define GET_PROCESS_DEF_LAYOUT(pdwl) (g_bMirroredOS && Mirror_GetProcessDefaultLayout(pdwl))
  36. #define IS_PROCESS_RTL_MIRRORED() (g_bMirroredOS && Mirror_IsProcessRTL())
  37. #define SET_DC_RTL_MIRRORED(hdc) Mirror_MirrorDC(hdc)
  38. #define SET_DC_LAYOUT(hdc,dwl) Mirror_SetLayout(hdc,dwl)
  39. #define SET_PROCESS_RTL_LAYOUT() Mirror_MirrorProcessRTL()
  40. #define DONTMIRRORBITMAP dwNoMirrorBitmap
  41. #define RTL_MIRRORED_WINDOW dwExStyleRTLMirrorWnd
  42. #define LAYOUT_PRESERVEBITMAP dwPreserveBitmap
  43. #else
  44. #define IS_BIDI_LOCALIZED_SYSTEM() FALSE
  45. #define IS_MIRRORING_ENABLED() FALSE
  46. #define IS_WINDOW_RTL_MIRRORED(hwnd) FALSE
  47. #define IS_DC_RTL_MIRRORED(hdc) FALSE
  48. #define GET_PROCESS_DEF_LAYOUT(pdwl) FALSE
  49. #define IS_PROCESS_RTL_MIRRORED() FALSE
  50. #define SET_DC_RTL_MIRRORED(hdc)
  51. #define SET_DC_LAYOUT(hdc,dwl)
  52. #define SET_PROCESS_DEFAULT_LAYOUT()
  53. #define ENABLE_LAYOUT_INHERITANCE(hWnd) 0L
  54. #define DISABLE_LAYOUT_INHERITANCE(hWnd) 0L
  55. #define DONTMIRRORBITMAP 0L
  56. #define RTL_MIRRORED_WINDOW 0L
  57. #define LAYOUT_PRESERVEBITMAP 0L
  58. // MirLibIsOS(): returns TRUE/FALSE if the platform is the indicated OS.
  59. STDAPI_(BOOL) MirLibIsOS(DWORD dwOS);
  60. #endif // USE_MIRRROING
  61. #ifdef __cplusplus
  62. };
  63. #endif