2021-09-29 14:08:05 +02:00
|
|
|
/*
|
|
|
|
* Unix call wrappers
|
|
|
|
*
|
|
|
|
* Copyright 2021 Jacek Caban for CodeWeavers
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_WIN32U_PRIVATE
|
|
|
|
#define __WINE_WIN32U_PRIVATE
|
|
|
|
|
2021-11-08 14:48:28 +01:00
|
|
|
#include <stdarg.h>
|
2022-03-02 15:06:33 +01:00
|
|
|
#include <stdlib.h>
|
2021-11-08 14:48:28 +01:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "ntgdi.h"
|
|
|
|
#include "ntuser.h"
|
2021-10-06 16:20:35 +02:00
|
|
|
#include "wine/gdi_driver.h"
|
|
|
|
#include "wine/unixlib.h"
|
2021-11-08 14:48:28 +01:00
|
|
|
#include "wine/debug.h"
|
2021-09-29 14:08:05 +02:00
|
|
|
|
2021-11-30 13:26:48 +01:00
|
|
|
extern const struct user_callbacks *user_callbacks DECLSPEC_HIDDEN;
|
|
|
|
|
2021-09-29 14:09:21 +02:00
|
|
|
struct unix_funcs
|
|
|
|
{
|
|
|
|
/* win32u functions */
|
|
|
|
INT (WINAPI *pNtGdiAbortDoc)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiAbortPath)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
|
|
|
|
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
|
|
|
|
BLENDFUNCTION blend_function, HANDLE xform );
|
|
|
|
BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle,
|
|
|
|
FLOAT sweep_angle );
|
|
|
|
BOOL (WINAPI *pNtGdiArcInternal)( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT xstart, INT ystart, INT xend, INT yend );
|
|
|
|
BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src,
|
|
|
|
INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl );
|
|
|
|
BOOL (WINAPI *pNtGdiCloseFigure)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc );
|
|
|
|
HBITMAP (WINAPI *pNtGdiCreateCompatibleBitmap)( HDC hdc, INT width, INT height );
|
|
|
|
HDC (WINAPI *pNtGdiCreateCompatibleDC)( HDC hdc );
|
|
|
|
HBITMAP (WINAPI *pNtGdiCreateDIBitmapInternal)( HDC hdc, INT width, INT height, DWORD init,
|
|
|
|
const void *bits, const BITMAPINFO *data,
|
|
|
|
UINT coloruse, UINT max_info, UINT max_bits,
|
|
|
|
ULONG flags, HANDLE xform );
|
|
|
|
HDC (WINAPI *pNtGdiCreateMetafileDC)( HDC hdc );
|
|
|
|
NTSTATUS (WINAPI *pNtGdiDdDDICheckVidPnExclusiveOwnership)( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc );
|
|
|
|
NTSTATUS (WINAPI *pNtGdiDdDDICreateDCFromMemory)( D3DKMT_CREATEDCFROMMEMORY *desc );
|
|
|
|
NTSTATUS (WINAPI *pNtGdiDdDDIDestroyDCFromMemory)( const D3DKMT_DESTROYDCFROMMEMORY *desc );
|
|
|
|
NTSTATUS (WINAPI *pNtGdiDdDDIDestroyDevice)( const D3DKMT_DESTROYDEVICE *desc );
|
|
|
|
NTSTATUS (WINAPI *pNtGdiDdDDIEscape)( const D3DKMT_ESCAPE *desc );
|
|
|
|
NTSTATUS (WINAPI *pNtGdiDdDDISetVidPnSourceOwner)( const D3DKMT_SETVIDPNSOURCEOWNER *desc );
|
|
|
|
BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj );
|
|
|
|
LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries,
|
|
|
|
DWORD func, BOOL inbound );
|
|
|
|
BOOL (WINAPI *pNtGdiEllipse)( HDC hdc, INT left, INT top, INT right, INT bottom );
|
|
|
|
INT (WINAPI *pNtGdiEndDoc)(HDC hdc);
|
|
|
|
BOOL (WINAPI *pNtGdiEndPath)( HDC hdc );
|
|
|
|
INT (WINAPI *pNtGdiEndPage)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiEnumFonts)( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_name_len,
|
|
|
|
const WCHAR *face_name, ULONG charset, ULONG *count, void *buf );
|
|
|
|
INT (WINAPI *pNtGdiExcludeClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom );
|
|
|
|
INT (WINAPI *pNtGdiExtEscape)( HDC hdc, WCHAR *driver, INT driver_id, INT escape, INT input_size,
|
|
|
|
const char *input, INT output_size, char *output );
|
|
|
|
BOOL (WINAPI *pNtGdiExtFloodFill)( HDC hdc, INT x, INT y, COLORREF color, UINT type );
|
|
|
|
BOOL (WINAPI *pNtGdiExtTextOutW)( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
|
|
|
|
const WCHAR *str, UINT count, const INT *dx, DWORD cp );
|
|
|
|
INT (WINAPI *pNtGdiExtSelectClipRgn)( HDC hdc, HRGN region, INT mode );
|
|
|
|
BOOL (WINAPI *pNtGdiFillPath)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiFillRgn)( HDC hdc, HRGN hrgn, HBRUSH hbrush );
|
|
|
|
BOOL (WINAPI *pNtGdiFontIsLinked)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiFrameRgn)( HDC hdc, HRGN hrgn, HBRUSH brush, INT width, INT height );
|
|
|
|
BOOL (WINAPI *pNtGdiGetAndSetDCDword)( HDC hdc, UINT method, DWORD value, DWORD *result );
|
|
|
|
INT (WINAPI *pNtGdiGetAppClipBox)( HDC hdc, RECT *rect );
|
|
|
|
UINT (WINAPI *pNtGdiGetBoundsRect)( HDC hdc, RECT *rect, UINT flags );
|
|
|
|
BOOL (WINAPI *pNtGdiGetCharABCWidthsW)( HDC hdc, UINT first, UINT last, WCHAR *chars,
|
|
|
|
ULONG flags, void *buffer );
|
|
|
|
BOOL (WINAPI *pNtGdiGetCharWidthW)( HDC hdc, UINT first_char, UINT last_char, WCHAR *chars,
|
|
|
|
ULONG flags, void *buffer );
|
|
|
|
BOOL (WINAPI *pNtGdiGetCharWidthInfo)( HDC hdc, struct char_width_info *info );
|
|
|
|
INT (WINAPI *pNtGdiGetDIBitsInternal)( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines,
|
|
|
|
void *bits, BITMAPINFO *info, UINT coloruse,
|
|
|
|
UINT max_bits, UINT max_info );
|
|
|
|
INT (WINAPI *pNtGdiGetDeviceCaps)( HDC hdc, INT cap );
|
|
|
|
BOOL (WINAPI *pNtGdiGetDeviceGammaRamp)( HDC hdc, void *ptr );
|
|
|
|
DWORD (WINAPI *pNtGdiGetFontData)( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length );
|
|
|
|
DWORD (WINAPI *pNtGdiGetFontUnicodeRanges)( HDC hdc, GLYPHSET *lpgs );
|
|
|
|
DWORD (WINAPI *pNtGdiGetGlyphIndicesW)( HDC hdc, const WCHAR *str, INT count,
|
|
|
|
WORD *indices, DWORD flags );
|
|
|
|
DWORD (WINAPI *pNtGdiGetGlyphOutline)( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
|
|
|
|
DWORD size, void *buffer, const MAT2 *mat2,
|
|
|
|
BOOL ignore_rotation );
|
|
|
|
DWORD (WINAPI *pNtGdiGetKerningPairs)( HDC hdc, DWORD count, KERNINGPAIR *kern_pair );
|
|
|
|
COLORREF (WINAPI *pNtGdiGetNearestColor)( HDC hdc, COLORREF color );
|
|
|
|
UINT (WINAPI *pNtGdiGetOutlineTextMetricsInternalW)( HDC hdc, UINT cbData,
|
|
|
|
OUTLINETEXTMETRICW *otm, ULONG opts );
|
|
|
|
COLORREF (WINAPI *pNtGdiGetPixel)( HDC hdc, INT x, INT y );
|
|
|
|
INT (WINAPI *pNtGdiGetRandomRgn)( HDC hdc, HRGN region, INT code );
|
|
|
|
BOOL (WINAPI *pNtGdiGetRasterizerCaps)( RASTERIZER_STATUS *status, UINT size );
|
|
|
|
BOOL (WINAPI *pNtGdiGetRealizationInfo)( HDC hdc, struct font_realization_info *info );
|
|
|
|
UINT (WINAPI *pNtGdiGetTextCharsetInfo)( HDC hdc, FONTSIGNATURE *fs, DWORD flags );
|
|
|
|
BOOL (WINAPI *pNtGdiGetTextExtentExW)( HDC hdc, const WCHAR *str, INT count, INT max_ext,
|
|
|
|
INT *nfit, INT *dxs, SIZE *size, UINT flags );
|
|
|
|
INT (WINAPI *pNtGdiGetTextFaceW)( HDC hdc, INT count, WCHAR *name, BOOL alias_name );
|
|
|
|
BOOL (WINAPI *pNtGdiGetTextMetricsW)( HDC hdc, TEXTMETRICW *metrics, ULONG flags );
|
|
|
|
BOOL (WINAPI *pNtGdiGradientFill)( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
|
|
|
|
void *grad_array, ULONG ngrad, ULONG mode );
|
|
|
|
INT (WINAPI *pNtGdiIntersectClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom );
|
|
|
|
BOOL (WINAPI *pNtGdiInvertRgn)( HDC hdc, HRGN hrgn );
|
|
|
|
BOOL (WINAPI *pNtGdiLineTo)( HDC hdc, INT x, INT y );
|
|
|
|
BOOL (WINAPI *pNtGdiMaskBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
|
|
|
|
HDC hdc_src, INT x_src, INT y_src, HBITMAP mask,
|
|
|
|
INT x_mask, INT y_mask, DWORD rop, DWORD bk_color );
|
|
|
|
BOOL (WINAPI *pNtGdiModifyWorldTransform)( HDC hdc, const XFORM *xform, DWORD mode );
|
|
|
|
BOOL (WINAPI *pNtGdiMoveTo)( HDC hdc, INT x, INT y, POINT *pt );
|
|
|
|
INT (WINAPI *pNtGdiOffsetClipRgn)( HDC hdc, INT x, INT y );
|
|
|
|
HDC (WINAPI *pNtGdiOpenDCW)( UNICODE_STRING *device, const DEVMODEW *devmode,
|
|
|
|
UNICODE_STRING *output, ULONG type, BOOL is_display,
|
|
|
|
HANDLE hspool, DRIVER_INFO_2W *driver_info, void *pdev );
|
|
|
|
BOOL (WINAPI *pNtGdiPatBlt)( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop );
|
|
|
|
BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src,
|
|
|
|
INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask,
|
|
|
|
DWORD bk_color );
|
|
|
|
BOOL (WINAPI *pNtGdiPolyDraw)(HDC hdc, const POINT *points, const BYTE *types, DWORD count );
|
|
|
|
ULONG (WINAPI *pNtGdiPolyPolyDraw)( HDC hdc, const POINT *points, const UINT *counts,
|
|
|
|
DWORD count, UINT function );
|
|
|
|
BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y );
|
|
|
|
BOOL (WINAPI *pNtGdiRectVisible)( HDC hdc, const RECT *rect );
|
|
|
|
BOOL (WINAPI *pNtGdiRectangle)( HDC hdc, INT left, INT top, INT right, INT bottom );
|
|
|
|
BOOL (WINAPI *pNtGdiResetDC)( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
|
|
|
|
DRIVER_INFO_2W *driver_info, void *dev );
|
|
|
|
BOOL (WINAPI *pNtGdiResizePalette)( HPALETTE palette, UINT count );
|
|
|
|
BOOL (WINAPI *pNtGdiRestoreDC)( HDC hdc, INT level );
|
|
|
|
BOOL (WINAPI *pNtGdiRoundRect)( HDC hdc, INT left, INT top, INT right,
|
|
|
|
INT bottom, INT ell_width, INT ell_height );
|
|
|
|
BOOL (WINAPI *pNtGdiScaleViewportExtEx)( HDC hdc, INT x_num, INT x_denom,
|
|
|
|
INT y_num, INT y_denom, SIZE *size );
|
|
|
|
BOOL (WINAPI *pNtGdiScaleWindowExtEx)( HDC hdc, INT x_num, INT x_denom,
|
|
|
|
INT y_num, INT y_denom, SIZE *size );
|
|
|
|
HGDIOBJ (WINAPI *pNtGdiSelectBitmap)( HDC hdc, HGDIOBJ handle );
|
|
|
|
HGDIOBJ (WINAPI *pNtGdiSelectBrush)( HDC hdc, HGDIOBJ handle );
|
|
|
|
BOOL (WINAPI *pNtGdiSelectClipPath)( HDC hdc, INT mode );
|
|
|
|
HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle );
|
|
|
|
HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle );
|
|
|
|
UINT (WINAPI *pNtGdiSetBoundsRect)( HDC hdc, const RECT *rect, UINT flags );
|
|
|
|
INT (WINAPI *pNtGdiSetDIBitsToDeviceInternal)( HDC hdc, INT x_dst, INT y_dst, DWORD cx,
|
|
|
|
DWORD cy, INT x_src, INT y_src, UINT startscan,
|
|
|
|
UINT lines, const void *bits, const BITMAPINFO *bmi,
|
|
|
|
UINT coloruse, UINT max_bits, UINT max_info,
|
|
|
|
BOOL xform_coords, HANDLE xform );
|
|
|
|
BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr );
|
|
|
|
DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout );
|
|
|
|
COLORREF (WINAPI *pNtGdiSetPixel)( HDC hdc, INT x, INT y, COLORREF color );
|
|
|
|
UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use );
|
|
|
|
INT (WINAPI *pNtGdiStartDoc)( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job );
|
|
|
|
INT (WINAPI *pNtGdiStartPage)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiStretchBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
|
|
|
|
HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src,
|
|
|
|
DWORD rop, COLORREF bk_color );
|
|
|
|
INT (WINAPI *pNtGdiStretchDIBitsInternal)( HDC hdc, INT x_dst, INT y_dst, INT width_dst,
|
|
|
|
INT height_dst, INT x_src, INT y_src, INT width_src,
|
|
|
|
INT height_src, const void *bits, const BITMAPINFO *bmi,
|
|
|
|
UINT coloruse, DWORD rop, UINT max_info, UINT max_bits,
|
|
|
|
HANDLE xform );
|
|
|
|
BOOL (WINAPI *pNtGdiStrokeAndFillPath)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiStrokePath)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiTransparentBlt)( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst,
|
|
|
|
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
|
|
|
|
UINT color );
|
|
|
|
BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj );
|
|
|
|
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
|
|
|
|
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
|
2021-11-17 12:47:04 +01:00
|
|
|
HKL (WINAPI *pNtUserActivateKeyboardLayout)( HKL layout, UINT flags );
|
2022-03-14 11:44:10 +01:00
|
|
|
HDC (WINAPI *pNtUserBeginPaint)( HWND hwnd, PAINTSTRUCT *ps );
|
2022-03-09 15:21:51 +01:00
|
|
|
ULONG_PTR (WINAPI *pNtUserCallHwnd)( HWND hwnd, DWORD code );
|
2022-03-07 14:43:07 +01:00
|
|
|
ULONG_PTR (WINAPI *pNtUserCallHwndParam)( HWND hwnd, DWORD_PTR param, DWORD code );
|
2022-02-25 16:02:27 +01:00
|
|
|
LRESULT (WINAPI *pNtUserCallNextHookEx)( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam );
|
2022-02-15 13:10:51 +01:00
|
|
|
ULONG_PTR (WINAPI *pNtUserCallNoParam)( ULONG code );
|
2021-12-03 12:56:30 +01:00
|
|
|
ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code );
|
2021-12-02 01:13:39 +01:00
|
|
|
ULONG_PTR (WINAPI *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
|
2021-12-02 01:14:35 +01:00
|
|
|
LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
|
|
|
|
DWORD flags, void *lparam );
|
2022-02-14 14:07:25 +01:00
|
|
|
BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect );
|
2021-11-11 14:13:45 +01:00
|
|
|
INT (WINAPI *pNtUserCountClipboardFormats)(void);
|
2022-03-18 14:27:55 +01:00
|
|
|
HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name,
|
|
|
|
UNICODE_STRING *version, UNICODE_STRING *window_name,
|
|
|
|
DWORD style, INT x, INT y, INT width, INT height,
|
|
|
|
HWND parent, HMENU menu, HINSTANCE instance, void *params,
|
|
|
|
DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi );
|
2022-03-15 14:27:28 +01:00
|
|
|
HDWP (WINAPI *pNtUserDeferWindowPosAndBand)( HDWP hdwp, HWND hwnd, HWND after,
|
|
|
|
INT x, INT y, INT cx, INT cy,
|
|
|
|
UINT flags, UINT unk1, UINT unk2 );
|
2022-02-22 13:53:11 +01:00
|
|
|
BOOL (WINAPI *pNtUserDestroyCursor)( HCURSOR cursor, ULONG arg );
|
2022-03-25 12:19:05 +01:00
|
|
|
BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle );
|
2022-03-17 16:29:30 +01:00
|
|
|
BOOL (WINAPI *pNtUserDestroyWindow)( HWND hwnd );
|
2022-03-23 14:01:18 +01:00
|
|
|
LRESULT (WINAPI *pNtUserDispatchMessage)( const MSG *msg );
|
2022-02-23 13:41:38 +01:00
|
|
|
BOOL (WINAPI *pNtUserDrawIconEx)( HDC hdc, INT x0, INT y0, HICON icon, INT width,
|
|
|
|
INT height, UINT istep, HBRUSH hbr, UINT flags );
|
2022-03-15 14:27:28 +01:00
|
|
|
BOOL (WINAPI *pNtUserEndDeferWindowPosEx)( HDWP hdwp, BOOL async );
|
2022-03-14 11:44:41 +01:00
|
|
|
BOOL (WINAPI *pNtUserEndPaint)( HWND hwnd, const PAINTSTRUCT *ps );
|
2021-12-10 02:06:59 +01:00
|
|
|
NTSTATUS (WINAPI *pNtUserEnumDisplayDevices)( UNICODE_STRING *device, DWORD index,
|
2021-11-30 13:26:48 +01:00
|
|
|
DISPLAY_DEVICEW *info, DWORD flags );
|
2021-12-02 01:13:55 +01:00
|
|
|
BOOL (WINAPI *pNtUserEnumDisplayMonitors)( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp );
|
2021-12-01 16:02:43 +01:00
|
|
|
BOOL (WINAPI *pNtUserEnumDisplaySettings)( UNICODE_STRING *device, DWORD mode,
|
|
|
|
DEVMODEW *dev_mode, DWORD flags );
|
2022-03-09 15:19:47 +01:00
|
|
|
BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info );
|
2022-02-15 13:15:56 +01:00
|
|
|
SHORT (WINAPI *pNtUserGetAsyncKeyState)( INT key );
|
2022-03-07 14:42:32 +01:00
|
|
|
ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
|
|
|
|
struct client_menu_name *menu_name, BOOL ansi );
|
2022-02-24 01:28:18 +01:00
|
|
|
BOOL (WINAPI *pNtUserGetCursorInfo)( CURSORINFO *info );
|
2022-03-14 11:43:55 +01:00
|
|
|
HDC (WINAPI *pNtUserGetDCEx)( HWND hwnd, HRGN clip_rgn, DWORD flags );
|
2021-11-30 13:24:18 +01:00
|
|
|
LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info,
|
|
|
|
UINT32 *num_mode_info );
|
2022-02-23 13:40:33 +01:00
|
|
|
BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module,
|
|
|
|
UNICODE_STRING *res_name, DWORD *bpp, LONG unk );
|
2021-11-16 12:35:59 +01:00
|
|
|
INT (WINAPI *pNtUserGetKeyNameText)( LONG lparam, WCHAR *buffer, INT size );
|
2021-11-17 12:47:38 +01:00
|
|
|
UINT (WINAPI *pNtUserGetKeyboardLayoutList)( INT size, HKL *layouts );
|
2021-11-12 12:55:06 +01:00
|
|
|
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
|
2022-02-15 13:10:38 +01:00
|
|
|
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
|
2022-03-15 14:28:20 +01:00
|
|
|
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
|
2022-03-14 11:45:43 +01:00
|
|
|
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
|
2021-11-12 12:54:10 +01:00
|
|
|
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
|
2021-11-12 12:53:40 +01:00
|
|
|
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
|
2021-11-16 12:34:17 +01:00
|
|
|
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
|
2022-03-21 16:42:08 +01:00
|
|
|
BOOL (WINAPI *pNtUserMessageCall)( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
|
|
|
|
ULONG_PTR result_info, DWORD type, BOOL ansi );
|
2022-03-10 14:32:16 +01:00
|
|
|
BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
|
2022-03-14 11:45:30 +01:00
|
|
|
BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
|
2022-03-07 14:42:32 +01:00
|
|
|
ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name,
|
|
|
|
UNICODE_STRING *version,
|
|
|
|
struct client_menu_name *client_menu_name,
|
|
|
|
DWORD fnid, DWORD flags, DWORD *wow );
|
2022-02-24 01:27:57 +01:00
|
|
|
BOOL (WINAPI *pNtUserRegisterHotKey)( HWND hwnd, INT id, UINT modifiers, UINT vk );
|
2022-03-14 11:45:12 +01:00
|
|
|
INT (WINAPI *pNtUserReleaseDC)( HWND hwnd, HDC hdc );
|
2021-11-17 12:49:37 +01:00
|
|
|
BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
|
|
|
|
HRGN ret_update_rgn, RECT *update_rect );
|
2021-12-03 12:56:43 +01:00
|
|
|
HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg );
|
2022-03-11 14:21:31 +01:00
|
|
|
HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd );
|
2022-03-11 14:22:19 +01:00
|
|
|
HWND (WINAPI *pNtUserSetCapture)( HWND hwnd );
|
2022-03-07 14:42:47 +01:00
|
|
|
DWORD (WINAPI *pNtUserSetClassLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi );
|
|
|
|
ULONG_PTR (WINAPI *pNtUserSetClassLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi );
|
|
|
|
WORD (WINAPI *pNtUserSetClassWord)( HWND hwnd, INT offset, WORD newval );
|
2022-02-23 13:39:35 +01:00
|
|
|
HCURSOR (WINAPI *pNtUserSetCursor)( HCURSOR cursor );
|
2022-02-22 13:53:11 +01:00
|
|
|
BOOL (WINAPI *pNtUserSetCursorIconData)( HCURSOR cursor, UNICODE_STRING *module,
|
|
|
|
UNICODE_STRING *res_name, struct cursoricon_desc *desc );
|
2022-02-14 14:07:53 +01:00
|
|
|
BOOL (WINAPI *pNtUserSetCursorPos)( INT x, INT y );
|
2022-03-11 14:21:45 +01:00
|
|
|
HWND (WINAPI *pNtUserSetFocus)( HWND hwnd );
|
2022-03-10 14:33:11 +01:00
|
|
|
BOOL (WINAPI *pNtUserSetLayeredWindowAttributes)( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
|
2022-03-15 14:27:55 +01:00
|
|
|
HWND (WINAPI *pNtUserSetParent)( HWND hwnd, HWND parent );
|
2021-12-06 03:15:59 +01:00
|
|
|
BOOL (WINAPI *pNtUserSetSysColors)( INT count, const INT *colors, const COLORREF *values );
|
2022-03-16 15:35:25 +01:00
|
|
|
LONG (WINAPI *pNtUserSetWindowLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi );
|
|
|
|
LONG_PTR (WINAPI *pNtUserSetWindowLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi );
|
2022-03-10 14:31:41 +01:00
|
|
|
BOOL (WINAPI *pNtUserSetWindowPos)( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags );
|
|
|
|
int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw );
|
2022-03-16 15:35:25 +01:00
|
|
|
WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval );
|
2021-12-03 12:55:30 +01:00
|
|
|
INT (WINAPI *pNtUserShowCursor)( BOOL show );
|
2022-03-17 16:29:32 +01:00
|
|
|
BOOL (WINAPI *pNtUserShowWindow)( HWND hwnd, INT cmd );
|
|
|
|
BOOL (WINAPI *pNtUserShowWindowAsync)( HWND hwnd, INT cmd );
|
2021-12-06 03:15:59 +01:00
|
|
|
BOOL (WINAPI *pNtUserSystemParametersInfo)( UINT action, UINT val, PVOID ptr, UINT winini );
|
|
|
|
BOOL (WINAPI *pNtUserSystemParametersInfoForDpi)( UINT action, UINT val, PVOID ptr,
|
|
|
|
UINT winini, UINT dpi );
|
2021-11-17 12:46:39 +01:00
|
|
|
INT (WINAPI *pNtUserToUnicodeEx)( UINT virt, UINT scan, const BYTE *state,
|
|
|
|
WCHAR *str, int size, UINT flags, HKL layout );
|
2022-03-07 14:42:32 +01:00
|
|
|
BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance,
|
|
|
|
struct client_menu_name *client_menu_name );
|
2021-11-17 12:48:13 +01:00
|
|
|
BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id );
|
2022-03-10 14:33:27 +01:00
|
|
|
BOOL (WINAPI *pNtUserUpdateLayeredWindow)( HWND hwnd, HDC hdc_dst, const POINT *pts_dst,
|
|
|
|
const SIZE *size, HDC hdc_src, const POINT *pts_src,
|
|
|
|
COLORREF key, const BLENDFUNCTION *blend,
|
|
|
|
DWORD flags, const RECT *dirty );
|
2021-11-16 12:33:53 +01:00
|
|
|
WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout );
|
2022-03-10 14:31:55 +01:00
|
|
|
HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y );
|
2021-09-29 14:09:21 +02:00
|
|
|
|
|
|
|
/* Wine-specific functions */
|
|
|
|
INT (WINAPI *pSetDIBits)( HDC hdc, HBITMAP hbitmap, UINT startscan,
|
|
|
|
UINT lines, const void *bits, const BITMAPINFO *info,
|
|
|
|
UINT coloruse );
|
|
|
|
BOOL (CDECL *get_brush_bitmap_info)( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage );
|
|
|
|
BOOL (CDECL *get_file_outline_text_metric)( const WCHAR *path, OUTLINETEXTMETRICW *otm );
|
|
|
|
BOOL (CDECL *get_icm_profile)( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename );
|
2021-12-07 15:30:12 +01:00
|
|
|
const struct vulkan_funcs * (CDECL *get_vulkan_driver)( UINT version );
|
2021-09-29 14:09:21 +02:00
|
|
|
struct opengl_funcs * (CDECL *get_wgl_driver)( HDC hdc, UINT version );
|
2021-11-11 14:13:29 +01:00
|
|
|
void (CDECL *set_display_driver)( struct user_driver_funcs *funcs, UINT version );
|
2021-09-29 14:09:21 +02:00
|
|
|
};
|
|
|
|
|
2022-03-17 16:29:30 +01:00
|
|
|
/* clipboard.c */
|
|
|
|
extern void release_clipboard_owner( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
|
2022-02-14 14:07:34 +01:00
|
|
|
/* cursoricon.c */
|
2022-02-22 13:53:11 +01:00
|
|
|
extern HICON alloc_cursoricon_handle( BOOL is_icon ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:34 +01:00
|
|
|
extern BOOL get_clip_cursor( RECT *rect ) DECLSPEC_HIDDEN;
|
2022-02-24 01:27:36 +01:00
|
|
|
extern ULONG_PTR get_icon_param( HICON handle ) DECLSPEC_HIDDEN;
|
|
|
|
extern ULONG_PTR set_icon_param( HICON handle, ULONG_PTR param ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:34 +01:00
|
|
|
|
2022-03-14 11:45:01 +01:00
|
|
|
/* dce.c */
|
|
|
|
extern struct window_surface dummy_surface DECLSPEC_HIDDEN;
|
2022-03-21 14:13:56 +01:00
|
|
|
extern BOOL create_dib_surface( HDC hdc, const BITMAPINFO *info ) DECLSPEC_HIDDEN;
|
2022-03-18 14:28:42 +01:00
|
|
|
extern void create_offscreen_window_surface( const RECT *visible_rect,
|
|
|
|
struct window_surface **surface ) DECLSPEC_HIDDEN;
|
2022-03-18 14:27:55 +01:00
|
|
|
extern void erase_now( HWND hwnd, UINT rdw_flags ) DECLSPEC_HIDDEN;
|
2022-03-14 11:45:01 +01:00
|
|
|
extern void flush_window_surfaces( BOOL idle ) DECLSPEC_HIDDEN;
|
2022-03-18 14:28:42 +01:00
|
|
|
extern void move_window_bits( HWND hwnd, struct window_surface *old_surface,
|
|
|
|
struct window_surface *new_surface,
|
|
|
|
const RECT *visible_rect, const RECT *old_visible_rect,
|
|
|
|
const RECT *window_rect, const RECT *valid_rects ) DECLSPEC_HIDDEN;
|
|
|
|
extern void move_window_bits_parent( HWND hwnd, HWND parent, const RECT *window_rect,
|
|
|
|
const RECT *valid_rects ) DECLSPEC_HIDDEN;
|
2022-03-14 11:45:01 +01:00
|
|
|
extern void register_window_surface( struct window_surface *old,
|
|
|
|
struct window_surface *new ) DECLSPEC_HIDDEN;
|
|
|
|
|
2022-02-16 12:31:17 +01:00
|
|
|
/* hook.c */
|
2022-02-25 16:02:12 +01:00
|
|
|
extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
|
2022-02-25 16:02:46 +01:00
|
|
|
extern LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN;
|
2022-02-16 12:31:17 +01:00
|
|
|
extern BOOL unhook_windows_hook( INT id, HOOKPROC proc ) DECLSPEC_HIDDEN;
|
|
|
|
|
2022-02-14 14:08:27 +01:00
|
|
|
/* input.c */
|
2022-02-15 13:15:56 +01:00
|
|
|
extern LONG global_key_state_counter DECLSPEC_HIDDEN;
|
2022-03-09 15:22:39 +01:00
|
|
|
extern HWND get_active_window(void) DECLSPEC_HIDDEN;
|
2022-02-14 14:08:27 +01:00
|
|
|
extern BOOL get_cursor_pos( POINT *pt ) DECLSPEC_HIDDEN;
|
2022-03-17 16:29:32 +01:00
|
|
|
extern HWND get_focus(void) DECLSPEC_HIDDEN;
|
2022-02-15 13:10:51 +01:00
|
|
|
extern DWORD get_input_state(void) DECLSPEC_HIDDEN;
|
2022-03-11 14:22:19 +01:00
|
|
|
extern BOOL WINAPI release_capture(void) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN;
|
2022-03-11 14:22:04 +01:00
|
|
|
extern BOOL set_foreground_window( HWND hwnd, BOOL mouse ) DECLSPEC_HIDDEN;
|
2022-02-14 14:08:27 +01:00
|
|
|
|
2022-03-17 16:29:31 +01:00
|
|
|
/* menu.c */
|
2022-03-25 12:19:05 +01:00
|
|
|
extern HMENU create_menu(void) DECLSPEC_HIDDEN;
|
2022-03-17 16:29:31 +01:00
|
|
|
extern HMENU get_menu( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
|
2022-03-09 15:19:47 +01:00
|
|
|
/* message.c */
|
2022-03-23 14:01:18 +01:00
|
|
|
extern LRESULT dispatch_message( const MSG *msg, BOOL ansi ) DECLSPEC_HIDDEN;
|
2022-03-16 15:36:42 +01:00
|
|
|
extern BOOL kill_system_timer( HWND hwnd, UINT_PTR id ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:56 +01:00
|
|
|
extern LRESULT post_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
|
2022-03-31 15:36:39 +02:00
|
|
|
extern void process_sent_messages(void) DECLSPEC_HIDDEN;
|
2022-03-31 15:36:02 +02:00
|
|
|
extern BOOL reply_message_result( LRESULT result, MSG *msg ) DECLSPEC_HIDDEN;
|
2022-03-09 15:19:47 +01:00
|
|
|
extern LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
|
|
|
|
|
2022-02-14 14:07:34 +01:00
|
|
|
/* sysparams.c */
|
2021-12-06 03:16:10 +01:00
|
|
|
extern RECT get_display_rect( const WCHAR *display ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:25 +01:00
|
|
|
extern UINT get_monitor_dpi( HMONITOR monitor ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:34 +01:00
|
|
|
extern BOOL get_monitor_info( HMONITOR handle, MONITORINFO *info ) DECLSPEC_HIDDEN;
|
2022-03-09 15:22:07 +01:00
|
|
|
extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-09 15:22:22 +01:00
|
|
|
extern RECT get_primary_monitor_rect( UINT dpi ) DECLSPEC_HIDDEN;
|
2021-12-06 03:10:15 +01:00
|
|
|
extern UINT get_system_dpi(void) DECLSPEC_HIDDEN;
|
2021-12-06 03:16:10 +01:00
|
|
|
extern int get_system_metrics( int index ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:25 +01:00
|
|
|
extern UINT get_thread_dpi(void) DECLSPEC_HIDDEN;
|
2022-03-18 14:27:55 +01:00
|
|
|
extern DPI_AWARENESS get_thread_dpi_awareness(void) DECLSPEC_HIDDEN;
|
2021-12-06 03:15:59 +01:00
|
|
|
extern RECT get_virtual_screen_rect( UINT dpi ) DECLSPEC_HIDDEN;
|
2022-03-17 16:29:30 +01:00
|
|
|
extern BOOL is_exiting_thread( DWORD tid ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:53 +01:00
|
|
|
extern POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:25 +01:00
|
|
|
extern RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
|
2022-03-31 15:36:39 +02:00
|
|
|
extern POINT point_phys_to_win_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:53 +01:00
|
|
|
extern HMONITOR monitor_from_point( POINT pt, DWORD flags, UINT dpi ) DECLSPEC_HIDDEN;
|
2022-02-14 14:07:25 +01:00
|
|
|
extern HMONITOR monitor_from_rect( const RECT *rect, DWORD flags, UINT dpi ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:34 +01:00
|
|
|
extern HMONITOR monitor_from_window( HWND hwnd, DWORD flags, UINT dpi ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:56 +01:00
|
|
|
extern DPI_AWARENESS_CONTEXT set_thread_dpi_awareness_context( DPI_AWARENESS_CONTEXT context ) DECLSPEC_HIDDEN;
|
2022-02-24 01:27:57 +01:00
|
|
|
extern void user_lock(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void user_unlock(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void user_check_not_lock(void) DECLSPEC_HIDDEN;
|
2021-12-02 01:14:12 +01:00
|
|
|
|
2022-02-15 13:10:20 +01:00
|
|
|
/* window.c */
|
2022-02-24 01:27:57 +01:00
|
|
|
struct tagWND;
|
2022-03-15 14:27:28 +01:00
|
|
|
extern HDWP begin_defer_window_pos( INT count ) DECLSPEC_HIDDEN;
|
2022-03-17 16:29:29 +01:00
|
|
|
extern void destroy_thread_windows(void) DECLSPEC_HIDDEN;
|
2022-03-17 16:29:30 +01:00
|
|
|
extern LRESULT destroy_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-17 16:29:32 +01:00
|
|
|
extern BOOL get_client_rect( HWND hwnd, RECT *rect ) DECLSPEC_HIDDEN;
|
2022-03-09 15:20:01 +01:00
|
|
|
extern HWND get_desktop_window(void) DECLSPEC_HIDDEN;
|
2022-03-15 14:27:55 +01:00
|
|
|
extern UINT get_dpi_for_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-11 14:21:31 +01:00
|
|
|
extern HWND get_full_window_handle( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-11 14:21:45 +01:00
|
|
|
extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
|
2022-03-14 11:43:55 +01:00
|
|
|
extern DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:34 +01:00
|
|
|
extern BOOL get_window_placement( HWND hwnd, WINDOWPLACEMENT *placement ) DECLSPEC_HIDDEN;
|
2022-03-11 14:21:31 +01:00
|
|
|
extern DWORD get_window_thread( HWND hwnd, DWORD *process ) DECLSPEC_HIDDEN;
|
2022-03-14 11:43:55 +01:00
|
|
|
extern HWND is_current_process_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-02-24 01:27:57 +01:00
|
|
|
extern HWND is_current_thread_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-15 14:27:14 +01:00
|
|
|
extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:34 +01:00
|
|
|
extern BOOL is_iconic( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-21 16:42:08 +01:00
|
|
|
extern BOOL is_window_unicode( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-03-08 14:24:00 +01:00
|
|
|
extern DWORD get_window_long( HWND hwnd, INT offset ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:34 +01:00
|
|
|
extern BOOL get_window_rect( HWND hwnd, RECT *rect, UINT dpi ) DECLSPEC_HIDDEN;
|
2022-03-14 11:43:55 +01:00
|
|
|
enum coords_relative;
|
|
|
|
extern BOOL get_window_rects( HWND hwnd, enum coords_relative relative, RECT *window_rect,
|
|
|
|
RECT *client_rect, UINT dpi ) DECLSPEC_HIDDEN;
|
2022-03-11 14:21:31 +01:00
|
|
|
extern HWND *list_window_children( HDESK desktop, HWND hwnd, UNICODE_STRING *class,
|
|
|
|
DWORD tid ) DECLSPEC_HIDDEN;
|
2022-03-15 14:28:20 +01:00
|
|
|
extern int map_window_points( HWND hwnd_from, HWND hwnd_to, POINT *points, UINT count,
|
|
|
|
UINT dpi ) DECLSPEC_HIDDEN;
|
2022-03-14 11:45:43 +01:00
|
|
|
extern void map_window_region( HWND from, HWND to, HRGN hrgn ) DECLSPEC_HIDDEN;
|
2022-03-16 15:35:25 +01:00
|
|
|
extern LONG_PTR set_window_long( HWND hwnd, INT offset, UINT size, LONG_PTR newval,
|
|
|
|
BOOL ansi ) DECLSPEC_HIDDEN;
|
2022-03-15 14:27:14 +01:00
|
|
|
extern BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y ) DECLSPEC_HIDDEN;
|
2022-03-16 15:34:55 +01:00
|
|
|
extern ULONG set_window_style( HWND hwnd, ULONG set_bits, ULONG clear_bits ) DECLSPEC_HIDDEN;
|
2022-03-10 14:32:56 +01:00
|
|
|
extern void update_window_state( HWND hwnd ) DECLSPEC_HIDDEN;
|
2022-02-24 01:27:57 +01:00
|
|
|
|
|
|
|
/* to release pointers retrieved by win_get_ptr */
|
|
|
|
static inline void release_win_ptr( struct tagWND *ptr )
|
|
|
|
{
|
|
|
|
user_unlock();
|
|
|
|
}
|
2022-02-15 13:10:20 +01:00
|
|
|
|
2021-10-06 16:20:35 +02:00
|
|
|
extern void wrappers_init( unixlib_handle_t handle ) DECLSPEC_HIDDEN;
|
|
|
|
extern NTSTATUS gdi_init(void) DECLSPEC_HIDDEN;
|
|
|
|
extern NTSTATUS callbacks_init( void *args ) DECLSPEC_HIDDEN;
|
2021-10-14 15:22:40 +02:00
|
|
|
extern void winstation_init(void) DECLSPEC_HIDDEN;
|
2021-12-03 12:56:05 +01:00
|
|
|
extern void sysparams_init(void) DECLSPEC_HIDDEN;
|
2021-09-29 14:09:21 +02:00
|
|
|
|
2021-11-30 13:26:01 +01:00
|
|
|
extern HKEY reg_create_key( HKEY root, const WCHAR *name, ULONG name_len,
|
|
|
|
DWORD options, DWORD *disposition ) DECLSPEC_HIDDEN;
|
2021-10-14 15:22:40 +02:00
|
|
|
extern HKEY reg_open_hkcu_key( const char *name ) DECLSPEC_HIDDEN;
|
|
|
|
extern HKEY reg_open_key( HKEY root, const WCHAR *name, ULONG name_len ) DECLSPEC_HIDDEN;
|
2021-11-30 13:24:18 +01:00
|
|
|
extern ULONG query_reg_value( HKEY hkey, const WCHAR *name,
|
|
|
|
KEY_VALUE_PARTIAL_INFORMATION *info, ULONG size ) DECLSPEC_HIDDEN;
|
2021-10-14 15:22:40 +02:00
|
|
|
extern ULONG query_reg_ascii_value( HKEY hkey, const char *name,
|
|
|
|
KEY_VALUE_PARTIAL_INFORMATION *info, ULONG size ) DECLSPEC_HIDDEN;
|
2021-11-30 13:26:01 +01:00
|
|
|
extern void set_reg_ascii_value( HKEY hkey, const char *name, const char *value ) DECLSPEC_HIDDEN;
|
2021-12-06 03:08:45 +01:00
|
|
|
extern BOOL set_reg_value( HKEY hkey, const WCHAR *name, UINT type, const void *value,
|
2021-11-30 13:26:01 +01:00
|
|
|
DWORD count ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL reg_delete_tree( HKEY parent, const WCHAR *name, ULONG name_len ) DECLSPEC_HIDDEN;
|
2021-12-06 03:08:45 +01:00
|
|
|
extern void reg_delete_value( HKEY hkey, const WCHAR *name ) DECLSPEC_HIDDEN;
|
2021-09-29 14:09:21 +02:00
|
|
|
|
2021-12-03 12:56:05 +01:00
|
|
|
extern HKEY hkcu_key DECLSPEC_HIDDEN;
|
|
|
|
|
2021-11-16 12:35:43 +01:00
|
|
|
static inline struct user_thread_info *get_user_thread_info(void)
|
|
|
|
{
|
|
|
|
return (struct user_thread_info *)NtCurrentTeb()->Win32ClientInfo;
|
|
|
|
}
|
|
|
|
|
2021-11-11 14:13:45 +01:00
|
|
|
extern const struct user_driver_funcs *user_driver DECLSPEC_HIDDEN;
|
|
|
|
|
2021-12-02 01:13:55 +01:00
|
|
|
static inline NTSTATUS user32_call( ULONG id, void *args, ULONG len )
|
|
|
|
{
|
|
|
|
/* FIXME: use KeUserModeCallback instead */
|
|
|
|
NTSTATUS (WINAPI *func)(void *, ULONG) = ((void **)NtCurrentTeb()->Peb->KernelCallbackTable)[id];
|
|
|
|
return func( args, len );
|
|
|
|
}
|
|
|
|
|
2021-11-12 12:53:28 +01:00
|
|
|
static inline BOOL set_ntstatus( NTSTATUS status )
|
|
|
|
{
|
|
|
|
if (status) SetLastError( RtlNtStatusToDosError( status ));
|
|
|
|
return !status;
|
|
|
|
}
|
|
|
|
|
2021-09-29 14:08:14 +02:00
|
|
|
static inline WCHAR win32u_towupper( WCHAR ch )
|
|
|
|
{
|
|
|
|
return RtlUpcaseUnicodeChar( ch );
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline LONG win32u_wcstol( LPCWSTR s, LPWSTR *end, INT base )
|
|
|
|
{
|
|
|
|
BOOL negative = FALSE, empty = TRUE;
|
|
|
|
LONG ret = 0;
|
|
|
|
|
|
|
|
if (base < 0 || base == 1 || base > 36) return 0;
|
|
|
|
if (end) *end = (WCHAR *)s;
|
|
|
|
while (*s == ' ' || *s == '\t') s++;
|
|
|
|
|
|
|
|
if (*s == '-')
|
|
|
|
{
|
|
|
|
negative = TRUE;
|
|
|
|
s++;
|
|
|
|
}
|
|
|
|
else if (*s == '+') s++;
|
|
|
|
|
|
|
|
if ((base == 0 || base == 16) && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
|
|
|
|
{
|
|
|
|
base = 16;
|
|
|
|
s += 2;
|
|
|
|
}
|
|
|
|
if (base == 0) base = s[0] != '0' ? 10 : 8;
|
|
|
|
|
|
|
|
while (*s)
|
|
|
|
{
|
|
|
|
int v;
|
|
|
|
|
|
|
|
if ('0' <= *s && *s <= '9') v = *s - '0';
|
|
|
|
else if ('A' <= *s && *s <= 'Z') v = *s - 'A' + 10;
|
|
|
|
else if ('a' <= *s && *s <= 'z') v = *s - 'a' + 10;
|
|
|
|
else break;
|
|
|
|
if (v >= base) break;
|
|
|
|
if (negative) v = -v;
|
|
|
|
s++;
|
|
|
|
empty = FALSE;
|
|
|
|
|
|
|
|
if (!negative && (ret > MAXLONG / base || ret * base > MAXLONG - v))
|
|
|
|
ret = MAXLONG;
|
|
|
|
else if (negative && (ret < (LONG)MINLONG / base || ret * base < (LONG)(MINLONG - v)))
|
|
|
|
ret = MINLONG;
|
|
|
|
else
|
|
|
|
ret = ret * base + v;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (end && !empty) *end = (WCHAR *)s;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-11-17 12:47:38 +01:00
|
|
|
static inline ULONG win32u_wcstoul( const WCHAR *s, WCHAR **end, int base )
|
|
|
|
{
|
|
|
|
BOOL negative = FALSE, empty = TRUE;
|
|
|
|
ULONG ret = 0;
|
|
|
|
|
|
|
|
if (base < 0 || base == 1 || base > 36) return 0;
|
|
|
|
if (end) *end = (WCHAR *)s;
|
|
|
|
while (*s == ' ' || *s == '\t') s++;
|
|
|
|
|
|
|
|
if (*s == '-')
|
|
|
|
{
|
|
|
|
negative = TRUE;
|
|
|
|
s++;
|
|
|
|
}
|
|
|
|
else if (*s == '+') s++;
|
|
|
|
|
|
|
|
if ((base == 0 || base == 16) && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
|
|
|
|
{
|
|
|
|
base = 16;
|
|
|
|
s += 2;
|
|
|
|
}
|
|
|
|
if (base == 0) base = s[0] != '0' ? 10 : 8;
|
|
|
|
|
|
|
|
while (*s)
|
|
|
|
{
|
|
|
|
int v;
|
|
|
|
|
|
|
|
if ('0' <= *s && *s <= '9') v = *s - '0';
|
|
|
|
else if ('A' <= *s && *s <= 'Z') v = *s - 'A' + 10;
|
|
|
|
else if ('a' <= *s && *s <= 'z') v = *s - 'a' + 10;
|
|
|
|
else break;
|
|
|
|
if (v >= base) break;
|
|
|
|
s++;
|
|
|
|
empty = FALSE;
|
|
|
|
|
|
|
|
if (ret > MAXDWORD / base || ret * base > MAXDWORD - v)
|
|
|
|
ret = MAXDWORD;
|
|
|
|
else
|
|
|
|
ret = ret * base + v;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (end && !empty) *end = (WCHAR *)s;
|
|
|
|
return negative ? -ret : ret;
|
|
|
|
}
|
|
|
|
|
2021-09-29 14:08:14 +02:00
|
|
|
#define towupper(c) win32u_towupper(c)
|
|
|
|
#define wcstol(s,e,b) win32u_wcstol(s,e,b)
|
2021-11-17 12:47:38 +01:00
|
|
|
#define wcstoul(s,e,b) win32u_wcstoul(s,e,b)
|
2021-09-29 14:08:14 +02:00
|
|
|
|
2021-10-14 15:22:40 +02:00
|
|
|
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
|
|
|
|
{
|
|
|
|
while (len--) *dst++ = (unsigned char)*src++;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline UINT asciiz_to_unicode( WCHAR *dst, const char *src )
|
|
|
|
{
|
|
|
|
WCHAR *p = dst;
|
|
|
|
while ((*p++ = *src++));
|
|
|
|
return (p - dst) * sizeof(WCHAR);
|
|
|
|
}
|
|
|
|
|
2021-10-04 16:03:20 +02:00
|
|
|
DWORD win32u_mbtowc( CPTABLEINFO *info, WCHAR *dst, DWORD dstlen, const char *src,
|
|
|
|
DWORD srclen ) DECLSPEC_HIDDEN;
|
|
|
|
DWORD win32u_wctomb( CPTABLEINFO *info, char *dst, DWORD dstlen, const WCHAR *src,
|
|
|
|
DWORD srclen ) DECLSPEC_HIDDEN;
|
|
|
|
|
2021-11-17 12:49:37 +01:00
|
|
|
static inline BOOL is_win9x(void)
|
|
|
|
{
|
|
|
|
return NtCurrentTeb()->Peb->OSPlatformId == VER_PLATFORM_WIN32s;
|
|
|
|
}
|
|
|
|
|
2021-12-01 16:02:43 +01:00
|
|
|
static inline void init_unicode_string( UNICODE_STRING *str, const WCHAR *data )
|
|
|
|
{
|
|
|
|
str->Length = lstrlenW(data) * sizeof(WCHAR);
|
|
|
|
str->MaximumLength = str->Length + sizeof(WCHAR);
|
|
|
|
str->Buffer = (WCHAR *)data;
|
|
|
|
}
|
|
|
|
|
2021-11-30 13:26:48 +01:00
|
|
|
static inline const char *debugstr_us( const UNICODE_STRING *us )
|
|
|
|
{
|
|
|
|
if (!us) return "<null>";
|
|
|
|
return debugstr_wn( us->Buffer, us->Length / sizeof(WCHAR) );
|
|
|
|
}
|
|
|
|
|
2021-09-29 14:08:05 +02:00
|
|
|
#endif /* __WINE_WIN32U_PRIVATE */
|