Wiki Page Content

Differences between revisions 2 and 6 (spanning 4 versions)
Revision 2 as of 2011-09-17 19:18:12
Size: 1618
Editor: SheenaSmith
Comment: update content - correct category name
Revision 6 as of 2014-01-06 18:14:20
Size: 1672
Comment: Removed * from SDL_LogOutputFunction's return type.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 17: Line 16:
||'''callback'''||the callback function to get; see [[#Remarks|Remarks]] for details||
||'''userdata'''||a pointer to a pointer that is passed to '''callback'''||
||'''callback'''||a pointer filled in with the current log callback; see [[#Remarks|Remarks]] for details||
||'''userdata'''||a pointer filled in with the pointer that is passed to '''callback'''||
Line 27: Line 26:
 {{{
void* SDL_LogOutputFunction(void* userdata,
                            int category,
                            SDL_LogPriority priority,
                            const char* message)
 {{{#!highlight cpp
void SDL_LogOutputFunction(void* userdata,
                           int category,
                           SDL_LogPriority priority,
                           const char* message)
Line 33: Line 32:
 where
 ||`userdata`||is passed as '''userdata''' to [[SDL_LogGetOutputFunction]]()||
 ||`category`||^the category to query^||
 ||`priority`||the [[SDL_LogPriority]] ^to query^; see [[#Remarks|below]] for details||
 ||`message`||^the log output message ???^||
 and
 `priority` may be one of the following ^or NULL ???^:
 . where its parameters are:
 ||`userdata`||what was passed as '''userdata''' to [[SDL_LogSetOutputFunction]]()||
 ||`category`||the category of the message; see [[#category|Remarks]] for details||
 ||`priority`||the priority of the message; see [[#priority|Remarks]] for details||
 ||`message`||the message being output||

 <<Anchor(category)>>
 The `category` will be one of:
 <<Include(SDL_LOG_CATEGORY, , , from="== Values ==", to="== Code Examples ==")>>

 <<Anchor(priority)>>
 The `priority` will be one of:
Line 41: Line 45:

 <<Color2(green,Should there be some reference to [[SDL_LOG_CATEGORY]] for `category`?)>>


''You can add useful comments here''

SDL_LogGetOutputFunction

Use this function to get the current log output function.

Syntax

void SDL_LogGetOutputFunction(SDL_LogOutputFunction* callback,
                              void**                 userdata)

Function Parameters

callback

a pointer filled in with the current log callback; see Remarks for details

userdata

a pointer filled in with the 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 category of the message; see Remarks for details

    priority

    the priority of the message; see Remarks for details

    message

    the message being output

    The category will be one of:

    SDL_LOG_CATEGORY_APPLICATION

    application log

    SDL_LOG_CATEGORY_ERROR

    error log

    SDL_LOG_CATEGORY_ASSERT

    assert log

    SDL_LOG_CATEGORY_SYSTEM

    system log

    SDL_LOG_CATEGORY_AUDIO

    audio log

    SDL_LOG_CATEGORY_VIDEO

    video log

    SDL_LOG_CATEGORY_RENDER

    render log

    SDL_LOG_CATEGORY_INPUT

    input log

    SDL_LOG_CATEGORY_TEST

    test log

    SDL_LOG_CATEGORY_RESERVED#

    # = 1-10; reserved for future SDL library use

    SDL_LOG_CATEGORY_CUSTOM

    reserved for application use; see Remarks for details

    The priority will be one of:

    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)


CategoryAPI, CategoryLog

None: SDL_LogGetOutputFunction (last edited 2014-01-06 18:14:20 by JonathanDearborn)

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