Commit 340d1b7a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winemac: Move wine_notify_icon implementation to dllmain.c.

parent 58e4adf0
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "macdrv.h" #include "macdrv.h"
#include "shellapi.h"
HMODULE macdrv_module = 0; HMODULE macdrv_module = 0;
...@@ -63,3 +64,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) ...@@ -63,3 +64,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
macdrv_module = instance; macdrv_module = instance;
return process_attach(); 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);
}
...@@ -294,6 +294,10 @@ extern void macdrv_im_set_text(const macdrv_event *event) DECLSPEC_HIDDEN; ...@@ -294,6 +294,10 @@ extern void macdrv_im_set_text(const macdrv_event *event) DECLSPEC_HIDDEN;
extern void macdrv_sent_text_input(const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_sent_text_input(const macdrv_event *event) DECLSPEC_HIDDEN;
extern BOOL query_ime_char_rect(macdrv_query* query) DECLSPEC_HIDDEN; extern BOOL query_ime_char_rect(macdrv_query* query) DECLSPEC_HIDDEN;
/* unixlib interface */
extern NTSTATUS macdrv_notify_icon(void *arg) DECLSPEC_HIDDEN;
/* user helpers */ /* user helpers */
static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
......
...@@ -610,6 +610,7 @@ BOOL macdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, ...@@ -610,6 +610,7 @@ BOOL macdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param,
const unixlib_entry_t __wine_unix_call_funcs[] = const unixlib_entry_t __wine_unix_call_funcs[] =
{ {
macdrv_init, macdrv_init,
macdrv_notify_icon,
}; };
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
......
...@@ -245,12 +245,14 @@ static BOOL delete_icon(struct tray_icon *icon) ...@@ -245,12 +245,14 @@ static BOOL delete_icon(struct tray_icon *icon)
* *
* Driver-side implementation of Shell_NotifyIcon. * Driver-side implementation of Shell_NotifyIcon.
*/ */
int CDECL wine_notify_icon(DWORD msg, NOTIFYICONDATAW *data) NTSTATUS macdrv_notify_icon(void *arg)
{ {
struct notify_icon_params *params = arg;
NOTIFYICONDATAW *data = params->data;
BOOL ret = FALSE; BOOL ret = FALSE;
struct tray_icon *icon; struct tray_icon *icon;
switch (msg) switch (params->msg)
{ {
case NIM_ADD: case NIM_ADD:
ret = add_icon(data); ret = add_icon(data);
...@@ -272,7 +274,7 @@ int CDECL wine_notify_icon(DWORD msg, NOTIFYICONDATAW *data) ...@@ -272,7 +274,7 @@ int CDECL wine_notify_icon(DWORD msg, NOTIFYICONDATAW *data)
} }
break; break;
default: default:
FIXME("unhandled tray message: %u\n", msg); FIXME("unhandled tray message: %u\n", params->msg);
break; break;
} }
return ret; return ret;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
enum macdrv_funcs enum macdrv_funcs
{ {
unix_init, unix_init,
unix_notify_icon,
unix_funcs_count unix_funcs_count
}; };
...@@ -41,3 +42,10 @@ struct init_params ...@@ -41,3 +42,10 @@ struct init_params
{ {
struct localized_string *strings; struct localized_string *strings;
}; };
/* macdrv_notify_icon params */
struct notify_icon_params
{
DWORD msg;
struct _NOTIFYICONDATAW *data;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment