Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
eea41530
Commit
eea41530
authored
Apr 13, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved handling of the 55AA pattern brush to syscolor.c so that it can
be made a system object (found by Rein Klazes).
parent
c2053e1d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
32 deletions
+17
-32
controls.h
dlls/user/controls.h
+0
-3
text.c
dlls/user/text.c
+2
-1
uitools.c
dlls/user/uitools.c
+2
-25
user_private.h
dlls/user/user_private.h
+1
-0
defwnd.c
windows/defwnd.c
+1
-1
nonclient.c
windows/nonclient.c
+1
-1
syscolor.c
windows/syscolor.c
+10
-1
No files found.
dlls/user/controls.h
View file @
eea41530
...
...
@@ -86,9 +86,6 @@ extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
extern
INT
SCROLL_SetNCSbState
(
HWND
hwnd
,
int
vMin
,
int
vMax
,
int
vPos
,
int
hMin
,
int
hMax
,
int
hPos
);
/* UI tools */
extern
HBRUSH
UITOOLS_GetPattern55AABrush
(
void
);
/* combo box */
#define ID_CB_LISTBOX 1000
...
...
dlls/user/text.c
View file @
eea41530
...
...
@@ -39,6 +39,7 @@
#include "winerror.h"
#include "winnls.h"
#include "controls.h"
#include "user_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
text
);
...
...
@@ -1147,7 +1148,7 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN
if
(
retval
||
len
!=
-
1
)
#endif
{
hbsave
=
(
HBRUSH
)
SelectObject
(
memdc
,
UITOOLS_GetPattern55AABrush
()
);
hbsave
=
(
HBRUSH
)
SelectObject
(
memdc
,
SYSCOLOR_55AABrush
);
PatBlt
(
memdc
,
0
,
0
,
cx
,
cy
,
0x000A0329
);
SelectObject
(
memdc
,
hbsave
);
}
...
...
dlls/user/uitools.c
View file @
eea41530
...
...
@@ -32,15 +32,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
graphics
);
static
const
WORD
wPattern55AA
[]
=
{
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
};
static
HBRUSH
hPattern55AABrush
;
static
HBITMAP
hPattern55AABitmap
;
/* These tables are used in:
* UITOOLS_DrawDiagEdge()
* UITOOLS_DrawRectEdge()
...
...
@@ -122,20 +113,6 @@ static const signed char LTRBInnerFlat[] = {
#define COLOR_MAX COLOR_MENUBAR
/*********************************************************************
* UITOOLS_GetPattern55AABrush
*/
HBRUSH
UITOOLS_GetPattern55AABrush
(
void
)
{
if
(
!
hPattern55AABrush
)
{
hPattern55AABitmap
=
CreateBitmap
(
8
,
8
,
1
,
1
,
wPattern55AA
);
hPattern55AABrush
=
CreatePatternBrush
(
hPattern55AABitmap
);
}
return
hPattern55AABrush
;
}
/***********************************************************************
* UITOOLS_DrawDiagEdge
*
...
...
@@ -647,7 +624,7 @@ static void UITOOLS_DrawCheckedRect( HDC dc, LPRECT rect )
FillRect
(
dc
,
rect
,
GetSysColorBrush
(
COLOR_BTNFACE
));
bg
=
SetBkColor
(
dc
,
RGB
(
255
,
255
,
255
));
hbsave
=
SelectObject
(
dc
,
UITOOLS_GetPattern55AABrush
()
);
hbsave
=
SelectObject
(
dc
,
SYSCOLOR_55AABrush
);
PatBlt
(
dc
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
rect
->
bottom
-
rect
->
top
,
0x00FA0089
);
SelectObject
(
dc
,
hbsave
);
SetBkColor
(
dc
,
bg
);
...
...
@@ -1858,7 +1835,7 @@ static BOOL UITOOLS_DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp
/* This state cause the image to be dithered */
if
(
flags
&
DSS_UNION
)
{
hbsave
=
(
HBRUSH
)
SelectObject
(
memdc
,
UITOOLS_GetPattern55AABrush
()
);
hbsave
=
(
HBRUSH
)
SelectObject
(
memdc
,
SYSCOLOR_55AABrush
);
if
(
!
hbsave
)
goto
cleanup
;
tmp
=
PatBlt
(
memdc
,
0
,
0
,
cx
,
cy
,
0x00FA0089
);
SelectObject
(
memdc
,
hbsave
);
...
...
dlls/user/user_private.h
View file @
eea41530
...
...
@@ -121,6 +121,7 @@ extern USER_DRIVER USER_Driver;
extern
HMODULE
user32_module
;
extern
DWORD
USER16_AlertableWait
;
extern
HBRUSH
SYSCOLOR_55AABrush
;
extern
BOOL
CLIPBOARD_ReleaseOwner
(
void
);
extern
BOOL
FOCUS_MouseActivate
(
HWND
hwnd
);
...
...
windows/defwnd.c
View file @
eea41530
...
...
@@ -166,7 +166,7 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
* look different from the window background.
*/
if
(
bk
==
GetSysColor
(
COLOR_WINDOW
))
return
UITOOLS_GetPattern55AABrush
()
;
return
SYSCOLOR_55AABrush
;
UnrealizeObject
(
hb
);
return
hb
;
...
...
windows/nonclient.c
View file @
eea41530
...
...
@@ -259,7 +259,7 @@ BOOL WINAPI DrawCaptionTempW (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
FillRect
(
hdc
,
&
rc
,
GetSysColorBrush
(
COLOR_3DFACE
));
if
(
uFlags
&
DC_ACTIVE
)
{
HBRUSH
hbr
=
SelectObject
(
hdc
,
UITOOLS_GetPattern55AABrush
()
);
HBRUSH
hbr
=
SelectObject
(
hdc
,
SYSCOLOR_55AABrush
);
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
0xFA0089
);
SelectObject
(
hdc
,
hbr
);
...
...
windows/syscolor.c
View file @
eea41530
...
...
@@ -80,6 +80,11 @@ static COLORREF SysColors[NUM_SYS_COLORS];
static
HBRUSH
SysColorBrushes
[
NUM_SYS_COLORS
];
static
HPEN
SysColorPens
[
NUM_SYS_COLORS
];
static
const
WORD
wPattern55AA
[]
=
{
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
};
HBRUSH
SYSCOLOR_55AABrush
=
0
;
/*************************************************************************
* SYSCOLOR_MakeObjectSystem
...
...
@@ -145,6 +150,7 @@ void SYSCOLOR_Init(void)
char
buffer
[
100
];
BOOL
bOk
=
FALSE
,
bNoReg
=
FALSE
;
HKEY
hKey
;
HBITMAP
h55AABitmap
;
/* first, try to read the values from the registry */
if
(
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Control Panel
\\
Colors"
,
0
,
0
,
0
,
KEY_ALL_ACCESS
,
0
,
&
hKey
,
0
))
...
...
@@ -178,6 +184,10 @@ void SYSCOLOR_Init(void)
}
if
(
!
bNoReg
)
RegCloseKey
(
hKey
);
h55AABitmap
=
CreateBitmap
(
8
,
8
,
1
,
1
,
wPattern55AA
);
SYSCOLOR_55AABrush
=
CreatePatternBrush
(
h55AABitmap
);
SYSCOLOR_MakeObjectSystem
(
HBRUSH_16
(
SYSCOLOR_55AABrush
),
TRUE
);
}
...
...
@@ -316,5 +326,4 @@ HPEN SYSCOLOR_GetPen( INT index )
/* We can assert here, because this function is internal to Wine */
assert
(
0
<=
index
&&
index
<
NUM_SYS_COLORS
);
return
SysColorPens
[
index
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment