shouldQuit() -> uiprivShouldQuit().

This commit is contained in:
Pietro Gagliardi 2018-04-15 21:54:46 -04:00
parent 59835a9bae
commit f5be05f143
8 changed files with 8 additions and 11 deletions

View File

@ -1,7 +1,4 @@
// shouldquit.c
extern int shouldQuit(void);
// areaevents.c
typedef struct clickCounter clickCounter;
// you should call Reset() to zero-initialize a new instance

View File

@ -16,7 +16,7 @@ void uiOnShouldQuit(int (*f)(void *), void *data)
onShouldQuitData = data;
}
int shouldQuit(void)
int uiprivShouldQuit(void)
{
return (*onShouldQuit)(onShouldQuitData);
}

View File

@ -34,7 +34,7 @@ extern void uiprivDoUserBug(const char *file, const char *line, const char *func
#define uiprivUserBug(...) uiprivDoUserBug(__FILE__, uiprivMacro_ns(__LINE__), uiprivMacro__func__, __VA_ARGS__)
// shouldquit.c
extern int shouldQuit(void);
extern int uiprivShouldQuit(void);
// areaevents.c
typedef struct clickCounter clickCounter;

View File

@ -91,7 +91,7 @@ static BOOL stepsIsRunning;
{
// for debugging
NSLog(@"in applicationShouldTerminate:");
if (shouldQuit()) {
if (uiprivShouldQuit()) {
canQuit = YES;
// this will call terminate:, which is the same as uiQuit()
return NSTerminateNow;

View File

@ -71,7 +71,7 @@ static void mapItemReleaser(void *key, void *value)
- (IBAction)onQuitClicked:(id)sender
{
if (shouldQuit())
if (uiprivShouldQuit())
uiQuit();
}

View File

@ -81,7 +81,7 @@ static void defaultOnClicked(uiMenuItem *item, uiWindow *w, void *data)
static void onQuitClicked(uiMenuItem *item, uiWindow *w, void *data)
{
if (shouldQuit())
if (uiprivShouldQuit())
uiQuit();
}

View File

@ -68,7 +68,7 @@ static void defaultOnClicked(uiMenuItem *item, uiWindow *w, void *data)
static void onQuitClicked(uiMenuItem *item, uiWindow *w, void *data)
{
if (shouldQuit())
if (uiprivShouldQuit())
uiQuit();
}

View File

@ -23,8 +23,8 @@ static LRESULT CALLBACK utilWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, L
return lResult;
switch (uMsg) {
case WM_QUERYENDSESSION:
// TODO block handler
if (shouldQuit()) {
// TODO block handler (TODO figure out if this meant the Vista-style block handler or not)
if (uiprivShouldQuit()) {
uiQuit();
return TRUE;
}