1 #include "application.hh"
2 #include "eventhandler.hh"
14 OtkApplication::OtkApplication(int argc, char **argv)
15 : OtkEventDispatcher(), _dockable(false)
20 OBDisplay::initialize(0);
21 const ScreenInfo *s_info = OBDisplay::screenInfo(DefaultScreen(OBDisplay::display));
23 _timer_manager = new OBTimerQueueManager();
24 _img_ctrl = new BImageControl(_timer_manager, s_info, True, 4, 5, 200);
25 _style_conf = new Configuration(False);
26 _style = new Style(_img_ctrl);
31 OtkApplication::~OtkApplication()
35 delete _timer_manager;
41 void OtkApplication::loadStyle(void)
43 // find the style name as a property
44 std::string style = "/usr/local/share/openbox/styles/artwiz";
45 _style_conf->setFile(style);
46 if (!_style_conf->load()) {
47 std::cerr << "Unable to load style \"" << style << "\". Aborting.\n";
50 _style->load(*_style_conf);
53 void OtkApplication::exec(void)
57 _timer_manager->fire(); // fire pending events