wine/dlls/winex11.drv/dllmain.c

73 lines
2.2 KiB
C

/*
* winex11.drv entry points
*
* Copyright 2022 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
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ntgdi.h"
#include "unixlib.h"
#include "wine/debug.h"
BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
{
if (reason != DLL_PROCESS_ATTACH) return TRUE;
DisableThreadLibraryCalls( instance );
if (__wine_init_unix_call()) return FALSE;
if (X11DRV_CALL( init, NULL )) return FALSE;
return TRUE;
}
/***********************************************************************
* AttachEventQueueToTablet (winex11.@)
*/
int CDECL X11DRV_AttachEventQueueToTablet( HWND owner )
{
return X11DRV_CALL( tablet_attach_queue, owner );
}
/***********************************************************************
* GetCurrentPacket (winex11.@)
*/
int CDECL X11DRV_GetCurrentPacket( void *packet )
{
return X11DRV_CALL( tablet_get_packet, packet );
}
/***********************************************************************
* LoadTabletInfo (winex11.@)
*/
BOOL CDECL X11DRV_LoadTabletInfo( HWND hwnd )
{
return X11DRV_CALL( tablet_load_info, hwnd );
}
/***********************************************************************
* WTInfoW (winex11.@)
*/
UINT CDECL X11DRV_WTInfoW( UINT category, UINT index, void *output )
{
struct tablet_info_params params;
params.category = category;
params.index = index;
params.output = output;
return X11DRV_CALL( tablet_info, &params );
}