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
ed4f22ab
Commit
ed4f22ab
authored
Nov 17, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Moved the system palette flags to winex11.drv.
parent
c60757b7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
23 deletions
+3
-23
palette.c
dlls/gdi32/palette.c
+0
-19
palette.c
dlls/winex11.drv/palette.c
+3
-1
gdi.h
include/gdi.h
+0
-3
No files found.
dlls/gdi32/palette.c
View file @
ed4f22ab
...
...
@@ -130,16 +130,6 @@ HPALETTE PALETTE_Init(void)
return
hpalette
;
}
/***********************************************************************
* PALETTE_ValidateFlags
*/
static
void
PALETTE_ValidateFlags
(
PALETTEENTRY
*
lpPalE
,
int
size
)
{
int
i
=
0
;
for
(
;
i
<
size
;
i
++
)
lpPalE
[
i
].
peFlags
=
PC_SYS_USED
|
(
lpPalE
[
i
].
peFlags
&
0x07
);
}
/***********************************************************************
* CreatePalette [GDI32.@]
...
...
@@ -166,8 +156,6 @@ HPALETTE WINAPI CreatePalette(
PALETTE_MAGIC
,
(
HGDIOBJ
*
)
&
hpalette
,
&
palette_funcs
)))
return
0
;
memcpy
(
&
palettePtr
->
logpalette
,
palette
,
size
);
PALETTE_ValidateFlags
(
palettePtr
->
logpalette
.
palPalEntry
,
palettePtr
->
logpalette
.
palNumEntries
);
palettePtr
->
mapping
=
NULL
;
GDI_ReleaseObj
(
hpalette
);
...
...
@@ -358,8 +346,6 @@ UINT WINAPI SetPaletteEntries(
if
(
start
+
count
>
numEntries
)
count
=
numEntries
-
start
;
memcpy
(
&
palPtr
->
logpalette
.
palPalEntry
[
start
],
entries
,
count
*
sizeof
(
PALETTEENTRY
)
);
PALETTE_ValidateFlags
(
palPtr
->
logpalette
.
palPalEntry
,
palPtr
->
logpalette
.
palNumEntries
);
UnrealizeObject
(
hpalette
);
GDI_ReleaseObj
(
hpalette
);
return
count
;
...
...
@@ -413,8 +399,6 @@ BOOL WINAPI ResizePalette(
if
(
mapping
)
memset
(
palPtr
->
mapping
+
cPrevEnt
,
0
,
(
cEntries
-
cPrevEnt
)
*
sizeof
(
int
));
memset
(
(
BYTE
*
)
palPtr
+
prevsize
,
0
,
size
-
prevsize
);
PALETTE_ValidateFlags
((
PALETTEENTRY
*
)((
BYTE
*
)
palPtr
+
prevsize
),
cEntries
-
cPrevEnt
);
}
palPtr
->
logpalette
.
palNumEntries
=
cEntries
;
palPtr
->
logpalette
.
palVersion
=
prevVer
;
...
...
@@ -470,7 +454,6 @@ BOOL WINAPI AnimatePalette(
pptr
->
peRed
,
pptr
->
peGreen
,
pptr
->
peBlue
);
memcpy
(
&
palPtr
->
logpalette
.
palPalEntry
[
StartIndex
],
pptr
,
sizeof
(
PALETTEENTRY
)
);
PALETTE_ValidateFlags
(
&
palPtr
->
logpalette
.
palPalEntry
[
StartIndex
],
1
);
}
else
{
TRACE
(
"Not animating entry %d -- not PC_RESERVED
\n
"
,
StartIndex
);
}
...
...
@@ -592,8 +575,6 @@ UINT WINAPI GetNearestPaletteIndex(
for
(
i
=
0
;
i
<
palObj
->
logpalette
.
palNumEntries
&&
diff
;
i
++
,
entry
++
)
{
if
(
!
(
entry
->
peFlags
&
PC_SYS_USED
))
continue
;
r
=
entry
->
peRed
-
GetRValue
(
color
);
g
=
entry
->
peGreen
-
GetGValue
(
color
);
b
=
entry
->
peBlue
-
GetBValue
(
color
);
...
...
dlls/winex11.drv/palette.c
View file @
ed4f22ab
...
...
@@ -48,6 +48,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(palette);
* http://premium.microsoft.com/msdn/library/techart/f30/f34/f40/d4d/sa942.htm
*/
#define PC_SYS_USED 0x80
/* palentry is used (both system and logical) */
#define PC_SYS_RESERVED 0x40
/* system palentry is not to be mapped to */
static
PALETTEENTRY
*
COLOR_sysPal
;
/* current system palette */
static
int
COLOR_gapStart
=
256
;
...
...
@@ -1160,7 +1163,6 @@ static UINT X11DRV_PALETTE_SetMapping( PALETTEOBJ* palPtr, UINT uStart, UINT uNu
index
=
X11DRV_SysPaletteLookupPixel
(
*
(
COLORREF
*
)(
palPtr
->
logpalette
.
palPalEntry
+
uStart
),
TRUE
);
}
palPtr
->
logpalette
.
palPalEntry
[
uStart
].
peFlags
|=
PC_SYS_USED
;
if
(
X11DRV_PALETTE_PaletteToXPixel
)
index
=
X11DRV_PALETTE_PaletteToXPixel
[
index
];
}
...
...
include/gdi.h
View file @
ed4f22ab
...
...
@@ -70,9 +70,6 @@ typedef struct tagGDIOBJHDR
#define NB_RESERVED_COLORS 20
/* number of fixed colors in system palette */
#define PC_SYS_USED 0x80
/* palentry is used (both system and logical) */
#define PC_SYS_RESERVED 0x40
/* system palentry is not to be mapped to */
typedef
struct
tagPALETTEOBJ
{
GDIOBJHDR
header
;
...
...
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