Got rid of GetSysColorPen.
[wine] / include / user.h
1 /*
2  * USER definitions
3  *
4  * Copyright 1993 Alexandre Julliard
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
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_USER_H
22 #define __WINE_USER_H
23
24 #include "winbase.h"
25 #include "wingdi.h"
26 #include "winuser.h"
27
28 #include "local.h"
29
30 extern WORD USER_HeapSel;
31
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)
40
41 #define USUD_LOCALALLOC        0x0001
42 #define USUD_LOCALFREE         0x0002
43 #define USUD_LOCALCOMPACT      0x0003
44 #define USUD_LOCALHEAP         0x0004
45 #define USUD_FIRSTCLASS        0x0005
46
47 struct tagCURSORICONINFO;
48
49 /* internal messages codes */
50 enum wine_internal_message
51 {
52     WM_WINE_DESTROYWINDOW = 0x80000000,
53     WM_WINE_SETWINDOWPOS,
54     WM_WINE_SHOWWINDOW,
55     WM_WINE_SETPARENT,
56     WM_WINE_SETWINDOWLONG,
57     WM_WINE_ENABLEWINDOW
58 };
59
60 /* internal SendInput codes (FIXME) */
61 #define WINE_INTERNAL_INPUT_MOUSE    (16+INPUT_MOUSE)
62 #define WINE_INTERNAL_INPUT_KEYBOARD (16+INPUT_KEYBOARD)
63
64 typedef struct tagUSER_DRIVER {
65     /* keyboard functions */
66     void   (*pInitKeyboard)(LPBYTE);
67     WORD   (*pVkKeyScan)(CHAR);
68     UINT   (*pMapVirtualKey)(UINT,UINT);
69     INT    (*pGetKeyNameText)(LONG,LPSTR,INT);
70     INT    (*pToUnicode)(UINT, UINT, LPBYTE, LPWSTR, int, UINT);
71     void   (*pBeep)(void);
72     /* mouse functions */
73     void   (*pInitMouse)(LPBYTE);
74     void   (*pSetCursor)(struct tagCURSORICONINFO *);
75     void   (*pGetCursorPos)(LPPOINT);
76     void   (*pSetCursorPos)(INT,INT);
77     /* screen saver functions */
78     BOOL   (*pGetScreenSaveActive)(void);
79     void   (*pSetScreenSaveActive)(BOOL);
80     /* clipboard functions */
81     void   (*pAcquireClipboard)(void);            /* Acquire selection */
82     void   (*pReleaseClipboard)(void);            /* Release selection */
83     void   (*pSetClipboardData)(UINT);            /* Set specified selection data */
84     BOOL   (*pGetClipboardData)(UINT);            /* Get specified selection data */
85     BOOL   (*pIsClipboardFormatAvailable)(UINT);  /* Check if specified format is available */
86     BOOL   (*pRegisterClipboardFormat)(LPCSTR);   /* Register a clipboard format */
87     BOOL   (*pIsSelectionOwner)(void);            /* Check if we own the selection */
88     void   (*pResetSelectionOwner)(HWND, BOOL);
89
90     /* windowing functions */
91     BOOL   (*pCreateWindow)(HWND,CREATESTRUCTA*,BOOL);
92     BOOL   (*pDestroyWindow)(HWND);
93     BOOL   (*pGetDC)(HWND,HDC,HRGN,DWORD);
94     void   (*pForceWindowRaise)(HWND);
95     DWORD  (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
96     BOOL   (*pScrollDC)(HDC,INT,INT,const RECT*,const RECT*,HRGN,LPRECT);
97     INT    (*pScrollWindowEx)(HWND,INT,INT,const RECT*,const RECT*,HRGN,LPRECT,UINT);
98     void   (*pSetFocus)(HWND);
99     HWND   (*pSetParent)(HWND,HWND);
100     BOOL   (*pSetWindowPos)(WINDOWPOS *);
101     int    (*pSetWindowRgn)(HWND,HRGN,BOOL);
102     HICON  (*pSetWindowIcon)(HWND,HICON,BOOL);
103     void   (*pSetWindowStyle)(HWND,DWORD);
104     BOOL   (*pSetWindowText)(HWND,LPCWSTR);
105     BOOL   (*pShowWindow)(HWND,INT);
106     void   (*pSysCommandSizeMove)(HWND,WPARAM);
107 } USER_DRIVER;
108
109 extern USER_DRIVER USER_Driver;
110
111 WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
112                             DWORD dwFlags, HMODULE16 hModule );
113
114 /* user lock */
115 extern void USER_Lock(void);
116 extern void USER_Unlock(void);
117 extern void USER_CheckNotLock(void);
118
119 extern BOOL USER_IsExitingThread( DWORD tid );
120
121 /* Wine look */
122
123 typedef enum
124 {
125     WIN31_LOOK,
126     WIN95_LOOK,
127     WIN98_LOOK
128 } WINE_LOOK;
129
130 extern WINE_LOOK TWEAK_WineLook;
131
132 /* gray brush cache */
133 extern HBRUSH CACHE_GetPattern55AABrush(void);
134
135 /* syscolor.c */
136 extern HPEN SYSCOLOR_GetPen( INT index );
137
138 extern DWORD USER16_AlertableWait;
139
140 #endif  /* __WINE_USER_H */