summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-12-13 13:27:06 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-12-13 13:27:06 +0100
commit6f183d62c2eb57b0f257bb6910ce17d782b2273b (patch)
tree6abbfb94977fbe90fa150a486464f33454b7e990
parentcba451e99b9e9237c71e37833c72447b2e49b765 (diff)
Adapt to latest changes
Including removal of the manual inclusion of text headers!
-rw-r--r--apps/c/calculator/src/calculator.c15
-rw-r--r--apps/c/texteditor/src/texteditor_main.c3
-rw-r--r--apps/csharp/calculator/src/calculator.cs20
-rw-r--r--reference/c/ui/src/focus_main.c3
-rw-r--r--reference/c/ui/src/ui_container.c2
-rw-r--r--tutorial/c/hello-gui/src/gui_main.c3
6 files changed, 17 insertions, 29 deletions
diff --git a/apps/c/calculator/src/calculator.c b/apps/c/calculator/src/calculator.c
index 6bc55944..b6bc49e6 100644
--- a/apps/c/calculator/src/calculator.c
+++ b/apps/c/calculator/src/calculator.c
@@ -2,11 +2,8 @@
2 2
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_text.eo.h>
7#include <efl_text_interactive.eo.h>
8 5
9static Efl_Ui_Text *_screen = NULL; // Text widget showing current value 6static Efl_Ui_Textbox *_screen = NULL; // Text widget showing current value
10static int _prev_value = 0; // Value introduced before an operation (first operand 7static int _prev_value = 0; // Value introduced before an operation (first operand
11static int _curr_value = 0; // Value currently being introduced (second operand) 8static int _curr_value = 0; // Value currently being introduced (second operand)
12static char _operation = '='; // Last operation button pressed 9static char _operation = '='; // Last operation button pressed
@@ -138,8 +135,8 @@ _button_add(Efl_Ui_Table *table, const char *text, const char *command, int posx
138 // Buttons can only have simple text (no font, styles or markup) but can swallow 135 // Buttons can only have simple text (no font, styles or markup) but can swallow
139 // any other object we want. 136 // any other object we want.
140 // Therefore we create a more complex Efl_Ui_Text object and use it as content for the button. 137 // Therefore we create a more complex Efl_Ui_Text object and use it as content for the button.
141 Efl_Ui_Text *label = 138 Efl_Ui_Textbox *label =
142 efl_add(EFL_UI_TEXT_CLASS, button, 139 efl_add(EFL_UI_TEXTBOX_CLASS, button,
143 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 140 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
144 efl_text_horizontal_align_set(efl_added, 0.5), 141 efl_text_horizontal_align_set(efl_added, 0.5),
145 efl_text_vertical_align_set(efl_added, 0.5), 142 efl_text_vertical_align_set(efl_added, 0.5),
@@ -189,8 +186,8 @@ _gui_setup()
189 _button_add(table, "=", "=", 2, 4, 128, 128, 128); 186 _button_add(table, "=", "=", 2, 4, 128, 128, 128);
190 _button_add(table, "C", "C", 0, 4, 0, 0, 0); 187 _button_add(table, "C", "C", 0, 4, 0, 0, 0);
191 188
192 // Create a big Efl.Ui.Text screen to display the current input 189 // Create a big Efl.Ui.Textbox screen to display the current input
193 _screen = efl_add(EFL_UI_TEXT_CLASS, table, 190 _screen = efl_add(EFL_UI_TEXTBOX_CLASS, table,
194 efl_text_set(efl_added, "0"), 191 efl_text_set(efl_added, "0"),
195 efl_text_multiline_set(efl_added, EINA_FALSE), 192 efl_text_multiline_set(efl_added, EINA_FALSE),
196 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 193 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
@@ -200,7 +197,7 @@ _gui_setup()
200 efl_text_vertical_align_set(efl_added, 0.5), 197 efl_text_vertical_align_set(efl_added, 0.5),
201 efl_text_effect_type_set(efl_added, EFL_TEXT_STYLE_EFFECT_TYPE_GLOW), 198 efl_text_effect_type_set(efl_added, EFL_TEXT_STYLE_EFFECT_TYPE_GLOW),
202 efl_text_glow_color_set(efl_added, 128, 128, 128, 128), 199 efl_text_glow_color_set(efl_added, 128, 128, 128, 128),
203 efl_event_callback_add(efl_added, EFL_UI_TEXT_EVENT_CHANGED, 200 efl_event_callback_add(efl_added, EFL_UI_TEXTBOX_EVENT_CHANGED,
204 _screen_changed_cb, NULL)); 201 _screen_changed_cb, NULL));
205 efl_text_font_family_set(_screen, "Sans"); 202 efl_text_font_family_set(_screen, "Sans");
206 efl_text_font_size_set(_screen, 48); 203 efl_text_font_size_set(_screen, 48);
diff --git a/apps/c/texteditor/src/texteditor_main.c b/apps/c/texteditor/src/texteditor_main.c
index 20fbd5f1..751fb8f6 100644
--- a/apps/c/texteditor/src/texteditor_main.c
+++ b/apps/c/texteditor/src/texteditor_main.c
@@ -2,9 +2,6 @@
2 2
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_textbox.eo.h>
7#include <efl_text_interactive.eo.h>
8 5
9Efl_Ui_Textbox *_editor; 6Efl_Ui_Textbox *_editor;
10Efl_Ui_Button *_toolbar_new; 7Efl_Ui_Button *_toolbar_new;
diff --git a/apps/csharp/calculator/src/calculator.cs b/apps/csharp/calculator/src/calculator.cs
index e4711c00..a9fa0463 100644
--- a/apps/csharp/calculator/src/calculator.cs
+++ b/apps/csharp/calculator/src/calculator.cs
@@ -4,7 +4,7 @@ using System;
4 4
5public class Calculator : Efl.Csharp.Application 5public class Calculator : Efl.Csharp.Application
6{ 6{
7 private Efl.Ui.Text screen; // Text widget showing current value 7 private Efl.Ui.Textbox screen; // Text widget showing current value
8 private int prevValue = 0; // Value introduced before an operation (first operand) 8 private int prevValue = 0; // Value introduced before an operation (first operand)
9 private int currValue = 0; // Value currently being introduced (second operand) 9 private int currValue = 0; // Value currently being introduced (second operand)
10 private char operation = '='; // Last operation button pressed 10 private char operation = '='; // Last operation button pressed
@@ -123,13 +123,14 @@ public class Calculator : Efl.Csharp.Application
123 // Buttons can only have simple text (no font, styles or markup) but can swallow 123 // Buttons can only have simple text (no font, styles or markup) but can swallow
124 // any other object we want. 124 // any other object we want.
125 // Therefore we create a more complex Efl.Ui.Text object and use it as content for the button. 125 // Therefore we create a more complex Efl.Ui.Text object and use it as content for the button.
126 var label = new Efl.Ui.Text(table); 126 var label = new Efl.Ui.Textbox(table);
127 label.Editable = false; 127 label.Editable = false;
128 label.Halign = 0.5; 128 label.HorizontalAlign = 0.5;
129 label.Valign = 0.5; 129 label.VerticalAlign = 0.5;
130 label.Color = (r, g, b, 255); 130 label.Color = (r, g, b, 255);
131 label.SetText(text); 131 label.SetText(text);
132 label.Font = ("Sans", (Efl.Font.Size)36); 132 label.FontFamily = "Sans";
133 label.FontSize = 36;
133 button.Content = label; 134 button.Content = label;
134 } 135 }
135 136
@@ -167,15 +168,16 @@ public class Calculator : Efl.Csharp.Application
167 AddButton(table, "C", 'C', 0, 4, 0, 0, 0); 168 AddButton(table, "C", 'C', 0, 4, 0, 0, 0);
168 169
169 // Create a big Efl.Ui.Text screen to display the current input 170 // Create a big Efl.Ui.Text screen to display the current input
170 screen = new Efl.Ui.Text(table); 171 screen = new Efl.Ui.Textbox(table);
171 screen.SetText("0"); 172 screen.SetText("0");
172 screen.Font = ("Sans", (Efl.Font.Size)48); 173 screen.FontFamily = "Sans";
174 screen.FontSize = 48;
173 screen.Multiline = false; 175 screen.Multiline = false;
174 screen.Editable = false; 176 screen.Editable = false;
175 screen.SelectionAllowed = false; 177 screen.SelectionAllowed = false;
176 table.PackTable(screen, 0, 0, 4, 1); 178 table.PackTable(screen, 0, 0, 4, 1);
177 screen.Halign = 0.9; 179 screen.HorizontalAlign = 0.9;
178 screen.Valign = 0.5; 180 screen.VerticalAlign = 0.5;
179 screen.EffectType = Efl.TextStyleEffectType.Glow; 181 screen.EffectType = Efl.TextStyleEffectType.Glow;
180 screen.GlowColor = (128, 128, 128, 128); 182 screen.GlowColor = (128, 128, 128, 128);
181 screen.ChangedEvent += ScreenChangedCb; 183 screen.ChangedEvent += ScreenChangedCb;
diff --git a/reference/c/ui/src/focus_main.c b/reference/c/ui/src/focus_main.c
index 8db43e19..50e83d03 100644
--- a/reference/c/ui/src/focus_main.c
+++ b/reference/c/ui/src/focus_main.c
@@ -2,9 +2,6 @@
2 2
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_textbox.eo.h>
7#include <efl_text_interactive.eo.h>
8 5
9static void 6static void
10_gui_about_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 7_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 1c32fdd9..dc7ca992 100644
--- a/reference/c/ui/src/ui_container.c
+++ b/reference/c/ui/src/ui_container.c
@@ -2,8 +2,6 @@
2 2
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_textbox.eo.h>
7 5
8/* 6/*
9 * Efl.UI container examples. 7 * Efl.UI container examples.
diff --git a/tutorial/c/hello-gui/src/gui_main.c b/tutorial/c/hello-gui/src/gui_main.c
index fa9eeab2..cc3b3d34 100644
--- a/tutorial/c/hello-gui/src/gui_main.c
+++ b/tutorial/c/hello-gui/src/gui_main.c
@@ -2,9 +2,6 @@
2 2
3#include <Elementary.h> 3#include <Elementary.h>
4#include <Efl_Ui.h> 4#include <Efl_Ui.h>
5// Temporary workaround until Unified Text stops using Legacy classes internally
6#include <efl_ui_textbox.eo.h>
7#include <efl_text_interactive.eo.h>
8 5
9static void 6static void
10_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 7_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)