Prevent overflow while calculating frame size hints
[notion/jeffpc.git] / ioncore / infowin.h
blobe7a450e46547721f553f96441da3bddc6db96c76
1 /*
2 * ion/ioncore/infowin.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_INFOWIN_H
10 #define ION_IONCORE_INFOWIN_H
12 #include "common.h"
13 #include "window.h"
14 #include "gr.h"
15 #include "rectangle.h"
17 #define INFOWIN_BUFFER_LEN 256
19 DECLCLASS(WInfoWin){
20 WWindow wwin;
21 GrBrush *brush;
22 char *buffer;
23 char *style;
24 GrStyleSpec attr;
27 #define INFOWIN_BRUSH(INFOWIN) ((INFOWIN)->brush)
28 #define INFOWIN_BUFFER(INFOWIN) ((INFOWIN)->buffer)
30 extern bool infowin_init(WInfoWin *p, WWindow *parent, const WFitParams *fp,
31 const char *style);
32 extern WInfoWin *create_infowin(WWindow *parent, const WFitParams *fp,
33 const char *style);
35 extern void infowin_deinit(WInfoWin *p);
37 extern void infowin_set_text(WInfoWin *p, const char *s, int maxw);
38 extern GrStyleSpec *infowin_stylespec(WInfoWin *p);
40 extern WRegion *infowin_load(WWindow *par, const WFitParams *fp, ExtlTab tab);
42 extern void infowin_updategr(WInfoWin *p);
44 #endif /* ION_IONCORE_INFOWIN_H */