Mercurial > sdl-ios-xcode
view src/video/win32/wactab/wintabx.h @ 3168:6338b7f2d024
Hi,
I have prepared a set of patches to readd WindowsCE support to SDL 1.3.
I've created a new GAPI/Rawframebuffer and a DirectDraw renderer.
Both renderers are work in progress and there are several unimplemented
cases. (Notably
RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and
texture blending )
Nevertheless I am successfully using these renderers together with the
SDL software renderer. (On most devices the SDL software renderer will
be much faster as there are only badly optimized vendor drivers available)
I send these patches now in this unpolished state because there seems to
be some interest in win ce and someone has to start supporting SDL 1.3
Now on to the patches:
wince_events_window_fixes.patch
fixes some wince incompatibilities and adds fullscreen support via
SHFullScreen. NOTE: This patch shouldn't have any side effects on
Windows, but I have NOT tested it on Windows, so please double-check.
This patch doesn't dependent on the following ones.
wince_renderers_system.patch
This patch does all necessary modifications to the SDL system.
- it adds the renderers to the configure system
- it adds the renderers to win32video
SDL_ceddrawrender.c
SDL_ceddrawrender.h
SDL_gapirender_c.h
SDL_gapirender.c
SDL_gapirender.h
these files add the new render drivers and should be placed in
src/video/win32
Some notes to people who want to test this:
- I have only compiled sdl with ming32ce, so the VisualC files are not
up to date
- As mingw32ce has no ddraw.h this file must be taken from the MS SDK
and modified to work with gcc
- I had to modify line 2611 in configure.in to
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer
-Wl,--image-base -Wl,0x10000"
otherwise GetCPinfo wouldn't link. If someone knows whats causing this
I'd be happy to hear about it.
It would be great if these patches could make their way into SVN as this
would make collaboration much much easier.
I'm out of office for the next week and therefore will be unavailable
via email.
Regards
Stefan
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 07 Jun 2009 02:44:46 +0000 |
parents | f23ebf1ddac4 |
children |
line wrap: on
line source
/* *INDENT-OFF* */ /* ------------------------------- wintabx.h -------------------------------- */ /* Combined 16 & 32-bit version. */ /*------------------------------------------------------------------------------ The text and information contained in this file may be freely used, copied, or distributed without compensation or licensing restrictions. This file is copyright 1991-1998 by LCS/Telegraphics. ------------------------------------------------------------------------------*/ #ifndef _INC_WINTABX /* prevent multiple includes */ #define _INC_WINTABX #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* prototype for wintabx.lib. */ #define _UnlinkWinTab _UnlinkWintab #ifdef WIN32 extern WINAPI _UnlinkWintab(void); #else extern FAR _UnlinkWintab(void); #endif /****** Wintab message crackers ***********************************************/ #ifndef HANDLE_MSG #define HANDLE_MSG(hwnd, message, fn) \ case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn)) #endif /* void Cls_OnWintabPacket(HWND hwnd, HCTX hCtx, UINT sn) */ #define HANDLE_WT_PACKET(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HCTX)(lParam), (UINT)(wParam)), 0L) #define FORWARD__WT_PACKET(hwnd, bs, hCtx, sn, fn) \ (void)(fn)((hwnd), _WT_PACKET(bs), (WPARAM)(UINT)(sn), (LPARAM)(HCTX)(hCtx)) #define FORWARD_WT_PACKET(hwnd, hCtx, sn, fn) \ FORWARD__WT_PACKET(hwnd, WT_DEFBASE, hCtx, sn, fn) /* void Cls_OnWintabCtxOpen(HWND hwnd, HCTX hCtx, UINT sf) */ #define HANDLE_WT_CTXOPEN(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) #define FORWARD__WT_CTXOPEN(hwnd, bs, hCtx, sf, fn) \ (void)(fn)((hwnd), _WT_CTXOPEN(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) #define FORWARD_WT_CTXOPEN(hwnd, hCtx, sf, fn) \ FORWARD__WT_CTXOPEN(hwnd, WT_DEFBASE, hCtx, sf, fn) /* void Cls_OnWintabCtxClose(HWND hwnd, HCTX hCtx, UINT sf) */ #define HANDLE_WT_CTXCLOSE(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) #define FORWARD__WT_CTXCLOSE(hwnd, bs, hCtx, sf, fn) \ (void)(fn)((hwnd), _WT_CTXCLOSE(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) #define FORWARD_WT_CTXCLOSE(hwnd, hCtx, sf, fn) \ FORWARD__WT_CTXCLOSE(hwnd, WT_DEFBASE, hCtx, sf, fn) /* void Cls_OnWintabCtxUpdate(HWND hwnd, HCTX hCtx, UINT sf) */ #define HANDLE_WT_CTXUPDATE(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) #define FORWARD__WT_CTXUPDATE(hwnd, bs, hCtx, sf, fn) \ (void)(fn)((hwnd), _WT_CTXUPDATE(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) #define FORWARD_WT_CTXUPDATE(hwnd, hCtx, sf, fn) \ FORWARD__WT_CTXUPDATE(hwnd, WT_DEFBASE, hCtx, sf, fn) /* void Cls_OnWintabCtxOverlap(HWND hwnd, HCTX hCtx, UINT sf) */ #define HANDLE_WT_CTXOVERLAP(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HCTX)(wParam), (UINT)(lParam)), 0L) #define FORWARD__WT_CTXOVERLAP(hwnd, bs, hCtx, sf, fn) \ (void)(fn)((hwnd), _WT_CTXOVERLAP(bs), (WPARAM)(HCTX)(hCtx), (LPARAM)(UINT)(sf)) #define FORWARD_WT_CTXOVERLAP(hwnd, hCtx, sf, fn) \ FORWARD__WT_CTXOVERLAP(hwnd, WT_DEFBASE, hCtx, sf, fn) /* void Cls_OnWintabProximity(HWND hwnd, HCTX hCtx, BOOL cp, BOOL hp) */ #define HANDLE_WT_PROXIMITY(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HCTX)(wParam), (BOOL)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) #define FORWARD__WT_PROXIMITY(hwnd, bs, hCtx, cp, hp, fn) \ (void)(fn)((hwnd), _WT_PROXIMITY(bs), (WPARAM)(HCTX)(hCtx), MAKELPARAM((cp), (hp)) #define FORWARD_WT_PROXIMITY(hwnd, hCtx, sf, fn) \ FORWARD__WT_PROXIMITY(hwnd, WT_DEFBASE, hCtx, cp, hp, fn) /* void Cls_OnWintabInfoChange(HWND hwnd, HMGR hMgr, UINT c, UINT i) */ #define HANDLE_WT_INFOCHANGE(hwnd, wParam, lParam, fn) \ ((fn)((hwnd), (HMGR)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) #define FORWARD__WT_INFOCHANGE(hwnd, bs, hMgr, cp, hp, fn) \ (void)(fn)((hwnd), _WT_INFOCHANGE(bs), (WPARAM)(HMGR)(hMgr), MAKELPARAM((c), (i)) #define FORWARD_WT_INFOCHANGE(hwnd, hMgr, sf, fn) \ FORWARD__WT_INFOCHANGE(hwnd, WT_DEFBASE, hMgr, cp, hp, fn) /****** Alternate porting layer macros ****************************************/ #define GET_WT_PACKET_HCTX(wp, lp) ((HCTX)lp) #define GET_WT_PACKET_SERIAL(wp, lp) (wp) #define GET_WT_PACKET_MPS(h, s) \ (s), (LPARAM)(h) #define GET_WT_CTXOPEN_HCTX(wp, lp) ((HCTX)wp) #define GET_WT_CTXOPEN_STATUS(wp, lp) ((UINT)lp) #define GET_WT_CTXOPEN_MPS(h, s) \ (WPARAM)(h), (LPARAM)(s) #define GET_WT_CTXCLOSE_HCTX(wp, lp) ((HCTX)wp) #define GET_WT_CTXCLOSE_STATUS(wp, lp) ((UINT)lp) #define GET_WT_CTXCLOSE_MPS(h, s) \ (WPARAM)(h), (LPARAM)(s) #define GET_WT_CTXUPDATE_HCTX(wp, lp) ((HCTX)wp) #define GET_WT_CTXUPDATE_STATUS(wp, lp) ((UINT)lp) #define GET_WT_CTXUPDATE_MPS(h, s) \ (WPARAM)(h), (LPARAM)(s) #define GET_WT_CTXOVERLAP_HCTX(wp, lp) ((HCTX)wp) #define GET_WT_CTXOVERLAP_STATUS(wp, lp) ((UINT)lp) #define GET_WT_CTXOVERLAP_MPS(h, s) \ (WPARAM)(h), (LPARAM)(s) #define GET_WT_PROXIMITY_HCTX(wp, lp) ((HCTX)wp) #define GET_WT_PROXIMITY_CTXPROX(wp, lp) LOWORD(lp) #define GET_WT_PROXIMITY_HARDPROX(wp, lp) HIWORD(lp) #define GET_WT_PROXIMITY_MPS(h, fc, fh) \ (WPARAM)(h), MAKELONG(fc, fh) #define GET_WT_INFOCHANGE_HMGR(wp, lp) ((HMGR)wp) #define GET_WT_INFOCHANGE_CATEGORY(wp, lp) LOWORD(lp) #define GET_WT_INFOCHANGE_INDEX(wp, lp) HIWORD(lp) #define GET_WT_INFOCHANGE_MPS(h, c, i) \ (WPARAM)(h), MAKELONG(c, i) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* #define _INC_WINTABX */