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
550cac96
Commit
550cac96
authored
Nov 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Use the new NotifyIcon user driver interface.
parent
22bfdbeb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
90 deletions
+12
-90
dllmain.c
dlls/winemac.drv/dllmain.c
+0
-6
gdi.c
dlls/winemac.drv/gdi.c
+2
-0
macdrv.h
dlls/winemac.drv/macdrv.h
+2
-1
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+0
-57
systray.c
dlls/winemac.drv/systray.c
+8
-16
unixlib.h
dlls/winemac.drv/unixlib.h
+0
-8
winemac.drv.spec
dlls/winemac.drv/winemac.drv.spec
+0
-2
No files found.
dlls/winemac.drv/dllmain.c
View file @
550cac96
...
...
@@ -424,9 +424,3 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
macdrv_module
=
instance
;
return
process_attach
();
}
int
CDECL
wine_notify_icon
(
DWORD
msg
,
NOTIFYICONDATAW
*
data
)
{
struct
notify_icon_params
params
=
{
.
msg
=
msg
,
.
data
=
data
};
return
MACDRV_CALL
(
notify_icon
,
&
params
);
}
dlls/winemac.drv/gdi.c
View file @
550cac96
...
...
@@ -269,6 +269,8 @@ static const struct user_driver_funcs macdrv_funcs =
.
pBeep
=
macdrv_Beep
,
.
pChangeDisplaySettings
=
macdrv_ChangeDisplaySettings
,
.
pClipCursor
=
macdrv_ClipCursor
,
.
pNotifyIcon
=
macdrv_NotifyIcon
,
.
pCleanupIcons
=
macdrv_CleanupIcons
,
.
pClipboardWindowProc
=
macdrv_ClipboardWindowProc
,
.
pDesktopWindowProc
=
macdrv_DesktopWindowProc
,
.
pDestroyCursorIcon
=
macdrv_DestroyCursorIcon
,
...
...
dlls/winemac.drv/macdrv.h
View file @
550cac96
...
...
@@ -134,6 +134,8 @@ extern BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device
extern
BOOL
macdrv_GetDeviceGammaRamp
(
PHYSDEV
dev
,
LPVOID
ramp
);
extern
BOOL
macdrv_SetDeviceGammaRamp
(
PHYSDEV
dev
,
LPVOID
ramp
);
extern
BOOL
macdrv_ClipCursor
(
const
RECT
*
clip
,
BOOL
reset
);
extern
LRESULT
macdrv_NotifyIcon
(
HWND
hwnd
,
UINT
msg
,
NOTIFYICONDATAW
*
data
);
extern
void
macdrv_CleanupIcons
(
HWND
hwnd
);
extern
LRESULT
macdrv_DesktopWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
extern
void
macdrv_DestroyWindow
(
HWND
hwnd
);
extern
void
macdrv_SetDesktopWindow
(
HWND
hwnd
);
...
...
@@ -281,7 +283,6 @@ extern NTSTATUS macdrv_dnd_get_formats(void *arg);
extern
NTSTATUS
macdrv_dnd_have_format
(
void
*
arg
);
extern
NTSTATUS
macdrv_dnd_release
(
void
*
arg
);
extern
NTSTATUS
macdrv_dnd_retain
(
void
*
arg
);
extern
NTSTATUS
macdrv_notify_icon
(
void
*
arg
);
extern
NTSTATUS
macdrv_client_func
(
enum
macdrv_client_funcs
func
,
const
void
*
params
,
ULONG
size
);
...
...
dlls/winemac.drv/macdrv_main.c
View file @
550cac96
...
...
@@ -623,7 +623,6 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
macdrv_dnd_release
,
macdrv_dnd_retain
,
macdrv_init
,
macdrv_notify_icon
,
macdrv_quit_result
,
};
...
...
@@ -661,61 +660,6 @@ static NTSTATUS wow64_init(void *arg)
return
macdrv_init
(
&
params
);
}
static
NTSTATUS
wow64_notify_icon
(
void
*
arg
)
{
struct
{
DWORD
msg
;
ULONG
data
;
}
*
params32
=
arg
;
struct
{
DWORD
cbSize
;
ULONG
hWnd
;
UINT
uID
;
UINT
uFlags
;
UINT
uCallbackMessage
;
ULONG
hIcon
;
WCHAR
szTip
[
128
];
DWORD
dwState
;
DWORD
dwStateMask
;
WCHAR
szInfo
[
256
];
UINT
uTimeout
;
WCHAR
szInfoTitle
[
64
];
DWORD
dwInfoFlags
;
GUID
guidItem
;
ULONG
hBalloonIcon
;
}
*
data32
=
UlongToPtr
(
params32
->
data
);
struct
notify_icon_params
params
;
NOTIFYICONDATAW
data
;
params
.
msg
=
params32
->
msg
;
params
.
data
=
&
data
;
data
.
cbSize
=
sizeof
(
data
);
data
.
hWnd
=
UlongToHandle
(
data32
->
hWnd
);
data
.
uID
=
data32
->
uID
;
data
.
uFlags
=
data32
->
uFlags
;
data
.
uCallbackMessage
=
data32
->
uCallbackMessage
;
data
.
hIcon
=
UlongToHandle
(
data32
->
hIcon
);
if
(
data
.
uFlags
&
NIF_TIP
)
wcscpy
(
data
.
szTip
,
data32
->
szTip
);
data
.
dwState
=
data32
->
dwState
;
data
.
dwStateMask
=
data32
->
dwStateMask
;
if
(
data
.
uFlags
&
NIF_INFO
)
{
wcscpy
(
data
.
szInfoTitle
,
data32
->
szInfoTitle
);
wcscpy
(
data
.
szInfo
,
data32
->
szInfo
);
data
.
uTimeout
=
data32
->
uTimeout
;
data
.
dwInfoFlags
=
data32
->
dwInfoFlags
;
}
data
.
guidItem
=
data32
->
guidItem
;
data
.
hBalloonIcon
=
UlongToHandle
(
data32
->
hBalloonIcon
);
return
macdrv_notify_icon
(
&
params
);
}
const
unixlib_entry_t
__wine_unix_call_wow64_funcs
[]
=
{
wow64_dnd_get_data
,
...
...
@@ -724,7 +668,6 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
macdrv_dnd_release
,
macdrv_dnd_retain
,
wow64_init
,
wow64_notify_icon
,
macdrv_quit_result
,
};
...
...
dlls/winemac.drv/systray.c
View file @
550cac96
...
...
@@ -59,12 +59,11 @@ static struct list icon_list = LIST_INIT(icon_list);
static
BOOL
delete_icon
(
struct
tray_icon
*
icon
);
/***********************************************************************
* cleanup_icons
*
* Delete all systray icons owned by a given window.
* CleanupIcons (MACDRV.@)
*/
static
void
cleanup_i
cons
(
HWND
hwnd
)
void
macdrv_CleanupI
cons
(
HWND
hwnd
)
{
struct
tray_icon
*
icon
,
*
next
;
...
...
@@ -245,18 +244,14 @@ static BOOL delete_icon(struct tray_icon *icon)
/***********************************************************************
* wine_notify_icon (MACDRV.@)
*
* Driver-side implementation of Shell_NotifyIcon.
* NotifyIcon (MACDRV.@)
*/
NTSTATUS
macdrv_notify_icon
(
void
*
arg
)
LRESULT
macdrv_NotifyIcon
(
HWND
hwnd
,
UINT
msg
,
NOTIFYICONDATAW
*
data
)
{
struct
notify_icon_params
*
params
=
arg
;
NOTIFYICONDATAW
*
data
=
params
->
data
;
BOOL
ret
=
FALSE
;
struct
tray_icon
*
icon
;
switch
(
params
->
msg
)
switch
(
msg
)
{
case
NIM_ADD
:
ret
=
add_icon
(
data
);
...
...
@@ -267,9 +262,6 @@ NTSTATUS macdrv_notify_icon(void *arg)
case
NIM_MODIFY
:
if
((
icon
=
get_icon
(
data
->
hWnd
,
data
->
uID
)))
ret
=
modify_icon
(
icon
,
data
);
break
;
case
0xdead
:
/* Wine extension: owner window has died */
cleanup_icons
(
data
->
hWnd
);
break
;
case
NIM_SETVERSION
:
if
((
icon
=
get_icon
(
data
->
hWnd
,
data
->
uID
)))
{
...
...
@@ -278,8 +270,8 @@ NTSTATUS macdrv_notify_icon(void *arg)
}
break
;
default:
FIXME
(
"unhandled tray message: %u
\n
"
,
params
->
msg
);
break
;
ERR
(
"Unexpected NotifyIconProc call
\n
"
);
return
-
1
;
}
return
ret
;
}
...
...
dlls/winemac.drv/unixlib.h
View file @
550cac96
...
...
@@ -27,7 +27,6 @@ enum macdrv_funcs
unix_dnd_release
,
unix_dnd_retain
,
unix_init
,
unix_notify_icon
,
unix_quit_result
,
unix_funcs_count
};
...
...
@@ -70,13 +69,6 @@ struct init_params
struct
localized_string
*
strings
;
};
/* macdrv_notify_icon params */
struct
notify_icon_params
{
unsigned
int
msg
;
struct
_NOTIFYICONDATAW
*
data
;
};
/* macdrv_quit_result params */
struct
quit_result_params
{
...
...
dlls/winemac.drv/winemac.drv.spec
View file @
550cac96
# System tray
@ cdecl wine_notify_icon(long ptr)
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