Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
|
DisplayDevice class is used to represent the displays connected to the computer. More...
#include <DisplayDevice.h>
Classes | |
struct | Bounds |
Display bounds (origin and size) in pixels. More... | |
struct | Point |
A structure to maintain coordinates of a pixel. More... | |
struct | Size |
Display size in mms. More... | |
Public Member Functions | |
virtual Bounds | getBounds (Bounds *defval=0)=0 |
virtual Size | getSize (Size *defval=0)=0 |
virtual double | getResolution (double *hppi, double *vppi, double *defval=0) |
Computes the pixel density (resolution) of the display device. More... | |
double | getResolution (double *defval=0) |
virtual double | getRefreshRate (double *defval=0)=0 |
virtual URI | getURI (bool expanded=false) const =0 |
virtual void | setDebugLevel (int) |
Sets the level of information for debugging purposes (default = 0). | |
virtual void | debug (std::ostream &) const |
Static Public Member Functions | |
static DisplayDevice * | create (const char *device_uri=0) |
Static create method is used to instantiate an object of the class. | |
static DisplayDevice * | create (std::string device_uri) |
DisplayDevice class is used to represent the displays connected to the computer.
It is an abstract class which creates an instance of its platform-specific subclass.
Implemented in pointing::DummyDisplayDevice, pointing::osxDisplayDevice, pointing::xorgDisplayDevice, and pointing::winDisplayDevice.
|
pure virtual |
Implemented in pointing::DummyDisplayDevice, pointing::osxDisplayDevice, pointing::xorgDisplayDevice, and pointing::winDisplayDevice.
|
virtual |
Computes the pixel density (resolution) of the display device.
It is computed by calculating the diagonal size of the display in pixels and inches and then calculating PPI (Pixels per inch).
hppi | Horizontal resolution (OUT) |
vppi | Vertical resolution (OUT) |
defval | Default value |
Reimplemented in pointing::DummyDisplayDevice.
Implemented in pointing::DummyDisplayDevice, pointing::osxDisplayDevice, pointing::xorgDisplayDevice, and pointing::winDisplayDevice.
|
pure virtual |
expanded | specifies if additional parameters must be displayed |
Implemented in pointing::DummyDisplayDevice, pointing::osxDisplayDevice, pointing::xorgDisplayDevice, and pointing::winDisplayDevice.