2 * USER private definitions
4 * Copyright 1993 Alexandre Julliard
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.
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.
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
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_USER_PRIVATE_H
22 #define __WINE_USER_PRIVATE_H
31 #include "wine/heap.h"
33 #define GET_WORD(ptr) (*(const WORD *)(ptr))
34 #define GET_DWORD(ptr) (*(const DWORD *)(ptr))
35 #define GET_LONG(ptr) (*(const LONG *)(ptr))
37 #define WINPROC_PROC16 ((void *)1) /* placeholder for 16-bit window procs */
39 /* data to store state for A/W mappings of WM_CHAR */
40 struct wm_char_mapping_data
42 BYTE lead_byte
[WMCHAR_MAP_COUNT
];
46 extern HMODULE user32_module DECLSPEC_HIDDEN
;
48 extern BOOL
post_dde_message( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
, DWORD dest_tid
,
49 DWORD type
) DECLSPEC_HIDDEN
;
50 extern BOOL
unpack_dde_message( HWND hwnd
, UINT message
, WPARAM
*wparam
, LPARAM
*lparam
,
51 const void *buffer
, size_t size
) DECLSPEC_HIDDEN
;
52 extern void free_cached_data( UINT format
, HANDLE handle
) DECLSPEC_HIDDEN
;
53 extern HANDLE
render_synthesized_format( UINT format
, UINT from
) DECLSPEC_HIDDEN
;
55 extern void CLIPBOARD_ReleaseOwner( HWND hwnd
) DECLSPEC_HIDDEN
;
56 extern HDC
get_display_dc(void) DECLSPEC_HIDDEN
;
57 extern void release_display_dc( HDC hdc
) DECLSPEC_HIDDEN
;
58 extern void wait_graphics_driver_ready(void) DECLSPEC_HIDDEN
;
59 extern void *get_hook_proc( void *proc
, const WCHAR
*module
, HMODULE
*free_module
) DECLSPEC_HIDDEN
;
60 extern RECT
get_virtual_screen_rect(void) DECLSPEC_HIDDEN
;
61 extern RECT
get_primary_monitor_rect(void) DECLSPEC_HIDDEN
;
62 extern DWORD
get_input_codepage( void ) DECLSPEC_HIDDEN
;
63 extern BOOL
map_wparam_AtoW( UINT message
, WPARAM
*wparam
, enum wm_char_mapping mapping
) DECLSPEC_HIDDEN
;
64 extern HPEN
SYSCOLOR_GetPen( INT index
) DECLSPEC_HIDDEN
;
65 extern HBRUSH
SYSCOLOR_Get55AABrush(void) DECLSPEC_HIDDEN
;
66 extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN
;
68 typedef LRESULT (*winproc_callback_t
)( HWND hwnd
, UINT msg
, WPARAM wp
, LPARAM lp
,
69 LRESULT
*result
, void *arg
);
71 extern LRESULT
WINPROC_CallProcAtoW( winproc_callback_t callback
, HWND hwnd
, UINT msg
,
72 WPARAM wParam
, LPARAM lParam
, LRESULT
*result
, void *arg
,
73 enum wm_char_mapping mapping
) DECLSPEC_HIDDEN
;
75 extern INT_PTR
WINPROC_CallDlgProcA( HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
76 extern INT_PTR
WINPROC_CallDlgProcW( HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
77 extern void winproc_init(void) DECLSPEC_HIDDEN
;
78 extern void dispatch_win_proc_params( struct win_proc_params
*params
) DECLSPEC_HIDDEN
;
80 extern ATOM
get_class_info( HINSTANCE instance
, const WCHAR
*name
, WNDCLASSEXW
*info
,
81 UNICODE_STRING
*name_str
, BOOL ansi
) DECLSPEC_HIDDEN
;
83 /* kernel callbacks */
85 BOOL WINAPI
User32CallEnumDisplayMonitor( struct enum_display_monitor_params
*params
, ULONG size
);
86 BOOL WINAPI
User32CallSendAsyncCallback( const struct send_async_params
*params
, ULONG size
);
87 BOOL WINAPI
User32CallWinEventHook( const struct win_event_hook_params
*params
, ULONG size
);
88 BOOL WINAPI
User32CallWindowProc( struct win_proc_params
*params
, ULONG size
);
89 BOOL WINAPI
User32CallWindowsHook( struct win_hook_params
*params
, ULONG size
);
90 BOOL WINAPI
User32InitBuiltinClasses( const struct win_hook_params
*params
, ULONG size
);
92 /* message spy definitions */
94 extern const char *SPY_GetMsgName( UINT msg
, HWND hWnd
) DECLSPEC_HIDDEN
;
95 extern void SPY_EnterMessage( INT iFlag
, HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
96 extern void SPY_ExitMessage( INT iFlag
, HWND hwnd
, UINT msg
,
97 LRESULT lReturn
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
124 } CURSORICONDIRENTRY
;
131 CURSORICONDIRENTRY idEntries
[1];
143 } CURSORICONFILEDIRENTRY
;
150 CURSORICONFILEDIRENTRY idEntries
[1];
155 extern int bitmap_info_size( const BITMAPINFO
* info
, WORD coloruse
) DECLSPEC_HIDDEN
;
156 extern BOOL
get_icon_size( HICON handle
, SIZE
*size
) DECLSPEC_HIDDEN
;
158 extern struct user_api_hook
*user_api DECLSPEC_HIDDEN
;
159 LRESULT WINAPI
USER_DefDlgProc(HWND
, UINT
, WPARAM
, LPARAM
, BOOL
) DECLSPEC_HIDDEN
;
160 LRESULT WINAPI
USER_ScrollBarProc(HWND
, UINT
, WPARAM
, LPARAM
, BOOL
) DECLSPEC_HIDDEN
;
161 void WINAPI
USER_NonClientButtonDraw(HWND
, HDC
, enum NONCLIENT_BUTTON_TYPE
, RECT
, BOOL
, BOOL
) DECLSPEC_HIDDEN
;
162 void WINAPI
USER_ScrollBarDraw(HWND
, HDC
, INT
, enum SCROLL_HITTEST
,
163 const struct SCROLL_TRACKING_INFO
*, BOOL
, BOOL
, RECT
*, UINT
,
164 INT
, INT
, INT
, BOOL
) DECLSPEC_HIDDEN
;
165 struct scroll_info
*SCROLL_GetInternalInfo( HWND hwnd
, INT nBar
, BOOL alloc
);
167 /* Window functions */
168 BOOL
is_desktop_window( HWND hwnd
) DECLSPEC_HIDDEN
;
169 HWND
WIN_GetFullHandle( HWND hwnd
) DECLSPEC_HIDDEN
;
170 HWND
WIN_IsCurrentProcess( HWND hwnd
) DECLSPEC_HIDDEN
;
171 HWND
WIN_IsCurrentThread( HWND hwnd
) DECLSPEC_HIDDEN
;
172 ULONG
WIN_SetStyle( HWND hwnd
, ULONG set_bits
, ULONG clear_bits
) DECLSPEC_HIDDEN
;
173 HWND
WIN_CreateWindowEx( CREATESTRUCTW
*cs
, LPCWSTR className
, HINSTANCE module
, BOOL unicode
) DECLSPEC_HIDDEN
;
174 HWND
*WIN_ListChildren( HWND hwnd
) DECLSPEC_HIDDEN
;
175 void MDI_CalcDefaultChildPos( HWND hwndClient
, INT total
, LPPOINT lpPos
, INT delta
, UINT
*id
) DECLSPEC_HIDDEN
;
176 HDESK
open_winstation_desktop( HWINSTA hwinsta
, LPCWSTR name
, DWORD flags
, BOOL inherit
,
177 ACCESS_MASK access
) DECLSPEC_HIDDEN
;
179 static inline void mirror_rect( const RECT
*window_rect
, RECT
*rect
)
181 int width
= window_rect
->right
- window_rect
->left
;
182 int tmp
= rect
->left
;
183 rect
->left
= width
- rect
->right
;
184 rect
->right
= width
- tmp
;
187 #endif /* __WINE_USER_PRIVATE_H */