1 /***************************************************************************
2     begin       : Fri Jan 22 2010
3     copyright   : (C) 2010 by Martin Preuss
4     email       : martin@libchipcard.de
5 
6  ***************************************************************************
7  *          Please see toplevel file COPYING for license details           *
8  ***************************************************************************/
9 
10 
11 #ifdef HAVE_CONFIG_H
12 # include <config.h>
13 #endif
14 
15 
16 #include "fox16_gui_updater_l.hpp"
17 
18 #include <gwenhywfar/debug.h>
19 
20 
21 
22 
23 FXDEFMAP(FOX16_GuiUpdater) FOX16_GuiUpdaterMap[]= {
24   FXMAPFUNC(SEL_CHORE, FOX16_GuiUpdater::ID_CHORE, FOX16_GuiUpdater::onChore),
25 };
26 
27 
FXIMPLEMENT(FOX16_GuiUpdater,FXObject,FOX16_GuiUpdaterMap,ARRAYNUMBER (FOX16_GuiUpdaterMap))28 FXIMPLEMENT(FOX16_GuiUpdater, FXObject, FOX16_GuiUpdaterMap, ARRAYNUMBER(FOX16_GuiUpdaterMap))
29 
30 
31 
32 FOX16_GuiUpdater::FOX16_GuiUpdater()
33   :FXObject()
34   , m_guiIdleFlag(0) {
35 }
36 
37 
38 
~FOX16_GuiUpdater()39 FOX16_GuiUpdater::~FOX16_GuiUpdater() {
40 }
41 
42 
43 
44 
guiUpdate()45 void FOX16_GuiUpdater::guiUpdate() {
46   FXApp *a=FXApp::instance();
47 
48   a->addChore(this, ID_CHORE);
49   a->flush(true);
50 
51   m_guiIdleFlag=0;
52   a->runUntil(m_guiIdleFlag);
53 }
54 
55 
56 
onChore(FXObject *,FXSelector,void *)57 long FOX16_GuiUpdater::onChore(FXObject*, FXSelector, void*) {
58   m_guiIdleFlag=1;
59   return 1;
60 }
61 
62