X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.hh;h=460caa0cee00c09d5353fecb35800caf9517309c;hb=49a70012642a6d18529dc2efedc6e9c604c0a0b2;hp=e718dd2520cb5d0ce727ef5712e0e6e0035e85e7;hpb=7fe3301e7ea905a8a76d54c22751f3d8a346e28b;p=chaz%2Fopenbox diff --git a/src/openbox.hh b/src/openbox.hh index e718dd25..460caa0c 100644 --- a/src/openbox.hh +++ b/src/openbox.hh @@ -94,12 +94,17 @@ private: bool _sync; //! Should Openbox run on a single screen or on all available screens? bool _single; + //! Optimize for a remote/low-bandwidth connection to the display? + bool _remote; //! A list of all managed clients ClientMap _clients; //! A list of all the managed screens ScreenList _screens; + + //! The number of managed screens + int _managed_count; //! The action interface through which all user-available actions occur Actions *_actions; @@ -148,7 +153,6 @@ private: static void signalHandler(int signal); public: -#ifndef SWIG //! Openbox constructor. /*! \param argc Number of command line arguments, as received in main() @@ -157,7 +161,6 @@ public: Openbox(int argc, char **argv); //! Openbox destructor. virtual ~Openbox(); -#endif //! Returns the state of the window manager (starting, exiting, etc) inline RunState state() const { return _state; } @@ -175,14 +178,25 @@ public: */ inline Screen *screen(int num) { assert(num >= 0); assert(num < (signed)ScreenCount(**otk::display)); - if (num >= (signed)_screens.size()) return 0; + if (num < 0 || num >= (signed)_screens.size()) return 0; return _screens[num]; } + inline int managedScreenCount() const { return _managed_count; } + + inline Screen *managedScreen(int num) { + assert(num >= 0); assert(num < _managed_count); + if (num < 0 || num >= _managed_count) return 0; + ScreenList::iterator it, end = _screens.end(); + int i = -1; + for (it = _screens.begin(); it != end; ++it) + if (*it && ++i == num) + return *it; + } + //! Returns the mouse cursors used throughout Openbox inline const Cursors &cursors() const { return _cursors; } -#ifndef SWIG //! The main function of the Openbox class /*! This function should be called after instantiating the Openbox class. @@ -190,7 +204,6 @@ public: The Openbox::shutdown method will cause this function to exit. */ void eventLoop(); -#endif //! Adds an Client to the client list for lookups void addClient(Window window, Client *client);