]> Dogcows Code - chaz/openbox/blob - otk/application.cc
there
[chaz/openbox] / otk / application.cc
1 #include "application.hh"
2 #include "eventhandler.hh"
3
4 namespace otk {
5
6 OtkApplication::OtkApplication(int argc, char **argv)
7 : OtkEventDispatcher(), _dockable(false)
8 {
9 argc = argc;
10 argv = argv;
11
12 OBDisplay::initialize(0);
13 const ScreenInfo *s_info = OBDisplay::screenInfo(DefaultScreen(OBDisplay::display));
14
15 _timer_manager = new OBTimerQueueManager();
16 _img_ctrl = new BImageControl(_timer_manager, s_info, True, 4, 5, 200);
17 _style_conf = new Configuration(False);
18 _style = new Style(_img_ctrl);
19
20 loadStyle();
21 }
22
23 OtkApplication::~OtkApplication()
24 {
25 delete _style_conf;
26 delete _img_ctrl;
27 delete _timer_manager;
28 delete _style;
29
30 OBDisplay::destroy();
31 }
32
33 void OtkApplication::loadStyle(void)
34 {
35 // find the style name as a property
36 _style_conf->setFile("/usr/local/share/openbox/styles/artwiz");
37 _style_conf->load();
38 _style->load(_style_conf);
39 }
40
41 void OtkApplication::exec(void)
42 {
43 dispatchEvents();
44 }
45
46 }
This page took 0.038241 seconds and 5 git commands to generate.