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"
18 extern void initialize();
19 extern void destroy();
21 Application::Application(int argc, char **argv)
31 _screen = DefaultScreen(**display);
36 Application::~Application()
41 void Application::loadStyle(void)
43 // XXX: find the style name as a property
44 std::string style = "/usr/local/share/openbox/styles/artwiz";
45 //_style->load(style);
46 otk::RenderStyle::setStyle(_screen, style);
49 void Application::run(void)
51 if (_appwidget_count <= 0) {
52 std::cerr << "ERROR: No main widgets exist. You must create and show() " <<
53 "an AppWidget for the Application before calling " <<
54 "Application::run().\n";
58 while (_appwidget_count > 0) {
60 if (_appwidget_count > 0)
61 Timer::dispatchTimers(); // fire pending events