summaryrefslogtreecommitdiff
path: root/lib/lvgl/src/draw/lv_draw_layer.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/draw/lv_draw_layer.h
parent6fd588e970470b15936187980829916d0dbe77bb (diff)
downloadtangara-fw-dd27c3530432ea0b09f01e604bf577f31d8ef841.tar.gz
convert lvgl from submodule to a plain old directory
Diffstat (limited to 'lib/lvgl/src/draw/lv_draw_layer.h')
m---------lib/lvgl0
-rw-r--r--lib/lvgl/src/draw/lv_draw_layer.h83
2 files changed, 83 insertions, 0 deletions
diff --git a/lib/lvgl b/lib/lvgl
deleted file mode 160000
-Subproject 0732400e7b564dd0e7dc4a924619d8e19c5b23a
diff --git a/lib/lvgl/src/draw/lv_draw_layer.h b/lib/lvgl/src/draw/lv_draw_layer.h
new file mode 100644
index 00000000..cd64149c
--- /dev/null
+++ b/lib/lvgl/src/draw/lv_draw_layer.h
@@ -0,0 +1,83 @@
+/**
+ * @file lv_draw_layer.h
+ *
+ */
+
+#ifndef LV_DRAW_LAYER_H
+#define LV_DRAW_LAYER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../lv_conf_internal.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+struct _lv_draw_ctx_t;
+struct _lv_draw_layer_ctx_t;
+
+typedef enum {
+ LV_DRAW_LAYER_FLAG_NONE,
+ LV_DRAW_LAYER_FLAG_HAS_ALPHA,
+ LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE,
+} lv_draw_layer_flags_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Create a new layer context. It is used to start and independent rendering session
+ * with the current draw_ctx
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_area the coordinates of the layer
+ * @param flags OR-ed flags from @lv_draw_layer_flags_t
+ * @return pointer to the layer context, or NULL on error
+ */
+struct _lv_draw_layer_ctx_t * lv_draw_layer_create(struct _lv_draw_ctx_t * draw_ctx, const lv_area_t * layer_area,
+ lv_draw_layer_flags_t flags);
+
+/**
+ * Adjust the layer_ctx and/or draw_ctx based on the `layer_ctx->area_act`.
+ * It's called only if flags has `LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ * @param flags OR-ed flags from @lv_draw_layer_flags_t
+ */
+void lv_draw_layer_adjust(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+/**
+ * Blend a rendered layer to `layer_ctx->area_act`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ * @param draw_dsc pointer to an image draw descriptor
+ */
+void lv_draw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_img_dsc_t * draw_dsc);
+
+/**
+ * Destroy a layer context.
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ */
+void lv_draw_layer_destroy(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx);
+
+/**********************
+ * MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_LAYER_H*/