#include <Display.h>
Description
Backend that controls how data is displayed to the user.
The display is abstracted as a rectangle, with a width, height, and position, that consumes a rendered visual of data from a renderer.
Data Structures | |
class | CloseCallback |
class | ResizeCallback |
Public Types | |
enum | Capability { CanResize, CanMove, CanFullscreen, CanHide, CanLockSize } |
enum | ViewPolicy { NoPolicy, MatchSize } |
enum | DisplayHandleType { X11Display, WINAPIHandle, Unknown } |
enum | DisplayEventType { X11Event, WINAPIMsg, Unknown } |
Functions | |
virtual void | Resize (int w, int h)=0 |
virtual void | SetPosition (int x, int y)=0 |
virtual void | Fullscreen (bool)=0 |
virtual void | Hide (bool)=0 |
virtual bool | HasInputFocus ()=0 |
virtual void | LockClientResize (bool)=0 |
virtual void | LockClientPosition (bool)=0 |
virtual void | SetViewPolicy (ViewPolicy)=0 |
virtual int | Width ()=0 |
virtual int | Height ()=0 |
virtual int | X ()=0 |
virtual int | Y ()=0 |
virtual void | SetName (const std::string &)=0 |
virtual void | AddResizeCallback (ResizeCallback *)=0 |
virtual void | RemoveResizeCallback (ResizeCallback *)=0 |
virtual void | AddCloseCallback (CloseCallback *)=0 |
virtual void | RemoveCloseCallback (CloseCallback *)=0 |
virtual bool | IsCapable (Capability)=0 |
virtual void | AttachSource (Framebuffer *)=0 |
virtual Framebuffer * | GetSource ()=0 |
virtual void | Update ()=0 |
virtual DisplayHandleType | GetSystemHandleType ()=0 |
virtual void * | GetSystemHandle ()=0 |
virtual DisplayEventType | GetSystemEventType ()=0 |
virtual void * | GetLastSystemEvent ()=0 |
Member Enumeration Documentation
|
strong |
The standard functional capabilities of a Display.
Enumerator | |
---|---|
CanResize |
The Display can be resized. |
CanMove |
The Display's position can be moved. |
CanFullscreen |
The Display's size can consume the entire physical device, often in a special state. |
CanHide |
The Display can be hidden. |
CanLockSize |
The Display can prevent the user from changing the dimensions of the Display. |
|
strong |
Controls how the Display displays Rendered data.
Enumerator | |
---|---|
NoPolicy |
The Display will show the attached Framebuffer's contents with no transformation. |
MatchSize |
The Display will stretch the attached Framebuffer's contents to match the windows dimensions. |
|
strong |
The variety of system handle types that Display can represent.
|
strong |
The varienty of system event types that Display can give.
Enumerator | |
---|---|
X11Event |
The event is a pointer to a std::vector<XEvent>. |
WINAPIMsg |
The event is a pointer to a std::vector<MSG>. |
Unknown |
The event's type is not known and should not be relied on. |
Member Function Documentation
|
pure virtual |
Resizes the display. If the display does not support resizing, no action is taken.
|
pure virtual |
Sets the position of the display.
Usually, this is relative to whatever environment the display exists in. For example, in a desktop environment, this could be an offset from the DE's origin. If the display does not support moving, no action is taken.
|
pure virtual |
Set the display into a fullscreen context. If fullscreen is not supported, no action is taken.
|
pure virtual |
Attempts to hide the display. If hiding is not supported, no action is taken.
|
pure virtual |
Returns whether the display has user input focus. On display implementations where this doesnt apply, i.e. where there is only one logical display available,, this will always return true.
|
pure virtual |
Attempts to prevent resizing on the user's side.
For example, in a desktop environment, this would disable the feature of resizing the window.
|
pure virtual |
Attempts to prevent moving on the user's side.
|
pure virtual |
Controls how the Renderer's information is displayed. The default policy is "MatchSize" See ViewPolicy for more information.
|
pure virtual |
Returns the width of the display.
|
pure virtual |
Returns the height of the display.
|
pure virtual |
Returns the X position of the display.
|
pure virtual |
Returns the Y position of the display.
|
pure virtual |
Sets the name of the display. On some systems, this can, for example, set the title bar of the application to the specified name.
|
pure virtual |
Adds an additional callback function to be be called after the occurance of a resize event.Callbacks are run in the order that they were added in.
|
pure virtual |
Removes the callback of the same instance as one given via AddResizeCallback.
|
pure virtual |
Adds an additional callback function to be be called after the occurance of a closing event.
Typically on desktop systems, this is triggered by pressing the close button on the window associated with the Display. Callbacks are run in the order that they were added in.
|
pure virtual |
Removes the callback of the same instance as one given via AddCloseCallback.
|
pure virtual |
Returns whether or not the Display is able to perform the requested capability.
|
pure virtual |
Attaches the given framebuffer as the source of the display. Any updates to the display reflect the content of the source framebuffer. Setting the source as nullptr will nullify any request for updating.
|
pure virtual |
Returns the frame data to read from.
|
pure virtual |
Updates display with input visual data that is populated in the internal framebuffer. THe framebuffer's data canbe populated by modifying the framebuffer in GetSource()
|
pure virtual |
Returns the type associated with data returned by GetSystemHandle. Meant for internal use, but can be handy when doing weird things.
|
pure virtual |
|
pure virtual |
Returns the type of the system events returned by GetLastSystemEvent(). Like getting the system handle, it's mostly meant for internal use, but can come in handy when doing weird things.
|
pure virtual |
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Backends/Display/Display.h