Loading...
Searching...
No Matches
view_port_i.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "gui_i.h"
9#include "view_port.h"
10
11struct ViewPort {
12 Gui* gui;
13 FuriMutex* mutex;
14 bool is_enabled;
15 ViewPortOrientation orientation;
16
17 uint8_t width;
18 uint8_t height;
19
20 ViewPortDrawCallback draw_callback;
21 void* draw_callback_context;
22
23 ViewPortInputCallback input_callback;
24 void* input_callback_context;
25};
26
34void view_port_gui_set(ViewPort* view_port, Gui* gui);
35
43void view_port_draw(ViewPort* view_port, Canvas* canvas);
44
52void view_port_input(ViewPort* view_port, InputEvent* event);
GUI: main API internals.
Canvas structure.
Definition canvas_i.h:40
Definition mutex.c:13
Gui structure.
Definition gui_i.h:47
Input Event, dispatches with FuriPubSub.
Definition input.h:31
Definition view_port_i.h:11
GUI: ViewPort API.
void(* ViewPortInputCallback)(InputEvent *event, void *context)
ViewPort Input callback.
Definition view_port.h:33
void(* ViewPortDrawCallback)(Canvas *canvas, void *context)
ViewPort Draw callback.
Definition view_port.h:28
ViewPortOrientation
Definition view_port.h:17
void view_port_input(ViewPort *view_port, InputEvent *event)
Process input.
Definition view_port.c:222
void view_port_gui_set(ViewPort *view_port, Gui *gui)
Set GUI reference.
Definition view_port.c:195
void view_port_draw(ViewPort *view_port, Canvas *canvas)
Process draw call.
Definition view_port.c:202