#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>
-typedef std::list<Rootmenu *> menuList;
-typedef std::list<Netizen *> netList;
+#include <vector>
// forward declaration
class BScreen;
Iconmenu *iconmenu;
Rootmenu *rootmenu;
+ typedef std::list<Rootmenu *> menuList;
menuList rootmenuList;
+ typedef std::list<Netizen *> netList;
netList netizenList;
- LinkedList<OpenboxWindow> *iconList;
+ typedef std::list<OpenboxWindow *> winList;
+ 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;
+ typedef std::vector<std::string> wkspNameList;
+ wkspNameList workspaceNames;
+ typedef std::vector<Workspace *> wkspList;
+ wkspList workspacesList;
struct resource {
WindowStyle wstyle;
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; }
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; }
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);