X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FScreen.h;h=bdeeaca5e92d1f541adeb5e882b186609beb4dcb;hb=3dcebcf56c6dd3a3707291e757af485bb55df7a6;hp=d49668f963c7153ecb74fd8aeac94e4f537993b1;hpb=dfc5f034581f5a26cba5c4811500438f89f0634a;p=chaz%2Fopenbox diff --git a/src/Screen.h b/src/Screen.h index d49668f9..bdeeaca5 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -51,6 +51,7 @@ # include "Slit.h" #endif // SLIT #include "Image.h" +#include "Resource.h" // forward declaration class BScreen; @@ -101,7 +102,7 @@ private: Pixmap geom_pixmap; Window geom_window; - Openbox *openbox; + Openbox &openbox; BImageControl *image_control; Configmenu *configmenu; Iconmenu *iconmenu; @@ -134,7 +135,7 @@ private: auto_edge_balance, image_dither, ordered_dither, opaque_move, full_max, focus_new, focus_last; BColor border_color; - XrmDatabase stylerc; + obResource styleconfig; int workspaces, toolbar_placement, toolbar_width_percent, placement_policy, edge_snap_threshold, row_direction, col_direction; @@ -161,19 +162,20 @@ private: protected: Bool parseMenuFile(FILE *, Rootmenu *); - void readDatabaseTexture(char *, char *, BTexture *, unsigned long); - void readDatabaseColor(char *, char *, BColor *, unsigned long); + void readDatabaseTexture(const char *, const char *, BTexture *, + unsigned long); + void readDatabaseColor(const char *, const char *, BColor *, unsigned long); - void readDatabaseFontSet(char *, char *, XFontSet *); - XFontSet createFontSet(char *); - void readDatabaseFont(char *, char *, XFontStruct **); + void readDatabaseFontSet(const char *, const char *, XFontSet *); + XFontSet createFontSet(const char *); + void readDatabaseFont(const char *, const char *, XFontStruct **); void InitMenu(void); void LoadStyle(void); public: - BScreen(Openbox *, int); + BScreen(Openbox &, int); ~BScreen(void); inline const Bool &isToolbarOnTop(void) const @@ -197,7 +199,7 @@ public: inline const GC &getOpGC() const { return opGC; } - inline Openbox *getOpenbox(void) { return openbox; } + inline Openbox &getOpenbox(void) { return openbox; } inline BColor *getBorderColor(void) { return &resource.border_color; } inline BImageControl *getImageControl(void) { return image_control; } inline Rootmenu *getRootmenu(void) { return rootmenu; } @@ -239,7 +241,7 @@ public: inline const int getCurrentWorkspaceID() { return current_workspace->getWorkspaceID(); } - inline const int getCount(void) { return workspacesList->count(); } + inline const int getWorkspaceCount(void) { return workspacesList->count(); } inline const int getIconCount(void) { return iconList->count(); } inline const int &getNumberOfWorkspaces(void) const { return resource.workspaces; } @@ -290,7 +292,7 @@ public: #ifdef HAVE_STRFTIME inline char *getStrftimeFormat(void) { return resource.strftime_format; } - void saveStrftimeFormat(char *); + void saveStrftimeFormat(const char *); #else // !HAVE_STRFTIME inline int getDateFormat(void) { return resource.date_format; } inline void saveDateFormat(int f) { resource.date_format = f; } @@ -308,7 +310,7 @@ public: int removeLastWorkspace(void); void removeWorkspaceNames(void); - void addWorkspaceName(char *); + void addWorkspaceName(const char *); void addNetizen(Netizen *); void removeNetizen(Window); void addIcon(OpenboxWindow *); @@ -336,8 +338,8 @@ public: void updateNetizenWindowRaise(Window); void updateNetizenWindowLower(Window); - enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, LeftRight, - RightLeft, TopBottom, BottomTop }; + enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, + BestFitPlacement, LeftRight, RightLeft, TopBottom, BottomTop }; enum { LeftJustify = 1, RightJustify, CenterJustify }; enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet }; enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure,