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.

116 lines
3.7 KiB

  1. //
  2. // candutil.h
  3. //
  4. #ifndef CANDUTIL_H
  5. #define CANDUTIL_H
  6. #include "private.h"
  7. //
  8. // definitions
  9. //
  10. // direction (CreateRotateBitmap)
  11. typedef enum {
  12. CANGLE0,
  13. CANGLE90,
  14. CANGLE180,
  15. CANGLE270,
  16. } CANDANGLE;
  17. // window alignment (CalcWindowRect)
  18. typedef enum {
  19. ALIGN_LEFT,
  20. ALIGN_RIGHT,
  21. LOCATE_LEFT,
  22. LOCATE_RIGHT,
  23. } WNDALIGNH;
  24. typedef enum {
  25. ALIGN_TOP,
  26. ALIGN_BOTTOM,
  27. LOCATE_ABOVE,
  28. LOCATE_BELLOW,
  29. } WNDALIGNV;
  30. // non-client font
  31. typedef enum _NONCLIENTFONT {
  32. NCFONT_CAPTION,
  33. NCFONT_SMCAPTION,
  34. NCFONT_MENU,
  35. NCFONT_STATUS,
  36. NCFONT_MESSAGE,
  37. } NONCLIENTFONT;
  38. // DrawCtrlTriangle flags
  39. #define UIFDCTF_RIGHTTOLEFT 0x00000000
  40. #define UIFDCTF_BOTTOMTOTOP 0x00000001
  41. #define UIFDCTF_LEFTTORIGHT 0x00000002
  42. #define UIFDCTF_TOPTOBOTTOM 0x00000003
  43. #define UIFDCTF_MENUDROP 0x00010003
  44. #define UIFDCTF_DIRMASK 0x00000003
  45. //
  46. // theme API definition
  47. //
  48. typedef HANDLE HTHEME; // handle to a section of theme data for class
  49. //
  50. // functions
  51. //
  52. extern BOOL FIsWindowsNT( void );
  53. extern UINT CpgFromChs( BYTE chs );
  54. extern void ConvertLogFontWtoA( CONST LOGFONTW *plfW, LOGFONTA *plfA );
  55. extern void ConvertLogFontAtoW( CONST LOGFONTA *plfA, LOGFONTW *plfW );
  56. extern HFONT OurCreateFontIndirectW( CONST LOGFONTW *plfW );
  57. extern int GetFontHeightOfFont( HDC hDC, HFONT hFont );
  58. extern int CompareString( LPCWSTR pchStr1, LPCWSTR pchStr2, int cch );
  59. extern HBITMAP CreateRotateBitmap( HBITMAP hBmpSrc, HPALETTE hPalette, CANDANGLE angle );
  60. extern void GetTextExtent( HFONT hFont, LPCWSTR pwchText, int cch, SIZE *psize, BOOL fHorizontal );
  61. extern void GetWorkAreaFromWindow( HWND hWindow, RECT *prc );
  62. extern void GetWorkAreaFromPoint( POINT pt, RECT *prcWorkArea );
  63. extern void AdjustWindowRect( HWND hWindow, RECT *prc, POINT *pptRef, BOOL fResize );
  64. extern void CalcWindowRect( RECT *prcTrg, const RECT *prcSrc, int cxWindow, int cyWindow, int cxOffset, int cyOffset, WNDALIGNH HAlign, WNDALIGNV VAlign );
  65. extern void GetLogFont( HFONT hFont, LOGFONTW *plf );
  66. extern void GetNonClientLogFont( NONCLIENTFONT ncfont, LOGFONTW *plf );
  67. extern void DrawTriangle( HDC hDC, const RECT *prc, COLORREF col, DWORD dwDirection );
  68. extern void InitCandUISecurityAttributes( void );
  69. extern void DoneCandUISecurityAttributes( void );
  70. PSECURITY_ATTRIBUTES GetCandUISecurityAttributes( void );
  71. #if 0
  72. //
  73. // theme API functions
  74. //
  75. extern BOOL FIsThemeAPIAvail( void );
  76. extern BOOL OurIsThemeActive( void );
  77. extern HTHEME OurOpenThemeData( HWND hwnd, LPCWSTR pszClassList );
  78. extern HRESULT OurCloseThemeData( HTHEME hTheme );
  79. extern HRESULT OurDrawThemeBackground( HTHEME hTheme, HDC hDC, int iPartId, int iStateId, const RECT *pRect, DWORD dwBgFlags );
  80. extern HRESULT OurDrawThemeText( HTHEME hTheme, HDC hDC, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect );
  81. extern HRESULT OurDrawThemeIcon( HTHEME hTheme, HDC hDC, int iPartId, int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex );
  82. extern HRESULT OurGetThemeBackgroundExtent( HTHEME hTheme, HDC hDC, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect );
  83. extern HRESULT OurGetThemeBackgroundContentRect( HTHEME hTheme, HDC hDC, int iPartId, int iStateId, const RECT *pBoundingRect, RECT *pContentRect );
  84. extern HRESULT OurGetThemeTextExtent( HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, const RECT *pBoundingRect, RECT *pExtentRect );
  85. extern HRESULT OurGetThemePartSize( HTHEME hTheme, HDC hDC, int iPartId, int iStateId, enum THEMESIZE eSize, SIZE *pSize );
  86. #endif
  87. #endif /* CANDUTIL_H */