summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-29 18:10:26 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-29 18:10:26 +0300
commit56db0ba93649aff2f901061a7373636a2a4b9036 (patch)
tree6654e14876572a4d3e3e4ab4c4cc73db39f176c4
parent8b92ccaf376b11e5a0e601033be700e7ad1279f2 (diff)
parent2583280b6134c5007312c23e766c1ce737d1269a (diff)
Merge branch 'develop' stable version 29.05.2014
-rw-r--r--README104
-rw-r--r--TODO18
-rw-r--r--examples/example.c531
-rw-r--r--examples/example.h5
-rw-r--r--py/cparser.py45
-rw-r--r--py/func_names.json70
-rw-r--r--src/bin/CMakeLists.txt3
-rw-r--r--src/bin/egui_gui/CMakeLists.txt9
-rw-r--r--src/bin/egui_gui/editor.c531
-rw-r--r--src/bin/egui_gui/egui_layout_c.json1897
-rw-r--r--src/bin/egui_gui/egui_layout_h.json55
-rw-r--r--src/bin/egui_gui/egui_logic.c99
-rw-r--r--src/bin/egui_gui/egui_logic_private.h9
-rw-r--r--src/bin/egui_gui/itemview.c26
-rw-r--r--src/bin/egui_gui/itemview.h3
-rw-r--r--src/bin/egui_gui/objtree.c8
-rw-r--r--src/bin/egui_gui/props_helper.c128
-rw-r--r--src/bin/egui_gui/props_helper.h7
-rw-r--r--src/bin/egui_gui/propview.c287
-rw-r--r--src/bin/egui_gui/propview.h17
-rw-r--r--src/bin/egui_gui/propview_data.h27
-rw-r--r--src/bin/egui_gui/rmview.c699
-rw-r--r--src/bin/egui_gui/rmview.h16
-rw-r--r--src/bin/egui_gui/seqview.c191
-rw-r--r--src/bin/egui_gui/seqview.h9
-rw-r--r--src/bin/egui_gui/settings_view.c79
-rw-r--r--src/bin/egui_gui/settings_view.h11
-rw-r--r--src/bin/main.c74
-rw-r--r--src/lib/CMakeLists.txt21
-rw-r--r--src/lib/c_generator.eo22
-rw-r--r--src/lib/cxx_generator.eo16
-rw-r--r--src/lib/database.c62
-rw-r--r--src/lib/database.h38
-rw-r--r--src/lib/db_dynamic_init.h287
-rw-r--r--src/lib/db_static_init.h2
-rw-r--r--src/lib/ffi_abstraction.c83
-rw-r--r--src/lib/ffi_abstraction.h4
-rw-r--r--src/lib/ffi_glue.c74
-rw-r--r--src/lib/ffi_glue.h14
-rw-r--r--src/lib/generator.c1704
-rw-r--r--src/lib/generator.h39
-rw-r--r--src/lib/generator_interface.eo149
-rw-r--r--src/lib/gui_parser.c406
-rw-r--r--src/lib/gui_widget.c959
-rw-r--r--src/lib/gui_widget.h219
-rw-r--r--src/lib/plugin_C.c69
-rw-r--r--src/lib/plugin_C.h10
-rw-r--r--src/lib/simulator.c49
-rw-r--r--src/tests/suite.c7
49 files changed, 5636 insertions, 3556 deletions
diff --git a/README b/README
index ef11bc2..00bf999 100644
--- a/README
+++ b/README
@@ -76,59 +76,43 @@ So let's start..
76Main idea is that we don't want to have large hard-to-read resource file. 76Main idea is that we don't want to have large hard-to-read resource file.
77We want to put json comments right into c file. (Anyway we can put all the comments into separate file) 77We want to put json comments right into c file. (Anyway we can put all the comments into separate file)
78 78
79 So part of our source file will look like this: 79/* @egui
80 /** 80{
81 * @egui 81 "main_win":
82 * { 82 {
83 * "win": { 83 "Desc":
84 * "parent" : null, 84 {
85 * "public" : true, 85 "parent":null,
86 * "class" : "elm_win", 86 "class":"Elm_Win",
87 * "constructor" : "elm_obj_win_constructor", 87 "public":true,
88 * "elm_obj_win_constructor" : [null, "ELM_WIN_BASIC"], 88 "type":"widget"
89 * "title_set" : "window!!!", 89 },
90 * "autodel_set" : true, 90 "Properties":
91 * "size_set" : [320, 320], 91 {
92 * "visibility_set" : true, 92 "constructor":["elm_obj_win_constructor"],
93 * "resize_object_add" : "bg" 93 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
94 * } 94 "title":["Egui is Cool! - Autogenerated"],
95 * } 95 "autodel":[true],
96 * @!egui 96 "size":[1000, 650],
97 */ 97 "resize_object_add":["main_bg"],
98 win = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, elm_obj_win_constructor("window", ELM_WIN_BASIC)); 98 "resize_object_add":["main_box"],
99 eo_do(win, evas_obj_size_set(320, 320)); 99 "visibility":[true]
100 eo_do(win, evas_obj_visibility_set(EINA_TRUE)); 100 }
101 eo_do(win, elm_obj_win_title_set("window!!!")); 101 }
102 eo_do(win, elm_obj_win_autodel_set(EINA_TRUE)); 102 }
103 103@!egui */
104 /** 104 main_win = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
105 * @egui 105 eo_unref(main_win);
106 * { 106 pub_widgets.main_win = main_win;
107 * "but1" : { 107 eo_do(main_win, elm_obj_win_title_set("Egui is Cool!"));
108 * "parent" : "win", 108 eo_do(main_win, elm_obj_win_autodel_set(EINA_TRUE));
109 * "public" : false, 109 eo_do(main_win, evas_obj_size_set(1000, 650));
110 * "class" : "elm_button", 110 eo_do(main_win, elm_obj_win_resize_object_add(main_bg));
111 * "constructor" : "eo_constructor", 111 eo_do(main_win, elm_obj_win_resize_object_add(main_box));
112 * "eo_constructor" : null, 112 eo_do(main_win, evas_obj_visibility_set(EINA_TRUE));
113 * "color_set" : [10, 255, 0, 255], 113
114 * "visibility_set" : true, 114 In this example, "main_win" is widgets,
115 * "part_text_set" : [null, "button1"], 115 "parent", "public", "size" etc - are properties
116 * "size_set" : [100, 50],
117 * "position_set" : [40, 20]
118 * }
119 * }
120 * @!egui
121 */
122
123 but1 = eo_add(ELM_OBJ_BUTTON_CLASS, win);
124 eo_do(but1, evas_obj_color_set(0, 250, 0, 255));
125 eo_do(but1, evas_obj_position_set(40, 20));
126 eo_do(but1, evas_obj_size_set(100, 50));
127 eo_do(but1, evas_obj_visibility_set(EINA_TRUE));
128 eo_do(but1, elm_wdg_part_text_set(NULL, "button1"));
129
130 In this example, "win" and "but1" are widgets,
131 "parent", "public", "size_set" etc - are properties
132 116
133 Different properties can be seen in json. 117 Different properties can be seen in json.
134 Some of them are shorter names of well-known evas/elementary functions, 118 Some of them are shorter names of well-known evas/elementary functions,
@@ -210,16 +194,6 @@ We want to put json comments right into c file. (Anyway we can put all the comme
210 194
211 Also, according to this database, widget's available properties will be displayed in "Property Inspector" of builder. 195 Also, according to this database, widget's available properties will be displayed in "Property Inspector" of builder.
212 196
213
214 You will need different efl branch to run gui_builder:
215
216 > git clone git://git.enlightenment.org/core/efl.git
217 > cd efl
218 > git checkout devs/yakov/eo_class_mro_get
219 Build and install this branch.
220 You can also rebase it on top of origin/master if needed.
221 > git rebase origin/master
222
223 Checkout Egui: 197 Checkout Egui:
224 > git clone git://git.enlightenment.org/devs/yakov/egui.git 198 > git clone git://git.enlightenment.org/devs/yakov/egui.git
225 199
@@ -238,13 +212,13 @@ We want to put json comments right into c file. (Anyway we can put all the comme
238 > ./src/bin/egui -f ../examples/example.c -s -t Tablet 212 > ./src/bin/egui -f ../examples/example.c -s -t Tablet
239 213
240 Generate source code: 214 Generate source code:
241 > ./src/bin/egui -f ../examples/example.c -g -o new 215 > ./src/bin/egui -f ../examples/example.c -e c -o new
242 - new.c and new.h will be generated in current dir 216 - new.c and new.h will be generated in current dir
243 217
244 Run simulation on newly generated file: 218 Run simulation on newly generated file:
245 > ./src/bin/egui -f new.c -s 219 > ./src/bin/egui -f new.c -s
246 220
247 Run kind of Gui Builder: 221 Run Gui Builder and open file:
248 > ./src/bin/egui -f new.c 222 > ./src/bin/egui -f new.c
249 223
250 224
diff --git a/TODO b/TODO
index 4480d82..a206454 100644
--- a/TODO
+++ b/TODO
@@ -6,13 +6,7 @@ Features:
6 -1 0 and 1 accepted 6 -1 0 and 1 accepted
7 -2 more values/nesting conditions 7 -2 more values/nesting conditions
8-1 Containers generic support: box, menus... 8-1 Containers generic support: box, menus...
9 - when widget is created add check if this widget is Container and save which type of container it is.
10 - add API which checks if Class is descendant of container class
11 - change container contents to keep properties
12 - add group: "container" to each function
13 - add support for opposite func for each packing operation 9 - add support for opposite func for each packing operation
14 - show menu items in 'Contents' tab, with public check, cb hoversell... etc
15
16 10
17 Issue: Menu container 11 Issue: Menu container
18 - need to avoid reloading of genlist, when adding item. 12 - need to avoid reloading of genlist, when adding item.
@@ -47,10 +41,6 @@ Features:
47 -1 EFL++ 41 -1 EFL++
48 -2 JS 42 -2 JS
49- Integration with: 43- Integration with:
50 -1 Enventor:
51 - invocation from GUI
52 - we may need a resource panel where we can set the paths to the images...
53 - Enventor needs to be launched with edc
54 -2 Eolian library: 44 -2 Eolian library:
55 - Egui invokes Eolian to determine if a property is a method or a property 45 - Egui invokes Eolian to determine if a property is a method or a property
56 - If property, request the Eo1/Eo2 get op id to retrieve info from the object 46 - If property, request the Eo1/Eo2 get op id to retrieve info from the object
@@ -58,6 +48,10 @@ Features:
58 - via network (option in espion and in egui application importer menu) 48 - via network (option in espion and in egui application importer menu)
59 - establish a protocol between them 49 - establish a protocol between them
60-2 Snippets 50-2 Snippets
51- Support Edje files inside resources
52 - e.g IMAGE edje/group
53 - bg_file_set could take the resource (without group)
54- Need to add in project settings the local/installed path to the images (or something like that)
61 55
62Fixes: 56Fixes:
63----- 57-----
@@ -65,14 +59,13 @@ Fixes:
65 - Fix value types for parameters in property view. 59 - Fix value types for parameters in property view.
66 - Resize sub-windows according to application resolution 60 - Resize sub-windows according to application resolution
67 - Don't propagate events when selecting widget 61 - Don't propagate events when selecting widget
68 - refactor _callbacks_expand (propview.c) 62- refactor _callbacks_expand (propview.c)
69 63
70Improvements: 64Improvements:
71------------ 65------------
72- Prettify the UI 66- Prettify the UI
73- stringshare 67- stringshare
74- need to think how handle _prop_new_value, which is outside of gui_widget 68- need to think how handle _prop_new_value, which is outside of gui_widget
75- is it possible to remove prop_validate(), and validate value in gui_value_set()?
76- wdg, cb, action, seq: ptr->id... 69- wdg, cb, action, seq: ptr->id...
77- Have to improve the egui UI 70- Have to improve the egui UI
78 - goal: give an identity to egui -> recognizable just by the UI 71 - goal: give an identity to egui -> recognizable just by the UI
@@ -93,7 +86,6 @@ Open issues:
93 86
94Known EFL bugs: 87Known EFL bugs:
95-------------- 88--------------
96- FILE SELECTOR
97- button: if size_set will be before part_text_set, text will be ellipsed!!! need some fixes in recalculation 89- button: if size_set will be before part_text_set, text will be ellipsed!!! need some fixes in recalculation
98- Sequence add: force panel show because RETURN key is propagated to panel 90- Sequence add: force panel show because RETURN key is propagated to panel
99- Hoversel with a lot of elements prevent access to those not displayed on the screen 91- Hoversel with a lot of elements prevent access to those not displayed on the screen
diff --git a/examples/example.c b/examples/example.c
index 3b443f0..e383f76 100644
--- a/examples/example.c
+++ b/examples/example.c
@@ -1,12 +1,12 @@
1#include <Elementary.h> 1#include <Elementary.h>
2#include "elm_widget.h"
3#include "elm_widget_container.h" 2#include "elm_widget_container.h"
4#include "elm_interface_scrollable.h" 3#include "elm_interface_scrollable.h"
5#include "example.h" 4#include "example.h"
6 5
7static GUI pub_widgets; 6static GUI pub_widgets;
8 7
9static Eo *elm_clock1; 8static Eo *elm_button1;
9static Eo *elm_table1;
10/* @egui 10/* @egui
11{ 11{
12 "Resources": 12 "Resources":
@@ -14,37 +14,30 @@ static Eo *elm_clock1;
14 "Desc": 14 "Desc":
15 { 15 {
16 "type":"resource" 16 "type":"resource"
17 } 17 },
18 "Sequences":["BigBang", "button_show", "button_hide", "table_show", "table_hide"]
18 } 19 }
19 } 20 }
20@!egui */ 21@!egui */
21
22/* @egui 22/* @egui
23{ 23{
24 "show_clock": 24 "Settings":
25 { 25 {
26 "Desc": 26 "Desc":
27 { 27 {
28 "type":"sequence" 28 "type":"settings"
29 }, 29 },
30 "Actions": 30 "Settings":
31 { 31 {
32 "Modification":["elm_clock1", "visibility_set", [true]] 32 "project":"new_project"
33 } 33 }
34 } 34 }
35 } 35 }
36@!egui */ 36@!egui */
37static Eina_Bool
38_sequence_show_clock_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
39{
40 eo_do(elm_clock1, evas_obj_visibility_set(EINA_TRUE));
41 return EO_CALLBACK_CONTINUE;
42}
43
44 37
45/* @egui 38/* @egui
46{ 39{
47 "hide_clock": 40 "button_show":
48 { 41 {
49 "Desc": 42 "Desc":
50 { 43 {
@@ -52,336 +45,68 @@ _sequence_show_clock_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const
52 }, 45 },
53 "Actions": 46 "Actions":
54 { 47 {
55 "Modification":["elm_clock1", "visibility_set", [false]] 48 "Modification":["elm_button1", "visibility", [true]]
56 } 49 }
57 } 50 }
58 } 51 }
59@!egui */ 52@!egui */
60static Eina_Bool 53static Eina_Bool
61_sequence_hide_clock_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 54new_project_button_show(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
62{ 55{
63 eo_do(elm_clock1, evas_obj_visibility_set(EINA_FALSE)); 56 eo_do(elm_button1, evas_obj_visibility_set(EINA_TRUE));
64 return EO_CALLBACK_CONTINUE; 57 return EO_CALLBACK_CONTINUE;
65} 58}
66 59
67static void
68_create_elm_win2()
69{
70 Eo *elm_win2;
71 Eo *elm_win2_main_menu;
72 Elm_Object_Item *elm_win2_main_menu_it0;
73 Elm_Object_Item *elm_win2_main_menu_it1;
74 Eo *elm_bg2;
75 Eo *elm_box2;
76 Eo *elm_button3;
77 Eo *elm_table1;
78 Eo *elm_button4;
79 Eo *elm_button5;
80 Eo *elm_label2;
81 60
82/* @egui 61/* @egui
83{ 62{
84 "elm_win2": 63 "button_hide":
85 {
86 "Desc":
87 {
88 "parent":null,
89 "class":"Elm_Win",
90 "type":"widget"
91 },
92 "Properties":
93 {
94 "visibility_set":[true],
95 "constructor":["elm_obj_win_constructor"],
96 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
97 "size_set":[515, 464],
98 "title_set":["elm_win2"],
99 "resize_object_add":["elm_bg2"],
100 "resize_object_add":["elm_box2"],
101 "autodel_set":[true]
102 }
103 }
104 }
105@!egui */
106 elm_win2 = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
107 eo_unref(elm_win2);
108 eo_do(elm_win2, evas_obj_size_set(515, 464));
109 eo_do(elm_win2, elm_obj_win_title_set("elm_win2"));
110 eo_do(elm_win2, elm_obj_win_autodel_set(EINA_TRUE));
111/* @egui
112{
113 "elm_win2_main_menu":
114 { 64 {
115 "Desc": 65 "Desc":
116 { 66 {
117 "parent":"elm_win2", 67 "type":"sequence"
118 "class":"Elm_Menu",
119 "type":"widget"
120 },
121 "Properties":
122 {},
123 "Items":
124 {
125 "it0":
126 {
127 "type":"regular",
128 "icon":null,
129 "label":"Show",
130 "Items":
131 {
132 "it2":
133 {
134 "type":"regular",
135 "icon":null,
136 "label":"Clock",
137 "callback":"show_clock"
138 }
139 }
140 },
141 "it1":
142 {
143 "type":"regular",
144 "icon":null,
145 "label":"Hide",
146 "Items":
147 {
148 "it3":
149 {
150 "type":"regular",
151 "icon":null,
152 "label":"Clock",
153 "callback":"hide_clock"
154 }
155 }
156 }
157 }
158 }
159 }
160@!egui */
161 elm_win2_main_menu = eo_add(ELM_OBJ_MENU_CLASS, elm_win2);
162 eo_unref(elm_win2_main_menu);
163 elm_win2_main_menu_it0 = eo_do(elm_win2_main_menu, elm_obj_menu_item_add(NULL, NULL, "Show", NULL, NULL));
164 eo_do(elm_win2_main_menu, elm_obj_menu_item_add(elm_win2_main_menu_it0, NULL, "Clock", _sequence_show_clock_execute, NULL));
165 elm_win2_main_menu_it1 = eo_do(elm_win2_main_menu, elm_obj_menu_item_add(NULL, NULL, "Hide", NULL, NULL));
166 eo_do(elm_win2_main_menu, elm_obj_menu_item_add(elm_win2_main_menu_it1, NULL, "Clock", _sequence_hide_clock_execute, NULL));
167/* @egui
168{
169 "elm_bg2":
170 {
171 "Desc":
172 {
173 "parent":"elm_win2",
174 "class":"Elm_Bg",
175 "type":"widget"
176 }, 68 },
177 "Properties": 69 "Actions":
178 { 70 {
179 "visibility_set":[true], 71 "Modification":["elm_button1", "visibility", [false]]
180 "part_text_set":[null, "elm_bg2"],
181 "size_hint_weight_set":[1, 1]
182 } 72 }
183 } 73 }
184 } 74 }
185@!egui */ 75@!egui */
186 elm_bg2 = eo_add(ELM_OBJ_BG_CLASS, elm_win2); 76static Eina_Bool
187 eo_unref(elm_bg2); 77new_project_button_hide(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
188 eo_do(elm_bg2, evas_obj_visibility_set(EINA_TRUE));
189 eo_do(elm_bg2, elm_obj_widget_part_text_set(NULL, "elm_bg2"));
190 eo_do(elm_bg2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
191 eo_do(elm_win2, elm_obj_win_resize_object_add(elm_bg2));
192/* @egui
193{ 78{
194 "elm_box2": 79 eo_do(elm_button1, evas_obj_visibility_set(EINA_FALSE));
195 { 80 return EO_CALLBACK_CONTINUE;
196 "Desc": 81}
197 { 82
198 "parent":"elm_win2", 83
199 "class":"Elm_Box",
200 "type":"widget"
201 },
202 "Properties":
203 {
204 "visibility_set":[true],
205 "part_text_set":[null, "elm_box2"],
206 "size_hint_weight_set":[1, 1]
207 },
208 "Contains":["elm_button3", "elm_clock1", "elm_table1"]
209 }
210 }
211@!egui */
212 elm_box2 = eo_add(ELM_OBJ_BOX_CLASS, elm_win2);
213 eo_unref(elm_box2);
214 eo_do(elm_box2, evas_obj_visibility_set(EINA_TRUE));
215 eo_do(elm_box2, elm_obj_widget_part_text_set(NULL, "elm_box2"));
216 eo_do(elm_box2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
217 eo_do(elm_win2, elm_obj_win_resize_object_add(elm_box2));
218/* @egui 84/* @egui
219{ 85{
220 "elm_button3": 86 "table_show":
221 { 87 {
222 "Desc": 88 "Desc":
223 { 89 {
224 "parent":"elm_box2", 90 "type":"sequence"
225 "class":"Elm_Button",
226 "type":"widget"
227 }, 91 },
228 "Properties": 92 "Actions":
229 { 93 {
230 "visibility_set":[true], 94 "Modification":["elm_table1", "visibility", [true]]
231 "part_text_set":[null, "elm_button3"],
232 "size_hint_weight_set":[1, 1]
233 } 95 }
234 } 96 }
235 } 97 }
236@!egui */ 98@!egui */
237 elm_button3 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box2); 99static Eina_Bool
238 eo_unref(elm_button3); 100new_project_table_show(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
239 eo_do(elm_button3, evas_obj_visibility_set(EINA_TRUE));
240 eo_do(elm_button3, elm_obj_widget_part_text_set(NULL, "elm_button3"));
241 eo_do(elm_button3, evas_obj_size_hint_weight_set(1.000000, 1.000000));
242/* @egui
243{ 101{
244 "elm_table1":
245 {
246 "Desc":
247 {
248 "parent":"elm_box2",
249 "class":"Elm_Table",
250 "type":"widget"
251 },
252 "Properties":
253 {
254 "visibility_set":[true],
255 "part_text_set":[null, "elm_table1"],
256 "size_hint_weight_set":[1, 1]
257 },
258 "Contains":
259 {
260 "elm_button4":[0, 0, 1, 1],
261 "elm_button5":[1, 1, 1, 1],
262 "elm_label2":[1, 0, 1, 1]
263 }
264 }
265 }
266@!egui */
267 elm_table1 = eo_add(ELM_OBJ_TABLE_CLASS, elm_box2);
268 eo_unref(elm_table1);
269 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE)); 102 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE));
270 eo_do(elm_table1, elm_obj_widget_part_text_set(NULL, "elm_table1")); 103 return EO_CALLBACK_CONTINUE;
271 eo_do(elm_table1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
272/* @egui
273{
274 "elm_button4":
275 {
276 "Desc":
277 {
278 "parent":"elm_table1",
279 "class":"Elm_Button",
280 "type":"widget"
281 },
282 "Properties":
283 {
284 "visibility_set":[true],
285 "part_text_set":[null, "elm_button4"],
286 "size_hint_weight_set":[1, 1]
287 }
288 }
289 }
290@!egui */
291 elm_button4 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_table1);
292 eo_unref(elm_button4);
293 eo_do(elm_button4, evas_obj_visibility_set(EINA_TRUE));
294 eo_do(elm_button4, elm_obj_widget_part_text_set(NULL, "elm_button4"));
295 eo_do(elm_button4, evas_obj_size_hint_weight_set(1.000000, 1.000000));
296/* @egui
297{
298 "elm_button5":
299 {
300 "Desc":
301 {
302 "parent":"elm_table1",
303 "class":"Elm_Button",
304 "type":"widget"
305 },
306 "Properties":
307 {
308 "visibility_set":[true],
309 "part_text_set":[null, "elm_button5"],
310 "size_hint_weight_set":[1, 1]
311 }
312 }
313 }
314@!egui */
315 elm_button5 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_table1);
316 eo_unref(elm_button5);
317 eo_do(elm_button5, evas_obj_visibility_set(EINA_TRUE));
318 eo_do(elm_button5, elm_obj_widget_part_text_set(NULL, "elm_button5"));
319 eo_do(elm_button5, evas_obj_size_hint_weight_set(1.000000, 1.000000));
320/* @egui
321{
322 "elm_label2":
323 {
324 "Desc":
325 {
326 "parent":"elm_table1",
327 "class":"Elm_Label",
328 "type":"widget"
329 },
330 "Properties":
331 {
332 "visibility_set":[true],
333 "part_text_set":[null, "This is table"],
334 "size_hint_weight_set":[1, 1]
335 }
336 }
337 }
338@!egui */
339 elm_label2 = eo_add(ELM_OBJ_LABEL_CLASS, elm_table1);
340 eo_unref(elm_label2);
341 eo_do(elm_label2, evas_obj_visibility_set(EINA_TRUE));
342 eo_do(elm_label2, elm_obj_widget_part_text_set(NULL, "This is table"));
343 eo_do(elm_label2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
344 eo_do(elm_table1, elm_obj_table_pack(elm_button4, 0, 0, 1, 1));
345 eo_do(elm_table1, elm_obj_table_pack(elm_button5, 1, 1, 1, 1));
346 eo_do(elm_table1, elm_obj_table_pack(elm_label2, 1, 0, 1, 1));
347/* @egui
348{
349 "elm_clock1":
350 {
351 "Desc":
352 {
353 "parent":"elm_box2",
354 "class":"Elm_Clock",
355 "type":"widget"
356 },
357 "Properties":
358 {
359 "visibility_set":[true],
360 "part_text_set":[null, "elm_clock1"],
361 "size_hint_weight_set":[1, 1],
362 "size_hint_align_set":[-1, -1],
363 "size_hint_min_set":[1, 1]
364 }
365 }
366 }
367@!egui */
368 elm_clock1 = eo_add(ELM_OBJ_CLOCK_CLASS, elm_box2);
369 eo_unref(elm_clock1);
370 eo_do(elm_clock1, evas_obj_visibility_set(EINA_TRUE));
371 eo_do(elm_clock1, elm_obj_widget_part_text_set(NULL, "elm_clock1"));
372 eo_do(elm_clock1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
373 eo_do(elm_clock1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
374 eo_do(elm_clock1, evas_obj_size_hint_min_set(1, 1));
375 eo_do(elm_box2, elm_obj_box_pack_end(elm_button3));
376 eo_do(elm_box2, elm_obj_box_pack_end(elm_clock1));
377 eo_do(elm_box2, elm_obj_box_pack_end(elm_table1));
378 eo_do(elm_win2, evas_obj_visibility_set(EINA_TRUE));
379} 104}
380 105
381 106
382/* @egui 107/* @egui
383{ 108{
384 "show_win2": 109 "table_hide":
385 { 110 {
386 "Desc": 111 "Desc":
387 { 112 {
@@ -389,16 +114,15 @@ _create_elm_win2()
389 }, 114 },
390 "Actions": 115 "Actions":
391 { 116 {
392 "Creation":"elm_win2" 117 "Modification":["elm_table1", "visibility", [false]]
393 } 118 }
394 } 119 }
395 } 120 }
396@!egui */ 121@!egui */
397static Eina_Bool 122static Eina_Bool
398_sequence_show_win2_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 123new_project_table_hide(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
399{ 124{
400 _create_elm_win2(); 125 eo_do(elm_table1, evas_obj_visibility_set(EINA_FALSE));
401
402 return EO_CALLBACK_CONTINUE; 126 return EO_CALLBACK_CONTINUE;
403} 127}
404 128
@@ -407,11 +131,12 @@ _create_elm_win1()
407{ 131{
408 Eo *elm_win1; 132 Eo *elm_win1;
409 Eo *elm_win1_main_menu; 133 Eo *elm_win1_main_menu;
134 Elm_Object_Item *elm_win1_main_menu_it0;
135 Elm_Object_Item *elm_win1_main_menu_it1;
410 Eo *elm_bg1; 136 Eo *elm_bg1;
411 Eo *elm_box1; 137 Eo *elm_box1;
412 Eo *elm_button1;
413 Eo *elm_label1;
414 Eo *elm_button2; 138 Eo *elm_button2;
139 Eo *elm_button3;
415 140
416/* @egui 141/* @egui
417{ 142{
@@ -425,21 +150,21 @@ _create_elm_win1()
425 }, 150 },
426 "Properties": 151 "Properties":
427 { 152 {
428 "visibility_set":[true], 153 "visibility":[true],
429 "constructor":["elm_obj_win_constructor"], 154 "constructor":["elm_obj_win_constructor"],
430 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"], 155 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
431 "size_set":[521, 451], 156 "size":[514, 665],
432 "title_set":["elm_win1"], 157 "title":["elm_win1"],
433 "resize_object_add":["elm_bg1"], 158 "resize_object_add":["elm_bg1"],
434 "resize_object_add":["elm_box1"], 159 "resize_object_add":["elm_box1"],
435 "autodel_set":[true] 160 "autodel":[true]
436 } 161 }
437 } 162 }
438 } 163 }
439@!egui */ 164@!egui */
440 elm_win1 = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, elm_obj_win_constructor(NULL, ELM_WIN_BASIC)); 165 elm_win1 = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
441 eo_unref(elm_win1); 166 eo_unref(elm_win1);
442 eo_do(elm_win1, evas_obj_size_set(521, 451)); 167 eo_do(elm_win1, evas_obj_size_set(514, 665));
443 eo_do(elm_win1, elm_obj_win_title_set("elm_win1")); 168 eo_do(elm_win1, elm_obj_win_title_set("elm_win1"));
444 eo_do(elm_win1, elm_obj_win_autodel_set(EINA_TRUE)); 169 eo_do(elm_win1, elm_obj_win_autodel_set(EINA_TRUE));
445/* @egui 170/* @egui
@@ -455,12 +180,67 @@ _create_elm_win1()
455 "Properties": 180 "Properties":
456 {}, 181 {},
457 "Items": 182 "Items":
458 {} 183 {
184 "elm_win1_main_menu_it0":
185 {
186 "type":"regular",
187 "icon":"stop",
188 "label":"Button",
189 "callback":null,
190 "Items":
191 {
192 "elm_win1_main_menu_it2":
193 {
194 "type":"regular",
195 "icon":"fileopen",
196 "label":"Show",
197 "callback":"button_show"
198 },
199 "elm_win1_main_menu_it3":
200 {
201 "type":"regular",
202 "icon":"list-add",
203 "label":"Hide",
204 "callback":"button_hide"
205 }
206 }
207 },
208 "elm_win1_main_menu_it1":
209 {
210 "type":"regular",
211 "icon":"list-add",
212 "label":"Table",
213 "callback":null,
214 "Items":
215 {
216 "elm_win1_main_menu_it4":
217 {
218 "type":"regular",
219 "icon":"search",
220 "label":"Show",
221 "callback":"table_show"
222 },
223 "elm_win1_main_menu_it5":
224 {
225 "type":"regular",
226 "icon":"fileopen",
227 "label":"Hide",
228 "callback":"table_hide"
229 }
230 }
231 }
232 }
459 } 233 }
460 } 234 }
461@!egui */ 235@!egui */
462 elm_win1_main_menu = eo_add(ELM_OBJ_MENU_CLASS, elm_win1); 236 elm_win1_main_menu = eo_add(ELM_OBJ_MENU_CLASS, elm_win1);
463 eo_unref(elm_win1_main_menu); 237 eo_unref(elm_win1_main_menu);
238 eo_do(elm_win1_main_menu, elm_win1_main_menu_it0 = elm_obj_menu_item_add(NULL, "stop", "Button", NULL, NULL);
239 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(elm_win1_main_menu_it0, "fileopen", "Show", new_project_button_show, NULL);
240 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(elm_win1_main_menu_it0, "list-add", "Hide", new_project_button_hide, NULL);
241 eo_do(elm_win1_main_menu, elm_win1_main_menu_it1 = elm_obj_menu_item_add(NULL, "list-add", "Table", NULL, NULL);
242 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(elm_win1_main_menu_it1, "search", "Show", new_project_table_show, NULL);
243 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(elm_win1_main_menu_it1, "fileopen", "Hide", new_project_table_hide, NULL);
464/* @egui 244/* @egui
465{ 245{
466 "elm_bg1": 246 "elm_bg1":
@@ -473,10 +253,9 @@ _create_elm_win1()
473 }, 253 },
474 "Properties": 254 "Properties":
475 { 255 {
476 "visibility_set":[true], 256 "visibility":[true],
477 "part_text_set":[null, "elm_bg1"], 257 "part_text":[null, "elm_bg1"],
478 "size_hint_weight_set":[1, 1], 258 "size_hint_weight":[1, 1]
479 "bg_color_set":[100, 100, 100, 255]
480 } 259 }
481 } 260 }
482 } 261 }
@@ -486,7 +265,6 @@ _create_elm_win1()
486 eo_do(elm_bg1, evas_obj_visibility_set(EINA_TRUE)); 265 eo_do(elm_bg1, evas_obj_visibility_set(EINA_TRUE));
487 eo_do(elm_bg1, elm_obj_widget_part_text_set(NULL, "elm_bg1")); 266 eo_do(elm_bg1, elm_obj_widget_part_text_set(NULL, "elm_bg1"));
488 eo_do(elm_bg1, evas_obj_size_hint_weight_set(1.000000, 1.000000)); 267 eo_do(elm_bg1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
489 eo_do(elm_bg1, elm_obj_bg_color_set(100, 100, 100, 255));
490 eo_do(elm_win1, elm_obj_win_resize_object_add(elm_bg1)); 268 eo_do(elm_win1, elm_obj_win_resize_object_add(elm_bg1));
491/* @egui 269/* @egui
492{ 270{
@@ -500,11 +278,11 @@ _create_elm_win1()
500 }, 278 },
501 "Properties": 279 "Properties":
502 { 280 {
503 "visibility_set":[true], 281 "visibility":[true],
504 "part_text_set":[null, "elm_box1"], 282 "part_text":[null, "elm_box1"],
505 "size_hint_weight_set":[1, 1] 283 "size_hint_weight":[1, 1]
506 }, 284 },
507 "Contains":["elm_button1", "elm_label1", "elm_button2"] 285 "Contains":["elm_button1", "elm_table1"]
508 } 286 }
509 } 287 }
510@!egui */ 288@!egui */
@@ -526,11 +304,10 @@ _create_elm_win1()
526 }, 304 },
527 "Properties": 305 "Properties":
528 { 306 {
529 "visibility_set":[true], 307 "visibility":[true],
530 "part_text_set":[null, "Button"], 308 "part_text":[null, "elm_button1"],
531 "size_hint_weight_set":[1, 1], 309 "size_hint_weight":[1, 1],
532 "size_hint_align_set":[-1, 0], 310 "size_hint_align":[-1, -1]
533 "color_set":[20, 200, 20, 255]
534 } 311 }
535 } 312 }
536 } 313 }
@@ -538,66 +315,96 @@ _create_elm_win1()
538 elm_button1 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box1); 315 elm_button1 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box1);
539 eo_unref(elm_button1); 316 eo_unref(elm_button1);
540 eo_do(elm_button1, evas_obj_visibility_set(EINA_TRUE)); 317 eo_do(elm_button1, evas_obj_visibility_set(EINA_TRUE));
541 eo_do(elm_button1, elm_obj_widget_part_text_set(NULL, "Button")); 318 eo_do(elm_button1, elm_obj_widget_part_text_set(NULL, "elm_button1"));
542 eo_do(elm_button1, evas_obj_size_hint_weight_set(1.000000, 1.000000)); 319 eo_do(elm_button1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
543 eo_do(elm_button1, evas_obj_size_hint_align_set(-1.000000, 0.000000)); 320 eo_do(elm_button1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
544 eo_do(elm_button1, evas_obj_color_set(20, 200, 20, 255));
545/* @egui 321/* @egui
546{ 322{
547 "elm_label1": 323 "elm_table1":
548 { 324 {
549 "Desc": 325 "Desc":
550 { 326 {
551 "parent":"elm_box1", 327 "parent":"elm_box1",
552 "class":"Elm_Label", 328 "class":"Elm_Table",
553 "type":"widget" 329 "type":"widget"
554 }, 330 },
555 "Properties": 331 "Properties":
556 { 332 {
557 "visibility_set":[true], 333 "visibility":[true],
558 "part_text_set":[null, "Hello, this is label"], 334 "part_text":[null, "elm_table1"],
559 "size_hint_weight_set":[1, 1] 335 "size_hint_weight":[1, 1],
336 "size_hint_align":[-1, -1]
337 },
338 "Contains":
339 {
340 "elm_button2":[0, 0, 1, 1],
341 "elm_button3":[1, 1, 1, 1]
560 } 342 }
561 } 343 }
562 } 344 }
563@!egui */ 345@!egui */
564 elm_label1 = eo_add(ELM_OBJ_LABEL_CLASS, elm_box1); 346 elm_table1 = eo_add(ELM_OBJ_TABLE_CLASS, elm_box1);
565 eo_unref(elm_label1); 347 eo_unref(elm_table1);
566 eo_do(elm_label1, evas_obj_visibility_set(EINA_TRUE)); 348 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE));
567 eo_do(elm_label1, elm_obj_widget_part_text_set(NULL, "Hello, this is label")); 349 eo_do(elm_table1, elm_obj_widget_part_text_set(NULL, "elm_table1"));
568 eo_do(elm_label1, evas_obj_size_hint_weight_set(1.000000, 1.000000)); 350 eo_do(elm_table1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
351 eo_do(elm_table1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
352 eo_do(elm_box1, elm_obj_box_pack_end(elm_button1));
353 eo_do(elm_box1, elm_obj_box_pack_end(elm_table1));
569/* @egui 354/* @egui
570{ 355{
571 "elm_button2": 356 "elm_button2":
572 { 357 {
573 "Desc": 358 "Desc":
574 { 359 {
575 "parent":"elm_box1", 360 "parent":"elm_table1",
576 "class":"Elm_Button", 361 "class":"Elm_Button",
577 "type":"widget" 362 "type":"widget"
578 }, 363 },
579 "Properties": 364 "Properties":
580 { 365 {
581 "visibility_set":[true], 366 "visibility":[true],
582 "part_text_set":[null, "New Window"], 367 "part_text":[null, "elm_button2"],
583 "size_hint_weight_set":[1, 1] 368 "size_hint_weight":[1, 1],
584 }, 369 "color":[0, 255, 0, 255]
585 "Callbacks":
586 {
587 "clicked":"show_win2"
588 } 370 }
589 } 371 }
590 } 372 }
591@!egui */ 373@!egui */
592 elm_button2 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box1); 374 elm_button2 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_table1);
593 eo_unref(elm_button2); 375 eo_unref(elm_button2);
594 eo_do(elm_button2, evas_obj_visibility_set(EINA_TRUE)); 376 eo_do(elm_button2, evas_obj_visibility_set(EINA_TRUE));
595 eo_do(elm_button2, elm_obj_widget_part_text_set(NULL, "New Window")); 377 eo_do(elm_button2, elm_obj_widget_part_text_set(NULL, "elm_button2"));
596 eo_do(elm_button2, evas_obj_size_hint_weight_set(1.000000, 1.000000)); 378 eo_do(elm_button2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
597 eo_do(elm_button2, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _sequence_show_win2_execute, NULL)); 379 eo_do(elm_button2, evas_obj_color_set(0, 255, 0, 255));
598 eo_do(elm_box1, elm_obj_box_pack_end(elm_button1)); 380/* @egui
599 eo_do(elm_box1, elm_obj_box_pack_end(elm_label1)); 381{
600 eo_do(elm_box1, elm_obj_box_pack_end(elm_button2)); 382 "elm_button3":
383 {
384 "Desc":
385 {
386 "parent":"elm_table1",
387 "class":"Elm_Button",
388 "type":"widget"
389 },
390 "Properties":
391 {
392 "visibility":[true],
393 "part_text":[null, "elm_button3"],
394 "size_hint_weight":[1, 1],
395 "color":[255, 255, 0, 255]
396 }
397 }
398 }
399@!egui */
400 elm_button3 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_table1);
401 eo_unref(elm_button3);
402 eo_do(elm_button3, evas_obj_visibility_set(EINA_TRUE));
403 eo_do(elm_button3, elm_obj_widget_part_text_set(NULL, "elm_button3"));
404 eo_do(elm_button3, evas_obj_size_hint_weight_set(1.000000, 1.000000));
405 eo_do(elm_button3, evas_obj_color_set(255, 255, 0, 255));
406 eo_do(elm_table1, elm_obj_table_pack(elm_button2, 0, 0, 1, 1));
407 eo_do(elm_table1, elm_obj_table_pack(elm_button3, 1, 1, 1, 1));
601 eo_do(elm_win1, evas_obj_visibility_set(EINA_TRUE)); 408 eo_do(elm_win1, evas_obj_visibility_set(EINA_TRUE));
602} 409}
603 410
@@ -618,19 +425,19 @@ _create_elm_win1()
618 } 425 }
619@!egui */ 426@!egui */
620static Eina_Bool 427static Eina_Bool
621_sequence_BigBang_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 428new_project_BigBang(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
622{ 429{
623 _create_elm_win1(); 430 _create_elm_win1();
624 431
625 return EO_CALLBACK_CONTINUE; 432 return EO_CALLBACK_CONTINUE;
626} 433}
627 434
628GUI* get_gui() 435GUI* new_project_gui_get()
629{ 436{
630 static Eina_Bool initialized = EINA_FALSE; 437 static Eina_Bool initialized = EINA_FALSE;
631 if (!initialized) 438 if (!initialized)
632 { 439 {
633 _sequence_BigBang_execute(NULL, NULL, NULL, NULL); 440 new_project_BigBang(NULL, NULL, NULL, NULL);
634 initialized = EINA_TRUE; 441 initialized = EINA_TRUE;
635 } 442 }
636 return &pub_widgets; 443 return &pub_widgets;
diff --git a/examples/example.h b/examples/example.h
index 5db62c6..b8c5cbb 100644
--- a/examples/example.h
+++ b/examples/example.h
@@ -7,6 +7,5 @@ typedef struct
7{ 7{
8} GUI; 8} GUI;
9 9
10GUI* get_gui(); 10GUI *new_project_gui_get();
11 11#endif
12#endif \ No newline at end of file
diff --git a/py/cparser.py b/py/cparser.py
index 0b10007..af41c75 100644
--- a/py/cparser.py
+++ b/py/cparser.py
@@ -54,45 +54,11 @@ class Cparser(object):
54 54
55 self.cl_data = {} 55 self.cl_data = {}
56 self.cl_incl = {} 56 self.cl_incl = {}
57 self.gui_events = []
58 self.gui_events_lst = []
59 57
60 self.outdir = "" 58 self.outdir = ""
61 59
62 def fetch_data(self, _in_data): 60 def fetch_data(self, _in_data):
63 61
64 #event_desc structure
65 # { EV_CLICKED, EV_BUTTON_DOWN, EV_BUTTON_UP, NULL }
66 #
67 reg = "Eo_Event_Description[ ]*([\w]*)[ =]*EO_EVENT_DESCRIPTION\(([^\)]*)\)"
68 af = _in_data.replace("\n", "")
69 ev_list = re.findall(reg, af)
70 for tup in ev_list:
71 key = tup[0]
72 name = tup[1].replace(" ", "").split(",")
73 lst = tup[1].split("\"")
74 it = filter(len, lst)[0]
75 if (it not in self.gui_events_lst):
76 self.gui_events_lst.append(it)
77 self.gui_events.append("\t{\"%s\", %s, \"%s\"},"%(it, key.strip("_"), key.strip("_")))
78
79 #event_desc structure
80 # { EV_CLICKED, EV_BUTTON_DOWN, EV_BUTTON_UP, NULL }
81 #
82 """
83 reg = "Eo_Event_Description[ *]*([\w]*)[][ =]*{([^}]*)};"
84 af = _in_data.replace("\n", "")
85 ev_list = re.findall(reg, af)
86
87 for tup in ev_list:
88 key = tup[0]
89 lst = tup[1].replace(" ", "").split(",")
90 if lst[-1] != "NULL":
91 print "ERROR: last event descriptor should be NULL in class %s"%(cl_id)
92 exit(1)
93 lst = filter(lambda l: False if l == "NULL" else True, lst)
94 ev_desc[key] = lst
95 """
96 # 62 #
97 # EO_DEFINE_CLASS(elm_scrollable_interface_get, &_elm_scrollable_interface_desc, NULL, EVAS_SMART_SCROLLABLE_INTERFACE, NULL); 63 # EO_DEFINE_CLASS(elm_scrollable_interface_get, &_elm_scrollable_interface_desc, NULL, EVAS_SMART_SCROLLABLE_INTERFACE, NULL);
98 # 64 #
@@ -385,14 +351,10 @@ class Cparser(object):
385 s = "\nstatic Enum_Types enum_types[] =\n{%s\n\t{NULL, NULL}\n};\n\n"%("\n".join(type_var_lst)) 351 s = "\nstatic Enum_Types enum_types[] =\n{%s\n\t{NULL, NULL}\n};\n\n"%("\n".join(type_var_lst))
386 f.write("%s"%s) 352 f.write("%s"%s)
387 353
388 ev_desc_init_lst = _tup[4]
389 s = "\nstatic Gui_Event_Desc event_desc[] =\n{%s\n\t{NULL, NULL, NULL}\n};\n\n"%("\n".join(ev_desc_init_lst))
390 f.write("%s"%s)
391
392 op_type_init_lst = _tup[0] 354 op_type_init_lst = _tup[0]
393 op_desc_init_lst = _tup[1] 355 op_desc_init_lst = _tup[1]
394 cl_desc_init_lst = _tup[2] 356 cl_desc_init_lst = _tup[2]
395 op_data_init_lst = _tup[5] 357 op_data_init_lst = _tup[4]
396 358
397 f.write("%s\n\n"%("\n".join(op_type_init_lst))) 359 f.write("%s\n\n"%("\n".join(op_type_init_lst)))
398 f.write("%s\n\n"%("\n".join(op_data_init_lst))) 360 f.write("%s\n\n"%("\n".join(op_data_init_lst)))
@@ -552,7 +514,8 @@ class Cparser(object):
552 if "constructor" in api_f_name: 514 if "constructor" in api_f_name:
553 found_desc.flags.append("EGUI_EO_ADD_CALL") 515 found_desc.flags.append("EGUI_EO_ADD_CALL")
554 else: 516 else:
555 found_desc.flags.append("EGUI_EO_DO_CALL") 517 if "EGUI_NO_CALL" not in found_desc.flags:
518 found_desc.flags.append("EGUI_EO_DO_CALL")
556 #if alias name in database is empty, leave usual name 519 #if alias name in database is empty, leave usual name
557 name = found_desc.name if len(found_desc.name) else api_f_name 520 name = found_desc.name if len(found_desc.name) else api_f_name
558 display_name = found_desc.display_name if len(found_desc.display_name) else name 521 display_name = found_desc.display_name if len(found_desc.display_name) else name
@@ -576,7 +539,7 @@ class Cparser(object):
576 539
577 if (list_of_all_tokens != []): 540 if (list_of_all_tokens != []):
578 print "\033[31;1mNot found tokens:\033[0m", list_of_all_tokens 541 print "\033[31;1mNot found tokens:\033[0m", list_of_all_tokens
579 return (op_type_init_lst, op_desc_init_lst, cl_desc_init_lst, enum_init_dict, self.gui_events, op_data_init_lst) 542 return (op_type_init_lst, op_desc_init_lst, cl_desc_init_lst, enum_init_dict, op_data_init_lst)
580 543
581 544
582 #set internal variable for outdir 545 #set internal variable for outdir
diff --git a/py/func_names.json b/py/func_names.json
index 8d62c7d..9805e0c 100644
--- a/py/func_names.json
+++ b/py/func_names.json
@@ -3,63 +3,63 @@
3 [ 3 [
4 { 4 {
5 "token" : "evas_obj_color_set", 5 "token" : "evas_obj_color_set",
6 "name" : "color_set", 6 "name" : "color",
7 "display_name" : "Color" 7 "display_name" : "Color"
8 }, 8 },
9 { 9 {
10 "token" : "evas_obj_size_set", 10 "token" : "evas_obj_size_set",
11 "name" : "size_set", 11 "name" : "size",
12 "display_name" : "Size" 12 "display_name" : "Size"
13 }, 13 },
14 { 14 {
15 "token" : "evas_obj_position_set", 15 "token" : "evas_obj_position_set",
16 "name" : "position_set", 16 "name" : "position",
17 "display_name" : "Position" 17 "display_name" : "Position"
18 }, 18 },
19 { 19 {
20 "token" : "evas_obj_size_hint_weight_set", 20 "token" : "evas_obj_size_hint_weight_set",
21 "name" : "size_hint_weight_set", 21 "name" : "size_hint_weight",
22 "display_name" : "Size Hint Weight" 22 "display_name" : "Size Hint Weight"
23 }, 23 },
24 { 24 {
25 "token" : "evas_obj_size_hint_aspect_set", 25 "token" : "evas_obj_size_hint_aspect_set",
26 "name" : "size_hint_aspect_set", 26 "name" : "size_hint_aspect",
27 "display_name" : "Size Hint Aspect" 27 "display_name" : "Size Hint Aspect"
28 }, 28 },
29 { 29 {
30 "token" : "evas_obj_size_hint_align_set", 30 "token" : "evas_obj_size_hint_align_set",
31 "name" : "size_hint_align_set", 31 "name" : "size_hint_align",
32 "display_name" : "Size Hint Align" 32 "display_name" : "Size Hint Align"
33 }, 33 },
34 { 34 {
35 "token" : "evas_obj_size_hint_min_set", 35 "token" : "evas_obj_size_hint_min_set",
36 "name" : "size_hint_min_set", 36 "name" : "size_hint_min",
37 "display_name" : "Size Hint Min" 37 "display_name" : "Size Hint Min"
38 }, 38 },
39 { 39 {
40 "token" : "evas_obj_visibility_set", 40 "token" : "evas_obj_visibility_set",
41 "name" : "visibility_set", 41 "name" : "visibility",
42 "display_name" : "Visibility" 42 "display_name" : "Visibility"
43 }, 43 },
44 { 44 {
45 "token" : "elm_obj_bg_color_set", 45 "token" : "elm_obj_bg_color_set",
46 "name" : "bg_color_set", 46 "name" : "color",
47 "display_name" : "Bg Color" 47 "display_name" : "Bg Color"
48 }, 48 },
49 { 49 {
50 "token" : "elm_obj_bg_file_set", 50 "token" : "elm_obj_bg_file_set",
51 "name" : "bg_file_set", 51 "name" : "file",
52 "params" : ["GUI_TYPE_IMAGE", "GUI_TYPE_STRING"], 52 "params" : ["GUI_TYPE_IMAGE", "GUI_TYPE_STRING"],
53 "display_name" : "Bg File" 53 "display_name" : "Bg File"
54 }, 54 },
55 { 55 {
56 "token" : "elm_obj_win_title_set", 56 "token" : "elm_obj_win_title_set",
57 "name" : "title_set", 57 "name" : "title",
58 "display_name" : "Title" 58 "display_name" : "Title"
59 }, 59 },
60 { 60 {
61 "token" : "elm_obj_win_autodel_set", 61 "token" : "elm_obj_win_autodel_set",
62 "name" : "autodel_set", 62 "name" : "autodel",
63 "display_name" : "Autodel" 63 "display_name" : "Autodel"
64 }, 64 },
65 { 65 {
@@ -80,12 +80,12 @@
80 }, 80 },
81 { 81 {
82 "token" : "elm_obj_widget_style_set", 82 "token" : "elm_obj_widget_style_set",
83 "name" : "style_set", 83 "name" : "style",
84 "display_name" : "Style" 84 "display_name" : "Style"
85 }, 85 },
86 { 86 {
87 "token" : "elm_obj_widget_part_text_set", 87 "token" : "elm_obj_widget_part_text_set",
88 "name" : "part_text_set", 88 "name" : "part_text",
89 "display_name" : "Part Text" 89 "display_name" : "Part Text"
90 }, 90 },
91 { 91 {
@@ -95,7 +95,7 @@
95 }, 95 },
96 { 96 {
97 "token" : "elm_obj_widget_access_info_set", 97 "token" : "elm_obj_widget_access_info_set",
98 "name" : "access_info_set", 98 "name" : "access_info",
99 "display_name" : "Access Info" 99 "display_name" : "Access Info"
100 }, 100 },
101 { 101 {
@@ -147,7 +147,7 @@
147 }, 147 },
148 { 148 {
149 "token" : "elm_obj_box_padding_set", 149 "token" : "elm_obj_box_padding_set",
150 "name" : "box_padding" 150 "name" : "padding"
151 }, 151 },
152 { 152 {
153 "token" : "elm_obj_box_pack_end", 153 "token" : "elm_obj_box_pack_end",
@@ -160,7 +160,7 @@
160 }, 160 },
161 { 161 {
162 "token" : "elm_obj_box_unpack", 162 "token" : "elm_obj_box_unpack",
163 "name" : "box_unpack", 163 "name" : "unpack",
164 "group" : "GROUP_CONTAINER", 164 "group" : "GROUP_CONTAINER",
165 "behaviour" : "CONTAINER_UNPACK", 165 "behaviour" : "CONTAINER_UNPACK",
166 "container_type" : "OBJ_CONTAINER" 166 "container_type" : "OBJ_CONTAINER"
@@ -174,7 +174,8 @@
174 }, 174 },
175 { 175 {
176 "token" : "elm_obj_box_pack_after", 176 "token" : "elm_obj_box_pack_after",
177 "name" : "pack_after" 177 "name" : "pack_after",
178 "flags" : ["EGUI_GENERATE", "EGUI_NO_CALL"]
178 }, 179 },
179 { 180 {
180 "token" : "elm_interface_scrollable_bounce_allow_set", 181 "token" : "elm_interface_scrollable_bounce_allow_set",
@@ -188,7 +189,7 @@
188 }, 189 },
189 { 190 {
190 "token" : "elm_interface_scrollable_content_min_limit_cb_set", 191 "token" : "elm_interface_scrollable_content_min_limit_cb_set",
191 "name" : "content_min_limit_cb_set", 192 "name" : "content_min_limit_cb",
192 "display_name" : "Content Min Limit Cb" 193 "display_name" : "Content Min Limit Cb"
193 }, 194 },
194 { 195 {
@@ -198,27 +199,27 @@
198 }, 199 },
199 { 200 {
200 "token" : "elm_obj_image_file_set", 201 "token" : "elm_obj_image_file_set",
201 "name" : "image_file_set", 202 "name" : "file",
202 "display_name" : "Image File" 203 "display_name" : "Image File"
203 }, 204 },
204 { 205 {
205 "token" : "elm_obj_image_resizable_set", 206 "token" : "elm_obj_image_resizable_set",
206 "name" : "image_resizable_set", 207 "name" : "resizable",
207 "display_name" : "Resizable" 208 "display_name" : "Resizable"
208 }, 209 },
209 { 210 {
210 "token" : "elm_obj_button_autorepeat_set", 211 "token" : "elm_obj_button_autorepeat_set",
211 "name" : "autorepeat_set", 212 "name" : "autorepeat",
212 "display_name" : "Autorepeat" 213 "display_name" : "Autorepeat"
213 }, 214 },
214 { 215 {
215 "token" : "elm_obj_button_autorepeat_initial_timeout_set", 216 "token" : "elm_obj_button_autorepeat_initial_timeout_set",
216 "name" : "autorepeat_initial_timeout_set", 217 "name" : "autorepeat_initial_timeout",
217 "display_name" : "Autorepeat Initial Timeout" 218 "display_name" : "Autorepeat Initial Timeout"
218 }, 219 },
219 { 220 {
220 "token" : "elm_obj_button_autorepeat_gap_timeout_set", 221 "token" : "elm_obj_button_autorepeat_gap_timeout_set",
221 "name" : "autorepeat_gap_timeout_set", 222 "name" : "autorepeat_gap_timeout",
222 "display_name" : "Autorepeat Gap Timeout" 223 "display_name" : "Autorepeat Gap Timeout"
223 }, 224 },
224 { 225 {
@@ -253,7 +254,7 @@
253 }, 254 },
254 { 255 {
255 "token" : "elm_obj_box_align_set", 256 "token" : "elm_obj_box_align_set",
256 "name" : "box_align", 257 "name" : "align",
257 "display_name" : "Alignment" 258 "display_name" : "Alignment"
258 }, 259 },
259 { 260 {
@@ -298,7 +299,7 @@
298 }, 299 },
299 { 300 {
300 "token" : "elm_obj_table_pack", 301 "token" : "elm_obj_table_pack",
301 "name" : "table_pack", 302 "name" : "pack",
302 "display_name" : "Pack", 303 "display_name" : "Pack",
303 "flags" : ["MULTI_PROPERTY", "UPDATE_PARENT"], 304 "flags" : ["MULTI_PROPERTY", "UPDATE_PARENT"],
304 "group" : "GROUP_CONTAINER", 305 "group" : "GROUP_CONTAINER",
@@ -307,28 +308,28 @@
307 }, 308 },
308 { 309 {
309 "token" : "elm_obj_table_unpack", 310 "token" : "elm_obj_table_unpack",
310 "name" : "table_unpack", 311 "name" : "unpack",
311 "group" : "GROUP_CONTAINER", 312 "group" : "GROUP_CONTAINER",
312 "behaviour" : "CONTAINER_UNPACK", 313 "behaviour" : "CONTAINER_UNPACK",
313 "container_type" : "OBJ_CONTAINER" 314 "container_type" : "OBJ_CONTAINER"
314 }, 315 },
315 { 316 {
316 "token" : "elm_obj_table_pack_set", 317 "token" : "elm_obj_table_pack_set",
317 "name" : "table_pack_set", 318 "name" : "pack",
318 "group" : "GROUP_CONTAINER", 319 "group" : "GROUP_CONTAINER",
319 "behaviour" : "CONTAINER_REPACK", 320 "behaviour" : "CONTAINER_REPACK",
320 "container_type" : "OBJ_CONTAINER" 321 "container_type" : "OBJ_CONTAINER"
321 }, 322 },
322 { 323 {
323 "token" : "elm_obj_table_clear", 324 "token" : "elm_obj_table_clear",
324 "name" : "table_clear", 325 "name" : "clear",
325 "group" : "GROUP_CONTAINER", 326 "group" : "GROUP_CONTAINER",
326 "behaviour" : "CONTAINER_UNPACK_ALL", 327 "behaviour" : "CONTAINER_UNPACK_ALL",
327 "container_type" : "OBJ_CONTAINER" 328 "container_type" : "OBJ_CONTAINER"
328 }, 329 },
329 { 330 {
330 "token" : "elm_obj_table_padding_set", 331 "token" : "elm_obj_table_padding_set",
331 "name" : "table_padding", 332 "name" : "padding",
332 "display_name" : "Padding" 333 "display_name" : "Padding"
333 }, 334 },
334 { 335 {
@@ -343,12 +344,12 @@
343 }, 344 },
344 { 345 {
345 "token" : "elm_obj_layout_file_set", 346 "token" : "elm_obj_layout_file_set",
346 "name" : "layout_file_set", 347 "name" : "layout_file",
347 "display_name" : "Layout File" 348 "display_name" : "Layout File"
348 }, 349 },
349 { 350 {
350 "token" : "elm_obj_win_focus_highlight_enabled_set", 351 "token" : "elm_obj_win_focus_highlight_enabled_set",
351 "name" : "win_focus_highlight_enabled_set", 352 "name" : "win_focus_highlight_enabled",
352 "display_name" : "Focus Highlight Enabled" 353 "display_name" : "Focus Highlight Enabled"
353 }, 354 },
354 { 355 {
@@ -365,6 +366,11 @@
365 "token" : "elm_obj_toolbar_icon_size_set", 366 "token" : "elm_obj_toolbar_icon_size_set",
366 "name" : "icon_size", 367 "name" : "icon_size",
367 "display_name" : "Icon Size" 368 "display_name" : "Icon Size"
369 },
370 {
371 "token" : "elm_obj_hoversel_hover_parent_set",
372 "name" : "hover_parent",
373 "display_name" : "Hover Parent"
368 } 374 }
369 ], 375 ],
370 376
diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt
index 443f2bb..18676ab 100644
--- a/src/bin/CMakeLists.txt
+++ b/src/bin/CMakeLists.txt
@@ -13,6 +13,7 @@ add_executable(${TARGET} main.c)
13 13
14include_directories( 14include_directories(
15 ${EINA_INCLUDE_DIRS} 15 ${EINA_INCLUDE_DIRS}
16 ${EOLIAN_INCLUDE_DIRS}
16 ${ECORE_INCLUDE_DIRS} 17 ${ECORE_INCLUDE_DIRS}
17 ${EVAS_INCLUDE_DIRS} 18 ${EVAS_INCLUDE_DIRS}
18 ${ELEMENTARY_INCLUDE_DIRS} 19 ${ELEMENTARY_INCLUDE_DIRS}
@@ -21,10 +22,12 @@ include_directories(
21target_link_libraries (${TARGET} 22target_link_libraries (${TARGET}
22 guiparser 23 guiparser
23 ${EINA_LIBRARIES} 24 ${EINA_LIBRARIES}
25 ${EOLIAN_LIBRARIES}
24 ${ECORE_LIBRARIES} 26 ${ECORE_LIBRARIES}
25 ${EVAS_LIBRARIES} 27 ${EVAS_LIBRARIES}
26 ${ELEMENTARY_LIBRARIES} 28 ${ELEMENTARY_LIBRARIES}
27 ecore_file 29 ecore_file
30 pthread
28 ) 31 )
29 32
30# Save current dir because we want to know path to soutce file to build egui 33# Save current dir because we want to know path to soutce file to build egui
diff --git a/src/bin/egui_gui/CMakeLists.txt b/src/bin/egui_gui/CMakeLists.txt
index 4f4402b..6d21f00 100644
--- a/src/bin/egui_gui/CMakeLists.txt
+++ b/src/bin/egui_gui/CMakeLists.txt
@@ -46,6 +46,8 @@ add_executable(${TARGET}
46 propview.c 46 propview.c
47 itemview.c 47 itemview.c
48 seqview.c 48 seqview.c
49 rmview.c
50 settings_view.c
49 editor.c 51 editor.c
50 ) 52 )
51 53
@@ -71,6 +73,7 @@ target_link_libraries (${TARGET}
71 ${GVC_LIBRARIES} 73 ${GVC_LIBRARIES}
72 ${CGRAPH_LIBRARIES} 74 ${CGRAPH_LIBRARIES}
73 ecore_file 75 ecore_file
76 pthread
74 ) 77 )
75 78
76#copy egui from /build/egui_gui/ to /build 79#copy egui from /build/egui_gui/ to /build
@@ -97,10 +100,11 @@ add_executable(${TARGET2}
97 propview.c 100 propview.c
98 itemview.c 101 itemview.c
99 seqview.c 102 seqview.c
103 rmview.c
104 settings_view.c
100 editor.c) 105 editor.c)
101# add this dependency to force build one after another, 106# add this dependency to force build one after another,
102# in order to delete and generate files in proper order 107# in order to delete and generate files in proper order
103add_dependencies(${TARGET2} ${TARGET})
104add_dependencies(${TARGET2} delete_files) 108add_dependencies(${TARGET2} delete_files)
105add_dependencies(${TARGET2} egui_cmd) 109add_dependencies(${TARGET2} egui_cmd)
106 110
@@ -114,7 +118,7 @@ add_custom_command (
114 OUTPUT tmp/egui_layout.c tmp/egui_layout.h 118 OUTPUT tmp/egui_layout.c tmp/egui_layout.h
115 COMMENT "Generating gui layout from JSON" 119 COMMENT "Generating gui layout from JSON"
116 COMMAND ${CMAKE_COMMAND} -E make_directory tmp 120 COMMAND ${CMAKE_COMMAND} -E make_directory tmp
117 COMMAND ${EGUI_BINARY_BLD}/egui_cmd -f ${CMAKE_CURRENT_SOURCE_DIR}/egui_layout_c.json -g -o egui_layout -p ./tmp 121 COMMAND ${EGUI_BINARY_BLD}/egui_cmd -f ${CMAKE_CURRENT_SOURCE_DIR}/egui_layout_c.json -e c -o egui_layout -p ./tmp
118 ) 122 )
119 123
120target_link_libraries (${TARGET2} 124target_link_libraries (${TARGET2}
@@ -126,6 +130,7 @@ target_link_libraries (${TARGET2}
126 ${GVC_LIBRARIES} 130 ${GVC_LIBRARIES}
127 ${CGRAPH_LIBRARIES} 131 ${CGRAPH_LIBRARIES}
128 ecore_file 132 ecore_file
133 pthread
129 ) 134 )
130 135
131#copy egui_auto from /build/egui_gui/tmp to /build 136#copy egui_auto from /build/egui_gui/tmp to /build
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index f524310..4c156b6 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -7,19 +7,15 @@
7#include "objtree.h" 7#include "objtree.h"
8#include "propview.h" 8#include "propview.h"
9#include "itemview.h" 9#include "itemview.h"
10#include "seqview.h"
11#include "gui_parser.h" 10#include "gui_parser.h"
12#include "egui_logic_private.h" 11#include "egui_logic_private.h"
13 12
14#include <Elementary.h> 13#include <Elementary.h>
15#include "elm_widget.h" 14#include "elm_widget.h"
16 15
17#define SELECTED_WDG "slctd_wdg"
18#define WIN_INFO "win_info_key" 16#define WIN_INFO "win_info_key"
19#define DEP_PROP_LIST "dependent_property_list_key"
20 17
21static Gui_Context *_active_ctx = NULL; 18static Gui_Context *_active_ctx = NULL;
22static It_Data_Type _propsview_toolbar_selected_item_type = DESCRIPTION_TYPE;
23static const GUI *g; 19static const GUI *g;
24 20
25void 21void
@@ -33,9 +29,6 @@ _active_context_get()
33{ 29{
34 return _active_ctx; 30 return _active_ctx;
35} 31}
36/* function to resolve dependency between action and widget when deleting widget.*/
37extern Eina_Bool
38_action_dep_resolve(Gui_Action *action, Eina_Bool adding, Dep_Mode mode);
39 32
40typedef enum { 33typedef enum {
41 BORDER_OUT = 0, 34 BORDER_OUT = 0,
@@ -80,108 +73,8 @@ win_info_frame_get(const Win_Info *wi)
80 return wi->frame; 73 return wi->frame;
81} 74}
82 75
83/*This is a helper to add/delete dependent properties to/from widget.
84 * Func is called when property is activated or deleted.*/
85static Eina_Bool
86_prop_dep_resolve(Gui_Widget_Property *prop, Eina_Bool adding)
87{
88 EINA_SAFETY_ON_NULL_RETURN_VAL(prop, EINA_FALSE);
89
90 Eina_List *values_lst, *itr;
91 Gui_Value *gui_value;
92
93 values_lst = prop_value_get(prop);
94
95 EINA_LIST_FOREACH(values_lst, itr, gui_value)
96 {
97 if (gui_value_type_get(gui_value) == GUI_TYPE_OBJECT)
98 {
99 char *wdg_name = gui_value_string_get(gui_value);
100 Gui_Widget *w = wdg_get(wdg_context_get(prop_wdg_get(prop)), wdg_name);
101 if (!w)
102 {
103 ERR("Somehow widget '%s' doesn't exist", wdg_name);
104 return EINA_TRUE;
105 }
106 Eina_List *dep_props_list = wdg_data_get(w, DEP_PROP_LIST);
107 if (adding)
108 {
109 dep_props_list = eina_list_append(dep_props_list, prop);
110 }
111 else
112 {
113 if (eina_list_data_find(dep_props_list, prop))
114 {
115 dep_props_list = eina_list_remove(dep_props_list, prop);
116 }
117 }
118 wdg_data_set(w, DEP_PROP_LIST, dep_props_list);
119 }
120 }
121 return EINA_TRUE;
122}
123
124/* Iterate over each dependent property and delete it from its widget.
125 * T.e. when deleting button, "pack_end" will be dependent property.
126 * So delete this property from box.*/
127static void 76static void
128_wdg_dep_del(Gui_Widget *wdg) 77_canvas_free_coords_get(const Gui_Context *ctx, Evas_Coord *x, Evas_Coord *y)
129{
130 Gui_Widget_Property *prop;
131 Eina_List *lst = wdg_data_get(wdg, DEP_PROP_LIST);
132 Eina_List *itr, *itr_next;
133 wdg_data_set(wdg, DEP_PROP_LIST, NULL);
134
135 /* Iterate over each dependency, and delete this prop from each widget */
136 /* Make FOREACH_SAFE, because _prop_dep_resolve removes items from this list*/
137 EINA_LIST_FOREACH_SAFE(lst, itr, itr_next, prop)
138 {
139 Gui_Widget *w;
140 _prop_dep_resolve(prop, EINA_FALSE);
141 w = (Gui_Widget *) prop_wdg_get(prop);
142 wdg_prop_del(w, prop);
143 }
144 eina_list_free(lst);
145
146 /* Iterate over each property;
147 * and delete dependencies from each widget, which depend on this prop. */
148 lst = wdg_prop_list_get(wdg);
149 EINA_LIST_FOREACH(lst, itr, prop)
150 {
151 _prop_dep_resolve(prop, EINA_FALSE);
152 }
153
154 /* Iterate over actions, widget depends on. */
155 Gui_Action *action;
156 lst = wdg_data_get(wdg, DEP_ACTION_LIST);
157 EINA_LIST_FOREACH_SAFE(lst, itr, itr_next, action)
158 {
159 /* Delete action like in func _action_del. */
160 Gui_Sequence *seq = action_sequence_get(action);
161 Eina_List *actions_list = sequence_actions_list_get(seq);
162 Elm_Object_Item *it = action_data_get(action);
163 _action_dep_resolve(action, EINA_FALSE, DEP_ALL);
164 if (eina_list_count(actions_list) > 1)
165 {
166 if (it) elm_object_item_del(it);
167 action_del(action);
168 }
169 else
170 {
171 action_reset(action);
172 if (it) elm_genlist_item_update(it);
173 }
174 }
175 /* list for this widget will be operated inside _action_dep_resolve.
176 * so need to get it one more time.
177 * Moreover this func deletes iterated action from this list, so it will be free by the end,
178 * so don't need to call eina_list_free() */
179 lst = wdg_data_get(wdg, DEP_ACTION_LIST);
180 eina_list_free(lst);
181}
182
183static void
184_canvas_free_coords_get(Gui_Context *ctx, Evas_Coord *x, Evas_Coord *y)
185{ 78{
186 Evas_Coord x0 = 340, y0 = 120, w0 = 1060, h0 = 900, retx, rety, ymax = 120; 79 Evas_Coord x0 = 340, y0 = 120, w0 = 1060, h0 = 900, retx, rety, ymax = 120;
187 Eina_List *win_list = gui_context_win_list_get(ctx); 80 Eina_List *win_list = gui_context_win_list_get(ctx);
@@ -359,9 +252,9 @@ void *event_info)
359 if (prop) 252 if (prop)
360 { 253 {
361 val = prop_value_nth_get(prop, 0); 254 val = prop_value_nth_get(prop, 0);
362 gui_value_set(val, GUI_TYPE_SINT, &ox); 255 gui_value_int_set(val, ox);
363 val = prop_value_nth_get(prop, 1); 256 val = prop_value_nth_get(prop, 1);
364 gui_value_set(val, GUI_TYPE_SINT, &oy); 257 gui_value_int_set(val, oy);
365 propview_item_update(prop); 258 propview_item_update(prop);
366 } 259 }
367 } 260 }
@@ -392,9 +285,9 @@ _frame_mouse_move(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *fr,
392 { 285 {
393 Gui_Value *val; 286 Gui_Value *val;
394 val = prop_value_nth_get(prop, 0); 287 val = prop_value_nth_get(prop, 0);
395 gui_value_set(val, GUI_TYPE_SINT, &ox); 288 gui_value_int_set(val, ox);
396 val = prop_value_nth_get(prop, 1); 289 val = prop_value_nth_get(prop, 1);
397 gui_value_set(val, GUI_TYPE_SINT, &oy); 290 gui_value_int_set(val, oy);
398 propview_item_update(prop); 291 propview_item_update(prop);
399 } 292 }
400 293
@@ -441,7 +334,7 @@ _editor_wdg_selected_set(const Gui_Widget *wdg)
441 /* Show new border*/ 334 /* Show new border*/
442 if (wdg) 335 if (wdg)
443 { 336 {
444 Gui_Context *ctx = wdg_context_get(wdg); 337 Gui_Context *ctx = (Gui_Context *) wdg_context_get(wdg);
445 gui_context_data_set(ctx, SELECTED_WDG, (Gui_Widget *) wdg); 338 gui_context_data_set(ctx, SELECTED_WDG, (Gui_Widget *) wdg);
446 339
447 Eo *obj = session_eo_get(gui_context_editor_session_get(ctx), wdg); 340 Eo *obj = session_eo_get(gui_context_editor_session_get(ctx), wdg);
@@ -501,7 +394,6 @@ _iter_widget_delete(Gui_Widget *wdg, Eina_Bool del_wdg)
501 394
502 if (del_wdg) 395 if (del_wdg)
503 { 396 {
504 _wdg_dep_del(wdg);
505 /* Need to delete this widget from container */ 397 /* Need to delete this widget from container */
506 Gui_Widget *wdg_container = wdg_data_get(wdg, CONTAINER); 398 Gui_Widget *wdg_container = wdg_data_get(wdg, CONTAINER);
507 if (wdg_container) 399 if (wdg_container)
@@ -516,9 +408,6 @@ _iter_widget_delete(Gui_Widget *wdg, Eina_Bool del_wdg)
516 * This case is for context refresh: clear list of dependencies.*/ 408 * This case is for context refresh: clear list of dependencies.*/
517 else 409 else
518 { 410 {
519 Eina_List *lst = wdg_data_get(wdg, DEP_PROP_LIST);
520 eina_list_free(lst);
521 wdg_data_set(wdg, DEP_PROP_LIST, NULL);
522 wdg_data_set(wdg, CONTAINER, NULL); 411 wdg_data_set(wdg, CONTAINER, NULL);
523 } 412 }
524} 413}
@@ -664,9 +553,9 @@ _marker_mouse_move(void *data, Eo *marker EINA_UNUSED, const Eo_Event_Descriptio
664 oh = oh - dh; 553 oh = oh - dh;
665 554
666 val = prop_value_nth_get(prop, 0); 555 val = prop_value_nth_get(prop, 0);
667 gui_value_set(val, GUI_TYPE_SINT, &ow); 556 gui_value_int_set(val, ow);
668 val = prop_value_nth_get(prop, 1); 557 val = prop_value_nth_get(prop, 1);
669 gui_value_set(val, GUI_TYPE_SINT, &oh); 558 gui_value_int_set(val, oh);
670 propview_item_update(prop); 559 propview_item_update(prop);
671 /* win has size prop, so move it through manager*/ 560 /* win has size prop, so move it through manager*/
672 manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL); 561 manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL);
@@ -682,9 +571,9 @@ _marker_mouse_move(void *data, Eo *marker EINA_UNUSED, const Eo_Event_Descriptio
682 if (prop) 571 if (prop)
683 { 572 {
684 val = prop_value_nth_get(prop, 0); 573 val = prop_value_nth_get(prop, 0);
685 gui_value_set(val, GUI_TYPE_SINT, &ow); 574 gui_value_int_set(val, ow);
686 val = prop_value_nth_get(prop, 1); 575 val = prop_value_nth_get(prop, 1);
687 gui_value_set(val, GUI_TYPE_SINT, &oh); 576 gui_value_int_set(val, oh);
688 propview_item_update(prop); 577 propview_item_update(prop);
689 } 578 }
690 579
@@ -692,9 +581,9 @@ _marker_mouse_move(void *data, Eo *marker EINA_UNUSED, const Eo_Event_Descriptio
692 if (prop) 581 if (prop)
693 { 582 {
694 val = prop_value_nth_get(prop, 0); 583 val = prop_value_nth_get(prop, 0);
695 gui_value_set(val, GUI_TYPE_SINT, &ox); 584 gui_value_int_set(val, ox);
696 val = prop_value_nth_get(prop, 1); 585 val = prop_value_nth_get(prop, 1);
697 gui_value_set(val, GUI_TYPE_SINT, &oy); 586 gui_value_int_set(val, oy);
698 propview_item_update(prop); 587 propview_item_update(prop);
699 } 588 }
700 } 589 }
@@ -825,11 +714,6 @@ _iter_widget_create(Gui_Widget *wdg, const Eo *parent_win)
825 Eina_List *children = NULL, *l; 714 Eina_List *children = NULL, *l;
826 Gui_Widget *w; 715 Gui_Widget *w;
827 716
828 if (wdg_state_get(wdg) < STATE_VALIDATED)
829 {
830 ERR("Widget: \"%s\" was not validated, so can't be simulated.", wdg_name_get(wdg));
831 return;
832 }
833 /* Windows are iterated separately. If parent is NULL, means that current object is not win. 717 /* Windows are iterated separately. If parent is NULL, means that current object is not win.
834 * If iterated object is win, I create it as inlined_image and add frame to simulate win.*/ 718 * If iterated object is win, I create it as inlined_image and add frame to simulate win.*/
835 Eina_Bool created; 719 Eina_Bool created;
@@ -927,25 +811,22 @@ _win_resize(void *data EINA_UNUSED, Eo *o, const Eo_Event_Description *desc EINA
927} 811}
928 812
929static Eina_Bool 813static Eina_Bool
930_widget_prop_add(Gui_Session *session, const Gui_Widget *wdg, void *_prop, void *data EINA_UNUSED) 814_widget_prop_add(Gui_Session *session, const Gui_Widget *wdg, const Gui_Widget_Property *prop, void *data EINA_UNUSED)
931{ 815{
932 Eina_Bool ret = _ffi_eo_do(session, wdg, _prop); 816 Eina_Bool ret = _ffi_eo_do(session, wdg, prop);
933 if (ret)
934 {
935 _prop_dep_resolve(_prop, EINA_TRUE);
936 }
937 817
938 if (IS_WIN(wdg)) 818 if (IS_WIN(wdg))
939 { 819 {
940 Eo *fr = NULL, *o = session_eo_get(session, wdg); 820 Eo *fr = NULL, *o = session_eo_get(session, wdg);
941 eo_do(o, fr = eo_key_data_get("frame")); 821 eo_do(o, fr = eo_key_data_get("frame"));
942 822
943 if (!strcmp(prop_name_get(_prop), TITLE_SET)) 823 if (!strcmp(prop_name_get(prop), TITLE_SET))
944 { 824 {
945 char *title = WDG_NTH_VALUE_STRING_GET(wdg, TITLE_SET, 0); 825 Gui_Value *v = prop_value_nth_get(wdg_prop_get(wdg, TITLE_SET), 0);
826 const char *title = STRING_GET(v);
946 eo_do(fr, elm_obj_widget_part_text_set(NULL, title)); 827 eo_do(fr, elm_obj_widget_part_text_set(NULL, title));
947 } 828 }
948 else if (!strcmp(prop_name_get(_prop), VISIBILITY_SET)) 829 else if (!strcmp(prop_name_get(prop), VISIBILITY_SET))
949 { 830 {
950 Eina_Bool visibility; 831 Eina_Bool visibility;
951 eo_do(o, visibility = evas_obj_visibility_get()); 832 eo_do(o, visibility = evas_obj_visibility_get());
@@ -975,7 +856,7 @@ _widget_item_add(Gui_Session *session, const Gui_Widget *wdg, const Gui_Widget_I
975} 856}
976 857
977static Eina_Bool 858static Eina_Bool
978_content_set(Gui_Session *session, const Gui_Widget *container, Gui_Widget_Property *prop, void *data EINA_UNUSED) 859_content_set(Gui_Session *session, const Gui_Widget *container, const Gui_Widget_Property *prop, void *data EINA_UNUSED)
979{ 860{
980 Eina_Bool ret = _ffi_eo_do_content(session, container, prop, prop_op_desc_get(prop)); 861 Eina_Bool ret = _ffi_eo_do_content(session, container, prop, prop_op_desc_get(prop));
981 862
@@ -995,8 +876,8 @@ _content_set(Gui_Session *session, const Gui_Widget *container, Gui_Widget_Prope
995 * For example: 876 * For example:
996 * container is "Box"; 877 * container is "Box";
997 * w is "Button" */ 878 * w is "Button" */
998 char *wdg_name = gui_value_string_get(value); 879 Dep_Id dep_id = DEP_ID_GET(value);
999 Gui_Widget *w = wdg_get(wdg_context_get(container), wdg_name); 880 Gui_Widget *w = wdg_get(wdg_context_get(container), dep_id);
1000 wdg_data_set(w, CONTAINER, (void *) container); 881 wdg_data_set(w, CONTAINER, (void *) container);
1001 } 882 }
1002 } 883 }
@@ -1117,8 +998,6 @@ _widget_add(Gui_Session *session, const Gui_Widget *wdg, void *data)
1117 998
1118 eo_unref(o); 999 eo_unref(o);
1119 session_eo_set(session, wdg, o); 1000 session_eo_set(session, wdg, o);
1120 Eina_List *lst = NULL;
1121 wdg_data_set(wdg, DEP_PROP_LIST, lst);
1122 return EINA_TRUE; 1001 return EINA_TRUE;
1123} 1002}
1124 1003
@@ -1168,6 +1047,7 @@ _editor_ctx_call(const Gui_Context *ctx)
1168 * It will draw border around win, but widget was not selected yet. 1047 * It will draw border around win, but widget was not selected yet.
1169 * So need to hide border. */ 1048 * So need to hide border. */
1170 _editor_wdg_selected_set(NULL); 1049 _editor_wdg_selected_set(NULL);
1050 propview_build(NULL);
1171 return EINA_TRUE; 1051 return EINA_TRUE;
1172} 1052}
1173 1053
@@ -1207,7 +1087,7 @@ _editor_selected_wdg_del_cb()
1207 { 1087 {
1208 _wdg_parent_win_reload(parent_wdg); 1088 _wdg_parent_win_reload(parent_wdg);
1209 } 1089 }
1210 propview_build(NULL, _propsview_toolbar_selected_item_type); 1090 propview_build(NULL);
1211 /*close objtree list*/ 1091 /*close objtree list*/
1212 objtree_item_contracted_set(NULL); 1092 objtree_item_contracted_set(NULL);
1213 /* Set selected widget: t.e. if I delete button, box will be selected after. 1093 /* Set selected widget: t.e. if I delete button, box will be selected after.
@@ -1242,9 +1122,9 @@ _editor_factory_wdg_create(const char *class_name)
1242 1122
1243 char *new_name = gui_context_free_name_get(ctx, class_name); 1123 char *new_name = gui_context_free_name_get(ctx, class_name);
1244 1124
1245 wdg = wdg_new(new_name, class_name); 1125 Dep_Id dep_id = gui_context_dep_data_set(ctx, new_name);
1126 wdg = wdg_new(ctx, class_name, dep_id);
1246 free(new_name); 1127 free(new_name);
1247 wdg_append(ctx, wdg);
1248 wdg_parent_set(wdg, parent_name); 1128 wdg_parent_set(wdg, parent_name);
1249 1129
1250 /*Add default visibility property*/ 1130 /*Add default visibility property*/
@@ -1255,47 +1135,60 @@ _editor_factory_wdg_create(const char *class_name)
1255 op = db_mro_op_desc_get(class_name, VISIBILITY_SET); 1135 op = db_mro_op_desc_get(class_name, VISIBILITY_SET);
1256 prop = prop_create_for_op(op); 1136 prop = prop_create_for_op(op);
1257 val = prop_value_nth_get(prop, 0); 1137 val = prop_value_nth_get(prop, 0);
1258 gui_value_set(val, GUI_TYPE_BOOL, &b); 1138 gui_value_bool_set(val, b);
1259 wdg_prop_add(wdg, prop); 1139 wdg_prop_add(wdg, prop);
1260 1140
1261 if (IS_WIN(wdg)) 1141 if (IS_WIN(wdg))
1262 { 1142 {
1263 /* By default, the window is created in the first action */ 1143 /* By default, the window is created in the first action */
1264 Gui_Sequence *seq = sequence_get(ctx, "BigBang"); 1144 Dep_Id seq_id = gui_context_dep_data_get_id_by_name(ctx, BIGBANG_STR);
1145 if (!seq_id)
1146 {
1147 Gui_Resource *gui_res = gui_context_resource_new((Gui_Context *) ctx, RESOURCE_SEQUENCE, BIGBANG_STR);
1148 if (!gui_res)
1149 {
1150 ERR("Cannot create resource of type: %d", RESOURCE_SEQUENCE);
1151 }
1152 resource_value_set(gui_res, BIGBANG_STR);
1153 seq_id = gui_context_dep_data_get_id_by_name(ctx, BIGBANG_STR);
1154 }
1155 Gui_Sequence *seq = sequence_get(ctx, seq_id);
1265 /* Generate BigBand action if does not exist */ 1156 /* Generate BigBand action if does not exist */
1266 if (!seq) seq = sequence_new(ctx, "BigBang"); 1157 if (!seq)
1158 {
1159 seq = sequence_new(ctx, seq_id);
1160 }
1267 Gui_Action *action = action_new(seq); 1161 Gui_Action *action = action_new(seq);
1268 action_creation_set(action, wdg_name_get(wdg)); 1162 action_creation_set(action, wdg_dep_id_get(wdg));
1269 _action_dep_resolve(action, EINA_TRUE, DEP_ACTION);
1270 seqview_fill(ctx); 1163 seqview_fill(ctx);
1271 1164
1272 op = db_mro_op_desc_get(class_name, CONSTRUCTOR); 1165 op = db_mro_op_desc_get(class_name, CONSTRUCTOR);
1273 prop = prop_create_for_op(op); 1166 prop = prop_create_for_op(op);
1274 val = prop_value_nth_get(prop, 0); 1167 val = prop_value_nth_get(prop, 0);
1275 gui_value_set(val, GUI_TYPE_STRING, ELM_OBJ_WIN_CONSTRUCTOR); 1168 gui_value_string_set(val, strdup(ELM_OBJ_WIN_CONSTRUCTOR));
1276 wdg_prop_add(wdg, prop); 1169 wdg_prop_add(wdg, prop);
1277 1170
1278 op = db_mro_op_desc_get(class_name, ELM_OBJ_WIN_CONSTRUCTOR); 1171 op = db_mro_op_desc_get(class_name, ELM_OBJ_WIN_CONSTRUCTOR);
1279 prop = prop_create_for_op(op); 1172 prop = prop_create_for_op(op);
1280 val = prop_value_nth_get(prop, 0); 1173 val = prop_value_nth_get(prop, 0);
1281 gui_value_set(val, GUI_TYPE_NULL, NULL); 1174 gui_value_string_set(val, NULL);
1282 val = prop_value_nth_get(prop, 1); 1175 val = prop_value_nth_get(prop, 1);
1283 gui_value_set(val, GUI_TYPE_ENUM, "ELM_WIN_BASIC"); 1176 gui_value_string_set(val, strdup("ELM_WIN_BASIC"));
1284 wdg_prop_add(wdg, prop); 1177 wdg_prop_add(wdg, prop);
1285 1178
1286 int i = 200; 1179 int i = 200;
1287 op = db_mro_op_desc_get(class_name, SIZE_SET); 1180 op = db_mro_op_desc_get(class_name, SIZE_SET);
1288 prop = prop_create_for_op(op); 1181 prop = prop_create_for_op(op);
1289 val = prop_value_nth_get(prop, 0); 1182 val = prop_value_nth_get(prop, 0);
1290 gui_value_set(val, GUI_TYPE_SINT, &i); 1183 gui_value_int_set(val, i);
1291 val = prop_value_nth_get(prop, 1); 1184 val = prop_value_nth_get(prop, 1);
1292 gui_value_set(val, GUI_TYPE_SINT, &i); 1185 gui_value_int_set(val, i);
1293 wdg_prop_add(wdg, prop); 1186 wdg_prop_add(wdg, prop);
1294 1187
1295 op = db_mro_op_desc_get(class_name, TITLE_SET); 1188 op = db_mro_op_desc_get(class_name, TITLE_SET);
1296 prop = prop_create_for_op(op); 1189 prop = prop_create_for_op(op);
1297 val = prop_value_nth_get(prop, 0); 1190 val = prop_value_nth_get(prop, 0);
1298 gui_value_set(val, GUI_TYPE_STRING, wdg_name_get(wdg)); 1191 gui_value_string_set(val, strdup(gui_context_dep_data_get(ctx, wdg_dep_id_get(wdg))));
1299 wdg_prop_add(wdg, prop); 1192 wdg_prop_add(wdg, prop);
1300 } 1193 }
1301 else 1194 else
@@ -1303,9 +1196,9 @@ _editor_factory_wdg_create(const char *class_name)
1303 op = db_mro_op_desc_get(class_name, PART_TEXT_SET); 1196 op = db_mro_op_desc_get(class_name, PART_TEXT_SET);
1304 prop = prop_create_for_op(op); 1197 prop = prop_create_for_op(op);
1305 val = prop_value_nth_get(prop, 0); 1198 val = prop_value_nth_get(prop, 0);
1306 gui_value_set(val, GUI_TYPE_NULL, NULL); 1199 gui_value_string_set(val, NULL);
1307 val = prop_value_nth_get(prop, 1); 1200 val = prop_value_nth_get(prop, 1);
1308 gui_value_set(val, GUI_TYPE_STRING, wdg_name_get(wdg)); 1201 gui_value_string_set(val, strdup(wdg_name_get(wdg)));
1309 wdg_prop_add(wdg, prop); 1202 wdg_prop_add(wdg, prop);
1310 1203
1311#if 0 1204#if 0
@@ -1335,14 +1228,12 @@ _editor_factory_wdg_create(const char *class_name)
1335 op = db_mro_op_desc_get(class_name, SIZE_HINT_WEIGHT_SET); 1228 op = db_mro_op_desc_get(class_name, SIZE_HINT_WEIGHT_SET);
1336 prop = prop_create_for_op(op); 1229 prop = prop_create_for_op(op);
1337 val = prop_value_nth_get(prop, 0); 1230 val = prop_value_nth_get(prop, 0);
1338 gui_value_set(val, GUI_TYPE_DOUBLE, &d); 1231 gui_value_double_set(val, d);
1339 val = prop_value_nth_get(prop, 1); 1232 val = prop_value_nth_get(prop, 1);
1340 gui_value_set(val, GUI_TYPE_DOUBLE, &d); 1233 gui_value_double_set(val, d);
1341 wdg_prop_add(wdg, prop); 1234 wdg_prop_add(wdg, prop);
1342 } 1235 }
1343 1236
1344 wdg_validate(wdg);
1345
1346 Eo *pw = NULL; 1237 Eo *pw = NULL;
1347 if (IS_WIN(wdg)) pw = (Eo *)canvas_get(); 1238 if (IS_WIN(wdg)) pw = (Eo *)canvas_get();
1348 manager_widget_create(session, wdg, MODE_EDITOR, pw); 1239 manager_widget_create(session, wdg, MODE_EDITOR, pw);
@@ -1358,10 +1249,10 @@ _editor_factory_wdg_create(const char *class_name)
1358 { 1249 {
1359 char menu_name[20] = {'\0'}; 1250 char menu_name[20] = {'\0'};
1360 sprintf(menu_name, "%s_%s", wdg_name_get(wdg), "main_menu"); 1251 sprintf(menu_name, "%s_%s", wdg_name_get(wdg), "main_menu");
1361 Gui_Widget *mmenu = wdg_new(menu_name, DB_DEF_MENU_CLASS); 1252 dep_id = gui_context_dep_data_set(ctx, menu_name);
1362 wdg_append(ctx, mmenu); 1253
1254 Gui_Widget *mmenu = wdg_new(ctx, DB_DEF_MENU_CLASS, dep_id);
1363 wdg_parent_set(mmenu, wdg_name_get(wdg)); 1255 wdg_parent_set(mmenu, wdg_name_get(wdg));
1364 wdg_validate(mmenu);
1365 1256
1366 manager_widget_create(session, mmenu, MODE_EDITOR, NULL); 1257 manager_widget_create(session, mmenu, MODE_EDITOR, NULL);
1367 manager_widget_configure(session, mmenu, MODE_EDITOR, NULL); 1258 manager_widget_configure(session, mmenu, MODE_EDITOR, NULL);
@@ -1373,16 +1264,28 @@ _editor_shutdown()
1373{ 1264{
1374 target_db_shutdown(); 1265 target_db_shutdown();
1375 seqview_shutdown(); 1266 seqview_shutdown();
1376 propview_scrollbox_unset(); 1267 propview_shutdown();
1268 itemview_shutdown();
1377 objtree_list_unset(); 1269 objtree_list_unset();
1270
1271 void *p = (void *) propview_cbs_get();
1272 free(p);
1273 /* FIXME: check: _editor_shutdown is located in guilogic pointers.
1274 * Check, that this is ok. */
1275 p = (void *) guilogic_cbs_get();
1276 free(p);
1277 p = (void *) objtree_cbs_get();
1278 free(p);
1279 p = (void *) itemview_cbs_get();
1280 free(p);
1378} 1281}
1379 1282
1380/* onChange callback for all properties edit fields. 1283/* onChange callback for all properties edit fields.
1381 * If currently there is no such property in the widget, it will be added. 1284 * If currently there is no such property in the widget, it will be added.
1382 * The given object is the one created in the properties view for each parameter. 1285 * The given object is the one created in the properties view for each parameter.
1383 */ 1286 */
1384static void 1287static Eina_Bool
1385_prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info) 1288_prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
1386{ 1289{
1387 Par_Field_Data *pfd = NULL; 1290 Par_Field_Data *pfd = NULL;
1388 const Eo_Class *kl = eo_class_get(obj); 1291 const Eo_Class *kl = eo_class_get(obj);
@@ -1398,7 +1301,7 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info)
1398 eo_do(obj, pfd = eo_key_data_get("editor")); 1301 eo_do(obj, pfd = eo_key_data_get("editor"));
1399 op = pfd->it_data->op_desc; 1302 op = pfd->it_data->op_desc;
1400 wdg = pfd->it_data->wdg; 1303 wdg = pfd->it_data->wdg;
1401 prop = pfd->it_data->prop; 1304 prop = (Gui_Widget_Property *)pfd->it_data->prop;
1402 idx = pfd->par_idx; 1305 idx = pfd->par_idx;
1403 1306
1404 /* If property doesn't exist, create it with some default values. */ 1307 /* If property doesn't exist, create it with some default values. */
@@ -1421,50 +1324,64 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info)
1421 { 1324 {
1422 /* FIXME: part_text_set can receive NULL as parameter. 1325 /* FIXME: part_text_set can receive NULL as parameter.
1423 * But because of this, I can't write "null"*/ 1326 * But because of this, I can't write "null"*/
1424 if (!strcmp(entry_data, "null")) 1327 if (!strcmp(entry_data, ""))
1425 { 1328 {
1426 gui_value_set(val, GUI_TYPE_NULL, NULL); 1329 gui_value_string_free(val);
1330 gui_value_string_set(val, NULL);
1427 } 1331 }
1428 else 1332 else
1429 { 1333 {
1430 gui_value_type_set(val, type); 1334 gui_value_string_free(val);
1431 gui_value_string_set(val, entry_data); 1335 gui_value_string_set(val, strdup(entry_data));
1432 } 1336 }
1433 } 1337 }
1434 else if (type == GUI_TYPE_SINT) 1338 else if (type == GUI_TYPE_SINT)
1435 { 1339 {
1436 int number = atoi(entry_data); 1340 int number = atoi(entry_data);
1437 gui_value_set(val, type, &number); 1341 gui_value_int_set(val, number);
1438 } 1342 }
1439 else if (type == GUI_TYPE_DOUBLE) 1343 else if (type == GUI_TYPE_DOUBLE)
1440 { 1344 {
1441 double number = atof(entry_data); 1345 double number = atof(entry_data);
1442 gui_value_set(val, type, &number); 1346 gui_value_double_set(val, number);
1443 } 1347 }
1444 } 1348 }
1445 if (kl == ELM_OBJ_CHECK_CLASS) 1349 if (kl == ELM_OBJ_CHECK_CLASS)
1446 { 1350 {
1447 Eina_Bool state; 1351 Eina_Bool state;
1448 eo_do(obj, state = elm_obj_check_state_get()); 1352 eo_do(obj, state = elm_obj_check_state_get());
1449 gui_value_set(val, type, &state); 1353 gui_value_bool_set(val, state);
1450 } 1354 }
1451 if (kl == ELM_OBJ_HOVERSEL_CLASS) 1355 if (kl == ELM_OBJ_HOVERSEL_CLASS)
1452 { 1356 {
1453 const char *new_enum_value = elm_object_item_part_text_get(event_info, NULL); 1357 const char *new_enum_value = elm_object_item_part_text_get(event_info, NULL);
1454 /* Set selected string on hover */ 1358 const char *old_enum_value = NULL;
1455 elm_object_text_set(obj, new_enum_value); 1359 eo_do(obj, old_enum_value = elm_obj_widget_part_text_get(NULL));
1360
1361 if (!strcmp(old_enum_value, new_enum_value))
1362 {
1363 goto end;
1364 }
1456 /* Get new value depending on type of edit field. 1365 /* Get new value depending on type of edit field.
1457 * And update value. */ 1366 * And update value. */
1458 if (type == GUI_TYPE_ENUM) 1367 if (type == GUI_TYPE_ENUM)
1459 { 1368 {
1460 gui_value_set(val, type, (void *) new_enum_value); 1369 gui_value_string_free(val);
1370 gui_value_enum_set(val, strdup(new_enum_value));
1461 } 1371 }
1462 /* FIXME: there is problem with content_set; because prev content must be unset; or need to redraw from the beginning*/ 1372 /* FIXME: there is problem with content_set; because prev content must be unset; or need to redraw from the beginning*/
1463 else if (type == GUI_TYPE_OBJECT) 1373 else if (type == GUI_TYPE_OBJECT)
1464 { 1374 {
1465 const char *cur_param = gui_value_string_get(val); 1375 Dep_Id old_dep_id = (uintptr_t) DEP_ID_GET(val);
1466 Gui_Widget *cur_param_wdg = wdg_get(_active_context_get(), cur_param); 1376 Dep_Id new_dep_id = gui_context_dep_data_get_id_by_name(_active_context_get(), new_enum_value);
1467 Gui_Widget *new_param_wdg = wdg_get(_active_context_get(), new_enum_value); 1377 if (!new_dep_id)
1378 {
1379 ERR("Resource not exist for: \"%s\"", new_enum_value);
1380 }
1381 /* FIXME: need to check if widget wasn't deleted yet*/
1382 const char *cur_param = gui_context_dep_data_get(_active_context_get(), old_dep_id);
1383 Gui_Widget *cur_param_wdg = wdg_get(_active_context_get(), old_dep_id);
1384 Gui_Widget *new_param_wdg = wdg_get(_active_context_get(), new_dep_id);
1468 /* GUI_TYPE_OBJECT ops depend on other widgets, check that widget exists. 1385 /* GUI_TYPE_OBJECT ops depend on other widgets, check that widget exists.
1469 * or new one not equal old one.*/ 1386 * or new one not equal old one.*/
1470 if ((!new_param_wdg) || (cur_param_wdg == new_param_wdg)) 1387 if ((!new_param_wdg) || (cur_param_wdg == new_param_wdg))
@@ -1473,8 +1390,7 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info)
1473 } 1390 }
1474 /* If I simply change value in prop: t.e. "but1"->"but2" change parent of "but1".*/ 1391 /* If I simply change value in prop: t.e. "but1"->"but2" change parent of "but1".*/
1475 /* and change dependencies. */ 1392 /* and change dependencies. */
1476 _prop_dep_resolve(prop, EINA_FALSE); 1393 gui_value_name_id_set(val, type, new_dep_id);
1477 gui_value_set(val, type, (void *) new_enum_value);
1478 1394
1479 /* Update parent, if op supports it. */ 1395 /* Update parent, if op supports it. */
1480 if (db_op_desc_flag_get(op) & UPDATE_PARENT) 1396 if (db_op_desc_flag_get(op) & UPDATE_PARENT)
@@ -1494,17 +1410,21 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info)
1494 { 1410 {
1495 if (!strcmp(new_enum_value, PROP_HOVERSEL_NONE_VALUE)) 1411 if (!strcmp(new_enum_value, PROP_HOVERSEL_NONE_VALUE))
1496 { 1412 {
1497 gui_value_set(val, type, NULL); 1413 gui_value_name_id_set(val, type, 0);
1498 } 1414 }
1499 else 1415 else
1500 { 1416 {
1501 gui_value_set(val, type, (void *) new_enum_value); 1417 Dep_Id new_id = gui_context_dep_data_get_id_by_name(_active_context_get(), new_enum_value);
1418 gui_value_name_id_set(val, type, new_id);
1502 } 1419 }
1503 } 1420 }
1504 else 1421 else
1505 { 1422 {
1506 ERR("Type '%s' is not handled in HOVERSEL", db_gui_type_name_get(type)); 1423 ERR("Type '%s' is not handled in HOVERSEL", db_gui_type_name_get(type));
1507 } 1424 }
1425
1426 /* Set selected string on hover */
1427 eo_do(obj, elm_obj_widget_part_text_set(NULL, new_enum_value));
1508 } 1428 }
1509 1429
1510 if (prop_add) 1430 if (prop_add)
@@ -1514,57 +1434,55 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, void *event_info)
1514 } 1434 }
1515 /* Validate property and call for eo_func of current prop, 1435 /* Validate property and call for eo_func of current prop,
1516 * in order to update layout. */ 1436 * in order to update layout. */
1517 if (prop_validate(prop)) 1437 if (reload_win)
1518 { 1438 {
1519 if (reload_win) 1439 _wdg_parent_win_reload(wdg);
1440 propview_build(NULL);
1441 _editor_wdg_selected_set(wdg);
1442 objtree_item_contracted_set(NULL);
1443 objtree_item_selected_set(wdg);
1444 }
1445 else
1446 {
1447 /* Don't do anything with win if prop is VISIBILITY*/
1448 if (IS_WIN(wdg) && (!strcmp(prop_name_get(prop), VISIBILITY_SET)))
1520 { 1449 {
1521 _wdg_parent_win_reload(wdg);
1522 propview_build(NULL, _propsview_toolbar_selected_item_type);
1523 _editor_wdg_selected_set(wdg);
1524 objtree_item_contracted_set(NULL);
1525 objtree_item_selected_set(wdg);
1526 } 1450 }
1527 else 1451 else
1528 { 1452 {
1529 /* Don't do anything with win if prop is VISIBILITY*/
1530 if (IS_WIN(wdg) && (!strcmp(prop_name_get(prop), VISIBILITY_SET)))
1531 {
1532 }
1533 else
1534 {
1535 1453
1536 Gui_Session *session = (Gui_Session *) gui_context_editor_session_get(_active_context_get()); 1454 Gui_Session *session = (Gui_Session *) gui_context_editor_session_get(_active_context_get());
1537 manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL); 1455 manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL);
1538 if ((!strcmp(prop_name_get(prop), POSITION_SET)) || 1456 if ((!strcmp(prop_name_get(prop), POSITION_SET)) ||
1539 (!strcmp(prop_name_get(prop), SIZE_HINT_ALIGN_SET))) 1457 (!strcmp(prop_name_get(prop), SIZE_HINT_ALIGN_SET)))
1540 { 1458 {
1541 int x, y; 1459 int x, y;
1542 /* FIXME: DIRTY DIRTY HACK: 1460 /* FIXME: DIRTY DIRTY HACK:
1543 * When change size_hint_align in propview, location of 1461 * When change size_hint_align in propview, location of
1544 * widget changes. But position changes some time after. 1462 * widget changes. But position changes some time after.
1545 * So I can't draw border in right place. When I do resize, 1463 * So I can't draw border in right place. When I do resize,
1546 * position is recalculated. */ 1464 * position is recalculated. */
1547 Eo *obj_tmp = session_eo_get(session, wdg); 1465 Eo *obj_tmp = session_eo_get(session, wdg);
1548 eo_do(obj_tmp, evas_obj_size_get(&x, &y)); 1466 eo_do(obj_tmp, evas_obj_size_get(&x, &y));
1549 eo_do(obj_tmp, evas_obj_size_set(x + 1, y)); 1467 eo_do(obj_tmp, evas_obj_size_set(x + 1, y));
1550 eo_do(obj_tmp, evas_obj_size_set(x, y)); 1468 eo_do(obj_tmp, evas_obj_size_set(x, y));
1551 //_wdg_border_draw(wdg, EINA_TRUE); 1469 //_wdg_border_draw(wdg, EINA_TRUE);
1552 }
1553 } 1470 }
1554 /* Rebuild view when property like "pack_end". */
1555 if (db_op_desc_flag_get(op) & MULTI_PROPERTY)
1556 propview_build(wdg, _propsview_toolbar_selected_item_type);
1557 } 1471 }
1558 return; 1472 /* Rebuild view when property like "pack_end". */
1473 if (db_op_desc_flag_get(op) & MULTI_PROPERTY)
1474 propview_build(wdg);
1559 } 1475 }
1476 return EO_CALLBACK_CONTINUE;
1560 /* FIXME: add return here? */ 1477 /* FIXME: add return here? */
1561end: 1478end:
1562 /* If property was newly created, delete it. */ 1479 /* If property was newly created, delete it. */
1563 if (prop_add) prop_del(prop); 1480 if (prop_add) prop_del(prop);
1481 return EO_CALLBACK_CONTINUE;
1564} 1482}
1565 1483
1566static void 1484static Eina_Bool
1567_prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, void *ev EINA_UNUSED) 1485_prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *ev EINA_UNUSED)
1568{ 1486{
1569 const Gui_Widget *wdg = _editor_wdg_selected_get(); 1487 const Gui_Widget *wdg = _editor_wdg_selected_get();
1570 Gui_Widget_Property *prop = data; 1488 Gui_Widget_Property *prop = data;
@@ -1579,7 +1497,8 @@ _prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, void *ev EINA_UNUSED)
1579 { 1497 {
1580 if (gui_value_type_get(val) == GUI_TYPE_OBJECT) 1498 if (gui_value_type_get(val) == GUI_TYPE_OBJECT)
1581 { 1499 {
1582 Gui_Widget *param_wdg = wdg_get(_active_context_get(), gui_value_string_get(val)); 1500 Dep_Id dep_id = DEP_ID_GET(val);
1501 Gui_Widget *param_wdg = wdg_get(_active_context_get(), dep_id);
1583 if (param_wdg) 1502 if (param_wdg)
1584 { 1503 {
1585 const Gui_Widget *parent_win = wdg_parent_win_wdg_get(param_wdg); 1504 const Gui_Widget *parent_win = wdg_parent_win_wdg_get(param_wdg);
@@ -1592,19 +1511,16 @@ _prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, void *ev EINA_UNUSED)
1592 } 1511 }
1593 } 1512 }
1594 1513
1595
1596 /*Before deleting property iterate over its parameters and remove pointer to this prop from widgets,
1597 * which depend on it. */
1598 _prop_dep_resolve(prop, EINA_FALSE);
1599 wdg_prop_del((Gui_Widget *) wdg, prop); 1514 wdg_prop_del((Gui_Widget *) wdg, prop);
1600 1515
1601 _wdg_parent_win_reload(wdg); 1516 _wdg_parent_win_reload(wdg);
1602 1517
1603 propview_build(NULL, _propsview_toolbar_selected_item_type); 1518 propview_build(NULL);
1604 1519
1605 _editor_wdg_selected_set(wdg); 1520 _editor_wdg_selected_set(wdg);
1606 objtree_item_contracted_set(NULL); 1521 objtree_item_contracted_set(NULL);
1607 objtree_item_selected_set(wdg); 1522 objtree_item_selected_set(wdg);
1523 return EO_CALLBACK_CONTINUE;
1608} 1524}
1609 1525
1610static void 1526static void
@@ -1615,7 +1531,7 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo *obj, void *event_info EI
1615 const Op_Desc *op; 1531 const Op_Desc *op;
1616 const Gui_Widget *wdg; 1532 const Gui_Widget *wdg;
1617 const Gui_Widget_Item *wit; 1533 const Gui_Widget_Item *wit;
1618 Gui_Widget_Property *prop; 1534 const Gui_Widget_Property *prop;
1619 int idx; 1535 int idx;
1620 Gui_Value *val; 1536 Gui_Value *val;
1621 1537
@@ -1638,12 +1554,12 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo *obj, void *event_info EI
1638 const char *entry_data = elm_entry_entry_get(obj); 1554 const char *entry_data = elm_entry_entry_get(obj);
1639 if (type == GUI_TYPE_STRING) 1555 if (type == GUI_TYPE_STRING)
1640 { 1556 {
1641 gui_value_type_set(val, type); 1557 gui_value_string_free(val);
1642 gui_value_string_set(val, entry_data); 1558 gui_value_string_set(val, strdup(entry_data));
1643 1559
1644 /* Reloading all window. */ 1560 /* Reloading all window. */
1645 _wdg_parent_win_reload(wdg); 1561 _wdg_parent_win_reload(wdg);
1646 propview_build(NULL, _propsview_toolbar_selected_item_type); 1562 propview_build(NULL);
1647 _editor_wdg_selected_set(wdg); 1563 _editor_wdg_selected_set(wdg);
1648 objtree_item_contracted_set(NULL); 1564 objtree_item_contracted_set(NULL);
1649 objtree_item_selected_set(wdg); 1565 objtree_item_selected_set(wdg);
@@ -1663,11 +1579,12 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo *obj, void *event_info EI
1663 eo_do(obj, elm_obj_widget_part_text_set(NULL, new_value)); 1579 eo_do(obj, elm_obj_widget_part_text_set(NULL, new_value));
1664 if (!strcmp(new_value, PROP_HOVERSEL_NONE_VALUE)) 1580 if (!strcmp(new_value, PROP_HOVERSEL_NONE_VALUE))
1665 { 1581 {
1666 gui_value_set(val, type, NULL); 1582 gui_value_name_id_set(val, type, 0);
1667 } 1583 }
1668 else 1584 else
1669 { 1585 {
1670 gui_value_set(val, type, (void *) new_value); 1586 Dep_Id name_id = gui_context_dep_data_get_id_by_name(_active_ctx, new_value);
1587 gui_value_name_id_set(val, type, name_id);
1671 } 1588 }
1672 } 1589 }
1673} 1590}
@@ -1682,7 +1599,8 @@ _content_del_from_propview(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Descr
1682 1599
1683 /* Need to remove parent container from widget. */ 1600 /* Need to remove parent container from widget. */
1684 const char* wdg_name = wdg_container_name_get_by_id(wdg, idx); 1601 const char* wdg_name = wdg_container_name_get_by_id(wdg, idx);
1685 Gui_Widget *param_wdg = wdg_get(_active_context_get(), wdg_name); 1602 Dep_Id name_id = gui_context_dep_data_get_id_by_name(_active_context_get(), wdg_name);
1603 Gui_Widget *param_wdg = wdg_get(_active_context_get(), name_id);
1686 wdg_data_set(param_wdg, CONTAINER, NULL); 1604 wdg_data_set(param_wdg, CONTAINER, NULL);
1687 /* Need to change parent for content being unset from container. 1605 /* Need to change parent for content being unset from container.
1688 * Set parent window as parent for widget. */ 1606 * Set parent window as parent for widget. */
@@ -1758,7 +1676,7 @@ _has_part(const Gui_Widget *wdg, const char *new_part_name)
1758 EINA_LIST_FOREACH(contents, itr, prop) 1676 EINA_LIST_FOREACH(contents, itr, prop)
1759 { 1677 {
1760 val = prop_value_nth_get(prop, 0); 1678 val = prop_value_nth_get(prop, 0);
1761 part = gui_value_string_get(val); 1679 part = STRING_GET(val);
1762 if (!strcmp(part, new_part_name)) 1680 if (!strcmp(part, new_part_name))
1763 { 1681 {
1764 return EINA_TRUE; 1682 return EINA_TRUE;
@@ -1815,7 +1733,7 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_De
1815 !strcmp(wdg_container_class_name_get(wdg), DB_DEF_TABLE_CLASS) && (i >= 3)) 1733 !strcmp(wdg_container_class_name_get(wdg), DB_DEF_TABLE_CLASS) && (i >= 3))
1816 { 1734 {
1817 int x = 1; 1735 int x = 1;
1818 gui_value_set(val, gui_value_type_get(val), &x); 1736 gui_value_int_set(val, x);
1819 } 1737 }
1820 } 1738 }
1821 wdg_container_content_add((Gui_Widget *) wdg, prop); 1739 wdg_container_content_add((Gui_Widget *) wdg, prop);
@@ -1837,11 +1755,11 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_De
1837 if ((par_idx >= 3) && (number < 1)) 1755 if ((par_idx >= 3) && (number < 1))
1838 { 1756 {
1839 char str[12]; 1757 char str[12];
1840 number = *((int *) gui_value_pointer_get(val)); 1758 number = INT_GET(val);
1841 sprintf(str, "%d", number); 1759 sprintf(str, "%d", number);
1842 eo_do(obj, elm_obj_layout_text_set(NULL, str)); 1760 eo_do(obj, elm_obj_layout_text_set(NULL, str));
1843 } 1761 }
1844 gui_value_set(val, type, &number); 1762 gui_value_int_set(val, number);
1845 manager_widget_content_reset(session, wdg, prop, MODE_EDITOR, NULL); 1763 manager_widget_content_reset(session, wdg, prop, MODE_EDITOR, NULL);
1846 } 1764 }
1847 1765
@@ -1853,12 +1771,13 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_De
1853 * But because of this, I can't write "null"*/ 1771 * But because of this, I can't write "null"*/
1854 if (!strcmp(entry_data, "null")) 1772 if (!strcmp(entry_data, "null"))
1855 { 1773 {
1856 gui_value_set(val, GUI_TYPE_NULL, NULL); 1774 gui_value_string_free(val);
1775 gui_value_string_set(val, NULL);
1857 } 1776 }
1858 else 1777 else
1859 { 1778 {
1860 gui_value_type_set(val, type); 1779 gui_value_string_free(val);
1861 gui_value_string_set(val, entry_data); 1780 gui_value_string_set(val, strdup(entry_data));
1862 } 1781 }
1863 wdg_data_set(wdg, CONTAINER, NULL); 1782 wdg_data_set(wdg, CONTAINER, NULL);
1864 1783
@@ -1872,7 +1791,7 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_De
1872 else 1791 else
1873 { 1792 {
1874 /* reset part name if this part already exist. */ 1793 /* reset part name if this part already exist. */
1875 const char *str = gui_value_string_get(val); 1794 char *str = STRING_GET(val);
1876 eo_do(obj, elm_obj_layout_text_set(NULL, str)); 1795 eo_do(obj, elm_obj_layout_text_set(NULL, str));
1877 } 1796 }
1878 } 1797 }
@@ -1887,16 +1806,22 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_De
1887 eo_do(obj, old_value = elm_obj_widget_part_text_get(NULL)); 1806 eo_do(obj, old_value = elm_obj_widget_part_text_get(NULL));
1888 if (!strcmp(new_value, old_value)) 1807 if (!strcmp(new_value, old_value))
1889 return EO_CALLBACK_CONTINUE; 1808 return EO_CALLBACK_CONTINUE;
1809
1810 Dep_Id old_name_id, new_name_id;
1811 old_name_id = gui_context_dep_data_get_id_by_name(_active_context_get(), old_value);
1812 new_name_id = gui_context_dep_data_get_id_by_name(_active_context_get(), new_value);
1813
1890 eo_do(obj, elm_obj_widget_part_text_set(NULL, new_value)); 1814 eo_do(obj, elm_obj_widget_part_text_set(NULL, new_value));
1891 1815
1892 if (type == GUI_TYPE_ENUM) 1816 if (type == GUI_TYPE_ENUM)
1893 { 1817 {
1894 gui_value_set(val, type, (void *) new_value); 1818 gui_value_string_free(val);
1819 gui_value_enum_set(val, strdup(new_value));
1895 } 1820 }
1896 if (type == GUI_TYPE_OBJECT) 1821 if (type == GUI_TYPE_OBJECT)
1897 { 1822 {
1898 Gui_Widget *old_param_wdg = wdg_get(_active_context_get(), old_value); 1823 Gui_Widget *old_param_wdg = wdg_get(_active_context_get(), old_name_id);
1899 Gui_Widget *new_param_wdg = wdg_get(_active_context_get(), new_value); 1824 Gui_Widget *new_param_wdg = wdg_get(_active_context_get(), new_name_id);
1900 1825
1901 /* Check if new_widget was packed previously. 1826 /* Check if new_widget was packed previously.
1902 * If so, we need to unpack widget and delete from contents*/ 1827 * If so, we need to unpack widget and delete from contents*/
@@ -1914,7 +1839,8 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_De
1914 wdg_data_set(new_param_wdg, CONTAINER, NULL); 1839 wdg_data_set(new_param_wdg, CONTAINER, NULL);
1915 } 1840 }
1916 1841
1917 gui_value_set(val, GUI_TYPE_OBJECT, (void *) new_value); 1842 Dep_Id dep_id = wdg_dep_id_get(new_param_wdg);
1843 gui_value_name_id_set(val, type, dep_id);
1918 1844
1919 /* Change parent of old and new widgets. */ 1845 /* Change parent of old and new widgets. */
1920 { 1846 {
@@ -1955,7 +1881,7 @@ _widget_selected_from_objtree(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
1955{ 1881{
1956 Gui_Widget *wdg = elm_object_item_data_get(event_info); 1882 Gui_Widget *wdg = elm_object_item_data_get(event_info);
1957 _editor_wdg_selected_set(wdg); 1883 _editor_wdg_selected_set(wdg);
1958 propview_build(wdg, _propsview_toolbar_selected_item_type); 1884 propview_build(wdg);
1959 1885
1960 /* Make menu shown, when it is selected from objtree. */ 1886 /* Make menu shown, when it is selected from objtree. */
1961 if (wdg_is_container(wdg, DB_DEF_MENU_CLASS)) 1887 if (wdg_is_container(wdg, DB_DEF_MENU_CLASS))
@@ -1967,15 +1893,6 @@ _widget_selected_from_objtree(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
1967} 1893}
1968 1894
1969static void 1895static void
1970_propsview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
1971{
1972 const Gui_Widget *wdg = _editor_wdg_selected_get();
1973 _propsview_toolbar_selected_item_type = (int) (intptr_t) data;
1974
1975 propview_build(wdg, _propsview_toolbar_selected_item_type);
1976}
1977
1978static void
1979_project_close(const Gui_Context *ctx) 1896_project_close(const Gui_Context *ctx)
1980{ 1897{
1981 if (ctx) 1898 if (ctx)
@@ -2009,7 +1926,7 @@ _project_close(const Gui_Context *ctx)
2009 _active_context_set(NULL); 1926 _active_context_set(NULL);
2010 /* Clear lists. */ 1927 /* Clear lists. */
2011 objtree_context_set(NULL); 1928 objtree_context_set(NULL);
2012 propview_build(NULL, _propsview_toolbar_selected_item_type); 1929 propview_build(NULL);
2013 seqview_fill(NULL); 1930 seqview_fill(NULL);
2014} 1931}
2015 1932
@@ -2024,6 +1941,7 @@ _project_new(char *filename)
2024 return EINA_FALSE; 1941 return EINA_FALSE;
2025 } 1942 }
2026 1943
1944 gui_context_project_name_set(ctx, "new_project");
2027 if (filename) 1945 if (filename)
2028 { 1946 {
2029 if (!gui_parser_json_file_read(ctx, filename)) 1947 if (!gui_parser_json_file_read(ctx, filename))
@@ -2034,25 +1952,10 @@ _project_new(char *filename)
2034 } 1952 }
2035 1953
2036 /* FIXME: handle return values */ 1954 /* FIXME: handle return values */
2037 gui_context_validate(ctx);
2038 _active_context_set(ctx); 1955 _active_context_set(ctx);
2039 objtree_context_set(ctx); 1956 objtree_context_set(ctx);
2040 seqview_fill(ctx); 1957 seqview_fill(ctx);
2041 1958
2042 /*resolve action dependencies
2043 * FIXME: put it in other place?
2044 * Action dependencies affect only on editor, so I need to resolve it somewhere during context resolving. */
2045 Eina_List *itr;
2046 Gui_Sequence *seq = NULL;
2047 EINA_LIST_FOREACH(gui_context_seq_list_get(ctx), itr, seq)
2048 {
2049 Eina_List *itr2;
2050 Gui_Action *action;
2051 EINA_LIST_FOREACH(sequence_actions_list_get(seq), itr2, action)
2052 {
2053 _action_dep_resolve(action, EINA_TRUE, DEP_ALL);
2054 }
2055 }
2056 /* Assign new editor session tocontext */ 1959 /* Assign new editor session tocontext */
2057 gui_context_editor_session_set(_active_context_get(), session_new()); 1960 gui_context_editor_session_set(_active_context_get(), session_new());
2058 1961
@@ -2060,46 +1963,6 @@ _project_new(char *filename)
2060 return EINA_TRUE; 1963 return EINA_TRUE;
2061} 1964}
2062 1965
2063/* This callback is called in the end of propview_build()
2064 * in order to switch between scrollbox for properties
2065 * and genlist for items. */
2066void
2067_propview_build_post_cb(const Gui_Widget *wdg, It_Data_Type type)
2068{
2069 switch(type)
2070 {
2071 case DESCRIPTION_TYPE:
2072 case PROPERTY_TYPE:
2073 case CALLBACK_TYPE:
2074 case CONTENT_TYPE:
2075 {
2076 eo_do(g->propsview_sc, evas_obj_visibility_set(EINA_TRUE));
2077 eo_do(g->itemview_box, evas_obj_visibility_set(EINA_FALSE));
2078 /* FIXME: maybe it's not the best idea to clear item list every time. */
2079 itemview_clear();
2080 break;
2081 }
2082 case ITEM_TYPE:
2083 {
2084 eo_do(g->propsview_sc, evas_obj_visibility_set(EINA_FALSE));
2085 eo_do(g->itemview_box, evas_obj_visibility_set(EINA_TRUE));
2086
2087 if (wdg_is_container(wdg, DB_DEF_MENU_CLASS))
2088 {
2089 eo_do(g->itemview_add_item_nested_but, elm_obj_widget_disabled_set(EINA_FALSE));
2090 eo_do(g->itemview_add_separator_but, elm_obj_widget_disabled_set(EINA_FALSE));
2091 }
2092 else if (wdg_is_container(wdg, DB_DEF_DISKSELECTOR_CLASS) ||
2093 wdg_is_container(wdg, DB_DEF_CTXPOPUP_CLASS))
2094 {
2095 eo_do(g->itemview_add_item_nested_but, elm_obj_widget_disabled_set(EINA_TRUE));
2096 eo_do(g->itemview_add_separator_but, elm_obj_widget_disabled_set(EINA_TRUE));
2097 }
2098 break;
2099 }
2100 }
2101}
2102
2103enum 1966enum
2104{ 1967{
2105 ITEM_ADD, 1968 ITEM_ADD,
@@ -2122,9 +1985,9 @@ _itemview_item_do_(unsigned int type)
2122{ 1985{
2123 static int i = -1; 1986 static int i = -1;
2124 i++; 1987 i++;
2125 ERR("Here need to call function which will add item to Menu");
2126 Gui_Widget_Item *wit = NULL, *parent_it = NULL; 1988 Gui_Widget_Item *wit = NULL, *parent_it = NULL;
2127 Gui_Widget *wdg = (Gui_Widget *) _editor_wdg_selected_get(); 1989 Gui_Widget *wdg = (Gui_Widget *) _editor_wdg_selected_get();
1990 const Gui_Context *ctx = wdg_context_get(wdg);
2128 Gui_Value *val = NULL; 1991 Gui_Value *val = NULL;
2129 wit = itemview_item_selected_get(); 1992 wit = itemview_item_selected_get();
2130 1993
@@ -2149,9 +2012,8 @@ _itemview_item_do_(unsigned int type)
2149 Op_Desc *op = (Op_Desc *) db_container_desc_op_desc_get(db_container_desc_get(wdg_class_name_get(wdg)), CONTAINER_PACK); 2012 Op_Desc *op = (Op_Desc *) db_container_desc_op_desc_get(db_container_desc_get(wdg_class_name_get(wdg)), CONTAINER_PACK);
2150 Gui_Widget_Property *prop = prop_create_for_op(op); 2013 Gui_Widget_Property *prop = prop_create_for_op(op);
2151 2014
2152 2015 char str[NAME_MAX] = {'\0'};
2153 char str[15] = {'\0'}; 2016 sprintf(str, "%s_%s%d", wdg_name_get(wdg), "it", i);
2154 sprintf(str, "%s%d", "it", i);
2155 /* Check that newly generated name is not used. */ 2017 /* Check that newly generated name is not used. */
2156 while (wdg_item_by_name_get(wdg, str)) 2018 while (wdg_item_by_name_get(wdg, str))
2157 { 2019 {
@@ -2161,29 +2023,28 @@ _itemview_item_do_(unsigned int type)
2161 2023
2162 if (type == SEPARATOR_ADD) 2024 if (type == SEPARATOR_ADD)
2163 { 2025 {
2164 it = wdg_item_new(ITEM_SEPARATOR, str); 2026 it = wdg_item_new(ctx, ITEM_SEPARATOR, str);
2165 sprintf(str, "%s", "Separator"); 2027 sprintf(str, "%s", "Separator");
2166 } 2028 }
2167 else 2029 else
2168 { 2030 {
2169 it = wdg_item_new(ITEM_REGULAR, str); 2031 it = wdg_item_new(ctx, ITEM_REGULAR, str);
2170 sprintf(str, "%s %d", "New Item", i); 2032 sprintf(str, "%s %d", "New Item", i);
2171 } 2033 }
2172 2034
2173
2174 if (!strcmp(wdg_class_name_get(wdg), DB_DEF_MENU_CLASS)) 2035 if (!strcmp(wdg_class_name_get(wdg), DB_DEF_MENU_CLASS))
2175 { 2036 {
2176 val = prop_value_nth_get(prop, 0); 2037 val = prop_value_nth_get(prop, 0);
2177 gui_value_set(val, GUI_TYPE_OBJECT_ITEM, parent_it); 2038 gui_value_pointer_set(val, GUI_TYPE_OBJECT_ITEM, parent_it);
2178 2039
2179 val = prop_value_nth_get(prop, 2); 2040 val = prop_value_nth_get(prop, 2);
2180 gui_value_set(val, GUI_TYPE_STRING, str); 2041 gui_value_string_set(val, strdup(str));
2181 } 2042 }
2182 else if (!strcmp(wdg_class_name_get(wdg), DB_DEF_DISKSELECTOR_CLASS) || 2043 else if (!strcmp(wdg_class_name_get(wdg), DB_DEF_DISKSELECTOR_CLASS) ||
2183 !strcmp(wdg_class_name_get(wdg), DB_DEF_CTXPOPUP_CLASS)) 2044 !strcmp(wdg_class_name_get(wdg), DB_DEF_CTXPOPUP_CLASS))
2184 { 2045 {
2185 val = prop_value_nth_get(prop, 0); 2046 val = prop_value_nth_get(prop, 0);
2186 gui_value_set(val, GUI_TYPE_STRING, str); 2047 gui_value_string_set(val, strdup(str));
2187 } 2048 }
2188 2049
2189 wdg_item_prop_set(it, prop); 2050 wdg_item_prop_set(it, prop);
@@ -2230,7 +2091,7 @@ _itemview_item_do_(unsigned int type)
2230 //manager_widget_configure(session, wdg, MODE_EDITOR, NULL); 2091 //manager_widget_configure(session, wdg, MODE_EDITOR, NULL);
2231 2092
2232 _wdg_parent_win_reload(wdg); 2093 _wdg_parent_win_reload(wdg);
2233 propview_build(NULL, _propsview_toolbar_selected_item_type); 2094 propview_build(NULL);
2234 _editor_wdg_selected_set(wdg); 2095 _editor_wdg_selected_set(wdg);
2235 objtree_item_contracted_set(NULL); 2096 objtree_item_contracted_set(NULL);
2236 objtree_item_selected_set(wdg); 2097 objtree_item_selected_set(wdg);
@@ -2245,7 +2106,7 @@ _itemview_item_do_(unsigned int type)
2245 2106
2246/* This callback is called, when "Add Item" button is pressed. */ 2107/* This callback is called, when "Add Item" button is pressed. */
2247Eina_Bool 2108Eina_Bool
2248_itemview_item_add_but_clicked_cb() 2109_itemview_item_add_but_clicked_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
2249{ 2110{
2250 _itemview_item_do_(ITEM_ADD); 2111 _itemview_item_do_(ITEM_ADD);
2251 return EO_CALLBACK_CONTINUE; 2112 return EO_CALLBACK_CONTINUE;
@@ -2253,7 +2114,7 @@ _itemview_item_add_but_clicked_cb()
2253 2114
2254/* This callback is called, when "Add Subitem" button is pressed. */ 2115/* This callback is called, when "Add Subitem" button is pressed. */
2255Eina_Bool 2116Eina_Bool
2256_itemview_item_nested_add_but_clicked_cb() 2117_itemview_item_nested_add_but_clicked_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
2257{ 2118{
2258 _itemview_item_do_(ITEM_ADD_NESTED); 2119 _itemview_item_do_(ITEM_ADD_NESTED);
2259 return EO_CALLBACK_CONTINUE; 2120 return EO_CALLBACK_CONTINUE;
@@ -2261,7 +2122,7 @@ _itemview_item_nested_add_but_clicked_cb()
2261 2122
2262/* This callback is called, when "Add Separator" button is pressed. */ 2123/* This callback is called, when "Add Separator" button is pressed. */
2263Eina_Bool 2124Eina_Bool
2264_itemview_separator_add_but_clicked_cb() 2125_itemview_separator_add_but_clicked_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
2265{ 2126{
2266 _itemview_item_do_(SEPARATOR_ADD); 2127 _itemview_item_do_(SEPARATOR_ADD);
2267 return EO_CALLBACK_CONTINUE; 2128 return EO_CALLBACK_CONTINUE;
@@ -2269,7 +2130,7 @@ _itemview_separator_add_but_clicked_cb()
2269 2130
2270/* This callback is called, when "Delete Item" button is pressed. */ 2131/* This callback is called, when "Delete Item" button is pressed. */
2271Eina_Bool 2132Eina_Bool
2272_itemview_item_del_but_clicked_cb() 2133_itemview_item_del_but_clicked_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
2273{ 2134{
2274 _itemview_item_do_(ITEM_DELETE); 2135 _itemview_item_do_(ITEM_DELETE);
2275 return EO_CALLBACK_CONTINUE; 2136 return EO_CALLBACK_CONTINUE;
@@ -2292,7 +2153,6 @@ editor_init(GuiLogicCbs *_guilogic_cbs)
2292 prop_cbs->content_delete_cb_func = _content_del_from_propview; 2153 prop_cbs->content_delete_cb_func = _content_del_from_propview;
2293 prop_cbs->content_reorder_cb_func = _content_reorder_from_propview; 2154 prop_cbs->content_reorder_cb_func = _content_reorder_from_propview;
2294 prop_cbs->content_change_cb_func = _content_change_from_propview; 2155 prop_cbs->content_change_cb_func = _content_change_from_propview;
2295 prop_cbs->propview_build_post_cb = _propview_build_post_cb;
2296 2156
2297 ObjTreeViewCbs *objtree_cbs = objtree_cbs_get(); 2157 ObjTreeViewCbs *objtree_cbs = objtree_cbs_get();
2298 objtree_cbs->item_selection_cb_func = _widget_selected_from_objtree; 2158 objtree_cbs->item_selection_cb_func = _widget_selected_from_objtree;
@@ -2308,22 +2168,11 @@ editor_init(GuiLogicCbs *_guilogic_cbs)
2308 _guilogic_cbs->_editor_shutdown = _editor_shutdown; 2168 _guilogic_cbs->_editor_shutdown = _editor_shutdown;
2309 _guilogic_cbs->_project_close = _project_close; 2169 _guilogic_cbs->_project_close = _project_close;
2310 _guilogic_cbs->_project_new = _project_new; 2170 _guilogic_cbs->_project_new = _project_new;
2311 _guilogic_cbs->_seqview_fill = seqview_fill;
2312 2171
2313 objtree_list_set(g->objtree_list); 2172 objtree_list_set(g->objtree_list);
2314 propview_scrollbox_set(g->propsview_box); 2173 propview_init(g->propsview_box, g->propsview_toolbar);
2315 seqview_init(g->seq_list); 2174 seqview_init(g->seq_list);
2316 itemview_init(g->itemview_list); 2175 itemview_init(g->itemview_list);
2317 target_db_init(); 2176 target_db_init();
2318
2319 /* Put it here, because it Enums defined in propsview.h */
2320 elm_toolbar_item_append(g->propsview_toolbar, "fonts", "Description",
2321 _propsview_toolbar_clicked, (void *) (intptr_t) DESCRIPTION_TYPE);
2322 elm_toolbar_item_append(g->propsview_toolbar, "package_settings", "Properties",
2323 _propsview_toolbar_clicked, (void *) (intptr_t) PROPERTY_TYPE);
2324 elm_toolbar_item_append(g->propsview_toolbar, "call-start", "Callbacks",
2325 _propsview_toolbar_clicked, (void *) (intptr_t) CALLBACK_TYPE);
2326 elm_toolbar_item_append(g->propsview_toolbar, "call-end", "Content",
2327 _propsview_toolbar_clicked, (void *) (intptr_t) CONTENT_TYPE);
2328} 2177}
2329 2178
diff --git a/src/bin/egui_gui/egui_layout_c.json b/src/bin/egui_gui/egui_layout_c.json
index 8739056..f1517ca 100644
--- a/src/bin/egui_gui/egui_layout_c.json
+++ b/src/bin/egui_gui/egui_layout_c.json
@@ -1,14 +1,10 @@
1#include <Elementary.h> 1#include <Elementary.h>
2//#include "elm_widget.eo.h"
3#include "elm_widget_container.h" 2#include "elm_widget_container.h"
4#include "elm_interface_scrollable.h" 3#include "elm_interface_scrollable.h"
5#include "egui_layout.h" 4#include "egui_layout.h"
6 5
7static GUI pub_widgets; 6static GUI pub_widgets;
8static Eo *main_win; 7static Eo *main_win;
9static Eo *sequences_buttons_box;
10static Eo *button_sequence_add;
11static Eo *seq_add_entry;
12/* @egui 8/* @egui
13{ 9{
14 "Resources": 10 "Resources":
@@ -16,11 +12,76 @@ static Eo *seq_add_entry;
16 "Desc": 12 "Desc":
17 { 13 {
18 "type":"resource" 14 "type":"resource"
15 },
16 "Images":
17 {
18 "res_canvas_bg":"src/data/images/canvas_bg.jpg"
19 },
20 "Sequences":
21 [
22 "BigBang",
23 "fs_win_show",
24 "rm_win_show",
25 "settings_win_show",
26 "graphviz_button_clicked",
27 "itemview_item_add_but_clicked",
28 "itemview_item_nested_add_but_clicked",
29 "itemview_separator_add_but_clicked",
30 "itemview_item_del_but_clicked"
31 ],
32 "Eo_Callbacks":
33 {
34 "_itemview_item_add_but_clicked_cb":"_itemview_item_add_but_clicked_cb",
35 "_itemview_item_nested_add_but_clicked_cb":"_itemview_item_nested_add_but_clicked_cb",
36 "_itemview_separator_add_but_clicked_cb":"_itemview_separator_add_but_clicked_cb",
37 "_itemview_item_del_but_clicked_cb":"_itemview_item_del_but_clicked_cb",
38 "_rm_add_button_clicked":"_rm_add_button_clicked",
39 "_settings_apply_button_clicked":"_settings_apply_button_clicked",
40 "_settings_win_request_delete":"_settings_win_request_delete",
41 "_rm_win_request_delete":"_rm_win_request_delete",
42 "_rm_win_show_post_cb":"_rm_win_show_post_cb",
43 "_settings_win_show_post_cb":"_settings_win_show_post_cb"
19 } 44 }
20 } 45 }
21 } 46 }
22@!egui */ 47@!egui */
23 48
49/* @egui
50{
51 "Settings":
52 {
53 "Desc":
54 {
55 "type":"settings"
56 },
57 "Settings":
58 {
59 "project":"egui_layout"
60 }
61 }
62 }
63@!egui */
64
65extern Eina_Bool
66_itemview_item_add_but_clicked_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
67extern Eina_Bool
68_itemview_item_nested_add_but_clicked_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
69extern Eina_Bool
70_itemview_separator_add_but_clicked_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
71extern Eina_Bool
72_itemview_item_del_but_clicked_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
73extern Eina_Bool
74_rm_add_button_clicked(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
75extern Eina_Bool
76_settings_apply_button_clicked(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
77extern Eina_Bool
78_settings_win_request_delete(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
79extern Eina_Bool
80_rm_win_request_delete(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
81extern Eina_Bool
82_rm_win_show_post_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
83extern Eina_Bool
84_settings_win_show_post_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
24 85
25/* @egui 86/* @egui
26{ 87{
@@ -40,11 +101,11 @@ static Eo *seq_add_entry;
40static Eina_Bool 101static Eina_Bool
41_sequence_itemview_item_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 102_sequence_itemview_item_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
42{ 103{
43 extern Eina_Bool _itemview_item_add_but_clicked_cb(); 104 if (!_itemview_item_add_but_clicked_cb(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP;
44 if (!_itemview_item_add_but_clicked_cb()) return EO_CALLBACK_STOP;
45 return EO_CALLBACK_CONTINUE; 105 return EO_CALLBACK_CONTINUE;
46} 106}
47 107
108
48/* @egui 109/* @egui
49{ 110{
50 "itemview_item_nested_add_but_clicked": 111 "itemview_item_nested_add_but_clicked":
@@ -63,10 +124,11 @@ _sequence_itemview_item_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj
63static Eina_Bool 124static Eina_Bool
64_sequence_itemview_item_nested_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 125_sequence_itemview_item_nested_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
65{ 126{
66 extern Eina_Bool _itemview_item_nested_add_but_clicked_cb(); 127 if (!_itemview_item_nested_add_but_clicked_cb(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP;
67 if (!_itemview_item_nested_add_but_clicked_cb()) return EO_CALLBACK_STOP;
68 return EO_CALLBACK_CONTINUE; 128 return EO_CALLBACK_CONTINUE;
69} 129}
130
131
70/* @egui 132/* @egui
71{ 133{
72 "itemview_separator_add_but_clicked": 134 "itemview_separator_add_but_clicked":
@@ -85,10 +147,11 @@ _sequence_itemview_item_nested_add_but_clicked_execute(void *data EINA_UNUSED, E
85static Eina_Bool 147static Eina_Bool
86_sequence_itemview_separator_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 148_sequence_itemview_separator_add_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
87{ 149{
88 extern Eina_Bool _itemview_separator_add_but_clicked_cb(); 150 if (!_itemview_separator_add_but_clicked_cb(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP;
89 if (!_itemview_separator_add_but_clicked_cb()) return EO_CALLBACK_STOP;
90 return EO_CALLBACK_CONTINUE; 151 return EO_CALLBACK_CONTINUE;
91} 152}
153
154
92/* @egui 155/* @egui
93{ 156{
94 "itemview_item_del_but_clicked": 157 "itemview_item_del_but_clicked":
@@ -107,13 +170,11 @@ _sequence_itemview_separator_add_but_clicked_execute(void *data EINA_UNUSED, Eo
107static Eina_Bool 170static Eina_Bool
108_sequence_itemview_item_del_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 171_sequence_itemview_item_del_but_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
109{ 172{
110 extern Eina_Bool _itemview_item_del_but_clicked_cb(); 173 if (!_itemview_item_del_but_clicked_cb(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP;
111 if (!_itemview_item_del_but_clicked_cb()) return EO_CALLBACK_STOP;
112 return EO_CALLBACK_CONTINUE; 174 return EO_CALLBACK_CONTINUE;
113} 175}
114 176
115 177static void
116void
117_create_gvc_win() 178_create_gvc_win()
118{ 179{
119 Eo *gvc_win; 180 Eo *gvc_win;
@@ -133,11 +194,11 @@ _create_gvc_win()
133 { 194 {
134 "constructor":["elm_obj_win_constructor"], 195 "constructor":["elm_obj_win_constructor"],
135 "elm_obj_win_constructor":["Graph", "ELM_WIN_BASIC"], 196 "elm_obj_win_constructor":["Graph", "ELM_WIN_BASIC"],
136 "title_set":["Graph View"], 197 "title":["Graph View"],
137 "autodel_set":[true], 198 "autodel":[true],
138 "size_set":[400, 400], 199 "size":[400, 400],
139 "resize_object_add":["gvc_img"], 200 "resize_object_add":["gvc_img"],
140 "visibility_set":[true] 201 "visibility":[true]
141 } 202 }
142 } 203 }
143 } 204 }
@@ -159,9 +220,9 @@ _create_gvc_win()
159 }, 220 },
160 "Properties": 221 "Properties":
161 { 222 {
162 "size_hint_weight_set":[1, 1], 223 "size_hint_weight":[1, 1],
163 "image_file_set":["/tmp/truc.png", null], 224 "file":["/tmp/truc.png", null],
164 "visibility_set":[true] 225 "visibility":[true]
165 } 226 }
166 } 227 }
167 } 228 }
@@ -182,7 +243,8 @@ _create_gvc_win()
182 { 243 {
183 "Desc": 244 "Desc":
184 { 245 {
185 "type":"sequence" 246 "type":"sequence",
247 "public":true
186 }, 248 },
187 "Actions": 249 "Actions":
188 { 250 {
@@ -191,38 +253,14 @@ _create_gvc_win()
191 } 253 }
192 } 254 }
193@!egui */ 255@!egui */
194static Eina_Bool 256Eina_Bool
195_sequence_graphviz_button_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 257egui_layout_graphviz_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
196{ 258{
197 _create_gvc_win(); 259 _create_gvc_win();
198 260
199 return EO_CALLBACK_CONTINUE; 261 return EO_CALLBACK_CONTINUE;
200} 262}
201 263
202
203/* @egui
204{
205 "del_button_clicked":
206 {
207 "Desc":
208 {
209 "type":"sequence"
210 },
211 "Actions":
212 {
213 "User":["_action_or_seq_del", ""]
214 }
215 }
216 }
217@!egui */
218static Eina_Bool
219_sequence_del_button_clicked_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
220{
221 extern Eina_Bool _action_or_seq_del(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
222 if (!_action_or_seq_del(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP;
223 return EO_CALLBACK_CONTINUE;
224}
225
226static void 264static void
227_create_fs_win() 265_create_fs_win()
228{ 266{
@@ -246,13 +284,13 @@ _create_fs_win()
246 { 284 {
247 "constructor":["elm_obj_win_constructor"], 285 "constructor":["elm_obj_win_constructor"],
248 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"], 286 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
249 "title_set":["Select file"], 287 "title":["Select file"],
250 "autodel_set":[true], 288 "autodel":[true],
251 "size_set":[300, 450], 289 "size":[300, 450],
252 "resize_object_add":["bg2"], 290 "resize_object_add":["bg2"],
253 "resize_object_add":["vbox"], 291 "resize_object_add":["vbox"],
254 "modal":[true], 292 "modal":[true],
255 "visibility_set":[true] 293 "visibility":[true]
256 } 294 }
257 } 295 }
258 } 296 }
@@ -260,10 +298,10 @@ _create_fs_win()
260 fs_win = eo_add_custom(ELM_OBJ_WIN_CLASS, main_win, elm_obj_win_constructor(NULL, ELM_WIN_BASIC)); 298 fs_win = eo_add_custom(ELM_OBJ_WIN_CLASS, main_win, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
261 eo_unref(fs_win); 299 eo_unref(fs_win);
262 pub_widgets.fs_win = fs_win; 300 pub_widgets.fs_win = fs_win;
263 eo_do(fs_win, elm_obj_win_modal_set(EINA_TRUE));
264 eo_do(fs_win, elm_obj_win_title_set("Select file")); 301 eo_do(fs_win, elm_obj_win_title_set("Select file"));
265 eo_do(fs_win, elm_obj_win_autodel_set(EINA_TRUE)); 302 eo_do(fs_win, elm_obj_win_autodel_set(EINA_TRUE));
266 eo_do(fs_win, evas_obj_size_set(300, 450)); 303 eo_do(fs_win, evas_obj_size_set(300, 450));
304 eo_do(fs_win, elm_obj_win_modal_set(EINA_TRUE));
267/* @egui 305/* @egui
268{ 306{
269 "bg2": 307 "bg2":
@@ -276,9 +314,9 @@ _create_fs_win()
276 }, 314 },
277 "Properties": 315 "Properties":
278 { 316 {
279 "bg_color_set":[80, 80, 80, 255], 317 "color":[80, 80, 80, 255],
280 "size_hint_weight_set":[1, 1], 318 "size_hint_weight":[1, 1],
281 "visibility_set":[true] 319 "visibility":[true]
282 } 320 }
283 } 321 }
284 } 322 }
@@ -301,10 +339,10 @@ _create_fs_win()
301 }, 339 },
302 "Properties": 340 "Properties":
303 { 341 {
304 "size_hint_weight_set":[1, 1], 342 "size_hint_weight":[1, 1],
305 "pack_end":["fileselector"], 343 "visibility":[true]
306 "visibility_set":[true] 344 },
307 } 345 "Contains":["fileselector"]
308 } 346 }
309 } 347 }
310@!egui */ 348@!egui */
@@ -320,15 +358,15 @@ _create_fs_win()
320 "Desc": 358 "Desc":
321 { 359 {
322 "parent":"vbox", 360 "parent":"vbox",
323 "class":"Elc_Fileselector", 361 "class":"Elm_Fileselector",
324 "public":true, 362 "public":true,
325 "type":"widget" 363 "type":"widget"
326 }, 364 },
327 "Properties": 365 "Properties":
328 { 366 {
329 "size_hint_weight_set":[1, 1], 367 "size_hint_weight":[1, 1],
330 "size_hint_align_set":[-1, -1], 368 "size_hint_align":[-1, -1],
331 "visibility_set":[true] 369 "visibility":[true]
332 } 370 }
333 } 371 }
334 } 372 }
@@ -361,75 +399,769 @@ _create_fs_win()
361 } 399 }
362@!egui */ 400@!egui */
363Eina_Bool 401Eina_Bool
364_sequence_fs_win_show_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 402egui_layout_fs_win_show(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
365{ 403{
366 _create_fs_win(); 404 _create_fs_win();
367 405
368 return EO_CALLBACK_CONTINUE; 406 return EO_CALLBACK_CONTINUE;
369} 407}
370 408
409static void
410_create_rm_win()
411{
412 Eo *rm_win;
413 Eo *bg3;
414 Eo *rm_vbox;
415 Eo *rm_toolbar;
416 Eo *rm_sc;
417 Eo *rm_table;
418 Eo *rm_buttons_box;
419 Eo *rm_alias_entry;
420 Eo *rm_value_entry;
421 Eo *rm_cb_type_hoversel;
422 Eo *rm_seq_pub_check;
423 Eo *rm_image_fileselector;
424 Eo *rm_button_add;
425
371/* @egui 426/* @egui
372{ 427{
373 "entry_activate": 428 "rm_win":
374 { 429 {
375 "Desc": 430 "Desc":
376 { 431 {
377 "type":"sequence" 432 "parent":null,
433 "class":"Elm_Win",
434 "public":true,
435 "type":"widget"
378 }, 436 },
379 "Actions": 437 "Properties":
380 { 438 {
381 "User":["_seq_add_entry_activate_cb", ""], 439 "constructor":["elm_obj_win_constructor"],
382 "Modification":["button_sequence_add", "disabled", [false]] 440 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
441 "title":["Resource Manager"],
442 "autodel":[true],
443 "size":[640, 480],
444 "resize_object_add":["bg3"],
445 "resize_object_add":["rm_vbox"],
446 "modal":[true],
447 "visibility":[true]
448 },
449 "Callbacks":
450 {
451 "delete,request":"_rm_win_request_delete"
383 } 452 }
384 } 453 }
385 } 454 }
386@!egui */ 455@!egui */
387static Eina_Bool 456 rm_win = eo_add_custom(ELM_OBJ_WIN_CLASS, main_win, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
388_sequence_entry_activate_execute(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 457 eo_unref(rm_win);
458 pub_widgets.rm_win = rm_win;
459 eo_do(rm_win, elm_obj_win_title_set("Resource Manager"));
460 eo_do(rm_win, elm_obj_win_autodel_set(EINA_TRUE));
461 eo_do(rm_win, evas_obj_size_set(640, 480));
462 eo_do(rm_win, elm_obj_win_modal_set(EINA_TRUE));
463 eo_do(rm_win, eo_event_callback_add(ELM_WIN_EVENT_DELETE_REQUEST, _rm_win_request_delete, NULL));
464/* @egui
389{ 465{
390 extern Eina_Bool _seq_add_entry_activate_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 466 "bg3":
391 if (!_seq_add_entry_activate_cb(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP; 467 {
392 eo_do(button_sequence_add, elm_obj_widget_disabled_set(EINA_FALSE)); 468 "Desc":
393 return EO_CALLBACK_CONTINUE; 469 {
470 "parent":"rm_win",
471 "class":"Elm_Bg",
472 "type":"widget"
473 },
474 "Properties":
475 {
476 "color":[80, 80, 80, 255],
477 "size_hint_weight":[1, 1],
478 "visibility":[true]
479 }
480 }
481 }
482@!egui */
483 bg3 = eo_add(ELM_OBJ_BG_CLASS, rm_win);
484 eo_unref(bg3);
485 eo_do(bg3, elm_obj_bg_color_set(80, 80, 80, 255));
486 eo_do(bg3, evas_obj_size_hint_weight_set(1.000000, 1.000000));
487 eo_do(bg3, evas_obj_visibility_set(EINA_TRUE));
488 eo_do(rm_win, elm_obj_win_resize_object_add(bg3));
489/* @egui
490{
491 "rm_vbox":
492 {
493 "Desc":
494 {
495 "parent":"rm_win",
496 "class":"Elm_Box",
497 "type":"widget"
498 },
499 "Properties":
500 {
501 "size_hint_weight":[1, 1],
502 "visibility":[true]
503 },
504 "Contains":["rm_toolbar", "rm_sc", "rm_buttons_box"]
505 }
506 }
507@!egui */
508 rm_vbox = eo_add(ELM_OBJ_BOX_CLASS, rm_win);
509 eo_unref(rm_vbox);
510 eo_do(rm_vbox, evas_obj_size_hint_weight_set(1.000000, 1.000000));
511 eo_do(rm_vbox, evas_obj_visibility_set(EINA_TRUE));
512 eo_do(rm_win, elm_obj_win_resize_object_add(rm_vbox));
513/* @egui
514{
515 "rm_toolbar":
516 {
517 "Desc":
518 {
519 "parent":"rm_vbox",
520 "class":"Elm_Toolbar",
521 "public":true,
522 "type":"widget"
523 },
524 "Properties":
525 {
526 "style":["item_horizontal"],
527 "shrink_mode":["ELM_TOOLBAR_SHRINK_MENU"],
528 "select_mode":["ELM_OBJECT_SELECT_MODE_ALWAYS"],
529 "icon_size":[16],
530 "size_hint_weight":[1, 0],
531 "size_hint_align":[-1, 0],
532 "visibility":[true]
533 }
534 }
535 }
536@!egui */
537 rm_toolbar = eo_add(ELM_OBJ_TOOLBAR_CLASS, rm_vbox);
538 eo_unref(rm_toolbar);
539 pub_widgets.rm_toolbar = rm_toolbar;
540 eo_do(rm_toolbar, elm_obj_widget_style_set("item_horizontal"));
541 eo_do(rm_toolbar, elm_obj_toolbar_shrink_mode_set(ELM_TOOLBAR_SHRINK_MENU));
542 eo_do(rm_toolbar, elm_obj_toolbar_select_mode_set(ELM_OBJECT_SELECT_MODE_ALWAYS));
543 eo_do(rm_toolbar, elm_obj_toolbar_icon_size_set(16));
544 eo_do(rm_toolbar, evas_obj_size_hint_weight_set(1, 0));
545 eo_do(rm_toolbar, evas_obj_size_hint_align_set(EVAS_HINT_FILL, 0));
546 eo_do(rm_toolbar, evas_obj_visibility_set(EINA_TRUE));
547/* @egui
548{
549 "rm_sc":
550 {
551 "Desc":
552 {
553 "parent":"rm_vbox",
554 "class":"Elm_Scroller",
555 "type":"widget"
556 },
557 "Properties":
558 {
559 "visibility":[true],
560 "size_hint_weight":[1, 1],
561 "size_hint_align":[-1, -1],
562 "bounce_allow":[false, true]
563 },
564 "Contains":
565 {
566 "rm_table":[null]
567 }
568 }
569 }
570@!egui */
571 rm_sc = eo_add(ELM_OBJ_SCROLLER_CLASS, rm_vbox);
572 eo_unref(rm_sc);
573 eo_do(rm_sc, evas_obj_visibility_set(EINA_TRUE));
574 eo_do(rm_sc, evas_obj_size_hint_weight_set(1.000000, 1.000000));
575 eo_do(rm_sc, evas_obj_size_hint_align_set(-1.000000, -1.000000));
576 eo_do(rm_sc, elm_interface_scrollable_bounce_allow_set(EINA_FALSE, EINA_TRUE));
577/* @egui
578{
579 "rm_table":
580 {
581 "Desc":
582 {
583 "parent":"rm_sc",
584 "class":"Elm_Table",
585 "public":true,
586 "type":"widget"
587 },
588 "Properties":
589 {
590 "visibility":[true],
591 "padding":[6, 7],
592 "size_hint_align":[-1, 0],
593 "size_hint_weight":[1, 0]
594 }
595 }
596 }
597@!egui */
598 rm_table = eo_add(ELM_OBJ_TABLE_CLASS, rm_sc);
599 eo_unref(rm_table);
600 pub_widgets.rm_table = rm_table;
601 eo_do(rm_table, evas_obj_visibility_set(EINA_TRUE));
602 eo_do(rm_table, elm_obj_table_padding_set(6, 7));
603 eo_do(rm_table, evas_obj_size_hint_align_set(-1, 0));
604 eo_do(rm_table, evas_obj_size_hint_weight_set(1.000000, 0));
605 eo_do(rm_sc, elm_obj_container_content_set(NULL, rm_table));
606/* @egui
607{
608 "rm_buttons_box":
609 {
610 "Desc":
611 {
612 "parent":"rm_vbox",
613 "class":"Elm_Box",
614 "public":true,
615 "type":"widget"
616 },
617 "Properties":
618 {
619 "size_hint_weight":[1, 0],
620 "size_hint_align":[-1, 0],
621 "visibility":[true],
622 "horizontal":[true]
623 },
624 "Contains":["rm_alias_entry", "rm_value_entry", "rm_button_add"]
625 }
626 }
627@!egui */
628 rm_buttons_box = eo_add(ELM_OBJ_BOX_CLASS, rm_vbox);
629 eo_unref(rm_buttons_box);
630 pub_widgets.rm_buttons_box = rm_buttons_box;
631 eo_do(rm_buttons_box, evas_obj_size_hint_weight_set(1.000000, 0));
632 eo_do(rm_buttons_box, evas_obj_size_hint_align_set(-1.000000, 0));
633 eo_do(rm_buttons_box, evas_obj_visibility_set(EINA_TRUE));
634 eo_do(rm_buttons_box, elm_obj_box_horizontal_set(EINA_TRUE));
635 eo_do(rm_vbox, elm_obj_box_pack_end(rm_toolbar));
636 eo_do(rm_vbox, elm_obj_box_pack_end(rm_sc));
637 eo_do(rm_vbox, elm_obj_box_pack_end(rm_buttons_box));
638/* @egui
639{
640 "rm_alias_entry":
641 {
642 "Desc":
643 {
644 "parent":"rm_buttons_box",
645 "class":"Elm_Entry",
646 "public":true,
647 "type":"widget"
648 },
649 "Properties":
650 {
651 "size_hint_weight":[1, 0],
652 "size_hint_align":[-1, 0],
653 "scrollable":[true],
654 "single_line":[true],
655 "policy":["ELM_SCROLLER_POLICY_OFF", "ELM_SCROLLER_POLICY_OFF"],
656 "visibility":[true]
657 }
658 }
659 }
660@!egui */
661 rm_alias_entry = eo_add(ELM_OBJ_ENTRY_CLASS, rm_buttons_box);
662 eo_unref(rm_alias_entry);
663 pub_widgets.rm_alias_entry = rm_alias_entry;
664 eo_do(rm_alias_entry, evas_obj_size_hint_weight_set(1.000000, 0));
665 eo_do(rm_alias_entry, evas_obj_size_hint_align_set(-1.000000, 0));
666 eo_do(rm_alias_entry, elm_obj_entry_scrollable_set(EINA_TRUE));
667 eo_do(rm_alias_entry, elm_obj_entry_single_line_set(EINA_TRUE));
668 eo_do(rm_alias_entry, elm_interface_scrollable_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF));
669 eo_do(rm_alias_entry, evas_obj_visibility_set(EINA_TRUE));
670/* @egui
671{
672 "rm_value_entry":
673 {
674 "Desc":
675 {
676 "parent":"rm_buttons_box",
677 "class":"Elm_Entry",
678 "public":true,
679 "type":"widget"
680 },
681 "Properties":
682 {
683 "size_hint_weight":[1, 0],
684 "size_hint_align":[-1, 0],
685 "scrollable":[true],
686 "single_line":[true],
687 "policy":["ELM_SCROLLER_POLICY_OFF", "ELM_SCROLLER_POLICY_OFF"],
688 "visibility":[true]
689 }
690 }
691 }
692@!egui */
693 rm_value_entry = eo_add(ELM_OBJ_ENTRY_CLASS, rm_buttons_box);
694 eo_unref(rm_value_entry);
695 pub_widgets.rm_value_entry = rm_value_entry;
696 eo_do(rm_value_entry, evas_obj_size_hint_weight_set(1.000000, 0));
697 eo_do(rm_value_entry, evas_obj_size_hint_align_set(-1.000000, 0));
698 eo_do(rm_value_entry, elm_obj_entry_scrollable_set(EINA_TRUE));
699 eo_do(rm_value_entry, elm_obj_entry_single_line_set(EINA_TRUE));
700 eo_do(rm_value_entry, elm_interface_scrollable_policy_set(ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF));
701 eo_do(rm_value_entry, evas_obj_visibility_set(EINA_TRUE));
702/* @egui
703{
704 "rm_cb_type_hoversel":
705 {
706 "Desc":
707 {
708 "parent":"rm_buttons_box",
709 "class":"Elm_Hoversel",
710 "public":true,
711 "type":"widget"
712 },
713 "Properties":
714 {
715 "hover_parent":["rm_win"]
716 }
717 }
718 }
719@!egui */
720 rm_cb_type_hoversel = eo_add(ELM_OBJ_HOVERSEL_CLASS, rm_buttons_box);
721 eo_unref(rm_cb_type_hoversel);
722 pub_widgets.rm_cb_type_hoversel = rm_cb_type_hoversel;
723 eo_do(rm_cb_type_hoversel, elm_obj_hoversel_hover_parent_set(rm_win));
724/* @egui
725{
726 "rm_seq_pub_check":
727 {
728 "Desc":
729 {
730 "parent":"rm_buttons_box",
731 "class":"Elm_Check",
732 "public":true,
733 "type":"widget"
734 },
735 "Properties":
736 {
737 }
738 }
739 }
740@!egui */
741 rm_seq_pub_check = eo_add(ELM_OBJ_CHECK_CLASS, rm_buttons_box);
742 eo_unref(rm_seq_pub_check);
743 pub_widgets.rm_seq_pub_check = rm_seq_pub_check;
744 eo_do(rm_cb_type_hoversel, elm_obj_hoversel_hover_parent_set(rm_win));
745/* @egui
746{
747 "rm_image_fileselector":
748 {
749 "Desc":
750 {
751 "parent":"rm_buttons_box",
752 "class":"Elm_Fileselector_Entry",
753 "public":true,
754 "type":"widget"
755 },
756 "Properties":
757 {
758 "size_hint_weight":[1, 1],
759 "size_hint_align":[-1, 0],
760 "part_text":[null, "..."]
761 }
762 }
763 }
764@!egui */
765 rm_image_fileselector = eo_add(ELM_OBJ_FILESELECTOR_ENTRY_CLASS, rm_buttons_box);
766 eo_unref(rm_image_fileselector);
767 pub_widgets.rm_image_fileselector = rm_image_fileselector;
768 eo_do(rm_image_fileselector, evas_obj_size_hint_weight_set(1, 0.0));
769 eo_do(rm_image_fileselector, evas_obj_size_hint_align_set(EVAS_HINT_FILL, 0));
770 eo_do(rm_image_fileselector, elm_obj_widget_part_text_set(NULL, "..."));
771/* @egui
772{
773 "rm_button_add":
774 {
775 "Desc":
776 {
777 "parent":"rm_buttons_box",
778 "class":"Elm_Button",
779 "public":true,
780 "type":"widget"
781 },
782 "Properties":
783 {
784 "part_text":[null, "Add Resource"],
785 "visibility":[true]
786 },
787 "Callbacks":
788 {
789 "clicked":"_rm_add_button_clicked"
790 }
791 }
792 }
793@!egui */
794 rm_button_add = eo_add(ELM_OBJ_BUTTON_CLASS, rm_buttons_box);
795 eo_unref(rm_button_add);
796 pub_widgets.rm_button_add = rm_button_add;
797 eo_do(rm_button_add, elm_obj_widget_part_text_set(NULL, "Add Resource"));
798 eo_do(rm_button_add, evas_obj_visibility_set(EINA_TRUE));
799 eo_do(rm_button_add, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _rm_add_button_clicked, NULL));
800 eo_do(rm_buttons_box, elm_obj_box_pack_end(rm_alias_entry));
801 eo_do(rm_buttons_box, elm_obj_box_pack_end(rm_value_entry));
802 eo_do(rm_buttons_box, elm_obj_box_pack_end(rm_button_add));
803 eo_do(rm_win, evas_obj_visibility_set(EINA_TRUE));
394} 804}
395 805
806static void
807_create_settings_win()
808{
809 Eo *settings_win;
810 Eo *settings_bg;
811 Eo *settings_vbox;
812 Eo *settings_toolbar;
813 Eo *settings_table;
814 Eo *settings_buttons_box;
815 Eo *settings_button_apply;
816
817 Eo *project_name_label;
818 Eo *project_name_entry;
396 819
397/* @egui 820/* @egui
398{ 821{
399 "seq_add_entry_pack": 822 "settings_win":
400 { 823 {
401 "Desc": 824 "Desc":
402 { 825 {
403 "type":"sequence" 826 "parent":null,
827 "class":"Elm_Win",
828 "public":true,
829 "type":"widget"
830 },
831 "Properties":
832 {
833 "constructor":["elm_obj_win_constructor"],
834 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
835 "title":["Settings Manager"],
836 "autodel":[true],
837 "size":[640, 480],
838 "resize_object_add":["settings_bg"],
839 "resize_object_add":["settings_vbox"],
840 "modal":[true],
841 "visibility":[true]
842 },
843 "Callbacks":
844 {
845 "delete,request":"_settings_win_request_delete"
846 }
847 }
848 }
849@!egui */
850 settings_win = eo_add_custom(ELM_OBJ_WIN_CLASS, main_win, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
851 eo_unref(settings_win);
852 pub_widgets.settings_win = settings_win;
853 eo_do(settings_win, elm_obj_win_title_set("Settings Manager"));
854 eo_do(settings_win, elm_obj_win_autodel_set(EINA_TRUE));
855 eo_do(settings_win, evas_obj_size_set(640, 480));
856 eo_do(settings_win, elm_obj_win_modal_set(EINA_TRUE));
857 eo_do(settings_win, eo_event_callback_add(ELM_WIN_EVENT_DELETE_REQUEST, _settings_win_request_delete, NULL));
858/* @egui
859{
860 "settings_bg":
861 {
862 "Desc":
863 {
864 "parent":"settings_win",
865 "class":"Elm_Bg",
866 "type":"widget"
867 },
868 "Properties":
869 {
870 "color":[80, 80, 80, 255],
871 "size_hint_weight":[1, 1],
872 "visibility":[true]
873 }
874 }
875 }
876@!egui */
877 settings_bg = eo_add(ELM_OBJ_BG_CLASS, settings_win);
878 eo_unref(settings_bg);
879 eo_do(settings_bg, elm_obj_bg_color_set(80, 80, 80, 255));
880 eo_do(settings_bg, evas_obj_size_hint_weight_set(1.000000, 1.000000));
881 eo_do(settings_bg, evas_obj_visibility_set(EINA_TRUE));
882 eo_do(settings_win, elm_obj_win_resize_object_add(settings_bg));
883/* @egui
884{
885 "settings_vbox":
886 {
887 "Desc":
888 {
889 "parent":"settings_win",
890 "class":"Elm_Box",
891 "type":"widget"
892 },
893 "Properties":
894 {
895 "size_hint_weight":[1, 1],
896 "visibility":[true]
897 },
898 "Contains":["settings_toolbar", "settings_table", "settings_buttons_box"]
899 }
900 }
901@!egui */
902 settings_vbox = eo_add(ELM_OBJ_BOX_CLASS, settings_win);
903 eo_unref(settings_vbox);
904 eo_do(settings_vbox, evas_obj_size_hint_weight_set(1.000000, 1.000000));
905 eo_do(settings_vbox, evas_obj_visibility_set(EINA_TRUE));
906 eo_do(settings_win, elm_obj_win_resize_object_add(settings_vbox));
907/* @egui
908{
909 "settings_toolbar":
910 {
911 "Desc":
912 {
913 "parent":"settings_vbox",
914 "class":"Elm_Toolbar",
915 "public":true,
916 "type":"widget"
917 },
918 "Properties":
919 {
920 "style":["item_horizontal"],
921 "shrink_mode":["ELM_TOOLBAR_SHRINK_MENU"],
922 "select_mode":["ELM_OBJECT_SELECT_MODE_ALWAYS"],
923 "icon_size":[16],
924 "size_hint_weight":[1, 0],
925 "size_hint_align":[-1, 0],
926 "visibility":[true]
927 }