mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
[uxtheme]
- Move some definitions to a header file svn path=/branches/GSoC_2011/ThemesSupport/; revision=52632
This commit is contained in:
parent
7d376ed435
commit
17344c6dc6
48
dll/win32/uxtheme/ncthm.h
Normal file
48
dll/win32/uxtheme/ncthm.h
Normal file
|
@ -0,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)
|
|
@ -12,59 +12,12 @@
|
||||||
#include "vfwmsgs.h"
|
#include "vfwmsgs.h"
|
||||||
#include "uxtheme.h"
|
#include "uxtheme.h"
|
||||||
#include <tmschema.h>
|
#include <tmschema.h>
|
||||||
|
#include "ncthm.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
|
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 hMenuFont = NULL;
|
||||||
HFONT hMenuFontBold = NULL;
|
HFONT hMenuFontBold = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue