38 #define BTN_LEFT 0x110
39 #define BTN_RIGHT 0x111
40 #define BTN_MIDDLE 0x112
41 #define REL_WHEEL 0x08
51 const char* evdev_name) :
101vrpn_Event_Mouse::process_mouse_data() {
111 fprintf( stderr,
"vrpn_Event_Mouse::process_mouse_data(): Not yet implemented on this architecture.");
118 for( vrpn_uint32 i = 0; i <
event_data.size(); ++i) {
119 struct vrpn_Event::input_event *iter = &(
event_data.data()[i]);
121 switch ((*iter).type) {
123 switch ((*iter).code) {
125 channel[0] = (
signed int)(*iter).value;
128 channel[1] = (
signed int)(*iter).value;
131 channel[2] = (
signed int)(*iter).value;
136 switch ((*iter).code) {
149 switch ((*iter).value) {
171 printf(
"channel %d mit %f; ",i,
channel[i]);
179 printf(
"button %d mit %d; ",i,
buttons[i]);
198vrpn_Event_Mouse::clear_values() {
vrpn_float64 last[vrpn_CHANNEL_MAX]
vrpn_float64 channel[vrpn_CHANNEL_MAX]
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...
vrpn_Connection * d_connection
Connection that this object talks to.
void server_mainloop(void)
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should...
vrpn_Event_Analog(const char *name, vrpn_Connection *connection, const char *evdev_name)
event_vector_t event_data
int read_available_data()
void mainloop(void)
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Event_Mouse(const char *name, vrpn_Connection *c=0, const char *evdev_name="/dev/input/event0")
class VRPN_API vrpn_Connection
#define vrpn_gettimeofday