2015-05-09 08:50:23 -05:00
|
|
|
// 9 may 2015
|
2015-08-27 11:05:11 -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;
|
|
|
|
static void *onShouldQuitData;
|
|
|
|
|
|
|
|
void uiOnShouldQuit(int (*f)(void *), void *data)
|
|
|
|
{
|
|
|
|
onShouldQuit = f;
|
|
|
|
onShouldQuitData = data;
|
|
|
|
}
|
|
|
|
|
|
|
|
int shouldQuit(void)
|
|
|
|
{
|
|
|
|
return (*onShouldQuit)(onShouldQuitData);
|
|
|
|
}
|