blob: 48e36cb2f47324a1d85a902256dc6a98f6631d0f (
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
38
39
40
41
42
|
#ifndef _IPXE_LABEL_H
#define _IPXE_LABEL_H
/** @file
*
* Text label widget
*
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <curses.h>
#include <ipxe/widget.h>
/** A text label widget */
struct label {
/** Text widget */
struct widget widget;
/** Label text */
const char *text;
};
extern struct widget_operations label_operations;
/**
* Initialise text label widget
*
* @v label Text label widget
* @v row Row
* @v col Starting column
* @v width Width
* @v text Label text
*/
static inline __attribute__ (( always_inline )) void
init_label ( struct label *label, unsigned int row, unsigned int col,
unsigned int width, const char *text ) {
init_widget ( &label->widget, &label_operations, row, col, width, 0 );
label->text = text;
}
#endif /* _IPXE_LABEL_H */
|