SDL/include
Sam Lantinga 7f458450f5 Date: Thu, 19 Jan 2006 20:02:29 +0200
From: Vassilis Virvilis <vasvir@iit.demokritos.gr>
Subject: [SDL] Request: Please reconsider adding tag in SDL_Event

Hi,

Patch in question:

--- include/SDL_events.h        20 Aug 2004 18:57:01 -0000      1.11
+++ include/SDL_events.h        19 Jan 2006 17:35:09 -0000
@@ -214,7 +214,7 @@
  } SDL_SysWMEvent;

  /* General event structure */
-typedef union {
+typedef union SDL_Event {
         Uint8 type;
         SDL_ActiveEvent active;
         SDL_KeyboardEvent key;

Reasoning:
----------
1) Allows forward declaration of the SDL_Event union in C++. Please
note that in plain C it is possible to forward declare it.

2) Forward declaration is good because it allows encapsulation. It hides
the specific implementation and does not necessarily exposes SDL staff
to my appication's namespace

3) It can't harm plain C because tags are living in a different namespace
than typenames

4) It is already done like this in other places in SDL. Check for example
SDL_KeySym, and SDL_.*Event structures.

5) Right now I have to include SDL/event.h from a C++ header file. See 2)
2006-01-20 13:07:25 +00:00
..
.cvsignore Initial revision 2001-04-26 16:45:43 +00:00
begin_code.h OS/2 port! 2005-11-23 07:29:56 +00:00
close_code.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
Makefile.am Added SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE() in SDL_cpuinfo.h 2003-11-18 01:27:06 +00:00
SDL_active.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_audio.h Date: Fri, 20 Aug 2004 08:31:20 +0200 2004-08-20 18:57:01 +00:00
SDL_byteorder.h OS/2 port! 2005-11-23 07:29:56 +00:00
SDL_cdrom.h Added some parentheses for a little more macro safety. Recommended by Petri 2005-04-17 10:16:30 +00:00
SDL_copying.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_cpuinfo.h Fixed bugs in CPU feature detection and added extended feature detection 2004-01-24 05:47:19 +00:00
SDL_endian.h Optimize also for 68020 and higher CPUs 2005-03-30 12:38:03 +00:00
SDL_error.h Updated for Visual C++ 6 build 2004-11-15 23:34:56 +00:00
SDL_events.h Date: Thu, 19 Jan 2006 20:02:29 +0200 2006-01-20 13:07:25 +00:00
SDL_getenv.h Explicitly specify the SDL API calling convention (C by default) 2002-04-11 14:35:16 +00:00
SDL_joystick.h Date: Wed, 7 Jul 2004 12:57:58 +0200 2004-07-18 19:05:06 +00:00
SDL_keyboard.h Date: Mon, 3 May 2004 03:15:01 +0100 2004-07-18 22:57:40 +00:00
SDL_keysym.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_loadso.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_main.h Patch from Martin Lange (mala-sdl at hotmail.com) to unregister SDL's win32 2005-09-27 09:00:42 +00:00
SDL_mouse.h Added some parentheses for a little more macro safety. Recommended by Petri 2005-04-17 10:16:30 +00:00
SDL_mutex.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_name.h Added a new header file: SDL_loadso.h 2002-03-06 05:20:11 +00:00
SDL_opengl.h Updated to the latest glext.h 2005-12-14 05:55:17 +00:00
SDL_quit.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_rwops.h Date: Fri, 20 Aug 2004 08:31:20 +0200 2004-08-20 18:57:01 +00:00
SDL_syswm.h The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails: 2005-09-08 06:16:14 +00:00
SDL_thread.h OS/2 port! 2005-11-23 07:29:56 +00:00
SDL_timer.h Fix various problems with the timer code. 2005-01-13 23:24:56 +00:00
SDL_types.h OS/2 port! 2005-11-23 07:29:56 +00:00
SDL_version.h Bumped the version number for the next release 2006-01-04 01:08:40 +00:00
SDL_video.h Allow SDL to be loaded by Matlab 2005-01-02 05:11:16 +00:00
SDL.h Added #include "SDL_loadso.h" to SDL.h. 2005-11-23 07:07:19 +00:00