diff options
author | Bruno da Silva Belo <brunodasilvabelo@gmail.com> | 2019-08-16 15:30:41 -0300 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2019-08-16 15:31:38 -0300 |
commit | fa93b9f7c0c7f78d4c842cf2ac7758b0d3c2874b (patch) | |
tree | abceb4fe43ad74a31ff7cdd39d8c31073a99f889 | |
parent | e8245fe5dd645a1f5e8049a693194b94d95c12a7 (diff) |
Fixing compiles errors from examples, c and c#.
Summary: Change from efl broke the compilation of examples, updating names to the new changes.
Reviewers: lauromoura, felipealmeida
Reviewed By: lauromoura
Differential Revision: https://phab.enlightenment.org/D9581
-rw-r--r-- | apps/c/life/src/life_main.c | 2 | ||||
-rw-r--r-- | apps/c/texteditor/src/texteditor_main.c | 2 | ||||
-rw-r--r-- | apps/csharp/life/src/life_main.cs | 2 | ||||
-rw-r--r-- | apps/csharp/texteditor/src/texteditor_main.cs | 12 | ||||
-rw-r--r-- | reference/c/ui/src/focus_main.c | 4 | ||||
-rw-r--r-- | reference/c/ui/src/ui_container.c | 2 | ||||
-rw-r--r-- | reference/c/ui/src/ui_translation.c | 2 | ||||
-rw-r--r-- | reference/csharp/ui/src/focus_main.cs | 6 | ||||
-rw-r--r-- | reference/csharp/ui/src/ui_container.cs | 2 | ||||
-rw-r--r-- | reference/csharp/ui/src/ui_custom_widget.cs | 2 | ||||
-rw-r--r-- | tutorial/c/hello-gui/src/gui_main.c | 2 | ||||
-rw-r--r-- | tutorial/c/lifecycle_ui/src/lifecycle_main.c | 2 | ||||
-rw-r--r-- | tutorial/csharp/hello-gui/src/gui_main.cs | 2 |
13 files changed, 21 insertions, 21 deletions
diff --git a/apps/c/life/src/life_main.c b/apps/c/life/src/life_main.c index e06c6da6..0c7d8152 100644 --- a/apps/c/life/src/life_main.c +++ b/apps/c/life/src/life_main.c | |||
@@ -48,7 +48,7 @@ _life_win_key_down(void *data EINA_UNUSED, const Efl_Event *event) | |||
48 | ev = event->info; | 48 | ev = event->info; |
49 | win = event->object; | 49 | win = event->object; |
50 | 50 | ||
51 | if (!strcmp(efl_input_key_get(ev), "space")) | 51 | if (!strcmp(efl_input_key_sym_get(ev), "space")) |
52 | life_board_pause_toggle(win); | 52 | life_board_pause_toggle(win); |
53 | } | 53 | } |
54 | 54 | ||
diff --git a/apps/c/texteditor/src/texteditor_main.c b/apps/c/texteditor/src/texteditor_main.c index 89e65af4..7a5501bb 100644 --- a/apps/c/texteditor/src/texteditor_main.c +++ b/apps/c/texteditor/src/texteditor_main.c | |||
@@ -41,7 +41,7 @@ _gui_toolbar_button_add(Efl_Ui_Box *toolbar, const char *name, | |||
41 | button = efl_add(EFL_UI_BUTTON_CLASS, toolbar, | 41 | button = efl_add(EFL_UI_BUTTON_CLASS, toolbar, |
42 | efl_text_set(efl_added, name), | 42 | efl_text_set(efl_added, name), |
43 | efl_pack(toolbar, efl_added), | 43 | efl_pack(toolbar, efl_added), |
44 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 44 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
45 | func, efl_added)); | 45 | func, efl_added)); |
46 | 46 | ||
47 | efl_add(EFL_UI_IMAGE_CLASS, toolbar, | 47 | efl_add(EFL_UI_IMAGE_CLASS, toolbar, |
diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs index 11436a3c..a287f6c0 100644 --- a/apps/csharp/life/src/life_main.cs +++ b/apps/csharp/life/src/life_main.cs | |||
@@ -31,7 +31,7 @@ public class LifeWindow : Efl.Csharp.Application | |||
31 | 31 | ||
32 | void KeyDownEvt(object sender, Efl.Input.IInterfaceKeyDownEvt_Args ev) | 32 | void KeyDownEvt(object sender, Efl.Input.IInterfaceKeyDownEvt_Args ev) |
33 | { | 33 | { |
34 | if (ev.arg.GetKey() == "space") | 34 | if (ev.arg.GetKeySym() == "space") |
35 | lifeBoard.TogglePause(win); | 35 | lifeBoard.TogglePause(win); |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/apps/csharp/texteditor/src/texteditor_main.cs b/apps/csharp/texteditor/src/texteditor_main.cs index f01cb733..4b63c544 100644 --- a/apps/csharp/texteditor/src/texteditor_main.cs +++ b/apps/csharp/texteditor/src/texteditor_main.cs | |||
@@ -61,7 +61,7 @@ public class TextEditor : Efl.Csharp.Application | |||
61 | { | 61 | { |
62 | var popup = new Efl.Ui.TextAlertPopup (win); | 62 | var popup = new Efl.Ui.TextAlertPopup (win); |
63 | popup.SetText(message); | 63 | popup.SetText(message); |
64 | popup.SetExpandable(new Eina.Size2D(200, 200)); | 64 | popup.SetHintSizeMax(new Eina.Size2D(200, 200)); |
65 | popup.SetButton(Efl.Ui.AlertPopupButton.Positive, "OK", null); | 65 | popup.SetButton(Efl.Ui.AlertPopupButton.Positive, "OK", null); |
66 | popup.ButtonClickedEvt += | 66 | popup.ButtonClickedEvt += |
67 | (object sender, Efl.Ui.AlertPopupButtonClickedEvt_Args ea) => { | 67 | (object sender, Efl.Ui.AlertPopupButtonClickedEvt_Args ea) => { |
@@ -72,7 +72,7 @@ public class TextEditor : Efl.Csharp.Application | |||
72 | 72 | ||
73 | // Adds a button to the toolbar, with the given text, icon and click event handler | 73 | // Adds a button to the toolbar, with the given text, icon and click event handler |
74 | private Efl.Ui.Button GUIToolbarButtonAdd(Efl.Ui.Box toolbar, string name, | 74 | private Efl.Ui.Button GUIToolbarButtonAdd(Efl.Ui.Box toolbar, string name, |
75 | string iconName, EventHandler<Efl.Ui.IClickableClickedEvt_Args> func) | 75 | string iconName, EventHandler<Efl.Input.IClickableClickedEvt_Args> func) |
76 | { | 76 | { |
77 | var button = new Efl.Ui.Button(toolbar); | 77 | var button = new Efl.Ui.Button(toolbar); |
78 | button.SetText(name); | 78 | button.SetText(name); |
@@ -102,7 +102,7 @@ public class TextEditor : Efl.Csharp.Application | |||
102 | 102 | ||
103 | // "New" button | 103 | // "New" button |
104 | toolbarButtonNew = GUIToolbarButtonAdd(bar, "New", "document-new", | 104 | toolbarButtonNew = GUIToolbarButtonAdd(bar, "New", "document-new", |
105 | (object sender, Efl.Ui.IClickableClickedEvt_Args ea) => { | 105 | (object sender, Efl.Input.IClickableClickedEvt_Args ea) => { |
106 | // When this button is clicked, remove content and refresh toolbar | 106 | // When this button is clicked, remove content and refresh toolbar |
107 | editorTextBox.SetText(""); | 107 | editorTextBox.SetText(""); |
108 | GUIToolbarRefresh(); | 108 | GUIToolbarRefresh(); |
@@ -110,7 +110,7 @@ public class TextEditor : Efl.Csharp.Application | |||
110 | 110 | ||
111 | // "Save" button | 111 | // "Save" button |
112 | toolbarButtonSave = GUIToolbarButtonAdd(bar, "Save", "document-save", | 112 | toolbarButtonSave = GUIToolbarButtonAdd(bar, "Save", "document-save", |
113 | (object sender, Efl.Ui.IClickableClickedEvt_Args ea) => { | 113 | (object sender, Efl.Input.IClickableClickedEvt_Args ea) => { |
114 | // When this button is clicked, try to save content and refresh toolbar | 114 | // When this button is clicked, try to save content and refresh toolbar |
115 | try { | 115 | try { |
116 | System.IO.File.WriteAllText(filename, editorTextBox.GetText()); | 116 | System.IO.File.WriteAllText(filename, editorTextBox.GetText()); |
@@ -125,7 +125,7 @@ public class TextEditor : Efl.Csharp.Application | |||
125 | 125 | ||
126 | // "Load" button | 126 | // "Load" button |
127 | toolbarButtonLoad = GUIToolbarButtonAdd(bar, "Load", "document-open", | 127 | toolbarButtonLoad = GUIToolbarButtonAdd(bar, "Load", "document-open", |
128 | (object sender, Efl.Ui.IClickableClickedEvt_Args ea) => { | 128 | (object sender, Efl.Input.IClickableClickedEvt_Args ea) => { |
129 | // When this button is clicked, try to load content and refresh toolbar | 129 | // When this button is clicked, try to load content and refresh toolbar |
130 | try { | 130 | try { |
131 | editorTextBox.SetText(System.IO.File.ReadAllText(filename)); | 131 | editorTextBox.SetText(System.IO.File.ReadAllText(filename)); |
@@ -147,7 +147,7 @@ public class TextEditor : Efl.Csharp.Application | |||
147 | bar.Pack(box); | 147 | bar.Pack(box); |
148 | 148 | ||
149 | // "Quit" button | 149 | // "Quit" button |
150 | GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { Efl.Ui.Config.Exit(); } ); | 150 | GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, Efl.Input.IClickableClickedEvt_Args e) => { Efl.Ui.Config.Exit(); } ); |
151 | } | 151 | } |
152 | 152 | ||
153 | // Builds the user interface for the text editor | 153 | // Builds the user interface for the text editor |
diff --git a/reference/c/ui/src/focus_main.c b/reference/c/ui/src/focus_main.c index d58e62be..5bd14dde 100644 --- a/reference/c/ui/src/focus_main.c +++ b/reference/c/ui/src/focus_main.c | |||
@@ -58,7 +58,7 @@ _gui_setup() | |||
58 | efl_pack(hbox, efl_added), | 58 | efl_pack(hbox, efl_added), |
59 | efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, | 59 | efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, |
60 | _focus_changed, NULL), | 60 | _focus_changed, NULL), |
61 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 61 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
62 | _gui_about_clicked_cb, efl_added)); | 62 | _gui_about_clicked_cb, efl_added)); |
63 | 63 | ||
64 | efl_add(EFL_UI_BUTTON_CLASS, hbox, | 64 | efl_add(EFL_UI_BUTTON_CLASS, hbox, |
@@ -66,7 +66,7 @@ _gui_setup() | |||
66 | efl_pack(hbox, efl_added), | 66 | efl_pack(hbox, efl_added), |
67 | efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, | 67 | efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, |
68 | _focus_changed, NULL), | 68 | _focus_changed, NULL), |
69 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 69 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
70 | _gui_quit_clicked_cb, efl_added)); | 70 | _gui_quit_clicked_cb, efl_added)); |
71 | 71 | ||
72 | efl_ui_focus_util_focus(about); | 72 | efl_ui_focus_util_focus(about); |
diff --git a/reference/c/ui/src/ui_container.c b/reference/c/ui/src/ui_container.c index 1eb7254b..166a458a 100644 --- a/reference/c/ui/src/ui_container.c +++ b/reference/c/ui/src/ui_container.c | |||
@@ -97,7 +97,7 @@ _ui_panes_setup(Efl_Ui_Win *win) | |||
97 | efl_text_set(efl_added, "Quit"), | 97 | efl_text_set(efl_added, "Quit"), |
98 | efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(150, 30)), | 98 | efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(150, 30)), |
99 | efl_content_set(efl_part(horiz_split, "second"), efl_added), | 99 | efl_content_set(efl_part(horiz_split, "second"), efl_added), |
100 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 100 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
101 | _gui_quit_cb, efl_added)); | 101 | _gui_quit_cb, efl_added)); |
102 | } | 102 | } |
103 | 103 | ||
diff --git a/reference/c/ui/src/ui_translation.c b/reference/c/ui/src/ui_translation.c index a576ac68..33e8041d 100644 --- a/reference/c/ui/src/ui_translation.c +++ b/reference/c/ui/src/ui_translation.c | |||
@@ -55,7 +55,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) | |||
55 | efl_ui_l10n_text_set(efl_added, "Quit", _TEXT_DOMAIN), | 55 | efl_ui_l10n_text_set(efl_added, "Quit", _TEXT_DOMAIN), |
56 | efl_pack_end(box, efl_added), | 56 | efl_pack_end(box, efl_added), |
57 | efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)), | 57 | efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)), |
58 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 58 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
59 | _gui_quit_cb, efl_added)); | 59 | _gui_quit_cb, efl_added)); |
60 | 60 | ||
61 | efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320)); | 61 | 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 0e8c481d..4ced2a8d 100644 --- a/reference/csharp/ui/src/focus_main.cs +++ b/reference/csharp/ui/src/focus_main.cs | |||
@@ -18,7 +18,7 @@ public class Example : Efl.Csharp.Application | |||
18 | if (e.arg == false) | 18 | if (e.arg == false) |
19 | Efl.Ui.Config.Exit(); | 19 | Efl.Ui.Config.Exit(); |
20 | }; | 20 | }; |
21 | 21 | ||
22 | 22 | ||
23 | // Create the main box container | 23 | // Create the main box container |
24 | var vbox = new Efl.Ui.Box(win); | 24 | var vbox = new Efl.Ui.Box(win); |
@@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application | |||
46 | var button = new Efl.Ui.Button(hbox); | 46 | var button = new Efl.Ui.Button(hbox); |
47 | button.SetText("Focus mover"); | 47 | button.SetText("Focus mover"); |
48 | button.FocusChangedEvt += FocusChangedCb; | 48 | button.FocusChangedEvt += FocusChangedCb; |
49 | button.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { | 49 | button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { |
50 | Console.WriteLine("Clicked Focus Mover"); | 50 | Console.WriteLine("Clicked Focus Mover"); |
51 | // Manually transfer focus to the first check box | 51 | // Manually transfer focus to the first check box |
52 | Efl.Ui.Focus.Util.Focus(first_checkbox); | 52 | Efl.Ui.Focus.Util.Focus(first_checkbox); |
@@ -57,7 +57,7 @@ public class Example : Efl.Csharp.Application | |||
57 | button = new Efl.Ui.Button(hbox); | 57 | button = new Efl.Ui.Button(hbox); |
58 | button.SetText("Quit"); | 58 | button.SetText("Quit"); |
59 | button.FocusChangedEvt += FocusChangedCb; | 59 | button.FocusChangedEvt += FocusChangedCb; |
60 | button.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { | 60 | button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { |
61 | Console.WriteLine("Clicked Quit"); | 61 | Console.WriteLine("Clicked Quit"); |
62 | Efl.Ui.Config.Exit(); | 62 | Efl.Ui.Config.Exit(); |
63 | }; | 63 | }; |
diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs index fea4a494..c3f05daa 100644 --- a/reference/csharp/ui/src/ui_container.cs +++ b/reference/csharp/ui/src/ui_container.cs | |||
@@ -98,7 +98,7 @@ public class Example : Efl.Csharp.Application | |||
98 | Efl.Ui.Button quit_btn = new Efl.Ui.Button(win); | 98 | Efl.Ui.Button quit_btn = new Efl.Ui.Button(win); |
99 | quit_btn.SetText("Quit"); | 99 | quit_btn.SetText("Quit"); |
100 | quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30)); | 100 | quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30)); |
101 | quit_btn.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { | 101 | quit_btn.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { |
102 | // Exit the EFL main loop | 102 | // Exit the EFL main loop |
103 | Efl.Ui.Config.Exit(); | 103 | Efl.Ui.Config.Exit(); |
104 | }; | 104 | }; |
diff --git a/reference/csharp/ui/src/ui_custom_widget.cs b/reference/csharp/ui/src/ui_custom_widget.cs index 283c998c..03e57afd 100644 --- a/reference/csharp/ui/src/ui_custom_widget.cs +++ b/reference/csharp/ui/src/ui_custom_widget.cs | |||
@@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application | |||
46 | 46 | ||
47 | // Instantiate our custom button widget | 47 | // Instantiate our custom button widget |
48 | MyButton btn = new MyButton(win, 99); | 48 | MyButton btn = new MyButton(win, 99); |
49 | btn.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { | 49 | btn.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { |
50 | // When the button is clicked, change its text | 50 | // When the button is clicked, change its text |
51 | MyButton b = (MyButton)sender; | 51 | MyButton b = (MyButton)sender; |
52 | b.SetText("Hello!"); | 52 | b.SetText("Hello!"); |
diff --git a/tutorial/c/hello-gui/src/gui_main.c b/tutorial/c/hello-gui/src/gui_main.c index d238bd6a..b67249b6 100644 --- a/tutorial/c/hello-gui/src/gui_main.c +++ b/tutorial/c/hello-gui/src/gui_main.c | |||
@@ -41,7 +41,7 @@ _gui_setup() | |||
41 | efl_text_set(efl_added, "Quit"), | 41 | efl_text_set(efl_added, "Quit"), |
42 | efl_gfx_hint_weight_set(efl_added, 1.0, 0.1), | 42 | efl_gfx_hint_weight_set(efl_added, 1.0, 0.1), |
43 | efl_pack(box, efl_added), | 43 | efl_pack(box, efl_added), |
44 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 44 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
45 | _gui_quit_cb, efl_added)); | 45 | _gui_quit_cb, efl_added)); |
46 | } | 46 | } |
47 | 47 | ||
diff --git a/tutorial/c/lifecycle_ui/src/lifecycle_main.c b/tutorial/c/lifecycle_ui/src/lifecycle_main.c index 6a850c9a..6352d369 100644 --- a/tutorial/c/lifecycle_ui/src/lifecycle_main.c +++ b/tutorial/c/lifecycle_ui/src/lifecycle_main.c | |||
@@ -24,7 +24,7 @@ _gui_setup() | |||
24 | efl_text_set(efl_added, "Quit"), | 24 | efl_text_set(efl_added, "Quit"), |
25 | efl_content_set(win, efl_added), | 25 | efl_content_set(win, efl_added), |
26 | efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)), | 26 | efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)), |
27 | efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, | 27 | efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, |
28 | _gui_quit_clicked_cb, efl_added)); | 28 | _gui_quit_clicked_cb, efl_added)); |
29 | } | 29 | } |
30 | 30 | ||
diff --git a/tutorial/csharp/hello-gui/src/gui_main.cs b/tutorial/csharp/hello-gui/src/gui_main.cs index 3d1ff4c4..fc1cf18f 100644 --- a/tutorial/csharp/hello-gui/src/gui_main.cs +++ b/tutorial/csharp/hello-gui/src/gui_main.cs | |||
@@ -48,7 +48,7 @@ public class Example : Efl.Csharp.Application | |||
48 | button.SetText("Quit"); | 48 | button.SetText("Quit"); |
49 | button.SetHintWeight(1.0, 0.1); | 49 | button.SetHintWeight(1.0, 0.1); |
50 | // Set the method to be called when the button is pressed | 50 | // Set the method to be called when the button is pressed |
51 | button.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { Efl.App.AppMain.Quit(0); }; | 51 | button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { Efl.App.AppMain.Quit(0); }; |
52 | // Add the button to the box container | 52 | // Add the button to the box container |
53 | box.Pack(button); | 53 | box.Pack(button); |
54 | } | 54 | } |