]>
Dogcows Code - chaz/openbox/blob - otk/application.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "application.hh"
8 #include "eventhandler.hh"
22 Application::Application(int argc
, char **argv
)
31 const ScreenInfo
*s_info
= _display
.screenInfo(DefaultScreen(*_display
));
34 _img_ctrl
= new ImageControl(s_info
, True
, 4, 5, 200);
35 _style_conf
= new Configuration(False
);
36 _style
= new Style(_img_ctrl
);
41 Application::~Application()
49 void Application::loadStyle(void)
51 // find the style name as a property
52 std::string style
= "/usr/local/share/openbox/styles/artwiz";
53 _style_conf
->setFile(style
);
54 if (!_style_conf
->load()) {
55 std::cerr
<< "ERROR: Unable to load style \"" << style
<< "\".\n";
58 _style
->load(*_style_conf
);
61 void Application::run(void)
63 if (_appwidget_count
<= 0) {
64 std::cerr
<< "ERROR: No main widgets exist. You must create and show() " <<
65 "an AppWidget for the Application before calling " <<
66 "Application::run().\n";
70 while (_appwidget_count
> 0) {
72 Timer::dispatchTimers(); // fire pending events
This page took 0.034699 seconds and 4 git commands to generate.