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
0bdff36d
Commit
0bdff36d
authored
Feb 09, 1999
by
Brad Pepers
Committed by
Alexandre Julliard
Feb 09, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WinG fixes.
parent
b3a99de5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
178 additions
and
40 deletions
+178
-40
wing.c
graphics/wing.c
+0
-0
gdi.spec
if1632/gdi.spec
+1
-1
bitmap.h
include/bitmap.h
+3
-0
palette.h
include/palette.h
+3
-0
wingdi.h
include/wingdi.h
+127
-3
palette.c
objects/palette.c
+43
-35
gdi32.spec
relay32/gdi32.spec
+1
-1
No files found.
graphics/wing.c
View file @
0bdff36d
This diff is collapsed.
Click to expand it.
if1632/gdi.spec
View file @
0bdff36d
...
...
@@ -350,7 +350,7 @@ file gdi.exe
526 stub GetMiterLimit
527 stub SetMiterLimit
528 stub GDIParametersInfo
529
stub CreateHalftonePalette
529
pascal16 CreateHalftonePalette(word) CreateHalftonePalette16
# Stubs for Hebrew version
530 pascal16 GDI_530() stub_GDI_530
531 pascal16 GDI_531() stub_GDI_531
...
...
include/bitmap.h
View file @
0bdff36d
...
...
@@ -27,6 +27,9 @@ typedef struct
/* Cached XImage */
XImage
*
image
;
/* Selector for 16-bit access to bits */
WORD
selector
;
}
DIBSECTIONOBJ
;
/* Flags used for BitmapBits. We only use the first two at the moment */
...
...
include/palette.h
View file @
0bdff36d
...
...
@@ -24,4 +24,7 @@ extern int PALETTE_GetObject( PALETTEOBJ * palette, int count, LPSTR buffer );
extern
BOOL32
PALETTE_DeleteObject
(
HPALETTE16
hpalette
,
PALETTEOBJ
*
palette
);
extern
BOOL32
PALETTE_UnrealizeObject
(
HPALETTE16
hpalette
,
PALETTEOBJ
*
palette
);
extern
HPALETTE16
WINAPI
CreateHalftonePalette16
(
HDC16
hdc
);
extern
HPALETTE32
WINAPI
CreateHalftonePalette32
(
HDC32
hdc
);
#endif
/* __WINE_PALETTE_H */
include/wingdi.h
View file @
0bdff36d
...
...
@@ -96,7 +96,125 @@ typedef struct tagCOLORADJUSTMENT
SHORT
caColorfulness
;
SHORT
caRedGreenTint
;
}
COLORADJUSTMENT
,
*
PCOLORADJUSTMENT
,
*
LPCOLORADJUSTMENT
;
#define DC_FIELDS 1
#define DC_PAPERS 2
#define DC_PAPERSIZE 3
#define DC_MINEXTENT 4
#define DC_MAXEXTENT 5
#define DC_BINS 6
#define DC_DUPLEX 7
#define DC_SIZE 8
#define DC_EXTRA 9
#define DC_VERSION 10
#define DC_DRIVER 11
#define DC_BINNAMES 12
#define DC_ENUMRESOLUTIONS 13
#define DC_FILEDEPENDENCIES 14
#define DC_TRUETYPE 15
#define DC_PAPERNAMES 16
#define DC_ORIENTATION 17
#define DC_COPIES 18
/* Flag returned from Escape QUERYDIBSUPPORT */
#define QDI_SETDIBITS 1
#define QDI_GETDIBITS 2
#define QDI_DIBTOSCREEN 4
#define QDI_STRETCHDIB 8
#define PR_JOBSTATUS 0x0000
/* GDI Escape commands */
#define NEWFRAME 1
#define ABORTDOC 2
#define NEXTBAND 3
#define SETCOLORTABLE 4
#define GETCOLORTABLE 5
#define FLUSHOUTPUT 6
#define DRAFTMODE 7
#define QUERYESCSUPPORT 8
#define SETABORTPROC 9
#define STARTDOC 10
#define ENDDOC 11
#define GETPHYSPAGESIZE 12
#define GETPRINTINGOFFSET 13
#define GETSCALINGFACTOR 14
#define MFCOMMENT 15
#define GETPENWIDTH 16
#define SETCOPYCOUNT 17
#define SELECTPAPERSOURCE 18
#define DEVICEDATA 19
#define PASSTHROUGH 19
#define GETTECHNOLGY 20
#define GETTECHNOLOGY 20
/* yes, both of them */
#define SETLINECAP 21
#define SETLINEJOIN 22
#define SETMITERLIMIT 23
#define BANDINFO 24
#define DRAWPATTERNRECT 25
#define GETVECTORPENSIZE 26
#define GETVECTORBRUSHSIZE 27
#define ENABLEDUPLEX 28
#define GETSETPAPERBINS 29
#define GETSETPRINTORIENT 30
#define ENUMPAPERBINS 31
#define SETDIBSCALING 32
#define EPSPRINTING 33
#define ENUMPAPERMETRICS 34
#define GETSETPAPERMETRICS 35
#define POSTSCRIPT_DATA 37
#define POSTSCRIPT_IGNORE 38
#define MOUSETRAILS 39
#define GETDEVICEUNITS 42
#define GETEXTENDEDTEXTMETRICS 256
#define GETEXTENTTABLE 257
#define GETPAIRKERNTABLE 258
#define GETTRACKKERNTABLE 259
#define EXTTEXTOUT 512
#define GETFACENAME 513
#define DOWNLOADFACE 514
#define ENABLERELATIVEWIDTHS 768
#define ENABLEPAIRKERNING 769
#define SETKERNTRACK 770
#define SETALLJUSTVALUES 771
#define SETCHARSET 772
#define STRETCHBLT 2048
#define GETSETSCREENPARAMS 3072
#define QUERYDIBSUPPORT 3073
#define BEGIN_PATH 4096
#define CLIP_TO_PATH 4097
#define END_PATH 4098
#define EXT_DEVICE_CAPS 4099
#define RESTORE_CTM 4100
#define SAVE_CTM 4101
#define SET_ARC_DIRECTION 4102
#define SET_BACKGROUND_COLOR 4103
#define SET_POLY_MODE 4104
#define SET_SCREEN_ANGLE 4105
#define SET_SPREAD 4106
#define TRANSFORM_CTM 4107
#define SET_CLIP_BOX 4108
#define SET_BOUNDS 4109
#define SET_MIRROR_MODE 4110
#define OPENCHANNEL 4110
#define DOWNLOADHEADER 4111
#define CLOSECHANNEL 4112
#define POSTSCRIPT_PASSTHROUGH 4115
#define ENCAPSULATED_POSTSCRIPT 4116
/* Spooler Error Codes */
#define SP_NOTREPORTED 0x4000
#define SP_ERROR (-1)
#define SP_APPABORT (-2)
#define SP_USERABORT (-3)
#define SP_OUTOFDISK (-4)
#define SP_OUTOFMEMORY (-5)
/* Raster operations */
#define R2_BLACK 1
...
...
@@ -1948,6 +2066,12 @@ typedef struct {
DECL_WINELIB_TYPE_AW
(
NONCLIENTMETRICS
)
DECL_WINELIB_TYPE_AW
(
LPNONCLIENTMETRICS
)
/* Flags for PolyDraw and GetPath */
#define PT_CLOSEFIGURE 0x0001
#define PT_LINETO 0x0002
#define PT_BEZIERTO 0x0004
#define PT_MOVETO 0x0006
#define RDH_RECTANGLES 1
typedef
struct
_RGNDATAHEADER
{
...
...
@@ -2151,9 +2275,9 @@ HBRUSH16 WINAPI CreateDIBPatternBrush16(HGLOBAL16,UINT16);
HBRUSH32
WINAPI
CreateDIBPatternBrush32
(
HGLOBAL32
,
UINT32
);
#define CreateDIBPatternBrush WINELIB_NAME(CreateDIBPatternBrush)
HBITMAP16
WINAPI
CreateDIBSection16
(
HDC16
,
BITMAPINFO
*
,
UINT16
,
LPVOID
*
*
,
HANDLE32
,
DWORD
offset
);
SEGPTR
*
,
HANDLE32
,
DWORD
offset
);
HBITMAP32
WINAPI
CreateDIBSection32
(
HDC32
,
BITMAPINFO
*
,
UINT32
,
LPVOID
*
*
,
HANDLE32
,
DWORD
offset
);
LPVOID
*
,
HANDLE32
,
DWORD
offset
);
#define CreateDIBSection WINELIB_NAME(CreateDIBSection)
HBITMAP16
WINAPI
CreateDiscardableBitmap16
(
HDC16
,
INT16
,
INT16
);
HBITMAP32
WINAPI
CreateDiscardableBitmap32
(
HDC32
,
INT32
,
INT32
);
...
...
objects/palette.c
View file @
0bdff36d
...
...
@@ -124,54 +124,62 @@ HPALETTE32 WINAPI CreatePalette32(
/***********************************************************************
* CreateHalftonePalette
[GDI32.47
] Creates a halftone palette
* CreateHalftonePalette
16 [GDI.?
] Creates a halftone palette
*
* RETURNS
* Success: Handle to logical halftone palette
* Failure: 0
*
* FIXME: not truly tested
*/
HPALETTE32
WINAPI
CreateHalftonePalette
(
HDC32
hdc
)
/* [in] Handle to device context */
{
int
r
,
g
,
b
,
i
;
HPALETTE32
hPalette
=
0
;
int
palNumEntries
=
216
+
NB_RESERVED_COLORS
;
const
PALETTEENTRY
*
__sysPalTemplate
=
COLOR_GetSystemPaletteTemplate
();
LOGPALETTE
*
pLogPal
=
(
LOGPALETTE
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LOGPALETTE
)
+
(
palNumEntries
-
1
)
*
sizeof
(
PALETTEENTRY
));
TRACE
(
palette
,
"(0x%x)
\n
"
,
hdc
);
pLogPal
->
palVersion
=
0x300
;
pLogPal
->
palNumEntries
=
palNumEntries
;
for
(
i
=
0
;
i
<
NB_RESERVED_COLORS
;
i
++
)
{
pLogPal
->
palPalEntry
[
i
].
peRed
=
__sysPalTemplate
[
i
].
peRed
;
pLogPal
->
palPalEntry
[
i
].
peGreen
=
__sysPalTemplate
[
i
].
peGreen
;
pLogPal
->
palPalEntry
[
i
].
peBlue
=
__sysPalTemplate
[
i
].
peBlue
;
pLogPal
->
palPalEntry
[
i
].
peFlags
=
0
;
HPALETTE16
WINAPI
CreateHalftonePalette16
(
HDC16
hdc
)
/* [in] Handle to device context */
{
return
CreateHalftonePalette32
(
hdc
);
}
for
(
r
=
0
;
r
<
6
;
r
++
)
{
for
(
g
=
0
;
g
<
6
;
g
++
)
{
for
(
b
=
0
;
b
<
6
;
b
++
)
{
pLogPal
->
palPalEntry
[
NB_RESERVED_COLORS
+
r
*
36
+
g
*
6
+
b
].
peRed
=
r
*
51
;
pLogPal
->
palPalEntry
[
NB_RESERVED_COLORS
+
r
*
36
+
g
*
6
+
b
].
peGreen
=
g
*
51
;
pLogPal
->
palPalEntry
[
NB_RESERVED_COLORS
+
r
*
36
+
g
*
6
+
b
].
peBlue
=
b
*
51
;
pLogPal
->
palPalEntry
[
NB_RESERVED_COLORS
+
r
*
36
+
g
*
6
+
b
].
peFlags
=
0
;
/***********************************************************************
* CreateHalftonePalette32 [GDI32.47] Creates a halftone palette
*
* RETURNS
* Success: Handle to logical halftone palette
* Failure: 0
*
* FIXME: not truly tested
*/
HPALETTE32
WINAPI
CreateHalftonePalette32
(
HDC32
hdc
)
/* [in] Handle to device context */
{
int
i
,
r
,
g
,
b
;
struct
{
WORD
Version
;
WORD
NumberOfEntries
;
PALETTEENTRY
aEntries
[
256
];
}
Palette
=
{
0x300
,
256
};
GetSystemPaletteEntries32
(
hdc
,
0
,
256
,
Palette
.
aEntries
);
return
CreatePalette32
((
LOGPALETTE
*
)
&
Palette
);
for
(
r
=
0
;
r
<
6
;
r
++
)
{
for
(
g
=
0
;
g
<
6
;
g
++
)
{
for
(
b
=
0
;
b
<
6
;
b
++
)
{
i
=
r
+
g
*
6
+
b
*
36
+
10
;
Palette
.
aEntries
[
i
].
peRed
=
r
*
51
;
Palette
.
aEntries
[
i
].
peGreen
=
g
*
51
;
Palette
.
aEntries
[
i
].
peBlue
=
b
*
51
;
}
}
}
hPalette
=
CreatePalette32
(
pLogPal
);
if
(
hPalette
)
{
SelectPalette32
(
hdc
,
hPalette
,
FALSE
);
for
(
i
=
216
;
i
<
246
;
i
++
)
{
int
v
=
(
i
-
216
)
*
8
;
Palette
.
aEntries
[
i
].
peRed
=
v
;
Palette
.
aEntries
[
i
].
peGreen
=
v
;
Palette
.
aEntries
[
i
].
peBlue
=
v
;
}
HeapFree
(
GetProcessHeap
(),
0
,
pLogPal
);
return
hPalette
;
return
CreatePalette32
((
LOGPALETTE
*
)
&
Palette
);
}
...
...
relay32/gdi32.spec
View file @
0bdff36d
...
...
@@ -49,7 +49,7 @@ init MAIN_GdiInit
44 stdcall CreateFontIndirectA(ptr) CreateFontIndirect32A
45 stdcall CreateFontIndirectW(ptr) CreateFontIndirect32W
46 stdcall CreateFontW(long long long long long long long long long long long long long wstr) CreateFont32W
47 stdcall CreateHalftonePalette(long) CreateHalftonePalette
47 stdcall CreateHalftonePalette(long) CreateHalftonePalette
32
48 stdcall CreateHatchBrush(long long) CreateHatchBrush32
49 stdcall CreateICA(str str str ptr) CreateIC32A
50 stdcall CreateICW(wstr wstr wstr ptr) CreateIC32W
...
...
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