2021-08-31 09:18:20 +00:00
|
|
|
/*
|
|
|
|
* Unix interface for Win32 syscalls
|
|
|
|
*
|
|
|
|
* Copyright (C) 2021 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#pragma makedep unix
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "ntstatus.h"
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winnt.h"
|
2021-10-06 14:20:35 +00:00
|
|
|
#include "ntgdi_private.h"
|
2021-10-12 14:42:35 +00:00
|
|
|
#include "ntuser.h"
|
2021-08-31 09:18:20 +00:00
|
|
|
#include "wine/unixlib.h"
|
|
|
|
|
|
|
|
|
|
|
|
static void * const syscalls[] =
|
|
|
|
{
|
2021-10-11 16:49:36 +00:00
|
|
|
NtGdiAddFontMemResourceEx,
|
|
|
|
NtGdiAddFontResourceW,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiCombineRgn,
|
2021-10-11 16:48:15 +00:00
|
|
|
NtGdiCreateBitmap,
|
2021-10-11 16:50:09 +00:00
|
|
|
NtGdiCreateClientObj,
|
2021-10-08 11:35:41 +00:00
|
|
|
NtGdiCreateDIBBrush,
|
2021-10-11 16:48:15 +00:00
|
|
|
NtGdiCreateDIBSection,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiCreateEllipticRgn,
|
2021-10-11 16:51:06 +00:00
|
|
|
NtGdiCreateHalftonePalette,
|
2021-10-08 11:35:41 +00:00
|
|
|
NtGdiCreateHatchBrushInternal,
|
2021-10-11 16:51:06 +00:00
|
|
|
NtGdiCreatePaletteInternal,
|
2021-10-08 11:35:41 +00:00
|
|
|
NtGdiCreatePatternBrushInternal,
|
2021-10-12 13:29:19 +00:00
|
|
|
NtGdiCreatePen,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiCreateRectRgn,
|
|
|
|
NtGdiCreateRoundRectRgn,
|
2021-10-08 11:35:41 +00:00
|
|
|
NtGdiCreateSolidBrush,
|
2021-10-11 16:50:09 +00:00
|
|
|
NtGdiDeleteClientObj,
|
2021-10-11 16:49:07 +00:00
|
|
|
NtGdiDescribePixelFormat,
|
|
|
|
NtGdiDrawStream,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiEqualRgn,
|
2021-10-12 13:29:19 +00:00
|
|
|
NtGdiExtCreatePen,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiExtCreateRegion,
|
2021-10-11 16:50:09 +00:00
|
|
|
NtGdiExtGetObjectW,
|
2021-10-12 13:28:52 +00:00
|
|
|
NtGdiFlattenPath,
|
2021-08-31 09:18:20 +00:00
|
|
|
NtGdiFlush,
|
2021-10-11 16:48:15 +00:00
|
|
|
NtGdiGetBitmapBits,
|
|
|
|
NtGdiGetBitmapDimension,
|
2021-10-11 16:50:09 +00:00
|
|
|
NtGdiGetColorAdjustment,
|
|
|
|
NtGdiGetDCObject,
|
2021-10-11 16:49:36 +00:00
|
|
|
NtGdiGetFontFileData,
|
|
|
|
NtGdiGetFontFileInfo,
|
2021-10-11 16:51:06 +00:00
|
|
|
NtGdiGetNearestPaletteIndex,
|
2021-10-12 13:28:52 +00:00
|
|
|
NtGdiGetPath,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiGetRegionData,
|
|
|
|
NtGdiGetRgnBox,
|
2021-10-12 13:30:00 +00:00
|
|
|
NtGdiGetSpoolMessage,
|
2021-10-11 16:51:06 +00:00
|
|
|
NtGdiGetSystemPaletteUse,
|
2021-10-11 16:49:07 +00:00
|
|
|
NtGdiGetTransform,
|
2021-10-11 16:49:36 +00:00
|
|
|
NtGdiHfontCreate,
|
2021-10-12 13:30:00 +00:00
|
|
|
NtGdiInitSpool,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiOffsetRgn,
|
2021-10-12 13:28:52 +00:00
|
|
|
NtGdiPathToRegion,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiPtInRegion,
|
|
|
|
NtGdiRectInRegion,
|
2021-10-11 16:49:36 +00:00
|
|
|
NtGdiRemoveFontMemResourceEx,
|
|
|
|
NtGdiRemoveFontResourceW,
|
2021-10-11 16:49:07 +00:00
|
|
|
NtGdiSaveDC,
|
2021-10-11 16:48:15 +00:00
|
|
|
NtGdiSetBitmapBits,
|
|
|
|
NtGdiSetBitmapDimension,
|
2021-10-11 16:49:07 +00:00
|
|
|
NtGdiSetBrushOrg,
|
2021-10-11 16:50:09 +00:00
|
|
|
NtGdiSetColorAdjustment,
|
2021-10-11 16:51:06 +00:00
|
|
|
NtGdiSetMagicColors,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiSetMetaRgn,
|
2021-10-11 16:49:07 +00:00
|
|
|
NtGdiSetPixelFormat,
|
2021-10-11 16:48:44 +00:00
|
|
|
NtGdiSetRectRgn,
|
2021-10-11 16:49:36 +00:00
|
|
|
NtGdiSetTextJustification,
|
2021-10-11 16:50:37 +00:00
|
|
|
NtGdiSetVirtualResolution,
|
2021-10-11 16:49:07 +00:00
|
|
|
NtGdiSwapBuffers,
|
2021-10-11 16:50:37 +00:00
|
|
|
NtGdiTransformPoints,
|
2021-10-13 12:53:36 +00:00
|
|
|
NtUserCloseDesktop,
|
2021-10-12 14:42:35 +00:00
|
|
|
NtUserCloseWindowStation,
|
2021-10-14 13:21:15 +00:00
|
|
|
NtUserCreateDesktopEx,
|
2021-10-14 13:20:42 +00:00
|
|
|
NtUserCreateWindowStation,
|
2021-10-13 12:55:30 +00:00
|
|
|
NtUserGetObjectInformation,
|
2021-10-13 12:52:53 +00:00
|
|
|
NtUserGetProcessWindowStation,
|
2021-10-13 12:54:00 +00:00
|
|
|
NtUserGetThreadDesktop,
|
2021-10-14 13:21:33 +00:00
|
|
|
NtUserOpenDesktop,
|
2021-10-13 12:54:56 +00:00
|
|
|
NtUserOpenInputDesktop,
|
2021-10-14 13:20:56 +00:00
|
|
|
NtUserOpenWindowStation,
|
2021-10-13 12:56:22 +00:00
|
|
|
NtUserSetObjectInformation,
|
2021-10-13 12:53:22 +00:00
|
|
|
NtUserSetProcessWindowStation,
|
2021-10-13 12:54:21 +00:00
|
|
|
NtUserSetThreadDesktop,
|
2021-08-31 09:18:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static BYTE arguments[ARRAY_SIZE(syscalls)];
|
|
|
|
|
|
|
|
static SYSTEM_SERVICE_TABLE syscall_table =
|
|
|
|
{
|
|
|
|
(ULONG_PTR *)syscalls,
|
|
|
|
0,
|
|
|
|
ARRAY_SIZE(syscalls),
|
|
|
|
arguments
|
|
|
|
};
|
|
|
|
|
|
|
|
static NTSTATUS init( void *dispatcher )
|
|
|
|
{
|
2021-10-06 14:20:35 +00:00
|
|
|
NTSTATUS status;
|
|
|
|
if ((status = ntdll_init_syscalls( 1, &syscall_table, dispatcher ))) return status;
|
2021-10-14 13:22:40 +00:00
|
|
|
if ((status = gdi_init())) return status;
|
|
|
|
winstation_init();
|
|
|
|
return STATUS_SUCCESS;
|
2021-08-31 09:18:20 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 14:20:35 +00:00
|
|
|
unixlib_entry_t __wine_unix_call_funcs[] =
|
|
|
|
{
|
|
|
|
init,
|
|
|
|
callbacks_init,
|
|
|
|
};
|