Author: gadamopoulos
Date: Mon Jul 11 13:17:39 2011
New Revision: 52632

URL: http://svn.reactos.org/svn/reactos?rev=52632&view=rev
Log:
[uxtheme]
- Move some definitions to a header file

Added:
    branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h   (with props)
Modified:
    branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c

Added: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h
URL: 
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h?rev=52632&view=auto
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h (added)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h [iso-8859-1] Mon 
Jul 11 13:17:39 2011
@@ -1,0 +1,48 @@
+
+typedef struct _DRAW_CONTEXT
+{
+    HWND hWnd;
+    HDC hDC;
+    HTHEME theme; 
+    WINDOWINFO wi;
+    BOOL Active; /* wi.dwWindowStatus isn't correct for mdi child windows */
+    HRGN hRgn;
+    int CaptionHeight;
+
+    /* for double buffering */
+    HDC hDCScreen;
+    HBITMAP hbmpOld;
+} DRAW_CONTEXT, *PDRAW_CONTEXT;
+
+typedef enum 
+{
+    CLOSEBUTTON,
+    MAXBUTTON,
+    MINBUTTON,
+    HELPBUTTON
+} CAPTIONBUTTON;
+
+/*
+The following values specify all possible vutton states
+Note that not all of them are documented but it is easy to 
+find them by opening a theme file
+*/
+typedef enum {
+    BUTTON_NORMAL = 1 ,
+    BUTTON_HOT ,
+    BUTTON_PRESSED ,
+    BUTTON_DISABLED ,
+    BUTTON_INACTIVE
+} THEME_BUTTON_STATES;
+
+#define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect) 
\
+            ((!(Style & WS_CHILD) && (Style & WS_THICKFRAME) && !(Style & 
WS_MAXIMIZE))  || \
+             ((Style & WS_CHILD) && (ParentStyle & WS_THICKFRAME) && 
!(ParentStyle & WS_MAXIMIZE) && \
+             (WindowRect.right - WindowRect.left == ParentClientRect.right) && 
\
+             (WindowRect.bottom - WindowRect.top == ParentClientRect.bottom)))
+
+#define HAS_MENU(hwnd,style)  ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) 
&& GetMenu(hwnd))
+
+#define BUTTON_GAP_SIZE 2
+
+#define MENU_BAR_ITEMS_SPACE (12)

Propchange: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c
URL: 
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c?rev=52632&r1=52631&r2=52632&view=diff
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] 
(original)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] 
Mon Jul 11 13:17:39 2011
@@ -12,58 +12,11 @@
 #include "vfwmsgs.h"
 #include "uxtheme.h"
 #include <tmschema.h>
+#include "ncthm.h"
 
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
-
-typedef struct _DRAW_CONTEXT
-{
-    HWND hWnd;
-    HDC hDC;
-    HTHEME theme; 
-    WINDOWINFO wi;
-    BOOL Active; /* wi.dwWindowStatus isn't correct for mdi child windows */
-    HRGN hRgn;
-    int CaptionHeight;
-
-    /* for double buffering */
-    HDC hDCScreen;
-    HBITMAP hbmpOld;
-} DRAW_CONTEXT, *PDRAW_CONTEXT;
-
-typedef enum 
-{
-    CLOSEBUTTON,
-    MAXBUTTON,
-    MINBUTTON,
-    HELPBUTTON
-} CAPTIONBUTTON;
-
-/*
-The following values specify all possible vutton states
-Note that not all of them are documented but it is easy to 
-find them by opening a theme file
-*/
-typedef enum {
-    BUTTON_NORMAL = 1 ,
-    BUTTON_HOT ,
-    BUTTON_PRESSED ,
-    BUTTON_DISABLED ,
-    BUTTON_INACTIVE
-} THEME_BUTTON_STATES;
-
-#define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect) 
\
-            ((!(Style & WS_CHILD) && (Style & WS_THICKFRAME) && !(Style & 
WS_MAXIMIZE))  || \
-             ((Style & WS_CHILD) && (ParentStyle & WS_THICKFRAME) && 
!(ParentStyle & WS_MAXIMIZE) && \
-             (WindowRect.right - WindowRect.left == ParentClientRect.right) && 
\
-             (WindowRect.bottom - WindowRect.top == ParentClientRect.bottom)))
-
-#define HAS_MENU(hwnd,style)  ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) 
&& GetMenu(hwnd))
-
-#define BUTTON_GAP_SIZE 2
-
-#define MENU_BAR_ITEMS_SPACE (12)
 
 HFONT hMenuFont = NULL;
 HFONT hMenuFontBold = NULL;
@@ -1094,4 +1047,4 @@
     default:
         return DefWndProc(hWnd, Msg, wParam, lParam);
     }
-}
+}


Reply via email to