summaryrefslogtreecommitdiffstats
path: root/lib/widget/radio.h
blob: 5b52382cbfe62148387bb436b3461512192b4e5f (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
/** \file radio.h
 *  \brief Header: WRadio widget
 */

#ifndef MC__WIDGET_RADIO_H
#define MC__WIDGET_RADIO_H

#include "lib/keybind.h"        /* global_keymap_t */

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

#define RADIO(x) ((WRadio *)(x))

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

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

typedef struct WRadio
{
    Widget widget;
    int pos;
    int sel;
    int count;                  /* number of members */
    hotkey_t *texts;            /* texts of labels */
} WRadio;

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

extern const global_keymap_t *radio_map;

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

WRadio *radio_new (int y, int x, int count, const char **text);

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

#endif /* MC__WIDGET_RADIO_H */