X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.h;h=009b57fcd3fd6830f8363838900e4ee859b08066;hb=935b35c6a6746b748155351558496604759baae4;hp=c62dfa2ab6f542c6191b85fad66c1608bc025397;hpb=30b899fc025e7fee283be7170bd642b509f5c7b5;p=chaz%2Fopenbox diff --git a/src/openbox.h b/src/openbox.h index c62dfa2a..009b57fc 100644 --- a/src/openbox.h +++ b/src/openbox.h @@ -47,6 +47,7 @@ #include #include +#include //forward declaration class BScreen; @@ -87,7 +88,7 @@ private: struct resource { Time double_click_interval; - char *menu_file, *style_file; + char *style_file; char *titlebar_layout; int colors_per_channel; timeval auto_raise_delay; @@ -115,10 +116,10 @@ private: typedef std::list MenuTimestampList; MenuTimestampList menuTimestamps; - typedef std::list ScreenList; + typedef std::vector ScreenList; ScreenList screenList; - BScreen *focused_screen; + BScreen *current_screen; OpenboxWindow *masked_window; BTimer *timer; @@ -129,7 +130,7 @@ private: Bool no_focus, reconfigure_wait, reread_menu_wait; Time last_time; Window masked; - char *rc_file, **argv; + char *menu_file, *rc_file, **argv; int argc; Resource config; @@ -144,7 +145,7 @@ protected: public: - Openbox(int, char **, char * = 0, char * = 0); + Openbox(int, char **, char * = 0, char * = 0, char * = 0); virtual ~Openbox(); #ifdef HAVE_GETPID @@ -158,8 +159,14 @@ public: OpenboxWindow *focusedWindow(); void focusWindow(OpenboxWindow *w); - BScreen *getScreen(int); + inline BScreen *getScreen(unsigned int s) { + ASSERT(s < screenList.size()); + return screenList[s]; + } BScreen *searchScreen(Window); + inline unsigned int managedScreenCount() const { + return screenList.size(); + } inline Resource &getConfig() { return config; @@ -173,7 +180,8 @@ public: inline const char *getStyleFilename() const { return resource.style_file; } inline const char *getMenuFilename() const - { return resource.menu_file; } + { return menu_file; } + void addMenuTimestamp(const char *filename); inline const int &getColorsPerChannel() const { return resource.colors_per_channel; } @@ -197,7 +205,6 @@ public: void shutdown(); void setStyleFilename(const char *); - void setMenuFilename(const char *); void saveMenuSearch(Window, Basemenu *); void saveWindowSearch(Window, OpenboxWindow *); void saveToolbarSearch(Window, Toolbar *);