Ignore SIGHUP's
[forms.git] / src / F_FLTK_UI.C
blob754eafdd0bf38207bcc43632c697791efb7aa401
2  /*
3   *   Copyright (C) 2007, Harbour, All rights reserved.
4   */
6 #include <F_FLTK_UI.H>
8 // Well the only good UI for X11 I can see now is FLTK-2.0, so sorry others ;)
10 //#include <fltk/FL_API.h>
11 //#include <fltk/Threads.h>
12 //#include <fltk/run.h>
13 #include <FL/Fl.H>
15 using namespace F;
16 using namespace ost;
18 bool F_FLTK_UI::probe()
20  if (::getenv("DISPLAY"))
21    return true;
22  return false;
25 void F_FLTK_UI::initial()
27  Fl::lock(); // we need this before creating any user threads
28  init(); // user init/create widgets
31 // main loop
32 void F_FLTK_UI::run()
34  ui_started_.post();
35  // log("fltk_ui", "Default fltk main_loop has started.");
36  while (1) {
37   // do main fltk work, so our apps _has_ to be thread aware
38   Fl::wait(.01);
39   //void* m = fltk::thread_message();
40   //printf("Received message: %p\n", m);
41  }