vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_Event_Mouse.h
Go to the documentation of this file.
1/**************************************************************************************************/
2/* */
3/* Copyright (C) 2004 Bauhaus University Weimar */
4/* Released into the public domain on 6/23/2007 as part of the VRPN project */
5/* by Jan P. Springer. */
6/* */
7/**************************************************************************************************/
8/* */
9/* module : vrpn_Event_Mouse.h */
10/* project : */
11/* description: mouse input using the event interface */
12/* */
13/**************************************************************************************************/
14
15
16#ifndef _VRPN_EVENT_MOUSE_H_
17#define _VRPN_EVENT_MOUSE_H_
18
19#include "vrpn_Button.h" // for vrpn_Button_Server
20#include "vrpn_Configure.h" // for VRPN_API
21// includes, project
22#include "vrpn_Event_Analog.h" // for vrpn_Event_Analog
23#include "vrpn_Shared.h" // for timeval
24
26
27
30{
31
32public:
33
34 // creates a vrpn_Event_Mouse
35 vrpn_Event_Mouse ( const char *name, vrpn_Connection *c = 0,
36 const char* evdev_name = "/dev/input/event0" );
37
38 // default dtor
40
41 // This routine is called each time through the server's main loop. It will
42 // read from the mouse.
43 void mainloop (void);
44
45private:
46
47 // This routine interpret data from the device
48 void process_mouse_data ();
49
50 // set all buttons and analogs to 0
51 void clear_values();
52
53private:
54
55 struct timeval timestamp;
56};
57
58#endif // _VRPN_EVENT_MOUSE_H_
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Button_Server(const char *name, vrpn_Connection *c, int numbuttons=1)
Generic connection class not specific to the transport mechanism.
vrpn_Event_Analog(const char *name, vrpn_Connection *connection, const char *evdev_name)
vrpn_Event_Mouse(const char *name, vrpn_Connection *c=0, const char *evdev_name="/dev/input/event0")
#define VRPN_API
class VRPN_API vrpn_Connection