#include "debug.h"
#include <gnome--/main.h>
-#include "mainapp.h"
#include <glade/glade.h>
using std::endl;
} // namespace anon
-GLyxAppWin * mainAppWin;
int GUIRunTime::initApplication(int &, char * argv[])
{
string app_version(VERSION);
static Gnome::Main a(app_id, app_version, 1, argv);
glade_gnome_init(); // Initialize the glade library.
- static GLyxAppWin appWin;
- mainAppWin = &appWin;
return 0;
}
void GUIRunTime::processEvents()
{
- while(Gnome::Main::instance()->events_pending())
+ while (Gnome::Main::instance()->events_pending())
Gnome::Main::instance()->iteration(FALSE);
}
{
return fl_get_visual_depth();
}
+
+float GUIRunTime::getScreenDPI()
+{
+ Screen * scr = ScreenOfDisplay(fl_get_display(), fl_screen);
+ return ((HeightOfScreen(scr) * 25.4 / HeightMMOfScreen(scr)) +
+ (WidthOfScreen(scr) * 25.4 / WidthMMOfScreen(scr))) / 2;
+}