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.
This commit is contained in:
Xavi Artigas 2019-10-03 12:19:03 +02:00
parent 0a23c904cb
commit b8fd0c3b74
5 changed files with 13 additions and 6 deletions

View File

@ -1,8 +1,10 @@
#define EFL_BETA_API_SUPPORT 1 #define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h> #include <Elementary.h>
#include <Efl_Ui.h> #include <Efl_Ui.h>
// Temporary workaround until Unified Text stops using Legacy classes internally
#include <efl_ui_text.eo.h>
#include <efl_text_interactive.eo.h>
Efl_Ui_Text *_editor; Efl_Ui_Text *_editor;
Efl_Ui_Button *_toolbar_new; Efl_Ui_Button *_toolbar_new;

View File

@ -1,8 +1,10 @@
#define EFL_BETA_API_SUPPORT 1 #define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h> #include <Elementary.h>
#include <Efl_Ui.h> #include <Efl_Ui.h>
// Temporary workaround until Unified Text stops using Legacy classes internally
#include <efl_ui_text.eo.h>
#include <efl_text_interactive.eo.h>
static void static void
_gui_about_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) _gui_about_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)

View File

@ -1,8 +1,9 @@
#define EFL_BETA_API_SUPPORT 1 #define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h> #include <Elementary.h>
#include <Efl_Ui.h> #include <Efl_Ui.h>
// Temporary workaround until Unified Text stops using Legacy classes internally
#include <efl_ui_text.eo.h>
/* /*
* Efl.UI container exmaples. * Efl.UI container exmaples.
@ -61,7 +62,7 @@ _ui_boxes_setup(Efl_Ui_Win *win)
int i; int i;
box = efl_add(EFL_UI_BOX_CLASS, win, 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++) for (i = 1; i <= 4; i++)
{ {

View File

@ -14,7 +14,7 @@ public class Example : Efl.Csharp.Application
{ {
Efl.Ui.Box box = new Efl.Ui.Box(win); Efl.Ui.Box box = new Efl.Ui.Box(win);
// Set distance between contained elements // Set distance between contained elements
box.SetContentPadding(5, 0, true); box.SetContentPadding(5, 0);
for (int i = 1; i <= 4; ++i) for (int i = 1; i <= 4; ++i)
{ {

View File

@ -1,8 +1,10 @@
#define EFL_BETA_API_SUPPORT 1 #define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h> #include <Elementary.h>
#include <Efl_Ui.h> #include <Efl_Ui.h>
// Temporary workaround until Unified Text stops using Legacy classes internally
#include <efl_ui_text.eo.h>
#include <efl_text_interactive.eo.h>
static void static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)