Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
xorgDisplayDevice.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/output/linux/xorgDisplayDevice.h --
4  *
5  * Initial software
6  * Authors: Nicolas Roussel
7  * Copyright © Inria
8  *
9  * http://libpointing.org/
10  *
11  * This software may be used and distributed according to the terms of
12  * the GNU General Public License version 2 or any later version.
13  *
14  */
15 
16 #ifndef xorgDisplayDevice_h
17 #define xorgDisplayDevice_h
18 
19 #include <pointing/output/DisplayDevice.h>
20 
21 #include <X11/Xlib.h>
22 
23 namespace pointing {
24 
26 
27  Display *dpy ;
28 
29  typedef enum {NOTHING=0, BOUNDS=1, SIZE=2, REFRESHRATE=4} cachedinfo ;
30  int cached ;
31  DisplayDevice::Bounds cached_bounds ;
32  DisplayDevice::Size cached_size ;
33  double cached_refreshrate ;
34 
35  public:
36 
37  xorgDisplayDevice(void) ;
38  xorgDisplayDevice(URI uri) ;
39 
40  Bounds getBounds(Bounds *defval=0) ;
41  Size getSize(Size *defval=0) ;
42  double getRefreshRate(double *defval=0) ;
43 
44  URI getURI(bool expanded=false) const ;
45 
46  ~xorgDisplayDevice(void) ;
47 
48  } ;
49 
50 }
51 
52 #endif
Display size in mms.
Definition: DisplayDevice.h:51
Display bounds (origin and size) in pixels.
Definition: DisplayDevice.h:60
double getRefreshRate(double *defval=0)
Definition: xorgDisplayDevice.cpp:72
Definition: DummyPointingDevice.cpp:23
DisplayDevice class is used to represent the displays connected to the computer.
Definition: DisplayDevice.h:31
Size getSize(Size *defval=0)
Definition: xorgDisplayDevice.cpp:60
URI getURI(bool expanded=false) const
Definition: xorgDisplayDevice.cpp:84
Definition: xorgDisplayDevice.h:25
Bounds getBounds(Bounds *defval=0)
Definition: xorgDisplayDevice.cpp:47