iconmgr.h revision 0bbfda8a
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
17struct 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
36struct IconMgr {
37	struct IconMgr *next;               /* ptr to the next icon manager */
38	struct IconMgr *prev;               /* ptr to the previous icon mgr */
39	struct IconMgr *lasti;              /* ptr to the last icon mgr */
40	struct IconMgr *nextv;              /* ptr to the next virt icon mgr */
41	struct WList *first;                /* first window in the list */
42	struct WList *last;                 /* last window in the list */
43	struct WList *active;               /* the active entry */
44	TwmWindow *twm_win;                 /* back pointer to the new parent */
45	struct ScreenInfo *scr;             /* the screen this thing is on */
46	int vScreen;                        /* the virtual screen this thing is on */
47	Window w;                           /* this icon manager window */
48	char *geometry;                     /* geometry string */
49	char *name;
50	char *icon_name;
51	int x, y, width, height;
52	int columns, cur_rows, cur_columns;
53	int count;
54};
55
56extern WList *DownIconManager;
57
58void CreateIconManagers(void);
59IconMgr *AllocateIconManager(char *name, char *geom, char *icon_name,
60                             int columns);
61void AllocateOtherIconManagers(void);
62void MoveIconManager(int dir);
63void MoveMappedIconManager(int dir);
64void JumpIconManager(int dir);
65WList *AddIconManager(TwmWindow *tmp_win);
66void InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win);
67void RemoveFromIconManager(IconMgr *ip, WList *tmp);
68void RemoveIconManager(TwmWindow *tmp_win);
69void CurrentIconManagerEntry(WList *current);
70void ActiveIconManager(WList *active);
71void NotActiveIconManager(WList *active);
72void DrawIconManagerBorder(WList *tmp, bool fill);
73void SortIconManager(IconMgr *ip);
74void PackIconManager(IconMgr *ip);
75void PackIconManagers(void);
76void dump_iconmanager(IconMgr *mgr, char *label);
77void DrawIconManagerIconName(TwmWindow *tmp_win);
78void ShowIconifiedIcon(TwmWindow *tmp_win);
79
80
81/* Spacing between the text and the outer border.  */
82#define ICON_MGR_IBORDER 3
83/* Thickness of the outer border (3d or not).  */
84#define ICON_MGR_OBORDER \
85    (Scr->use3Diconmanagers ? Scr->IconManagerShadowDepth : 2)
86
87
88#endif /* _CTWM_ICONMGR_H */
89