Loading...
Searching...
No Matches
gui_i.h File Reference

GUI: main API internals. More...

#include "gui.h"
#include <furi.h>
#include <furi_hal_rtc.h>
#include <m-array.h>
#include <stdio.h>
#include "canvas.h"
#include "canvas_i.h"
#include "view_port.h"
#include "view_port_i.h"

Go to the source code of this file.

Data Structures

struct  Gui
 Gui structure. More...
 

Macros

#define GUI_DISPLAY_WIDTH   128
 
#define GUI_DISPLAY_HEIGHT   64
 
#define GUI_STATUS_BAR_X   0
 
#define GUI_STATUS_BAR_Y   0
 
#define GUI_STATUS_BAR_WIDTH   GUI_DISPLAY_WIDTH
 
#define GUI_STATUS_BAR_HEIGHT   13
 
#define GUI_STATUS_BAR_WORKAREA_HEIGHT   8
 
#define GUI_WINDOW_X   0
 
#define GUI_WINDOW_Y   GUI_STATUS_BAR_HEIGHT
 
#define GUI_WINDOW_WIDTH   GUI_DISPLAY_WIDTH
 
#define GUI_WINDOW_HEIGHT   (GUI_DISPLAY_HEIGHT - GUI_WINDOW_Y)
 
#define GUI_THREAD_FLAG_DRAW   (1 << 0)
 
#define GUI_THREAD_FLAG_INPUT   (1 << 1)
 
#define GUI_THREAD_FLAG_ALL   (GUI_THREAD_FLAG_DRAW | GUI_THREAD_FLAG_INPUT)
 

Functions

 ARRAY_DEF (ViewPortArray, ViewPort *, M_PTR_OPLIST)
 
ViewPortgui_view_port_find_enabled (ViewPortArray_t array)
 Find enabled ViewPort in ViewPortArray.
 
void gui_update (Gui *gui)
 Update GUI, request redraw.
 
void gui_input_events_callback (const void *value, void *ctx)
 Input event callback.
 
size_t gui_active_view_port_count (Gui *gui, GuiLayer layer)
 Get count of view ports in layer.
 
void gui_lock (Gui *gui)
 Lock GUI.
 
void gui_unlock (Gui *gui)
 Unlock GUI.
 

Detailed Description

GUI: main API internals.

Function Documentation

◆ gui_active_view_port_count()

size_t gui_active_view_port_count ( Gui * gui,
GuiLayer layer )

Get count of view ports in layer.

Parameters
guiThe Gui instance
[in]layerGuiLayer that we want to get count of view ports

◆ gui_input_events_callback()

void gui_input_events_callback ( const void * value,
void * ctx )

Input event callback.

Used to receive input from input service or to inject new input events

Parameters
[in]valueThe value pointer (InputEvent*)
ctxThe context (Gui instance)

◆ gui_lock()

void gui_lock ( Gui * gui)

Lock GUI.

Parameters
guiThe Gui instance

◆ gui_unlock()

void gui_unlock ( Gui * gui)

Unlock GUI.

Parameters
guiThe Gui instance

◆ gui_update()

void gui_update ( Gui * gui)

Update GUI, request redraw.

Parameters
guiGui instance

◆ gui_view_port_find_enabled()

ViewPort * gui_view_port_find_enabled ( ViewPortArray_t array)

Find enabled ViewPort in ViewPortArray.

Parameters
[in]arrayThe ViewPortArray instance
Returns
ViewPort instance or NULL