Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2011-09-17 20:47:21
Size: 1746
Editor: SheenaSmith
Comment: update content - correct category name
Revision 3 as of 2011-11-06 20:03:10
Size: 1686
Editor: SheenaSmith
Comment: update content for consistency - callback (table)
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
||'''callback'''||the callback function to set; see [[#Remarks|Remarks]] for details|| ||'''callback'''||the log output function to set; see [[#Remarks|Remarks]] for details||
Line 26: Line 26:
<<Color2(green,Should this prototype be included here if the user is creating their own callback?)>>

The ^default^ function prototype for '''callback''' is:
The function prototype for '''callback''' is:
Line 35: Line 33:
 where
 ||`userdata`||is passed as '''userdata''' ^from^ [[SDL_LogSetOutputFunction]]()||
 ||`category`||^the category to query^||
 ||`priority`||the [[SDL_LogPriority]] ^to query^; see [[#Remarks|below]] for details||
 . where its parameters are:
 ||`userdata`||what was passed as '''userdata''' to [[SDL_LogSetOutputFunction]]()||
 ||`category`||^the log category to query ???^||
 ||`priority`||the [[SDL_LogPriority]] ^to query^; see [[#priority|below]] for details||
Line 40: Line 38:
 and
 `priority` may be one of the following ^or NULL ???^:
 <<Anchor(priority)>>
 . `priority` may be one of the following ^or NULL ???^:

DRAFT

SDL_LogSetOutputFunction

Use this function to replace the default log output function with one of your own.

Syntax

void SDL_LogSetOutputFunction(SDL_LogOutputFunction callback,
                              void*                 userdata)

Function Parameters

callback

the log output function to set; see Remarks for details

userdata

a pointer that is passed to callback

Code Examples

You can add your code example here

Remarks

The function prototype for callback is:

  • void* SDL_LogOutputFunction(void*           userdata,
                                int             category,
                                SDL_LogPriority priority,
                                const char*     message)
  • where its parameters are:

    userdata

    what was passed as userdata to SDL_LogSetOutputFunction()

    category

    the log category to query ???

    priority

    the SDL_LogPriority to query; see below for details

    message

    the log output message ???

  • priority may be one of the following or NULL ???:

    SDL_LOG_PRIORITY_VERBOSE

    SDL_LOG_PRIORITY_DEBUG

    SDL_LOG_PRIORITY_INFO

    SDL_LOG_PRIORITY_WARN

    SDL_LOG_PRIORITY_ERROR

    SDL_LOG_PRIORITY_CRITICAL

    SDL_NUM_LOG_PRIORITIES

    (internal use)

    green

You can add useful comments here


CategoryAPI, CategoryLog

None: SDL_LogSetOutputFunction (last edited 2014-01-06 18:15:19 by JonathanDearborn)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit