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
f1549e7f
Commit
f1549e7f
authored
Jun 03, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Move driver implementation to unixlib.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
22342300
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
91 additions
and
23 deletions
+91
-23
Makefile.in
dlls/winemac.drv/Makefile.in
+2
-1
clipboard.c
dlls/winemac.drv/clipboard.c
+4
-0
display.c
dlls/winemac.drv/display.c
+5
-1
dllmain.c
dlls/winemac.drv/dllmain.c
+9
-1
event.c
dlls/winemac.drv/event.c
+6
-2
gdi.c
dlls/winemac.drv/gdi.c
+4
-0
image.c
dlls/winemac.drv/image.c
+4
-0
keyboard.c
dlls/winemac.drv/keyboard.c
+4
-0
macdrv.h
dlls/winemac.drv/macdrv.h
+2
-7
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+21
-9
mouse.c
dlls/winemac.drv/mouse.c
+4
-0
opengl.c
dlls/winemac.drv/opengl.c
+4
-0
surface.c
dlls/winemac.drv/surface.c
+4
-0
systray.c
dlls/winemac.drv/systray.c
+4
-0
unixlib.h
dlls/winemac.drv/unixlib.h
+4
-2
vulkan.c
dlls/winemac.drv/vulkan.c
+4
-0
window.c
dlls/winemac.drv/window.c
+4
-0
makedep.c
tools/makedep.c
+2
-0
No files found.
dlls/winemac.drv/Makefile.in
View file @
f1549e7f
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
winemac.drv
UNIXLIB
=
winemac.so
IMPORTS
=
uuid rpcrt4 user32 gdi32 win32u
DELAYIMPORTS
=
ole32 shell32 imm32
EXTRALIBS
=
-framework
AppKit
-framework
Carbon
-framework
Security
-framework
OpenGL
-framework
IOKit
-framework
CoreVideo
-framework
QuartzCore
$(METAL_LIBS)
EXTRALIBS
=
-
lwin32u
-
framework
AppKit
-framework
Carbon
-framework
Security
-framework
OpenGL
-framework
IOKit
-framework
CoreVideo
-framework
QuartzCore
$(METAL_LIBS)
EXTRADLLFLAGS
=
-mcygwin
...
...
dlls/winemac.drv/clipboard.c
View file @
f1549e7f
...
...
@@ -22,6 +22,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "ntstatus.h"
...
...
dlls/winemac.drv/display.c
View file @
f1549e7f
...
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
@@ -992,7 +996,7 @@ better:
}
else
if
(
flags
&
(
CDS_TEST
|
CDS_NORESET
))
ret
=
DISP_CHANGE_SUCCESSFUL
;
else
if
(
lstrcmpiW
(
primary_adapter
,
devname
))
else
if
(
wcsicmp
(
primary_adapter
,
devname
))
{
FIXME
(
"Changing non-primary adapter settings is currently unsupported.
\n
"
);
ret
=
DISP_CHANGE_SUCCESSFUL
;
...
...
dlls/winemac.drv/dllmain.c
View file @
f1549e7f
...
...
@@ -28,6 +28,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(macdrv);
HMODULE
macdrv_module
=
0
;
static
unixlib_handle_t
macdrv_handle
;
NTSTATUS
(
CDECL
*
macdrv_unix_call
)(
enum
macdrv_funcs
code
,
void
*
params
);
struct
quit_info
{
HWND
*
wins
;
...
...
@@ -405,15 +407,21 @@ static BOOL process_attach(void)
{
.
id
=
0
}
};
if
(
NtQueryVirtualMemory
(
GetCurrentProcess
(),
macdrv_module
,
MemoryWineUnixFuncs
,
&
macdrv_handle
,
sizeof
(
macdrv_handle
),
NULL
))
return
FALSE
;
for
(
str
=
strings
;
str
->
id
;
str
++
)
str
->
len
=
LoadStringW
(
macdrv_module
,
str
->
id
,
(
WCHAR
*
)
&
str
->
str
,
0
);
params
.
strings
=
strings
;
if
(
MACDRV_CALL
(
init
,
&
params
))
return
FALSE
;
params
.
pNtWaitForMultipleObjects
=
NtWaitForMultipleObjects
;
if
(
__wine_unix_call
(
macdrv_handle
,
unix_init
,
&
params
))
return
FALSE
;
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
memcpy
(
callback_table
+
NtUserDriverCallbackFirst
,
kernel_callbacks
,
sizeof
(
kernel_callbacks
)
);
macdrv_unix_call
=
params
.
unix_call
;
return
TRUE
;
}
...
...
dlls/winemac.drv/event.c
View file @
f1549e7f
...
...
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
@@ -521,7 +525,7 @@ NTSTATUS macdrv_MsgWaitForMultipleObjectsEx(DWORD count, const HANDLE *handles,
if
(
!
data
)
{
if
(
!
count
&&
timeout
&&
!
timeout
->
QuadPart
)
return
WAIT_TIMEOUT
;
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
return
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
...
...
@@ -534,7 +538,7 @@ NTSTATUS macdrv_MsgWaitForMultipleObjectsEx(DWORD count, const HANDLE *handles,
if
(
process_events
(
data
->
queue
,
event_mask
))
ret
=
count
-
1
;
else
if
(
count
||
!
timeout
||
timeout
->
QuadPart
)
{
ret
=
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
ret
=
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
if
(
ret
==
count
-
1
)
process_events
(
data
->
queue
,
event_mask
);
}
...
...
dlls/winemac.drv/gdi.c
View file @
f1549e7f
...
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
dlls/winemac.drv/image.c
View file @
f1549e7f
...
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
dlls/winemac.drv/keyboard.c
View file @
f1549e7f
...
...
@@ -24,6 +24,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
dlls/winemac.drv/macdrv.h
View file @
f1549e7f
...
...
@@ -43,6 +43,8 @@ extern BOOL allow_software_rendering DECLSPEC_HIDDEN;
extern
BOOL
disable_window_decorations
DECLSPEC_HIDDEN
;
extern
HMODULE
macdrv_module
DECLSPEC_HIDDEN
;
extern
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
)
DECLSPEC_HIDDEN
;
extern
const
char
*
debugstr_cf
(
CFTypeRef
t
)
DECLSPEC_HIDDEN
;
...
...
@@ -273,7 +275,6 @@ extern void macdrv_status_item_mouse_move(const macdrv_event *event) DECLSPEC_HI
extern
void
check_retina_status
(
void
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_init_display_devices
(
BOOL
force
)
DECLSPEC_HIDDEN
;
extern
void
init_user_driver
(
void
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_init
(
void
*
arg
)
DECLSPEC_HIDDEN
;
/**************************************************************************
* Mac IME driver
...
...
@@ -372,10 +373,4 @@ static inline UINT asciiz_to_unicode(WCHAR *dst, const char *src)
return
(
p
-
dst
)
*
sizeof
(
WCHAR
);
}
/* FIXME: remove once we use unixlib */
#define wcsicmp strcmpiW
#define wcsnicmp strncmpiW
#define wcsrchr strrchrW
#define wcstol strtolW
#endif
/* __WINE_MACDRV_H */
dlls/winemac.drv/macdrv_main.c
View file @
f1549e7f
...
...
@@ -19,6 +19,11 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <Security/AuthSession.h>
...
...
@@ -67,6 +72,8 @@ int enable_app_nap = FALSE;
CFDictionaryRef
localized_strings
;
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
/**************************************************************************
* debugstr_cf
...
...
@@ -313,9 +320,9 @@ static void setup_options(void)
{
static
const
WCHAR
noneW
[]
=
{
'n'
,
'o'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
allW
[]
=
{
'a'
,
'l'
,
'l'
,
0
};
if
(
!
lstrcmpW
(
buffer
,
noneW
))
if
(
!
wcscmp
(
buffer
,
noneW
))
topmost_float_inactive
=
TOPMOST_FLOAT_INACTIVE_NONE
;
else
if
(
!
lstrcmpW
(
buffer
,
allW
))
else
if
(
!
wcscmp
(
buffer
,
allW
))
topmost_float_inactive
=
TOPMOST_FLOAT_INACTIVE_ALL
;
else
topmost_float_inactive
=
TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN
;
...
...
@@ -371,9 +378,9 @@ static void setup_options(void)
{
static
const
WCHAR
transparentW
[]
=
{
't'
,
'r'
,
'a'
,
'n'
,
's'
,
'p'
,
'a'
,
'r'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
behindW
[]
=
{
'b'
,
'e'
,
'h'
,
'i'
,
'n'
,
'd'
,
0
};
if
(
!
lstrcmpW
(
buffer
,
transparentW
))
if
(
!
wcscmp
(
buffer
,
transparentW
))
gl_surface_mode
=
GL_SURFACE_IN_FRONT_TRANSPARENT
;
else
if
(
!
lstrcmpW
(
buffer
,
behindW
))
else
if
(
!
wcscmp
(
buffer
,
behindW
))
gl_surface_mode
=
GL_SURFACE_BEHIND
;
else
gl_surface_mode
=
GL_SURFACE_IN_FRONT_OPAQUE
;
...
...
@@ -427,10 +434,13 @@ static void load_strings(struct localized_string *str)
}
static
NTSTATUS
CDECL
unix_call
(
enum
macdrv_funcs
code
,
void
*
params
);
/***********************************************************************
* macdrv_init
*/
NTSTATUS
macdrv_init
(
void
*
arg
)
static
NTSTATUS
macdrv_init
(
void
*
arg
)
{
struct
init_params
*
params
=
arg
;
SessionAttributeBits
attributes
;
...
...
@@ -454,6 +464,8 @@ NTSTATUS macdrv_init(void *arg)
init_user_driver
();
macdrv_init_display_devices
(
FALSE
);
pNtWaitForMultipleObjects
=
params
->
pNtWaitForMultipleObjects
;
params
->
unix_call
=
unix_call
;
return
STATUS_SUCCESS
;
}
...
...
@@ -609,9 +621,9 @@ BOOL macdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param,
NTSTATUS
macdrv_client_func
(
enum
macdrv_client_funcs
id
,
const
void
*
params
,
ULONG
size
)
{
/* FIXME: use KeUserModeCallback instead */
NTSTATUS
(
WINAPI
*
func
)(
const
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
]
;
return
func
(
params
,
size
);
void
*
ret_ptr
;
ULONG
ret_len
;
return
KeUserModeCallback
(
id
,
params
,
size
,
&
ret_ptr
,
&
ret_len
);
}
...
...
@@ -655,7 +667,7 @@ C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
/* FIXME: Use __wine_unix_call instead */
NTSTATUS
unix_call
(
enum
macdrv_funcs
code
,
void
*
params
)
static
NTSTATUS
CDECL
unix_call
(
enum
macdrv_funcs
code
,
void
*
params
)
{
return
__wine_unix_call_funcs
[
code
](
params
);
}
dlls/winemac.drv/mouse.c
View file @
f1549e7f
...
...
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#define OEMRESOURCE
...
...
dlls/winemac.drv/opengl.c
View file @
f1549e7f
...
...
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
dlls/winemac.drv/surface.c
View file @
f1549e7f
...
...
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
dlls/winemac.drv/systray.c
View file @
f1549e7f
...
...
@@ -21,6 +21,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include "macdrv.h"
...
...
dlls/winemac.drv/unixlib.h
View file @
f1549e7f
...
...
@@ -36,8 +36,8 @@ enum macdrv_funcs
};
/* FIXME: Use __wine_unix_call when the rest of the stack is ready */
extern
NTSTATUS
unix_call
(
enum
macdrv_funcs
code
,
void
*
params
)
DECLSPEC_HIDDEN
;
#define MACDRV_CALL(func, params)
unix_call( unix_ ## func, params
)
extern
NTSTATUS
(
CDECL
*
macdrv_unix_call
)
(
enum
macdrv_funcs
code
,
void
*
params
)
DECLSPEC_HIDDEN
;
#define MACDRV_CALL(func, params)
macdrv_unix_call(unix_ ## func, params
)
/* macdrv_dnd_get_data params */
struct
dnd_get_data_params
...
...
@@ -83,7 +83,9 @@ struct localized_string
struct
init_params
{
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
struct
localized_string
*
strings
;
NTSTATUS
(
CDECL
*
unix_call
)(
enum
macdrv_funcs
code
,
void
*
params
);
};
/* macdrv_notify_icon params */
...
...
dlls/winemac.drv/vulkan.c
View file @
f1549e7f
...
...
@@ -21,6 +21,10 @@
/* NOTE: If making changes here, consider whether they should be reflected in
* the other drivers. */
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <stdarg.h>
...
...
dlls/winemac.drv/window.c
View file @
f1549e7f
...
...
@@ -21,6 +21,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <IOKit/pwr_mgt/IOPMLib.h>
...
...
tools/makedep.c
View file @
f1549e7f
...
...
@@ -1506,6 +1506,8 @@ static void parse_file( struct makefile *make, struct incl_file *source, int src
source
->
files_count
=
0
;
source
->
files_size
=
file
->
deps_count
;
source
->
files
=
xmalloc
(
source
->
files_size
*
sizeof
(
*
source
->
files
)
);
if
(
strendswith
(
file
->
name
,
".m"
))
file
->
flags
|=
FLAG_C_UNIX
;
if
(
file
->
flags
&
FLAG_C_UNIX
)
source
->
use_msvcrt
=
0
;
else
if
(
file
->
flags
&
FLAG_C_IMPLIB
)
source
->
use_msvcrt
=
1
;
...
...
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