2 * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3 * Copyright (C) 2004-2008 Kim Woelders
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to
7 * deal in the Software without restriction, including without limitation the
8 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 * sell copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies of the Software, its documentation and marketing & publicity
14 * materials, and acknowledgment shall be given in the documentation, materials
15 * and software packages that this Software was used.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 typedef struct _container Container;
33 unsigned int anim_time; /* Animation run time (ms) */
38 int xo, yo, wo, ho; /* Outer */
39 int xi, yi, wi, hi; /* Inner */
44 void (*Init) (Container * ct);
45 void (*Exit) (Container * ct, int wm_exit);
46 void (*Signal) (Container * ct, int signal, void *prm);
47 void (*Event) (Container * ct, XEvent * ev);
48 void (*ObjSizeCalc) (Container * ct, ContainerObject * cto);
49 void (*ObjPlace) (Container * ct, ContainerObject * cto,
54 const ContainerOps *ops;
56 const char *menu_title;
57 const char *dlg_title;
71 int auto_resize_anchor;
72 /* Iconbox specific */
77 /* internally set stuff */
83 ImageClass *ic_item_base;
91 char scrollbar_hilited;
92 char scrollbar_clicked;
93 char scrollbox_clicked;
102 Win scrollbarknob_win;
105 ContainerObject *objs;
107 /* these are theme-settable parameters */
108 int scroll_thickness;
117 extern ContainerCfg Conf_containers;
119 void ContainerRedraw(Container * ct);
121 typedef int (ContainerIterator) (Container * ct, void *data);
122 Container *ContainersIterate(ContainerIterator * cti, int type,
124 Container **ContainersGetList(int *pnum);
126 int ContainerObjectAdd(Container * ct, void *obj);
127 int ContainerObjectDel(Container * ct, void *obj);
128 int ContainerObjectFind(Container * ct, void *obj);
129 void *ContainerObjectFindByXY(Container * ct, int x, int y);
132 #define IB_TYPE_ICONBOX 0
133 #define IB_TYPE_SYSTRAY 1
135 #endif /* _CONTAINER_H_ */