]>
Dogcows Code - chaz/openbox/blob - application.cc
e325a58218bc824557bcf4b5573a85b4b9bff9f3
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "application.hh"
8 #include "eventhandler.hh"
11 #include "property.hh"
12 #include "rendercolor.hh"
24 Application::Application(int argc
, char **argv
)
33 const ScreenInfo
*s_info
= _display
.screenInfo(DefaultScreen(*_display
));
36 RenderColor::initialize();
37 Property::initialize();
38 _img_ctrl
= new ImageControl(s_info
, True
, 4, 5, 200);
39 _style_conf
= new Configuration(False
);
40 _style
= new Style(_img_ctrl
);
45 Application::~Application()
50 RenderColor::destroy();
54 void Application::loadStyle(void)
56 // find the style name as a property
57 std::string style
= "/usr/local/share/openbox/styles/artwiz";
58 _style_conf
->setFile(style
);
59 if (!_style_conf
->load()) {
60 std::cerr
<< "ERROR: Unable to load style \"" << style
<< "\".\n";
63 _style
->load(*_style_conf
);
66 void Application::run(void)
68 if (_appwidget_count
<= 0) {
69 std::cerr
<< "ERROR: No main widgets exist. You must create and show() " <<
70 "an AppWidget for the Application before calling " <<
71 "Application::run().\n";
75 while (_appwidget_count
> 0) {
77 Timer::dispatchTimers(); // fire pending events
This page took 0.034403 seconds and 3 git commands to generate.