include/SDL_assert.h
changeset 8167 82ec2a95e664
parent 8149 681eb46b8ac4
child 8189 ab1045579b92
equal deleted inserted replaced
8166:d1be9ce49463 8167:82ec2a95e664
   201 extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
   201 extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
   202                                             SDL_AssertionHandler handler,
   202                                             SDL_AssertionHandler handler,
   203                                             void *userdata);
   203                                             void *userdata);
   204 
   204 
   205 /**
   205 /**
       
   206  *  \brief Get the default assertion handler.
       
   207  *
       
   208  *  This returns the function pointer that is called by default when an
       
   209  *   assertion is triggered. This is an internal function provided by SDL,
       
   210  *   that is used for assertions when SDL_SetAssertionHandler() hasn't been
       
   211  *   used to provide a different function.
       
   212  *
       
   213  *  \return The default SDL_AssertionHandler that is called when an assert triggers.
       
   214  */
       
   215 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
       
   216 
       
   217 /**
       
   218  *  \brief Get the current assertion handler.
       
   219  *
       
   220  *  This returns the function pointer that is called when an assertion is
       
   221  *   triggered. This is either the value last passed to
       
   222  *   SDL_SetAssertionHandler(), or if no application-specified function is
       
   223  *   set, is equivalent to calling SDL_GetDefaultAssertionHandler().
       
   224  *
       
   225  *   \param puserdata Pointer to a void*, which will store the "userdata"
       
   226  *                    pointer that was passed to SDL_SetAssertionHandler().
       
   227  *                    This value will always be NULL for the default handler.
       
   228  *                    If you don't care about this data, it is safe to pass
       
   229  *                    a NULL pointer to this function to ignore it.
       
   230  *  \return The SDL_AssertionHandler that is called when an assert triggers.
       
   231  */
       
   232 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
       
   233 
       
   234 /**
   206  *  \brief Get a list of all assertion failures.
   235  *  \brief Get a list of all assertion failures.
   207  *
   236  *
   208  *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),
   237  *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),
   209  *  or the start of the program.
   238  *  or the start of the program.
   210  *
   239  *