summaryrefslogtreecommitdiff
path: root/iup/src/mot/iupmot_focus.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/src/mot/iupmot_focus.c
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/src/mot/iupmot_focus.c')
-rwxr-xr-xiup/src/mot/iupmot_focus.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/iup/src/mot/iupmot_focus.c b/iup/src/mot/iupmot_focus.c
new file mode 100755
index 0000000..5b09bd9
--- /dev/null
+++ b/iup/src/mot/iupmot_focus.c
@@ -0,0 +1,35 @@
+/** \file
+ * \brief Motif Focus
+ *
+ * See Copyright Notice in "iup.h"
+ */
+
+#include <Xm/Xm.h>
+
+#include <stdio.h>
+
+#include "iup.h"
+
+#include "iup_object.h"
+#include "iup_focus.h"
+#include "iup_attrib.h"
+#include "iup_assert.h"
+#include "iup_drv.h"
+
+#include "iupmot_drv.h"
+
+void iupdrvSetFocus(Ihandle *ih)
+{
+ XmProcessTraversal(ih->handle, XmTRAVERSE_CURRENT);
+}
+
+void iupmotFocusChangeEvent(Widget w, Ihandle *ih, XEvent *evt, Boolean *cont)
+{
+ (void)w;
+ (void)cont;
+
+ if (evt->type == FocusIn)
+ iupCallGetFocusCb(ih);
+ else if (evt->type == FocusOut)
+ iupCallKillFocusCb(ih);
+}