summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-04-11 11:26:06 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-04-11 11:26:06 -0700
commit21ee8b83370f0878591106e5625fa2c0a18b4226 (patch)
tree1302ade1f89fa80ed1621c6ccf0b75d040f3cc47
parent1f66a9e7315f7b5744e73fe5456b7633fc9104a2 (diff)
elementary: we actually need to include this generated files or make dist will fail.
-rw-r--r--src/examples/elementary/.gitignore2
-rw-r--r--src/examples/elementary/Makefile.am4
-rw-r--r--src/examples/elementary/codegen_example.edjbin0 -> 12063 bytes
-rw-r--r--src/examples/elementary/codegen_example_generated.c132
-rw-r--r--src/examples/elementary/codegen_example_generated.h65
5 files changed, 199 insertions, 4 deletions
diff --git a/src/examples/elementary/.gitignore b/src/examples/elementary/.gitignore
index b2a9ac5786..9d210a92ff 100644
--- a/src/examples/elementary/.gitignore
+++ b/src/examples/elementary/.gitignore
@@ -98,8 +98,6 @@
98/win_example 98/win_example
99/dayselector_example 99/dayselector_example
100/codegen_example 100/codegen_example
101/codegen_example_generated.c
102/codegen_example_generated.h
103/glview_example_01 101/glview_example_01
104/location_example_01 102/location_example_01
105/prefs_example_01 103/prefs_example_01
diff --git a/src/examples/elementary/Makefile.am b/src/examples/elementary/Makefile.am
index 3ed6b93bfd..482893d939 100644
--- a/src/examples/elementary/Makefile.am
+++ b/src/examples/elementary/Makefile.am
@@ -229,7 +229,6 @@ files_DATA += \
229 229
230clean-local: 230clean-local:
231 rm -f *.edj *.epb *.cfg *.cfg.bkp 231 rm -f *.edj *.epb *.cfg *.cfg.bkp
232 rm -f codegen_example_generated.c codegen_example_generated.h
233 232
234ELEMENTARY_CODEGEN_FLAGS = --prefix=codegen_example 233ELEMENTARY_CODEGEN_FLAGS = --prefix=codegen_example
235 234
@@ -576,7 +575,8 @@ screenshots: examples
576 convert $(HTML_SS_DIR)/$${SS_FILE} $(LATEX_SS_DIR)/$${SS_FILE/.png/.eps} ; \ 575 convert $(HTML_SS_DIR)/$${SS_FILE} $(LATEX_SS_DIR)/$${SS_FILE/.png/.eps} ; \
577 done 576 done
578 577
579EXTRA_DIST = dict.txt layout_example.edc theme_example.edc codegen_example.edc evas3d_map_example.edc twitter_example_01.edc performance/layout.edc performance/background.png performance/target_texture.png sphere_hunter/sphere_hunter.edc sphere_hunter/score.jpg sphere_hunter/EFL_victory.png sphere_hunter/EFL_defeat.png 578EXTRA_DIST = dict.txt layout_example.edc theme_example.edc codegen_example.edc evas3d_map_example.edc twitter_example_01.edc performance/layout.edc performance/background.png performance/target_texture.png sphere_hunter/sphere_hunter.edc sphere_hunter/score.jpg sphere_hunter/EFL_victory.png sphere_hunter/EFL_defeat.png codegen_example_generated.c codegen_example_generated.h codegen_example.edj
579
580 580
581examples: $(examples_PROGRAMS) 581examples: $(examples_PROGRAMS)
582 582
diff --git a/src/examples/elementary/codegen_example.edj b/src/examples/elementary/codegen_example.edj
new file mode 100644
index 0000000000..4f87ec8c82
--- /dev/null
+++ b/src/examples/elementary/codegen_example.edj
Binary files differ
diff --git a/src/examples/elementary/codegen_example_generated.c b/src/examples/elementary/codegen_example_generated.c
new file mode 100644
index 0000000000..8ce305ebda
--- /dev/null
+++ b/src/examples/elementary/codegen_example_generated.c
@@ -0,0 +1,132 @@
1#include "codegen_example_generated.h"
2
3Evas_Object *
4codegen_example_layout_add(Evas_Object *o, Elm_Theme *th, const char *edje_file)
5{
6 Evas_Object *l;
7
8 if (edje_file)
9 elm_theme_extension_add(th, edje_file);
10 else
11 elm_theme_extension_add(th, "./codegen_example.edj");
12
13 l = elm_layout_add(o);
14 if (!l) return NULL;
15
16 if (!elm_layout_theme_set(l, "example", "mylayout", "default"))
17 {
18 evas_object_del(l);
19 return NULL;
20 }
21
22 return l;
23}
24
25void
26codegen_example_title_set(Evas_Object *o, const char *value)
27{
28 elm_layout_text_set(o, "example/title", value);
29}
30
31const char *
32codegen_example_title_get(const Evas_Object *o)
33{
34 return elm_layout_text_get(o, "example/title");
35}
36
37void
38codegen_example_custom_set(Evas_Object *o, Evas_Object *value)
39{
40 elm_layout_content_set(o, "example/custom", value);
41}
42
43Evas_Object *
44codegen_example_custom_unset(Evas_Object *o)
45{
46 return elm_layout_content_unset(o, "example/custom");
47}
48
49Evas_Object *
50codegen_example_custom_get(const Evas_Object *o)
51{
52 return elm_layout_content_get(o, "example/custom");
53}
54
55Eina_Bool
56codegen_example_box_append(Evas_Object *o, Evas_Object *child)
57{
58 return elm_layout_box_append(o, "example/box", child);
59}
60
61Eina_Bool
62codegen_example_box_prepend(Evas_Object *o, Evas_Object *child)
63{
64 return elm_layout_box_prepend(o, "example/box", child);
65}
66
67Eina_Bool
68codegen_example_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
69{
70 return elm_layout_box_insert_before(o, "example/box", child, reference);
71}
72
73Eina_Bool
74codegen_example_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos)
75{
76 return elm_layout_box_insert_at(o, "example/box", child, pos);
77}
78
79Evas_Object *
80codegen_example_box_remove(Evas_Object *o, Evas_Object *child)
81{
82 return elm_layout_box_remove(o, "example/box", child);
83}
84
85Eina_Bool
86codegen_example_box_remove_all(Evas_Object *o, Eina_Bool clear)
87{
88 return elm_layout_box_remove_all(o, "example/box", clear);
89}
90
91Eina_Bool
92codegen_example_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
93{
94 return elm_layout_table_pack(o, "example/table", child, col, row, colspan, rowspan);
95}
96
97Evas_Object *
98codegen_example_table_unpack(Evas_Object *o, Evas_Object *child)
99{
100 return elm_layout_table_unpack(o, "example/table", child);
101}
102
103Eina_Bool
104codegen_example_table_clear(Evas_Object *o, Eina_Bool clear)
105{
106 return elm_layout_table_clear(o, "example/table", clear);
107}
108
109void
110codegen_example_swallow_grow_emit(Evas_Object *o)
111{
112 elm_layout_signal_emit(o, "button,enlarge", "");
113}
114
115void
116codegen_example_swallow_shrink_emit(Evas_Object *o)
117{
118 elm_layout_signal_emit(o, "button,reduce", "");
119}
120
121void
122codegen_example_size_changed_callback_add(Evas_Object *o, Edje_Signal_Cb func, void *data)
123{
124 elm_layout_signal_callback_add(o, "size,changed", "", func, data);
125}
126
127void
128codegen_example_size_changed_callback_del(Evas_Object *o, Edje_Signal_Cb func)
129{
130 elm_layout_signal_callback_del(o, "size,changed", "", func);
131}
132
diff --git a/src/examples/elementary/codegen_example_generated.h b/src/examples/elementary/codegen_example_generated.h
new file mode 100644
index 0000000000..b8fbc4e958
--- /dev/null
+++ b/src/examples/elementary/codegen_example_generated.h
@@ -0,0 +1,65 @@
1#ifndef _CODEGEN_EXAMPLE_GENERATED_H
2#define _CODEGEN_EXAMPLE_GENERATED_H
3
4#include <Edje.h>
5#include <Elementary.h>
6#include <Evas.h>
7
8#include <stdlib.h>
9
10/**
11 * @brief Creates the layout object and set the theme
12 * @param o The parent
13 * @param th The theme to add to, or if NULL, the default theme
14 * @param edje_file The path to edj, if NULL it's used the path given
15 * to elementary_codegen
16 */
17Evas_Object *codegen_example_layout_add(Evas_Object *o, Elm_Theme *th, const char *edje_file);
18
19/**
20 * @brief The example title
21 */
22void codegen_example_title_set(Evas_Object *o, const char *value);
23const char *codegen_example_title_get(const Evas_Object *o);
24
25/**
26 * @brief The swallow part
27 */
28void codegen_example_custom_set(Evas_Object *o, Evas_Object *value);
29Evas_Object *codegen_example_custom_unset(Evas_Object *o);
30Evas_Object *codegen_example_custom_get(const Evas_Object *o);
31
32/**
33 * @brief The box part
34 */
35Eina_Bool codegen_example_box_append(Evas_Object *o, Evas_Object *child);
36Eina_Bool codegen_example_box_prepend(Evas_Object *o, Evas_Object *child);
37Eina_Bool codegen_example_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference);
38Eina_Bool codegen_example_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos);
39Evas_Object *codegen_example_box_remove(Evas_Object *o, Evas_Object *child);
40Eina_Bool codegen_example_box_remove_all(Evas_Object *o, Eina_Bool clear);
41
42/**
43 * @brief The table part
44 */
45Eina_Bool codegen_example_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
46Evas_Object *codegen_example_table_unpack(Evas_Object *o, Evas_Object *child);
47Eina_Bool codegen_example_table_clear(Evas_Object *o, Eina_Bool clear);
48
49/**
50 * @brief Executed when the button enlarges
51 */
52void codegen_example_swallow_grow_emit(Evas_Object *o);
53
54/**
55 * @brief Executed when the button reduces
56 */
57void codegen_example_swallow_shrink_emit(Evas_Object *o);
58
59/**
60 * @brief Emit the signal size,changed
61 */
62void codegen_example_size_changed_callback_add(Evas_Object *o, Edje_Signal_Cb func, void *data);
63void codegen_example_size_changed_callback_del(Evas_Object *o, Edje_Signal_Cb func);
64
65#endif /* _CODEGEN_EXAMPLE_GENERATED_H */