1993-09-04 12:09:32 +02:00
|
|
|
/*
|
2004-12-08 19:06:14 +01:00
|
|
|
* USER private definitions
|
1993-09-04 12:09:32 +02:00
|
|
|
*
|
|
|
|
* Copyright 1993 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
|
|
|
|
2004-12-08 19:06:14 +01:00
|
|
|
#ifndef __WINE_USER_PRIVATE_H
|
|
|
|
#define __WINE_USER_PRIVATE_H
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2004-12-08 19:06:14 +01:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
2022-02-15 13:15:27 +01:00
|
|
|
#include "../win32u/ntuser_private.h"
|
2005-04-27 10:18:20 +02:00
|
|
|
#include "winreg.h"
|
|
|
|
#include "winternl.h"
|
2021-05-28 16:12:19 +02:00
|
|
|
#include "hidusage.h"
|
2021-11-11 14:12:44 +01:00
|
|
|
#include "wine/gdi_driver.h"
|
2018-08-20 22:24:41 +02:00
|
|
|
#include "wine/heap.h"
|
1995-03-19 18:39:39 +01:00
|
|
|
|
2004-12-06 21:43:55 +01:00
|
|
|
#define GET_WORD(ptr) (*(const WORD *)(ptr))
|
|
|
|
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
|
2019-01-24 09:52:01 +01:00
|
|
|
#define GET_LONG(ptr) (*(const LONG *)(ptr))
|
2002-05-23 04:53:10 +02:00
|
|
|
|
2012-10-17 23:08:03 +02:00
|
|
|
#define WINE_MOUSE_HANDLE ((HANDLE)1)
|
|
|
|
#define WINE_KEYBOARD_HANDLE ((HANDLE)2)
|
|
|
|
|
2012-09-06 12:32:52 +02:00
|
|
|
struct window_surface;
|
|
|
|
|
2021-11-11 14:12:44 +01:00
|
|
|
extern const struct user_driver_funcs *USER_Driver DECLSPEC_HIDDEN;
|
1999-04-01 10:16:08 +02:00
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern void USER_unload_driver(void) DECLSPEC_HIDDEN;
|
2005-08-10 11:56:23 +02:00
|
|
|
|
2005-04-27 10:18:20 +02:00
|
|
|
struct received_message_info;
|
|
|
|
|
2007-08-08 18:25:38 +02:00
|
|
|
/* data to store state for A/W mappings of WM_CHAR */
|
|
|
|
struct wm_char_mapping_data
|
|
|
|
{
|
|
|
|
BYTE lead_byte[WMCHAR_MAP_COUNT];
|
2007-08-08 20:35:24 +02:00
|
|
|
MSG get_msg;
|
2007-08-08 18:25:38 +02:00
|
|
|
};
|
|
|
|
|
2020-06-25 19:08:42 +02:00
|
|
|
/* on windows the buffer capacity is quite large as well, enough to */
|
|
|
|
/* hold up to 10s of 1kHz mouse rawinput events */
|
|
|
|
#define RAWINPUT_BUFFER_SIZE (512*1024)
|
|
|
|
|
2020-07-06 12:04:50 +02:00
|
|
|
struct rawinput_thread_data
|
|
|
|
{
|
|
|
|
UINT hw_id; /* current rawinput message id */
|
|
|
|
RAWINPUT buffer[1]; /* rawinput message data buffer */
|
|
|
|
};
|
|
|
|
|
2016-08-23 15:13:27 +02:00
|
|
|
extern BOOL (WINAPI *imm_register_window)(HWND) DECLSPEC_HIDDEN;
|
|
|
|
extern void (WINAPI *imm_unregister_window)(HWND) DECLSPEC_HIDDEN;
|
2015-04-07 02:53:06 +02:00
|
|
|
|
2005-04-27 10:18:20 +02:00
|
|
|
static inline struct user_thread_info *get_user_thread_info(void)
|
|
|
|
{
|
|
|
|
return (struct user_thread_info *)NtCurrentTeb()->Win32ClientInfo;
|
|
|
|
}
|
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern HMODULE user32_module DECLSPEC_HIDDEN;
|
2002-12-04 00:34:52 +01:00
|
|
|
|
2008-02-25 15:59:19 +01:00
|
|
|
struct dce;
|
2012-08-29 18:13:57 +02:00
|
|
|
struct tagWND;
|
2008-02-25 15:59:19 +01:00
|
|
|
|
2020-06-25 19:08:41 +02:00
|
|
|
struct hardware_msg_data;
|
|
|
|
extern BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_msg_data *msg_data);
|
2021-05-28 16:12:19 +02:00
|
|
|
extern BOOL rawinput_device_get_usages(HANDLE handle, USAGE *usage_page, USAGE *usage);
|
2020-07-06 12:04:50 +02:00
|
|
|
extern struct rawinput_thread_data *rawinput_thread_data(void);
|
2021-12-14 21:24:22 +01:00
|
|
|
extern void rawinput_update_device_list(void);
|
2020-06-25 19:08:41 +02:00
|
|
|
|
2022-03-31 15:36:39 +02:00
|
|
|
extern BOOL process_hardware_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data,
|
|
|
|
HWND hwnd_filter, UINT first, UINT last, BOOL remove ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
|
|
|
void **buffer, size_t size ) DECLSPEC_HIDDEN;
|
2021-05-06 12:03:14 +02:00
|
|
|
|
2015-06-03 11:46:01 +02:00
|
|
|
extern void CLIPBOARD_ReleaseOwner( HWND hwnd ) DECLSPEC_HIDDEN;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN;
|
2011-04-21 10:21:26 +02:00
|
|
|
extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN;
|
2018-01-23 12:30:22 +01:00
|
|
|
extern HDC get_display_dc(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void release_display_dc( HDC hdc ) DECLSPEC_HIDDEN;
|
2021-05-13 12:35:38 +02:00
|
|
|
extern void wait_graphics_driver_ready(void) DECLSPEC_HIDDEN;
|
2014-06-13 20:35:41 +02:00
|
|
|
extern void *get_hook_proc( void *proc, const WCHAR *module, HMODULE *free_module ) DECLSPEC_HIDDEN;
|
2012-09-05 19:28:50 +02:00
|
|
|
extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN;
|
2021-05-18 11:11:25 +02:00
|
|
|
extern RECT get_primary_monitor_rect(void) DECLSPEC_HIDDEN;
|
2013-05-21 13:51:21 +02:00
|
|
|
extern DWORD get_input_codepage( void ) DECLSPEC_HIDDEN;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN;
|
2021-04-09 13:11:33 +02:00
|
|
|
extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput, UINT flags ) DECLSPEC_HIDDEN;
|
2022-02-25 16:02:12 +01:00
|
|
|
extern LRESULT WINAPI MSG_SendInternalMessageTimeout( DWORD dest_pid, DWORD dest_tid,
|
|
|
|
UINT msg, WPARAM wparam, LPARAM lparam,
|
|
|
|
UINT flags, UINT timeout, PDWORD_PTR res_ptr ) DECLSPEC_HIDDEN;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern HPEN SYSCOLOR_GetPen( INT index ) DECLSPEC_HIDDEN;
|
2013-10-16 16:07:53 +02:00
|
|
|
extern HBRUSH SYSCOLOR_Get55AABrush(void) DECLSPEC_HIDDEN;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void USER_CheckNotLock(void) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL USER_IsExitingThread( DWORD tid ) DECLSPEC_HIDDEN;
|
2001-12-26 20:46:40 +01:00
|
|
|
|
2007-08-07 21:01:55 +02:00
|
|
|
typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
|
|
|
|
LRESULT *result, void *arg );
|
|
|
|
|
|
|
|
extern LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
|
2007-08-08 18:25:38 +02:00
|
|
|
WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg,
|
2007-11-07 18:05:49 +01:00
|
|
|
enum wm_char_mapping mapping ) DECLSPEC_HIDDEN;
|
2007-08-07 21:01:55 +02:00
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern INT_PTR WINPROC_CallDlgProcA( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
|
|
|
extern INT_PTR WINPROC_CallDlgProcW( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
2022-03-04 14:27:58 +01:00
|
|
|
extern void winproc_init(void) DECLSPEC_HIDDEN;
|
2022-03-23 14:02:09 +01:00
|
|
|
extern void get_winproc_params( struct win_proc_params *params ) DECLSPEC_HIDDEN;
|
2007-08-07 21:01:55 +02:00
|
|
|
|
2022-03-07 14:41:23 +01:00
|
|
|
extern ATOM get_class_info( HINSTANCE instance, const WCHAR *name, WNDCLASSEXW *info,
|
|
|
|
UNICODE_STRING *name_str, BOOL ansi ) DECLSPEC_HIDDEN;
|
2018-01-31 11:15:41 +01:00
|
|
|
|
2021-12-02 01:13:55 +01:00
|
|
|
/* kernel callbacks */
|
|
|
|
|
|
|
|
BOOL WINAPI User32CallEnumDisplayMonitor( struct enum_display_monitor_params *params, ULONG size );
|
2022-03-31 15:36:39 +02:00
|
|
|
BOOL WINAPI User32CallSendAsyncCallback( const struct send_async_params *params, ULONG size );
|
2022-02-25 16:02:12 +01:00
|
|
|
BOOL WINAPI User32CallWinEventHook( const struct win_event_hook_params *params, ULONG size );
|
2022-03-23 14:01:18 +01:00
|
|
|
BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size );
|
2022-02-25 16:02:12 +01:00
|
|
|
BOOL WINAPI User32CallWindowsHook( const struct win_hook_params *params, ULONG size );
|
2021-12-02 01:13:55 +01:00
|
|
|
|
2005-04-27 12:23:24 +02:00
|
|
|
/* message spy definitions */
|
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ) DECLSPEC_HIDDEN;
|
|
|
|
extern const char *SPY_GetVKeyName(WPARAM wParam) DECLSPEC_HIDDEN;
|
|
|
|
extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
2005-04-27 12:23:24 +02:00
|
|
|
extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg,
|
2007-11-07 18:05:49 +01:00
|
|
|
LRESULT lReturn, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
2005-04-27 12:23:24 +02:00
|
|
|
|
2005-07-20 12:31:37 +02:00
|
|
|
#include "pshpack1.h"
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
BYTE bWidth;
|
|
|
|
BYTE bHeight;
|
|
|
|
BYTE bColorCount;
|
|
|
|
BYTE bReserved;
|
|
|
|
} ICONRESDIR;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
WORD wWidth;
|
|
|
|
WORD wHeight;
|
|
|
|
} CURSORDIR;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{ union
|
|
|
|
{ ICONRESDIR icon;
|
|
|
|
CURSORDIR cursor;
|
|
|
|
} ResInfo;
|
|
|
|
WORD wPlanes;
|
|
|
|
WORD wBitCount;
|
|
|
|
DWORD dwBytesInRes;
|
|
|
|
WORD wResId;
|
|
|
|
} CURSORICONDIRENTRY;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
WORD idReserved;
|
|
|
|
WORD idType;
|
|
|
|
WORD idCount;
|
|
|
|
CURSORICONDIRENTRY idEntries[1];
|
|
|
|
} CURSORICONDIR;
|
|
|
|
|
2016-04-29 21:00:34 +02:00
|
|
|
typedef struct {
|
|
|
|
BYTE bWidth;
|
|
|
|
BYTE bHeight;
|
|
|
|
BYTE bColorCount;
|
|
|
|
BYTE bReserved;
|
|
|
|
WORD xHotspot;
|
|
|
|
WORD yHotspot;
|
|
|
|
DWORD dwDIBSize;
|
|
|
|
DWORD dwDIBOffset;
|
|
|
|
} CURSORICONFILEDIRENTRY;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
WORD idReserved;
|
|
|
|
WORD idType;
|
|
|
|
WORD idCount;
|
|
|
|
CURSORICONFILEDIRENTRY idEntries[1];
|
|
|
|
} CURSORICONFILEDIR;
|
|
|
|
|
2005-07-20 12:31:37 +02:00
|
|
|
#include "poppack.h"
|
|
|
|
|
2016-09-07 04:35:02 +02:00
|
|
|
extern int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) DECLSPEC_HIDDEN;
|
2009-10-15 19:44:45 +02:00
|
|
|
extern BOOL get_icon_size( HICON handle, SIZE *size ) DECLSPEC_HIDDEN;
|
2005-07-20 12:31:37 +02:00
|
|
|
|
2021-07-20 15:04:14 +02:00
|
|
|
extern struct user_api_hook *user_api DECLSPEC_HIDDEN;
|
2022-01-24 08:47:07 +01:00
|
|
|
LRESULT WINAPI USER_DefDlgProc(HWND, UINT, WPARAM, LPARAM, BOOL) DECLSPEC_HIDDEN;
|
2021-07-20 15:04:14 +02:00
|
|
|
LRESULT WINAPI USER_ScrollBarProc(HWND, UINT, WPARAM, LPARAM, BOOL) DECLSPEC_HIDDEN;
|
2021-07-20 15:04:33 +02:00
|
|
|
void WINAPI USER_ScrollBarDraw(HWND, HDC, INT, enum SCROLL_HITTEST,
|
|
|
|
const struct SCROLL_TRACKING_INFO *, BOOL, BOOL, RECT *, INT, INT,
|
|
|
|
INT, BOOL) DECLSPEC_HIDDEN;
|
2022-03-14 11:44:10 +01:00
|
|
|
void WINAPI SCROLL_SetStandardScrollPainted(HWND hwnd, INT bar, BOOL visible);
|
2021-07-20 15:04:14 +02:00
|
|
|
|
2004-12-08 19:06:14 +01:00
|
|
|
#endif /* __WINE_USER_PRIVATE_H */
|