summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-29 17:59:12 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-29 17:59:12 +0300
commit0bce23e2b7cce5fd90f921d07c0ae4a527a2b074 (patch)
treee255e28e980037da24dd878e97de59abad8f7234
parent440f294c85469947f978ffaa7a748beb2dce34f0 (diff)
update example
-rw-r--r--examples/example.c754
-rw-r--r--examples/example.h5
2 files changed, 97 insertions, 662 deletions
diff --git a/examples/example.c b/examples/example.c
index 80e4084..e383f76 100644
--- a/examples/example.c
+++ b/examples/example.c
@@ -5,10 +5,8 @@
5 5
6static GUI pub_widgets; 6static GUI pub_widgets;
7 7
8static Eo *elm_menu1; 8static Eo *elm_button1;
9static Eo *elm_table1; 9static Eo *elm_table1;
10static Eo *elm_image1;
11static Eo *elm_image2;
12/* @egui 10/* @egui
13{ 11{
14 "Resources": 12 "Resources":
@@ -17,30 +15,7 @@ static Eo *elm_image2;
17 { 15 {
18 "type":"resource" 16 "type":"resource"
19 }, 17 },
20 "Strings": 18 "Sequences":["BigBang", "button_show", "button_hide", "table_show", "table_hide"]
21 {
22 "id_open":"Open",
23 "id_close":"Close"
24 },
25 "Images":
26 {
27 "im_tux":"/home/yakov/tux.png",
28 "im_yak":"/home/yakov/yak-hi.png"
29 },
30 "Sequences":["BigBang", "show_menu", "show_table", "hide_table", "show_tux", "hide_tux", "show_minion", "hide_minion", "open_win2", "user_cb"],
31 "Eo_Callbacks":
32 {
33 "_callback_name":"_callback_name",
34 "bt_alias":"_bt_callback"
35 },
36 "Evas_Smart_Callbacks":
37 {
38 "evas_smart":"_evas_smart_cb"
39 },
40 "Evas_Callbacks":
41 {
42 "evas_cb":"_evas_cb"
43 }
44 } 19 }
45 } 20 }
46@!egui */ 21@!egui */
@@ -54,537 +29,15 @@ static Eo *elm_image2;
54 }, 29 },
55 "Settings": 30 "Settings":
56 { 31 {
57 "project":"project_name" 32 "project":"new_project"
58 }
59 }
60 }
61@!egui */
62extern Eina_Bool
63_callback_name(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
64extern Eina_Bool
65_bt_callback(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
66extern void
67_evas_smart_cb(void *data, Evas_Object *obj, void *event_info);
68extern void
69_evas_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
70
71/* @egui
72{
73 "show_menu":
74 {
75 "Desc":
76 {
77 "type":"sequence",
78 "public":true
79 },
80 "Actions":
81 {
82 "Modification":["elm_menu1", "visibility", [true]]
83 }
84 }
85 }
86@!egui */
87Eina_Bool
88project_name_show_menu(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
89{
90 eo_do(elm_menu1, evas_obj_visibility_set(EINA_TRUE));
91 return EO_CALLBACK_CONTINUE;
92}
93
94
95/* @egui
96{
97 "show_table":
98 {
99 "Desc":
100 {
101 "type":"sequence"
102 },
103 "Actions":
104 {
105 "Modification":["elm_table1", "visibility", [true]]
106 }
107 }
108 }
109@!egui */
110static Eina_Bool
111project_name_show_table(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
112{
113 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE));
114 return EO_CALLBACK_CONTINUE;
115}
116
117
118/* @egui
119{
120 "hide_table":
121 {
122 "Desc":
123 {
124 "type":"sequence"
125 },
126 "Actions":
127 {
128 "Modification":["elm_table1", "visibility", [false]]
129 }
130 }
131 }
132@!egui */
133static Eina_Bool
134project_name_hide_table(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
135{
136 eo_do(elm_table1, evas_obj_visibility_set(EINA_FALSE));
137 return EO_CALLBACK_CONTINUE;
138}
139
140static void
141_create_elm_win2()
142{
143 Eo *elm_win2;
144 Eo *elm_win2_main_menu;
145 Eo *elm_bg2;
146 Eo *elm_box2;
147 Eo *elm_calendar1;
148 Eo *elm_button2;
149 Eo *elm_icon1;
150 Eo *elm_image3;
151 Eo *elm_image4;
152 Eo *elm_image5;
153 Elm_Object_Item *elm_menu1_it0;
154
155/* @egui
156{
157 "elm_win2":
158 {
159 "Desc":
160 {
161 "parent":null,
162 "class":"Elm_Win",
163 "type":"widget"
164 },
165 "Properties":
166 {
167 "visibility":[true],
168 "constructor":["elm_obj_win_constructor"],
169 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
170 "size":[463, 568],
171 "title":["elm_win2"],
172 "autodel":[true],
173 "resize_object_add":["elm_bg2"],
174 "resize_object_add":["elm_box2"]
175 }
176 }
177 }
178@!egui */
179 elm_win2 = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, elm_obj_win_constructor(NULL, ELM_WIN_BASIC));
180 eo_unref(elm_win2);
181 eo_do(elm_win2, evas_obj_size_set(463, 568));
182 eo_do(elm_win2, elm_obj_win_title_set("elm_win2"));
183 eo_do(elm_win2, elm_obj_win_autodel_set(EINA_TRUE));
184/* @egui
185{
186 "elm_win2_main_menu":
187 {
188 "Desc":
189 {
190 "parent":"elm_win2",
191 "class":"Elm_Menu",
192 "type":"widget"
193 },
194 "Properties":
195 {},
196 "Items":
197 {}
198 }
199 }
200@!egui */
201 elm_win2_main_menu = eo_add(ELM_OBJ_MENU_CLASS, elm_win2);
202 eo_unref(elm_win2_main_menu);
203/* @egui
204{
205 "elm_bg2":
206 {
207 "Desc":
208 {
209 "parent":"elm_win2",
210 "class":"Elm_Bg",
211 "type":"widget"
212 },
213 "Properties":
214 {
215 "visibility":[true],
216 "part_text":[null, "elm_bg2"],
217 "size_hint_weight":[1, 1],
218 "file":["im_tux", null],
219 "position":[0, 0]
220 }
221 }
222 }
223@!egui */
224 elm_bg2 = eo_add(ELM_OBJ_BG_CLASS, elm_win2);
225 eo_unref(elm_bg2);
226 eo_do(elm_bg2, evas_obj_visibility_set(EINA_TRUE));
227 eo_do(elm_bg2, elm_obj_widget_part_text_set(NULL, "elm_bg2"));
228 eo_do(elm_bg2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
229 eo_do(elm_bg2, elm_obj_bg_file_set("/home/yakov/tux.png", NULL));
230 eo_do(elm_bg2, evas_obj_position_set(0, 0));
231 eo_do(elm_win2, elm_obj_win_resize_object_add(elm_bg2));
232/* @egui
233{
234 "elm_box2":
235 {
236 "Desc":
237 {
238 "parent":"elm_win2",
239 "class":"Elm_Box",
240 "type":"widget"
241 },
242 "Properties":
243 {
244 "visibility":[true],
245 "part_text":[null, "elm_box2"],
246 "size_hint_weight":[1, 1]
247 },
248 "Contains":["elm_button2", "elm_table1", "elm_calendar1"]
249 }
250 }
251@!egui */
252 elm_box2 = eo_add(ELM_OBJ_BOX_CLASS, elm_win2);
253 eo_unref(elm_box2);
254 eo_do(elm_box2, evas_obj_visibility_set(EINA_TRUE));
255 eo_do(elm_box2, elm_obj_widget_part_text_set(NULL, "elm_box2"));
256 eo_do(elm_box2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
257 eo_do(elm_win2, elm_obj_win_resize_object_add(elm_box2));
258/* @egui
259{
260 "elm_calendar1":
261 {
262 "Desc":
263 {
264 "parent":"elm_box2",
265 "class":"Elm_Calendar",
266 "type":"widget"
267 },
268 "Properties":
269 {
270 "visibility":[true],
271 "part_text":[null, "elm_calendar1"],
272 "size_hint_weight":[1, 1]
273 }
274 }
275 }
276@!egui */
277 elm_calendar1 = eo_add(ELM_OBJ_CALENDAR_CLASS, elm_box2);
278 eo_unref(elm_calendar1);
279 eo_do(elm_calendar1, evas_obj_visibility_set(EINA_TRUE));
280 eo_do(elm_calendar1, elm_obj_widget_part_text_set(NULL, "elm_calendar1"));
281 eo_do(elm_calendar1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
282/* @egui
283{
284 "elm_button2":
285 {
286 "Desc":
287 {
288 "parent":"elm_box2",
289 "class":"Elm_Button",
290 "type":"widget"
291 },
292 "Properties":
293 {
294 "visibility":[true],
295 "part_text":[null, "Menu"],
296 "size_hint_weight":[1, 1]
297 },
298 "Callbacks":
299 {
300 "clicked":"show_menu"
301 },
302 "Contains":
303 {
304 "elm_icon1":[null]
305 }
306 }
307 }
308@!egui */
309 elm_button2 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box2);
310 eo_unref(elm_button2);
311 eo_do(elm_button2, evas_obj_visibility_set(EINA_TRUE));
312 eo_do(elm_button2, elm_obj_widget_part_text_set(NULL, "Menu"));
313 eo_do(elm_button2, evas_obj_size_hint_weight_set(1.000000, 1.000000));
314 eo_do(elm_button2, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, project_name_show_menu, NULL));
315/* @egui
316{
317 "elm_icon1":
318 {
319 "Desc":
320 {
321 "parent":"elm_button2",
322 "class":"Elm_Icon",
323 "type":"widget"
324 },
325 "Properties":
326 {
327 "visibility":[true],
328 "part_text":[null, "elm_icon1"],
329 "size_hint_weight":[1, 1],
330 "file":["/home/yakov/logo.png", null],
331 "size":[100, 100]
332 }
333 }
334 }
335@!egui */
336 elm_icon1 = eo_add(ELM_OBJ_ICON_CLASS, elm_button2);
337 eo_unref(elm_icon1);
338 eo_do(elm_icon1, evas_obj_visibility_set(EINA_TRUE));
339 eo_do(elm_icon1, elm_obj_widget_part_text_set(NULL, "elm_icon1"));
340 eo_do(elm_icon1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
341 eo_do(elm_icon1, elm_obj_image_file_set("/home/yakov/logo.png", NULL));
342 eo_do(elm_icon1, evas_obj_size_set(100, 100));
343 eo_do(elm_button2, elm_obj_container_content_set(NULL, elm_icon1));
344/* @egui
345{
346 "elm_table1":
347 {
348 "Desc":
349 {
350 "parent":"elm_box2",
351 "class":"Elm_Table",
352 "type":"widget"
353 },
354 "Properties":
355 {
356 "visibility":[true],
357 "part_text":[null, "elm_table1"],
358 "size_hint_weight":[1, 1],
359 "size_hint_align":[-1, -1]
360 },
361 "Contains":
362 {
363 "elm_image3":[0, 0, 1, 1],
364 "elm_image4":[1, 1, 1, 1],
365 "elm_image5":[0, 1, 1, 1]
366 }
367 }
368 }
369@!egui */
370 elm_table1 = eo_add(ELM_OBJ_TABLE_CLASS, elm_box2);
371 eo_unref(elm_table1);
372 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE));
373 eo_do(elm_table1, elm_obj_widget_part_text_set(NULL, "elm_table1"));
374 eo_do(elm_table1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
375 eo_do(elm_table1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
376 eo_do(elm_box2, elm_obj_box_pack_end(elm_button2));
377 eo_do(elm_box2, elm_obj_box_pack_end(elm_table1));
378 eo_do(elm_box2, elm_obj_box_pack_end(elm_calendar1));
379/* @egui
380{
381 "elm_image3":
382 {
383 "Desc":
384 {
385 "parent":"elm_table1",
386 "class":"Elm_Image",
387 "type":"widget"
388 },
389 "Properties":
390 {
391 "visibility":[true],
392 "part_text":[null, "elm_image3"],
393 "size_hint_weight":[1, 1],
394 "file":["/home/yakov/sponge.png", null],
395 "resizable":[true, true],
396 "size":[100, 100],
397 "size_hint_align":[-1, -1],
398 "position":[0, 300]
399 }
400 }
401 }
402@!egui */
403 elm_image3 = eo_add(ELM_OBJ_IMAGE_CLASS, elm_table1);
404 eo_unref(elm_image3);
405 eo_do(elm_image3, evas_obj_visibility_set(EINA_TRUE));
406 eo_do(elm_image3, elm_obj_widget_part_text_set(NULL, "elm_image3"));
407 eo_do(elm_image3, evas_obj_size_hint_weight_set(1.000000, 1.000000));
408 eo_do(elm_image3, elm_obj_image_file_set("/home/yakov/sponge.png", NULL));
409 eo_do(elm_image3, elm_obj_image_resizable_set(EINA_TRUE, EINA_TRUE));
410 eo_do(elm_image3, evas_obj_size_set(100, 100));
411 eo_do(elm_image3, evas_obj_size_hint_align_set(-1.000000, -1.000000));
412 eo_do(elm_image3, evas_obj_position_set(0, 300));
413/* @egui
414{
415 "elm_image4":
416 {
417 "Desc":
418 {
419 "parent":"elm_table1",
420 "class":"Elm_Image",
421 "type":"widget"
422 },
423 "Properties":
424 {
425 "visibility":[true],
426 "part_text":[null, "elm_image4"],
427 "size_hint_weight":[1, 1],
428 "file":["/home/yakov/yak-hi.png", null],
429 "size":[100, 100],
430 "position":[50, 400],
431 "size_hint_align":[-1, -1]
432 } 33 }
433 } 34 }
434 } 35 }
435@!egui */ 36@!egui */
436 elm_image4 = eo_add(ELM_OBJ_IMAGE_CLASS, elm_table1);
437 eo_unref(elm_image4);
438 eo_do(elm_image4, evas_obj_visibility_set(EINA_TRUE));
439 eo_do(elm_image4, elm_obj_widget_part_text_set(NULL, "elm_image4"));
440 eo_do(elm_image4, evas_obj_size_hint_weight_set(1.000000, 1.000000));
441 eo_do(elm_image4, elm_obj_image_file_set("/home/yakov/yak-hi.png", NULL));
442 eo_do(elm_image4, evas_obj_size_set(100, 100));
443 eo_do(elm_image4, evas_obj_position_set(50, 400));
444 eo_do(elm_image4, evas_obj_size_hint_align_set(-1.000000, -1.000000));
445/* @egui
446{
447 "elm_image5":
448 {
449 "Desc":
450 {
451 "parent":"elm_table1",
452 "class":"Elm_Image",
453 "type":"widget"
454 },
455 "Properties":
456 {
457 "visibility":[true],
458 "part_text":[null, "elm_image5"],
459 "size_hint_weight":[1, 1],
460 "file":["/home/yakov/logo.png", null],
461 "size":[100, 100],
462 "size_hint_align":[-1, -1]
463 }
464 }
465 }
466@!egui */
467 elm_image5 = eo_add(ELM_OBJ_IMAGE_CLASS, elm_table1);
468 eo_unref(elm_image5);
469 eo_do(elm_image5, evas_obj_visibility_set(EINA_TRUE));
470 eo_do(elm_image5, elm_obj_widget_part_text_set(NULL, "elm_image5"));
471 eo_do(elm_image5, evas_obj_size_hint_weight_set(1.000000, 1.000000));
472 eo_do(elm_image5, elm_obj_image_file_set("/home/yakov/logo.png", NULL));
473 eo_do(elm_image5, evas_obj_size_set(100, 100));
474 eo_do(elm_image5, evas_obj_size_hint_align_set(-1.000000, -1.000000));
475 eo_do(elm_table1, elm_obj_table_pack(elm_image3, 0, 0, 1, 1));
476 eo_do(elm_table1, elm_obj_table_pack(elm_image4, 1, 1, 1, 1));
477 eo_do(elm_table1, elm_obj_table_pack(elm_image5, 0, 1, 1, 1));
478/* @egui
479{
480 "elm_menu1":
481 {
482 "Desc":
483 {
484 "parent":"elm_win2",
485 "class":"Elm_Menu",
486 "type":"widget"
487 },
488 "Properties":
489 {
490 "visibility":[true],
491 "part_text":[null, "elm_menu1"],
492 "size_hint_weight":[1, 1],
493 "menu_move":[300, 50]
494 },
495 "Items":
496 {
497 "elm_menu1_it0":
498 {
499 "type":"regular",
500 "icon":null,
501 "label":"Table",
502 "callback":null,
503 "Items":
504 {
505 "it1":
506 {
507 "type":"regular",
508 "icon":null,
509 "label":"Show",
510 "callback":null
511 },
512 "it2":
513 {
514 "type":"regular",
515 "icon":null,
516 "label":"Hide",
517 "callback":null
518 }
519 }
520 }
521 }
522 }
523 }
524@!egui */
525 elm_menu1 = eo_add(ELM_OBJ_MENU_CLASS, elm_win2);
526 eo_unref(elm_menu1);
527 eo_do(elm_menu1, elm_menu1_it0 = elm_obj_menu_item_add(NULL, NULL, "Table", NULL, NULL);
528 eo_do(elm_menu1, elm_obj_menu_item_add(elm_menu1_it0, NULL, "Show", NULL, NULL);
529 eo_do(elm_menu1, elm_obj_menu_item_add(elm_menu1_it0, NULL, "Hide", NULL, NULL);
530 eo_do(elm_menu1, evas_obj_visibility_set(EINA_TRUE));
531 eo_do(elm_menu1, elm_obj_widget_part_text_set(NULL, "elm_menu1"));
532 eo_do(elm_menu1, evas_obj_size_hint_weight_set(1.000000, 1.000000));
533 eo_do(elm_menu1, elm_obj_menu_move(300, 50));
534 eo_do(elm_win2, evas_obj_visibility_set(EINA_TRUE));
535}
536
537
538/* @egui
539{
540 "open_win2":
541 {
542 "Desc":
543 {
544 "type":"sequence"
545 },
546 "Actions":
547 {
548 "Creation":"elm_win2"
549 }
550 }
551 }
552@!egui */
553static Eina_Bool
554project_name_open_win2(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
555{
556 _create_elm_win2();
557
558 return EO_CALLBACK_CONTINUE;
559}
560
561
562/* @egui
563{
564 "user_cb":
565 {
566 "Desc":
567 {
568 "type":"sequence"
569 },
570 "Actions":
571 {
572 "User":["bt_alias", ""]
573 }
574 }
575 }
576@!egui */
577static Eina_Bool
578project_name_user_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
579{
580 if (!_bt_callback(NULL, obj, desc, event_info)) return EO_CALLBACK_STOP;
581 return EO_CALLBACK_CONTINUE;
582}
583
584 37
585/* @egui 38/* @egui
586{ 39{
587 "show_tux": 40 "button_show":
588 { 41 {
589 "Desc": 42 "Desc":
590 { 43 {
@@ -592,22 +45,22 @@ project_name_user_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event
592 }, 45 },
593 "Actions": 46 "Actions":
594 { 47 {
595 "Modification":["elm_image1", "visibility", [true]] 48 "Modification":["elm_button1", "visibility", [true]]
596 } 49 }
597 } 50 }
598 } 51 }
599@!egui */ 52@!egui */
600static Eina_Bool 53static Eina_Bool
601project_name_show_tux(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)
602{ 55{
603 eo_do(elm_image1, evas_obj_visibility_set(EINA_TRUE)); 56 eo_do(elm_button1, evas_obj_visibility_set(EINA_TRUE));
604 return EO_CALLBACK_CONTINUE; 57 return EO_CALLBACK_CONTINUE;
605} 58}
606 59
607 60
608/* @egui 61/* @egui
609{ 62{
610 "hide_tux": 63 "button_hide":
611 { 64 {
612 "Desc": 65 "Desc":
613 { 66 {
@@ -615,22 +68,22 @@ project_name_show_tux(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Even
615 }, 68 },
616 "Actions": 69 "Actions":
617 { 70 {
618 "Modification":["elm_image1", "visibility", [false]] 71 "Modification":["elm_button1", "visibility", [false]]
619 } 72 }
620 } 73 }
621 } 74 }
622@!egui */ 75@!egui */
623static Eina_Bool 76static Eina_Bool
624project_name_hide_tux(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 77new_project_button_hide(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
625{ 78{
626 eo_do(elm_image1, evas_obj_visibility_set(EINA_FALSE)); 79 eo_do(elm_button1, evas_obj_visibility_set(EINA_FALSE));
627 return EO_CALLBACK_CONTINUE; 80 return EO_CALLBACK_CONTINUE;
628} 81}
629 82
630 83
631/* @egui 84/* @egui
632{ 85{
633 "show_minion": 86 "table_show":
634 { 87 {
635 "Desc": 88 "Desc":
636 { 89 {
@@ -638,22 +91,22 @@ project_name_hide_tux(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Even
638 }, 91 },
639 "Actions": 92 "Actions":
640 { 93 {
641 "Modification":["elm_image2", "visibility", [true]] 94 "Modification":["elm_table1", "visibility", [true]]
642 } 95 }
643 } 96 }
644 } 97 }
645@!egui */ 98@!egui */
646static Eina_Bool 99static Eina_Bool
647project_name_show_minion(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 100new_project_table_show(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
648{ 101{
649 eo_do(elm_image2, evas_obj_visibility_set(EINA_TRUE)); 102 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE));
650 return EO_CALLBACK_CONTINUE; 103 return EO_CALLBACK_CONTINUE;
651} 104}
652 105
653 106
654/* @egui 107/* @egui
655{ 108{
656 "hide_minion": 109 "table_hide":
657 { 110 {
658 "Desc": 111 "Desc":
659 { 112 {
@@ -661,15 +114,15 @@ project_name_show_minion(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_E
661 }, 114 },
662 "Actions": 115 "Actions":
663 { 116 {
664 "Modification":["elm_image2", "visibility", [false]] 117 "Modification":["elm_table1", "visibility", [false]]
665 } 118 }
666 } 119 }
667 } 120 }
668@!egui */ 121@!egui */
669static Eina_Bool 122static Eina_Bool
670project_name_hide_minion(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)
671{ 124{
672 eo_do(elm_image2, evas_obj_visibility_set(EINA_FALSE)); 125 eo_do(elm_table1, evas_obj_visibility_set(EINA_FALSE));
673 return EO_CALLBACK_CONTINUE; 126 return EO_CALLBACK_CONTINUE;
674} 127}
675 128
@@ -678,11 +131,11 @@ _create_elm_win1()
678{ 131{
679 Eo *elm_win1; 132 Eo *elm_win1;
680 Eo *elm_win1_main_menu; 133 Eo *elm_win1_main_menu;
681 Elm_Object_Item *it0; 134 Elm_Object_Item *elm_win1_main_menu_it0;
682 Elm_Object_Item *it1; 135 Elm_Object_Item *elm_win1_main_menu_it1;
683 Eo *elm_bg1; 136 Eo *elm_bg1;
684 Eo *elm_box1; 137 Eo *elm_box1;
685 Eo *elm_button1; 138 Eo *elm_button2;
686 Eo *elm_button3; 139 Eo *elm_button3;
687 140
688/* @egui 141/* @egui
@@ -700,7 +153,7 @@ _create_elm_win1()
700 "visibility":[true], 153 "visibility":[true],
701 "constructor":["elm_obj_win_constructor"], 154 "constructor":["elm_obj_win_constructor"],
702 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"], 155 "elm_obj_win_constructor":[null, "ELM_WIN_BASIC"],
703 "size":[421, 560], 156 "size":[514, 665],
704 "title":["elm_win1"], 157 "title":["elm_win1"],
705 "resize_object_add":["elm_bg1"], 158 "resize_object_add":["elm_bg1"],
706 "resize_object_add":["elm_box1"], 159 "resize_object_add":["elm_box1"],
@@ -711,7 +164,7 @@ _create_elm_win1()
711@!egui */ 164@!egui */
712 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));
713 eo_unref(elm_win1); 166 eo_unref(elm_win1);
714 eo_do(elm_win1, evas_obj_size_set(421, 560)); 167 eo_do(elm_win1, evas_obj_size_set(514, 665));
715 eo_do(elm_win1, elm_obj_win_title_set("elm_win1")); 168 eo_do(elm_win1, elm_obj_win_title_set("elm_win1"));
716 eo_do(elm_win1, elm_obj_win_autodel_set(EINA_TRUE)); 169 eo_do(elm_win1, elm_obj_win_autodel_set(EINA_TRUE));
717/* @egui 170/* @egui
@@ -728,51 +181,51 @@ _create_elm_win1()
728 {}, 181 {},
729 "Items": 182 "Items":
730 { 183 {
731 "it0": 184 "elm_win1_main_menu_it0":
732 { 185 {
733 "type":"regular", 186 "type":"regular",
734 "icon":"fileopen", 187 "icon":"stop",
735 "label":"Tux", 188 "label":"Button",
736 "callback":null, 189 "callback":null,
737 "Items": 190 "Items":
738 { 191 {
739 "it8": 192 "elm_win1_main_menu_it2":
740 { 193 {
741 "type":"regular", 194 "type":"regular",
742 "icon":"list-add", 195 "icon":"fileopen",
743 "label":"Show", 196 "label":"Show",
744 "callback":"show_tux" 197 "callback":"button_show"
745 }, 198 },
746 "it9": 199 "elm_win1_main_menu_it3":
747 { 200 {
748 "type":"regular", 201 "type":"regular",
749 "icon":"search", 202 "icon":"list-add",
750 "label":"Hide", 203 "label":"Hide",
751 "callback":"hide_tux" 204 "callback":"button_hide"
752 } 205 }
753 } 206 }
754 }, 207 },
755 "it1": 208 "elm_win1_main_menu_it1":
756 { 209 {
757 "type":"regular", 210 "type":"regular",
758 "icon":"list-add", 211 "icon":"list-add",
759 "label":"Minion", 212 "label":"Table",
760 "callback":null, 213 "callback":null,
761 "Items": 214 "Items":
762 { 215 {
763 "it2": 216 "elm_win1_main_menu_it4":
764 { 217 {
765 "type":"regular", 218 "type":"regular",
766 "icon":"fileopen", 219 "icon":"search",
767 "label":"Show", 220 "label":"Show",
768 "callback":"show_minion" 221 "callback":"table_show"
769 }, 222 },
770 "it7": 223 "elm_win1_main_menu_it5":
771 { 224 {
772 "type":"regular", 225 "type":"regular",
773 "icon":"stop", 226 "icon":"fileopen",
774 "label":"Hide", 227 "label":"Hide",
775 "callback":"hide_minion" 228 "callback":"table_hide"
776 } 229 }
777 } 230 }
778 } 231 }
@@ -782,12 +235,12 @@ _create_elm_win1()
782@!egui */ 235@!egui */
783 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);
784 eo_unref(elm_win1_main_menu); 237 eo_unref(elm_win1_main_menu);
785 eo_do(elm_win1_main_menu, it0 = elm_obj_menu_item_add(NULL, "fileopen", "Tux", NULL, NULL); 238 eo_do(elm_win1_main_menu, elm_win1_main_menu_it0 = elm_obj_menu_item_add(NULL, "stop", "Button", NULL, NULL);
786 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(it0, "list-add", "Show", project_name_show_tux, 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);
787 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(it0, "search", "Hide", project_name_hide_tux, 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);
788 eo_do(elm_win1_main_menu, it1 = elm_obj_menu_item_add(NULL, "list-add", "Minion", NULL, NULL); 241 eo_do(elm_win1_main_menu, elm_win1_main_menu_it1 = elm_obj_menu_item_add(NULL, "list-add", "Table", NULL, NULL);
789 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(it1, "fileopen", "Show", project_name_show_minion, 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);
790 eo_do(elm_win1_main_menu, elm_obj_menu_item_add(it1, "stop", "Hide", project_name_hide_minion, 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);
791/* @egui 244/* @egui
792{ 245{
793 "elm_bg1": 246 "elm_bg1":
@@ -802,8 +255,7 @@ _create_elm_win1()
802 { 255 {
803 "visibility":[true], 256 "visibility":[true],
804 "part_text":[null, "elm_bg1"], 257 "part_text":[null, "elm_bg1"],
805 "size_hint_weight":[1, 1], 258 "size_hint_weight":[1, 1]
806 "file":["im_yak", null]
807 } 259 }
808 } 260 }
809 } 261 }
@@ -813,7 +265,6 @@ _create_elm_win1()
813 eo_do(elm_bg1, evas_obj_visibility_set(EINA_TRUE)); 265 eo_do(elm_bg1, evas_obj_visibility_set(EINA_TRUE));
814 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"));
815 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));
816 eo_do(elm_bg1, elm_obj_bg_file_set("/home/yakov/yak-hi.png", NULL));
817 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));
818/* @egui 269/* @egui
819{ 270{
@@ -831,7 +282,7 @@ _create_elm_win1()
831 "part_text":[null, "elm_box1"], 282 "part_text":[null, "elm_box1"],
832 "size_hint_weight":[1, 1] 283 "size_hint_weight":[1, 1]
833 }, 284 },
834 "Contains":["elm_image1", "elm_image2", "elm_button1", "elm_button3"] 285 "Contains":["elm_button1", "elm_table1"]
835 } 286 }
836 } 287 }
837@!egui */ 288@!egui */
@@ -843,104 +294,96 @@ _create_elm_win1()
843 eo_do(elm_win1, elm_obj_win_resize_object_add(elm_box1)); 294 eo_do(elm_win1, elm_obj_win_resize_object_add(elm_box1));
844/* @egui 295/* @egui
845{ 296{
846 "elm_image1": 297 "elm_button1":
847 { 298 {
848 "Desc": 299 "Desc":
849 { 300 {
850 "parent":"elm_box1", 301 "parent":"elm_box1",
851 "class":"Elm_Image", 302 "class":"Elm_Button",
852 "type":"widget" 303 "type":"widget"
853 }, 304 },
854 "Properties": 305 "Properties":
855 { 306 {
856 "visibility":[true], 307 "visibility":[true],
857 "part_text":[null, "elm_image1"], 308 "part_text":[null, "elm_button1"],
858 "size_hint_weight":[1, 1], 309 "size_hint_weight":[1, 1],
859 "resizable":[true, true], 310 "size_hint_align":[-1, -1]
860 "size_hint_align":[-1, -1],
861 "size":[100, 100],
862 "file":["/home/yakov/tux.png", null]
863 } 311 }
864 } 312 }
865 } 313 }
866@!egui */ 314@!egui */
867 elm_image1 = eo_add(ELM_OBJ_IMAGE_CLASS, elm_box1); 315 elm_button1 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box1);
868 eo_unref(elm_image1); 316 eo_unref(elm_button1);
869 eo_do(elm_image1, evas_obj_visibility_set(EINA_TRUE)); 317 eo_do(elm_button1, evas_obj_visibility_set(EINA_TRUE));
870 eo_do(elm_image1, elm_obj_widget_part_text_set(NULL, "elm_image1")); 318 eo_do(elm_button1, elm_obj_widget_part_text_set(NULL, "elm_button1"));
871 eo_do(elm_image1, 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));
872 eo_do(elm_image1, elm_obj_image_resizable_set(EINA_TRUE, EINA_TRUE)); 320 eo_do(elm_button1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
873 eo_do(elm_image1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
874 eo_do(elm_image1, evas_obj_size_set(100, 100));
875 eo_do(elm_image1, elm_obj_image_file_set("/home/yakov/tux.png", NULL));
876/* @egui 321/* @egui
877{ 322{
878 "elm_image2": 323 "elm_table1":
879 { 324 {
880 "Desc": 325 "Desc":
881 { 326 {
882 "parent":"elm_box1", 327 "parent":"elm_box1",
883 "class":"Elm_Image", 328 "class":"Elm_Table",
884 "type":"widget" 329 "type":"widget"
885 }, 330 },
886 "Properties": 331 "Properties":
887 { 332 {
888 "visibility":[true], 333 "visibility":[true],
889 "part_text":[null, "elm_image2"], 334 "part_text":[null, "elm_table1"],
890 "size_hint_weight":[1, 1], 335 "size_hint_weight":[1, 1],
891 "resizable":[true, true],
892 "file":["/home/yakov/minion.png", null],
893 "size":[100, 100],
894 "size_hint_align":[-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]
895 } 342 }
896 } 343 }
897 } 344 }
898@!egui */ 345@!egui */
899 elm_image2 = eo_add(ELM_OBJ_IMAGE_CLASS, elm_box1); 346 elm_table1 = eo_add(ELM_OBJ_TABLE_CLASS, elm_box1);
900 eo_unref(elm_image2); 347 eo_unref(elm_table1);
901 eo_do(elm_image2, evas_obj_visibility_set(EINA_TRUE)); 348 eo_do(elm_table1, evas_obj_visibility_set(EINA_TRUE));
902 eo_do(elm_image2, elm_obj_widget_part_text_set(NULL, "elm_image2")); 349 eo_do(elm_table1, elm_obj_widget_part_text_set(NULL, "elm_table1"));
903 eo_do(elm_image2, 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));
904 eo_do(elm_image2, elm_obj_image_resizable_set(EINA_TRUE, EINA_TRUE)); 351 eo_do(elm_table1, evas_obj_size_hint_align_set(-1.000000, -1.000000));
905 eo_do(elm_image2, elm_obj_image_file_set("/home/yakov/minion.png", NULL)); 352 eo_do(elm_box1, elm_obj_box_pack_end(elm_button1));
906 eo_do(elm_image2, evas_obj_size_set(100, 100)); 353 eo_do(elm_box1, elm_obj_box_pack_end(elm_table1));
907 eo_do(elm_image2, evas_obj_size_hint_align_set(-1.000000, -1.000000));
908/* @egui 354/* @egui
909{ 355{
910 "elm_button1": 356 "elm_button2":
911 { 357 {
912 "Desc": 358 "Desc":
913 { 359 {
914 "parent":"elm_box1", 360 "parent":"elm_table1",
915 "class":"Elm_Button", 361 "class":"Elm_Button",
916 "type":"widget" 362 "type":"widget"
917 }, 363 },
918 "Properties": 364 "Properties":
919 { 365 {
920 "visibility":[true], 366 "visibility":[true],
921 "part_text":[null, "New Window"], 367 "part_text":[null, "elm_button2"],
922 "size_hint_weight":[1, 1] 368 "size_hint_weight":[1, 1],
923 }, 369 "color":[0, 255, 0, 255]
924 "Callbacks":
925 {
926 "clicked":"open_win2"
927 } 370 }
928 } 371 }
929 } 372 }
930@!egui */ 373@!egui */
931 elm_button1 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box1); 374 elm_button2 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_table1);
932 eo_unref(elm_button1); 375 eo_unref(elm_button2);
933 eo_do(elm_button1, evas_obj_visibility_set(EINA_TRUE)); 376 eo_do(elm_button2, evas_obj_visibility_set(EINA_TRUE));
934 eo_do(elm_button1, elm_obj_widget_part_text_set(NULL, "New Window")); 377 eo_do(elm_button2, elm_obj_widget_part_text_set(NULL, "elm_button2"));
935 eo_do(elm_button1, 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));
936 eo_do(elm_button1, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, project_name_open_win2, NULL)); 379 eo_do(elm_button2, evas_obj_color_set(0, 255, 0, 255));
937/* @egui 380/* @egui
938{ 381{
939 "elm_button3": 382 "elm_button3":
940 { 383 {
941 "Desc": 384 "Desc":
942 { 385 {
943 "parent":"elm_box1", 386 "parent":"elm_table1",
944 "class":"Elm_Button", 387 "class":"Elm_Button",
945 "type":"widget" 388 "type":"widget"
946 }, 389 },
@@ -948,25 +391,20 @@ _create_elm_win1()
948 { 391 {
949 "visibility":[true], 392 "visibility":[true],
950 "part_text":[null, "elm_button3"], 393 "part_text":[null, "elm_button3"],
951 "size_hint_weight":[1, 1] 394 "size_hint_weight":[1, 1],
952 }, 395 "color":[255, 255, 0, 255]
953 "Callbacks":
954 {
955 "clicked":"bt_alias"
956 } 396 }
957 } 397 }
958 } 398 }
959@!egui */ 399@!egui */
960 elm_button3 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_box1); 400 elm_button3 = eo_add(ELM_OBJ_BUTTON_CLASS, elm_table1);
961 eo_unref(elm_button3); 401 eo_unref(elm_button3);
962 eo_do(elm_button3, evas_obj_visibility_set(EINA_TRUE)); 402 eo_do(elm_button3, evas_obj_visibility_set(EINA_TRUE));
963 eo_do(elm_button3, elm_obj_widget_part_text_set(NULL, "elm_button3")); 403 eo_do(elm_button3, elm_obj_widget_part_text_set(NULL, "elm_button3"));
964 eo_do(elm_button3, evas_obj_size_hint_weight_set(1.000000, 1.000000)); 404 eo_do(elm_button3, evas_obj_size_hint_weight_set(1.000000, 1.000000));
965 eo_do(elm_button3, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _bt_callback, NULL)); 405 eo_do(elm_button3, evas_obj_color_set(255, 255, 0, 255));
966 eo_do(elm_box1, elm_obj_box_pack_end(elm_image1)); 406 eo_do(elm_table1, elm_obj_table_pack(elm_button2, 0, 0, 1, 1));
967 eo_do(elm_box1, elm_obj_box_pack_end(elm_image2)); 407 eo_do(elm_table1, elm_obj_table_pack(elm_button3, 1, 1, 1, 1));
968 eo_do(elm_box1, elm_obj_box_pack_end(elm_button1));
969 eo_do(elm_box1, elm_obj_box_pack_end(elm_button3));
970 eo_do(elm_win1, evas_obj_visibility_set(EINA_TRUE)); 408 eo_do(elm_win1, evas_obj_visibility_set(EINA_TRUE));
971} 409}
972 410
@@ -987,19 +425,19 @@ _create_elm_win1()
987 } 425 }
988@!egui */ 426@!egui */
989static Eina_Bool 427static Eina_Bool
990project_name_BigBang(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)
991{ 429{
992 _create_elm_win1(); 430 _create_elm_win1();
993 431
994 return EO_CALLBACK_CONTINUE; 432 return EO_CALLBACK_CONTINUE;
995} 433}
996 434
997GUI* project_name_gui_get() 435GUI* new_project_gui_get()
998{ 436{
999 static Eina_Bool initialized = EINA_FALSE; 437 static Eina_Bool initialized = EINA_FALSE;
1000 if (!initialized) 438 if (!initialized)
1001 { 439 {
1002 project_name_BigBang(NULL, NULL, NULL, NULL); 440 new_project_BigBang(NULL, NULL, NULL, NULL);
1003 initialized = EINA_TRUE; 441 initialized = EINA_TRUE;
1004 } 442 }
1005 return &pub_widgets; 443 return &pub_widgets;
diff --git a/examples/example.h b/examples/example.h
index 1b95f5e..b8c5cbb 100644
--- a/examples/example.h
+++ b/examples/example.h
@@ -7,8 +7,5 @@ typedef struct
7{ 7{
8} GUI; 8} GUI;
9 9
10Eina_Bool 10GUI *new_project_gui_get();
11project_name_show_menu(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
12
13GUI *project_name_gui_get();
14#endif 11#endif