include/SDL_assert.h
changeset 8167 82ec2a95e664
parent 8149 681eb46b8ac4
child 8189 ab1045579b92
     1.1 --- a/include/SDL_assert.h	Mon Feb 03 23:08:53 2014 -0500
     1.2 +++ b/include/SDL_assert.h	Tue Feb 04 11:38:40 2014 -0500
     1.3 @@ -203,6 +203,35 @@
     1.4                                              void *userdata);
     1.5  
     1.6  /**
     1.7 + *  \brief Get the default assertion handler.
     1.8 + *
     1.9 + *  This returns the function pointer that is called by default when an
    1.10 + *   assertion is triggered. This is an internal function provided by SDL,
    1.11 + *   that is used for assertions when SDL_SetAssertionHandler() hasn't been
    1.12 + *   used to provide a different function.
    1.13 + *
    1.14 + *  \return The default SDL_AssertionHandler that is called when an assert triggers.
    1.15 + */
    1.16 +extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
    1.17 +
    1.18 +/**
    1.19 + *  \brief Get the current assertion handler.
    1.20 + *
    1.21 + *  This returns the function pointer that is called when an assertion is
    1.22 + *   triggered. This is either the value last passed to
    1.23 + *   SDL_SetAssertionHandler(), or if no application-specified function is
    1.24 + *   set, is equivalent to calling SDL_GetDefaultAssertionHandler().
    1.25 + *
    1.26 + *   \param puserdata Pointer to a void*, which will store the "userdata"
    1.27 + *                    pointer that was passed to SDL_SetAssertionHandler().
    1.28 + *                    This value will always be NULL for the default handler.
    1.29 + *                    If you don't care about this data, it is safe to pass
    1.30 + *                    a NULL pointer to this function to ignore it.
    1.31 + *  \return The SDL_AssertionHandler that is called when an assert triggers.
    1.32 + */
    1.33 +extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
    1.34 +
    1.35 +/**
    1.36   *  \brief Get a list of all assertion failures.
    1.37   *
    1.38   *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),