Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4c18636d
Commit
4c18636d
authored
Oct 29, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GetStockObject() instead of the magic STOCK_* handles.
parent
d207d270
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
palette.c
graphics/x11drv/palette.c
+1
-1
dc.c
objects/dc.c
+7
-7
palette.c
objects/palette.c
+6
-6
painting.c
windows/painting.c
+1
-1
No files found.
graphics/x11drv/palette.c
View file @
4c18636d
...
...
@@ -669,7 +669,7 @@ COLORREF X11DRV_PALETTE_ToLogical(int pixel)
int
X11DRV_PALETTE_ToPhysical
(
DC
*
dc
,
COLORREF
color
)
{
WORD
index
=
0
;
HPALETTE16
hPal
=
(
dc
)
?
dc
->
w
.
hPalette
:
STOCK_DEFAULT_PALETTE
;
HPALETTE16
hPal
=
(
dc
)
?
dc
->
w
.
hPalette
:
GetStockObject
(
DEFAULT_PALETTE
)
;
unsigned
char
spec_type
=
color
>>
24
;
PALETTEOBJ
*
palPtr
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
hPal
,
PALETTE_MAGIC
);
...
...
objects/dc.c
View file @
4c18636d
...
...
@@ -34,12 +34,12 @@ static void DC_Init_DC_INFO( WIN_DC_INFO *win_dc_info )
win_dc_info
->
hClipRgn
=
0
;
win_dc_info
->
hVisRgn
=
0
;
win_dc_info
->
hGCClipRgn
=
0
;
win_dc_info
->
hPen
=
STOCK_BLACK_PEN
;
win_dc_info
->
hBrush
=
STOCK_WHITE_BRUSH
;
win_dc_info
->
hFont
=
STOCK_SYSTEM_FONT
;
win_dc_info
->
hPen
=
GetStockObject
(
BLACK_PEN
)
;
win_dc_info
->
hBrush
=
GetStockObject
(
WHITE_BRUSH
)
;
win_dc_info
->
hFont
=
GetStockObject
(
SYSTEM_FONT
)
;
win_dc_info
->
hBitmap
=
0
;
win_dc_info
->
hDevice
=
0
;
win_dc_info
->
hPalette
=
STOCK_DEFAULT_PALETTE
;
win_dc_info
->
hPalette
=
GetStockObject
(
DEFAULT_PALETTE
)
;
win_dc_info
->
ROPmode
=
R2_COPYPEN
;
win_dc_info
->
polyFillMode
=
ALTERNATE
;
win_dc_info
->
stretchBltMode
=
BLACKONWHITE
;
...
...
@@ -739,9 +739,9 @@ BOOL WINAPI DeleteDC( HDC hdc )
if
(
!
(
dc
->
w
.
flags
&
DC_SAVED
))
{
SelectObject
(
hdc
,
STOCK_BLACK_PEN
);
SelectObject
(
hdc
,
STOCK_WHITE_BRUSH
);
SelectObject
(
hdc
,
STOCK_SYSTEM_FONT
);
SelectObject
(
hdc
,
GetStockObject
(
BLACK_PEN
)
);
SelectObject
(
hdc
,
GetStockObject
(
WHITE_BRUSH
)
);
SelectObject
(
hdc
,
GetStockObject
(
SYSTEM_FONT
)
);
if
(
dc
->
funcs
->
pDeleteDC
)
dc
->
funcs
->
pDeleteDC
(
dc
);
}
...
...
objects/palette.c
View file @
4c18636d
...
...
@@ -385,7 +385,7 @@ BOOL WINAPI AnimatePalette(
{
TRACE
(
"%04x (%i - %i)
\n
"
,
hPal
,
StartIndex
,
StartIndex
+
NumEntries
);
if
(
hPal
!=
STOCK_DEFAULT_PALETTE
)
if
(
hPal
!=
GetStockObject
(
DEFAULT_PALETTE
)
)
{
PALETTEOBJ
*
palPtr
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
hPal
,
PALETTE_MAGIC
);
if
(
!
palPtr
)
return
FALSE
;
...
...
@@ -578,7 +578,7 @@ COLORREF WINAPI GetNearestColor(
if
(
(
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
))
)
{
HPALETTE
hpal
=
(
dc
->
w
.
hPalette
)
?
dc
->
w
.
hPalette
:
STOCK_DEFAULT_PALETTE
;
HPALETTE
hpal
=
(
dc
->
w
.
hPalette
)
?
dc
->
w
.
hPalette
:
GetStockObject
(
DEFAULT_PALETTE
)
;
palObj
=
GDI_GetObjPtr
(
hpal
,
PALETTE_MAGIC
);
if
(
!
palObj
)
{
GDI_ReleaseObj
(
hdc
);
...
...
@@ -672,7 +672,7 @@ UINT16 WINAPI GDIRealizePalette16( HDC16 hdc )
if
(
dc
->
w
.
hPalette
!=
hLastRealizedPalette
)
{
if
(
dc
->
w
.
hPalette
==
STOCK_DEFAULT_PALETTE
)
{
if
(
dc
->
w
.
hPalette
==
GetStockObject
(
DEFAULT_PALETTE
)
)
{
realized
=
RealizeDefaultPalette16
(
hdc
);
GDI_ReleaseObj
(
hdc
);
return
(
UINT16
)
realized
;
...
...
@@ -690,7 +690,7 @@ UINT16 WINAPI GDIRealizePalette16( HDC16 hdc )
realized
=
PALETTE_Driver
->
pSetMapping
(
palPtr
,
0
,
palPtr
->
logpalette
.
palNumEntries
,
(
dc
->
w
.
hPalette
!=
hPrimaryPalette
)
||
(
dc
->
w
.
hPalette
==
STOCK_DEFAULT_PALETTE
));
(
dc
->
w
.
hPalette
==
GetStockObject
(
DEFAULT_PALETTE
)
));
hLastRealizedPalette
=
dc
->
w
.
hPalette
;
GDI_ReleaseObj
(
dc
->
w
.
hPalette
);
}
...
...
@@ -718,12 +718,12 @@ UINT16 WINAPI RealizeDefaultPalette16( HDC16 hdc )
if
(
!
(
dc
->
w
.
flags
&
DC_MEMORY
))
{
palPtr
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
STOCK_DEFAULT_PALETTE
,
PALETTE_MAGIC
);
palPtr
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
GetStockObject
(
DEFAULT_PALETTE
)
,
PALETTE_MAGIC
);
if
(
palPtr
)
{
/* lookup is needed to account for SetSystemPaletteUse() stuff */
ret
=
PALETTE_Driver
->
pUpdateMapping
(
palPtr
);
GDI_ReleaseObj
(
STOCK_DEFAULT_PALETTE
);
GDI_ReleaseObj
(
GetStockObject
(
DEFAULT_PALETTE
)
);
}
}
GDI_ReleaseObj
(
hdc
);
...
...
windows/painting.c
View file @
4c18636d
...
...
@@ -1683,7 +1683,7 @@ HPALETTE16 WINAPI SelectPalette16( HDC16 hDC, HPALETTE16 hPal,
{
WORD
wBkgPalette
=
1
;
if
(
!
bForceBackground
&&
(
hPal
!=
STOCK_DEFAULT_PALETTE
))
if
(
!
bForceBackground
&&
(
hPal
!=
GetStockObject
(
DEFAULT_PALETTE
)
))
{
HWND
hwnd
=
WindowFromDC
(
hDC
);
if
(
hwnd
)
...
...
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