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
6fbbbe1f
Commit
6fbbbe1f
authored
Oct 11, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use syscall interface for some GDI objects functions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0dfedf79
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
48 deletions
+65
-48
gdiobj.c
dlls/win32u/gdiobj.c
+0
-6
syscall.c
dlls/win32u/syscall.c
+6
-0
win32u.spec
dlls/win32u/win32u.spec
+6
-6
win32u_private.h
dlls/win32u/win32u_private.h
+0
-6
wrappers.c
dlls/win32u/wrappers.c
+0
-30
gdi.c
dlls/wow64win/gdi.c
+47
-0
syscall.h
dlls/wow64win/syscall.h
+6
-0
No files found.
dlls/win32u/gdiobj.c
View file @
6fbbbe1f
...
...
@@ -1074,7 +1074,6 @@ static struct unix_funcs unix_funcs =
NtGdiBitBlt
,
NtGdiCloseFigure
,
NtGdiComputeXformCoefficients
,
NtGdiCreateClientObj
,
NtGdiCreateCompatibleBitmap
,
NtGdiCreateCompatibleDC
,
NtGdiCreateDIBitmapInternal
,
...
...
@@ -1095,7 +1094,6 @@ static struct unix_funcs unix_funcs =
NtGdiDdDDIQueryStatistics
,
NtGdiDdDDISetQueuedLimit
,
NtGdiDdDDISetVidPnSourceOwner
,
NtGdiDeleteClientObj
,
NtGdiDeleteObjectApp
,
NtGdiDoPalette
,
NtGdiEllipse
,
...
...
@@ -1108,7 +1106,6 @@ static struct unix_funcs unix_funcs =
NtGdiExtEscape
,
NtGdiExtFloodFill
,
NtGdiExtTextOutW
,
NtGdiExtGetObjectW
,
NtGdiExtSelectClipRgn
,
NtGdiFillPath
,
NtGdiFillRgn
,
...
...
@@ -1121,8 +1118,6 @@ static struct unix_funcs unix_funcs =
NtGdiGetCharABCWidthsW
,
NtGdiGetCharWidthW
,
NtGdiGetCharWidthInfo
,
NtGdiGetColorAdjustment
,
NtGdiGetDCObject
,
NtGdiGetDIBitsInternal
,
NtGdiGetDeviceCaps
,
NtGdiGetDeviceGammaRamp
,
...
...
@@ -1175,7 +1170,6 @@ static struct unix_funcs unix_funcs =
NtGdiSelectFont
,
NtGdiSelectPen
,
NtGdiSetBoundsRect
,
NtGdiSetColorAdjustment
,
NtGdiSetDIBitsToDeviceInternal
,
NtGdiSetDeviceGammaRamp
,
NtGdiSetLayout
,
...
...
dlls/win32u/syscall.c
View file @
6fbbbe1f
...
...
@@ -38,6 +38,7 @@ static void * const syscalls[] =
NtGdiAddFontResourceW
,
NtGdiCombineRgn
,
NtGdiCreateBitmap
,
NtGdiCreateClientObj
,
NtGdiCreateDIBBrush
,
NtGdiCreateDIBSection
,
NtGdiCreateEllipticRgn
,
...
...
@@ -46,13 +47,17 @@ static void * const syscalls[] =
NtGdiCreateRectRgn
,
NtGdiCreateRoundRectRgn
,
NtGdiCreateSolidBrush
,
NtGdiDeleteClientObj
,
NtGdiDescribePixelFormat
,
NtGdiDrawStream
,
NtGdiEqualRgn
,
NtGdiExtCreateRegion
,
NtGdiExtGetObjectW
,
NtGdiFlush
,
NtGdiGetBitmapBits
,
NtGdiGetBitmapDimension
,
NtGdiGetColorAdjustment
,
NtGdiGetDCObject
,
NtGdiGetFontFileData
,
NtGdiGetFontFileInfo
,
NtGdiGetRegionData
,
...
...
@@ -68,6 +73,7 @@ static void * const syscalls[] =
NtGdiSetBitmapBits
,
NtGdiSetBitmapDimension
,
NtGdiSetBrushOrg
,
NtGdiSetColorAdjustment
,
NtGdiSetMetaRgn
,
NtGdiSetPixelFormat
,
NtGdiSetRectRgn
,
...
...
dlls/win32u/win32u.spec
View file @
6fbbbe1f
...
...
@@ -142,7 +142,7 @@
@ stdcall -syscall NtGdiCreateBitmap(long long long long ptr)
@ stub NtGdiCreateBitmapFromDxSurface
@ stub NtGdiCreateBitmapFromDxSurface2
@ stdcall NtGdiCreateClientObj(long)
@ stdcall
-syscall
NtGdiCreateClientObj(long)
@ stub NtGdiCreateColorSpace
@ stub NtGdiCreateColorTransform
@ stdcall NtGdiCreateCompatibleBitmap(long long long)
...
...
@@ -364,7 +364,7 @@
@ stub NtGdiDdDestroyFullscreenSprite
@ stub NtGdiDdNotifyFullscreenSpriteUpdate
@ stub NtGdiDdQueryVisRgnUniqueness
@ stdcall NtGdiDeleteClientObj(long)
@ stdcall
-syscall
NtGdiDeleteClientObj(long)
@ stub NtGdiDeleteColorSpace
@ stub NtGdiDeleteColorTransform
@ stdcall NtGdiDeleteObjectApp(long )
...
...
@@ -422,7 +422,7 @@
@ stdcall -syscall NtGdiExtCreateRegion(ptr long ptr)
@ stdcall NtGdiExtEscape(long wstr long long long ptr long ptr)
@ stdcall NtGdiExtFloodFill(long long long long long)
@ stdcall NtGdiExtGetObjectW(long long ptr)
@ stdcall
-syscall
NtGdiExtGetObjectW(long long ptr)
@ stdcall NtGdiExtSelectClipRgn(long long long)
@ stdcall NtGdiExtTextOutW(long long long long ptr ptr long ptr long)
@ stub NtGdiFONTOBJ_cGetAllGlyphHandles
...
...
@@ -458,12 +458,12 @@
@ stdcall NtGdiGetCharWidthInfo(long ptr)
@ stdcall NtGdiGetCharWidthW(long long long ptr long ptr)
@ stub NtGdiGetCharacterPlacementW
@ stdcall NtGdiGetColorAdjustment(long ptr)
@ stdcall
-syscall
NtGdiGetColorAdjustment(long ptr)
@ stub NtGdiGetColorSpaceforBitmap
@ stub NtGdiGetCurrentDpiInfo
@ stub NtGdiGetDCDpiScaleValue
@ stub NtGdiGetDCDword
@ stdcall NtGdiGetDCObject(long long)
@ stdcall
-syscall
NtGdiGetDCObject(long long)
@ stub NtGdiGetDCPoint
@ stub NtGdiGetDCforBitmap
@ stdcall NtGdiGetDIBitsInternal(long long long long ptr ptr long long long)
...
...
@@ -595,7 +595,7 @@
@ stdcall NtGdiSetBoundsRect(long ptr long)
@ stub NtGdiSetBrushAttributes
@ stdcall -syscall NtGdiSetBrushOrg(long long long ptr)
@ stdcall NtGdiSetColorAdjustment(long ptr)
@ stdcall
-syscall
NtGdiSetColorAdjustment(long ptr)
@ stub NtGdiSetColorSpace
@ stdcall NtGdiSetDIBitsToDeviceInternal(long long long long long long long long long ptr ptr long long long long long)
@ stdcall NtGdiSetDeviceGammaRamp(ptr ptr)
...
...
dlls/win32u/win32u_private.h
View file @
6fbbbe1f
...
...
@@ -56,7 +56,6 @@ struct unix_funcs
INT
x_src
,
INT
y_src
,
DWORD
rop
,
DWORD
bk_color
,
FLONG
fl
);
BOOL
(
WINAPI
*
pNtGdiCloseFigure
)(
HDC
hdc
);
BOOL
(
WINAPI
*
pNtGdiComputeXformCoefficients
)(
HDC
hdc
);
HANDLE
(
WINAPI
*
pNtGdiCreateClientObj
)(
ULONG
type
);
HBITMAP
(
WINAPI
*
pNtGdiCreateCompatibleBitmap
)(
HDC
hdc
,
INT
width
,
INT
height
);
HDC
(
WINAPI
*
pNtGdiCreateCompatibleDC
)(
HDC
hdc
);
HBITMAP
(
WINAPI
*
pNtGdiCreateDIBitmapInternal
)(
HDC
hdc
,
INT
width
,
INT
height
,
DWORD
init
,
...
...
@@ -80,7 +79,6 @@ struct unix_funcs
NTSTATUS
(
WINAPI
*
pNtGdiDdDDIQueryStatistics
)(
D3DKMT_QUERYSTATISTICS
*
stats
);
NTSTATUS
(
WINAPI
*
pNtGdiDdDDISetQueuedLimit
)(
D3DKMT_SETQUEUEDLIMIT
*
desc
);
NTSTATUS
(
WINAPI
*
pNtGdiDdDDISetVidPnSourceOwner
)(
const
D3DKMT_SETVIDPNSOURCEOWNER
*
desc
);
BOOL
(
WINAPI
*
pNtGdiDeleteClientObj
)(
HGDIOBJ
obj
);
BOOL
(
WINAPI
*
pNtGdiDeleteObjectApp
)(
HGDIOBJ
obj
);
LONG
(
WINAPI
*
pNtGdiDoPalette
)(
HGDIOBJ
handle
,
WORD
start
,
WORD
count
,
void
*
entries
,
DWORD
func
,
BOOL
inbound
);
...
...
@@ -100,7 +98,6 @@ struct unix_funcs
BOOL
(
WINAPI
*
pNtGdiExtFloodFill
)(
HDC
hdc
,
INT
x
,
INT
y
,
COLORREF
color
,
UINT
type
);
BOOL
(
WINAPI
*
pNtGdiExtTextOutW
)(
HDC
hdc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
rect
,
const
WCHAR
*
str
,
UINT
count
,
const
INT
*
dx
,
DWORD
cp
);
INT
(
WINAPI
*
pNtGdiExtGetObjectW
)(
HGDIOBJ
handle
,
INT
count
,
void
*
buffer
);
INT
(
WINAPI
*
pNtGdiExtSelectClipRgn
)(
HDC
hdc
,
HRGN
region
,
INT
mode
);
BOOL
(
WINAPI
*
pNtGdiFillPath
)(
HDC
hdc
);
BOOL
(
WINAPI
*
pNtGdiFillRgn
)(
HDC
hdc
,
HRGN
hrgn
,
HBRUSH
hbrush
);
...
...
@@ -115,8 +112,6 @@ struct unix_funcs
BOOL
(
WINAPI
*
pNtGdiGetCharWidthW
)(
HDC
hdc
,
UINT
first_char
,
UINT
last_char
,
WCHAR
*
chars
,
ULONG
flags
,
void
*
buffer
);
BOOL
(
WINAPI
*
pNtGdiGetCharWidthInfo
)(
HDC
hdc
,
struct
char_width_info
*
info
);
BOOL
(
WINAPI
*
pNtGdiGetColorAdjustment
)(
HDC
hdc
,
COLORADJUSTMENT
*
ca
);
HANDLE
(
WINAPI
*
pNtGdiGetDCObject
)(
HDC
hdc
,
UINT
type
);
INT
(
WINAPI
*
pNtGdiGetDIBitsInternal
)(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
void
*
bits
,
BITMAPINFO
*
info
,
UINT
coloruse
,
UINT
max_bits
,
UINT
max_info
);
...
...
@@ -188,7 +183,6 @@ struct unix_funcs
HGDIOBJ
(
WINAPI
*
pNtGdiSelectFont
)(
HDC
hdc
,
HGDIOBJ
handle
);
HGDIOBJ
(
WINAPI
*
pNtGdiSelectPen
)(
HDC
hdc
,
HGDIOBJ
handle
);
UINT
(
WINAPI
*
pNtGdiSetBoundsRect
)(
HDC
hdc
,
const
RECT
*
rect
,
UINT
flags
);
BOOL
(
WINAPI
*
pNtGdiSetColorAdjustment
)(
HDC
hdc
,
const
COLORADJUSTMENT
*
ca
);
INT
(
WINAPI
*
pNtGdiSetDIBitsToDeviceInternal
)(
HDC
hdc
,
INT
x_dst
,
INT
y_dst
,
DWORD
cx
,
DWORD
cy
,
INT
x_src
,
INT
y_src
,
UINT
startscan
,
UINT
lines
,
const
void
*
bits
,
const
BITMAPINFO
*
bmi
,
...
...
dlls/win32u/wrappers.c
View file @
6fbbbe1f
...
...
@@ -81,11 +81,6 @@ BOOL WINAPI NtGdiComputeXformCoefficients( HDC hdc )
return
unix_funcs
->
pNtGdiComputeXformCoefficients
(
hdc
);
}
HANDLE
WINAPI
NtGdiCreateClientObj
(
ULONG
type
)
{
return
unix_funcs
->
pNtGdiCreateClientObj
(
type
);
}
HBITMAP
WINAPI
NtGdiCreateCompatibleBitmap
(
HDC
hdc
,
INT
width
,
INT
height
)
{
return
unix_funcs
->
pNtGdiCreateCompatibleBitmap
(
hdc
,
width
,
height
);
...
...
@@ -125,11 +120,6 @@ HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush )
return
unix_funcs
->
pNtGdiCreatePen
(
style
,
width
,
color
,
brush
);
}
BOOL
WINAPI
NtGdiDeleteClientObj
(
HGDIOBJ
obj
)
{
return
unix_funcs
->
pNtGdiDeleteClientObj
(
obj
);
}
BOOL
WINAPI
NtGdiDeleteObjectApp
(
HGDIOBJ
obj
)
{
return
unix_funcs
->
pNtGdiDeleteObjectApp
(
obj
);
...
...
@@ -200,11 +190,6 @@ BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rec
return
unix_funcs
->
pNtGdiExtTextOutW
(
hdc
,
x
,
y
,
flags
,
rect
,
str
,
count
,
dx
,
cp
);
}
INT
WINAPI
NtGdiExtGetObjectW
(
HGDIOBJ
handle
,
INT
count
,
void
*
buffer
)
{
return
unix_funcs
->
pNtGdiExtGetObjectW
(
handle
,
count
,
buffer
);
}
INT
WINAPI
NtGdiExtSelectClipRgn
(
HDC
hdc
,
HRGN
region
,
INT
mode
)
{
return
unix_funcs
->
pNtGdiExtSelectClipRgn
(
hdc
,
region
,
mode
);
...
...
@@ -267,16 +252,6 @@ BOOL WINAPI NtGdiGetCharWidthInfo( HDC hdc, struct char_width_info *info )
return
unix_funcs
->
pNtGdiGetCharWidthInfo
(
hdc
,
info
);
}
BOOL
WINAPI
NtGdiGetColorAdjustment
(
HDC
hdc
,
COLORADJUSTMENT
*
ca
)
{
return
unix_funcs
->
pNtGdiGetColorAdjustment
(
hdc
,
ca
);
}
HANDLE
WINAPI
NtGdiGetDCObject
(
HDC
hdc
,
UINT
type
)
{
return
unix_funcs
->
pNtGdiGetDCObject
(
hdc
,
type
);
}
INT
WINAPI
NtGdiGetDIBitsInternal
(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
void
*
bits
,
BITMAPINFO
*
info
,
UINT
coloruse
,
UINT
max_bits
,
UINT
max_info
)
...
...
@@ -560,11 +535,6 @@ UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags )
return
unix_funcs
->
pNtGdiSetBoundsRect
(
hdc
,
rect
,
flags
);
}
BOOL
WINAPI
NtGdiSetColorAdjustment
(
HDC
hdc
,
const
COLORADJUSTMENT
*
ca
)
{
return
unix_funcs
->
pNtGdiSetColorAdjustment
(
hdc
,
ca
);
}
INT
WINAPI
NtGdiSetDIBitsToDeviceInternal
(
HDC
hdc
,
INT
x_dst
,
INT
y_dst
,
DWORD
cx
,
DWORD
cy
,
INT
x_src
,
INT
y_src
,
UINT
startscan
,
UINT
lines
,
const
void
*
bits
,
const
BITMAPINFO
*
bmi
,
...
...
dlls/wow64win/gdi.c
View file @
6fbbbe1f
...
...
@@ -27,6 +27,37 @@
#include "ntgdi.h"
#include "wow64win_private.h"
NTSTATUS
WINAPI
wow64_NtGdiCreateClientObj
(
UINT
*
args
)
{
ULONG
type
=
get_ulong
(
&
args
);
return
HandleToUlong
(
NtGdiCreateClientObj
(
type
));
}
NTSTATUS
WINAPI
wow64_NtGdiDeleteClientObj
(
UINT
*
args
)
{
HGDIOBJ
obj
=
get_handle
(
&
args
);
return
NtGdiDeleteClientObj
(
obj
);
}
NTSTATUS
WINAPI
wow64_NtGdiExtGetObjectW
(
UINT
*
args
)
{
HGDIOBJ
handle
=
get_handle
(
&
args
);
INT
count
=
get_ulong
(
&
args
);
void
*
buffer
=
get_ptr
(
&
args
);
return
NtGdiExtGetObjectW
(
handle
,
count
,
buffer
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetDCObject
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
UINT
type
=
get_ulong
(
&
args
);
return
HandleToUlong
(
NtGdiGetDCObject
(
hdc
,
type
));
}
NTSTATUS
WINAPI
wow64_NtGdiCreateBitmap
(
UINT
*
args
)
{
INT
width
=
get_ulong
(
&
args
);
...
...
@@ -403,6 +434,22 @@ NTSTATUS WINAPI wow64_NtGdiRemoveFontResourceW( UINT *args )
return
NtGdiRemoveFontResourceW
(
str
,
size
,
files
,
flags
,
tid
,
dv
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetColorAdjustment
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
COLORADJUSTMENT
*
ca
=
get_ptr
(
&
args
);
return
NtGdiGetColorAdjustment
(
hdc
,
ca
);
}
NTSTATUS
WINAPI
wow64_NtGdiSetColorAdjustment
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
const
COLORADJUSTMENT
*
ca
=
get_ptr
(
&
args
);
return
NtGdiSetColorAdjustment
(
hdc
,
ca
);
}
NTSTATUS
WINAPI
wow64_NtGdiFlush
(
UINT
*
args
)
{
return
NtGdiFlush
();
...
...
dlls/wow64win/syscall.h
View file @
6fbbbe1f
...
...
@@ -26,6 +26,7 @@
SYSCALL_ENTRY( NtGdiAddFontResourceW ) \
SYSCALL_ENTRY( NtGdiCombineRgn ) \
SYSCALL_ENTRY( NtGdiCreateBitmap ) \
SYSCALL_ENTRY( NtGdiCreateClientObj ) \
SYSCALL_ENTRY( NtGdiCreateDIBBrush ) \
SYSCALL_ENTRY( NtGdiCreateDIBSection ) \
SYSCALL_ENTRY( NtGdiCreateEllipticRgn ) \
...
...
@@ -34,13 +35,17 @@
SYSCALL_ENTRY( NtGdiCreateRectRgn ) \
SYSCALL_ENTRY( NtGdiCreateRoundRectRgn ) \
SYSCALL_ENTRY( NtGdiCreateSolidBrush ) \
SYSCALL_ENTRY( NtGdiDeleteClientObj ) \
SYSCALL_ENTRY( NtGdiDescribePixelFormat ) \
SYSCALL_ENTRY( NtGdiDrawStream ) \
SYSCALL_ENTRY( NtGdiEqualRgn ) \
SYSCALL_ENTRY( NtGdiExtCreateRegion ) \
SYSCALL_ENTRY( NtGdiExtGetObjectW ) \
SYSCALL_ENTRY( NtGdiFlush ) \
SYSCALL_ENTRY( NtGdiGetBitmapBits ) \
SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \
SYSCALL_ENTRY( NtGdiGetColorAdjustment ) \
SYSCALL_ENTRY( NtGdiGetDCObject ) \
SYSCALL_ENTRY( NtGdiGetFontFileData ) \
SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \
SYSCALL_ENTRY( NtGdiGetRegionData ) \
...
...
@@ -56,6 +61,7 @@
SYSCALL_ENTRY( NtGdiSetBitmapBits ) \
SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \
SYSCALL_ENTRY( NtGdiSetBrushOrg ) \
SYSCALL_ENTRY( NtGdiSetColorAdjustment ) \
SYSCALL_ENTRY( NtGdiSetMetaRgn ) \
SYSCALL_ENTRY( NtGdiSetPixelFormat ) \
SYSCALL_ENTRY( NtGdiSetRectRgn ) \
...
...
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