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
b601e3fa
Commit
b601e3fa
authored
May 27, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use syscall interface for all exports.
parent
da4663d6
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
45 additions
and
94 deletions
+45
-94
device.c
dlls/hidclass.sys/device.c
+1
-1
pnp.c
dlls/hidclass.sys/pnp.c
+1
-1
Makefile.in
dlls/win32u/Makefile.in
+1
-2
dc.c
dlls/win32u/dc.c
+1
-1
gdiobj.c
dlls/win32u/gdiobj.c
+0
-14
input.c
dlls/win32u/input.c
+1
-1
main.c
dlls/win32u/main.c
+0
-3
syscall.c
dlls/win32u/syscall.c
+3
-1
win32u.spec
dlls/win32u/win32u.spec
+3
-6
win32u_private.h
dlls/win32u/win32u_private.h
+0
-10
wrappers.c
dlls/win32u/wrappers.c
+0
-50
gdi.c
dlls/wow64win/gdi.c
+20
-0
syscall.h
dlls/wow64win/syscall.h
+4
-1
user.c
dlls/wow64win/user.c
+6
-0
ntgdi.h
include/ntgdi.h
+1
-2
ntuser.h
include/ntuser.h
+3
-0
winuser.h
include/winuser.h
+0
-1
No files found.
dlls/hidclass.sys/device.c
View file @
b601e3fa
...
...
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include "hid.h"
#include "winreg.h"
#include "
win
user.h"
#include "
nt
user.h"
#include "ddk/hidsdi.h"
#include "ddk/hidtypes.h"
...
...
dlls/hidclass.sys/pnp.c
View file @
b601e3fa
...
...
@@ -29,7 +29,7 @@
#include "ddk/hidtypes.h"
#include "ddk/wdm.h"
#include "regstr.h"
#include "
win
user.h"
#include "
nt
user.h"
#include "wine/debug.h"
#include "wine/asm.h"
#include "wine/list.h"
...
...
dlls/win32u/Makefile.in
View file @
b601e3fa
...
...
@@ -53,7 +53,6 @@ C_SRCS = \
vertical.c
\
vulkan.c
\
window.c
\
winstation.c
\
wrappers.c
winstation.c
font_EXTRADEFS
=
-DWINE_FONT_DIR
=
\"
`
${
MAKEDEP
}
-R
${
datadir
}
/wine
${
fontdir
}
`
\"
dlls/win32u/dc.c
View file @
b601e3fa
...
...
@@ -1473,7 +1473,7 @@ DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout )
/**********************************************************************
* __wine_get_icm_profile (win32u.@)
*/
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
)
BOOL
WINAPI
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
)
{
PHYSDEV
physdev
;
DC
*
dc
;
...
...
dlls/win32u/gdiobj.c
View file @
b601e3fa
...
...
@@ -1027,14 +1027,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
return
FALSE
;
}
static
struct
unix_funcs
unix_funcs
=
{
__wine_get_file_outline_text_metric
,
__wine_get_icm_profile
,
__wine_send_input
,
};
void
gdi_init
(
void
)
{
pthread_mutexattr_t
attr
;
...
...
@@ -1052,9 +1044,3 @@ void gdi_init(void)
dpi
=
font_init
();
init_stock_objects
(
dpi
);
}
NTSTATUS
callbacks_init
(
void
*
args
)
{
*
(
const
struct
unix_funcs
**
)
args
=
&
unix_funcs
;
return
0
;
}
dlls/win32u/input.c
View file @
b601e3fa
...
...
@@ -598,7 +598,7 @@ BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach )
*
* Internal SendInput function to allow the graphics driver to inject real events.
*/
BOOL
CDECL
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
)
BOOL
WINAPI
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
)
{
return
set_ntstatus
(
send_hardware_message
(
hwnd
,
input
,
rawinput
,
0
));
}
...
...
dlls/win32u/main.c
View file @
b601e3fa
...
...
@@ -55,10 +55,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved )
if
(
__wine_syscall_dispatcher
)
break
;
/* already set through Wow64Transition */
if
(
!
NtQueryVirtualMemory
(
GetCurrentProcess
(),
inst
,
MemoryWineUnixFuncs
,
&
win32u_handle
,
sizeof
(
win32u_handle
),
NULL
))
{
__wine_unix_call
(
win32u_handle
,
0
,
&
__wine_syscall_dispatcher
);
wrappers_init
(
win32u_handle
);
}
break
;
}
return
TRUE
;
...
...
dlls/win32u/syscall.c
View file @
b601e3fa
...
...
@@ -432,6 +432,9 @@ static void * const syscalls[] =
NtUserWaitMessage
,
NtUserWindowFromDC
,
NtUserWindowFromPoint
,
__wine_get_file_outline_text_metric
,
__wine_get_icm_profile
,
__wine_send_input
};
static
BYTE
arguments
[
ARRAY_SIZE
(
syscalls
)];
...
...
@@ -452,5 +455,4 @@ static NTSTATUS init( void *dispatcher )
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
init
,
callbacks_init
,
};
dlls/win32u/win32u.spec
View file @
b601e3fa
...
...
@@ -1320,9 +1320,6 @@
################################################################
# Wine internal extensions
# Graphics drivers
@ cdecl __wine_send_input(long ptr ptr)
# gdi32
@ cdecl __wine_get_icm_profile(long long ptr ptr)
@ stdcall __wine_get_file_outline_text_metric(wstr ptr ptr ptr)
@ stdcall -syscall __wine_get_icm_profile(long long ptr ptr)
@ stdcall -syscall __wine_get_file_outline_text_metric(wstr ptr ptr ptr)
@ stdcall -syscall __wine_send_input(long ptr ptr)
dlls/win32u/win32u_private.h
View file @
b601e3fa
...
...
@@ -32,14 +32,6 @@
#include "wine/debug.h"
#include "wine/server.h"
struct
unix_funcs
{
/* Wine-specific functions */
BOOL
(
WINAPI
*
get_file_outline_text_metric
)(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
UINT
*
em_square
,
WCHAR
*
face_name
);
BOOL
(
CDECL
*
get_icm_profile
)(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
BOOL
(
CDECL
*
wine_send_input
)(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
);
};
/* clipboard.c */
extern
UINT
enum_clipboard_formats
(
UINT
format
)
DECLSPEC_HIDDEN
;
...
...
@@ -247,9 +239,7 @@ static inline void release_win_ptr( struct tagWND *ptr )
user_unlock
();
}
extern
void
wrappers_init
(
unixlib_handle_t
handle
)
DECLSPEC_HIDDEN
;
extern
void
gdi_init
(
void
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
callbacks_init
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
void
winstation_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
sysparams_init
(
void
)
DECLSPEC_HIDDEN
;
extern
int
muldiv
(
int
a
,
int
b
,
int
c
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/wrappers.c
deleted
100644 → 0
View file @
da4663d6
/*
* Unix call wrappers
*
* Copyright 2021 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "win32u_private.h"
static
const
struct
unix_funcs
*
unix_funcs
;
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
get_icm_profile
(
hdc
,
allow_default
,
size
,
filename
);
}
BOOL
WINAPI
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
UINT
*
em_square
,
WCHAR
*
face_name
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
get_file_outline_text_metric
(
path
,
otm
,
em_square
,
face_name
);
}
BOOL
CDECL
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
wine_send_input
(
hwnd
,
input
,
rawinput
);
}
extern
void
wrappers_init
(
unixlib_handle_t
handle
)
{
const
void
*
args
;
if
(
!
__wine_unix_call
(
handle
,
1
,
&
args
))
unix_funcs
=
args
;
}
dlls/wow64win/gdi.c
View file @
b601e3fa
...
...
@@ -2081,3 +2081,23 @@ NTSTATUS WINAPI wow64_NtGdiWidenPath( UINT *args )
return
NtGdiWidenPath
(
hdc
);
}
NTSTATUS
WINAPI
wow64___wine_get_icm_profile
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
BOOL
allow_default
=
get_ulong
(
&
args
);
DWORD
*
size
=
get_ptr
(
&
args
);
WCHAR
*
filename
=
get_ptr
(
&
args
);
return
__wine_get_icm_profile
(
hdc
,
allow_default
,
size
,
filename
);
}
NTSTATUS
WINAPI
wow64___wine_get_file_outline_text_metric
(
UINT
*
args
)
{
const
WCHAR
*
path
=
get_ptr
(
&
args
);
TEXTMETRICW
*
otm
=
get_ptr
(
&
args
);
UINT
*
em_square
=
get_ptr
(
&
args
);
WCHAR
*
face_name
=
get_ptr
(
&
args
);
return
__wine_get_file_outline_text_metric
(
path
,
otm
,
em_square
,
face_name
);
}
dlls/wow64win/syscall.h
View file @
b601e3fa
...
...
@@ -417,6 +417,9 @@
SYSCALL_ENTRY( NtUserWaitForInputIdle ) \
SYSCALL_ENTRY( NtUserWaitMessage ) \
SYSCALL_ENTRY( NtUserWindowFromDC ) \
SYSCALL_ENTRY( NtUserWindowFromPoint )
SYSCALL_ENTRY( NtUserWindowFromPoint ) \
SYSCALL_ENTRY( __wine_get_file_outline_text_metric ) \
SYSCALL_ENTRY( __wine_get_icm_profile ) \
SYSCALL_ENTRY( __wine_send_input )
#endif
/* __WOW64WIN_SYSCALL_H */
dlls/wow64win/user.c
View file @
b601e3fa
...
...
@@ -4342,3 +4342,9 @@ NTSTATUS WINAPI wow64_NtUserDisplayConfigGetDeviceInfo( UINT *args )
return
NtUserDisplayConfigGetDeviceInfo
(
packet
);
}
NTSTATUS
WINAPI
wow64___wine_send_input
(
UINT
*
args
)
{
ERR
(
"not supported
\n
"
);
return
0
;
}
include/ntgdi.h
View file @
b601e3fa
...
...
@@ -483,8 +483,7 @@ NTSTATUS WINAPI NtGdiDdDDISetQueuedLimit( D3DKMT_SETQUEUEDLIMIT *desc );
NTSTATUS
WINAPI
NtGdiDdDDISetVidPnSourceOwner
(
const
D3DKMT_SETVIDPNSOURCEOWNER
*
desc
);
/* Wine extensions */
extern
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
BOOL
WINAPI
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
BOOL
WINAPI
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
TEXTMETRICW
*
otm
,
UINT
*
em_square
,
WCHAR
*
face_name
);
...
...
include/ntuser.h
View file @
b601e3fa
...
...
@@ -1527,4 +1527,7 @@ static inline BOOL NtUserShowOwnedPopups( HWND hwnd, BOOL show )
return
NtUserCallHwndParam
(
hwnd
,
show
,
NtUserCallHwndParam_ShowOwnedPopups
);
}
/* Wine extensions */
BOOL
WINAPI
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
);
#endif
/* _NTUSER_ */
include/winuser.h
View file @
b601e3fa
...
...
@@ -4765,7 +4765,6 @@ static inline BOOL WINAPI SetRectEmpty(LPRECT rect)
WORD
WINAPI
SYSTEM_KillSystemTimer
(
WORD
);
#ifdef __WINESRC__
WINUSERAPI
BOOL
CDECL
__wine_send_input
(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
);
/* Uxtheme hook functions and struct */
...
...
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