vrmodel

diff include/proto.h @ 4:a32b151fb3c6

moving along slowly
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 11 Sep 2014 00:08:23 +0300
parents be91b72ce3f9
children
line diff
     1.1 --- a/include/proto.h	Mon Sep 01 05:59:31 2014 +0300
     1.2 +++ b/include/proto.h	Thu Sep 11 00:08:23 2014 +0300
     1.3 @@ -11,12 +11,24 @@
     1.4  /* responses */
     1.5  #define RSP_OK			0
     1.6  #define RSP_ERR			255
     1.7 +/* events */
     1.8 +#define EV_STATE		MAGIC
     1.9 +#define EV_MOTION		16
    1.10 +#define EV_BUTTON		17
    1.11  
    1.12 +struct msg_ev_data {
    1.13 +	float x, y, z;
    1.14 +	unsigned int bnmask;
    1.15 +};
    1.16  
    1.17  struct message {
    1.18  	int magic;
    1.19  	int type;
    1.20 -	char data[24];
    1.21 +
    1.22 +	union {
    1.23 +		char raw[24];
    1.24 +		struct msg_ev_data event;
    1.25 +	} data;
    1.26  };
    1.27  
    1.28