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
9b5c916e
Commit
9b5c916e
authored
Jul 31, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use syscall interface for more font functions.
parent
384d34d6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
224 additions
and
103 deletions
+224
-103
gdiobj.c
dlls/win32u/gdiobj.c
+0
-10
syscall.c
dlls/win32u/syscall.c
+10
-0
win32u.spec
dlls/win32u/win32u.spec
+10
-10
win32u_private.h
dlls/win32u/win32u_private.h
+0
-16
wrappers.c
dlls/win32u/wrappers.c
+0
-67
gdi.c
dlls/wow64win/gdi.c
+194
-0
syscall.h
dlls/wow64win/syscall.h
+10
-0
No files found.
dlls/win32u/gdiobj.c
View file @
9b5c916e
...
...
@@ -1031,18 +1031,13 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static
struct
unix_funcs
unix_funcs
=
{
NtGdiDoPalette
,
NtGdiEnumFonts
,
NtGdiExcludeClipRect
,
NtGdiExtEscape
,
NtGdiExtTextOutW
,
NtGdiExtSelectClipRgn
,
NtGdiFontIsLinked
,
NtGdiGetAndSetDCDword
,
NtGdiGetAppClipBox
,
NtGdiGetBoundsRect
,
NtGdiGetCharABCWidthsW
,
NtGdiGetCharWidthW
,
NtGdiGetCharWidthInfo
,
NtGdiGetDeviceCaps
,
NtGdiGetDeviceGammaRamp
,
NtGdiGetFontData
,
...
...
@@ -1051,14 +1046,9 @@ static struct unix_funcs unix_funcs =
NtGdiGetGlyphOutline
,
NtGdiGetKerningPairs
,
NtGdiGetNearestColor
,
NtGdiGetOutlineTextMetricsInternalW
,
NtGdiGetRandomRgn
,
NtGdiGetRasterizerCaps
,
NtGdiGetRealizationInfo
,
NtGdiGetTextCharsetInfo
,
NtGdiGetTextExtentExW
,
NtGdiGetTextFaceW
,
NtGdiGetTextMetricsW
,
NtGdiIntersectClipRect
,
NtGdiOffsetClipRgn
,
NtGdiPtVisible
,
...
...
dlls/win32u/syscall.c
View file @
9b5c916e
...
...
@@ -87,11 +87,13 @@ static void * const syscalls[] =
NtGdiEndDoc
,
NtGdiEndPage
,
NtGdiEndPath
,
NtGdiEnumFonts
,
NtGdiEqualRgn
,
NtGdiExtCreatePen
,
NtGdiExtCreateRegion
,
NtGdiExtFloodFill
,
NtGdiExtGetObjectW
,
NtGdiExtTextOutW
,
NtGdiFillPath
,
NtGdiFillRgn
,
NtGdiFlattenPath
,
...
...
@@ -99,6 +101,9 @@ static void * const syscalls[] =
NtGdiFrameRgn
,
NtGdiGetBitmapBits
,
NtGdiGetBitmapDimension
,
NtGdiGetCharABCWidthsW
,
NtGdiGetCharWidthInfo
,
NtGdiGetCharWidthW
,
NtGdiGetColorAdjustment
,
NtGdiGetDCDword
,
NtGdiGetDCObject
,
...
...
@@ -107,12 +112,17 @@ static void * const syscalls[] =
NtGdiGetFontFileData
,
NtGdiGetFontFileInfo
,
NtGdiGetNearestPaletteIndex
,
NtGdiGetOutlineTextMetricsInternalW
,
NtGdiGetPath
,
NtGdiGetPixel
,
NtGdiGetRegionData
,
NtGdiGetRgnBox
,
NtGdiGetSpoolMessage
,
NtGdiGetSystemPaletteUse
,
NtGdiGetTextCharsetInfo
,
NtGdiGetTextExtentExW
,
NtGdiGetTextFaceW
,
NtGdiGetTextMetricsW
,
NtGdiGetTransform
,
NtGdiGradientFill
,
NtGdiHfontCreate
,
...
...
dlls/win32u/win32u.spec
View file @
9b5c916e
...
...
@@ -413,7 +413,7 @@
@ stub NtGdiEngTransparentBlt
@ stub NtGdiEngUnlockSurface
@ stub NtGdiEnsureDpiDepDefaultGuiFontForPlateau
@ stdcall NtGdiEnumFonts(long long long long wstr long ptr ptr)
@ stdcall
-syscall
NtGdiEnumFonts(long long long long wstr long ptr ptr)
@ stub NtGdiEnumObjects
@ stdcall -syscall NtGdiEqualRgn(long long)
@ stub NtGdiEudcLoadUnloadLink
...
...
@@ -424,7 +424,7 @@
@ stdcall -syscall NtGdiExtFloodFill(long long long long long)
@ stdcall -syscall NtGdiExtGetObjectW(long long ptr)
@ stdcall NtGdiExtSelectClipRgn(long long long)
@ stdcall NtGdiExtTextOutW(long long long long ptr ptr long ptr long)
@ stdcall
-syscall
NtGdiExtTextOutW(long long long long ptr ptr long ptr long)
@ stub NtGdiFONTOBJ_cGetAllGlyphHandles
@ stub NtGdiFONTOBJ_cGetGlyphs
@ stub NtGdiFONTOBJ_pQueryGlyphAttrs
...
...
@@ -453,10 +453,10 @@
@ stub NtGdiGetCertificateByHandle
@ stub NtGdiGetCertificateSize
@ stub NtGdiGetCertificateSizeByHandle
@ stdcall NtGdiGetCharABCWidthsW(long long long ptr long ptr)
@ stdcall
-syscall
NtGdiGetCharABCWidthsW(long long long ptr long ptr)
@ stub NtGdiGetCharSet
@ stdcall NtGdiGetCharWidthInfo(long ptr)
@ stdcall NtGdiGetCharWidthW(long long long ptr long ptr)
@ stdcall
-syscall
NtGdiGetCharWidthInfo(long ptr)
@ stdcall
-syscall
NtGdiGetCharWidthW(long long long ptr long ptr)
@ stub NtGdiGetCharacterPlacementW
@ stdcall -syscall NtGdiGetColorAdjustment(long ptr)
@ stub NtGdiGetColorSpaceforBitmap
...
...
@@ -496,7 +496,7 @@
@ stub NtGdiGetOPMInformation
@ stub NtGdiGetOPMRandomNumber
@ stub NtGdiGetObjectBitmapHandle
@ stdcall NtGdiGetOutlineTextMetricsInternalW(long long ptr long)
@ stdcall
-syscall
NtGdiGetOutlineTextMetricsInternalW(long long ptr long)
@ stdcall -syscall NtGdiGetPath(long ptr ptr long)
@ stub NtGdiGetPerBandInfo
@ stub NtGdiGetPhysicalMonitorDescription
...
...
@@ -515,11 +515,11 @@
@ stub NtGdiGetStringBitmapW
@ stub NtGdiGetSuggestedOPMProtectedOutputArraySize
@ stdcall -syscall NtGdiGetSystemPaletteUse(long)
@ stdcall NtGdiGetTextCharsetInfo(long ptr long)
@ stdcall
-syscall
NtGdiGetTextCharsetInfo(long ptr long)
@ stub NtGdiGetTextExtent
@ stdcall NtGdiGetTextExtentExW(long wstr long long ptr ptr ptr long)
@ stdcall NtGdiGetTextFaceW(long long ptr long)
@ stdcall NtGdiGetTextMetricsW(long ptr long)
@ stdcall
-syscall
NtGdiGetTextExtentExW(long wstr long long ptr ptr ptr long)
@ stdcall
-syscall
NtGdiGetTextFaceW(long long ptr long)
@ stdcall
-syscall
NtGdiGetTextMetricsW(long ptr long)
@ stdcall -syscall NtGdiGetTransform(long long ptr)
@ stub NtGdiGetUFI
@ stub NtGdiGetUFIPathname
...
...
dlls/win32u/win32u_private.h
View file @
9b5c916e
...
...
@@ -37,23 +37,14 @@ struct unix_funcs
/* win32u functions */
LONG
(
WINAPI
*
pNtGdiDoPalette
)(
HGDIOBJ
handle
,
WORD
start
,
WORD
count
,
void
*
entries
,
DWORD
func
,
BOOL
inbound
);
BOOL
(
WINAPI
*
pNtGdiEnumFonts
)(
HDC
hdc
,
ULONG
type
,
ULONG
win32_compat
,
ULONG
face_name_len
,
const
WCHAR
*
face_name
,
ULONG
charset
,
ULONG
*
count
,
void
*
buf
);
INT
(
WINAPI
*
pNtGdiExcludeClipRect
)(
HDC
hdc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
INT
(
WINAPI
*
pNtGdiExtEscape
)(
HDC
hdc
,
WCHAR
*
driver
,
INT
driver_id
,
INT
escape
,
INT
input_size
,
const
char
*
input
,
INT
output_size
,
char
*
output
);
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
*
pNtGdiExtSelectClipRgn
)(
HDC
hdc
,
HRGN
region
,
INT
mode
);
BOOL
(
WINAPI
*
pNtGdiFontIsLinked
)(
HDC
hdc
);
BOOL
(
WINAPI
*
pNtGdiGetAndSetDCDword
)(
HDC
hdc
,
UINT
method
,
DWORD
value
,
DWORD
*
result
);
INT
(
WINAPI
*
pNtGdiGetAppClipBox
)(
HDC
hdc
,
RECT
*
rect
);
UINT
(
WINAPI
*
pNtGdiGetBoundsRect
)(
HDC
hdc
,
RECT
*
rect
,
UINT
flags
);
BOOL
(
WINAPI
*
pNtGdiGetCharABCWidthsW
)(
HDC
hdc
,
UINT
first
,
UINT
last
,
WCHAR
*
chars
,
ULONG
flags
,
void
*
buffer
);
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
);
INT
(
WINAPI
*
pNtGdiGetDeviceCaps
)(
HDC
hdc
,
INT
cap
);
BOOL
(
WINAPI
*
pNtGdiGetDeviceGammaRamp
)(
HDC
hdc
,
void
*
ptr
);
DWORD
(
WINAPI
*
pNtGdiGetFontData
)(
HDC
hdc
,
DWORD
table
,
DWORD
offset
,
void
*
buffer
,
DWORD
length
);
...
...
@@ -65,16 +56,9 @@ struct unix_funcs
BOOL
ignore_rotation
);
DWORD
(
WINAPI
*
pNtGdiGetKerningPairs
)(
HDC
hdc
,
DWORD
count
,
KERNINGPAIR
*
kern_pair
);
COLORREF
(
WINAPI
*
pNtGdiGetNearestColor
)(
HDC
hdc
,
COLORREF
color
);
UINT
(
WINAPI
*
pNtGdiGetOutlineTextMetricsInternalW
)(
HDC
hdc
,
UINT
cbData
,
OUTLINETEXTMETRICW
*
otm
,
ULONG
opts
);
INT
(
WINAPI
*
pNtGdiGetRandomRgn
)(
HDC
hdc
,
HRGN
region
,
INT
code
);
BOOL
(
WINAPI
*
pNtGdiGetRasterizerCaps
)(
RASTERIZER_STATUS
*
status
,
UINT
size
);
BOOL
(
WINAPI
*
pNtGdiGetRealizationInfo
)(
HDC
hdc
,
struct
font_realization_info
*
info
);
UINT
(
WINAPI
*
pNtGdiGetTextCharsetInfo
)(
HDC
hdc
,
FONTSIGNATURE
*
fs
,
DWORD
flags
);
BOOL
(
WINAPI
*
pNtGdiGetTextExtentExW
)(
HDC
hdc
,
const
WCHAR
*
str
,
INT
count
,
INT
max_ext
,
INT
*
nfit
,
INT
*
dxs
,
SIZE
*
size
,
UINT
flags
);
INT
(
WINAPI
*
pNtGdiGetTextFaceW
)(
HDC
hdc
,
INT
count
,
WCHAR
*
name
,
BOOL
alias_name
);
BOOL
(
WINAPI
*
pNtGdiGetTextMetricsW
)(
HDC
hdc
,
TEXTMETRICW
*
metrics
,
ULONG
flags
);
INT
(
WINAPI
*
pNtGdiIntersectClipRect
)(
HDC
hdc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
INT
(
WINAPI
*
pNtGdiOffsetClipRgn
)(
HDC
hdc
,
INT
x
,
INT
y
);
BOOL
(
WINAPI
*
pNtGdiPtVisible
)(
HDC
hdc
,
INT
x
,
INT
y
);
...
...
dlls/win32u/wrappers.c
View file @
9b5c916e
...
...
@@ -37,14 +37,6 @@ BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps )
return
unix_funcs
->
pNtUserEndPaint
(
hwnd
,
ps
);
}
BOOL
WINAPI
NtGdiEnumFonts
(
HDC
hdc
,
ULONG
type
,
ULONG
win32_compat
,
ULONG
face_name_len
,
const
WCHAR
*
face_name
,
ULONG
charset
,
ULONG
*
count
,
void
*
buf
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiEnumFonts
(
hdc
,
type
,
win32_compat
,
face_name_len
,
face_name
,
charset
,
count
,
buf
);
}
INT
WINAPI
NtGdiExcludeClipRect
(
HDC
hdc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
{
if
(
!
unix_funcs
)
return
ERROR
;
...
...
@@ -59,13 +51,6 @@ INT WINAPI NtGdiExtEscape( HDC hdc, WCHAR *driver, INT driver_id, INT escape, IN
output_size
,
output
);
}
BOOL
WINAPI
NtGdiExtTextOutW
(
HDC
hdc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
rect
,
const
WCHAR
*
str
,
UINT
count
,
const
INT
*
dx
,
DWORD
cp
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiExtTextOutW
(
hdc
,
x
,
y
,
flags
,
rect
,
str
,
count
,
dx
,
cp
);
}
INT
WINAPI
NtGdiExtSelectClipRgn
(
HDC
hdc
,
HRGN
region
,
INT
mode
)
{
if
(
!
unix_funcs
)
return
ERROR
;
...
...
@@ -96,26 +81,6 @@ UINT WINAPI NtGdiGetBoundsRect( HDC hdc, RECT *rect, UINT flags )
return
unix_funcs
->
pNtGdiGetBoundsRect
(
hdc
,
rect
,
flags
);
}
BOOL
WINAPI
NtGdiGetCharABCWidthsW
(
HDC
hdc
,
UINT
first
,
UINT
last
,
WCHAR
*
chars
,
ULONG
flags
,
void
*
buffer
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiGetCharABCWidthsW
(
hdc
,
first
,
last
,
chars
,
flags
,
buffer
);
}
BOOL
WINAPI
NtGdiGetCharWidthW
(
HDC
hdc
,
UINT
first_char
,
UINT
last_char
,
WCHAR
*
chars
,
ULONG
flags
,
void
*
buffer
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiGetCharWidthW
(
hdc
,
first_char
,
last_char
,
chars
,
flags
,
buffer
);
}
BOOL
WINAPI
NtGdiGetCharWidthInfo
(
HDC
hdc
,
struct
char_width_info
*
info
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiGetCharWidthInfo
(
hdc
,
info
);
}
INT
WINAPI
NtGdiGetDeviceCaps
(
HDC
hdc
,
INT
cap
)
{
if
(
!
unix_funcs
)
return
0
;
...
...
@@ -167,13 +132,6 @@ COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color )
return
unix_funcs
->
pNtGdiGetNearestColor
(
hdc
,
color
);
}
UINT
WINAPI
NtGdiGetOutlineTextMetricsInternalW
(
HDC
hdc
,
UINT
cbData
,
OUTLINETEXTMETRICW
*
otm
,
ULONG
opts
)
{
if
(
!
unix_funcs
)
return
0
;
return
unix_funcs
->
pNtGdiGetOutlineTextMetricsInternalW
(
hdc
,
cbData
,
otm
,
opts
);
}
INT
WINAPI
NtGdiGetRandomRgn
(
HDC
hdc
,
HRGN
region
,
INT
code
)
{
if
(
!
unix_funcs
)
return
-
1
;
...
...
@@ -192,31 +150,6 @@ BOOL WINAPI NtGdiGetRealizationInfo( HDC hdc, struct font_realization_info *info
return
unix_funcs
->
pNtGdiGetRealizationInfo
(
hdc
,
info
);
}
UINT
WINAPI
NtGdiGetTextCharsetInfo
(
HDC
hdc
,
FONTSIGNATURE
*
fs
,
DWORD
flags
)
{
if
(
!
unix_funcs
)
return
DEFAULT_CHARSET
;
return
unix_funcs
->
pNtGdiGetTextCharsetInfo
(
hdc
,
fs
,
flags
);
}
BOOL
WINAPI
NtGdiGetTextExtentExW
(
HDC
hdc
,
const
WCHAR
*
str
,
INT
count
,
INT
max_ext
,
INT
*
nfit
,
INT
*
dxs
,
SIZE
*
size
,
UINT
flags
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiGetTextExtentExW
(
hdc
,
str
,
count
,
max_ext
,
nfit
,
dxs
,
size
,
flags
);
}
INT
WINAPI
NtGdiGetTextFaceW
(
HDC
hdc
,
INT
count
,
WCHAR
*
name
,
BOOL
alias_name
)
{
if
(
!
unix_funcs
)
return
0
;
return
unix_funcs
->
pNtGdiGetTextFaceW
(
hdc
,
count
,
name
,
alias_name
);
}
BOOL
WINAPI
NtGdiGetTextMetricsW
(
HDC
hdc
,
TEXTMETRICW
*
metrics
,
ULONG
flags
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtGdiGetTextMetricsW
(
hdc
,
metrics
,
flags
);
}
INT
WINAPI
NtGdiIntersectClipRect
(
HDC
hdc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
{
if
(
!
unix_funcs
)
return
ERROR
;
...
...
dlls/wow64win/gdi.c
View file @
9b5c916e
...
...
@@ -49,6 +49,42 @@ typedef struct
DWORD
elpStyleEntry
[
1
];
}
EXTLOGPEN32
;
typedef
struct
{
UINT
otmSize
;
TEXTMETRICW
otmTextMetrics
;
BYTE
otmFiller
;
PANOSE
otmPanoseNumber
;
UINT
otmfsSelection
;
UINT
otmfsType
;
INT
otmsCharSlopeRise
;
INT
otmsCharSlopeRun
;
INT
otmItalicAngle
;
UINT
otmEMSquare
;
INT
otmAscent
;
INT
otmDescent
;
UINT
otmLineGap
;
UINT
otmsCapEmHeight
;
UINT
otmsXHeight
;
RECT
otmrcFontBox
;
INT
otmMacAscent
;
INT
otmMacDescent
;
UINT
otmMacLineGap
;
UINT
otmusMinimumPPEM
;
POINT
otmptSubscriptSize
;
POINT
otmptSubscriptOffset
;
POINT
otmptSuperscriptSize
;
POINT
otmptSuperscriptOffset
;
UINT
otmsStrikeoutSize
;
INT
otmsStrikeoutPosition
;
INT
otmsUnderscoreSize
;
INT
otmsUnderscorePosition
;
ULONG
otmpFamilyName
;
ULONG
otmpFaceName
;
ULONG
otmpStyleName
;
ULONG
otmpFullName
;
}
OUTLINETEXTMETRIC32
;
static
DWORD
gdi_handle_type
(
HGDIOBJ
obj
)
{
...
...
@@ -680,6 +716,20 @@ NTSTATUS WINAPI wow64_NtGdiEndPath( UINT *args )
return
NtGdiEndPath
(
hdc
);
}
NTSTATUS
WINAPI
wow64_NtGdiEnumFonts
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
ULONG
type
=
get_ulong
(
&
args
);
ULONG
win32_compat
=
get_ulong
(
&
args
);
ULONG
face_name_len
=
get_ulong
(
&
args
);
const
WCHAR
*
face_name
=
get_ptr
(
&
args
);
ULONG
charset
=
get_ulong
(
&
args
);
ULONG
*
count
=
get_ptr
(
&
args
);
void
*
buf
=
get_ptr
(
&
args
);
return
NtGdiEnumFonts
(
hdc
,
type
,
win32_compat
,
face_name_len
,
face_name
,
charset
,
count
,
buf
);
}
NTSTATUS
WINAPI
wow64_NtGdiEqualRgn
(
UINT
*
args
)
{
HRGN
hrgn1
=
get_handle
(
&
args
);
...
...
@@ -820,6 +870,21 @@ NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args )
}
}
NTSTATUS
WINAPI
wow64_NtGdiExtTextOutW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
INT
x
=
get_ulong
(
&
args
);
INT
y
=
get_ulong
(
&
args
);
UINT
flags
=
get_ulong
(
&
args
);
const
RECT
*
rect
=
get_ptr
(
&
args
);
const
WCHAR
*
str
=
get_ptr
(
&
args
);
UINT
count
=
get_ulong
(
&
args
);
const
INT
*
dx
=
get_ptr
(
&
args
);
DWORD
cp
=
get_ulong
(
&
args
);
return
NtGdiExtTextOutW
(
hdc
,
x
,
y
,
flags
,
rect
,
str
,
count
,
dx
,
cp
);
}
NTSTATUS
WINAPI
wow64_NtGdiFillPath
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
...
...
@@ -876,6 +941,38 @@ NTSTATUS WINAPI wow64_NtGdiGetBitmapDimension( UINT *args )
return
NtGdiGetBitmapDimension
(
bitmap
,
size
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetCharABCWidthsW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
UINT
first
=
get_ulong
(
&
args
);
UINT
last
=
get_ulong
(
&
args
);
WCHAR
*
chars
=
get_ptr
(
&
args
);
ULONG
flags
=
get_ulong
(
&
args
);
void
*
buffer
=
get_ptr
(
&
args
);
return
NtGdiGetCharABCWidthsW
(
hdc
,
first
,
last
,
chars
,
flags
,
buffer
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetCharWidthW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
UINT
first_char
=
get_ulong
(
&
args
);
UINT
last_char
=
get_ulong
(
&
args
);
WCHAR
*
chars
=
get_ptr
(
&
args
);
ULONG
flags
=
get_ulong
(
&
args
);
void
*
buffer
=
get_ptr
(
&
args
);
return
NtGdiGetCharWidthW
(
hdc
,
first_char
,
last_char
,
chars
,
flags
,
buffer
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetCharWidthInfo
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
struct
char_width_info
*
info
=
get_ptr
(
&
args
);
return
NtGdiGetCharWidthInfo
(
hdc
,
info
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetColorAdjustment
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
...
...
@@ -961,6 +1058,61 @@ NTSTATUS WINAPI wow64_NtGdiGetNearestPaletteIndex( UINT *args )
return
NtGdiGetNearestPaletteIndex
(
hpalette
,
color
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetOutlineTextMetricsInternalW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
UINT
size
=
get_ulong
(
&
args
);
OUTLINETEXTMETRIC32
*
otm32
=
get_ptr
(
&
args
);
ULONG
opts
=
get_ulong
(
&
args
);
OUTLINETEXTMETRICW
*
otm
,
otm_buf
;
UINT
ret
,
size64
;
static
const
size_t
otm_size_diff
=
sizeof
(
*
otm
)
-
sizeof
(
*
otm32
);
if
(
!
otm32
)
{
size64
=
0
;
otm
=
NULL
;
}
else
if
(
size
<=
sizeof
(
*
otm32
))
{
size64
=
sizeof
(
otm_buf
);
otm
=
&
otm_buf
;
}
else
{
size64
=
size
+
otm_size_diff
;
if
(
!
(
otm
=
Wow64AllocateTemp
(
size64
)))
return
0
;
}
if
(
!
(
ret
=
NtGdiGetOutlineTextMetricsInternalW
(
hdc
,
size64
,
otm
,
opts
)))
return
0
;
if
(
otm32
)
{
OUTLINETEXTMETRIC32
out
;
memcpy
(
&
out
,
otm
,
FIELD_OFFSET
(
OUTLINETEXTMETRIC32
,
otmpFamilyName
));
if
(
out
.
otmSize
>=
sizeof
(
*
otm
))
out
.
otmSize
-=
otm_size_diff
;
if
(
!
otm
->
otmpFamilyName
)
out
.
otmpFamilyName
=
0
;
else
out
.
otmpFamilyName
=
PtrToUlong
(
otm
->
otmpFamilyName
)
-
otm_size_diff
;
if
(
!
otm
->
otmpFaceName
)
out
.
otmpFaceName
=
0
;
else
out
.
otmpFaceName
=
PtrToUlong
(
otm
->
otmpFaceName
)
-
otm_size_diff
;
if
(
!
otm
->
otmpStyleName
)
out
.
otmpStyleName
=
0
;
else
out
.
otmpStyleName
=
PtrToUlong
(
otm
->
otmpStyleName
)
-
otm_size_diff
;
if
(
!
otm
->
otmpFullName
)
out
.
otmpFullName
=
0
;
else
out
.
otmpFullName
=
PtrToUlong
(
otm
->
otmpFullName
)
-
otm_size_diff
;
memcpy
(
otm32
,
&
out
,
min
(
size
,
sizeof
(
out
)
));
if
(
ret
>
sizeof
(
*
otm
))
memcpy
(
otm32
+
1
,
otm
+
1
,
ret
-
sizeof
(
*
otm
)
);
}
return
ret
>=
sizeof
(
*
otm
)
?
ret
-
otm_size_diff
:
ret
;
}
NTSTATUS
WINAPI
wow64_NtGdiGetPath
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
...
...
@@ -980,6 +1132,48 @@ NTSTATUS WINAPI wow64_NtGdiGetPixel( UINT *args )
return
NtGdiGetPixel
(
hdc
,
x
,
y
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetTextCharsetInfo
(
UINT
*
args
)
{
HDC
hdc
=
get_ptr
(
&
args
);
FONTSIGNATURE
*
fs
=
get_ptr
(
&
args
);
DWORD
flags
=
get_ulong
(
&
args
);
return
NtGdiGetTextCharsetInfo
(
hdc
,
fs
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetTextExtentExW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
const
WCHAR
*
str
=
get_ptr
(
&
args
);
INT
count
=
get_ulong
(
&
args
);
INT
max_ext
=
get_ulong
(
&
args
);
INT
*
nfit
=
get_ptr
(
&
args
);
INT
*
dxs
=
get_ptr
(
&
args
);
SIZE
*
size
=
get_ptr
(
&
args
);
UINT
flags
=
get_ulong
(
&
args
);
return
NtGdiGetTextExtentExW
(
hdc
,
str
,
count
,
max_ext
,
nfit
,
dxs
,
size
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetTextFaceW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
INT
count
=
get_ulong
(
&
args
);
WCHAR
*
name
=
get_ptr
(
&
args
);
BOOL
alias_name
=
get_ulong
(
&
args
);
return
NtGdiGetTextFaceW
(
hdc
,
count
,
name
,
alias_name
);
}
NTSTATUS
WINAPI
wow64_NtGdiGetTextMetricsW
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
TEXTMETRICW
*
metrics
=
get_ptr
(
&
args
);
ULONG
flags
=
get_ulong
(
&
args
);
return
NtGdiGetTextMetricsW
(
hdc
,
metrics
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtGdiGradientFill
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
...
...
dlls/wow64win/syscall.h
View file @
9b5c916e
...
...
@@ -73,11 +73,13 @@
SYSCALL_ENTRY( NtGdiEndDoc ) \
SYSCALL_ENTRY( NtGdiEndPage ) \
SYSCALL_ENTRY( NtGdiEndPath ) \
SYSCALL_ENTRY( NtGdiEnumFonts ) \
SYSCALL_ENTRY( NtGdiEqualRgn ) \
SYSCALL_ENTRY( NtGdiExtCreatePen ) \
SYSCALL_ENTRY( NtGdiExtCreateRegion ) \
SYSCALL_ENTRY( NtGdiExtFloodFill ) \
SYSCALL_ENTRY( NtGdiExtGetObjectW ) \
SYSCALL_ENTRY( NtGdiExtTextOutW ) \
SYSCALL_ENTRY( NtGdiFillPath ) \
SYSCALL_ENTRY( NtGdiFillRgn ) \
SYSCALL_ENTRY( NtGdiFlattenPath ) \
...
...
@@ -85,6 +87,9 @@
SYSCALL_ENTRY( NtGdiFrameRgn ) \
SYSCALL_ENTRY( NtGdiGetBitmapBits ) \
SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \
SYSCALL_ENTRY( NtGdiGetCharABCWidthsW ) \
SYSCALL_ENTRY( NtGdiGetCharWidthInfo ) \
SYSCALL_ENTRY( NtGdiGetCharWidthW ) \
SYSCALL_ENTRY( NtGdiGetColorAdjustment ) \
SYSCALL_ENTRY( NtGdiGetDCDword ) \
SYSCALL_ENTRY( NtGdiGetDCObject ) \
...
...
@@ -93,12 +98,17 @@
SYSCALL_ENTRY( NtGdiGetFontFileData ) \
SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \
SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \
SYSCALL_ENTRY( NtGdiGetOutlineTextMetricsInternalW ) \
SYSCALL_ENTRY( NtGdiGetPath ) \
SYSCALL_ENTRY( NtGdiGetPixel ) \
SYSCALL_ENTRY( NtGdiGetRegionData ) \
SYSCALL_ENTRY( NtGdiGetRgnBox ) \
SYSCALL_ENTRY( NtGdiGetSpoolMessage ) \
SYSCALL_ENTRY( NtGdiGetSystemPaletteUse ) \
SYSCALL_ENTRY( NtGdiGetTextCharsetInfo ) \
SYSCALL_ENTRY( NtGdiGetTextExtentExW ) \
SYSCALL_ENTRY( NtGdiGetTextFaceW ) \
SYSCALL_ENTRY( NtGdiGetTextMetricsW ) \
SYSCALL_ENTRY( NtGdiGetTransform ) \
SYSCALL_ENTRY( NtGdiGradientFill ) \
SYSCALL_ENTRY( NtGdiHfontCreate ) \
...
...
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