#include "BaseDisplay.h"
#include "Configmenu.h"
#include "Iconmenu.h"
-#include "LinkedList.h"
#include "Netizen.h"
#include "Rootmenu.h"
#include "Timer.h"
#endif // SLIT
#include "Image.h"
#include "Resource.h"
+#include "Util.h"
+
+#include <list>
+#include <vector>
+typedef std::list<Rootmenu *> menuList;
+typedef std::list<Netizen *> netList;
+typedef std::vector<Workspace *> wkspList;
+typedef std::vector<std::string> wkspNameList;
// forward declaration
class BScreen;
Iconmenu *iconmenu;
Rootmenu *rootmenu;
- LinkedList<Rootmenu> *rootmenuList;
- LinkedList<Netizen> *netizenList;
- LinkedList<OpenboxWindow> *iconList;
+ menuList rootmenuList;
+ netList netizenList;
+ winList iconList; // winList is declared in Workspace.h
#ifdef SLIT
Slit *slit;
unsigned int geom_w, geom_h;
unsigned long event_mask;
- LinkedList<char> *workspaceNames;
- LinkedList<Workspace> *workspacesList;
+ wkspNameList workspaceNames;
+ 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;
inline Toolbar *getToolbar() { return toolbar; }
- inline Workspace *getWorkspace(int w) { return workspacesList->find(w); }
+ Rect availableArea() const;
+
+ inline Workspace *getWorkspace(int w) {
+ ASSERT(w < workspacesList.size());
+ return workspacesList[w];
+ }
inline Workspace *getCurrentWorkspace() { return current_workspace; }
inline Workspacemenu *getWorkspacemenu() { return workspacemenu; }
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; }
inline bool autoRaise() const { return resource.auto_raise; }
void setAutoRaise(bool a);
- inline bool imageDither() const { return resource.image_dither; }
- void setImageDither(bool d);
+ inline bool imageDither() const { return image_control->doDither(); }
+ void setImageDither(bool d, bool reconfig = true);
inline bool orderedDither() const { return resource.ordered_dither; }
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);
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,