X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FScreen.h;h=24baba1f1dd8d963f09a8ed860500b3c15508d0b;hb=63f8386dde9fb610492dd9a10d0a688f16d0dcf4;hp=99fbf40210dc0f924291d673350964affd4aa67a;hpb=b2453eec0ec7cc33140041c644cfa14bac232824;p=chaz%2Fopenbox diff --git a/src/Screen.h b/src/Screen.h index 99fbf402..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; @@ -187,7 +195,12 @@ public: inline Toolbar *getToolbar() { return toolbar; } - inline Workspace *getWorkspace(int w) { return workspacesList->find(w); } + Rect availableArea() const; + + inline Workspace *getWorkspace(unsigned int w) { + ASSERT(w < workspacesList.size()); + return workspacesList[w]; + } inline Workspace *getCurrentWorkspace() { return current_workspace; } inline Workspacemenu *getWorkspacemenu() { return workspacemenu; } @@ -205,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; } @@ -218,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; } @@ -285,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); @@ -310,7 +323,8 @@ public: void updateNetizenWindowLower(Window); enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, - BestFitPlacement, LeftRight, RightLeft, TopBottom, BottomTop }; + BestFitPlacement, UnderMousePlacement, ClickMousePlacement, + LeftRight, RightLeft, TopBottom, BottomTop }; enum { LeftJustify = 1, RightJustify, CenterJustify }; enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet }; enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure,