version 1.2, 2017/07/06 10:18:04
|
version 1.4, 2017/07/30 21:59:40
|
Line 15 declareExternalFunction(XtAppMainLoop)
|
Line 15 declareExternalFunction(XtAppMainLoop)
|
pullFromStack(appObject, external); |
pullFromStack(appObject, external); |
returnOnError(freeObject(appObject)); |
returnOnError(freeObject(appObject)); |
|
|
if (subType(appObject) ne APPCONTEXT) then |
ifIsExternal(appObject, APPCONTEXT) then |
|
orElse |
executionError("Type mismatch"); |
executionError("Type mismatch"); |
returnOnError(freeObject(appObject)); |
returnOnError(freeObject(appObject)); |
endIf |
endIf |
|
|
|
intrinsic(pshcntxt); |
|
|
doUntil |
doUntil |
if (XtAppPending(target((sXtAppContext *) |
if (XtAppPending(target(objectContainer(sXtAppContext, |
objectContainer(appObject)).context) ne 0) then |
appObject)).context) ne 0) then |
XtAppNextEvent(target((sXtAppContext *) |
XtAppNextEvent(target(objectContainer(sXtAppContext, |
objectContainer(appObject)).context, &event); |
appObject)).context, &event); |
|
|
if (event.type eq DestroyNotify) then |
if (event.type eq DestroyNotify) then |
if (event.xdestroywindow.window eq |
if (event.xdestroywindow.window eq |
XtWindow(target((sXtAppContext *) |
XtWindow(target(objectContainer(sXtAppContext, |
objectContainer(appObject)).widget)) then |
appObject)).widget)) then |
XtAppSetExitFlag(target((sXtAppContext *) |
XtAppSetExitFlag(target(objectContainer( |
objectContainer(appObject)).context); |
sXtAppContext, appObject)).context); |
endIf |
endIf |
endIf |
endIf |
|
|
Line 40 declareExternalFunction(XtAppMainLoop)
|
Line 43 declareExternalFunction(XtAppMainLoop)
|
pollSignalsAndInterrupts(); |
pollSignalsAndInterrupts(); |
usleep(10000); |
usleep(10000); |
endIf |
endIf |
repeatUntil(XtAppGetExitFlag(target((sXtAppContext *) |
repeatUntil(XtAppGetExitFlag(target( |
objectContainer(appObject)).context) or |
objectContainer(sXtAppContext, appObject)).context) or |
(stopRequest eq -1) or |
(stopRequest eq -1) or |
(exitMainLoop ne 0)) |
(exitMainLoop ne 0)) |
|
|
XtDestroyApplicationContext(target((sXtAppContext *) |
intrinsic(pulcntxt); |
objectContainer(appObject)).context); |
|
|
XtDestroyApplicationContext(target( |
|
objectContainer(sXtAppContext, appObject)).context); |
orElse |
orElse |
executionError("Application not initialized"); |
executionError("Application not initialized"); |
returnOnError(); |
returnOnError(); |