Mercurial > sdl-ios-xcode
annotate src/video/win32/wactab/wintabx.h @ 3469:8c5fb2a3b11d
RenderReadPixels and RenderWritePixels functions work with back buffer now and all asynchronous operations are flushed before reading or writing to backbuffer. Thanks Sam for clarification of this.
author | Mike Gorchak <lestat@i.com.ua> |
---|---|
date | Sat, 21 Nov 2009 06:17:50 +0000 |
parents | f23ebf1ddac4 |
children |
rev | line source |
---|---|
2726
f23ebf1ddac4
Dynamically load wintab32.dll
Sam Lantinga <slouken@libsdl.org>
parents:
2724
diff
changeset
|
1 /* *INDENT-OFF* */ |
2724 | 2 /* ------------------------------- wintabx.h -------------------------------- */ |
3 /* Combined 16 & 32-bit version. */ | |
4 | |
5 | |
6 /*------------------------------------------------------------------------------ | |
7 The text and information contained in this file may be freely used, | |
8 copied, or distributed without compensation or licensing restrictions. | |
9 | |
10 This file is copyright 1991-1998 by LCS/Telegraphics. | |
11 ------------------------------------------------------------------------------*/ | |
12 | |
13 #ifndef _INC_WINTABX /* prevent multiple includes */ | |
14 #define _INC_WINTABX | |
15 | |
16 #ifdef __cplusplus | |
17 extern "C" { | |
18 #endif /* __cplusplus */ | |
19 | |
20 /* prototype for wintabx.lib. */ | |
21 #define _UnlinkWinTab _UnlinkWintab | |
22 #ifdef WIN32 | |
23 extern WINAPI _UnlinkWintab(void); | |
24 #else | |
25 extern FAR _UnlinkWintab(void); | |
26 #endif | |
27 | |
28 /****** Wintab message crackers ***********************************************/ | |
29 | |
30 #ifndef HANDLE_MSG | |
31 #define HANDLE_MSG(hwnd, message, fn) \ | |
32 case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn)) | |
33 #endif | |
34 | |
35 /* void Cls_OnWintabPacket(HWND hwnd, HCTX hCtx, UINT sn) */ | |
36 #define HANDLE_WT_PACKET(hwnd, wParam, lParam, fn) \ | |
37 ((fn)((hwnd), (HCTX)(lParam), (UINT)(wParam)), 0L) | |
38 #define FORWARD__WT_PACKET(hwnd, bs, hCtx, sn, fn) \ | |
39 (void)(fn)((hwnd), _WT_PACKET(bs), (WPARAM)(UINT)(sn), (LPARAM)(HCTX)(hCtx)) | |
40 #define FORWARD_WT_PACKET(hwnd, hCtx, sn, fn) \ | |
41 FORWARD__WT_PACKET(hwnd, WT_DEFBASE, hCtx, sn, fn) | |
42 | |
43 /* void Cls_OnWintabCtxOpen(HWND hwnd, HCTX hCtx, UINT sf) */ | |
44 #define HANDLE_WT_CTXOPEN(hwnd, wParam, lParam, fn) \ | |
45 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) | |
46 #define FORWARD__WT_CTXOPEN(hwnd, bs, hCtx, sf, fn) \ | |
47 (void)(fn)((hwnd), _WT_CTXOPEN(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) | |
48 #define FORWARD_WT_CTXOPEN(hwnd, hCtx, sf, fn) \ | |
49 FORWARD__WT_CTXOPEN(hwnd, WT_DEFBASE, hCtx, sf, fn) | |
50 | |
51 /* void Cls_OnWintabCtxClose(HWND hwnd, HCTX hCtx, UINT sf) */ | |
52 #define HANDLE_WT_CTXCLOSE(hwnd, wParam, lParam, fn) \ | |
53 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) | |
54 #define FORWARD__WT_CTXCLOSE(hwnd, bs, hCtx, sf, fn) \ | |
55 (void)(fn)((hwnd), _WT_CTXCLOSE(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) | |
56 #define FORWARD_WT_CTXCLOSE(hwnd, hCtx, sf, fn) \ | |
57 FORWARD__WT_CTXCLOSE(hwnd, WT_DEFBASE, hCtx, sf, fn) | |
58 | |
59 /* void Cls_OnWintabCtxUpdate(HWND hwnd, HCTX hCtx, UINT sf) */ | |
60 #define HANDLE_WT_CTXUPDATE(hwnd, wParam, lParam, fn) \ | |
61 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) | |
62 #define FORWARD__WT_CTXUPDATE(hwnd, bs, hCtx, sf, fn) \ | |
63 (void)(fn)((hwnd), _WT_CTXUPDATE(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) | |
64 #define FORWARD_WT_CTXUPDATE(hwnd, hCtx, sf, fn) \ | |
65 FORWARD__WT_CTXUPDATE(hwnd, WT_DEFBASE, hCtx, sf, fn) | |
66 | |
67 /* void Cls_OnWintabCtxOverlap(HWND hwnd, HCTX hCtx, UINT sf) */ | |
68 #define HANDLE_WT_CTXOVERLAP(hwnd, wParam, lParam, fn) \ | |
69 ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) | |
70 #define FORWARD__WT_CTXOVERLAP(hwnd, bs, hCtx, sf, fn) \ | |
71 (void)(fn)((hwnd), _WT_CTXOVERLAP(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) | |
72 #define FORWARD_WT_CTXOVERLAP(hwnd, hCtx, sf, fn) \ | |
73 FORWARD__WT_CTXOVERLAP(hwnd, WT_DEFBASE, hCtx, sf, fn) | |
74 | |
75 /* void Cls_OnWintabProximity(HWND hwnd, HCTX hCtx, BOOL cp, BOOL hp) */ | |
76 #define HANDLE_WT_PROXIMITY(hwnd, wParam, lParam, fn) \ | |
77 ((fn)((hwnd), (HCTX)(wParam), (BOOL)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) | |
78 #define FORWARD__WT_PROXIMITY(hwnd, bs, hCtx, cp, hp, fn) \ | |
79 (void)(fn)((hwnd), _WT_PROXIMITY(bs), (WPARAM)(HCTX)(hCtx), MAKELPARAM((cp), (hp)) | |
80 #define FORWARD_WT_PROXIMITY(hwnd, hCtx, sf, fn) \ | |
81 FORWARD__WT_PROXIMITY(hwnd, WT_DEFBASE, hCtx, cp, hp, fn) | |
82 | |
83 /* void Cls_OnWintabInfoChange(HWND hwnd, HMGR hMgr, UINT c, UINT i) */ | |
84 #define HANDLE_WT_INFOCHANGE(hwnd, wParam, lParam, fn) \ | |
85 ((fn)((hwnd), (HMGR)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) | |
86 #define FORWARD__WT_INFOCHANGE(hwnd, bs, hMgr, cp, hp, fn) \ | |
87 (void)(fn)((hwnd), _WT_INFOCHANGE(bs), (WPARAM)(HMGR)(hMgr), MAKELPARAM((c), (i)) | |
88 #define FORWARD_WT_INFOCHANGE(hwnd, hMgr, sf, fn) \ | |
89 FORWARD__WT_INFOCHANGE(hwnd, WT_DEFBASE, hMgr, cp, hp, fn) | |
90 | |
91 /****** Alternate porting layer macros ****************************************/ | |
92 | |
93 #define GET_WT_PACKET_HCTX(wp, lp) ((HCTX)lp) | |
94 #define GET_WT_PACKET_SERIAL(wp, lp) (wp) | |
95 #define GET_WT_PACKET_MPS(h, s) \ | |
96 (s), (LPARAM)(h) | |
97 | |
98 #define GET_WT_CTXOPEN_HCTX(wp, lp) ((HCTX)wp) | |
99 #define GET_WT_CTXOPEN_STATUS(wp, lp) ((UINT)lp) | |
100 #define GET_WT_CTXOPEN_MPS(h, s) \ | |
101 (WPARAM)(h), (LPARAM)(s) | |
102 | |
103 #define GET_WT_CTXCLOSE_HCTX(wp, lp) ((HCTX)wp) | |
104 #define GET_WT_CTXCLOSE_STATUS(wp, lp) ((UINT)lp) | |
105 #define GET_WT_CTXCLOSE_MPS(h, s) \ | |
106 (WPARAM)(h), (LPARAM)(s) | |
107 | |
108 #define GET_WT_CTXUPDATE_HCTX(wp, lp) ((HCTX)wp) | |
109 #define GET_WT_CTXUPDATE_STATUS(wp, lp) ((UINT)lp) | |
110 #define GET_WT_CTXUPDATE_MPS(h, s) \ | |
111 (WPARAM)(h), (LPARAM)(s) | |
112 | |
113 #define GET_WT_CTXOVERLAP_HCTX(wp, lp) ((HCTX)wp) | |
114 #define GET_WT_CTXOVERLAP_STATUS(wp, lp) ((UINT)lp) | |
115 #define GET_WT_CTXOVERLAP_MPS(h, s) \ | |
116 (WPARAM)(h), (LPARAM)(s) | |
117 | |
118 #define GET_WT_PROXIMITY_HCTX(wp, lp) ((HCTX)wp) | |
119 #define GET_WT_PROXIMITY_CTXPROX(wp, lp) LOWORD(lp) | |
120 #define GET_WT_PROXIMITY_HARDPROX(wp, lp) HIWORD(lp) | |
121 #define GET_WT_PROXIMITY_MPS(h, fc, fh) \ | |
122 (WPARAM)(h), MAKELONG(fc, fh) | |
123 | |
124 #define GET_WT_INFOCHANGE_HMGR(wp, lp) ((HMGR)wp) | |
125 #define GET_WT_INFOCHANGE_CATEGORY(wp, lp) LOWORD(lp) | |
126 #define GET_WT_INFOCHANGE_INDEX(wp, lp) HIWORD(lp) | |
127 #define GET_WT_INFOCHANGE_MPS(h, c, i) \ | |
128 (WPARAM)(h), MAKELONG(c, i) | |
129 | |
130 | |
131 #ifdef __cplusplus | |
132 } | |
133 #endif /* __cplusplus */ | |
134 | |
135 #endif /* #define _INC_WINTABX */ | |
136 |