Loading...
Searching...
No Matches
dialogs.h
1#pragma once
2#include <furi.h>
3#include <gui/canvas.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10/****************** COMMON ******************/
11
12#define RECORD_DIALOGS "dialogs"
13
14typedef struct DialogsApp DialogsApp;
15
16/****************** FILE BROWSER ******************/
17
30typedef struct {
31 const char* extension;
32 const char* base_path;
33 bool skip_assets;
34 bool hide_dot_files;
35 const Icon* icon;
36 bool hide_ext;
37 FileBrowserLoadItemCallback item_loader_callback;
38 void* item_loader_context;
40
50void dialog_file_browser_set_basic_options(
52 const char* extension,
53 const Icon* icon);
54
63bool dialog_file_browser_show(
64 DialogsApp* context,
65 FuriString* result_path,
66 FuriString* path,
67 const DialogsFileBrowserOptions* options);
68
69/****************** MESSAGE ******************/
70
74typedef enum {
75 DialogMessageButtonBack,
76 DialogMessageButtonLeft,
77 DialogMessageButtonCenter,
78 DialogMessageButtonRight,
79} DialogMessageButton;
80
84typedef struct DialogMessage DialogMessage;
85
90DialogMessage* dialog_message_alloc(void);
91
96void dialog_message_free(DialogMessage* message);
97
107void dialog_message_set_text(
108 DialogMessage* message,
109 const char* text,
110 uint8_t x,
111 uint8_t y,
112 Align horizontal,
113 Align vertical);
114
124void dialog_message_set_header(
125 DialogMessage* message,
126 const char* text,
127 uint8_t x,
128 uint8_t y,
129 Align horizontal,
130 Align vertical);
131
139void dialog_message_set_icon(DialogMessage* message, const Icon* icon, uint8_t x, uint8_t y);
140
148void dialog_message_set_buttons(
149 DialogMessage* message,
150 const char* left,
151 const char* center,
152 const char* right);
153
160DialogMessageButton dialog_message_show(DialogsApp* context, const DialogMessage* message);
161
167void dialog_message_show_storage_error(DialogsApp* context, const char* error_text);
168
169#ifdef __cplusplus
170}
171#endif
GUI: Canvas API.
Align
Alignment enumeration.
Definition canvas.h:36
GUI: FileBrowser view module API.
Definition dialogs_module_message.c:12
Definition dialogs_i.h:10
File browser dialog extra options.
Definition dialogs.h:30
Definition string.c:4
Definition icon_i.h:9