[UXTHEME] -Rename WND_CONTEXT to WND_DATA to avoid confusion with the DRAW_CONTEXT...
[reactos.git] / reactos / dll / win32 / uxtheme / uxthemep.h
index e6eaa41..08a57cb 100644 (file)
@@ -14,6 +14,7 @@
 #include <winnls.h>
 #include <windowsx.h>
 #include <undocuser.h>
+#include <undocgdi.h>
 #include <uxtheme.h>
 #include <uxundoc.h>
 #include <vfwmsgs.h>
@@ -85,6 +86,9 @@ typedef struct _THEME_FILE {
 
 typedef struct _UXINI_FILE *PUXINI_FILE;
 
+HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph,
+                          HBITMAP *hBmp, RECT *bmpRect, BOOL* hasImageAlpha);
+
 BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId);
 BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue);
 BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId);
@@ -118,16 +122,36 @@ BOOL UXINI_FindSection(PUXINI_FILE uf, LPCWSTR lpName);
 LPCWSTR UXINI_GetNextValue(PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen);
 BOOL UXINI_FindValue(PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen);
 
+  /* Scroll-bar hit testing */
+enum SCROLL_HITTEST
+{
+    SCROLL_NOWHERE,      /* Outside the scroll bar */
+    SCROLL_TOP_ARROW,    /* Top or left arrow */
+    SCROLL_TOP_RECT,     /* Rectangle between the top arrow and the thumb */
+    SCROLL_THUMB,        /* Thumb rectangle */
+    SCROLL_BOTTOM_RECT,  /* Rectangle between the thumb and the bottom arrow */
+    SCROLL_BOTTOM_ARROW  /* Bottom or right arrow */
+};
 
 /* The window context stores data for the window needed through the life of the window */
-typedef struct _WND_CONTEXT
+typedef struct _WND_DATA
 {
     UINT lastHitTest;
     BOOL HasAppDefinedRgn;
     BOOL HasThemeRgn;
     BOOL UpdatingRgn;
     BOOL DirtyThemeRegion;
-} WND_CONTEXT, *PWND_CONTEXT;
+    HBRUSH hTabBackgroundBrush;
+    HBITMAP hTabBackgroundBmp;
+
+    BOOL SCROLL_trackVertical;
+    enum SCROLL_HITTEST SCROLL_trackHitTest;
+    BOOL SCROLL_MovingThumb;  /* Is the moving thumb being displayed? */
+    HWND SCROLL_TrackingWin;
+    INT  SCROLL_TrackingBar;
+    INT  SCROLL_TrackingPos;
+    INT  SCROLL_TrackingVal;
+} WND_DATA, *PWND_DATA;
 
 /* The draw context stores data that are needed by the drawing operations in the non client area of the window */
 typedef struct _DRAW_CONTEXT
@@ -156,7 +180,7 @@ typedef enum
 } CAPTIONBUTTON;
 
 /*
-The following values specify all possible vutton states
+The following values specify all possible button states
 Note that not all of them are documented but it is easy to 
 find them by opening a theme file
 */
@@ -168,17 +192,6 @@ typedef enum {
     BUTTON_INACTIVE
 } THEME_BUTTON_STATES;
 
-  /* Scroll-bar hit testing */
-enum SCROLL_HITTEST
-{
-    SCROLL_NOWHERE,      /* Outside the scroll bar */
-    SCROLL_TOP_ARROW,    /* Top or left arrow */
-    SCROLL_TOP_RECT,     /* Rectangle between the top arrow and the thumb */
-    SCROLL_THUMB,        /* Thumb rectangle */
-    SCROLL_BOTTOM_RECT,  /* Rectangle between the thumb and the bottom arrow */
-    SCROLL_BOTTOM_ARROW  /* Bottom or right arrow */
-};
-
 #define HT_ISBUTTON(ht) ((ht) == HTMINBUTTON || (ht) == HTMAXBUTTON || (ht) == HTCLOSE || (ht) == HTHELP)
 
 #define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect) \
@@ -215,11 +228,11 @@ void  ThemeDrawScrollBar(PDRAW_CONTEXT pcontext, INT Bar, POINT* pt);
 VOID NC_TrackScrollBar(HWND Wnd, WPARAM wParam, POINT Pt);
 void ThemeInitDrawContext(PDRAW_CONTEXT pcontext, HWND hWnd, HRGN hRgn);
 void ThemeCleanupDrawContext(PDRAW_CONTEXT pcontext);
-PWND_CONTEXT ThemeGetWndContext(HWND hWnd);
+PWND_DATA ThemeGetWndData(HWND hWnd);
 
 extern HINSTANCE hDllInst;
 extern ATOM atWindowTheme;
-extern ATOM atWndContrext;
+extern ATOM atWndContext;
 extern BOOL gbThemeHooksActive;
 extern PTHEME_FILE ActiveThemeFile;