GUI: ViewPort API. More...
Go to the source code of this file.
Typedefs | |
typedef struct ViewPort | ViewPort |
typedef void(* | ViewPortDrawCallback) (Canvas *canvas, void *context) |
ViewPort Draw callback. | |
typedef void(* | ViewPortInputCallback) (InputEvent *event, void *context) |
ViewPort Input callback. | |
Enumerations | |
enum | ViewPortOrientation { ViewPortOrientationHorizontal , ViewPortOrientationHorizontalFlip , ViewPortOrientationVertical , ViewPortOrientationVerticalFlip , ViewPortOrientationMAX } |
Functions | |
ViewPort * | view_port_alloc (void) |
ViewPort allocator. | |
void | view_port_free (ViewPort *view_port) |
ViewPort deallocator. | |
void | view_port_set_width (ViewPort *view_port, uint8_t width) |
Set view_port width. | |
uint8_t | view_port_get_width (const ViewPort *view_port) |
void | view_port_set_height (ViewPort *view_port, uint8_t height) |
Set view_port height. | |
uint8_t | view_port_get_height (const ViewPort *view_port) |
void | view_port_enabled_set (ViewPort *view_port, bool enabled) |
Enable or disable view_port rendering. | |
bool | view_port_is_enabled (const ViewPort *view_port) |
void | view_port_draw_callback_set (ViewPort *view_port, ViewPortDrawCallback callback, void *context) |
ViewPort event callbacks. | |
void | view_port_input_callback_set (ViewPort *view_port, ViewPortInputCallback callback, void *context) |
void | view_port_update (ViewPort *view_port) |
Emit update signal to GUI system. | |
void | view_port_set_orientation (ViewPort *view_port, ViewPortOrientation orientation) |
Set ViewPort orientation. | |
ViewPortOrientation | view_port_get_orientation (const ViewPort *view_port) |
GUI: ViewPort API.
typedef void(* ViewPortDrawCallback) (Canvas *canvas, void *context) |
ViewPort Draw callback.
typedef void(* ViewPortInputCallback) (InputEvent *event, void *context) |
ViewPort Input callback.
enum ViewPortOrientation |
ViewPort * view_port_alloc | ( | void | ) |
ViewPort allocator.
always returns view_port or stops system if not enough memory.
void view_port_draw_callback_set | ( | ViewPort * | view_port, |
ViewPortDrawCallback | callback, | ||
void * | context ) |
ViewPort event callbacks.
view_port | ViewPort instance |
callback | appropriate callback function |
context | context to pass to callback |
void view_port_enabled_set | ( | ViewPort * | view_port, |
bool | enabled ) |
Enable or disable view_port rendering.
view_port | ViewPort instance |
enabled | Indicates if enabled |
void view_port_free | ( | ViewPort * | view_port | ) |
ViewPort deallocator.
Ensure that view_port was unregistered in GUI system before use.
view_port | ViewPort instance |
void view_port_set_height | ( | ViewPort * | view_port, |
uint8_t | height ) |
Set view_port height.
Will be used to limit canvas drawing area and autolayout feature.
view_port | ViewPort instance |
height | wanted height, 0 - auto. |
void view_port_set_orientation | ( | ViewPort * | view_port, |
ViewPortOrientation | orientation ) |
Set ViewPort orientation.
view_port | ViewPort instance |
orientation | display orientation, horizontal or vertical. |
void view_port_set_width | ( | ViewPort * | view_port, |
uint8_t | width ) |
Set view_port width.
Will be used to limit canvas drawing area and autolayout feature.
view_port | ViewPort instance |
width | wanted width, 0 - auto. |
void view_port_update | ( | ViewPort * | view_port | ) |
Emit update signal to GUI system.
Rendering will happen later after GUI system process signal.
view_port | ViewPort instance |