dialogs_message.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include <furi.h>
  3. #include "dialogs_i.h"
  4. #include <toolbox/api_lock.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. typedef struct {
  9. const char* extension;
  10. bool skip_assets;
  11. bool hide_ext;
  12. bool hide_dot_files;
  13. const Icon* file_icon;
  14. FuriString* result_path;
  15. FuriString* preselected_filename;
  16. FileBrowserLoadItemCallback item_callback;
  17. void* item_callback_context;
  18. const char* base_path;
  19. } DialogsAppMessageDataFileBrowser;
  20. typedef struct {
  21. const DialogMessage* message;
  22. } DialogsAppMessageDataDialog;
  23. typedef union {
  24. DialogsAppMessageDataFileBrowser file_browser;
  25. DialogsAppMessageDataDialog dialog;
  26. } DialogsAppData;
  27. typedef union {
  28. bool bool_value;
  29. DialogMessageButton dialog_value;
  30. } DialogsAppReturn;
  31. typedef enum {
  32. DialogsAppCommandFileBrowser,
  33. DialogsAppCommandDialog,
  34. } DialogsAppCommand;
  35. typedef struct {
  36. FuriApiLock lock;
  37. DialogsAppCommand command;
  38. DialogsAppData* data;
  39. DialogsAppReturn* return_data;
  40. } DialogsAppMessage;
  41. #ifdef __cplusplus
  42. }
  43. #endif