2015-05-09 08:50:23 -05:00
|
|
|
// 9 may 2015
|
2015-10-16 17:31:14 -05:00
|
|
|
#include "../ui.h"
|
2015-05-09 08:50:23 -05:00
|
|
|
#include "uipriv.h"
|
|
|
|
|
|
|
|
static int defaultOnShouldQuit(void *data)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int (*onShouldQuit)(void *) = defaultOnShouldQuit;
|
2018-04-16 01:31:24 -05:00
|
|
|
static void *onShouldQuitData = NULL;
|
2015-05-09 08:50:23 -05:00
|
|
|
|
|
|
|
void uiOnShouldQuit(int (*f)(void *), void *data)
|
|
|
|
{
|
|
|
|
onShouldQuit = f;
|
|
|
|
onShouldQuitData = data;
|
|
|
|
}
|
|
|
|
|
2018-04-15 20:54:46 -05:00
|
|
|
int uiprivShouldQuit(void)
|
2015-05-09 08:50:23 -05:00
|
|
|
{
|
|
|
|
return (*onShouldQuit)(onShouldQuitData);
|
|
|
|
}
|