This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository echart.
View the commit online.
commit f10913390bf42a7737deed331dc517498e1b8d25
Author: Vincent Torri <[email protected]>
AuthorDate: Wed Jun 3 18:11:28 2026 +0200
add line test in a window to test resize
---
src/bin/echart_main.c | 5 +++
src/bin/echart_win.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/bin/echart_win.h | 11 ++++++
src/bin/meson.build | 1 +
4 files changed, 111 insertions(+)
diff --git a/src/bin/echart_main.c b/src/bin/echart_main.c
index b1eaf95..d663f0a 100644
--- a/src/bin/echart_main.c
+++ b/src/bin/echart_main.c
@@ -9,6 +9,8 @@
#include "Echart.h"
+#include "echart_win.h"
+
EAPI_MAIN int
elm_main(int argc, char **argv)
{
@@ -245,6 +247,9 @@ elm_main(int argc, char **argv)
evas_object_resize(win, w, h);
evas_object_show(win);
+ win = win_new();
+ evas_object_show(win);
+
elm_run();
evas_object_del(o);
diff --git a/src/bin/echart_win.c b/src/bin/echart_win.c
new file mode 100644
index 0000000..5493aa2
--- /dev/null
+++ b/src/bin/echart_win.c
@@ -0,0 +1,94 @@
+/*
+ * SPDX-FileCopyrightText: Vincent Torri <[email protected]>
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <config.h>
+
+#include <Elementary.h>
+
+#include "Echart.h"
+#include "echart_private.h"
+
+static Evas_Object *lines = NULL;
+
+static void
+_cb_win_del(void *data EINA_UNUSED,
+ Evas *_e EINA_UNUSED,
+ Evas_Object *win,
+ void *_event EINA_UNUSED)
+{
+}
+
+/* static void */
+/* _cb_win_resize(void *data EINA_UNUSED, */
+/* Evas *_e EINA_UNUSED, */
+/* Evas_Object *win, */
+/* void *_event EINA_UNUSED) */
+/* { */
+/* Entice *entice; */
+
+/* INF("win resize"); */
+
+/* entice = evas_object_data_get(win, "entice"); */
+/* if (!entice || !entice->image) */
+/* return; */
+
+/* entice_image_update(entice->image); */
+
+/* INF("win fin resize"); */
+/* } */
+
+Evas_Object *win_new(void)
+{
+ Evas_Object *win;
+ Evas_Object *o;
+ int w;
+ int h;
+ int num = 6;
+ double d[num];
+
+ w = 640 * elm_config_scale_get();
+ h = 400 * elm_config_scale_get();
+
+ win = elm_win_util_standard_add("Chart", "Chart example");
+ elm_win_autodel_set(win, EINA_TRUE);
+
+ evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cb_win_del, NULL);
+ //evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _cb_win_resize, entice);
+
+ /* white background */
+ o = elm_bg_add(win);
+ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_bg_color_set(o, 255, 255, 255);
+ elm_win_resize_object_add(win, o);
+ evas_object_show(o);
+
+ o = lines = echart_line_add(evas_object_evas_get(win));
+ evas_object_move(o, 0, 0);
+
+ d[0] = 3.5;
+ d[1] = 2.5;
+ d[2] = 4.3;
+ d[3] = 7.9;
+ d[4] = 1.2;
+ d[5] = 8.4;
+ echart_line_data_append(o, d, num);
+
+ d[0] = 9.5;
+ d[1] = 6.7;
+ d[2] = 2.3;
+ d[3] = 7.9;
+ d[4] = 10.2;
+ d[5] = 1.4;
+ echart_line_data_append(o, d, num);
+
+ echart_line_width_set(o, 3);
+ evas_object_show(o);
+
+ elm_win_resize_object_add(win, o);
+
+ evas_object_resize(win, w, h);
+
+ return win;
+}
diff --git a/src/bin/echart_win.h b/src/bin/echart_win.h
new file mode 100644
index 0000000..07f3ca1
--- /dev/null
+++ b/src/bin/echart_win.h
@@ -0,0 +1,11 @@
+/*
+ * SPDX-FileCopyrightText: Vincent Torri <[email protected]>
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#ifndef ECHART_WIN_H
+#define ECHART_WIN_H
+
+Evas_Object *win_new(void);
+
+#endif /* ECHART_WIN_H */
diff --git a/src/bin/meson.build b/src/bin/meson.build
index aecedbb..8ebefa4 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -3,6 +3,7 @@
echart_bin_src = files([
'echart_main.c',
+ 'echart_win.c',
])
executable('echart', echart_bin_src,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.