Add useful macros for widget type cast.
[midnight-commander.git] / lib / widget / check.h
blobed541399d48a5648dae5261a42b65a466c3825d5
2 /** \file check.h
3 * \brief Header: WCheck widget
4 */
6 #ifndef MC__WIDGET_CHECK_H
7 #define MC__WIDGET_CHECK_H
9 /*** typedefs(not structures) and defined constants **********************************************/
11 #define CHECK(x) ((WCheck *)(x))
13 #define C_BOOL 0x0001
14 #define C_CHANGE 0x0002
16 /*** enums ***************************************************************************************/
18 /*** structures declarations (and typedefs of structures)*****************************************/
20 typedef struct WCheck
22 Widget widget;
23 unsigned int state; /* check button state */
24 hotkey_t text; /* text of check button */
25 } WCheck;
27 /*** global variables defined in .c file *********************************************************/
29 /*** declarations of public functions ************************************************************/
31 WCheck *check_new (int y, int x, int state, const char *text);
33 /*** inline functions ****************************************************************************/
35 #endif /* MC__WIDGET_CHECK_H */