UnitempViews.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. Unitemp - Universal temperature reader
  3. Copyright (C) 2022-2023 Victor Nikitchuk (https://github.com/quen0n)
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. */
  15. #ifndef UNITEMP_SCENES
  16. #define UNITEMP_SCENES
  17. #include "../unitemp.h"
  18. //Виды менюшек
  19. typedef enum UnitempViews {
  20. UnitempViewGeneral,
  21. UnitempViewMainMenu,
  22. UnitempViewSettings,
  23. UnitempViewSensorsList,
  24. UnitempViewSensorEdit,
  25. UnitempViewSensorNameEdit,
  26. UnitempViewSensorActions,
  27. UnitempViewWidget,
  28. UnitempViewPopup,
  29. UnitempViewsCount
  30. } UnitempViews;
  31. /**
  32. * @brief Вывести всплывающее окно
  33. *
  34. * @param icon Указатель на иконку
  35. * @param header Заголовок
  36. * @param message Сообщение
  37. * @param prev_view_id ID вида куда в который нужно вернуться
  38. */
  39. void unitemp_popup(const Icon* icon, char* header, char* message, uint32_t prev_view_id);
  40. /* Общий вид на датчики */
  41. void unitemp_General_alloc(void);
  42. void unitemp_General_switch(void);
  43. void unitemp_General_free(void);
  44. /* Главное меню */
  45. void unitemp_MainMenu_alloc(void);
  46. void unitemp_MainMenu_switch(void);
  47. void unitemp_MainMenu_free(void);
  48. /* Настройки */
  49. void unitemp_Settings_alloc(void);
  50. void unitemp_Settings_switch(void);
  51. void unitemp_Settings_free(void);
  52. /* Список датчиков */
  53. void unitemp_SensorsList_alloc(void);
  54. void unitemp_SensorsList_switch(void);
  55. void unitemp_SensorsList_free(void);
  56. /* Редактор датчка */
  57. void unitemp_SensorEdit_alloc(void);
  58. //sensor - указатель на редактируемый датчик
  59. void unitemp_SensorEdit_switch(Sensor* sensor);
  60. void unitemp_SensorEdit_free(void);
  61. /* Редактор имени датчика */
  62. void unitemp_SensorNameEdit_alloc(void);
  63. void unitemp_SensorNameEdit_switch(Sensor* sensor);
  64. void unitemp_SensorNameEdit_free(void);
  65. /* Список действий с датчиком */
  66. void unitemp_SensorActions_alloc(void);
  67. void unitemp_SensorActions_switch(Sensor* sensor);
  68. void unitemp_SensorActions_free(void);
  69. /* Виджеты */
  70. void unitemp_widgets_alloc(void);
  71. void unitemp_widgets_free(void);
  72. /* Подтверждение удаления */
  73. void unitemp_widget_delete_switch(Sensor* sensor);
  74. /* Помощь */
  75. void unitemp_widget_help_switch(void);
  76. /* О приложении */
  77. void unitemp_widget_about_switch(void);
  78. #endif