Bring winhelp back to life, with mainly support for Win95 help files.
[wine/wine-kai.git] / include / user.h
blob54a9b2da0d924da6fe890a6d2fc1f37fec1b3f4c
1 /*
2 * USER 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_USER_H
22 #define __WINE_USER_H
24 #include "winbase.h"
25 #include "wingdi.h"
26 #include "winuser.h"
28 #include "local.h"
30 extern WORD USER_HeapSel;
32 #define USER_HEAP_ALLOC(size) \
33 LOCAL_Alloc( USER_HeapSel, LMEM_FIXED, (size) )
34 #define USER_HEAP_REALLOC(handle,size) \
35 LOCAL_ReAlloc( USER_HeapSel, (handle), (size), LMEM_FIXED )
36 #define USER_HEAP_FREE(handle) \
37 LOCAL_Free( USER_HeapSel, (handle) )
38 #define USER_HEAP_LIN_ADDR(handle) \
39 ((handle) ? MapSL(MAKESEGPTR(USER_HeapSel, (handle))) : NULL)
41 #define GET_WORD(ptr) (*(WORD *)(ptr))
42 #define GET_DWORD(ptr) (*(DWORD *)(ptr))
44 #define USUD_LOCALALLOC 0x0001
45 #define USUD_LOCALFREE 0x0002
46 #define USUD_LOCALCOMPACT 0x0003
47 #define USUD_LOCALHEAP 0x0004
48 #define USUD_FIRSTCLASS 0x0005
50 struct tagCURSORICONINFO;
52 /* internal messages codes */
53 enum wine_internal_message
55 WM_WINE_DESTROYWINDOW = 0x80000000,
56 WM_WINE_SETWINDOWPOS,
57 WM_WINE_SHOWWINDOW,
58 WM_WINE_SETPARENT,
59 WM_WINE_SETWINDOWLONG,
60 WM_WINE_ENABLEWINDOW
63 /* internal SendInput codes (FIXME) */
64 #define WINE_INTERNAL_INPUT_MOUSE (16+INPUT_MOUSE)
65 #define WINE_INTERNAL_INPUT_KEYBOARD (16+INPUT_KEYBOARD)
67 typedef struct tagUSER_DRIVER {
68 /* keyboard functions */
69 void (*pInitKeyboard)(LPBYTE);
70 WORD (*pVkKeyScan)(CHAR);
71 UINT (*pMapVirtualKey)(UINT,UINT);
72 INT (*pGetKeyNameText)(LONG,LPSTR,INT);
73 INT (*pToUnicode)(UINT, UINT, LPBYTE, LPWSTR, int, UINT);
74 void (*pBeep)(void);
75 /* mouse functions */
76 void (*pInitMouse)(LPBYTE);
77 void (*pSetCursor)(struct tagCURSORICONINFO *);
78 void (*pGetCursorPos)(LPPOINT);
79 void (*pSetCursorPos)(INT,INT);
80 /* screen saver functions */
81 BOOL (*pGetScreenSaveActive)(void);
82 void (*pSetScreenSaveActive)(BOOL);
83 /* clipboard functions */
84 void (*pAcquireClipboard)(void); /* Acquire selection */
85 void (*pReleaseClipboard)(void); /* Release selection */
86 void (*pSetClipboardData)(UINT); /* Set specified selection data */
87 BOOL (*pGetClipboardData)(UINT); /* Get specified selection data */
88 BOOL (*pIsClipboardFormatAvailable)(UINT); /* Check if specified format is available */
89 BOOL (*pRegisterClipboardFormat)(LPCSTR); /* Register a clipboard format */
90 BOOL (*pIsSelectionOwner)(void); /* Check if we own the selection */
91 void (*pResetSelectionOwner)(HWND, BOOL);
93 /* windowing functions */
94 BOOL (*pCreateWindow)(HWND,CREATESTRUCTA*,BOOL);
95 BOOL (*pDestroyWindow)(HWND);
96 BOOL (*pGetDC)(HWND,HDC,HRGN,DWORD);
97 void (*pForceWindowRaise)(HWND);
98 DWORD (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
99 BOOL (*pScrollDC)(HDC,INT,INT,const RECT*,const RECT*,HRGN,LPRECT);
100 INT (*pScrollWindowEx)(HWND,INT,INT,const RECT*,const RECT*,HRGN,LPRECT,UINT);
101 void (*pSetFocus)(HWND);
102 HWND (*pSetParent)(HWND,HWND);
103 BOOL (*pSetWindowPos)(WINDOWPOS *);
104 int (*pSetWindowRgn)(HWND,HRGN,BOOL);
105 HICON (*pSetWindowIcon)(HWND,HICON,BOOL);
106 void (*pSetWindowStyle)(HWND,DWORD);
107 BOOL (*pSetWindowText)(HWND,LPCWSTR);
108 BOOL (*pShowWindow)(HWND,INT);
109 void (*pSysCommandSizeMove)(HWND,WPARAM);
110 } USER_DRIVER;
112 extern USER_DRIVER USER_Driver;
114 WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
115 DWORD dwFlags, HMODULE16 hModule );
117 /* user lock */
118 extern void USER_Lock(void);
119 extern void USER_Unlock(void);
120 extern void USER_CheckNotLock(void);
122 extern BOOL USER_IsExitingThread( DWORD tid );
124 /* Wine look */
126 typedef enum
128 WIN31_LOOK,
129 WIN95_LOOK,
130 WIN98_LOOK
131 } WINE_LOOK;
133 extern WINE_LOOK TWEAK_WineLook;
135 /* gray brush cache */
136 extern HBRUSH CACHE_GetPattern55AABrush(void);
138 /* syscolor.c */
139 extern HPEN SYSCOLOR_GetPen( INT index );
141 extern DWORD USER16_AlertableWait;
143 #endif /* __WINE_USER_H */