From b8fd0c3b74d5a7c9db92c187daddfdf2a3add4c9 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 3 Oct 2019 12:19:03 +0200 Subject: [PATCH] Adapt examples to latest Unified API changes Efl.Ui.Text headers have to be manually included for now, since they still depend on Legacy headers. Padding API has lost a parameter. --- apps/c/texteditor/src/texteditor_main.c | 4 +++- reference/c/ui/src/focus_main.c | 4 +++- reference/c/ui/src/ui_container.c | 5 +++-- reference/csharp/ui/src/ui_container.cs | 2 +- tutorial/c/hello-gui/src/gui_main.c | 4 +++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/c/texteditor/src/texteditor_main.c b/apps/c/texteditor/src/texteditor_main.c index 7a5501bb..bc70b618 100644 --- a/apps/c/texteditor/src/texteditor_main.c +++ b/apps/c/texteditor/src/texteditor_main.c @@ -1,8 +1,10 @@ #define EFL_BETA_API_SUPPORT 1 -#include #include #include +// Temporary workaround until Unified Text stops using Legacy classes internally +#include +#include Efl_Ui_Text *_editor; Efl_Ui_Button *_toolbar_new; diff --git a/reference/c/ui/src/focus_main.c b/reference/c/ui/src/focus_main.c index 5bd14dde..d4f678eb 100644 --- a/reference/c/ui/src/focus_main.c +++ b/reference/c/ui/src/focus_main.c @@ -1,8 +1,10 @@ #define EFL_BETA_API_SUPPORT 1 -#include #include #include +// Temporary workaround until Unified Text stops using Legacy classes internally +#include +#include static void _gui_about_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) diff --git a/reference/c/ui/src/ui_container.c b/reference/c/ui/src/ui_container.c index 166a458a..81288a8c 100644 --- a/reference/c/ui/src/ui_container.c +++ b/reference/c/ui/src/ui_container.c @@ -1,8 +1,9 @@ #define EFL_BETA_API_SUPPORT 1 -#include #include #include +// Temporary workaround until Unified Text stops using Legacy classes internally +#include /* * Efl.UI container exmaples. @@ -61,7 +62,7 @@ _ui_boxes_setup(Efl_Ui_Win *win) int i; box = efl_add(EFL_UI_BOX_CLASS, win, - efl_gfx_arrangement_content_padding_set(efl_added, 5, 0, EINA_TRUE)); + efl_gfx_arrangement_content_padding_set(efl_added, 5, 0)); for (i = 1; i <= 4; i++) { diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs index 5379ee66..f52a5bdb 100644 --- a/reference/csharp/ui/src/ui_container.cs +++ b/reference/csharp/ui/src/ui_container.cs @@ -14,7 +14,7 @@ public class Example : Efl.Csharp.Application { Efl.Ui.Box box = new Efl.Ui.Box(win); // Set distance between contained elements - box.SetContentPadding(5, 0, true); + box.SetContentPadding(5, 0); for (int i = 1; i <= 4; ++i) { diff --git a/tutorial/c/hello-gui/src/gui_main.c b/tutorial/c/hello-gui/src/gui_main.c index b67249b6..882443f6 100644 --- a/tutorial/c/hello-gui/src/gui_main.c +++ b/tutorial/c/hello-gui/src/gui_main.c @@ -1,8 +1,10 @@ #define EFL_BETA_API_SUPPORT 1 -#include #include #include +// Temporary workaround until Unified Text stops using Legacy classes internally +#include +#include static void _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)