VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wintabx.h@ 33282

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

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 6.1 KB
Line 
1/*
2 * Copyright (C) 1991-1998 by LCS/Telegraphics
3 * Copyright (C) 2002 Patrik Stridvall
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20/*
21 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
22 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
23 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
24 * a choice of LGPL license versions is made available with the language indicating
25 * that LGPLv2 or any later version may be used, or where a choice of which version
26 * of the LGPL is applied is otherwise unspecified.
27 */
28
29#ifndef __WINE_WINTABX_H
30#define __WINE_WINTABX_H
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* defined(__cplusplus) */
35
36/***********************************************************************
37 * Wintab message crackers
38 */
39
40#ifndef HANDLE_MSG
41# define HANDLE_MSG(hwnd, message, fn) \
42 case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn))
43#endif
44
45/* void Cls_OnWintabPacket(HWND hwnd, HCTX hCtx, UINT sn) */
46#define HANDLE_WT_PACKET(hwnd, wParam, lParam, fn) \
47 ((fn)((hwnd), (HCTX)(lParam), (UINT)(wParam)), 0L)
48#define FORWARD__WT_PACKET(hwnd, bs, hCtx, sn, fn) \
49 (void)(fn)((hwnd), _WT_PACKET(bs), (WPARAM)(UINT)(sn), (LPARAM)(HCTX)(hCtx))
50#define FORWARD_WT_PACKET(hwnd, hCtx, sn, fn) \
51 FORWARD__WT_PACKET(hwnd, WT_DEFBASE, hCtx, sn, fn)
52
53/* void Cls_OnWintabCtxOpen(HWND hwnd, HCTX hCtx, UINT sf) */
54#define HANDLE_WT_CTXOPEN(hwnd, wParam, lParam, fn) \
55 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L)
56#define FORWARD__WT_CTXOPEN(hwnd, bs, hCtx, sf, fn) \
57 (void)(fn)((hwnd), _WT_CTXOPEN(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf))
58#define FORWARD_WT_CTXOPEN(hwnd, hCtx, sf, fn) \
59 FORWARD__WT_CTXOPEN(hwnd, WT_DEFBASE, hCtx, sf, fn)
60
61/* void Cls_OnWintabCtxClose(HWND hwnd, HCTX hCtx, UINT sf) */
62#define HANDLE_WT_CTXCLOSE(hwnd, wParam, lParam, fn) \
63 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L)
64#define FORWARD__WT_CTXCLOSE(hwnd, bs, hCtx, sf, fn) \
65 (void)(fn)((hwnd), _WT_CTXCLOSE(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf))
66#define FORWARD_WT_CTXCLOSE(hwnd, hCtx, sf, fn) \
67 FORWARD__WT_CTXCLOSE(hwnd, WT_DEFBASE, hCtx, sf, fn)
68
69/* void Cls_OnWintabCtxUpdate(HWND hwnd, HCTX hCtx, UINT sf) */
70#define HANDLE_WT_CTXUPDATE(hwnd, wParam, lParam, fn) \
71 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L)
72#define FORWARD__WT_CTXUPDATE(hwnd, bs, hCtx, sf, fn) \
73 (void)(fn)((hwnd), _WT_CTXUPDATE(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf))
74#define FORWARD_WT_CTXUPDATE(hwnd, hCtx, sf, fn) \
75 FORWARD__WT_CTXUPDATE(hwnd, WT_DEFBASE, hCtx, sf, fn)
76
77/* void Cls_OnWintabCtxOverlap(HWND hwnd, HCTX hCtx, UINT sf) */
78#define HANDLE_WT_CTXOVERLAP(hwnd, wParam, lParam, fn) \
79 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L)
80#define FORWARD__WT_CTXOVERLAP(hwnd, bs, hCtx, sf, fn) \
81 (void)(fn)((hwnd), _WT_CTXOVERLAP(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf))
82#define FORWARD_WT_CTXOVERLAP(hwnd, hCtx, sf, fn) \
83 FORWARD__WT_CTXOVERLAP(hwnd, WT_DEFBASE, hCtx, sf, fn)
84
85/* void Cls_OnWintabProximity(HWND hwnd, HCTX hCtx, BOOL cp, BOOL hp) */
86#define HANDLE_WT_PROXIMITY(hwnd, wParam, lParam, fn) \
87 ((fn)((hwnd), (HCTX)(wParam), (BOOL)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L)
88#define FORWARD__WT_PROXIMITY(hwnd, bs, hCtx, cp, hp, fn) \
89 (void)(fn)((hwnd), _WT_PROXIMITY(bs), (WPARAM)(HCTX)(hCtx), MAKELPARAM((cp), (hp))
90#define FORWARD_WT_PROXIMITY(hwnd, hCtx, sf, fn) \
91 FORWARD__WT_PROXIMITY(hwnd, WT_DEFBASE, hCtx, cp, hp, fn)
92
93/* void Cls_OnWintabInfoChange(HWND hwnd, HMGR hMgr, UINT c, UINT i) */
94#define HANDLE_WT_INFOCHANGE(hwnd, wParam, lParam, fn) \
95 ((fn)((hwnd), (HMGR)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
96#define FORWARD__WT_INFOCHANGE(hwnd, bs, hMgr, cp, hp, fn) \
97 (void)(fn)((hwnd), _WT_INFOCHANGE(bs), (WPARAM)(HMGR)(hMgr), MAKELPARAM((c), (i))
98#define FORWARD_WT_INFOCHANGE(hwnd, hMgr, sf, fn) \
99 FORWARD__WT_INFOCHANGE(hwnd, WT_DEFBASE, hMgr, cp, hp, fn)
100
101/***********************************************************************
102 * Alternate porting layer macros
103 */
104
105#define GET_WT_PACKET_HCTX(wp, lp) ((HCTX)lp)
106#define GET_WT_PACKET_SERIAL(wp, lp) (wp)
107#define GET_WT_PACKET_MPS(h, s) (s), (LPARAM)(h)
108
109#define GET_WT_CTXOPEN_HCTX(wp, lp) ((HCTX)wp)
110#define GET_WT_CTXOPEN_STATUS(wp, lp) ((UINT)lp)
111#define GET_WT_CTXOPEN_MPS(h, s) (WPARAM)(h), (LPARAM)(s)
112
113#define GET_WT_CTXCLOSE_HCTX(wp, lp) ((HCTX)wp)
114#define GET_WT_CTXCLOSE_STATUS(wp, lp) ((UINT)lp)
115#define GET_WT_CTXCLOSE_MPS(h, s) (WPARAM)(h), (LPARAM)(s)
116
117#define GET_WT_CTXUPDATE_HCTX(wp, lp) ((HCTX)wp)
118#define GET_WT_CTXUPDATE_STATUS(wp, lp) ((UINT)lp)
119#define GET_WT_CTXUPDATE_MPS(h, s) (WPARAM)(h), (LPARAM)(s)
120
121#define GET_WT_CTXOVERLAP_HCTX(wp, lp) ((HCTX)wp)
122#define GET_WT_CTXOVERLAP_STATUS(wp, lp) ((UINT)lp)
123#define GET_WT_CTXOVERLAP_MPS(h, s) (WPARAM)(h), (LPARAM)(s)
124
125#define GET_WT_PROXIMITY_HCTX(wp, lp) ((HCTX)wp)
126#define GET_WT_PROXIMITY_CTXPROX(wp, lp) LOWORD(lp)
127#define GET_WT_PROXIMITY_HARDPROX(wp, lp) HIWORD(lp)
128#define GET_WT_PROXIMITY_MPS(h, fc, fh) (WPARAM)(h), MAKELONG(fc, fh)
129
130#define GET_WT_INFOCHANGE_HMGR(wp, lp) ((HMGR)wp)
131#define GET_WT_INFOCHANGE_CATEGORY(wp, lp) LOWORD(lp)
132#define GET_WT_INFOCHANGE_INDEX(wp, lp) HIWORD(lp)
133#define GET_WT_INFOCHANGE_MPS(h, c, i) (WPARAM)(h), MAKELONG(c, i)
134
135#ifdef __cplusplus
136} /* extern "C" */
137#endif /* defined(__cplusplus) */
138
139#endif /* defined(__WINE_WINTABX_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