dialogs_message.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. FileBrowserLoadItemCallback item_callback;
  17. void* item_callback_context;
  18. } DialogsAppMessageDataFileBrowser;
  19. typedef struct {
  20. const DialogMessage* message;
  21. } DialogsAppMessageDataDialog;
  22. typedef union {
  23. DialogsAppMessageDataFileBrowser file_browser;
  24. DialogsAppMessageDataDialog dialog;
  25. } DialogsAppData;
  26. typedef union {
  27. bool bool_value;
  28. DialogMessageButton dialog_value;
  29. } DialogsAppReturn;
  30. typedef enum {
  31. DialogsAppCommandFileBrowser,
  32. DialogsAppCommandDialog,
  33. } DialogsAppCommand;
  34. typedef struct {
  35. FuriApiLock lock;
  36. DialogsAppCommand command;
  37. DialogsAppData* data;
  38. DialogsAppReturn* return_data;
  39. } DialogsAppMessage;
  40. #ifdef __cplusplus
  41. }
  42. #endif