The Surface interface is the base interface for Window (on Desktop platforms) and Canvas (on mobile platforms).
More...
#include <Surface.h>
|
| static bool | ProcessEvents () |
| | Processes all windowing system events, i.e. input-, movement-, resize-, and other events for all surfaces associated with the host process.
|
The Surface interface is the base interface for Window (on Desktop platforms) and Canvas (on mobile platforms).
- See also
- Window
-
Canvas
◆ AdaptForVideoMode()
| virtual bool LLGL::Surface::AdaptForVideoMode |
( |
Extent2D * | resolution, |
|
|
bool * | fullscreen ) |
|
pure virtual |
Adapts the surface to satisfy the needs for the specified video mode.
- Parameters
-
| [in,out] | resolution | Optional pointer to the input and output resolution. |
| [in,out] | fullscreen | Optional pointer to the fullscreen bit. |
- Returns
- If the video mode has been accepted with no modifications and this surface has been updated then the return value is true. Otherwise,
resolution and/or fullscreen arguments have been modified to the value this surface supports and the return value is false.
Implemented in LLGL::Canvas, and LLGL::Window.
◆ FindResidentDisplay()
| virtual Display * LLGL::Surface::FindResidentDisplay |
( |
| ) |
const |
|
pure virtual |
Returns the Display interface in which this surface is resident.
- Returns
- Pointer to the Display in which this surface is resident or null if this surface is not resident in any display.
Implemented in LLGL::Canvas, and LLGL::Window.
◆ GetContentSize()
| virtual Extent2D LLGL::Surface::GetContentSize |
( |
| ) |
const |
|
pure virtual |
Returns the size (in pixels) of the surface content, i.e. the drawable area.
- See also
- Window::GetSize
◆ GetNativeHandle()
| virtual bool LLGL::Surface::GetNativeHandle |
( |
void * | nativeHandle, |
|
|
std::size_t | nativeHandleSize ) |
|
pure virtual |
Returns the native surface handle.
- Parameters
-
| [out] | nativeHandle | Raw pointer to the platform specific structure to store the native handle. This must be of type LLGL::NativeHandle. |
| [in] | nativeHandleSize | Specifies the size (in bytes) of the native handle structure for robustness. This must be sizeof(LLGL::NativeHandle). |
- Returns
- True if the native handle was successfully retrieved. Otherwise,
nativeHandleSize specifies an incompatible structure size.
◆ ProcessEvents()
| bool LLGL::Surface::ProcessEvents |
( |
| ) |
|
|
static |
Processes all windowing system events, i.e. input-, movement-, resize-, and other events for all surfaces associated with the host process.
- Returns
- True as long as events can be received. Otherwise, the connection to the window server might have been closed or an error occurred. The return value is mostly used to allow having this function inside a conditional expression to be called before any other event based conditions are invoked, like in the following example:
while (LLGL::Surface::ProcessEvent() && !myWindow->HasQuit()) {
...
}
The documentation for this class was generated from the following file: