shithub: widget

ref: b57b54c2d8223debedae9844098b89c6b5475637
dir: /libwidget/button.h/

View raw version
/*** Button ***/

typedef struct Button Button;

struct Button
{
	Widget;

	Widget *content;
	int pressed;

	/* don't touch */
	Box *box;
};

int isbutton(Widget*);

Button* newbutton(Widget*);
Button* newtextbutton(Font*, char *content);

enum
{
	M_BUTTON_PRESSED	= C2I('b', 't', 'n', 'p'),
	M_BUTTON_RELEASED	= C2I('b', 't', 'n', 'r')
};