diff options
author | Bob Pendleton <bob@pendleton.com> | 2009-06-05 23:36:00 +0000 |
---|---|---|
committer | Bob Pendleton <bob@pendleton.com> | 2009-06-05 23:36:00 +0000 |
commit | 2011e3d29b7c401551eca5e537d3e7be3e34582f (patch) | |
tree | 848a840440b426d1b966194f90d19c89a726701b /include/SDL_events.h | |
parent | 3795d42a61d1169ae389711529004b6eb1a7da6c (diff) |
Added a #ifndef SDL_NO_COMPAT around SDL_ActiveEvent and SDL_ResizeEvent so that code
that has a #defien SDL_NO_COMPAT before the #include SDL.h with not be able to use
these obsolete events.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403624
Diffstat (limited to 'include/SDL_events.h')
-rw-r--r-- | include/SDL_events.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/SDL_events.h b/include/SDL_events.h index 34c2a124..f613bb27 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -313,28 +313,31 @@ typedef struct SDL_SysWMEvent SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */ } SDL_SysWMEvent; +typedef struct SDL_ProximityEvent +{ + Uint8 type; + Uint8 which; + int cursor; + int x; + int y; +} SDL_ProximityEvent; + /* Typedefs for backwards compatibility */ +#ifndef SDL_NO_COMPAT typedef struct SDL_ActiveEvent { Uint8 type; Uint8 gain; Uint8 state; } SDL_ActiveEvent; + typedef struct SDL_ResizeEvent { Uint8 type; int w; int h; } SDL_ResizeEvent; - -typedef struct SDL_ProximityEvent -{ - Uint8 type; - Uint8 which; - int cursor; - int x; - int y; -} SDL_ProximityEvent; +#endif /** * \union SDL_Event @@ -360,8 +363,10 @@ typedef union SDL_Event SDL_ProximityEvent proximity; /**< Proximity In or Out event */ /* Temporarily here for backwards compatibility */ +#ifndef SDL_NO_COMPAT SDL_ActiveEvent active; SDL_ResizeEvent resize; +#endif } SDL_Event; |