VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wownt32.h@ 33223

Last change on this file since 33223 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 6.7 KB
Line 
1/*
2 * WOW Generic Thunk API
3 *
4 * Copyright (C) 1999 Ulrich Weigand
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21/*
22 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef _WOWNT32_H_
31#define _WOWNT32_H_
32
33#ifdef __WINESRC__
34/* under Wine use the kernel functions directly so we don't have to import wow32 */
35#define WOWCallback16 K32WOWCallback16
36#define WOWCallback16Ex K32WOWCallback16Ex
37#define WOWDirectedYield16 K32WOWDirectedYield16
38#define WOWGetVDMPointer K32WOWGetVDMPointer
39#define WOWGetVDMPointerFix K32WOWGetVDMPointerFix
40#define WOWGetVDMPointerUnfix K32WOWGetVDMPointerUnfix
41#define WOWGlobalAlloc16 K32WOWGlobalAlloc16
42#define WOWGlobalAllocLock16 K32WOWGlobalAllocLock16
43#define WOWGlobalFree16 K32WOWGlobalFree16
44#define WOWGlobalLock16 K32WOWGlobalLock16
45#define WOWGlobalLockSize16 K32WOWGlobalLockSize16
46#define WOWGlobalUnlock16 K32WOWGlobalUnlock16
47#define WOWGlobalUnlockFree16 K32WOWGlobalUnlockFree16
48#define WOWHandle16 K32WOWHandle16
49#define WOWHandle32 K32WOWHandle32
50#define WOWYield16 K32WOWYield16
51#endif
52
53LPVOID WINAPI WOWGetVDMPointer(DWORD,DWORD,BOOL);
54LPVOID WINAPI WOWGetVDMPointerFix(DWORD,DWORD,BOOL);
55VOID WINAPI WOWGetVDMPointerUnfix(DWORD);
56
57WORD WINAPI WOWGlobalAlloc16(WORD,DWORD);
58WORD WINAPI WOWGlobalFree16(WORD);
59DWORD WINAPI WOWGlobalLock16(WORD);
60BOOL WINAPI WOWGlobalUnlock16(WORD);
61DWORD WINAPI WOWGlobalAllocLock16(WORD,DWORD,WORD *);
62WORD WINAPI WOWGlobalUnlockFree16(DWORD);
63DWORD WINAPI WOWGlobalLockSize16(WORD,PDWORD);
64
65VOID WINAPI WOWYield16(VOID);
66VOID WINAPI WOWDirectedYield16(WORD);
67
68typedef enum
69{
70 WOW_TYPE_HWND,
71 WOW_TYPE_HMENU,
72 WOW_TYPE_HDWP,
73 WOW_TYPE_HDROP,
74 WOW_TYPE_HDC,
75 WOW_TYPE_HFONT,
76 WOW_TYPE_HMETAFILE,
77 WOW_TYPE_HRGN,
78 WOW_TYPE_HBITMAP,
79 WOW_TYPE_HBRUSH,
80 WOW_TYPE_HPALETTE,
81 WOW_TYPE_HPEN,
82 WOW_TYPE_HACCEL,
83 WOW_TYPE_HTASK,
84 WOW_TYPE_FULLHWND
85
86} WOW_HANDLE_TYPE;
87
88HANDLE WINAPI WOWHandle32(WORD,WOW_HANDLE_TYPE);
89WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
90
91#ifdef __WINESRC__
92/* under Wine we use optimized versions where we can */
93#define HWND_32(h16) ((HWND) (ULONG_PTR)(h16))
94#define HMENU_32(h16) ((HMENU) (ULONG_PTR)(h16))
95#define HDWP_32(h16) ((HDWP) (ULONG_PTR)(h16))
96#define HDROP_32(h16) ((HDROP) (ULONG_PTR)(h16))
97#define HDC_32(h16) ((HDC) (ULONG_PTR)(h16))
98#define HFONT_32(h16) ((HFONT) (ULONG_PTR)(h16))
99#define HRGN_32(h16) ((HRGN) (ULONG_PTR)(h16))
100#define HBITMAP_32(h16) ((HBITMAP) (ULONG_PTR)(h16))
101#define HBRUSH_32(h16) ((HBRUSH) (ULONG_PTR)(h16))
102#define HPALETTE_32(h16) ((HPALETTE) (ULONG_PTR)(h16))
103#define HPEN_32(h16) ((HPEN) (ULONG_PTR)(h16))
104#define HACCEL_32(h16) ((HACCEL) (ULONG_PTR)(h16))
105
106#define HWND_16(h32) (LOWORD(h32))
107#define HMENU_16(h32) (LOWORD(h32))
108#define HDWP_16(h32) (LOWORD(h32))
109#define HDROP_16(h32) (LOWORD(h32))
110#define HDC_16(h32) (LOWORD(h32))
111#define HFONT_16(h32) (LOWORD(h32))
112#define HRGN_16(h32) (LOWORD(h32))
113#define HBITMAP_16(h32) (LOWORD(h32))
114#define HBRUSH_16(h32) (LOWORD(h32))
115#define HPALETTE_16(h32) (LOWORD(h32))
116#define HPEN_16(h32) (LOWORD(h32))
117#define HACCEL_16(h32) (LOWORD(h32))
118
119#else /* __WINESRC__ */
120
121#define HWND_32(h16) ((HWND) (WOWHandle32(h16, WOW_TYPE_HWND)))
122#define HMENU_32(h16) ((HMENU) (WOWHandle32(h16, WOW_TYPE_HMENU)))
123#define HDWP_32(h16) ((HDWP) (WOWHandle32(h16, WOW_TYPE_HDWP)))
124#define HDROP_32(h16) ((HDROP) (WOWHandle32(h16, WOW_TYPE_HDROP)))
125#define HDC_32(h16) ((HDC) (WOWHandle32(h16, WOW_TYPE_HDC)))
126#define HFONT_32(h16) ((HFONT) (WOWHandle32(h16, WOW_TYPE_HFONT)))
127#define HRGN_32(h16) ((HRGN) (WOWHandle32(h16, WOW_TYPE_HRGN)))
128#define HBITMAP_32(h16) ((HBITMAP) (WOWHandle32(h16, WOW_TYPE_HBITMAP)))
129#define HBRUSH_32(h16) ((HBRUSH) (WOWHandle32(h16, WOW_TYPE_HBRUSH)))
130#define HPALETTE_32(h16) ((HPALETTE) (WOWHandle32(h16, WOW_TYPE_HPALETTE)))
131#define HPEN_32(h16) ((HPEN) (WOWHandle32(h16, WOW_TYPE_HPEN)))
132#define HACCEL_32(h16) ((HACCEL) (WOWHandle32(h16, WOW_TYPE_HACCEL)))
133
134#define HWND_16(h32) (WOWHandle16(h32, WOW_TYPE_HWND))
135#define HMENU_16(h32) (WOWHandle16(h32, WOW_TYPE_HMENU))
136#define HDWP_16(h32) (WOWHandle16(h32, WOW_TYPE_HDWP))
137#define HDROP_16(h32) (WOWHandle16(h32, WOW_TYPE_HDROP))
138#define HDC_16(h32) (WOWHandle16(h32, WOW_TYPE_HDC))
139#define HFONT_16(h32) (WOWHandle16(h32, WOW_TYPE_HFONT))
140#define HRGN_16(h32) (WOWHandle16(h32, WOW_TYPE_HRGN))
141#define HBITMAP_16(h32) (WOWHandle16(h32, WOW_TYPE_HBITMAP))
142#define HBRUSH_16(h32) (WOWHandle16(h32, WOW_TYPE_HBRUSH))
143#define HPALETTE_16(h32) (WOWHandle16(h32, WOW_TYPE_HPALETTE))
144#define HPEN_16(h32) (WOWHandle16(h32, WOW_TYPE_HPEN))
145#define HACCEL_16(h32) (WOWHandle16(h32, WOW_TYPE_HACCEL))
146
147#endif /* __WINESRC__ */
148
149#define HMETAFILE_32(h16) ((HMETAFILE)(WOWHandle32(h16, WOW_TYPE_HMETAFILE)))
150#define HTASK_32(h16) ((DWORD)(WOWHandle32(h16, WOW_TYPE_HTASK)))
151#define FULLHWND_32(h16) ((HWND)(WOWHandle32(h16, WOW_TYPE_FULLHWND)))
152
153#define HMETAFILE_16(h32) (WOWHandle16(h32, WOW_TYPE_HMETAFILE))
154#define HTASK_16(h32) (WOWHandle16((HANDLE)(h32), WOW_TYPE_HTASK))
155
156#define WCB16_PASCAL 0
157#define WCB16_CDECL 1
158#define WCB16_MAX_CBARGS 16
159
160/* Wine extensions: call register function, context ptr is passed in the return value LPDWORD */
161#define WCB16_REGS 2
162#define WCB16_REGS_LONG 4 /* function uses 32-bit lret */
163
164DWORD WINAPI WOWCallback16(DWORD,DWORD);
165BOOL WINAPI WOWCallback16Ex(DWORD,DWORD,DWORD,LPVOID,LPDWORD);
166
167#endif /* _WOWNT32_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette