vbscript: Fix memory leak in owned safearray iterator.
[wine.git] / dlls / winemac.drv / unixlib.h
blob07f0da4a6f3cd8ebb482a0b070fd78f7ec6fc77b
1 /*
2 * Copyright 2022 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "ntuser.h"
20 #include "wine/unixlib.h"
22 enum macdrv_funcs
24 unix_dnd_get_data,
25 unix_dnd_get_formats,
26 unix_dnd_have_format,
27 unix_dnd_release,
28 unix_dnd_retain,
29 unix_ime_clear,
30 unix_ime_process_text_input,
31 unix_ime_using_input_method,
32 unix_init,
33 unix_notify_icon,
34 unix_quit_result,
35 unix_funcs_count
38 #define MACDRV_CALL(func, params) WINE_UNIX_CALL(unix_ ## func, params)
40 /* macdrv_dnd_get_data params */
41 struct dnd_get_data_params
43 UINT64 handle;
44 UINT format;
45 size_t size;
46 void *data;
49 /* macdrv_dnd_get_formats params */
50 struct dnd_get_formats_params
52 UINT64 handle;
53 UINT formats[64];
56 /* macdrv_dnd_have_format params */
57 struct dnd_have_format_params
59 UINT64 handle;
60 UINT format;
63 /* macdrv_ime_process_text_input params */
64 struct process_text_input_params
66 UINT vkey;
67 UINT scan;
68 UINT repeat;
69 const BYTE *key_state;
70 void *himc;
71 int *done;
74 /* macdrv_init params */
75 struct localized_string
77 UINT id;
78 UINT len;
79 UINT64 str;
82 struct init_params
84 struct localized_string *strings;
87 /* macdrv_notify_icon params */
88 struct notify_icon_params
90 unsigned int msg;
91 struct _NOTIFYICONDATAW *data;
94 /* macdrv_quit_result params */
95 struct quit_result_params
97 int result;
100 /* driver client callbacks exposed with KernelCallbackTable interface */
101 enum macdrv_client_funcs
103 client_func_app_icon = NtUserDriverCallbackFirst,
104 client_func_app_quit_request,
105 client_func_dnd_query_drag,
106 client_func_dnd_query_drop,
107 client_func_dnd_query_exited,
108 client_func_ime_query_char_rect,
109 client_func_ime_set_text,
110 client_func_last
113 /* macdrv_app_icon result */
114 struct app_icon_entry
116 UINT32 width;
117 UINT32 height;
118 UINT32 size;
119 UINT32 icon;
120 UINT64 png;
123 struct app_icon_result
125 UINT32 count;
126 struct app_icon_entry entries[64];
129 /* macdrv_app_icon params */
130 struct app_icon_params
132 UINT64 result; /* FIXME: Use NtCallbackReturn instead */
135 /* macdrv_app_quit_request params */
136 struct app_quit_request_params
138 UINT flags;
141 /* macdrv_dnd_query_drag params */
142 struct dnd_query_drag_params
144 UINT32 hwnd;
145 UINT32 effect;
146 INT32 x;
147 INT32 y;
148 UINT64 handle;
151 /* macdrv_dnd_query_drop params */
152 struct dnd_query_drop_params
154 UINT32 hwnd;
155 UINT32 effect;
156 INT32 x;
157 INT32 y;
158 UINT64 handle;
161 /* macdrv_dnd_query_exited params */
162 struct dnd_query_exited_params
164 UINT32 hwnd;
167 /* macdrv_ime_query_char_rect result */
168 struct ime_query_char_rect_result
170 RECT rect;
171 UINT32 location;
172 UINT32 length;
175 /* macdrv_ime_query_char_rect params */
176 struct ime_query_char_rect_params
178 UINT32 hwnd;
179 UINT32 location;
180 UINT64 data;
181 UINT64 result; /* FIXME: Use NtCallbackReturn instead */
182 UINT32 length;
185 /* macdrv_ime_set_text params */
186 struct ime_set_text_params
188 UINT32 hwnd;
189 UINT32 cursor_pos;
190 UINT64 data;
191 UINT32 complete;
192 WCHAR text[1];
195 static inline void *param_ptr(UINT64 param)
197 return (void *)(UINT_PTR)param;
200 C_ASSERT(client_func_last <= NtUserDriverCallbackLast + 1);