ob_statusbar.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * @file ob_statusbar.h
  3. *
  4. */
  5. #ifndef OB_STATUSBAR_H
  6. #define OB_STATUSBAR_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /*********************
  11. * INCLUDES
  12. *********************/
  13. #include "lv_conf.h"
  14. #include "config.h"
  15. #if USE_OB_STATUSBAR != 0
  16. #include "lvgl/lvgl.h"
  17. /*********************
  18. * DEFINES
  19. *********************/
  20. /**********************
  21. * TYPEDEFS
  22. **********************/
  23. /*Data of card*/
  24. typedef struct
  25. {
  26. /*Ext. of ancestor*/
  27. /*New data for this type */
  28. int bAlarm;
  29. int bBluetooth;
  30. int bWifi;
  31. int batteryLevel;
  32. }ob_statusbar_ext_t;
  33. /**********************
  34. * GLOBAL PROTOTYPES
  35. **********************/
  36. /**
  37. * Create a Card view object
  38. * @param par pointer to an object, it will be the parent of the new card
  39. * @param copy pointer to a card object, if not NULL then the new object will be copied from it
  40. * @return pointer to the created card
  41. */
  42. lv_obj_t * ob_statusbar_create(lv_obj_t * par, lv_obj_t * copy);
  43. /*=====================
  44. * Setter functions
  45. *====================*/
  46. /**
  47. * Set a status variable
  48. * @param cardview pointer to Card view object
  49. * @param id index of a card to load
  50. * @param anim_en true: set with sliding animation; false: set immediately
  51. */
  52. // void ob_statusbar_set_card_act(lv_obj_t * cardview, uint16_t id, bool anim_en);
  53. /*=====================
  54. * Getter functions
  55. *====================*/
  56. /**
  57. * Get the status varuable
  58. * @param cardview pointer to Card view object
  59. * @return the active card index
  60. */
  61. // uint16_t ob_statusbar_get_card_act(lv_obj_t * cardview);
  62. #endif /*USE_OB_STATUSBAR*/
  63. #ifdef __cplusplus
  64. } /* extern "C" */
  65. #endif
  66. #endif /*OB_STATUSBAR_H*/