|
roo_display
API Documentation for roo_display
|
Display facade that owns a display device and optional touch input. More...
#include <roo_display.h>
Public Member Functions | |
| Display (DisplayDevice &display_device) | |
| Constructs a display without touch support. | |
| Display (DisplayDevice &display_device, TouchDevice &touch_device, TouchCalibration touch_calibration=TouchCalibration()) | |
| Constructs a display with touch support and optional calibration. | |
| Display (ComboDevice &device) | |
| Constructs a display from a combo device. | |
| int32_t | area () const |
| Returns the total pixel area of the raw device. | |
| const Box & | extents () const |
| Returns the current extents used by this display. | |
| int16_t | width () const |
| Returns the width in pixels of the current extents. | |
| int16_t | height () const |
| Returns the height in pixels of the current extents. | |
| void | init () |
| Initializes the display and touch devices. | |
| void | init (Color bgcolor) |
| Initializes the device, fills the screen with the specified color, and sets that color as the default background hint. | |
| void | setOrientation (Orientation orientation) |
| Sets the display orientation. Resets the clip box to the max display area. | |
| Orientation | orientation () const |
| Returns the current orientation. | |
| const TouchCalibration & | touchCalibration () const |
| Returns the touch calibration for the display. | |
| DisplayOutput & | output () |
| Returns mutable access to the display output. | |
| const DisplayOutput & | output () const |
| Returns const access to the display output. | |
| TouchResult | getTouch (TouchPoint *points, int max_points) |
| Returns calibrated touch points in display coordinates. | |
| TouchResult | getRawTouch (TouchPoint *points, int max_points) |
| Returns raw touch points in absolute coordinates (0-4095). | |
| bool | getTouch (int16_t &x, int16_t &y) |
| Returns true and sets (x, y) if touched; otherwise returns false. | |
| void | resetExtents () |
| Resets the clip box to the maximum device-allowed values. | |
| void | setExtents (const Box &extents) |
| Sets a default clip box, inherited by derived contexts. | |
| void | setBackground (const Rasterizable *bg) |
| Sets a rasterizable background for all derived contexts. | |
| void | setTouchCalibration (TouchCalibration touch_calibration) |
| Sets the touch calibration mapping. | |
| const Rasterizable * | getRasterizableBackground () const |
| Returns the rasterizable background for derived contexts. | |
| void | setBackgroundColor (Color bgcolor) |
| Sets a background color used by all derived contexts. Initially set to color::Transparent. | |
| Color | getBackgroundColor () const |
| Returns the background color for derived contexts. | |
| void | clear () |
| Clears the display, respecting the clip box and background settings. | |
| void | enableTurbo () |
| void | disableTurbo () |
| bool | isTurboEnabled () const |
Friends | |
| class | DrawingContext |
Display facade that owns a display device and optional touch input.
Definition at line 64 of file roo_display.h.
|
inline |
Constructs a display without touch support.
Definition at line 67 of file roo_display.h.
|
inline |
Constructs a display with touch support and optional calibration.
Definition at line 71 of file roo_display.h.
|
inline |
Constructs a display from a combo device.
Definition at line 76 of file roo_display.h.
|
inline |
Returns the total pixel area of the raw device.
Definition at line 80 of file roo_display.h.
References roo_display::DisplayDevice::raw_height(), and roo_display::DisplayDevice::raw_width().
| void roo_display::Display::clear | ( | ) |
Clears the display, respecting the clip box and background settings.
Definition at line 90 of file roo_display.cpp.
References roo_display::DrawingContext::clear().
| void roo_display::Display::disableTurbo | ( | ) |
Definition at line 124 of file roo_display.cpp.
| void roo_display::Display::enableTurbo | ( | ) |
Definition at line 115 of file roo_display.cpp.
Returns the current extents used by this display.
Definition at line 85 of file roo_display.h.
Referenced by setExtents().
|
inline |
Returns the background color for derived contexts.
Definition at line 170 of file roo_display.h.
|
inline |
Returns the rasterizable background for derived contexts.
Definition at line 160 of file roo_display.h.
|
inline |
Returns raw touch points in absolute coordinates (0-4095).
Definition at line 129 of file roo_display.h.
References roo_display::TouchDisplay::getRawTouch().
Returns true and sets (x, y) if touched; otherwise returns false.
Definition at line 37 of file roo_display.cpp.
References roo_display::TouchDisplay::getTouch(), roo_display::TouchResult::touch_points, roo_display::TouchPoint::x, and roo_display::TouchPoint::y.
|
inline |
Returns calibrated touch points in display coordinates.
If no touch has been registered, returns {.touch_points = 0} and does not modify points. If k touch points have been registered, sets up to max_points entries in points, and returns {.touch_points = k}. In both cases, the returned timestamp specifies the detection time.
Definition at line 124 of file roo_display.h.
References roo_display::TouchDisplay::getTouch().
|
inline |
Returns the height in pixels of the current extents.
Definition at line 90 of file roo_display.h.
References roo_display::Box::height().
|
inline |
Initializes the display and touch devices.
Definition at line 93 of file roo_display.h.
References roo_display::TouchDisplay::init(), and roo_display::DisplayDevice::init().
Initializes the device, fills the screen with the specified color, and sets that color as the default background hint.
Definition at line 84 of file roo_display.cpp.
References bgcolor.
|
inline |
Definition at line 179 of file roo_display.h.
|
inline |
Returns the current orientation.
Definition at line 106 of file roo_display.h.
|
inline |
Returns mutable access to the display output.
Definition at line 114 of file roo_display.h.
|
inline |
Returns const access to the display output.
Definition at line 116 of file roo_display.h.
|
inline |
Resets the clip box to the maximum device-allowed values.
Definition at line 137 of file roo_display.h.
References roo_display::DisplayDevice::effective_height(), and roo_display::DisplayDevice::effective_width().
Referenced by setExtents().
|
inline |
Sets a rasterizable background for all derived contexts.
Definition at line 149 of file roo_display.h.
Sets a background color used by all derived contexts. Initially set to color::Transparent.
Definition at line 164 of file roo_display.h.
References bgcolor, and roo_display::DisplayDevice::setBgColorHint().
Sets a default clip box, inherited by derived contexts.
Definition at line 143 of file roo_display.h.
References extents(), roo_display::Box::Intersect(), and resetExtents().
| void roo_display::Display::setOrientation | ( | Orientation | orientation | ) |
Sets the display orientation. Resets the clip box to the max display area.
Definition at line 74 of file roo_display.cpp.
|
inline |
Sets the touch calibration mapping.
Definition at line 155 of file roo_display.h.
References roo_display::TouchDisplay::setCalibration().
|
inline |
Returns the touch calibration for the display.
Definition at line 109 of file roo_display.h.
References roo_display::TouchDisplay::calibration().
|
inline |
Returns the width in pixels of the current extents.
Definition at line 88 of file roo_display.h.
References roo_display::Box::width().
|
friend |
Definition at line 185 of file roo_display.h.