Initial commit
[forms.git] / src / F_FLTK_UI.C
blob9df29c4edc3dc654d60b0e3d2f6a1f169db1e6d7
2 #include <F_FLTK_UI.H>
4 // Well the only good UI for X11 I can see now is FLTK-2.0, so sorry others ;)
6 //#include <fltk/FL_API.h>
7 //#include <fltk/Threads.h>
8 //#include <fltk/run.h>
9 #include <FL/Fl.H>
11 using namespace F;
12 using namespace ost;
14 bool F_FLTK_UI::probe()
16  if (::getenv("DISPLAY"))
17    return true;
18  return false;
21 void F_FLTK_UI::initial()
23  Fl::lock(); // we need this before creating any user threads
24  init(); // user init/create widgets
27 // main loop
28 void F_FLTK_UI::run()
30  ui_started_.post();
31  // log("fltk_ui", "Default fltk main_loop has started.");
32  while (1) {
33   // do main fltk work, so our apps _has_ to be thread aware
34   Fl::wait();
35   //void* m = fltk::thread_message();
36   //printf("Received message: %p\n", m);
37   //Thread::sleep(10);
38  }