wikiheaders: Bind #defines below a function to it, like typedefs.

This effectively adds the property symbols for various functions to the
function's wiki page.
This commit is contained in:
Ryan C. Gordon
2024-05-02 12:49:30 -04:00
parent 0178b19489
commit 9f842e9b5a
4 changed files with 62 additions and 2 deletions

View File

@@ -1540,8 +1540,11 @@ extern DECLSPEC int SDLCALL SDL_LoadWAV_IO(SDL_IOStream * src, SDL_bool closeio,
extern DECLSPEC int SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec * spec,
Uint8 ** audio_buf, Uint32 * audio_len);
/**
* Maximum volume allowed in calls to SDL_MixAudioFormat.
*
* \since This macro is available since SDL 3.0.0.
*/
#define SDL_MIX_MAXVOLUME 128
/**

View File

@@ -375,6 +375,7 @@ extern DECLSPEC int SDLCALL SDL_CloseIO(SDL_IOStream *context);
*/
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetIOProperties(SDL_IOStream *context);
/* Possible `whence` values for SDL_IOStream seeking... */
#define SDL_IO_SEEK_SET 0 /**< Seek from the beginning of data */
#define SDL_IO_SEEK_CUR 1 /**< Seek relative to current read point */
#define SDL_IO_SEEK_END 2 /**< Seek relative to the end of data */

View File

@@ -2389,6 +2389,8 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
const char *fromcode,
const char *inbuf,
size_t inbytesleft);
/* Some helper macros for common cases... */
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)