summaryrefslogtreecommitdiffstats
path: root/lib/widget/label.h
blob: 6d1607fc6489cfcf33315930e5625118f554cbbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/** \file label.h
 *  \brief Header: WLabel widget
 */

#ifndef MC__WIDGET_LABEL_H
#define MC__WIDGET_LABEL_H

/*** typedefs(not structures) and defined constants **********************************************/

#define LABEL(x) ((WLabel *)(x))

/*** enums ***************************************************************************************/

/*** structures declarations (and typedefs of structures)*****************************************/

typedef struct
{
    Widget widget;
    gboolean auto_adjust_cols;  /* compute widget.cols from strlen(text)? */
    char *text;
    gboolean transparent;       /* Paint in the default color fg/bg */
} WLabel;

/*** global variables defined in .c file *********************************************************/

/*** declarations of public functions ************************************************************/

WLabel *label_new (int y, int x, const char *text);
void label_set_text (WLabel * label, const char *text);
/* *INDENT-OFF* */
void label_set_textv (WLabel * label, const char *format, ...) G_GNUC_PRINTF (2, 3);
/* *INDENT-ON* */

/*** inline functions ****************************************************************************/

#endif /* MC__WIDGET_LABEL_H */