Home | History | Annotate | Line # | Download | only in dist
      1 /*
      2  * Icon Manager includes
      3  *
      4  *
      5  * Copyright 1989 Massachusetts Institute of Technology
      6  *
      7  * $XConsortium: iconmgr.h,v 1.11 89/12/10 17:47:02 jim Exp $
      8  *
      9  * 09-Mar-89 Tom LaStrange              File Created
     10  *
     11  * Copyright 1992 Claude Lecommandeur.
     12  */
     13 
     14 #ifndef _CTWM_ICONMGR_H
     15 #define _CTWM_ICONMGR_H
     16 
     17 struct WList {
     18 	struct WList *next;
     19 	struct WList *prev;
     20 	struct WList *nextv;                /* pointer to the next virtual Wlist C.L. */
     21 	struct TwmWindow *twm;
     22 	struct IconMgr *iconmgr;
     23 	Window w;
     24 	Window icon;
     25 	int x, y, width, height;
     26 	int row, col;
     27 	int me;
     28 	ColorPair cp;
     29 	Pixel highlight;
     30 	Pixmap iconifypm;
     31 	unsigned top, bottom;
     32 	bool active;
     33 	bool down;
     34 };
     35 
     36 struct IconMgr {
     37 	struct IconMgr *next;  ///< Next iconmgr in this workspace
     38 	struct IconMgr *prev;  ///< Prev iconmgr in this workspace
     39 	struct IconMgr *lasti; ///< Last iconmgr in this workspace
     40 	struct IconMgr *nextv; ///< Next workspace's icon manager head
     41 
     42 	struct WList *first;                /* first window in the list */
     43 	struct WList *last;                 /* last window in the list */
     44 	struct WList *active;               /* the active entry */
     45 	TwmWindow *twm_win;                 /* back pointer to the new parent */
     46 	struct ScreenInfo *scr;             /* the screen this thing is on */
     47 	int vScreen;                        /* the virtual screen this thing is on */
     48 	Window w;                           /* this icon manager window */
     49 	char *geometry;                     /* geometry string */
     50 	char *name;
     51 	char *icon_name;
     52 	int x, y, width, height;
     53 	int columns, cur_rows, cur_columns;
     54 	int count;
     55 };
     56 
     57 extern WList *DownIconManager;
     58 
     59 void CreateIconManagers(void);
     60 IconMgr *AllocateIconManager(char *name, char *geom, char *icon_name,
     61                              int columns);
     62 void AllocateOtherIconManagers(void);
     63 void MoveIconManager(int dir);
     64 void MoveMappedIconManager(int dir);
     65 void JumpIconManager(int dir);
     66 WList *AddIconManager(TwmWindow *tmp_win);
     67 void InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win);
     68 void RemoveFromIconManager(IconMgr *ip, WList *tmp);
     69 void RemoveIconManager(TwmWindow *tmp_win);
     70 void CurrentIconManagerEntry(WList *current);
     71 void ActiveIconManager(WList *active);
     72 void NotActiveIconManager(WList *active);
     73 void DrawIconManagerBorder(WList *tmp, bool fill);
     74 void SortIconManager(IconMgr *ip);
     75 void PackIconManager(IconMgr *ip);
     76 void PackIconManagers(void);
     77 void dump_iconmanager(IconMgr *mgr, char *label);
     78 void DrawIconManagerIconName(TwmWindow *tmp_win);
     79 void ShowIconifiedIcon(TwmWindow *tmp_win);
     80 
     81 
     82 /* Spacing between the text and the outer border.  */
     83 #define ICON_MGR_IBORDER 3
     84 /* Thickness of the outer border (3d or not).  */
     85 #define ICON_MGR_OBORDER \
     86     (Scr->use3Diconmanagers ? Scr->IconManagerShadowDepth : 2)
     87 
     88 
     89 #endif /* _CTWM_ICONMGR_H */
     90