diff include/SDL_compat.h @ 3407:d3baf5ac4e37

Partial fix for bug #859 Header file update from Ken for improved doxygen output
author Sam Lantinga <slouken@libsdl.org>
date Mon, 19 Oct 2009 13:31:58 +0000
parents c5b2884c26b4
children 0267b8b1595c
line wrap: on
line diff
--- a/include/SDL_compat.h	Sun Oct 18 23:21:15 2009 +0000
+++ b/include/SDL_compat.h	Mon Oct 19 13:31:58 2009 +0000
@@ -20,13 +20,26 @@
     slouken@libsdl.org
 */
 
-/* This file contains functions for backwards compatibility with SDL 1.2 */
+ /**
+ *  \defgroup Compatibility SDL 1.2 Compatibility API
+ */
+/*@{*/
 
-/* 
-   #define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
-   SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
-   SDL 1.3/2.0
-*/
+/**
+ *  \file SDL_compat.h
+ *
+ *  This file contains functions for backwards compatibility with SDL 1.2.
+ */
+
+/**
+ *  \def SDL_NO_COMPAT
+ *
+ *  #define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
+ *  SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
+ *  SDL 1.3/2.0.
+ */
+
+ /*@}*/
 
 #ifdef SDL_NO_COMPAT
 #define _SDL_compat_h
@@ -46,7 +59,16 @@
 /* *INDENT-ON* */
 #endif
 
-#define SDL_SWSURFACE       0x00000000  /* Not used */
+/**
+ *  \addtogroup Compatibility
+ */
+/*@{*/
+
+/**
+ *  \name Surface flags
+ */
+/*@{*/
+#define SDL_SWSURFACE       0x00000000  /**< \note Not used */
 #define SDL_SRCALPHA        0x00010000
 #define SDL_SRCCOLORKEY     0x00020000
 #define SDL_ANYFORMAT       0x00100000
@@ -56,10 +78,11 @@
 #define SDL_RESIZABLE       0x01000000
 #define SDL_NOFRAME         0x02000000
 #define SDL_OPENGL          0x04000000
-#define SDL_HWSURFACE       0x08000001  /* Not used */
-#define SDL_ASYNCBLIT       0x08000000  /* Not used */
-#define SDL_RLEACCELOK      0x08000000  /* Not used */
-#define SDL_HWACCEL         0x08000000  /* Not used */
+#define SDL_HWSURFACE       0x08000001  /**< \note Not used */
+#define SDL_ASYNCBLIT       0x08000000  /**< \note Not used */
+#define SDL_RLEACCELOK      0x08000000  /**< \note Not used */
+#define SDL_HWACCEL         0x08000000  /**< \note Not used */
+/*@}*//*Surface flags*/
 
 #define SDL_APPMOUSEFOCUS	0x01
 #define SDL_APPINPUTFOCUS	0x02
@@ -103,35 +126,51 @@
     int current_h;
 } SDL_VideoInfo;
 
-/* The most common video overlay formats.
-   For an explanation of these pixel formats, see:
-   http://www.webartz.com/fourcc/indexyuv.htm
-
-   For information on the relationship between color spaces, see:
-   http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
+/**
+ *  \name Overlay formats
+ *
+ *  The most common video overlay formats.
+ *  
+ *  For an explanation of these pixel formats, see:
+ *  http://www.webartz.com/fourcc/indexyuv.htm
+ *  
+ *  For information on the relationship between color spaces, see:
+ *  http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
  */
-#define SDL_YV12_OVERLAY  0x32315659    /* Planar mode: Y + V + U  (3 planes) */
-#define SDL_IYUV_OVERLAY  0x56555949    /* Planar mode: Y + U + V  (3 planes) */
-#define SDL_YUY2_OVERLAY  0x32595559    /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
-#define SDL_UYVY_OVERLAY  0x59565955    /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
-#define SDL_YVYU_OVERLAY  0x55595659    /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
+/*@{*/
+#define SDL_YV12_OVERLAY  0x32315659    /**< Planar mode: Y + V + U  (3 planes) */
+#define SDL_IYUV_OVERLAY  0x56555949    /**< Planar mode: Y + U + V  (3 planes) */
+#define SDL_YUY2_OVERLAY  0x32595559    /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
+#define SDL_UYVY_OVERLAY  0x59565955    /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
+#define SDL_YVYU_OVERLAY  0x55595659    /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
+/*@}*//*Overlay formats*/
 
-/* The YUV hardware video overlay */
+/**
+ *  The YUV hardware video overlay.
+ */
 typedef struct SDL_Overlay
 {
-    Uint32 format;              /* Read-only */
-    int w, h;                   /* Read-only */
-    int planes;                 /* Read-only */
-    Uint16 *pitches;            /* Read-only */
-    Uint8 **pixels;             /* Read-write */
+    Uint32 format;              /**< Read-only */
+    int w, h;                   /**< Read-only */
+    int planes;                 /**< Read-only */
+    Uint16 *pitches;            /**< Read-only */
+    Uint8 **pixels;             /**< Read-write */
 
-    /* Hardware-specific surface info */
+    /** 
+     *  \name Hardware-specific surface info
+     */
+    /*@{*/
     struct private_yuvhwfuncs *hwfuncs;
     struct private_yuvhwdata *hwdata;
+    /*@}*//*Hardware-specific surface info*/
 
-    /* Special flags */
-    Uint32 hw_overlay:1;        /* Flag: This overlay hardware accelerated? */
+    /** 
+     *  \name Special flags
+     */
+    /*@{*/
+    Uint32 hw_overlay:1;        /**< Flag: This overlay hardware accelerated? */
     Uint32 UnusedBits:31;
+    /*@}*//*Special flags*/
 } SDL_Overlay;
 
 typedef enum
@@ -143,9 +182,17 @@
 
 struct SDL_SysWMinfo;
 
-/* Obsolete or renamed key codes */
+/**
+ *  \name Obsolete or renamed key codes
+ */
+/*@{*/
 
-/* These key constants were renamed for clarity or consistency. */
+/** 
+ *  \name Renamed keys
+ *
+ *  These key constants were renamed for clarity or consistency. 
+ */
+/*@{*/
 #define SDLK_0	'0'
 #define SDLK_1	'1'
 #define SDLK_2	'2'
@@ -214,19 +261,35 @@
 #define SDLK_NUMLOCK SDLK_NUMLOCKCLEAR
 #define SDLK_SCROLLOCK SDLK_SCROLLLOCK
 #define SDLK_PRINT SDLK_PRINTSCREEN
+/*@}*//*Renamed keys*/
 
-/* The META modifier is equivalent to the GUI modifier from the USB standard */
+/**
+ *  \name META modifier
+ *  
+ *  The META modifier is equivalent to the GUI modifier from the USB standard.
+ */
+/*@{*/
 #define KMOD_LMETA KMOD_LGUI
 #define KMOD_RMETA KMOD_RGUI
 #define KMOD_META KMOD_GUI
+/*@}*//*META modifier*/
 
-/* These keys don't appear in the USB specification (or at least not under those names). I'm unsure if the following assignments make sense or if these codes should be defined as actual additional SDLK_ constants. */
+/** 
+ *  \name Not in USB
+ *
+ *  These keys don't appear in the USB specification (or at least not under 
+ *  those names). I'm unsure if the following assignments make sense or if these
+ *  codes should be defined as actual additional SDLK_ constants.
+ */
+/*@{*/
 #define SDLK_LSUPER SDLK_LMETA
 #define SDLK_RSUPER SDLK_RMETA
 #define SDLK_COMPOSE SDLK_APPLICATION
 #define SDLK_BREAK SDLK_STOP
 #define SDLK_EURO SDLK_2
+/*@}*//*Not in USB*/
 
+/*@}*//*Obsolete or renamed key codes*/
 
 #define SDL_SetModuleHandle(x)
 #define SDL_AllocSurface    SDL_CreateRGBSurface
@@ -287,6 +350,8 @@
 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
 
+/*@}*//*Compatibility*/
+
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 /* *INDENT-OFF* */