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.

82 lines
2.4 KiB

  1. #ifndef __LPKGLOBAL__
  2. #define __LPKGLOBAL__
  3. ///// LPK_GLOB - LPK Global variable structure
  4. //
  5. // The following data is global to each process.
  6. //
  7. // This structure is instantiated with the name G by GAD.C. hence
  8. // any code can refer to these variables as G.xxx.
  9. //
  10. //
  11. // Copyright(c) 1997 - 1999. Microsoft Corporation.
  12. //
  13. #include <windows.h>
  14. #include <usp10.h>
  15. #include <wingdip.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #ifdef LPKGLOBALHERE
  20. #define LPKGLOBAL
  21. #else
  22. #define LPKGLOBAL extern
  23. #endif
  24. LPKGLOBAL UINT g_ACP; // System default codepage
  25. LPKGLOBAL LCID g_UserLocale; // User default locale
  26. LPKGLOBAL LANGID g_UserPrimaryLanguage; // Primary language for user default locale
  27. LPKGLOBAL BOOL g_UserBidiLocale; // Whether User default locale is Bidi
  28. LPKGLOBAL SCRIPT_DIGITSUBSTITUTE g_DigitSubstitute; // Users choice of digit substitution
  29. LPKGLOBAL HKEY g_hCPIntlInfoRegKey; // Handle to Control Panel\International Registry Key
  30. LPKGLOBAL HANDLE g_hNLSWaitThread; // Thread Handle
  31. LPKGLOBAL int g_iUseFontLinking; // Set when GDI supports font linking
  32. LPKGLOBAL const SCRIPT_PROPERTIES **g_ppScriptProperties; // Array of pointers to properties
  33. LPKGLOBAL int g_iMaxScript;
  34. LPKGLOBAL ULONG g_ulNlsUpdateCacheCount; // NLS Update Cache Count
  35. LPKGLOBAL DWORD g_dwLoadedShapingDLLs; // Each shapping engin has a bit in this dwword.
  36. ///// FontIDCache
  37. //
  38. // Used to cache the font ID with flag tells if the font has Western Script.
  39. // This cache will be used in the optimization for ETO and GTE.
  40. #define MAX_FONT_ID_CACHE 30
  41. LPKGLOBAL CRITICAL_SECTION csFontIdCache;
  42. typedef struct _tagFontIDCache
  43. {
  44. UINT uFontFileID; // Unique ID number
  45. BOOL bHasWestern; // Falgs for the specified font.
  46. } FONTIDCACHE;
  47. LPKGLOBAL FONTIDCACHE g_FontIDCache[MAX_FONT_ID_CACHE];
  48. LPKGLOBAL LONG g_cCachedFontsID; // # of cahced font ID.
  49. LPKGLOBAL LONG g_pCurrentAvailablePos; // where can we cache next font ID.
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif