summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/c/texteditor/src/texteditor_main.c2
-rw-r--r--apps/csharp/life/src/life_main.cs9
-rw-r--r--apps/csharp/texteditor/src/texteditor_main.cs17
-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
-rw-r--r--tutorial/csharp/hello-gui/src/gui_main.cs11
9 files changed, 38 insertions, 32 deletions
diff --git a/apps/c/texteditor/src/texteditor_main.c b/apps/c/texteditor/src/texteditor_main.c
index 8085303..66bcc42 100644
--- a/apps/c/texteditor/src/texteditor_main.c
+++ b/apps/c/texteditor/src/texteditor_main.c
@@ -106,9 +106,9 @@ _gui_setup()
106 efl_text_font_set(efl_added, "Mono", 14), 106 efl_text_font_set(efl_added, "Mono", 14),
107 efl_text_multiline_set(efl_added, EINA_TRUE), 107 efl_text_multiline_set(efl_added, EINA_TRUE),
108 efl_text_interactive_editable_set(efl_added, EINA_TRUE), 108 efl_text_interactive_editable_set(efl_added, EINA_TRUE),
109 efl_ui_text_scrollable_set(efl_added, EINA_TRUE),
110 efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL), 109 efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL),
111 efl_pack(box, efl_added)); 110 efl_pack(box, efl_added));
111 efl_ui_text_scrollable_set(_editor, EINA_TRUE);
112} 112}
113 113
114EAPI_MAIN void 114EAPI_MAIN void
diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs
index 07dd43a..a7c6777 100644
--- a/apps/csharp/life/src/life_main.cs
+++ b/apps/csharp/life/src/life_main.cs
@@ -10,10 +10,11 @@ public class LifeWindow
10 lifeRender.RenderLayout((Efl.Ui.Win)sender); 10 lifeRender.RenderLayout((Efl.Ui.Win)sender);
11 } 11 }
12 12
13 void QuitEvt(object sender, EventArgs ev) 13 void QuitEvt(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args ev)
14 { 14 {
15 // quit the mainloop 15 // quit the mainloop
16 Efl.Ui.Config.Exit(); 16 if (ev.arg == false)
17 Efl.Ui.Config.Exit();
17 } 18 }
18 19
19 void TouchEvt(object sender, Efl.Input.InterfacePointerDownEvt_Args ev) 20 void TouchEvt(object sender, Efl.Input.InterfacePointerDownEvt_Args ev)
@@ -42,7 +43,7 @@ public class LifeWindow
42 win.SetAutohide(true); 43 win.SetAutohide(true);
43 44
44 // when the user clicks "close" on a window there is a request to hide 45 // when the user clicks "close" on a window there is a request to hide
45 ((Efl.Gfx.Entity)win).HideEvt += QuitEvt; 46 ((Efl.Gfx.Entity)win).VisibilityChangedEvt += QuitEvt;
46 47
47 Eina.Size2D sz; 48 Eina.Size2D sz;
48 sz.W = (int)(10 * LifeBoard.Width * win.GetScale()); 49 sz.W = (int)(10 * LifeBoard.Width * win.GetScale());
@@ -52,7 +53,7 @@ public class LifeWindow
52 lifeRender = new LifeRender(win, lifeBoard); 53 lifeRender = new LifeRender(win, lifeBoard);
53 lifeRender.Refresh(win); 54 lifeRender.Refresh(win);
54 55
55 ((Efl.Gfx.Entity)win).ResizeEvt += ResizeEvt; 56 ((Efl.Gfx.Entity)win).SizeChangedEvt += ResizeEvt;
56 ((Efl.Input.Interface)win).PointerDownEvt += TouchEvt; 57 ((Efl.Input.Interface)win).PointerDownEvt += TouchEvt;
57 ((Efl.Input.Interface)win).KeyDownEvt += KeyDownEvt; 58 ((Efl.Input.Interface)win).KeyDownEvt += KeyDownEvt;
58 59
diff --git a/apps/csharp/texteditor/src/texteditor_main.cs b/apps/csharp/texteditor/src/texteditor_main.cs
index 9793a5b..f697245 100644
--- a/apps/csharp/texteditor/src/texteditor_main.cs
+++ b/apps/csharp/texteditor/src/texteditor_main.cs
@@ -32,9 +32,10 @@ public class TextEditor
32 "texteditor_example.txt"); 32 "texteditor_example.txt");
33 33
34 // Quits the application 34 // Quits the application
35 private void GUIQuitCb(object sender, EventArgs ea) 35 private void GUIQuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args ea)
36 { 36 {
37 Efl.Ui.Config.Exit(); 37 if (ea.arg == false)
38 Efl.Ui.Config.Exit();
38 } 39 }
39 40
40 // Enables or disables buttons on the toolbar as required 41 // Enables or disables buttons on the toolbar as required
@@ -146,7 +147,7 @@ public class TextEditor
146 bar.DoPack(box); 147 bar.DoPack(box);
147 148
148 // "Quit" button 149 // "Quit" button
149 GUIToolbarButtonAdd(bar, "Quit", "application-exit", GUIQuitCb); 150 GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, EventArgs e) => { Efl.Ui.Config.Exit(); } );
150 } 151 }
151 152
152 // Builds the user interface for the text editor 153 // Builds the user interface for the text editor
@@ -156,7 +157,7 @@ public class TextEditor
156 win = new Efl.Ui.Win(parent: Efl.App.AppMain); 157 win = new Efl.Ui.Win(parent: Efl.App.AppMain);
157 win.SetText("Text Editor"); 158 win.SetText("Text Editor");
158 win.SetAutohide(true); 159 win.SetAutohide(true);
159 win.HideEvt += GUIQuitCb; 160 win.VisibilityChangedEvt += GUIQuitCb;
160 161
161 // Create a vertical box container 162 // Create a vertical box container
162 Efl.Ui.Box box = new Efl.Ui.Box(win); 163 Efl.Ui.Box box = new Efl.Ui.Box(win);
@@ -168,10 +169,10 @@ public class TextEditor
168 // Create the main text entry 169 // Create the main text entry
169 editorTextBox = new Efl.Ui.Text(box); 170 editorTextBox = new Efl.Ui.Text(box);
170 editorTextBox.SetFont("Mono", 14); 171 editorTextBox.SetFont("Mono", 14);
171 editorTextBox.SetMultiline(true); 172 editorTextBox.Multiline = true;
172 editorTextBox.SetEditable(true); 173 editorTextBox.Editable = true;
173 editorTextBox.SetScrollable(true); 174 editorTextBox.Scrollable = true;
174 editorTextBox.SetHintMin(new Eina.Size2D(360, 240)); 175 editorTextBox.SetHintSizeMin(new Eina.Size2D(360, 240));
175 editorTextBox.ChangedEvt += EditorChangedCb; 176 editorTextBox.ChangedEvt += EditorChangedCb;
176 editorTextBox.ChangedUserEvt += EditorChangedCb; 177 editorTextBox.ChangedUserEvt += EditorChangedCb;
177 box.DoPack(editorTextBox); 178 box.DoPack(editorTextBox);
diff --git a/reference/c/core/src/core_io.c b/reference/c/core/src/core_io.c
index dbfcca1..68fd9c0 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)
22 Efl_Io_File *file; 22 Efl_Io_File *file;
23 23
24 file = efl_new(EFL_IO_FILE_CLASS, 24 file = efl_new(EFL_IO_FILE_CLASS,
25 efl_file_set(efl_added, filename, NULL), // mandatory 25 efl_file_set(efl_added, filename), // mandatory
26 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), // write and create - default is read 26 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), // write and create - default is read
27 efl_io_file_mode_set(efl_added, 0644), // neccessary if we use O_CREAT 27 efl_io_file_mode_set(efl_added, 0644), // neccessary if we use O_CREAT
28 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended 28 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended
@@ -51,7 +51,7 @@ _io_read(const char *filename)
51 Efl_Io_File *file; 51 Efl_Io_File *file;
52 52
53 file = efl_new(EFL_IO_FILE_CLASS, 53 file = efl_new(EFL_IO_FILE_CLASS,
54 efl_file_set(efl_added, filename, NULL), // mandatory 54 efl_file_set(efl_added, filename), // mandatory
55 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended 55 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended
56 56
57 if (!file) 57 if (!file)
diff --git a/reference/c/ui/src/ui_sizing.c b/reference/c/ui/src/ui_sizing.c
index 80e50b5..129a7e5 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)
50 efl_add(EFL_UI_BUTTON_CLASS, win, 50 efl_add(EFL_UI_BUTTON_CLASS, win,
51 efl_text_set(efl_added, "Big Button"), 51 efl_text_set(efl_added, "Big Button"),
52 efl_pack_end(box, efl_added), 52 efl_pack_end(box, efl_added),
53 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100))); 53 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)));
54 54
55 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320)); 55 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
56} 56}
diff --git a/reference/csharp/ui/src/focus_main.cs b/reference/csharp/ui/src/focus_main.cs
index 700172f..a8d2615 100644
--- a/reference/csharp/ui/src/focus_main.cs
+++ b/reference/csharp/ui/src/focus_main.cs
@@ -20,15 +20,16 @@ public class Example
20 win.SetWinType(Efl.Ui.WinType.Basic); 20 win.SetWinType(Efl.Ui.WinType.Basic);
21 win.SetText("Focus example"); 21 win.SetText("Focus example");
22 win.SetAutohide(true); 22 win.SetAutohide(true);
23 win.HideEvt += (object sender, EventArgs e) => { 23 win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => {
24 // Exit the EFL main loop 24 // Exit the EFL main loop
25 Efl.Ui.Config.Exit(); 25 if (e.arg == false)
26 Efl.Ui.Config.Exit();
26 }; 27 };
27 28
28 29
29 // Create the main box container 30 // Create the main box container
30 var vbox = new Efl.Ui.Box(win); 31 var vbox = new Efl.Ui.Box(win);
31 vbox.SetHintMin(new Eina.Size2D(360, 240)); 32 vbox.SetHintSizeMin(new Eina.Size2D(360, 240));
32 win.SetContent(vbox); 33 win.SetContent(vbox);
33 34
34 // Create some check boxes 35 // Create some check boxes
diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs
index 88dc3d0..8b611f1 100644
--- a/reference/csharp/ui/src/ui_container.cs
+++ b/reference/csharp/ui/src/ui_container.cs
@@ -24,7 +24,7 @@ public class Example
24 if (i == 2) 24 if (i == 2)
25 { 25 {
26 // Button 2 has its maximum size limited, so it will be smaller 26 // Button 2 has its maximum size limited, so it will be smaller
27 button.SetHintMax(new Eina.Size2D(100,50)); 27 button.SetHintSizeMax(new Eina.Size2D(100,50));
28 } 28 }
29 box.DoPack(button); 29 box.DoPack(button);
30 } 30 }
@@ -70,9 +70,10 @@ public class Example
70 win.SetWinType(Efl.Ui.WinType.Basic); 70 win.SetWinType(Efl.Ui.WinType.Basic);
71 win.SetText("Container demo"); 71 win.SetText("Container demo");
72 win.SetAutohide(true); 72 win.SetAutohide(true);
73 win.HideEvt += (object sender, EventArgs e) => { 73 win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => {
74 // Exit the EFL main loop 74 // Exit the EFL main loop
75 Efl.Ui.Config.Exit(); 75 if (e.arg == false)
76 Efl.Ui.Config.Exit();
76 }; 77 };
77 // Give the window an initial size so there is room to resize the panes. 78 // Give the window an initial size so there is room to resize the panes.
78 // Otherwise, all widgets are tightly packed 79 // Otherwise, all widgets are tightly packed
@@ -103,7 +104,7 @@ public class Example
103 // container 104 // container
104 Efl.Ui.Button quit_btn = new Efl.Ui.Button(win); 105 Efl.Ui.Button quit_btn = new Efl.Ui.Button(win);
105 quit_btn.SetText("Quit"); 106 quit_btn.SetText("Quit");
106 quit_btn.SetHintMax(new Eina.Size2D(150, 30)); 107 quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30));
107 quit_btn.ClickedEvt += (object sender, EventArgs e) => { 108 quit_btn.ClickedEvt += (object sender, EventArgs e) => {
108 // Exit the EFL main loop 109 // Exit the EFL main loop
109 Efl.Ui.Config.Exit(); 110 Efl.Ui.Config.Exit();
diff --git a/reference/csharp/ui/src/ui_sizing.cs b/reference/csharp/ui/src/ui_sizing.cs
index ac25283..c8cdf90 100644
--- a/reference/csharp/ui/src/ui_sizing.cs
+++ b/reference/csharp/ui/src/ui_sizing.cs
@@ -23,9 +23,10 @@ public class Example
23 win.SetWinType(Efl.Ui.WinType.Basic); 23 win.SetWinType(Efl.Ui.WinType.Basic);
24 win.SetText("Size Control"); 24 win.SetText("Size Control");
25 win.SetAutohide(true); 25 win.SetAutohide(true);
26 win.HideEvt += (object sender, EventArgs e) => { 26 win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => {
27 // Exit the EFL main loop 27 // Exit the EFL main loop
28 Efl.Ui.Config.Exit(); 28 if (e.arg == false)
29 Efl.Ui.Config.Exit();
29 }; 30 };
30 31
31 // Create a box container 32 // Create a box container
@@ -40,13 +41,13 @@ public class Example
40 // Create a small button (max size is limited) 41 // Create a small button (max size is limited)
41 button = new Efl.Ui.Button(win); 42 button = new Efl.Ui.Button(win);
42 button.SetText("Small"); 43 button.SetText("Small");
43 button.SetHintMax(new Eina.Size2D(50,50)); 44 button.SetHintSizeMax(new Eina.Size2D(50,50));
44 box.DoPack(button); 45 box.DoPack(button);
45 46
46 // Create a big button (min size is limited) 47 // Create a big button (min size is limited)
47 button = new Efl.Ui.Button(win); 48 button = new Efl.Ui.Button(win);
48 button.SetText("Big button"); 49 button.SetText("Big button");
49 button.SetHintMin(new Eina.Size2D(100,100)); 50 button.SetHintSizeMin(new Eina.Size2D(100,100));
50 box.DoPack(button); 51 box.DoPack(button);
51 52
52 // Start the EFL main loop 53 // Start the EFL main loop
diff --git a/tutorial/csharp/hello-gui/src/gui_main.cs b/tutorial/csharp/hello-gui/src/gui_main.cs
index 8a30430..2f50745 100644
--- a/tutorial/csharp/hello-gui/src/gui_main.cs
+++ b/tutorial/csharp/hello-gui/src/gui_main.cs
@@ -3,10 +3,11 @@ using System;
3public class Example 3public class Example
4{ 4{
5 // Callback to quit the application 5 // Callback to quit the application
6 public static void QuitCb(object sender, EventArgs e) 6 public static void QuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e)
7 { 7 {
8 // Exit the EFL main loop 8 // Exit the EFL main loop
9 Efl.Ui.Config.Exit(); 9 if (e.arg == false)
10 Efl.Ui.Config.Exit();
10 } 11 }
11 12
12#if WIN32 13#if WIN32
@@ -25,12 +26,12 @@ public class Example
25 // button is pressed 26 // button is pressed
26 win.SetAutohide(true); 27 win.SetAutohide(true);
27 // Hook to the Hide event 28 // Hook to the Hide event
28 win.HideEvt += QuitCb; 29 win.VisibilityChangedEvt += QuitCb;
29 30
30 // Create a box container 31 // Create a box container
31 var box = new Efl.Ui.Box(win); 32 var box = new Efl.Ui.Box(win);
32 // Set its minimum size 33 // Set its minimum size
33 box.SetHintMin(new Eina.Size2D(360, 240)); 34 box.SetHintSizeMin(new Eina.Size2D(360, 540));
34 // Set the box as the content for the window 35 // Set the box as the content for the window
35 // The window size will adapt to the box size 36 // The window size will adapt to the box size
36 win.SetContent(box); 37 win.SetContent(box);
@@ -51,7 +52,7 @@ public class Example
51 button.SetText("Quit"); 52 button.SetText("Quit");
52 button.SetHintWeight(1.0, 0.1); 53 button.SetHintWeight(1.0, 0.1);
53 // Set the method to be called when the button is pressed 54 // Set the method to be called when the button is pressed
54 button.ClickedEvt += QuitCb; 55 button.ClickedEvt += (object sender, EventArgs e) => { Efl.Ui.Config.Exit(); };
55 // Add the button to the box container 56 // Add the button to the box container
56 box.DoPack(button); 57 box.DoPack(button);
57 58