]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.hh
update to cleaned up otk api
[chaz/openbox] / src / openbox.hh
index a257cb243cb49dd52e2e75a98f30dafe1a2f4fbb..30dc9f688c50e6289837533dd186697379d551d9 100644 (file)
@@ -6,26 +6,32 @@
   @brief The main class for the Openbox window manager
 */
 
+/*
+  cuz girls look soooo goood.. on the end of my DICK
+*/
+
 extern "C" {
 #include <X11/Xlib.h>
 }
 
 #include <string>
 #include <vector>
-#include <map>
 
+#include "python.hh"
 #include "otk/screeninfo.hh"
 #include "otk/timerqueuemanager.hh"
 #include "otk/property.hh"
 #include "otk/configuration.hh"
-#include "xeventhandler.hh"
-#include "client.hh"
+#include "otk/eventdispatcher.hh"
+#include "otk/eventhandler.hh"
 
 namespace ob {
 
 class OBScreen;
+class OBClient;
+class OBActions;
 
-//! The main class for the Openbox window manager.
+//! The main class for the Openbox window manager
 /*!
   Only a single instance of the Openbox class may be used in the application. A
   pointer to this instance is held in the Openbox::instance static member
@@ -35,10 +41,10 @@ class OBScreen;
   not exit until the window manager is ready to be destroyed. Destruction of
   the Openbox class instance will shutdown the window manager.
 */
-class Openbox
+class Openbox : public otk::OtkEventDispatcher, public otk::OtkEventHandler
 {
 public:
-  //! The single instance of the Openbox class for the application.
+  //! 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.
@@ -62,9 +68,6 @@ public:
     Cursor ur_angle; //!< For resizing the right corner of a window
   };
   
-  //! A map for looking up a specific client class from the window id
-  typedef std::map<Window, OBClient *> ClientMap;
-
   //! A list of OBScreen classes
   typedef std::vector<OBScreen *> ScreenList;
   
@@ -86,7 +89,7 @@ private:
   char *_argv0;
 
   //! A list of all managed clients
-  ClientMap _clients;
+  PyDictObject *_clients;
 
   //! A list of all the managed screens
   ScreenList _screens;
@@ -98,9 +101,6 @@ private:
   */
   otk::OBTimerQueueManager _timermanager;
 
-  //! The class which will handle raw XEvents
-  OBXEventHandler _xeventhandler;
-
   //! Cached atoms on the display
   /*!
     This is a pointer because the OBProperty class uses otk::OBDisplay::display
@@ -109,6 +109,9 @@ private:
   */
   otk::OBProperty *_property;
 
+  //! The action interface through which all user-available actions occur
+  OBActions *_actions;
+
   //! The running state of the window manager
   RunState _state;
 
@@ -155,7 +158,7 @@ public:
   inline const otk::OBProperty *property() const { return _property; }
 
   //! Returns a managed screen
-  inline const OBScreen *screen(int num) const {
+  inline OBScreen *screen(int num) {
     assert(num >= 0); assert(num < (signed)_screens.size());
     return _screens[num];
   }
@@ -163,6 +166,8 @@ public:
   //! Returns the mouse cursors used throughout Openbox
   inline const Cursors &cursors() const { return _cursors; }
 
+  inline PyDictObject *clients() const { return _clients; }
+
   //! The main function of the Openbox class
   /*!
     This function should be called after instantiating the Openbox class.
This page took 0.02146 seconds and 4 git commands to generate.