diff options
Diffstat (limited to 'guifs.h')
-rw-r--r-- | guifs.h | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -23,6 +23,17 @@ enum { enum { Horizontal, Vertical, + Up, + Down, +}; + +enum { + Xmousedown, + Xmouseup, + Xmouseclick, + Xmousescroll, + Xkeyboard, + Xmax, }; typedef struct Colour Colour; @@ -67,7 +78,12 @@ struct Prop { }; struct Event { - Rune r; + int type; + union { + Mouse m; + Rune r; + int direction; + }; }; struct GuiSpec { @@ -90,7 +106,6 @@ struct GuiElement { Qid qevent; Qid qtype; Qid qprops; - Qid qwait; int nchildren; GuiElement **children; @@ -100,9 +115,10 @@ struct GuiElement { int nprops; Prop *props; - int listening; /* the user is reading from the 'event' file */ + uvlong listening; /* the user is reading from the 'event' file. Bitmask of which events are wanted */ Channel *events; char *currentevents; + int buttons; Rectangle border; Rectangle rect; @@ -131,5 +147,5 @@ void layouttextbox(GuiElement *, Rectangle); PropVal getprop(GuiElement *, int, int); void setprop(GuiElement *, int, PropVal, int); -int mouseevent(int); +int mouseevent(Mouse); int keyboardevent(Rune);
\ No newline at end of file |