summaryrefslogtreecommitdiff
path: root/iup/src/mot/iupmot_focus.c
blob: 5b09bd95df1bb13b20c3e622a20b9bc419c864ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
}