dialogs-message.h 867 B

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