shithub: widget

ref: 5b7bb5370a455e3a61d16ea71c2fe69cfeb051e3
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	/* messages */
{
	M_BUTTON_PRESSED	= C2I('b', 't', 'n', 'p'),
	M_BUTTON_RELEASED	= C2I('b', 't', 'n', 'r')
};