Fix 'dist' target in Makefile
[notion/jeffpc.git] / mod_statusbar / statusbar.h
blob73458b609fb69481fdb04c33b95092dea6b3532e
1 /*
2 * ion/mod_statusbar/statusbar.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_MOD_STATUSBAR_STATUSBAR_H
10 #define ION_MOD_STATUSBAR_STATUSBAR_H
12 #include <libtu/ptrlist.h>
13 #include <libextl/extl.h>
14 #include <ioncore/common.h>
15 #include <ioncore/gr.h>
16 #include <ioncore/manage.h>
17 #include <ioncore/sizehint.h>
20 #define STATUSBAR_NX_STR "?"
23 typedef enum{
24 WSBELEM_ALIGN_LEFT=0,
25 WSBELEM_ALIGN_CENTER=1,
26 WSBELEM_ALIGN_RIGHT=2
27 } WSBElemAlign;
30 typedef enum{
31 WSBELEM_NONE=0,
32 WSBELEM_TEXT=1,
33 WSBELEM_METER=2,
34 WSBELEM_STRETCH=3,
35 WSBELEM_FILLER=4,
36 WSBELEM_SYSTRAY=5
37 } WSBElemType;
40 INTRSTRUCT(WSBElem);
42 DECLSTRUCT(WSBElem){
43 int type;
44 int align;
45 int stretch;
46 int text_w;
47 char *text;
48 int max_w;
49 char *tmpl;
50 StringId meter;
51 StringId attr;
52 int zeropad;
53 int x;
54 PtrList *traywins;
57 INTRCLASS(WStatusBar);
59 DECLCLASS(WStatusBar){
60 WWindow wwin;
61 GrBrush *brush;
62 WSBElem *elems;
63 int nelems;
64 int natural_w, natural_h;
65 int filleridx;
66 WStatusBar *sb_next, *sb_prev;
67 PtrList *traywins;
68 bool systray_enabled;
71 extern bool statusbar_init(WStatusBar *p, WWindow *parent,
72 const WFitParams *fp);
73 extern WStatusBar *create_statusbar(WWindow *parent, const WFitParams *fp);
74 extern void statusbar_deinit(WStatusBar *p);
76 extern WRegion *statusbar_load(WWindow *par, const WFitParams *fp,
77 ExtlTab tab);
79 extern void statusbar_set_natural_w(WStatusBar *p, const char *str);
80 extern void statusbar_size_hints(WStatusBar *p, WSizeHints *h);
81 extern void statusbar_updategr(WStatusBar *p);
82 extern void statusbar_set_contents(WStatusBar *sb, ExtlTab t);
84 extern void statusbar_set_template(WStatusBar *sb, const char *tmpl);
85 extern void statusbar_set_template_table(WStatusBar *sb, ExtlTab t);
86 extern ExtlTab statusbar_get_template_table(WStatusBar *sb);
88 extern WStatusBar *mod_statusbar_find_suitable(WClientWin *cwin,
89 const WManageParams *param);
91 #endif /* ION_MOD_STATUSBAR_STATUSBAR_H */