summaryrefslogtreecommitdiff
path: root/iup/src/mot/iupmot_loop.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2010-06-15 00:59:57 -0700
committerPixel <pixel@nobis-crew.org>2010-06-15 00:59:57 -0700
commiteed0eb6a476d54ce19aeff137984aa981d9e3976 (patch)
tree807891636efd2f87dcbd261e971216269973ae07 /iup/src/mot/iupmot_loop.c
parentccc8261e4d48de89da4ddfe7b55e378ae0cd6f47 (diff)
Upgrading to iup 3.1
Diffstat (limited to 'iup/src/mot/iupmot_loop.c')
-rwxr-xr-xiup/src/mot/iupmot_loop.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/iup/src/mot/iupmot_loop.c b/iup/src/mot/iupmot_loop.c
index 828ddcd..c1f92ec 100755
--- a/iup/src/mot/iupmot_loop.c
+++ b/iup/src/mot/iupmot_loop.c
@@ -56,7 +56,7 @@ void iupdrvSetIdleFunction(Icallback f)
mot_idle_id = XtAppAddWorkProc(iupmot_appcontext, motIdlecbWorkProc, NULL);
}
-static int motLoopStep(void)
+static int motLoopProcessEvent(void)
{
XtAppProcessEvent(iupmot_appcontext, XtIMAll);
return (mot_exitmainloop)? IUP_CLOSE : IUP_DEFAULT;
@@ -79,7 +79,7 @@ int IupMainLoop(void)
while (!mot_exitmainloop)
{
- if (motLoopStep() == IUP_CLOSE)
+ if (motLoopProcessEvent() == IUP_CLOSE)
break;
}
@@ -88,19 +88,26 @@ int IupMainLoop(void)
return IUP_NOERROR;
}
+int IupLoopStepWait(void)
+{
+ while(!XtAppPending(iupmot_appcontext));
+
+ return motLoopProcessEvent();
+}
+
int IupLoopStep(void)
{
if (!XtAppPending(iupmot_appcontext))
return IUP_DEFAULT;
- return motLoopStep();
+ return motLoopProcessEvent();
}
void IupFlush(void)
{
while (XPending(iupmot_display) != 0)
{
- if (motLoopStep() == IUP_CLOSE)
+ if (motLoopProcessEvent() == IUP_CLOSE)
break;
}