1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
5 #include "application.hh"
6 #include "eventhandler.hh"
9 #include "rendercolor.hh"
10 #include "renderstyle.hh"
22 Application::Application(int argc, char **argv)
31 _screen = DefaultScreen(*_display);
34 RenderColor::initialize();
35 RenderStyle::initialize();
36 Property::initialize();
41 Application::~Application()
43 RenderStyle::destroy();
44 RenderColor::destroy();
48 void Application::loadStyle(void)
50 // XXX: find the style name as a property
51 std::string style = "/usr/local/share/openbox/styles/artwiz";
52 //_style->load(style);
55 void Application::run(void)
57 if (_appwidget_count <= 0) {
58 std::cerr << "ERROR: No main widgets exist. You must create and show() " <<
59 "an AppWidget for the Application before calling " <<
60 "Application::run().\n";
64 while (_appwidget_count > 0) {
66 if (_appwidget_count <= 0)
68 Timer::dispatchTimers(); // fire pending events