dxgi: Add IDXGISwapChain2 stubs for D3D11.
[wine.git] / dlls / user32 / user_private.h
bloba9d6a20ddf10c0947c2d178e10e41848b434ec97
1 /*
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
24 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "ntuser.h"
29 #include "winreg.h"
30 #include "winnls.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];
43 MSG get_msg;
46 extern HMODULE user32_module;
48 extern NTSTATUS post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD dest_tid,
49 DWORD type );
50 extern BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
51 const void *buffer, size_t size );
52 extern void free_cached_data( UINT format, HANDLE handle );
53 extern HANDLE render_synthesized_format( UINT format, UINT from );
54 extern void unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
55 void *buffer, BOOL ansi );
57 extern void CLIPBOARD_ReleaseOwner( HWND hwnd );
58 extern HDC get_display_dc(void);
59 extern void release_display_dc( HDC hdc );
60 extern void *get_hook_proc( void *proc, const WCHAR *module, HMODULE *free_module );
61 extern DWORD get_input_codepage( void );
62 extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping );
63 extern HPEN SYSCOLOR_GetPen( INT index );
64 extern HBRUSH SYSCOLOR_Get55AABrush(void);
65 extern void SYSPARAMS_Init(void);
67 typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
68 LRESULT *result, void *arg );
70 extern LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
71 WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg,
72 enum wm_char_mapping mapping );
74 extern INT_PTR WINPROC_CallDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
75 extern INT_PTR WINPROC_CallDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
76 extern void winproc_init(void);
77 extern LRESULT dispatch_win_proc_params( struct win_proc_params *params );
79 extern ATOM get_class_info( HINSTANCE instance, const WCHAR *name, WNDCLASSEXW *info,
80 UNICODE_STRING *name_str, BOOL ansi );
82 /* kernel callbacks */
84 NTSTATUS WINAPI User32CallEnumDisplayMonitor( void *args, ULONG size );
85 NTSTATUS WINAPI User32CallSendAsyncCallback( void *args, ULONG size );
86 NTSTATUS WINAPI User32CallWinEventHook( void *args, ULONG size );
87 NTSTATUS WINAPI User32CallWindowProc( void *args, ULONG size );
88 NTSTATUS WINAPI User32CallWindowsHook( void *args, ULONG size );
89 NTSTATUS WINAPI User32InitBuiltinClasses( void *args, ULONG size );
91 /* message spy definitions */
93 extern const char *SPY_GetMsgName( UINT msg, HWND hWnd );
94 extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
95 extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg,
96 LRESULT lReturn, WPARAM wParam, LPARAM lParam );
98 #include "pshpack1.h"
100 typedef struct
102 BYTE bWidth;
103 BYTE bHeight;
104 BYTE bColorCount;
105 BYTE bReserved;
106 } ICONRESDIR;
108 typedef struct
110 WORD wWidth;
111 WORD wHeight;
112 } CURSORDIR;
114 typedef struct
115 { union
116 { ICONRESDIR icon;
117 CURSORDIR cursor;
118 } ResInfo;
119 WORD wPlanes;
120 WORD wBitCount;
121 DWORD dwBytesInRes;
122 WORD wResId;
123 } CURSORICONDIRENTRY;
125 typedef struct
127 WORD idReserved;
128 WORD idType;
129 WORD idCount;
130 CURSORICONDIRENTRY idEntries[1];
131 } CURSORICONDIR;
133 typedef struct {
134 BYTE bWidth;
135 BYTE bHeight;
136 BYTE bColorCount;
137 BYTE bReserved;
138 WORD xHotspot;
139 WORD yHotspot;
140 DWORD dwDIBSize;
141 DWORD dwDIBOffset;
142 } CURSORICONFILEDIRENTRY;
144 typedef struct
146 WORD idReserved;
147 WORD idType;
148 WORD idCount;
149 CURSORICONFILEDIRENTRY idEntries[1];
150 } CURSORICONFILEDIR;
152 #include "poppack.h"
154 extern int bitmap_info_size( const BITMAPINFO * info, WORD coloruse );
155 extern BOOL get_icon_size( HICON handle, SIZE *size );
157 extern struct user_api_hook *user_api;
158 LRESULT WINAPI USER_DefDlgProc(HWND, UINT, WPARAM, LPARAM, BOOL);
159 LRESULT WINAPI USER_ScrollBarProc(HWND, UINT, WPARAM, LPARAM, BOOL);
160 void WINAPI USER_NonClientButtonDraw(HWND, HDC, enum NONCLIENT_BUTTON_TYPE, RECT, BOOL, BOOL);
161 void WINAPI USER_ScrollBarDraw(HWND, HDC, INT, enum SCROLL_HITTEST,
162 const struct SCROLL_TRACKING_INFO *, BOOL, BOOL, RECT *, UINT,
163 INT, INT, INT, BOOL);
164 struct scroll_info *SCROLL_GetInternalInfo( HWND hwnd, INT nBar, BOOL alloc );
166 /* Window functions */
167 BOOL is_desktop_window( HWND hwnd );
168 HWND WIN_GetFullHandle( HWND hwnd );
169 HWND WIN_IsCurrentProcess( HWND hwnd );
170 HWND WIN_IsCurrentThread( HWND hwnd );
171 ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits );
172 HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode );
173 HWND *WIN_ListChildren( HWND hwnd );
174 void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id );
175 HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags, BOOL inherit,
176 ACCESS_MASK access );
178 static inline void mirror_rect( const RECT *window_rect, RECT *rect )
180 int width = window_rect->right - window_rect->left;
181 int tmp = rect->left;
182 rect->left = width - rect->right;
183 rect->right = width - tmp;
186 #endif /* __WINE_USER_PRIVATE_H */