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"
|
|
|
|
#include "winuser.h"
|
2005-04-27 10:18:20 +02:00
|
|
|
#include "winreg.h"
|
|
|
|
#include "winternl.h"
|
2018-08-20 22:24:41 +02:00
|
|
|
#include "wine/heap.h"
|
|
|
|
#include "wine/unicode.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
|
|
|
|
2006-11-09 11:24:16 +01:00
|
|
|
#define WM_SYSTIMER 0x0118
|
2008-08-28 21:32:41 +02:00
|
|
|
#define WM_POPUPSYSTEMMENU 0x0313
|
2006-11-09 11:24:16 +01: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;
|
|
|
|
|
2001-10-16 23:58:58 +02:00
|
|
|
/* internal messages codes */
|
|
|
|
enum wine_internal_message
|
|
|
|
{
|
|
|
|
WM_WINE_DESTROYWINDOW = 0x80000000,
|
|
|
|
WM_WINE_SETWINDOWPOS,
|
|
|
|
WM_WINE_SHOWWINDOW,
|
2001-10-22 21:08:33 +02:00
|
|
|
WM_WINE_SETPARENT,
|
|
|
|
WM_WINE_SETWINDOWLONG,
|
2017-04-07 21:17:08 +02:00
|
|
|
WM_WINE_SETSTYLE,
|
2003-07-11 23:55:58 +02:00
|
|
|
WM_WINE_SETACTIVEWINDOW,
|
|
|
|
WM_WINE_KEYBOARD_LL_HOOK,
|
2005-03-07 18:19:24 +01:00
|
|
|
WM_WINE_MOUSE_LL_HOOK,
|
2011-03-31 20:27:29 +02:00
|
|
|
WM_WINE_CLIPCURSOR,
|
2005-03-07 18:19:24 +01:00
|
|
|
WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */
|
|
|
|
WM_WINE_LAST_DRIVER_MSG = 0x80001fff
|
2001-10-16 23:58:58 +02:00
|
|
|
};
|
2000-08-10 03:16:19 +02:00
|
|
|
|
1999-04-01 10:16:08 +02:00
|
|
|
typedef struct tagUSER_DRIVER {
|
2000-03-20 19:21:19 +01:00
|
|
|
/* keyboard functions */
|
2008-12-16 15:32:08 +01:00
|
|
|
HKL (CDECL *pActivateKeyboardLayout)(HKL, UINT);
|
|
|
|
void (CDECL *pBeep)(void);
|
|
|
|
INT (CDECL *pGetKeyNameText)(LONG, LPWSTR, INT);
|
|
|
|
HKL (CDECL *pGetKeyboardLayout)(DWORD);
|
2013-11-20 16:30:33 +01:00
|
|
|
UINT (CDECL *pGetKeyboardLayoutList)(INT, HKL *);
|
2008-12-16 15:32:08 +01:00
|
|
|
BOOL (CDECL *pGetKeyboardLayoutName)(LPWSTR);
|
|
|
|
HKL (CDECL *pLoadKeyboardLayout)(LPCWSTR, UINT);
|
|
|
|
UINT (CDECL *pMapVirtualKeyEx)(UINT, UINT, HKL);
|
2011-06-23 19:34:26 +02:00
|
|
|
BOOL (CDECL *pRegisterHotKey)(HWND, UINT, UINT);
|
2008-12-16 15:32:08 +01:00
|
|
|
INT (CDECL *pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL);
|
|
|
|
BOOL (CDECL *pUnloadKeyboardLayout)(HKL);
|
2011-06-23 19:34:26 +02:00
|
|
|
void (CDECL *pUnregisterHotKey)(HWND, UINT, UINT);
|
2008-12-16 15:32:08 +01:00
|
|
|
SHORT (CDECL *pVkKeyScanEx)(WCHAR, HKL);
|
2010-04-20 14:10:46 +02:00
|
|
|
/* cursor/icon functions */
|
|
|
|
void (CDECL *pDestroyCursorIcon)(HCURSOR);
|
2010-04-20 21:14:31 +02:00
|
|
|
void (CDECL *pSetCursor)(HCURSOR);
|
2008-12-16 15:32:08 +01:00
|
|
|
BOOL (CDECL *pGetCursorPos)(LPPOINT);
|
|
|
|
BOOL (CDECL *pSetCursorPos)(INT,INT);
|
|
|
|
BOOL (CDECL *pClipCursor)(LPCRECT);
|
2000-08-10 03:16:19 +02:00
|
|
|
/* clipboard functions */
|
2016-09-23 07:07:08 +02:00
|
|
|
void (CDECL *pUpdateClipboard)(void);
|
2003-04-22 02:15:48 +02:00
|
|
|
/* display modes */
|
2008-12-16 15:32:08 +01:00
|
|
|
LONG (CDECL *pChangeDisplaySettingsEx)(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
|
|
|
|
BOOL (CDECL *pEnumDisplayMonitors)(HDC,LPRECT,MONITORENUMPROC,LPARAM);
|
|
|
|
BOOL (CDECL *pEnumDisplaySettingsEx)(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
|
|
|
|
BOOL (CDECL *pGetMonitorInfo)(HMONITOR,MONITORINFO*);
|
2001-04-25 01:28:52 +02:00
|
|
|
/* windowing functions */
|
2008-12-16 15:32:08 +01:00
|
|
|
BOOL (CDECL *pCreateDesktopWindow)(HWND);
|
|
|
|
BOOL (CDECL *pCreateWindow)(HWND);
|
|
|
|
void (CDECL *pDestroyWindow)(HWND);
|
2015-10-13 07:51:42 +02:00
|
|
|
void (CDECL *pFlashWindowEx)(FLASHWINFO*);
|
2008-12-16 15:32:08 +01:00
|
|
|
void (CDECL *pGetDC)(HDC,HWND,HWND,const RECT *,const RECT *,DWORD);
|
|
|
|
DWORD (CDECL *pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
|
|
|
|
void (CDECL *pReleaseDC)(HWND,HDC);
|
2013-04-19 12:27:59 +02:00
|
|
|
BOOL (CDECL *pScrollDC)(HDC,INT,INT,HRGN);
|
2008-12-16 15:32:08 +01:00
|
|
|
void (CDECL *pSetCapture)(HWND,UINT);
|
|
|
|
void (CDECL *pSetFocus)(HWND);
|
|
|
|
void (CDECL *pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
|
|
|
|
void (CDECL *pSetParent)(HWND,HWND,HWND);
|
2014-05-01 12:31:14 +02:00
|
|
|
void (CDECL *pSetWindowRgn)(HWND,HRGN,BOOL);
|
2008-12-16 15:32:08 +01:00
|
|
|
void (CDECL *pSetWindowIcon)(HWND,UINT,HICON);
|
|
|
|
void (CDECL *pSetWindowStyle)(HWND,INT,STYLESTRUCT*);
|
|
|
|
void (CDECL *pSetWindowText)(HWND,LPCWSTR);
|
|
|
|
UINT (CDECL *pShowWindow)(HWND,INT,RECT*,UINT);
|
|
|
|
LRESULT (CDECL *pSysCommand)(HWND,WPARAM,LPARAM);
|
2012-09-27 18:13:01 +02:00
|
|
|
BOOL (CDECL *pUpdateLayeredWindow)(HWND,const UPDATELAYEREDWINDOWINFO *,const RECT *);
|
2008-12-16 15:32:08 +01:00
|
|
|
LRESULT (CDECL *pWindowMessage)(HWND,UINT,WPARAM,LPARAM);
|
2012-09-06 12:32:52 +02:00
|
|
|
void (CDECL *pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *,struct window_surface**);
|
|
|
|
void (CDECL *pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *,struct window_surface*);
|
2012-11-15 17:38:21 +01:00
|
|
|
/* system parameters */
|
|
|
|
BOOL (CDECL *pSystemParametersInfo)(UINT,UINT,void*,UINT);
|
2016-08-25 14:33:45 +02:00
|
|
|
/* thread management */
|
|
|
|
void (CDECL *pThreadDetach)(void);
|
1999-04-01 10:16:08 +02:00
|
|
|
} USER_DRIVER;
|
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern const USER_DRIVER *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
|
|
|
|
2019-06-25 10:38:38 +02:00
|
|
|
extern BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp ) DECLSPEC_HIDDEN;
|
2019-06-25 10:39:01 +02:00
|
|
|
extern BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, MONITORINFO *info ) DECLSPEC_HIDDEN;
|
2019-06-25 10:38:38 +02:00
|
|
|
|
2005-04-27 10:18:20 +02:00
|
|
|
struct received_message_info;
|
|
|
|
|
2009-10-12 14:27:55 +02:00
|
|
|
enum user_obj_type
|
|
|
|
{
|
|
|
|
USER_WINDOW = 1, /* window */
|
2009-10-12 14:30:34 +02:00
|
|
|
USER_MENU, /* menu */
|
2009-10-15 17:35:06 +02:00
|
|
|
USER_ACCEL, /* accelerator */
|
2009-12-22 17:16:50 +01:00
|
|
|
USER_ICON, /* icon or cursor */
|
2009-10-12 14:27:55 +02:00
|
|
|
USER_DWP /* DeferWindowPos structure */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct user_object
|
|
|
|
{
|
|
|
|
HANDLE handle;
|
|
|
|
enum user_obj_type type;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define OBJ_OTHER_PROCESS ((void *)1) /* returned by get_user_handle_ptr on unknown handles */
|
|
|
|
|
|
|
|
HANDLE alloc_user_handle( struct user_object *ptr, enum user_obj_type type ) DECLSPEC_HIDDEN;
|
|
|
|
void *get_user_handle_ptr( HANDLE handle, enum user_obj_type type ) DECLSPEC_HIDDEN;
|
|
|
|
void release_user_handle_ptr( void *ptr ) DECLSPEC_HIDDEN;
|
|
|
|
void *free_user_handle( HANDLE handle, enum user_obj_type type ) DECLSPEC_HIDDEN;
|
|
|
|
|
2007-08-08 18:25:38 +02:00
|
|
|
/* type of message-sending functions that need special WM_CHAR handling */
|
|
|
|
enum wm_char_mapping
|
|
|
|
{
|
|
|
|
WMCHAR_MAP_POSTMESSAGE,
|
|
|
|
WMCHAR_MAP_SENDMESSAGE,
|
|
|
|
WMCHAR_MAP_SENDMESSAGETIMEOUT,
|
|
|
|
WMCHAR_MAP_RECVMESSAGE,
|
|
|
|
WMCHAR_MAP_DISPATCHMESSAGE,
|
|
|
|
WMCHAR_MAP_CALLWINDOWPROC,
|
|
|
|
WMCHAR_MAP_COUNT,
|
|
|
|
WMCHAR_MAP_NOMAPPING = WMCHAR_MAP_COUNT
|
|
|
|
};
|
|
|
|
|
|
|
|
/* 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
|
|
|
};
|
|
|
|
|
2005-04-27 10:18:20 +02:00
|
|
|
/* this is the structure stored in TEB->Win32ClientInfo */
|
|
|
|
/* no attempt is made to keep the layout compatible with the Windows one */
|
|
|
|
struct user_thread_info
|
|
|
|
{
|
2006-10-05 14:04:25 +02:00
|
|
|
HANDLE server_queue; /* Handle to server-side queue */
|
2014-04-10 16:29:18 +02:00
|
|
|
DWORD wake_mask; /* Current queue wake mask */
|
|
|
|
DWORD changed_mask; /* Current queue changed mask */
|
2012-12-12 20:17:21 +01:00
|
|
|
WORD recursion_count; /* SendMessage recursion counter */
|
|
|
|
WORD message_count; /* Get/PeekMessage loop counter */
|
2015-06-26 19:37:41 +02:00
|
|
|
WORD hook_call_depth; /* Number of recursively called hook procs */
|
2018-11-05 13:01:08 +01:00
|
|
|
WORD hook_unicode; /* Is current hook unicode? */
|
2006-10-05 14:04:25 +02:00
|
|
|
HHOOK hook; /* Current hook */
|
2018-11-05 13:01:08 +01:00
|
|
|
UINT active_hooks; /* Bitmap of active hooks */
|
|
|
|
DPI_AWARENESS dpi_awareness; /* DPI awareness */
|
|
|
|
INPUT_MESSAGE_SOURCE msg_source; /* Message source for current message */
|
2006-10-05 14:04:25 +02:00
|
|
|
struct received_message_info *receive_info; /* Message being currently received */
|
2007-08-08 18:25:38 +02:00
|
|
|
struct wm_char_mapping_data *wmchar_data; /* Data for WM_CHAR mappings */
|
2006-10-05 14:04:25 +02:00
|
|
|
DWORD GetMessageTimeVal; /* Value for GetMessageTime */
|
|
|
|
DWORD GetMessagePosVal; /* Value for GetMessagePos */
|
|
|
|
ULONG_PTR GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
|
2015-04-07 02:33:28 +02:00
|
|
|
struct user_key_state_info *key_state; /* Cache of global key state */
|
2008-06-25 14:26:06 +02:00
|
|
|
HWND top_window; /* Desktop window */
|
|
|
|
HWND msg_window; /* HWND_MESSAGE parent window */
|
2012-09-11 00:27:04 +02:00
|
|
|
RAWINPUT *rawinput;
|
2005-04-27 10:18:20 +02:00
|
|
|
};
|
|
|
|
|
2015-03-23 14:12:38 +01:00
|
|
|
C_ASSERT( sizeof(struct user_thread_info) <= sizeof(((TEB *)0)->Win32ClientInfo) );
|
|
|
|
|
2015-04-07 02:53:06 +02:00
|
|
|
extern INT global_key_state_counter DECLSPEC_HIDDEN;
|
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
|
|
|
|
2015-04-07 02:33:28 +02:00
|
|
|
struct user_key_state_info
|
|
|
|
{
|
|
|
|
UINT time; /* Time of last key state refresh */
|
2015-04-07 02:53:06 +02:00
|
|
|
INT counter; /* Counter to invalidate the key state */
|
2015-04-07 02:33:28 +02:00
|
|
|
BYTE state[256]; /* State for each key */
|
|
|
|
};
|
|
|
|
|
2006-10-05 05:27:09 +02:00
|
|
|
struct hook_extra_info
|
|
|
|
{
|
|
|
|
HHOOK handle;
|
|
|
|
LPARAM lparam;
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2005-04-27 12:23:24 +02:00
|
|
|
/* check if hwnd is a broadcast magic handle */
|
|
|
|
static inline BOOL is_broadcast( HWND hwnd )
|
|
|
|
{
|
|
|
|
return (hwnd == HWND_BROADCAST || hwnd == HWND_TOPMOST);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
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;
|
2008-02-25 15:59:19 +01:00
|
|
|
extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN;
|
2012-08-29 18:13:57 +02:00
|
|
|
extern void invalidate_dce( struct tagWND *win, const RECT *rect ) 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;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern void erase_now( HWND hwnd, UINT rdw_flags ) DECLSPEC_HIDDEN;
|
2012-09-06 12:32:52 +02: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,
|
2017-07-13 11:03:44 +02:00
|
|
|
const RECT *window_rect, const RECT *valid_rects ) DECLSPEC_HIDDEN;
|
2017-07-13 11:04:52 +02:00
|
|
|
extern void move_window_bits_parent( HWND hwnd, HWND parent, const RECT *window_rect,
|
|
|
|
const RECT *valid_rects ) 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;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) 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;
|
2011-03-02 19:43:53 +01:00
|
|
|
extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags ) DECLSPEC_HIDDEN;
|
2005-04-27 12:23:24 +02:00
|
|
|
extern LRESULT MSG_SendInternalMessageTimeout( DWORD dest_pid, DWORD dest_tid,
|
|
|
|
UINT msg, WPARAM wparam, LPARAM lparam,
|
2007-11-07 18:05:49 +01:00
|
|
|
UINT flags, UINT timeout, PDWORD_PTR res_ptr ) DECLSPEC_HIDDEN;
|
|
|
|
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
|
|
|
|
2018-05-07 12:00:17 +02:00
|
|
|
extern BOOL USER_SetWindowPos( WINDOWPOS * winpos, int parent_x, int parent_y ) DECLSPEC_HIDDEN;
|
2006-11-26 23:21:02 +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 );
|
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode ) DECLSPEC_HIDDEN;
|
2009-12-18 12:41:59 +01:00
|
|
|
extern WNDPROC WINPROC_AllocProc( WNDPROC func, BOOL unicode ) DECLSPEC_HIDDEN;
|
2007-11-07 18:05:49 +01:00
|
|
|
extern BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val ) DECLSPEC_HIDDEN;
|
2007-08-07 21:01:55 +02:00
|
|
|
|
|
|
|
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;
|
2007-08-08 17:02:42 +02:00
|
|
|
extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
2007-11-07 18:05:49 +01:00
|
|
|
LRESULT *result, BOOL unicode, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN;
|
2007-08-07 21:01:55 +02:00
|
|
|
|
2018-03-20 08:44:01 +01:00
|
|
|
extern const WCHAR *CLASS_GetVersionedName(const WCHAR *classname, UINT *basename_offset,
|
2018-08-27 08:14:11 +02:00
|
|
|
WCHAR *combined, BOOL register_class) DECLSPEC_HIDDEN;
|
2018-01-31 11:15:41 +01:00
|
|
|
|
2005-04-27 12:23:24 +02:00
|
|
|
/* message spy definitions */
|
|
|
|
|
2009-12-23 19:45:03 +01:00
|
|
|
#define SPY_DISPATCHMESSAGE 0x0100
|
|
|
|
#define SPY_SENDMESSAGE 0x0101
|
|
|
|
#define SPY_DEFWNDPROC 0x0102
|
2005-04-27 12:23:24 +02:00
|
|
|
|
|
|
|
#define SPY_RESULT_OK 0x0001
|
2009-12-22 14:50:58 +01:00
|
|
|
#define SPY_RESULT_DEFWND 0x0002
|
2005-04-27 12:23:24 +02:00
|
|
|
|
2007-11-07 18:05:49 +01:00
|
|
|
extern const char *SPY_GetClassLongOffsetName( INT offset ) DECLSPEC_HIDDEN;
|
|
|
|
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
|
|
|
|
2009-06-08 16:45:54 +02:00
|
|
|
/* Mingw's assert() imports MessageBoxA and gets confused by user32 exporting it */
|
|
|
|
#ifdef __MINGW32__
|
|
|
|
#undef assert
|
|
|
|
#define assert(expr) ((void)0)
|
|
|
|
#endif
|
|
|
|
|
2018-08-20 22:24:41 +02:00
|
|
|
static inline WCHAR *heap_strdupW(const WCHAR *src)
|
|
|
|
{
|
|
|
|
WCHAR *dst;
|
|
|
|
unsigned len;
|
|
|
|
if (!src) return NULL;
|
|
|
|
len = (strlenW(src) + 1) * sizeof(WCHAR);
|
|
|
|
if ((dst = heap_alloc(len))) memcpy(dst, src, len);
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
2004-12-08 19:06:14 +01:00
|
|
|
#endif /* __WINE_USER_PRIVATE_H */
|