Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 1 | /* |
Alexandre Julliard | 6a78c16 | 2004-12-08 18:06:14 +0000 | [diff] [blame] | 2 | * USER private definitions |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright 1993 Alexandre Julliard |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library; if not, write to the Free Software |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
Alexandre Julliard | 6a78c16 | 2004-12-08 18:06:14 +0000 | [diff] [blame] | 21 | #ifndef __WINE_USER_PRIVATE_H |
| 22 | #define __WINE_USER_PRIVATE_H |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 23 | |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 24 | #include <stdarg.h> |
Alexandre Julliard | 6a78c16 | 2004-12-08 18:06:14 +0000 | [diff] [blame] | 25 | #include "windef.h" |
| 26 | #include "winbase.h" |
| 27 | #include "wingdi.h" |
| 28 | #include "winuser.h" |
Alexandre Julliard | 86be9f2 | 2005-04-27 08:18:20 +0000 | [diff] [blame] | 29 | #include "winreg.h" |
| 30 | #include "winternl.h" |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 31 | |
Eric Pouech | 294835a | 2004-12-06 20:43:55 +0000 | [diff] [blame] | 32 | #define GET_WORD(ptr) (*(const WORD *)(ptr)) |
| 33 | #define GET_DWORD(ptr) (*(const DWORD *)(ptr)) |
Alexandre Julliard | 7fbd74e | 2002-05-23 02:53:10 +0000 | [diff] [blame] | 34 | |
Francois Gouget | eab56a5 | 2006-11-09 11:24:16 +0100 | [diff] [blame] | 35 | #define WM_SYSTIMER 0x0118 |
Vincent Povirk | a274297 | 2008-08-28 14:32:41 -0500 | [diff] [blame] | 36 | #define WM_POPUPSYSTEMMENU 0x0313 |
Francois Gouget | eab56a5 | 2006-11-09 11:24:16 +0100 | [diff] [blame] | 37 | |
Alexandre Julliard | fb0ff05 | 2001-10-16 21:58:58 +0000 | [diff] [blame] | 38 | /* internal messages codes */ |
| 39 | enum wine_internal_message |
| 40 | { |
| 41 | WM_WINE_DESTROYWINDOW = 0x80000000, |
| 42 | WM_WINE_SETWINDOWPOS, |
| 43 | WM_WINE_SHOWWINDOW, |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 44 | WM_WINE_SETPARENT, |
| 45 | WM_WINE_SETWINDOWLONG, |
Alexandre Julliard | 5030bda | 2002-10-11 23:41:06 +0000 | [diff] [blame] | 46 | WM_WINE_ENABLEWINDOW, |
Alexandre Julliard | ca3ac8f | 2003-07-11 21:55:58 +0000 | [diff] [blame] | 47 | WM_WINE_SETACTIVEWINDOW, |
| 48 | WM_WINE_KEYBOARD_LL_HOOK, |
Alexandre Julliard | 97d6e7f | 2005-03-07 17:19:24 +0000 | [diff] [blame] | 49 | WM_WINE_MOUSE_LL_HOOK, |
Alexandre Julliard | 21e86f6 | 2011-03-31 20:27:29 +0200 | [diff] [blame] | 50 | WM_WINE_CLIPCURSOR, |
Alexandre Julliard | 97d6e7f | 2005-03-07 17:19:24 +0000 | [diff] [blame] | 51 | WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */ |
| 52 | WM_WINE_LAST_DRIVER_MSG = 0x80001fff |
Alexandre Julliard | fb0ff05 | 2001-10-16 21:58:58 +0000 | [diff] [blame] | 53 | }; |
Alexandre Julliard | 42d20f9 | 2000-08-10 01:16:19 +0000 | [diff] [blame] | 54 | |
Patrik Stridvall | b87fe2e | 1999-04-01 08:16:08 +0000 | [diff] [blame] | 55 | typedef struct tagUSER_DRIVER { |
Alexandre Julliard | 28c3a1b | 2000-03-20 18:21:19 +0000 | [diff] [blame] | 56 | /* keyboard functions */ |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 57 | HKL (CDECL *pActivateKeyboardLayout)(HKL, UINT); |
| 58 | void (CDECL *pBeep)(void); |
| 59 | SHORT (CDECL *pGetAsyncKeyState)(INT); |
| 60 | INT (CDECL *pGetKeyNameText)(LONG, LPWSTR, INT); |
| 61 | HKL (CDECL *pGetKeyboardLayout)(DWORD); |
| 62 | BOOL (CDECL *pGetKeyboardLayoutName)(LPWSTR); |
| 63 | HKL (CDECL *pLoadKeyboardLayout)(LPCWSTR, UINT); |
| 64 | UINT (CDECL *pMapVirtualKeyEx)(UINT, UINT, HKL); |
Vincent Povirk | 8c0d568 | 2011-06-23 12:34:26 -0500 | [diff] [blame] | 65 | BOOL (CDECL *pRegisterHotKey)(HWND, UINT, UINT); |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 66 | INT (CDECL *pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL); |
| 67 | BOOL (CDECL *pUnloadKeyboardLayout)(HKL); |
Vincent Povirk | 8c0d568 | 2011-06-23 12:34:26 -0500 | [diff] [blame] | 68 | void (CDECL *pUnregisterHotKey)(HWND, UINT, UINT); |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 69 | SHORT (CDECL *pVkKeyScanEx)(WCHAR, HKL); |
Alexandre Julliard | d676bf2 | 2010-04-20 14:10:46 +0200 | [diff] [blame] | 70 | /* cursor/icon functions */ |
Alexandre Julliard | 86c4a36 | 2010-05-21 13:30:15 +0200 | [diff] [blame] | 71 | void (CDECL *pCreateCursorIcon)(HCURSOR); |
Alexandre Julliard | d676bf2 | 2010-04-20 14:10:46 +0200 | [diff] [blame] | 72 | void (CDECL *pDestroyCursorIcon)(HCURSOR); |
Alexandre Julliard | 8ec6359 | 2010-04-20 21:14:31 +0200 | [diff] [blame] | 73 | void (CDECL *pSetCursor)(HCURSOR); |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 74 | BOOL (CDECL *pGetCursorPos)(LPPOINT); |
| 75 | BOOL (CDECL *pSetCursorPos)(INT,INT); |
| 76 | BOOL (CDECL *pClipCursor)(LPCRECT); |
Alexandre Julliard | 7f3418f | 2000-03-25 17:30:13 +0000 | [diff] [blame] | 77 | /* screen saver functions */ |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 78 | BOOL (CDECL *pGetScreenSaveActive)(void); |
| 79 | void (CDECL *pSetScreenSaveActive)(BOOL); |
Alexandre Julliard | 42d20f9 | 2000-08-10 01:16:19 +0000 | [diff] [blame] | 80 | /* clipboard functions */ |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 81 | INT (CDECL *pAcquireClipboard)(HWND); /* Acquire selection */ |
| 82 | BOOL (CDECL *pCountClipboardFormats)(void); /* Count available clipboard formats */ |
| 83 | void (CDECL *pEmptyClipboard)(BOOL); /* Empty clipboard data */ |
| 84 | void (CDECL *pEndClipboardUpdate)(void); /* End clipboard update */ |
| 85 | UINT (CDECL *pEnumClipboardFormats)(UINT); /* Enumerate clipboard formats */ |
Alexandre Julliard | 83b6654 | 2009-12-22 21:18:40 +0100 | [diff] [blame] | 86 | HANDLE (CDECL *pGetClipboardData)(UINT); /* Get specified selection data */ |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 87 | BOOL (CDECL *pIsClipboardFormatAvailable)(UINT); /* Check if specified format is available */ |
Alexandre Julliard | 83b6654 | 2009-12-22 21:18:40 +0100 | [diff] [blame] | 88 | BOOL (CDECL *pSetClipboardData)(UINT, HANDLE, BOOL); /* Set specified selection data */ |
Alex Pasadyn | 330179f | 2003-04-22 00:15:48 +0000 | [diff] [blame] | 89 | /* display modes */ |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 90 | LONG (CDECL *pChangeDisplaySettingsEx)(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID); |
| 91 | BOOL (CDECL *pEnumDisplayMonitors)(HDC,LPRECT,MONITORENUMPROC,LPARAM); |
| 92 | BOOL (CDECL *pEnumDisplaySettingsEx)(LPCWSTR,DWORD,LPDEVMODEW,DWORD); |
| 93 | BOOL (CDECL *pGetMonitorInfo)(HMONITOR,MONITORINFO*); |
Alexandre Julliard | 9ae0fe5 | 2001-04-24 23:28:52 +0000 | [diff] [blame] | 94 | /* windowing functions */ |
Maarten Lankhorst | 0a64595 | 2008-12-16 15:32:08 +0100 | [diff] [blame] | 95 | BOOL (CDECL *pCreateDesktopWindow)(HWND); |
| 96 | BOOL (CDECL *pCreateWindow)(HWND); |
| 97 | void (CDECL *pDestroyWindow)(HWND); |
| 98 | void (CDECL *pGetDC)(HDC,HWND,HWND,const RECT *,const RECT *,DWORD); |
| 99 | DWORD (CDECL *pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD); |
| 100 | void (CDECL *pReleaseDC)(HWND,HDC); |
| 101 | BOOL (CDECL *pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT); |
| 102 | void (CDECL *pSetCapture)(HWND,UINT); |
| 103 | void (CDECL *pSetFocus)(HWND); |
| 104 | void (CDECL *pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD); |
| 105 | void (CDECL *pSetParent)(HWND,HWND,HWND); |
| 106 | int (CDECL *pSetWindowRgn)(HWND,HRGN,BOOL); |
| 107 | void (CDECL *pSetWindowIcon)(HWND,UINT,HICON); |
| 108 | void (CDECL *pSetWindowStyle)(HWND,INT,STYLESTRUCT*); |
| 109 | void (CDECL *pSetWindowText)(HWND,LPCWSTR); |
| 110 | UINT (CDECL *pShowWindow)(HWND,INT,RECT*,UINT); |
| 111 | LRESULT (CDECL *pSysCommand)(HWND,WPARAM,LPARAM); |
| 112 | LRESULT (CDECL *pWindowMessage)(HWND,UINT,WPARAM,LPARAM); |
| 113 | void (CDECL *pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *); |
| 114 | void (CDECL *pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *); |
Patrik Stridvall | b87fe2e | 1999-04-01 08:16:08 +0000 | [diff] [blame] | 115 | } USER_DRIVER; |
| 116 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 117 | extern const USER_DRIVER *USER_Driver DECLSPEC_HIDDEN; |
Patrik Stridvall | b87fe2e | 1999-04-01 08:16:08 +0000 | [diff] [blame] | 118 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 119 | extern void USER_unload_driver(void) DECLSPEC_HIDDEN; |
Alexandre Julliard | 1f90b5c | 2005-08-10 09:56:23 +0000 | [diff] [blame] | 120 | |
Alexandre Julliard | 86be9f2 | 2005-04-27 08:18:20 +0000 | [diff] [blame] | 121 | struct received_message_info; |
Alexandre Julliard | 86be9f2 | 2005-04-27 08:18:20 +0000 | [diff] [blame] | 122 | |
Alexandre Julliard | d996f7e | 2009-10-12 14:27:55 +0200 | [diff] [blame] | 123 | enum user_obj_type |
| 124 | { |
| 125 | USER_WINDOW = 1, /* window */ |
Alexandre Julliard | db79a9f | 2009-10-12 14:30:34 +0200 | [diff] [blame] | 126 | USER_MENU, /* menu */ |
Alexandre Julliard | a7adbf7 | 2009-10-15 17:35:06 +0200 | [diff] [blame] | 127 | USER_ACCEL, /* accelerator */ |
Alexandre Julliard | cecb3a9 | 2009-12-22 17:16:50 +0100 | [diff] [blame] | 128 | USER_ICON, /* icon or cursor */ |
Alexandre Julliard | d996f7e | 2009-10-12 14:27:55 +0200 | [diff] [blame] | 129 | USER_DWP /* DeferWindowPos structure */ |
| 130 | }; |
| 131 | |
| 132 | struct user_object |
| 133 | { |
| 134 | HANDLE handle; |
| 135 | enum user_obj_type type; |
| 136 | }; |
| 137 | |
| 138 | #define OBJ_OTHER_PROCESS ((void *)1) /* returned by get_user_handle_ptr on unknown handles */ |
| 139 | |
| 140 | HANDLE alloc_user_handle( struct user_object *ptr, enum user_obj_type type ) DECLSPEC_HIDDEN; |
| 141 | void *get_user_handle_ptr( HANDLE handle, enum user_obj_type type ) DECLSPEC_HIDDEN; |
| 142 | void release_user_handle_ptr( void *ptr ) DECLSPEC_HIDDEN; |
| 143 | void *free_user_handle( HANDLE handle, enum user_obj_type type ) DECLSPEC_HIDDEN; |
| 144 | |
Alexandre Julliard | 82964f5 | 2007-08-08 18:25:38 +0200 | [diff] [blame] | 145 | /* type of message-sending functions that need special WM_CHAR handling */ |
| 146 | enum wm_char_mapping |
| 147 | { |
| 148 | WMCHAR_MAP_POSTMESSAGE, |
| 149 | WMCHAR_MAP_SENDMESSAGE, |
| 150 | WMCHAR_MAP_SENDMESSAGETIMEOUT, |
| 151 | WMCHAR_MAP_RECVMESSAGE, |
| 152 | WMCHAR_MAP_DISPATCHMESSAGE, |
| 153 | WMCHAR_MAP_CALLWINDOWPROC, |
| 154 | WMCHAR_MAP_COUNT, |
| 155 | WMCHAR_MAP_NOMAPPING = WMCHAR_MAP_COUNT |
| 156 | }; |
| 157 | |
| 158 | /* data to store state for A/W mappings of WM_CHAR */ |
| 159 | struct wm_char_mapping_data |
| 160 | { |
| 161 | BYTE lead_byte[WMCHAR_MAP_COUNT]; |
Alexandre Julliard | 2ce799c | 2007-08-08 20:35:24 +0200 | [diff] [blame] | 162 | MSG get_msg; |
Alexandre Julliard | 82964f5 | 2007-08-08 18:25:38 +0200 | [diff] [blame] | 163 | }; |
| 164 | |
Alexandre Julliard | 86be9f2 | 2005-04-27 08:18:20 +0000 | [diff] [blame] | 165 | /* this is the structure stored in TEB->Win32ClientInfo */ |
| 166 | /* no attempt is made to keep the layout compatible with the Windows one */ |
| 167 | struct user_thread_info |
| 168 | { |
Alexandre Julliard | 533f519 | 2006-10-05 14:04:25 +0200 | [diff] [blame] | 169 | HANDLE server_queue; /* Handle to server-side queue */ |
| 170 | DWORD recursion_count; /* SendMessage recursion counter */ |
| 171 | BOOL hook_unicode; /* Is current hook unicode? */ |
| 172 | HHOOK hook; /* Current hook */ |
| 173 | struct received_message_info *receive_info; /* Message being currently received */ |
Alexandre Julliard | 82964f5 | 2007-08-08 18:25:38 +0200 | [diff] [blame] | 174 | struct wm_char_mapping_data *wmchar_data; /* Data for WM_CHAR mappings */ |
Alexandre Julliard | 533f519 | 2006-10-05 14:04:25 +0200 | [diff] [blame] | 175 | DWORD GetMessageTimeVal; /* Value for GetMessageTime */ |
| 176 | DWORD GetMessagePosVal; /* Value for GetMessagePos */ |
| 177 | ULONG_PTR GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */ |
Alexandre Julliard | 533f519 | 2006-10-05 14:04:25 +0200 | [diff] [blame] | 178 | UINT active_hooks; /* Bitmap of active hooks */ |
Alexandre Julliard | cb3b723 | 2011-12-15 14:30:41 +0100 | [diff] [blame] | 179 | UINT key_state_time; /* Time of last key state refresh */ |
| 180 | BYTE *key_state; /* Cache of global key state */ |
Alexandre Julliard | d71303e | 2008-06-25 14:26:06 +0200 | [diff] [blame] | 181 | HWND top_window; /* Desktop window */ |
| 182 | HWND msg_window; /* HWND_MESSAGE parent window */ |
Alexandre Julliard | 533f519 | 2006-10-05 14:04:25 +0200 | [diff] [blame] | 183 | |
Alexandre Julliard | cb3b723 | 2011-12-15 14:30:41 +0100 | [diff] [blame] | 184 | ULONG pad[9]; /* Available for more data */ |
Alexandre Julliard | 86be9f2 | 2005-04-27 08:18:20 +0000 | [diff] [blame] | 185 | }; |
| 186 | |
Vitaliy Margolen | bc55b75 | 2006-10-04 21:27:09 -0600 | [diff] [blame] | 187 | struct hook_extra_info |
| 188 | { |
| 189 | HHOOK handle; |
| 190 | LPARAM lparam; |
| 191 | }; |
| 192 | |
Alexandre Julliard | 86be9f2 | 2005-04-27 08:18:20 +0000 | [diff] [blame] | 193 | static inline struct user_thread_info *get_user_thread_info(void) |
| 194 | { |
| 195 | return (struct user_thread_info *)NtCurrentTeb()->Win32ClientInfo; |
| 196 | } |
| 197 | |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 198 | /* check if hwnd is a broadcast magic handle */ |
| 199 | static inline BOOL is_broadcast( HWND hwnd ) |
| 200 | { |
| 201 | return (hwnd == HWND_BROADCAST || hwnd == HWND_TOPMOST); |
| 202 | } |
| 203 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 204 | extern HMODULE user32_module DECLSPEC_HIDDEN; |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 205 | extern HBRUSH SYSCOLOR_55AABrush DECLSPEC_HIDDEN; |
Alexandre Julliard | 18d0297 | 2002-12-03 23:34:52 +0000 | [diff] [blame] | 206 | |
Alexandre Julliard | 1642fbc | 2008-02-25 15:59:19 +0100 | [diff] [blame] | 207 | struct dce; |
| 208 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 209 | extern BOOL CLIPBOARD_ReleaseOwner(void) DECLSPEC_HIDDEN; |
| 210 | extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN; |
Marcus Meissner | 6148f78 | 2011-04-21 10:21:26 +0200 | [diff] [blame] | 211 | extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN; |
Alexandre Julliard | 1642fbc | 2008-02-25 15:59:19 +0100 | [diff] [blame] | 212 | extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN; |
| 213 | extern void invalidate_dce( HWND hwnd, const RECT *rect ) DECLSPEC_HIDDEN; |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 214 | extern void erase_now( HWND hwnd, UINT rdw_flags ) DECLSPEC_HIDDEN; |
Marcus Meissner | 6148f78 | 2011-04-21 10:21:26 +0200 | [diff] [blame] | 215 | extern void *get_hook_proc( void *proc, const WCHAR *module ) DECLSPEC_HIDDEN; |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 216 | extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN; |
| 217 | extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; |
Alexandre Julliard | ae895a1 | 2011-03-02 19:43:53 +0100 | [diff] [blame] | 218 | extern NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, UINT flags ) DECLSPEC_HIDDEN; |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 219 | extern LRESULT MSG_SendInternalMessageTimeout( DWORD dest_pid, DWORD dest_tid, |
| 220 | UINT msg, WPARAM wparam, LPARAM lparam, |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 221 | UINT flags, UINT timeout, PDWORD_PTR res_ptr ) DECLSPEC_HIDDEN; |
| 222 | extern HPEN SYSCOLOR_GetPen( INT index ) DECLSPEC_HIDDEN; |
| 223 | extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN; |
| 224 | extern void USER_CheckNotLock(void) DECLSPEC_HIDDEN; |
| 225 | extern BOOL USER_IsExitingThread( DWORD tid ) DECLSPEC_HIDDEN; |
Mike McCormack | 096524c | 2001-12-26 19:46:40 +0000 | [diff] [blame] | 226 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 227 | extern BOOL USER_SetWindowPos( WINDOWPOS * winpos ) DECLSPEC_HIDDEN; |
Pierre d'Herbemont | e5e58a6 | 2006-11-26 23:21:02 +0100 | [diff] [blame] | 228 | |
Alexandre Julliard | d00d54e | 2007-08-07 21:01:55 +0200 | [diff] [blame] | 229 | typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, |
| 230 | LRESULT *result, void *arg ); |
Alexandre Julliard | d00d54e | 2007-08-07 21:01:55 +0200 | [diff] [blame] | 231 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 232 | extern WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode ) DECLSPEC_HIDDEN; |
Alexandre Julliard | 77ab435 | 2009-12-18 12:41:59 +0100 | [diff] [blame] | 233 | extern WNDPROC WINPROC_AllocProc( WNDPROC func, BOOL unicode ) DECLSPEC_HIDDEN; |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 234 | extern BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val ) DECLSPEC_HIDDEN; |
Alexandre Julliard | d00d54e | 2007-08-07 21:01:55 +0200 | [diff] [blame] | 235 | |
| 236 | extern LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg, |
Alexandre Julliard | 82964f5 | 2007-08-08 18:25:38 +0200 | [diff] [blame] | 237 | WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg, |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 238 | enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; |
Alexandre Julliard | d00d54e | 2007-08-07 21:01:55 +0200 | [diff] [blame] | 239 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 240 | extern INT_PTR WINPROC_CallDlgProcA( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; |
| 241 | extern INT_PTR WINPROC_CallDlgProcW( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; |
Alexandre Julliard | 334ede4 | 2007-08-08 17:02:42 +0200 | [diff] [blame] | 242 | extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 243 | LRESULT *result, BOOL unicode, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN; |
Alexandre Julliard | d00d54e | 2007-08-07 21:01:55 +0200 | [diff] [blame] | 244 | |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 245 | /* message spy definitions */ |
| 246 | |
Alexandre Julliard | b63d0e1 | 2009-12-23 19:45:03 +0100 | [diff] [blame] | 247 | #define SPY_DISPATCHMESSAGE 0x0100 |
| 248 | #define SPY_SENDMESSAGE 0x0101 |
| 249 | #define SPY_DEFWNDPROC 0x0102 |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 250 | |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 251 | #define SPY_RESULT_OK 0x0001 |
Alexandre Julliard | a0f9da1 | 2009-12-22 14:50:58 +0100 | [diff] [blame] | 252 | #define SPY_RESULT_DEFWND 0x0002 |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 253 | |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 254 | extern const char *SPY_GetClassLongOffsetName( INT offset ) DECLSPEC_HIDDEN; |
| 255 | extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ) DECLSPEC_HIDDEN; |
| 256 | extern const char *SPY_GetVKeyName(WPARAM wParam) DECLSPEC_HIDDEN; |
| 257 | extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 258 | extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg, |
Alexandre Julliard | c57b505 | 2007-11-07 18:05:49 +0100 | [diff] [blame] | 259 | LRESULT lReturn, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; |
| 260 | extern int SPY_Init(void) DECLSPEC_HIDDEN; |
Alexandre Julliard | 6b4c02e | 2005-04-27 10:23:24 +0000 | [diff] [blame] | 261 | |
Alexandre Julliard | dac1976 | 2005-07-20 10:31:37 +0000 | [diff] [blame] | 262 | #include "pshpack1.h" |
| 263 | |
| 264 | typedef struct |
| 265 | { |
| 266 | BYTE bWidth; |
| 267 | BYTE bHeight; |
| 268 | BYTE bColorCount; |
| 269 | BYTE bReserved; |
| 270 | } ICONRESDIR; |
| 271 | |
| 272 | typedef struct |
| 273 | { |
| 274 | WORD wWidth; |
| 275 | WORD wHeight; |
| 276 | } CURSORDIR; |
| 277 | |
| 278 | typedef struct |
| 279 | { union |
| 280 | { ICONRESDIR icon; |
| 281 | CURSORDIR cursor; |
| 282 | } ResInfo; |
| 283 | WORD wPlanes; |
| 284 | WORD wBitCount; |
| 285 | DWORD dwBytesInRes; |
| 286 | WORD wResId; |
| 287 | } CURSORICONDIRENTRY; |
| 288 | |
| 289 | typedef struct |
| 290 | { |
| 291 | WORD idReserved; |
| 292 | WORD idType; |
| 293 | WORD idCount; |
| 294 | CURSORICONDIRENTRY idEntries[1]; |
| 295 | } CURSORICONDIR; |
| 296 | |
| 297 | #include "poppack.h" |
| 298 | |
Alexandre Julliard | 62ac036 | 2009-10-15 19:44:45 +0200 | [diff] [blame] | 299 | extern BOOL get_icon_size( HICON handle, SIZE *size ) DECLSPEC_HIDDEN; |
Alexandre Julliard | dac1976 | 2005-07-20 10:31:37 +0000 | [diff] [blame] | 300 | |
Alexandre Julliard | 031c73a | 2009-06-08 16:45:54 +0200 | [diff] [blame] | 301 | /* Mingw's assert() imports MessageBoxA and gets confused by user32 exporting it */ |
| 302 | #ifdef __MINGW32__ |
| 303 | #undef assert |
| 304 | #define assert(expr) ((void)0) |
| 305 | #endif |
| 306 | |
Alexandre Julliard | 6a78c16 | 2004-12-08 18:06:14 +0000 | [diff] [blame] | 307 | #endif /* __WINE_USER_PRIVATE_H */ |