Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
DummyDisplayDevice.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/output/DummyDisplayDevice.h --
4  *
5  * Initial software
6  * Authors: Géry Casiez, 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 DummyDisplayDevice_h
17 #define DummyDisplayDevice_h
18 
19 #include <pointing/output/DisplayDevice.h>
20 
21 namespace pointing {
29 
30  DisplayDevice::Bounds bounds ;
31  DisplayDevice::Size size ;
32  int refreshrate ;
33  double resolution ;
34 
35  public:
36 
37  DummyDisplayDevice(void) ;
38  DummyDisplayDevice(URI uri) ;
39 
44  void setBounds(Bounds b) { bounds = b ; }
45 
50  void setSize(Size s) { size = s ; }
51 
56  void setRefreshRate(int r) { refreshrate = r ; }
57 
62  void setResolution(double r) { resolution = r ; }
63 
64  Bounds getBounds(Bounds * /*defval*/=0) { return bounds ; }
65  Size getSize(Size * /*defval*/=0) { return size ; }
66  double getRefreshRate(double * /*defval*/=0) { return refreshrate ; }
67  double getResolution(double *hdpi=0, double *vdpi=0, double *defval=0) ;
68 
69  URI getURI(bool expanded=false) const ;
70 
71  } ;
72 
73 }
74 
75 #endif
Size getSize(Size *=0)
Definition: DummyDisplayDevice.h:65
Display size in mms.
Definition: DisplayDevice.h:51
void setResolution(double r)
setResolution
Definition: DummyDisplayDevice.h:62
Display bounds (origin and size) in pixels.
Definition: DisplayDevice.h:60
URI getURI(bool expanded=false) const
Definition: DummyDisplayDevice.cpp:73
double getRefreshRate(double *=0)
Definition: DummyDisplayDevice.h:66
Bounds getBounds(Bounds *=0)
Definition: DummyDisplayDevice.h:64
void setSize(Size s)
setSize
Definition: DummyDisplayDevice.h:50
Definition: DummyPointingDevice.cpp:23
void setRefreshRate(int r)
setRefreshRate
Definition: DummyDisplayDevice.h:56
DisplayDevice class is used to represent the displays connected to the computer.
Definition: DisplayDevice.h:31
The DummyDisplayDevice class is a pseudo-device class. It stores configuration values passed on the q...
Definition: DummyDisplayDevice.h:28
void setBounds(Bounds b)
setBounds
Definition: DummyDisplayDevice.h:44
double getResolution(double *hdpi=0, double *vdpi=0, double *defval=0)
Computes the pixel density (resolution) of the display device.
Definition: DummyDisplayDevice.cpp:63