summaryrefslogtreecommitdiff
path: root/lib/lvgl/src/widgets/lv_switch.h
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-06-01 15:41:47 +1000
committerjacqueline <me@jacqueline.id.au>2023-06-01 15:41:47 +1000
commitdd27c3530432ea0b09f01e604bf577f31d8ef841 (patch)
treebbf86cf81a78f0ff0b07f31f1c390db473f26fd3 /lib/lvgl/src/widgets/lv_switch.h
parent6fd588e970470b15936187980829916d0dbe77bb (diff)
downloadtangara-fw-dd27c3530432ea0b09f01e604bf577f31d8ef841.tar.gz
convert lvgl from submodule to a plain old directory
Diffstat (limited to 'lib/lvgl/src/widgets/lv_switch.h')
m---------lib/lvgl0
-rw-r--r--lib/lvgl/src/widgets/lv_switch.h61
2 files changed, 61 insertions, 0 deletions
diff --git a/lib/lvgl b/lib/lvgl
deleted file mode 160000
-Subproject 0732400e7b564dd0e7dc4a924619d8e19c5b23a
diff --git a/lib/lvgl/src/widgets/lv_switch.h b/lib/lvgl/src/widgets/lv_switch.h
new file mode 100644
index 00000000..83ca81bc
--- /dev/null
+++ b/lib/lvgl/src/widgets/lv_switch.h
@@ -0,0 +1,61 @@
+/**
+ * @file lv_switch.h
+ *
+ */
+
+#ifndef LV_SWITCH_H
+#define LV_SWITCH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../lv_conf_internal.h"
+
+#if LV_USE_SWITCH != 0
+
+#include "../core/lv_obj.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/** Switch knob extra area correction factor */
+#define _LV_SWITCH_KNOB_EXT_AREA_CORRECTION 2
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+typedef struct {
+ lv_obj_t obj;
+ int32_t anim_state;
+} lv_switch_t;
+
+extern const lv_obj_class_t lv_switch_class;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Create a switch object
+ * @param parent pointer to an object, it will be the parent of the new switch
+ * @return pointer to the created switch
+ */
+lv_obj_t * lv_switch_create(lv_obj_t * parent);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_SWITCH*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_SWITCH_H*/