win32u: Don't use CDECL for gdi_dc_funcs entries.
[wine.git] / dlls / win32u / syscall.c
blob3f75424203abb7edc9f9079847edbf3f64e13010
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 NtGdiAbortDoc,
40 NtGdiAbortPath,
41 NtGdiAddFontMemResourceEx,
42 NtGdiAddFontResourceW,
43 NtGdiAlphaBlend,
44 NtGdiAngleArc,
45 NtGdiArcInternal,
46 NtGdiBeginPath,
47 NtGdiBitBlt,
48 NtGdiCloseFigure,
49 NtGdiCombineRgn,
50 NtGdiComputeXformCoefficients,
51 NtGdiCreateBitmap,
52 NtGdiCreateClientObj,
53 NtGdiCreateCompatibleBitmap,
54 NtGdiCreateCompatibleDC,
55 NtGdiCreateDIBBrush,
56 NtGdiCreateDIBSection,
57 NtGdiCreateDIBitmapInternal,
58 NtGdiCreateEllipticRgn,
59 NtGdiCreateHalftonePalette,
60 NtGdiCreateHatchBrushInternal,
61 NtGdiCreateMetafileDC,
62 NtGdiCreatePaletteInternal,
63 NtGdiCreatePatternBrushInternal,
64 NtGdiCreatePen,
65 NtGdiCreateRectRgn,
66 NtGdiCreateRoundRectRgn,
67 NtGdiCreateSolidBrush,
68 NtGdiDdDDICheckVidPnExclusiveOwnership,
69 NtGdiDdDDICloseAdapter,
70 NtGdiDdDDICreateDCFromMemory,
71 NtGdiDdDDICreateDevice,
72 NtGdiDdDDIDestroyDCFromMemory,
73 NtGdiDdDDIDestroyDevice,
74 NtGdiDdDDIEscape,
75 NtGdiDdDDIOpenAdapterFromDeviceName,
76 NtGdiDdDDIOpenAdapterFromHdc,
77 NtGdiDdDDIOpenAdapterFromLuid,
78 NtGdiDdDDIQueryStatistics,
79 NtGdiDdDDIQueryVideoMemoryInfo,
80 NtGdiDdDDISetQueuedLimit,
81 NtGdiDdDDISetVidPnSourceOwner,
82 NtGdiDeleteClientObj,
83 NtGdiDeleteObjectApp,
84 NtGdiDescribePixelFormat,
85 NtGdiDoPalette,
86 NtGdiDrawStream,
87 NtGdiEllipse,
88 NtGdiEndDoc,
89 NtGdiEndPage,
90 NtGdiEndPath,
91 NtGdiEnumFonts,
92 NtGdiEqualRgn,
93 NtGdiExcludeClipRect,
94 NtGdiExtCreatePen,
95 NtGdiExtCreateRegion,
96 NtGdiExtEscape,
97 NtGdiExtFloodFill,
98 NtGdiExtGetObjectW,
99 NtGdiExtSelectClipRgn,
100 NtGdiExtTextOutW,
101 NtGdiFillPath,
102 NtGdiFillRgn,
103 NtGdiFlattenPath,
104 NtGdiFlush,
105 NtGdiFontIsLinked,
106 NtGdiFrameRgn,
107 NtGdiGetAndSetDCDword,
108 NtGdiGetAppClipBox,
109 NtGdiGetBitmapBits,
110 NtGdiGetBitmapDimension,
111 NtGdiGetBoundsRect,
112 NtGdiGetCharABCWidthsW,
113 NtGdiGetCharWidthInfo,
114 NtGdiGetCharWidthW,
115 NtGdiGetColorAdjustment,
116 NtGdiGetDCDword,
117 NtGdiGetDCObject,
118 NtGdiGetDCPoint,
119 NtGdiGetDIBitsInternal,
120 NtGdiGetDeviceCaps,
121 NtGdiGetDeviceGammaRamp,
122 NtGdiGetFontData,
123 NtGdiGetFontFileData,
124 NtGdiGetFontFileInfo,
125 NtGdiGetFontUnicodeRanges,
126 NtGdiGetGlyphIndicesW,
127 NtGdiGetGlyphOutline,
128 NtGdiGetKerningPairs,
129 NtGdiGetNearestColor,
130 NtGdiGetNearestPaletteIndex,
131 NtGdiGetOutlineTextMetricsInternalW,
132 NtGdiGetPath,
133 NtGdiGetPixel,
134 NtGdiGetRandomRgn,
135 NtGdiGetRasterizerCaps,
136 NtGdiGetRealizationInfo,
137 NtGdiGetRegionData,
138 NtGdiGetRgnBox,
139 NtGdiGetSpoolMessage,
140 NtGdiGetSystemPaletteUse,
141 NtGdiGetTextCharsetInfo,
142 NtGdiGetTextExtentExW,
143 NtGdiGetTextFaceW,
144 NtGdiGetTextMetricsW,
145 NtGdiGetTransform,
146 NtGdiGradientFill,
147 NtGdiHfontCreate,
148 NtGdiIcmBrushInfo,
149 NtGdiInitSpool,
150 NtGdiIntersectClipRect,
151 NtGdiInvertRgn,
152 NtGdiLineTo,
153 NtGdiMaskBlt,
154 NtGdiModifyWorldTransform,
155 NtGdiMoveTo,
156 NtGdiOffsetClipRgn,
157 NtGdiOffsetRgn,
158 NtGdiOpenDCW,
159 NtGdiPatBlt,
160 NtGdiPathToRegion,
161 NtGdiPlgBlt,
162 NtGdiPolyDraw,
163 NtGdiPolyPolyDraw,
164 NtGdiPtInRegion,
165 NtGdiPtVisible,
166 NtGdiRectInRegion,
167 NtGdiRectVisible,
168 NtGdiRectangle,
169 NtGdiRemoveFontMemResourceEx,
170 NtGdiRemoveFontResourceW,
171 NtGdiResetDC,
172 NtGdiResizePalette,
173 NtGdiRestoreDC,
174 NtGdiRoundRect,
175 NtGdiSaveDC,
176 NtGdiScaleViewportExtEx,
177 NtGdiScaleWindowExtEx,
178 NtGdiSelectBitmap,
179 NtGdiSelectBrush,
180 NtGdiSelectClipPath,
181 NtGdiSelectFont,
182 NtGdiSelectPen,
183 NtGdiSetBitmapBits,
184 NtGdiSetBitmapDimension,
185 NtGdiSetBoundsRect,
186 NtGdiSetBrushOrg,
187 NtGdiSetColorAdjustment,
188 NtGdiSetDIBitsToDeviceInternal,
189 NtGdiSetDeviceGammaRamp,
190 NtGdiSetLayout,
191 NtGdiSetMagicColors,
192 NtGdiSetMetaRgn,
193 NtGdiSetPixel,
194 NtGdiSetPixelFormat,
195 NtGdiSetRectRgn,
196 NtGdiSetSystemPaletteUse,
197 NtGdiSetTextJustification,
198 NtGdiSetVirtualResolution,
199 NtGdiStartDoc,
200 NtGdiStartPage,
201 NtGdiStretchBlt,
202 NtGdiStretchDIBitsInternal,
203 NtGdiStrokeAndFillPath,
204 NtGdiStrokePath,
205 NtGdiSwapBuffers,
206 NtGdiTransformPoints,
207 NtGdiTransparentBlt,
208 NtGdiUnrealizeObject,
209 NtGdiUpdateColors,
210 NtGdiWidenPath,
211 NtUserActivateKeyboardLayout,
212 NtUserAddClipboardFormatListener,
213 NtUserAssociateInputContext,
214 NtUserAttachThreadInput,
215 NtUserBeginPaint,
216 NtUserBuildHimcList,
217 NtUserBuildHwndList,
218 NtUserCallHwnd,
219 NtUserCallHwndParam,
220 NtUserCallMsgFilter,
221 NtUserCallNextHookEx,
222 NtUserCallNoParam,
223 NtUserCallOneParam,
224 NtUserCallTwoParam,
225 NtUserChangeClipboardChain,
226 NtUserChangeDisplaySettings,
227 NtUserCheckMenuItem,
228 NtUserChildWindowFromPointEx,
229 NtUserClipCursor,
230 NtUserCloseClipboard,
231 NtUserCloseDesktop,
232 NtUserCloseWindowStation,
233 NtUserCopyAcceleratorTable,
234 NtUserCountClipboardFormats,
235 NtUserCreateAcceleratorTable,
236 NtUserCreateCaret,
237 NtUserCreateDesktopEx,
238 NtUserCreateInputContext,
239 NtUserCreateWindowEx,
240 NtUserCreateWindowStation,
241 NtUserDeferWindowPosAndBand,
242 NtUserDeleteMenu,
243 NtUserDestroyAcceleratorTable,
244 NtUserDestroyCursor,
245 NtUserDestroyInputContext,
246 NtUserDestroyMenu,
247 NtUserDestroyWindow,
248 NtUserDisableThreadIme,
249 NtUserDispatchMessage,
250 NtUserDisplayConfigGetDeviceInfo,
251 NtUserDragDetect,
252 NtUserDragObject,
253 NtUserDrawCaptionTemp,
254 NtUserDrawIconEx,
255 NtUserDrawMenuBarTemp,
256 NtUserEmptyClipboard,
257 NtUserEnableMenuItem,
258 NtUserEnableMouseInPointer,
259 NtUserEnableScrollBar,
260 NtUserEndDeferWindowPosEx,
261 NtUserEndMenu,
262 NtUserEndPaint,
263 NtUserEnumDisplayDevices,
264 NtUserEnumDisplayMonitors,
265 NtUserEnumDisplaySettings,
266 NtUserExcludeUpdateRgn,
267 NtUserFindExistingCursorIcon,
268 NtUserFindWindowEx,
269 NtUserFlashWindowEx,
270 NtUserGetAncestor,
271 NtUserGetAsyncKeyState,
272 NtUserGetAtomName,
273 NtUserGetCaretBlinkTime,
274 NtUserGetCaretPos,
275 NtUserGetClassInfoEx,
276 NtUserGetClassName,
277 NtUserGetClipboardData,
278 NtUserGetClipboardFormatName,
279 NtUserGetClipboardOwner,
280 NtUserGetClipboardSequenceNumber,
281 NtUserGetClipboardViewer,
282 NtUserGetCursor,
283 NtUserGetCursorFrameInfo,
284 NtUserGetCursorInfo,
285 NtUserGetDC,
286 NtUserGetDCEx,
287 NtUserGetDisplayConfigBufferSizes,
288 NtUserGetDoubleClickTime,
289 NtUserGetDpiForMonitor,
290 NtUserGetForegroundWindow,
291 NtUserGetGUIThreadInfo,
292 NtUserGetIconInfo,
293 NtUserGetIconSize,
294 NtUserGetInternalWindowPos,
295 NtUserGetKeyNameText,
296 NtUserGetKeyState,
297 NtUserGetKeyboardLayout,
298 NtUserGetKeyboardLayoutList,
299 NtUserGetKeyboardLayoutName,
300 NtUserGetKeyboardState,
301 NtUserGetLayeredWindowAttributes,
302 NtUserGetMenuBarInfo,
303 NtUserGetMenuItemRect,
304 NtUserGetMessage,
305 NtUserGetMouseMovePointsEx,
306 NtUserGetObjectInformation,
307 NtUserGetOpenClipboardWindow,
308 NtUserGetPointerInfoList,
309 NtUserGetPriorityClipboardFormat,
310 NtUserGetProcessDpiAwarenessContext,
311 NtUserGetProcessWindowStation,
312 NtUserGetProp,
313 NtUserGetQueueStatus,
314 NtUserGetRawInputBuffer,
315 NtUserGetRawInputData,
316 NtUserGetRawInputDeviceInfo,
317 NtUserGetRawInputDeviceList,
318 NtUserGetRegisteredRawInputDevices,
319 NtUserGetScrollBarInfo,
320 NtUserGetSystemDpiForProcess,
321 NtUserGetSystemMenu,
322 NtUserGetThreadDesktop,
323 NtUserGetTitleBarInfo,
324 NtUserGetUpdateRect,
325 NtUserGetUpdateRgn,
326 NtUserGetUpdatedClipboardFormats,
327 NtUserGetWindowDC,
328 NtUserGetWindowPlacement,
329 NtUserGetWindowRgnEx,
330 NtUserHideCaret,
331 NtUserHiliteMenuItem,
332 NtUserInitializeClientPfnArrays,
333 NtUserInternalGetWindowIcon,
334 NtUserInternalGetWindowText,
335 NtUserInvalidateRect,
336 NtUserInvalidateRgn,
337 NtUserIsClipboardFormatAvailable,
338 NtUserIsMouseInPointerEnabled,
339 NtUserKillTimer,
340 NtUserLockWindowUpdate,
341 NtUserLogicalToPerMonitorDPIPhysicalPoint,
342 NtUserMapVirtualKeyEx,
343 NtUserMenuItemFromPoint,
344 NtUserMessageCall,
345 NtUserMoveWindow,
346 NtUserMsgWaitForMultipleObjectsEx,
347 NtUserNotifyIMEStatus,
348 NtUserNotifyWinEvent,
349 NtUserOpenClipboard,
350 NtUserOpenDesktop,
351 NtUserOpenInputDesktop,
352 NtUserOpenWindowStation,
353 NtUserPeekMessage,
354 NtUserPerMonitorDPIPhysicalToLogicalPoint,
355 NtUserPostMessage,
356 NtUserPostThreadMessage,
357 NtUserPrintWindow,
358 NtUserQueryInputContext,
359 NtUserRealChildWindowFromPoint,
360 NtUserRedrawWindow,
361 NtUserRegisterClassExWOW,
362 NtUserRegisterHotKey,
363 NtUserRegisterRawInputDevices,
364 NtUserReleaseDC,
365 NtUserRemoveClipboardFormatListener,
366 NtUserRemoveMenu,
367 NtUserRemoveProp,
368 NtUserScrollDC,
369 NtUserScrollWindowEx,
370 NtUserSelectPalette,
371 NtUserSendInput,
372 NtUserSetActiveWindow,
373 NtUserSetCapture,
374 NtUserSetClassLong,
375 NtUserSetClassLongPtr,
376 NtUserSetClassWord,
377 NtUserSetClipboardData,
378 NtUserSetClipboardViewer,
379 NtUserSetCursor,
380 NtUserSetCursorIconData,
381 NtUserSetCursorPos,
382 NtUserSetFocus,
383 NtUserSetInternalWindowPos,
384 NtUserSetKeyboardState,
385 NtUserSetLayeredWindowAttributes,
386 NtUserSetMenu,
387 NtUserSetMenuContextHelpId,
388 NtUserSetMenuDefaultItem,
389 NtUserSetObjectInformation,
390 NtUserSetParent,
391 NtUserSetProcessDpiAwarenessContext,
392 NtUserSetProcessWindowStation,
393 NtUserSetProp,
394 NtUserSetScrollInfo,
395 NtUserSetShellWindowEx,
396 NtUserSetSysColors,
397 NtUserSetSystemMenu,
398 NtUserSetSystemTimer,
399 NtUserSetThreadDesktop,
400 NtUserSetTimer,
401 NtUserSetWinEventHook,
402 NtUserSetWindowLong,
403 NtUserSetWindowLongPtr,
404 NtUserSetWindowPlacement,
405 NtUserSetWindowPos,
406 NtUserSetWindowRgn,
407 NtUserSetWindowWord,
408 NtUserSetWindowsHookEx,
409 NtUserShowCaret,
410 NtUserShowCursor,
411 NtUserShowScrollBar,
412 NtUserShowWindow,
413 NtUserShowWindowAsync,
414 NtUserSystemParametersInfo,
415 NtUserSystemParametersInfoForDpi,
416 NtUserThunkedMenuInfo,
417 NtUserThunkedMenuItemInfo,
418 NtUserToUnicodeEx,
419 NtUserTrackMouseEvent,
420 NtUserTrackPopupMenuEx,
421 NtUserTranslateAccelerator,
422 NtUserTranslateMessage,
423 NtUserUnhookWinEvent,
424 NtUserUnhookWindowsHookEx,
425 NtUserUnregisterClass,
426 NtUserUnregisterHotKey,
427 NtUserUpdateInputContext,
428 NtUserUpdateLayeredWindow,
429 NtUserValidateRect,
430 NtUserVkKeyScanEx,
431 NtUserWaitForInputIdle,
432 NtUserWaitMessage,
433 NtUserWindowFromDC,
434 NtUserWindowFromPoint,
435 __wine_get_file_outline_text_metric,
436 __wine_get_icm_profile,
437 __wine_send_input
440 static BYTE arguments[ARRAY_SIZE(syscalls)];
442 static SYSTEM_SERVICE_TABLE syscall_table =
444 (ULONG_PTR *)syscalls,
446 ARRAY_SIZE(syscalls),
447 arguments
450 static NTSTATUS init( void *dispatcher )
452 return ntdll_init_syscalls( 1, &syscall_table, dispatcher );
455 unixlib_entry_t __wine_unix_call_funcs[] =
457 init,