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
a0b32d7c
Commit
a0b32d7c
authored
Aug 29, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added internal 32-bit versions of GDISelectPalette and
GDIRealizePalette.
parent
0e79a412
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
14 deletions
+36
-14
gdi16.c
dlls/gdi/gdi16.c
+19
-0
gdi.h
include/gdi.h
+4
-0
dc.c
objects/dc.c
+1
-1
palette.c
objects/palette.c
+12
-13
No files found.
dlls/gdi/gdi16.c
View file @
a0b32d7c
...
...
@@ -21,6 +21,7 @@
#include "winbase.h"
#include "wingdi.h"
#include "wine/wingdi16.h"
#include "gdi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
gdi
);
...
...
@@ -1594,6 +1595,24 @@ HPALETTE16 WINAPI CreatePalette16( const LOGPALETTE* palette )
/***********************************************************************
* GDISelectPalette (GDI.361)
*/
HPALETTE16
WINAPI
GDISelectPalette16
(
HDC16
hdc
,
HPALETTE16
hpalette
,
WORD
wBkg
)
{
return
HPALETTE_16
(
GDISelectPalette
(
HDC_32
(
hdc
),
HPALETTE_32
(
hpalette
),
wBkg
));
}
/***********************************************************************
* GDIRealizePalette (GDI.362)
*/
UINT16
WINAPI
GDIRealizePalette16
(
HDC16
hdc
)
{
return
GDIRealizePalette
(
HDC_32
(
hdc
)
);
}
/***********************************************************************
* GetPaletteEntries (GDI.363)
*/
UINT16
WINAPI
GetPaletteEntries16
(
HPALETTE16
hpalette
,
UINT16
start
,
...
...
include/gdi.h
View file @
a0b32d7c
...
...
@@ -455,6 +455,10 @@ extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCSTR filename);
/* region.c */
extern
BOOL
REGION_FrameRgn
(
HRGN
dest
,
HRGN
src
,
INT
x
,
INT
y
);
/* palette.c */
extern
HPALETTE
WINAPI
GDISelectPalette
(
HDC
hdc
,
HPALETTE
hpal
,
WORD
wBkg
);
extern
UINT
WINAPI
GDIRealizePalette
(
HDC
hdc
);
#define WINE_GGO_GRAY16_BITMAP 0x7f
#endif
/* __WINE_GDI_H */
objects/dc.c
View file @
a0b32d7c
...
...
@@ -433,7 +433,7 @@ void WINAPI SetDCState16( HDC16 hdc, HDC16 hdcs )
SelectObject
(
hdc
,
dcs
->
hPen
);
SetBkColor
(
hdc
,
dcs
->
backgroundColor
);
SetTextColor
(
hdc
,
dcs
->
textColor
);
GDISelectPalette
16
(
hdc
,
dcs
->
hPalette
,
FALSE
);
GDISelectPalette
(
hdc
,
dcs
->
hPalette
,
FALSE
);
GDI_ReleaseObj
(
hdcs
);
GDI_ReleaseObj
(
hdc
);
}
...
...
objects/palette.c
View file @
a0b32d7c
...
...
@@ -53,8 +53,8 @@ static const struct gdi_obj_funcs palette_funcs =
/* Pointers to USER implementation of SelectPalette/RealizePalette */
/* they will be patched by USER on startup */
FARPROC
pfnSelectPalette
=
NULL
;
FARPROC
pfnRealizePalette
=
NULL
;
HPALETTE
(
WINAPI
*
pfnSelectPalette
)(
HDC
hdc
,
HPALETTE
hpal
,
WORD
bkgnd
)
=
NULL
;
UINT
(
WINAPI
*
pfnRealizePalette
)(
HDC
hdc
)
=
NULL
;
static
UINT
SystemPaletteUse
=
SYSPAL_STATIC
;
/* currently not considered */
...
...
@@ -657,11 +657,11 @@ static BOOL PALETTE_DeleteObject( HGDIOBJ handle, void *obj )
/***********************************************************************
* GDISelectPalette (
GDI.361
)
* GDISelectPalette (
Not a Windows API
)
*/
HPALETTE
16
WINAPI
GDISelectPalette16
(
HDC16
hdc
,
HPALETTE16
hpal
,
WORD
wBkg
)
HPALETTE
WINAPI
GDISelectPalette
(
HDC
hdc
,
HPALETTE
hpal
,
WORD
wBkg
)
{
HPALETTE
16
prev
;
HPALETTE
prev
;
DC
*
dc
;
TRACE
(
"%04x %04x
\n
"
,
hdc
,
hpal
);
...
...
@@ -681,9 +681,9 @@ HPALETTE16 WINAPI GDISelectPalette16( HDC16 hdc, HPALETTE16 hpal, WORD wBkg)
/***********************************************************************
* GDIRealizePalette (
GDI.362
)
* GDIRealizePalette (
Not a Windows API
)
*/
UINT
16
WINAPI
GDIRealizePalette16
(
HDC16
hdc
)
UINT
WINAPI
GDIRealizePalette
(
HDC
hdc
)
{
UINT
realized
=
0
;
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
...
...
@@ -694,11 +694,10 @@ UINT16 WINAPI GDIRealizePalette16( HDC16 hdc )
if
(
dc
->
hPalette
==
GetStockObject
(
DEFAULT_PALETTE
))
{
GDI_ReleaseObj
(
hdc
);
return
RealizeDefaultPalette16
(
hdc
);
if
(
dc
->
funcs
->
pRealizeDefaultPalette
)
realized
=
dc
->
funcs
->
pRealizeDefaultPalette
(
dc
->
physDev
);
}
if
(
dc
->
hPalette
!=
hLastRealizedPalette
)
else
if
(
dc
->
hPalette
!=
hLastRealizedPalette
)
{
if
(
dc
->
funcs
->
pRealizePalette
)
realized
=
dc
->
funcs
->
pRealizePalette
(
dc
->
physDev
,
dc
->
hPalette
,
...
...
@@ -707,10 +706,10 @@ UINT16 WINAPI GDIRealizePalette16( HDC16 hdc )
pLastRealizedDC
=
dc
->
funcs
;
}
else
TRACE
(
" skipping (hLastRealizedPalette = %04x)
\n
"
,
hLastRealizedPalette
);
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
TRACE
(
" realized %i colors.
\n
"
,
realized
);
return
(
UINT16
)
realized
;
return
realized
;
}
...
...
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