aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/App.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2002-12-01 13:42:15 (GMT)
committerrathnor <rathnor>2002-12-01 13:42:15 (GMT)
commit28b5c604490094e187494dcc566bd3d7a05a2c25 (patch)
tree8f78f5714a5cd055c10b067a2656fe7b2338e71a /src/FbTk/App.cc
parentb9134162f9633784d9097df18769a699a62650fe (diff)
downloadfluxbox_pavel-28b5c604490094e187494dcc566bd3d7a05a2c25.zip
fluxbox_pavel-28b5c604490094e187494dcc566bd3d7a05a2c25.tar.bz2
Indenting from tabs to emacs 4-space
Diffstat (limited to 'src/FbTk/App.cc')
-rw-r--r--src/FbTk/App.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc
index e32c806..3daf61a 100644
--- a/src/FbTk/App.cc
+++ b/src/FbTk/App.cc
@@ -31,37 +31,37 @@ namespace FbTk {
31App *App::s_app = 0; 31App *App::s_app = 0;
32 32
33App *App::instance() { 33App *App::instance() {
34 if (s_app == 0) 34 if (s_app == 0)
35 throw std::string("You must create an instance of FbTk::App first!"); 35 throw std::string("You must create an instance of FbTk::App first!");
36 return s_app; 36 return s_app;
37} 37}
38 38
39App::App(const char *displayname):m_done(false) { 39App::App(const char *displayname):m_done(false) {
40 if (s_app != 0) 40 if (s_app != 0)
41 throw std::string("Can't create more than one instance of FbTk::App"); 41 throw std::string("Can't create more than one instance of FbTk::App");
42 s_app = this; 42 s_app = this;
43 m_display = XOpenDisplay(displayname); 43 m_display = XOpenDisplay(displayname);
44} 44}
45 45
46App::~App() { 46App::~App() {
47 if (m_display != 0) { 47 if (m_display != 0) {
48 XCloseDisplay(m_display); 48 XCloseDisplay(m_display);
49 m_display = 0; 49 m_display = 0;
50 } 50 }
51 s_app = 0; 51 s_app = 0;
52} 52}
53 53
54void App::eventLoop() { 54void App::eventLoop() {
55 XEvent ev; 55 XEvent ev;
56 while (!m_done) { 56 while (!m_done) {
57 XNextEvent(display(), &ev); 57 XNextEvent(display(), &ev);
58 EventManager::instance()->handleEvent(ev); 58 EventManager::instance()->handleEvent(ev);
59 } 59 }
60} 60}
61 61
62 62
63void App::end() { 63void App::end() {
64 m_done = true; //end loop in App::eventLoop 64 m_done = true; //end loop in App::eventLoop
65} 65}
66 66
67}; // end namespace FbTk 67}; // end namespace FbTk