![]() |
LLGL 0.05 Beta
|
Canvas interface for mobile platforms. More...
#include <Canvas.h>
Classes | |
| class | EventListener |
| Interface for all canvas event listeners. More... | |
Public Member Functions | |
| ~Canvas () | |
| Releases the internal data. | |
| virtual void | SetTitle (const UTF8String &title)=0 |
| Sets the canvas title as UTF-8 string. | |
| virtual UTF8String | GetTitle () const =0 |
| Returns the canvas title as UTF16 string. | |
| bool | AdaptForVideoMode (Extent2D *resolution, bool *fullscreen) override |
| This default implementation ignores the video mode descriptor completely and always return false. | |
| Display * | FindResidentDisplay () const override final |
| Always returns Display::GetPrimary. | |
| void | SetUserData (void *userData) |
| Sets a raw pointer to some user defined data. The initial value is null. | |
| void * | GetUserData () const |
| Returns the raw pointer that was previously set with SetUserData. The initial value is null. | |
| void | AddEventListener (const std::shared_ptr< EventListener > &eventListener) |
| Adds a new event listener to this canvas. | |
| void | RemoveEventListener (const EventListener *eventListener) |
| Removes the specified event listener from this canvas. | |
| void | PostInit () |
| Posts a signal that the canvas is initialized or re-initialized. | |
| void | PostDestroy () |
| Posts a signal that the canvas is about to be destroyed. | |
| void | PostDraw () |
| Posts a draw event to all event listeners. | |
| void | PostResize (const Extent2D &clientAreaSize) |
| Posts a resize event to all event listeners. | |
| void | PostTapGesture (const Offset2D &position, std::uint32_t numTouches) |
| Posts a tap gesture event to all event listeners. | |
| void | PostPanGesture (const Offset2D &position, std::uint32_t numTouches, float dx, float dy, EventAction action) |
| Posts a pan gesture event to all event listeners. | |
| void | PostKeyDown (Key keyCode) |
| Posts a keycode event from a device button that has been pushed down. | |
| void | PostKeyUp (Key keyCode) |
| Posts a keycode event from a device button that has been released. | |
| Public Member Functions inherited from LLGL::Surface | |
| virtual bool | GetNativeHandle (void *nativeHandle, std::size_t nativeHandleSize)=0 |
| Returns the native surface handle. | |
| virtual Extent2D | GetContentSize () const =0 |
| Returns the size (in pixels) of the surface content, i.e. the drawable area. | |
| Public Member Functions inherited from LLGL::Interface | |
| virtual bool | IsInstanceOf (int id) const |
| Returns true if this object is an instance of the specified interface. | |
| Public Member Functions inherited from LLGL::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| virtual | ~NonCopyable ()=default |
Static Public Member Functions | |
| static std::unique_ptr< Canvas > | Create (const CanvasDescriptor &desc) |
| Creates a platform specific instance of the Canvas interface. | |
| Static Public Member Functions inherited from LLGL::Surface | |
| static bool | ProcessEvents () |
| Processes all windowing system events, i.e. input-, movement-, resize-, and other events for all surfaces associated with the host process. | |
Protected Member Functions | |
| Canvas () | |
| Allocates the internal data. | |
| Protected Member Functions inherited from LLGL::NonCopyable | |
| NonCopyable ()=default | |
Canvas interface for mobile platforms.
| LLGL::Canvas::~Canvas | ( | ) |
Releases the internal data.
|
protected |
Allocates the internal data.
|
overridevirtual |
This default implementation ignores the video mode descriptor completely and always return false.
Implements LLGL::Surface.
| void LLGL::Canvas::AddEventListener | ( | const std::shared_ptr< EventListener > & | eventListener | ) |
Adds a new event listener to this canvas.
|
static |
Creates a platform specific instance of the Canvas interface.
|
finaloverridevirtual |
Always returns Display::GetPrimary.
Implements LLGL::Surface.
|
pure virtual |
Returns the canvas title as UTF16 string.
| void * LLGL::Canvas::GetUserData | ( | ) | const |
Returns the raw pointer that was previously set with SetUserData. The initial value is null.
| void LLGL::Canvas::PostDestroy | ( | ) |
Posts a signal that the canvas is about to be destroyed.
APP_CMD_TERM_WINDOW command. | void LLGL::Canvas::PostDraw | ( | ) |
Posts a draw event to all event listeners.
| void LLGL::Canvas::PostInit | ( | ) |
Posts a signal that the canvas is initialized or re-initialized.
APP_CMD_INIT_WINDOW command. | void LLGL::Canvas::PostKeyDown | ( | Key | keyCode | ) |
Posts a keycode event from a device button that has been pushed down.
| void LLGL::Canvas::PostKeyUp | ( | Key | keyCode | ) |
Posts a keycode event from a device button that has been released.
| void LLGL::Canvas::PostPanGesture | ( | const Offset2D & | position, |
| std::uint32_t | numTouches, | ||
| float | dx, | ||
| float | dy, | ||
| EventAction | action ) |
Posts a pan gesture event to all event listeners.
| void LLGL::Canvas::PostResize | ( | const Extent2D & | clientAreaSize | ) |
Posts a resize event to all event listeners.
| void LLGL::Canvas::PostTapGesture | ( | const Offset2D & | position, |
| std::uint32_t | numTouches ) |
Posts a tap gesture event to all event listeners.
| void LLGL::Canvas::RemoveEventListener | ( | const EventListener * | eventListener | ) |
Removes the specified event listener from this canvas.
|
pure virtual |
Sets the canvas title as UTF-8 string.
| void LLGL::Canvas::SetUserData | ( | void * | userData | ) |
Sets a raw pointer to some user defined data. The initial value is null.