1/* 2 * Occupation handling routines 3 */ 4 5#ifndef _CTWM_OCCUPATION_H 6#define _CTWM_OCCUPATION_H 7 8 9struct OccupyWindow { 10 Window w; 11 TwmWindow *twm_win; 12 char *geometry; 13 Window *obuttonw; 14 Window OK, cancel, allworkspc; 15 int width, height; 16 int minwidth, minheight; 17 char *name; 18 char *icon_name; 19 int lines, columns; 20 int hspace, vspace; /* space between workspaces */ 21 int bwidth, bheight; 22 int owidth; /* oheight == bheight */ 23 ColorPair cp; 24 MyFont font; 25 int tmpOccupation; 26}; 27 28 29/* Setting occupation bits */ 30void SetupOccupation(TwmWindow *twm_win, int occupation_hint); 31void AddToWorkSpace(char *wname, TwmWindow *twm_win); 32void RemoveFromWorkSpace(char *wname, TwmWindow *twm_win); 33void ToggleOccupation(char *wname, TwmWindow *twm_win); 34void MoveToNextWorkSpace(VirtualScreen *vs, TwmWindow *twm_win); 35void MoveToPrevWorkSpace(VirtualScreen *vs, TwmWindow *twm_win); 36void MoveToNextWorkSpaceAndFollow(VirtualScreen *vs, TwmWindow *twm_win); 37void MoveToPrevWorkSpaceAndFollow(VirtualScreen *vs, TwmWindow *twm_win); 38void WmgrRedoOccupation(TwmWindow *win); 39void WMgrRemoveFromCurrentWorkSpace(VirtualScreen *vs, TwmWindow *win); 40void WMgrAddToCurrentWorkSpaceAndWarp(VirtualScreen *vs, char *winname); 41void OccupyAll(TwmWindow *twm_win); 42 43/* Occupation editing window */ 44void CreateOccupyWindow(void); 45void ResizeOccupyWindow(TwmWindow *win); 46void PaintOccupyWindow(void); 47void OccupyHandleButtonEvent(XEvent *event); 48void Occupy(TwmWindow *twm_win); 49 50/* Backend/util */ 51void ChangeOccupation(TwmWindow *tmp_win, int newoccupation); 52bool AddToClientsList(char *workspace, char *client); 53unsigned int GetMaskFromProperty(unsigned char *_prop, unsigned long len); 54int GetPropertyFromMask(unsigned int mask, char **prop); 55 56 57 58/* Various other code needs to look at this */ 59extern int fullOccupation; 60 61/* Hopefully temporary; x-ref comment in .c */ 62extern TwmWindow *occupyWin; 63 64#endif // _CTWM_OCCUPATION_H 65