shithub: widget

ref: 1d84452255fa2d3c41ac2596f39d61d7e3b27b12
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')
};