aboutsummaryrefslogtreecommitdiffstats
path: root/reference
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-03-04 18:17:36 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-03-04 18:17:36 +0100
commit3e1aefa7ea74750cd6b1669c61fe02ef2aef8a90 (patch)
treeb2c55104321ce02469f0dc33e69de15c07e72497 /reference
parentfix examples build for latest efl (diff)
downloadexamples-3e1aefa7ea74750cd6b1669c61fe02ef2aef8a90.tar.gz
Further fixes to adapt to latest API changes
Diffstat (limited to 'reference')
-rw-r--r--reference/c/core/src/core_io.c4
-rw-r--r--reference/c/ui/src/ui_sizing.c2
-rw-r--r--reference/csharp/ui/src/focus_main.cs7
-rw-r--r--reference/csharp/ui/src/ui_container.cs9
-rw-r--r--reference/csharp/ui/src/ui_sizing.cs9
5 files changed, 17 insertions, 14 deletions
diff --git a/reference/c/core/src/core_io.c b/reference/c/core/src/core_io.c
index dbfcca15..68fd9c08 100644
--- a/reference/c/core/src/core_io.c
+++ b/reference/c/core/src/core_io.c
@@ -22,7 +22,7 @@ _io_write(const char *filename)
Efl_Io_File *file;
file = efl_new(EFL_IO_FILE_CLASS,
- efl_file_set(efl_added, filename, NULL), // mandatory
+ efl_file_set(efl_added, filename), // mandatory
efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), // write and create - default is read
efl_io_file_mode_set(efl_added, 0644), // neccessary if we use O_CREAT
efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended
@@ -51,7 +51,7 @@ _io_read(const char *filename)
Efl_Io_File *file;
file = efl_new(EFL_IO_FILE_CLASS,
- efl_file_set(efl_added, filename, NULL), // mandatory
+ efl_file_set(efl_added, filename), // mandatory
efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended
if (!file)
diff --git a/reference/c/ui/src/ui_sizing.c b/reference/c/ui/src/ui_sizing.c
index 80e50b51..129a7e56 100644
--- a/reference/c/ui/src/ui_sizing.c
+++ b/reference/c/ui/src/ui_sizing.c
@@ -50,7 +50,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Big Button"),
efl_pack_end(box, efl_added),
- efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)));
+ efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)));
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
}
diff --git a/reference/csharp/ui/src/focus_main.cs b/reference/csharp/ui/src/focus_main.cs
index 700172f0..a8d26156 100644
--- a/reference/csharp/ui/src/focus_main.cs
+++ b/reference/csharp/ui/src/focus_main.cs
@@ -20,15 +20,16 @@ public class Example
win.SetWinType(Efl.Ui.WinType.Basic);
win.SetText("Focus example");
win.SetAutohide(true);
- win.HideEvt += (object sender, EventArgs e) => {
+ win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => {
// Exit the EFL main loop
- Efl.Ui.Config.Exit();
+ if (e.arg == false)
+ Efl.Ui.Config.Exit();
};
// Create the main box container
var vbox = new Efl.Ui.Box(win);
- vbox.SetHintMin(new Eina.Size2D(360, 240));
+ vbox.SetHintSizeMin(new Eina.Size2D(360, 240));
win.SetContent(vbox);
// Create some check boxes
diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs
index 88dc3d03..8b611f14 100644
--- a/reference/csharp/ui/src/ui_container.cs
+++ b/reference/csharp/ui/src/ui_container.cs
@@ -24,7 +24,7 @@ public class Example
if (i == 2)
{
// Button 2 has its maximum size limited, so it will be smaller
- button.SetHintMax(new Eina.Size2D(100,50));
+ button.SetHintSizeMax(new Eina.Size2D(100,50));
}
box.DoPack(button);
}
@@ -70,9 +70,10 @@ public class Example
win.SetWinType(Efl.Ui.WinType.Basic);
win.SetText("Container demo");
win.SetAutohide(true);
- win.HideEvt += (object sender, EventArgs e) => {
+ win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => {
// Exit the EFL main loop
- Efl.Ui.Config.Exit();
+ if (e.arg == false)
+ Efl.Ui.Config.Exit();
};
// Give the window an initial size so there is room to resize the panes.
// Otherwise, all widgets are tightly packed
@@ -103,7 +104,7 @@ public class Example
// container
Efl.Ui.Button quit_btn = new Efl.Ui.Button(win);
quit_btn.SetText("Quit");
- quit_btn.SetHintMax(new Eina.Size2D(150, 30));
+ quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30));
quit_btn.ClickedEvt += (object sender, EventArgs e) => {
// Exit the EFL main loop
Efl.Ui.Config.Exit();
diff --git a/reference/csharp/ui/src/ui_sizing.cs b/reference/csharp/ui/src/ui_sizing.cs
index ac25283e..c8cdf901 100644
--- a/reference/csharp/ui/src/ui_sizing.cs
+++ b/reference/csharp/ui/src/ui_sizing.cs
@@ -23,9 +23,10 @@ public class Example
win.SetWinType(Efl.Ui.WinType.Basic);
win.SetText("Size Control");
win.SetAutohide(true);
- win.HideEvt += (object sender, EventArgs e) => {
+ win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => {
// Exit the EFL main loop
- Efl.Ui.Config.Exit();
+ if (e.arg == false)
+ Efl.Ui.Config.Exit();
};
// Create a box container
@@ -40,13 +41,13 @@ public class Example
// Create a small button (max size is limited)
button = new Efl.Ui.Button(win);
button.SetText("Small");
- button.SetHintMax(new Eina.Size2D(50,50));
+ button.SetHintSizeMax(new Eina.Size2D(50,50));
box.DoPack(button);
// Create a big button (min size is limited)
button = new Efl.Ui.Button(win);
button.SetText("Big button");
- button.SetHintMin(new Eina.Size2D(100,100));
+ button.SetHintSizeMin(new Eina.Size2D(100,100));
box.DoPack(button);
// Start the EFL main loop