dialogs-message.h 888 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include <furi.h>
  3. #include "dialogs-i.h"
  4. #include "dialogs-api-lock.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. typedef struct {
  9. const char* path;
  10. const char* extension;
  11. char* result;
  12. uint8_t result_size;
  13. const char* preselected_filename;
  14. } DialogsAppMessageDataFileSelect;
  15. typedef struct {
  16. const DialogMessage* message;
  17. } DialogsAppMessageDataDialog;
  18. typedef union {
  19. DialogsAppMessageDataFileSelect file_select;
  20. DialogsAppMessageDataDialog dialog;
  21. } DialogsAppData;
  22. typedef union {
  23. bool bool_value;
  24. DialogMessageButton dialog_value;
  25. } DialogsAppReturn;
  26. typedef enum {
  27. DialogsAppCommandFileOpen,
  28. DialogsAppCommandDialog,
  29. } DialogsAppCommand;
  30. typedef struct {
  31. FuriApiLock lock;
  32. DialogsAppCommand command;
  33. DialogsAppData* data;
  34. DialogsAppReturn* return_data;
  35. } DialogsAppMessage;
  36. #ifdef __cplusplus
  37. }
  38. #endif