user32/edit: Handle IME composition result string only when EIMES_GETCOMPSTRATONCE...
[wine.git] / dlls / win32u / syscall.c
blobe36e7097047ad4444b5c3bf8cd778c57f91fe34e
1 /*
2 * Unix interface for Win32 syscalls
4 * Copyright (C) 2021 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #if 0
22 #pragma makedep unix
23 #endif
25 #include <stdarg.h>
27 #include "ntstatus.h"
28 #define WIN32_NO_STATUS
29 #include "windef.h"
30 #include "winnt.h"
31 #include "ntgdi_private.h"
32 #include "ntuser_private.h"
33 #include "ntuser.h"
34 #include "wine/unixlib.h"
37 static void * const syscalls[] =
39 NtGdiAddFontMemResourceEx,
40 NtGdiAddFontResourceW,
41 NtGdiCombineRgn,
42 NtGdiCreateBitmap,
43 NtGdiCreateClientObj,
44 NtGdiCreateDIBBrush,
45 NtGdiCreateDIBSection,
46 NtGdiCreateEllipticRgn,
47 NtGdiCreateHalftonePalette,
48 NtGdiCreateHatchBrushInternal,
49 NtGdiCreatePaletteInternal,
50 NtGdiCreatePatternBrushInternal,
51 NtGdiCreatePen,
52 NtGdiCreateRectRgn,
53 NtGdiCreateRoundRectRgn,
54 NtGdiCreateSolidBrush,
55 NtGdiDdDDICreateDevice,
56 NtGdiDdDDIOpenAdapterFromHdc,
57 NtGdiDdDDIQueryStatistics,
58 NtGdiDdDDISetQueuedLimit,
59 NtGdiDeleteClientObj,
60 NtGdiDescribePixelFormat,
61 NtGdiDrawStream,
62 NtGdiEqualRgn,
63 NtGdiExtCreatePen,
64 NtGdiExtCreateRegion,
65 NtGdiExtGetObjectW,
66 NtGdiFlattenPath,
67 NtGdiFlush,
68 NtGdiGetBitmapBits,
69 NtGdiGetBitmapDimension,
70 NtGdiGetColorAdjustment,
71 NtGdiGetDCDword,
72 NtGdiGetDCObject,
73 NtGdiGetDCPoint,
74 NtGdiGetFontFileData,
75 NtGdiGetFontFileInfo,
76 NtGdiGetNearestPaletteIndex,
77 NtGdiGetPath,
78 NtGdiGetRegionData,
79 NtGdiGetRgnBox,
80 NtGdiGetSpoolMessage,
81 NtGdiGetSystemPaletteUse,
82 NtGdiGetTransform,
83 NtGdiHfontCreate,
84 NtGdiInitSpool,
85 NtGdiOffsetRgn,
86 NtGdiPathToRegion,
87 NtGdiPtInRegion,
88 NtGdiRectInRegion,
89 NtGdiRemoveFontMemResourceEx,
90 NtGdiRemoveFontResourceW,
91 NtGdiSaveDC,
92 NtGdiSetBitmapBits,
93 NtGdiSetBitmapDimension,
94 NtGdiSetBrushOrg,
95 NtGdiSetColorAdjustment,
96 NtGdiSetMagicColors,
97 NtGdiSetMetaRgn,
98 NtGdiSetPixelFormat,
99 NtGdiSetRectRgn,
100 NtGdiSetTextJustification,
101 NtGdiSetVirtualResolution,
102 NtGdiSwapBuffers,
103 NtGdiTransformPoints,
104 NtUserActivateKeyboardLayout,
105 NtUserAddClipboardFormatListener,
106 NtUserAssociateInputContext,
107 NtUserAttachThreadInput,
108 NtUserBeginPaint,
109 NtUserBuildHwndList,
110 NtUserCallHwnd,
111 NtUserCallHwndParam,
112 NtUserCallMsgFilter,
113 NtUserCallNextHookEx,
114 NtUserCallNoParam,
115 NtUserCallOneParam,
116 NtUserCallTwoParam,
117 NtUserChangeClipboardChain,
118 NtUserChangeDisplaySettings,
119 NtUserCheckMenuItem,
120 NtUserChildWindowFromPointEx,
121 NtUserClipCursor,
122 NtUserCloseClipboard,
123 NtUserCloseDesktop,
124 NtUserCloseWindowStation,
125 NtUserCopyAcceleratorTable,
126 NtUserCountClipboardFormats,
127 NtUserCreateAcceleratorTable,
128 NtUserCreateCaret,
129 NtUserCreateDesktopEx,
130 NtUserCreateInputContext,
131 NtUserCreateWindowEx,
132 NtUserCreateWindowStation,
133 NtUserDeferWindowPosAndBand,
134 NtUserDeleteMenu,
135 NtUserDestroyAcceleratorTable,
136 NtUserDestroyCursor,
137 NtUserDestroyInputContext,
138 NtUserDestroyMenu,
139 NtUserDestroyWindow,
140 NtUserDisableThreadIme,
141 NtUserDispatchMessage,
142 NtUserDragDetect,
143 NtUserDrawIconEx,
144 NtUserEmptyClipboard,
145 NtUserEnableMenuItem,
146 NtUserEnableScrollBar,
147 NtUserEndDeferWindowPosEx,
148 NtUserEndMenu,
149 NtUserEnumDisplayDevices,
150 NtUserEnumDisplayMonitors,
151 NtUserEnumDisplaySettings,
152 NtUserFindExistingCursorIcon,
153 NtUserFindWindowEx,
154 NtUserFlashWindowEx,
155 NtUserGetAncestor,
156 NtUserGetAsyncKeyState,
157 NtUserGetAtomName,
158 NtUserGetCaretBlinkTime,
159 NtUserGetCaretPos,
160 NtUserGetClassInfoEx,
161 NtUserGetClassName,
162 NtUserGetClipboardData,
163 NtUserGetClipboardFormatName,
164 NtUserGetClipboardOwner,
165 NtUserGetClipboardSequenceNumber,
166 NtUserGetClipboardViewer,
167 NtUserGetCursor,
168 NtUserGetCursorFrameInfo,
169 NtUserGetCursorInfo,
170 NtUserGetDCEx,
171 NtUserGetDisplayConfigBufferSizes,
172 NtUserGetDoubleClickTime,
173 NtUserGetDpiForMonitor,
174 NtUserGetForegroundWindow,
175 NtUserGetGUIThreadInfo,
176 NtUserGetIconInfo,
177 NtUserGetIconSize,
178 NtUserGetKeyNameText,
179 NtUserGetKeyState,
180 NtUserGetKeyboardLayout,
181 NtUserGetKeyboardLayoutList,
182 NtUserGetKeyboardLayoutName,
183 NtUserGetKeyboardState,
184 NtUserGetLayeredWindowAttributes,
185 NtUserGetMenuBarInfo,
186 NtUserGetMenuItemRect,
187 NtUserGetMessage,
188 NtUserGetMouseMovePointsEx,
189 NtUserGetObjectInformation,
190 NtUserGetOpenClipboardWindow,
191 NtUserGetPriorityClipboardFormat,
192 NtUserGetProcessDpiAwarenessContext,
193 NtUserGetProcessWindowStation,
194 NtUserGetProp,
195 NtUserGetQueueStatus,
196 NtUserGetRawInputBuffer,
197 NtUserGetRawInputData,
198 NtUserGetRawInputDeviceInfo,
199 NtUserGetRawInputDeviceList,
200 NtUserGetRegisteredRawInputDevices,
201 NtUserGetScrollBarInfo,
202 NtUserGetSystemDpiForProcess,
203 NtUserGetSystemMenu,
204 NtUserGetThreadDesktop,
205 NtUserGetTitleBarInfo,
206 NtUserGetUpdateRect,
207 NtUserGetUpdateRgn,
208 NtUserGetUpdatedClipboardFormats,
209 NtUserGetWindowPlacement,
210 NtUserGetWindowRgnEx,
211 NtUserHideCaret,
212 NtUserHiliteMenuItem,
213 NtUserInitializeClientPfnArrays,
214 NtUserInternalGetWindowIcon,
215 NtUserInternalGetWindowText,
216 NtUserInvalidateRect,
217 NtUserInvalidateRgn,
218 NtUserIsClipboardFormatAvailable,
219 NtUserKillTimer,
220 NtUserLockWindowUpdate,
221 NtUserMapVirtualKeyEx,
222 NtUserMenuItemFromPoint,
223 NtUserMessageCall,
224 NtUserMoveWindow,
225 NtUserMsgWaitForMultipleObjectsEx,
226 NtUserNotifyWinEvent,
227 NtUserOpenClipboard,
228 NtUserOpenDesktop,
229 NtUserOpenInputDesktop,
230 NtUserOpenWindowStation,
231 NtUserPeekMessage,
232 NtUserPostMessage,
233 NtUserPostThreadMessage,
234 NtUserQueryInputContext,
235 NtUserRedrawWindow,
236 NtUserRegisterClassExWOW,
237 NtUserRegisterHotKey,
238 NtUserRegisterRawInputDevices,
239 NtUserRemoveClipboardFormatListener,
240 NtUserRemoveMenu,
241 NtUserRemoveProp,
242 NtUserScrollWindowEx,
243 NtUserSendInput,
244 NtUserSetActiveWindow,
245 NtUserSetCapture,
246 NtUserSetClassLong,
247 NtUserSetClassLongPtr,
248 NtUserSetClassWord,
249 NtUserSetClipboardData,
250 NtUserSetClipboardViewer,
251 NtUserSetCursor,
252 NtUserSetCursorIconData,
253 NtUserSetCursorPos,
254 NtUserSetFocus,
255 NtUserSetInternalWindowPos,
256 NtUserSetKeyboardState,
257 NtUserSetLayeredWindowAttributes,
258 NtUserSetMenu,
259 NtUserSetMenuContextHelpId,
260 NtUserSetMenuDefaultItem,
261 NtUserSetObjectInformation,
262 NtUserSetParent,
263 NtUserSetProcessDpiAwarenessContext,
264 NtUserSetProcessWindowStation,
265 NtUserSetProp,
266 NtUserSetScrollInfo,
267 NtUserSetSysColors,
268 NtUserSetSystemMenu,
269 NtUserSetSystemTimer,
270 NtUserSetThreadDesktop,
271 NtUserSetTimer,
272 NtUserSetWinEventHook,
273 NtUserSetWindowLong,
274 NtUserSetWindowLongPtr,
275 NtUserSetWindowPlacement,
276 NtUserSetWindowPos,
277 NtUserSetWindowRgn,
278 NtUserSetWindowWord,
279 NtUserSetWindowsHookEx,
280 NtUserShowCaret,
281 NtUserShowCursor,
282 NtUserShowScrollBar,
283 NtUserShowWindow,
284 NtUserShowWindowAsync,
285 NtUserSystemParametersInfo,
286 NtUserSystemParametersInfoForDpi,
287 NtUserThunkedMenuInfo,
288 NtUserThunkedMenuItemInfo,
289 NtUserToUnicodeEx,
290 NtUserTrackMouseEvent,
291 NtUserTrackPopupMenuEx,
292 NtUserTranslateAccelerator,
293 NtUserTranslateMessage,
294 NtUserUnhookWinEvent,
295 NtUserUnhookWindowsHookEx,
296 NtUserUnregisterClass,
297 NtUserUnregisterHotKey,
298 NtUserUpdateInputContext,
299 NtUserVkKeyScanEx,
300 NtUserWaitForInputIdle,
301 NtUserWindowFromDC,
302 NtUserWindowFromPoint,
305 static BYTE arguments[ARRAY_SIZE(syscalls)];
307 static SYSTEM_SERVICE_TABLE syscall_table =
309 (ULONG_PTR *)syscalls,
311 ARRAY_SIZE(syscalls),
312 arguments
315 static NTSTATUS init( void *dispatcher )
317 NTSTATUS status;
318 if ((status = ntdll_init_syscalls( 1, &syscall_table, dispatcher ))) return status;
319 if ((status = gdi_init())) return status;
320 winstation_init();
321 sysparams_init();
322 register_desktop_class();
323 return STATUS_SUCCESS;
326 unixlib_entry_t __wine_unix_call_funcs[] =
328 init,
329 callbacks_init,
332 #ifdef _WIN64
334 WINE_DEFAULT_DEBUG_CHANNEL(win32u);
336 static NTSTATUS wow64_init( void *args )
338 FIXME( "\n" );
339 return STATUS_NOT_SUPPORTED;
342 const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
344 init,
345 wow64_init,
348 #endif /* _WIN64 */