]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.hh
include widgetbase not widget
[chaz/openbox] / src / openbox.hh
index 5167189796014706db503ad4f5e15e88d5287f8a..2b8e8b07f5b1aab3ff0e120063baf19656409731 100644 (file)
@@ -14,9 +14,8 @@ extern "C" {
 #include <vector>
 #include <map>
 
+#include "otk/display.hh"
 #include "otk/screeninfo.hh"
-#include "otk/timerqueuemanager.hh"
-#include "otk/property.hh"
 #include "otk/configuration.hh"
 #include "otk/eventdispatcher.hh"
 #include "otk/eventhandler.hh"
@@ -38,6 +37,14 @@ struct Cursors {
   Cursor ur_angle; //!< For resizing the right corner of a window
 };
 
+class Openbox;
+
+//! The single instance of the Openbox class for the application
+/*!
+  Since this variable is globally available in the application, the Openbox
+  class does not need to be passed around to any of the other classes.
+*/
+extern Openbox *openbox;
 
 //! The main class for the Openbox window manager
 /*!
@@ -52,13 +59,6 @@ struct Cursors {
 class Openbox : public otk::EventDispatcher, public otk::EventHandler
 {
 public:
-  //! The single instance of the Openbox class for the application
-  /*!
-    Since this variable is globally available in the application, the Openbox
-    class does not need to be passed around to any of the other classes.
-  */
-  static Openbox *instance;
-
   //! The posible running states of the window manager
   enum RunState {
     State_Starting, //!< The window manager is starting up (being created)
@@ -73,6 +73,9 @@ public:
   typedef std::vector<Screen *> ScreenList;
   
 private:
+  //! The display on which Openbox is running
+  otk::Display _display;
+  
   // stuff that can be passed on the command line
   //! Path to the config file to use/in use
   /*!
@@ -104,21 +107,6 @@ private:
   //! A list of all the managed screens
   ScreenList _screens;
   
-  //! Manages all timers for the application
-  /*!
-    Use of the otk::TimerQueueManager::fire funtion in this object ensures
-    that all timers fire when their times elapse.
-  */
-  otk::TimerQueueManager _timermanager;
-
-  //! Cached atoms on the display
-  /*!
-    This is a pointer because the Property class uses otk::Display::display
-    in its constructor, so, it needs to be initialized <b>after</b> the display
-    is initialized in this class' constructor.
-  */
-  otk::Property *_property;
-
   //! The action interface through which all user-available actions occur
   Actions *_actions;
 
@@ -180,16 +168,6 @@ public:
   //! Returns the state of the window manager (starting, exiting, etc)
   inline RunState state() const { return _state; }
 
-  //! Returns the otk::TimerQueueManager for the application
-  /*!
-    All otk::Timer objects used in the application should be made to use this
-    otk::TimerQueueManager.
-  */
-  inline otk::TimerQueueManager *timerManager() { return &_timermanager; }
-
-  //! Returns the otk::Property instance for the window manager
-  inline const otk::Property *property() const { return _property; }
-
   //! Returns the Actions instance for the window manager
   inline Actions *actions() const { return _actions; }
 
@@ -199,7 +177,7 @@ public:
   //! Returns a managed screen
   inline Screen *screen(int num) {
     assert(num >= 0); assert(num < (signed)_screens.size());
-    if (num >= screenCount())
+    if (num < 0 || num >= screenCount())
       return NULL;
     return _screens[num];
   }
This page took 0.022408 seconds and 4 git commands to generate.