mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 06:29:32 +00:00
126 lines
4.8 KiB
C
126 lines
4.8 KiB
C
/*
|
|
* USER private definitions
|
|
*
|
|
* Copyright 1993, 2009 Alexandre Julliard
|
|
*
|
|
* 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
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#ifndef __WINE_USER_PRIVATE_H
|
|
#define __WINE_USER_PRIVATE_H
|
|
|
|
#include <stdarg.h>
|
|
#include "windef.h"
|
|
#include "winbase.h"
|
|
#include "ntuser.h"
|
|
#include "winreg.h"
|
|
#include "winternl.h"
|
|
#include "wine/windef16.h"
|
|
|
|
/* Wow handlers */
|
|
|
|
/* the structures must match the corresponding ones in user32 */
|
|
struct wow_handlers16
|
|
{
|
|
LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
|
|
LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
|
|
LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
|
|
};
|
|
|
|
struct wow_handlers32
|
|
{
|
|
LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
|
|
HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
|
|
HWND (*get_win_handle)(HWND);
|
|
WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
|
|
struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
|
|
INT (*dialog_box_loop)(HWND,HWND);
|
|
};
|
|
|
|
extern struct wow_handlers32 wow_handlers32;
|
|
|
|
extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
|
|
extern void free_module_classes(HINSTANCE16);
|
|
extern void register_wow_handlers(void);
|
|
extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new,
|
|
struct wow_handlers32 *orig );
|
|
|
|
static inline HWND WIN_Handle32( HWND16 hwnd16 )
|
|
{
|
|
return wow_handlers32.get_win_handle( (HWND)(ULONG_PTR)hwnd16 );
|
|
}
|
|
|
|
typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
|
|
LRESULT *result, void *arg );
|
|
typedef LRESULT (*winproc_callback16_t)( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp,
|
|
LRESULT *result, void *arg );
|
|
|
|
extern WNDPROC16 WINPROC_GetProc16( WNDPROC proc, BOOL unicode );
|
|
extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func );
|
|
extern LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT16 msg,
|
|
WPARAM16 wParam, LPARAM lParam, LRESULT *result, void *arg );
|
|
extern LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT msg,
|
|
WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg );
|
|
|
|
extern void call_WH_CALLWNDPROC_hook( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp );
|
|
|
|
#define GET_BYTE(ptr) (*(const BYTE *)(ptr))
|
|
#define GET_WORD(ptr) (*(const WORD *)(ptr))
|
|
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
|
|
|
|
#define WM_SYSTIMER 0x0118
|
|
|
|
#define SYSTEM_TIMER_FLAG 0x10000
|
|
|
|
/* Dialog info structure (must match the user32 one) */
|
|
typedef struct tagDIALOGINFO
|
|
{
|
|
HWND hwndFocus; /* Current control with focus */
|
|
HFONT hUserFont; /* Dialog font */
|
|
HMENU hMenu; /* Dialog menu */
|
|
UINT xBaseUnit; /* Dialog units (depends on the font) */
|
|
UINT yBaseUnit;
|
|
INT idResult; /* EndDialog() result / default pushbutton ID */
|
|
UINT flags; /* EndDialog() called for this dialog */
|
|
} DIALOGINFO;
|
|
|
|
#define DF_END 0x0001
|
|
#define DF_OWNERENABLED 0x0002
|
|
|
|
/* HANDLE16 <-> HANDLE conversions */
|
|
#define HINSTANCE_16(h32) (LOWORD(h32))
|
|
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
|
|
|
|
extern HICON16 get_icon_16( HICON icon );
|
|
extern HICON get_icon_32( HICON16 icon16 );
|
|
|
|
extern DWORD USER16_AlertableWait;
|
|
extern WORD USER_HeapSel;
|
|
|
|
#endif /* __WINE_USER_PRIVATE_H */
|