+ //! Returns the Actions instance for the window manager
+ inline Actions *actions() const { return _actions; }
+
+ //! Returns the Bindings instance for the window manager
+ inline Bindings *bindings() const { return _bindings; }
+
+ //! Returns a managed screen or a null pointer
+ /*!
+ ALWAYS check the return value for a non-null, as any unmanaged screens
+ will return one. This includes screen(0) if the first managed screen is 1.
+ */
+ inline Screen *screen(int num) {
+ assert(num >= 0); assert(num < (signed)ScreenCount(**otk::display));
+ 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; }
+
+ //! The main function of the Openbox class
+ /*!
+ This function should be called after instantiating the Openbox class.
+ It loops indefinately while handling all events for the application.
+ The Openbox::shutdown method will cause this function to exit.
+ */