dialogs_message.h 947 B

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