X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FScreen.h;h=24baba1f1dd8d963f09a8ed860500b3c15508d0b;hb=20d7381ffb3b7b918c0f6120cce8c0343a50ce83;hp=124d4f98635501e60d89aca4f674638b285f1f27;hpb=8ef0610e9056613eeb1988dde95d252bc0988883;p=chaz%2Fopenbox diff --git a/src/Screen.h b/src/Screen.h index 124d4f98..24baba1f 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -40,7 +40,6 @@ #include "BaseDisplay.h" #include "Configmenu.h" #include "Iconmenu.h" -#include "LinkedList.h" #include "Netizen.h" #include "Rootmenu.h" #include "Timer.h" @@ -52,6 +51,10 @@ #endif // SLIT #include "Image.h" #include "Resource.h" +#include "Util.h" + +#include +#include // forward declaration class BScreen; @@ -109,9 +112,12 @@ private: Iconmenu *iconmenu; Rootmenu *rootmenu; - LinkedList *rootmenuList; - LinkedList *netizenList; - LinkedList *iconList; + typedef std::list menuList; + menuList rootmenuList; + typedef std::list netList; + netList netizenList; + typedef std::list winList; + winList iconList; // winList is declared in Workspace.h #ifdef SLIT Slit *slit; @@ -124,15 +130,17 @@ private: unsigned int geom_w, geom_h; unsigned long event_mask; - LinkedList *workspaceNames; - LinkedList *workspacesList; + typedef std::vector wkspNameList; + wkspNameList workspaceNames; + typedef std::vector wkspList; + wkspList workspacesList; struct resource { WindowStyle wstyle; ToolbarStyle tstyle; MenuStyle mstyle; - bool sloppy_focus, auto_raise, auto_edge_balance, image_dither, focus_last, + bool sloppy_focus, auto_raise, auto_edge_balance, focus_last, ordered_dither, opaque_move, hide_toolbar, full_max, focus_new; BColor border_color; Resource styleconfig; @@ -189,7 +197,10 @@ public: Rect availableArea() const; - inline Workspace *getWorkspace(int w) { return workspacesList->find(w); } + inline Workspace *getWorkspace(unsigned int w) { + ASSERT(w < workspacesList.size()); + return workspacesList[w]; + } inline Workspace *getCurrentWorkspace() { return current_workspace; } inline Workspacemenu *getWorkspacemenu() { return workspacemenu; } @@ -207,8 +218,8 @@ public: inline const int getCurrentWorkspaceID() { return current_workspace->getWorkspaceID(); } - inline const int getWorkspaceCount() { return workspacesList->count(); } - inline const int getIconCount() { return iconList->count(); } + inline const int getWorkspaceCount() { return workspacesList.size(); } + inline const int getIconCount() { return iconList.size(); } inline const Bool &isRootColormapInstalled() const { return root_colormap_installed; } @@ -220,7 +231,7 @@ public: inline bool autoRaise() const { return resource.auto_raise; } void setAutoRaise(bool a); - inline bool imageDither() const { return resource.image_dither; } + inline bool imageDither() const { return image_control->doDither(); } void setImageDither(bool d, bool reconfig = true); inline bool orderedDither() const { return resource.ordered_dither; } @@ -287,7 +298,7 @@ public: void removeNetizen(Window); void addIcon(OpenboxWindow *); void removeIcon(OpenboxWindow *); - char* getNameOfWorkspace(int); + const char *getNameOfWorkspace(int); void changeWorkspaceID(int); void raiseWindows(Window *, int); void reassociateWindow(OpenboxWindow *, int, Bool);