iconmgr.h revision 645f5050
1/*
2 * Copyright 1989 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and its
5 * documentation for any purpose and without fee is hereby granted, provided
6 * that the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of M.I.T. not be used in advertising
9 * or publicity pertaining to distribution of the software without specific,
10 * written prior permission.  M.I.T. makes no representations about the
11 * suitability of this software for any purpose.  It is provided "as is"
12 * without express or implied warranty.
13 *
14 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
16 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
22 *  [ ctwm ]
23 *
24 *  Copyright 1992 Claude Lecommandeur.
25 *
26 * Permission to use, copy, modify  and distribute this software  [ctwm] and
27 * its documentation for any purpose is hereby granted without fee, provided
28 * that the above  copyright notice appear  in all copies and that both that
29 * copyright notice and this permission notice appear in supporting documen-
30 * tation, and that the name of  Claude Lecommandeur not be used in adverti-
31 * sing or  publicity  pertaining to  distribution of  the software  without
32 * specific, written prior permission. Claude Lecommandeur make no represen-
33 * tations  about the suitability  of this software  for any purpose.  It is
34 * provided "as is" without express or implied warranty.
35 *
36 * Claude Lecommandeur DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
37 * INCLUDING ALL  IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS.  IN NO
38 * EVENT SHALL  Claude Lecommandeur  BE LIABLE FOR ANY SPECIAL,  INDIRECT OR
39 * CONSEQUENTIAL  DAMAGES OR ANY  DAMAGES WHATSOEVER  RESULTING FROM LOSS OF
40 * USE, DATA  OR PROFITS,  WHETHER IN AN ACTION  OF CONTRACT,  NEGLIGENCE OR
41 * OTHER  TORTIOUS ACTION,  ARISING OUT OF OR IN  CONNECTION WITH THE USE OR
42 * PERFORMANCE OF THIS SOFTWARE.
43 *
44 * Author:  Claude Lecommandeur [ lecom@sic.epfl.ch ][ April 1992 ]
45 */
46
47/***********************************************************************
48 *
49 * $XConsortium: iconmgr.h,v 1.11 89/12/10 17:47:02 jim Exp $
50 *
51 * Icon Manager includes
52 *
53 * 09-Mar-89 Tom LaStrange		File Created
54 *
55 ***********************************************************************/
56
57#ifndef _ICONMGR_
58#define _ICONMGR_
59
60struct WList
61{
62    struct WList *next;
63    struct WList *prev;
64    struct WList *nextv;		/* pointer to the next virtual Wlist C.L. */
65    struct TwmWindow *twm;
66    struct IconMgr *iconmgr;
67    Window w;
68    Window icon;
69    int x, y, width, height;
70    int row, col;
71    int me;
72    ColorPair cp;
73    Pixel highlight;
74    Pixmap iconifypm;
75    unsigned top, bottom;
76    short active;
77    short down;
78};
79
80struct IconMgr
81{
82    struct IconMgr *next;		/* pointer to the next icon manager */
83    struct IconMgr *prev;		/* pointer to the previous icon mgr */
84    struct IconMgr *lasti;		/* pointer to the last icon mgr */
85    struct IconMgr *nextv;		/* pointer to the next virtual icon mgr C.L. */
86    struct WList *first;		/* first window in the list */
87    struct WList *last;			/* last window in the list */
88    struct WList *active;		/* the active entry */
89    TwmWindow *twm_win;			/* back pointer to the new parent */
90    struct ScreenInfo *scr;		/* the screen this thing is on */
91    int vScreen;			/* the virtual screen this thing is on */
92    Window w;				/* this icon manager window */
93    char *geometry;			/* geometry string */
94    char *name;
95    char *icon_name;
96    int x, y, width, height;
97    int columns, cur_rows, cur_columns;
98    int count;
99};
100
101extern int iconmgr_textx;
102extern WList *DownIconManager;
103
104extern void CreateIconManagers(void);
105extern IconMgr *AllocateIconManager(char *name, char *geom, char *icon_name,
106				    int columns);
107extern void MoveIconManager(int dir);
108extern void MoveMappedIconManager(int dir);
109extern void JumpIconManager(register int dir);
110extern WList *AddIconManager(TwmWindow *tmp_win);
111extern void InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win);
112extern void RemoveFromIconManager(IconMgr *ip, WList *tmp);
113extern void RemoveIconManager(TwmWindow *tmp_win);
114extern void CurrentIconManagerEntry(WList *current);
115extern void ActiveIconManager(WList *active);
116extern void NotActiveIconManager(WList *active);
117extern void DrawIconManagerBorder(WList *tmp, int fill);
118extern void SortIconManager(IconMgr *ip);
119extern void PackIconManager(IconMgr *ip);
120
121
122#endif /* _ICONMGR_ */
123