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
2c16ab2a
Commit
2c16ab2a
authored
Mar 16, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a null driver entry point for UnrealizePalette.
parent
31e6f4bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
driver.c
dlls/gdi32/driver.c
+6
-1
palette.c
dlls/gdi32/palette.c
+9
-9
No files found.
dlls/gdi32/driver.c
View file @
2c16ab2a
...
...
@@ -714,6 +714,11 @@ static BOOL CDECL nulldrv_SwapBuffers( PHYSDEV dev )
return
TRUE
;
}
static
BOOL
CDECL
nulldrv_UnrealizePalette
(
HPALETTE
palette
)
{
return
FALSE
;
}
static
BOOL
CDECL
nulldrv_wglCopyContext
(
HGLRC
ctx_src
,
HGLRC
ctx_dst
,
UINT
mask
)
{
return
FALSE
;
...
...
@@ -895,7 +900,7 @@ const DC_FUNCTIONS null_driver =
nulldrv_StrokeAndFillPath
,
/* pStrokeAndFillPath */
nulldrv_StrokePath
,
/* pStrokePath */
nulldrv_SwapBuffers
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
nulldrv_UnrealizePalette
,
/* pUnrealizePalette */
nulldrv_WidenPath
,
/* pWidenPath */
nulldrv_wglCopyContext
,
/* pwglCopyContext */
nulldrv_wglCreateContext
,
/* pwglCreateContext */
...
...
dlls/gdi32/palette.c
View file @
2c16ab2a
...
...
@@ -38,10 +38,12 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
palette
);
typedef
BOOL
(
CDECL
*
unrealize_function
)(
HPALETTE
);
typedef
struct
tagPALETTEOBJ
{
GDIOBJHDR
header
;
const
DC_FUNCTIONS
*
funcs
;
/* DC function table */
unrealize_function
unrealize
;
WORD
version
;
/* palette version */
WORD
count
;
/* count of palette entries */
PALETTEENTRY
*
entries
;
...
...
@@ -152,7 +154,7 @@ HPALETTE WINAPI CreatePalette(
size
=
sizeof
(
LOGPALETTE
)
+
(
palette
->
palNumEntries
-
1
)
*
sizeof
(
PALETTEENTRY
);
if
(
!
(
palettePtr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
palettePtr
)
)))
return
0
;
palettePtr
->
funcs
=
NULL
;
palettePtr
->
unrealize
=
NULL
;
palettePtr
->
version
=
palette
->
palVersion
;
palettePtr
->
count
=
palette
->
palNumEntries
;
size
=
palettePtr
->
count
*
sizeof
(
*
palettePtr
->
entries
);
...
...
@@ -410,7 +412,6 @@ BOOL WINAPI AnimatePalette(
PALETTEOBJ
*
palPtr
;
UINT
pal_entries
;
const
PALETTEENTRY
*
pptr
=
PaletteColors
;
const
DC_FUNCTIONS
*
funcs
;
palPtr
=
GDI_GetObjPtr
(
hPal
,
OBJ_PAL
);
if
(
!
palPtr
)
return
0
;
...
...
@@ -436,9 +437,8 @@ BOOL WINAPI AnimatePalette(
TRACE
(
"Not animating entry %d -- not PC_RESERVED
\n
"
,
StartIndex
);
}
}
funcs
=
palPtr
->
funcs
;
GDI_ReleaseObj
(
hPal
);
if
(
funcs
&&
funcs
->
pRealizePalette
)
funcs
->
pRealizePalette
(
NULL
,
hPal
,
hPal
==
hPrimaryPalette
);
/* FIXME: check for palette selected in active window */
}
return
TRUE
;
}
...
...
@@ -650,10 +650,10 @@ static BOOL PALETTE_UnrealizeObject( HGDIOBJ handle )
if
(
palette
)
{
const
DC_FUNCTIONS
*
funcs
=
palette
->
funcs
;
palette
->
funcs
=
NULL
;
unrealize_function
unrealize
=
palette
->
unrealize
;
palette
->
unrealize
=
NULL
;
GDI_ReleaseObj
(
handle
);
if
(
funcs
&&
funcs
->
pUnrealizePalette
)
funcs
->
pUnrealizePalett
e
(
handle
);
if
(
unrealize
)
unrealiz
e
(
handle
);
}
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
hLastRealizedPalette
,
0
,
handle
)
==
handle
)
...
...
@@ -733,7 +733,7 @@ UINT WINAPI GDIRealizePalette( HDC hdc )
{
realized
=
physdev
->
funcs
->
pRealizePalette
(
physdev
,
dc
->
hPalette
,
(
dc
->
hPalette
==
hPrimaryPalette
)
);
palPtr
->
funcs
=
dc
->
funcs
;
palPtr
->
unrealize
=
physdev
->
funcs
->
pUnrealizePalette
;
GDI_ReleaseObj
(
dc
->
hPalette
);
}
}
...
...
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