Home | History | Annotate | Line # | Download | only in dist
      1 /*
      2  * Workspace-related structures and definitions
      3  */
      4 
      5 #ifndef _CTWM_WORKSPACE_STRUCTS_H
      6 #define _CTWM_WORKSPACE_STRUCTS_H
      7 
      8 #define MAXWORKSPACE 32
      9 
     10 typedef enum {
     11 	WMS_map,
     12 	WMS_buttons,
     13 } WMgrState;
     14 
     15 typedef enum {
     16 	STYLE_NORMAL,
     17 	STYLE_STYLE1,
     18 	STYLE_STYLE2,
     19 	STYLE_STYLE3,
     20 } ButtonStyle;
     21 
     22 struct winList {
     23 	struct WorkSpace    *wlist;
     24 	Window              w;
     25 	int                 x, y;
     26 	int                 width, height;
     27 	TwmWindow           *twm_win;
     28 	ColorPair           cp;
     29 	MyFont              font;
     30 	struct winList      *next;
     31 };
     32 
     33 struct WorkSpaceMgr {
     34 	struct WorkSpace       *workSpaceList;
     35 	struct WorkSpaceWindow *workSpaceWindowList;
     36 	struct OccupyWindow    *occupyWindow;
     37 	MyFont          buttonFont;
     38 	MyFont          windowFont;
     39 	ColorPair       windowcp;
     40 	bool            windowcpgiven;
     41 	ColorPair       cp;
     42 	long            count;
     43 	char            *geometry;
     44 	int             lines, columns;
     45 	bool            noshowoccupyall;
     46 	WMgrState       initialstate;
     47 	ButtonStyle     buttonStyle;
     48 	name_list       *windowBackgroundL;
     49 	name_list       *windowForegroundL;
     50 	/* The fields below have been moved from WorkSpaceWindow */
     51 	ColorPair           curColors;
     52 	Image               *curImage;
     53 	Pixel               curBorderColor;
     54 	bool                curPaint;
     55 
     56 	ColorPair           defColors;
     57 	Image              *defImage;
     58 	Pixel               defBorderColor;
     59 	int                 hspace, vspace;
     60 	char               *name;
     61 	char               *icon_name;
     62 };
     63 
     64 struct WorkSpace {
     65 	int                 number;
     66 	char                *name;
     67 	char                *label;
     68 	Image               *image;
     69 	name_list           *clientlist;
     70 	IconMgr             *iconmgr;
     71 	ColorPair           cp;
     72 	ColorPair           backcp;
     73 	TwmWindow           *save_focus;  /* Used by SaveWorkspaceFocus feature */
     74 	struct WindowRegion *FirstWindowRegion;
     75 	struct WorkSpace *next;
     76 };
     77 
     78 struct MapSubwindow {
     79 	Window  w;
     80 	int     x, y;
     81 	WinList *wl;
     82 };
     83 
     84 struct ButtonSubwindow {
     85 	Window w;
     86 };
     87 
     88 struct WorkSpaceWindow {                /* There is one per virtual screen */
     89 	VirtualScreen   *vs;
     90 	Window          w;
     91 	TwmWindow       *twm_win;
     92 	MapSubwindow    **mswl;               /* MapSubWindow List */
     93 	ButtonSubwindow **bswl;               /* ButtonSubwindow List */
     94 	WorkSpace       *currentwspc;
     95 
     96 	WMgrState     state;
     97 
     98 	int           width, height;   // Window dimensions
     99 	int           bwidth, bheight; // Button dimensions
    100 	int           wwidth, wheight; // Map dimensions
    101 };
    102 
    103 #endif /* _CTWM_WORKSPACE_STRUCTS_H */
    104