summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuciana Magno de Almeida <luciana@expertisesolutions.com.br>2015-01-15 17:45:56 -0200
committerLuciana Magno de Almeida <luciana@expertisesolutions.com.br>2015-01-15 17:45:56 -0200
commite96f7aab48796fa439f924f31c6543eb1e3a1b3f (patch)
tree2231e1512cb19bac786bb1af681717e20efda630
parent834dbd946236782e9041925b0bbaafc7f5734685 (diff)
cxx: Added and modified a few Elementary C++ examplesdevs/felipealmeida/examples
-rw-r--r--src/examples/Makefile.am10
-rw-r--r--src/examples/bg_cxx_example_02.cc9
-rw-r--r--src/examples/bg_cxx_example_03.cc234
-rw-r--r--src/examples/bubble_cxx_example_01.cc14
-rw-r--r--src/examples/calendar_cxx_example_01.cc7
-rw-r--r--src/examples/glview_cxx_example_01.cc35
-rw-r--r--src/examples/icon_cxx_example_01.cc1
7 files changed, 268 insertions, 42 deletions
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index ab503e829..a453b9aab 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -180,9 +180,10 @@ calendar_cxx_example_01.cc \
180bubble_cxx_example_01.cc \ 180bubble_cxx_example_01.cc \
181button_cxx_example_01.cc \ 181button_cxx_example_01.cc \
182button_cxx_example_00.cc \ 182button_cxx_example_00.cc \
183box_cxx_example_02.cc \
183bg_cxx_example_02.cc \ 184bg_cxx_example_02.cc \
184bg_cxx_example_01.cc \ 185bg_cxx_example_01.cc \
185box_cxx_example_02.cc 186bg_cxx_example_03.cc
186endif 187endif
187 188
188.edc.edj: 189.edc.edj:
@@ -364,9 +365,10 @@ calendar_cxx_example_01 \
364bubble_cxx_example_01 \ 365bubble_cxx_example_01 \
365button_cxx_example_01 \ 366button_cxx_example_01 \
366button_cxx_example_00 \ 367button_cxx_example_00 \
368box_cxx_example_02 \
367bg_cxx_example_02 \ 369bg_cxx_example_02 \
368bg_cxx_example_01 \ 370bg_cxx_example_01 \
369box_cxx_example_02 371bg_cxx_example_03
370endif 372endif
371 373
372if ELEMENTARY_WINDOWS_BUILD 374if ELEMENTARY_WINDOWS_BUILD
@@ -415,9 +417,10 @@ calendar_cxx_example_01_SOURCES = calendar_cxx_example_01.cc
415bubble_cxx_example_01_SOURCES = bubble_cxx_example_01.cc 417bubble_cxx_example_01_SOURCES = bubble_cxx_example_01.cc
416button_cxx_example_01_SOURCES = button_cxx_example_01.cc 418button_cxx_example_01_SOURCES = button_cxx_example_01.cc
417button_cxx_example_00_SOURCES = button_cxx_example_00.cc 419button_cxx_example_00_SOURCES = button_cxx_example_00.cc
420box_cxx_example_02_SOURCES = box_cxx_example_02.cc
418bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc 421bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
419bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc 422bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
420box_cxx_example_02_SOURCES = box_cxx_example_02.cc 423bg_cxx_example_03_SOURCES = bg_cxx_example_03.cc
421endif 424endif
422 425
423# This variable will hold the list of screenshots that will be made 426# This variable will hold the list of screenshots that will be made
@@ -507,7 +510,6 @@ menu_example_01:menu_example_01.png:0.5
507 510
508if HAVE_CXX11 511if HAVE_CXX11
509SCREENSHOTS += \ 512SCREENSHOTS += \
510calendar_cxx_example_01:calendar_cxx_example_01.png:1.3 \
511box_cxx_example_02:box_cxx_example_02.png:1.3 513box_cxx_example_02:box_cxx_example_02.png:1.3
512endif 514endif
513 515
diff --git a/src/examples/bg_cxx_example_02.cc b/src/examples/bg_cxx_example_02.cc
index 22feaf03a..966f6b1cd 100644
--- a/src/examples/bg_cxx_example_02.cc
+++ b/src/examples/bg_cxx_example_02.cc
@@ -34,24 +34,21 @@ extern "C"
34EAPI_MAIN int 34EAPI_MAIN int
35elm_main (int argc, char *argv[]) 35elm_main (int argc, char *argv[])
36{ 36{
37 // char buf[PATH_MAX];
38
39 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 37 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
40 38
39 elm_app_compile_data_dir_set("/home/luciana/Enlightenment/local/share/elementary/");
41 elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg"); 40 elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
42 41
43 ::elm_win win(elm_win_add(NULL, "bg-image", ELM_WIN_BASIC)); 42 ::elm_win win(win.elm_obj_win_constructor("bg-image", ELM_WIN_BASIC));
44 win.title_set("Bg Image"); 43 win.title_set("Bg Image");
45 win.autohide_set(true); 44 win.autohide_set(true);
46 45
47 ::elm_bg bg(efl::eo::parent = win); 46 ::elm_bg bg(efl::eo::parent = win);
48 bg.load_size_set(20, 20); 47 bg.load_size_set(20, 20);
49 bg.option_set(ELM_BG_OPTION_CENTER); 48 bg.option_set(ELM_BG_OPTION_CENTER);
50 // snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
51 // elm_bg_file_set(bg, buf, NULL);
52 std::stringstream ss; 49 std::stringstream ss;
53 ss << elm_app_data_dir_get() << "/images/plant_01.jpg"; 50 ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
54 bg.file_set(ss.str(), "image"); 51 bg.file_set(ss.str(), nullptr);
55 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 52 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
56 win.resize_object_add(bg); 53 win.resize_object_add(bg);
57 bg.visibility_set(true); 54 bg.visibility_set(true);
diff --git a/src/examples/bg_cxx_example_03.cc b/src/examples/bg_cxx_example_03.cc
new file mode 100644
index 000000000..3068d4ade
--- /dev/null
+++ b/src/examples/bg_cxx_example_03.cc
@@ -0,0 +1,234 @@
1extern "C"
2{
3#ifdef HAVE_CONFIG_H
4# include <elementary_config.h>
5#endif
6
7#define ELM_INTERNAL_API_ARGESFSDFEFC
8#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
9#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
10#define ELM_INTERFACE_ATSPI_ACTION_PROTECTED
11#define ELM_INTERFACE_ATSPI_VALUE_PROTECTED
12#define ELM_INTERFACE_ATSPI_EDITABLE_TEXT_PROTECTED
13#define ELM_INTERFACE_ATSPI_TEXT_PROTECTED
14#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
15#define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED
16#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
17
18#include <Eo.h>
19#include <Evas.h>
20#include <Elementary.h>
21#include <elm_widget.h>
22
23#include "elm_interface_atspi_accessible.h"
24#include "elm_interface_atspi_widget_action.h"
25}
26
27#include <sstream>
28
29#include <Elementary.hh>
30#include <Eina.hh>
31
32// void
33// _cb_radio_changed(::elm_bg o_bg, Eo_Event_Description const& desc EINA_UNUSED, void* info EINA_UNUSED)
34// {
35// Evas_Object *o_bg = data;
36
37// o_bg.option_set(rd.value_get());
38// }
39
40// void
41// _cb_overlay_changed(::elm_bg o_bg, Eo_Event_Description const& desc EINA_UNUSED, void* info EINA_UNUSED)
42// {
43// Evas_Object *o_bg = data;
44
45// if (obj.state_get())
46// {
47// Evas_Object *parent, *over;
48
49// //snprintf(buff, sizeof(buff), "%s/objects/test.edj", elm_app_data_dir_get());
50// std::stringstream ss1;
51// ss1 << elm_app_data_dir_get() << "/objects/teste.edj";
52// static_cast<evas::object>(parent) = o_bg.parent_widget_get();
53// over = edje_object_add(evas_object_evas_get(parent));
54// edje_object_file_set(over, buff, "bg_overlay");
55// o_bg.content_set("overlay", over);
56// }
57// else
58// o_bg.content_set("overlay", nullptr);
59// }
60
61EAPI_MAIN int
62elm_main (int argc, char *argv[])
63{
64 char buf[PATH_MAX];
65 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
66
67 elm_app_compile_data_dir_set("/home/luciana/Enlightenment/local/share/elementary/");
68 elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "objects/test.edj");
69
70 ::elm_win win(elm_win_util_standard_add("bg-options", "Bg Options"));
71 win.autodel_set(true);
72
73 ::elm_box box(efl::eo::parent = win);
74 box.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
75 win.resize_object_add(box);
76 box.visibility_set(true);
77
78 ::elm_bg o_bg(efl::eo::parent = win);
79 o_bg.option_set(ELM_BG_OPTION_CENTER);
80 std::stringstream ss;
81 ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
82 o_bg.file_set(ss.str(), nullptr);
83 o_bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
84 o_bg.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
85 box.pack_end(o_bg);
86 o_bg.visibility_set(true);
87
88 ::elm_box hbox(efl::eo::parent = win);
89 hbox.horizontal_set(true);
90 hbox.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
91 hbox.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
92
93 ::elm_radio rd(efl::eo::parent = win);
94 rd.state_value_set(ELM_BG_OPTION_CENTER);
95 rd.text_set("elm.text" , "Center");
96 rd.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_FILL);
97
98 auto cb_radio_changed = std::bind ([&] () { o_bg.option_set(rd.value_get()); });
99 rd.callback_changed_add (cb_radio_changed);
100 // evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
101 // efl::eo::signal_connection conn =
102 // rd.callback_changed_add
103 // ([&win] (::elm_radio& obj, Eo_Event_Description const& desc EINA_UNUSED, void* info EINA_UNUSED)
104 // {
105 // ::elm_bg o_bg2(efl::eo::parent = win);
106 // ::elm_radio rd(efl::eo::parent = win);
107 // o_bg2.option_set(static_cast<Elm_Bg_Option>(obj.value_get()));
108 // });
109 hbox.pack_end(rd);
110 rd.visibility_set(true);
111
112 ::elm_radio rdg(efl::eo::parent = win);
113 rdg = rd;
114
115 ::elm_radio rd2(efl::eo::parent = win);
116 rd2.state_value_set(ELM_BG_OPTION_SCALE);
117 rd2.group_add(rdg);
118 rd2.text_set(nullptr, "Scale");
119 rd2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_FILL);
120 //evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
121 //conn;
122 rd2.callback_changed_add(cb_radio_changed);
123 hbox.pack_end(rd2);
124 rd2.visibility_set(true);
125
126 ::elm_radio rd3(efl::eo::parent = win);
127 rd3.state_value_set(ELM_BG_OPTION_STRETCH);
128 rd3.group_add(rdg);
129 rd3.text_set(nullptr , "Stretch");
130 rd3.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_FILL);
131 // evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
132 //conn;
133 rd3.callback_changed_add(cb_radio_changed);
134 hbox.pack_end(rd3);
135 rd3.visibility_set(true);
136
137 ::elm_radio rd4(efl::eo::parent = win);
138 rd4.state_value_set(ELM_BG_OPTION_TILE);
139 rd4.group_add(rdg);
140 rd4.text_set("elm.text" , "Title");
141 rd4.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_FILL);
142 // evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
143 //conn;
144 rd4.callback_changed_add(cb_radio_changed);
145 hbox.pack_end(rd4);
146 rd4.visibility_set(true);
147
148 rdg.state_value_set(ELM_BG_OPTION_SCALE);
149
150 ::elm_radio rd_ch(efl::eo::parent = win);
151 ::elm_check ch(efl::eo::parent = win);
152 rd_ch = ch;
153 rd_ch.text_set(nullptr, "Show Overlay");
154 rd_ch.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_FILL);
155 // evas_object_smart_callback_add(rd, "changed", _cb_overlay_changed, o_bg);
156
157 auto cb_overlay_changed = std::bind ([&] () { if (ch.state_get())
158 {
159 ::efl::eina::optional< ::evas::object > parent, over;
160 std::stringstream ss1;
161 ss1 << elm_app_data_dir_get() << "/objects/teste.edj";
162 parent = o_bg.parent_widget_get();
163 over = edje_object_add(evas_object_evas_get(parent));
164 edje_object_file_set(over, buff, "bg_overlay");
165 o_bg.content_set("overlay", over);
166 }
167 else
168 o_bg.content_set("overlay", nullptr);
169 });
170
171 rd_ch.callback_changed_add(cb_overlay_changed);
172 hbox.pack_end(rd_ch);
173 rd_ch.visibility_set(true);
174
175 ::elm_radio rd_sp(efl::eo::parent = win);
176 ::elm_spinner sp(efl::eo::parent = win);
177 rd_sp = sp;
178 rd_sp.style_set("vertical");
179 rd_sp.min_max_set(1, 4);
180 rd_sp.label_format_set("%.0f");
181 rd_sp.editable_set(false);
182 rd_sp.special_value_add(1, "White");
183 rd_sp.special_value_add(2, "Red");
184 rd_sp.special_value_add(3, "Blue");
185 rd_sp.special_value_add(4, "Green");
186 rd_sp.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
187 rd_sp.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
188 // evas_object_smart_callback_add(rd, "changed", _cb_color_changed, o_bg);
189
190 auto cb_color_changed = std::bind ([&] () { double val = 0.0;
191 val = sp.value_get();
192 if (val == 1.0)
193 o_bg.color_set(255, 255, 255);
194 else if (val == 2.0)
195 o_bg.color_set(255, 0, 0);
196 else if (val == 3.0)
197 o_bg.color_set(0, 0, 255);
198 else if (val == 4.0)
199 o_bg.color_set(0, 255, 0);
200 });
201
202 rd_sp.callback_changed_add(cb_color_changed);
203
204 // efl::eo::signal_connection conn2 =
205 // rd2.callback_changed_add
206 // ([&win] (::elm_spinner& obj_, Eo_Event_Description const& desc EINA_UNUSED, void* info EINA_UNUSED)
207 // {
208 // ::elm_spinner obj(efl::eo::parent = win);
209 // ::elm_bg o_bg3(efl::eo::parent = win);
210 // double val = 0.0;
211 // val = obj.value_get();
212 // if (val == 1.0)
213 // o_bg3.color_set(255, 255, 255, 255);
214 // else if (val == 2.0)
215 // o_bg3.color_set(255, 0, 0, 255);
216 // else if (val == 3.0)
217 // o_bg3.color_set(0, 0, 255, 255);
218 // else if (val == 4.0)
219 // o_bg3.color_set(0, 255, 0, 255);
220 // });
221
222 hbox.pack_end(rd_sp);
223 rd_sp.visibility_set(true);
224
225 box.pack_end(hbox);
226 hbox.visibility_set(true);
227
228 win.size_set(460, 320);
229 win.visibility_set(true);
230
231 elm_run();
232 return 0;
233}
234ELM_MAIN();
diff --git a/src/examples/bubble_cxx_example_01.cc b/src/examples/bubble_cxx_example_01.cc
index d971d9063..e6df1b76e 100644
--- a/src/examples/bubble_cxx_example_01.cc
+++ b/src/examples/bubble_cxx_example_01.cc
@@ -56,7 +56,7 @@ elm_main (int argc, char *argv[])
56 icon.color_set( 0, 0, 255, 255); 56 icon.color_set( 0, 0, 255, 255);
57 icon.visibility_set(true); 57 icon.visibility_set(true);
58 58
59 elm_bubble bubble1(efl::eo::parent = win); 59 ::elm_bubble bubble1(efl::eo::parent = win);
60 bubble1.content_set("icon", icon); 60 bubble1.content_set("icon", icon);
61 bubble1.text_set("info", "INFO"); 61 bubble1.text_set("info", "INFO");
62 bubble1.text_set(nullptr, "LABEL"); 62 bubble1.text_set(nullptr, "LABEL");
@@ -65,12 +65,12 @@ elm_main (int argc, char *argv[])
65 bubble1.visibility_set(true); 65 bubble1.visibility_set(true);
66 66
67 auto bla = std::bind([&] () { static unsigned char corner = 0; 67 auto bla = std::bind([&] () { static unsigned char corner = 0;
68 ++corner; 68 ++corner;
69 if (corner > 3) 69 if (corner > 3)
70 bubble1.pos_set(ELM_BUBBLE_POS_TOP_LEFT); 70 bubble1.pos_set(ELM_BUBBLE_POS_TOP_LEFT);
71 else 71 else
72 bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner)); 72 bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner));
73 }); 73 });
74 74
75 bubble1.callback_clicked_add(bla); 75 bubble1.callback_clicked_add(bla);
76 76
diff --git a/src/examples/calendar_cxx_example_01.cc b/src/examples/calendar_cxx_example_01.cc
index 959f0166b..1a07e930c 100644
--- a/src/examples/calendar_cxx_example_01.cc
+++ b/src/examples/calendar_cxx_example_01.cc
@@ -26,16 +26,12 @@ extern "C"
26#include "elm_interface_scrollable.h" 26#include "elm_interface_scrollable.h"
27} 27}
28 28
29#include <Elementary.hh>
29#include <Eina.hh> 30#include <Eina.hh>
30 31
31#include <elm_win.eo.hh>
32#include <elm_calendar.eo.hh>
33
34
35EAPI_MAIN int 32EAPI_MAIN int
36elm_main (int argc, char *argv[]) 33elm_main (int argc, char *argv[])
37{ 34{
38
39 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 35 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
40 36
41 ::elm_win win(elm_win_util_standard_add("calendar", "Calendar Creation Example")); 37 ::elm_win win(elm_win_util_standard_add("calendar", "Calendar Creation Example"));
@@ -49,7 +45,6 @@ elm_main (int argc, char *argv[])
49 win.visibility_set(true); 45 win.visibility_set(true);
50 46
51 elm_run(); 47 elm_run();
52
53 return 0; 48 return 0;
54} 49}
55ELM_MAIN() 50ELM_MAIN()
diff --git a/src/examples/glview_cxx_example_01.cc b/src/examples/glview_cxx_example_01.cc
index 4f4e2f3ce..23fa61b7d 100644
--- a/src/examples/glview_cxx_example_01.cc
+++ b/src/examples/glview_cxx_example_01.cc
@@ -47,14 +47,12 @@ struct _GLData
47static float red = 1.0; 47static float red = 1.0;
48 48
49static GLuint 49static GLuint
50load_shader( GLData *gld, GLenum type, const char *shader_src ) 50load_shader(GLData *gld, GLenum type, const char *shader_src )
51{ 51{
52 Evas_GL_API *gl = gld->glapi; 52 Evas_GL_API *gl = gld->glapi;
53 GLuint shader; 53 GLuint shader;
54 GLint compiled; 54 GLint compiled;
55 55
56 std::cout << __func__ << ":" << __LINE__ << std::endl;
57
58 shader = gl->glCreateShader(type); 56 shader = gl->glCreateShader(type);
59 if (shader==0) 57 if (shader==0)
60 return 0; 58 return 0;
@@ -85,7 +83,9 @@ load_shader( GLData *gld, GLenum type, const char *shader_src )
85static int 83static int
86init_shaders(GLData *gld) 84init_shaders(GLData *gld)
87{ 85{
86 std::cout << __func__ << ":" << __LINE__ << std::endl;
88 Evas_GL_API *gl = gld->glapi; 87 Evas_GL_API *gl = gld->glapi;
88 std::cout << __func__ << ":" << __LINE__ << std::endl;
89 89
90 GLbyte vShaderStr[] = 90 GLbyte vShaderStr[] =
91 "attribute vec4 vPosition; \n" 91 "attribute vec4 vPosition; \n"
@@ -151,19 +151,18 @@ _init_gl(Evas_Object *obj)
151 0.5f, -0.5f, 0.0f }; 151 0.5f, -0.5f, 0.0f };
152 152
153 if (!init_shaders(gld)) 153 if (!init_shaders(gld))
154 { 154 {
155 std::cout << "Error Initializing Shaders" << std::endl; 155 std::cout << "Error Initializing Shaders" << std::endl;
156 return; 156 return;
157 } 157 }
158
159 std::cout << __func__ << ":" << __LINE__ << std::endl;
160 158
161 gl->glGenBuffers(1, &gld->vbo); 159 std::cout << __func__ << ":" << __LINE__ << std::endl;
162 std::cout << __func__ << ":" << __LINE__ << std::endl; 160 gl->glGenBuffers(1, &gld->vbo);
163 gl->glBindBuffer(GL_ARRAY_BUFFER, gld->vbo); 161 std::cout << __func__ << ":" << __LINE__ << std::endl;
164 std::cout << __func__ << ":" << __LINE__ << std::endl; 162 gl->glBindBuffer(GL_ARRAY_BUFFER, gld->vbo);
165 gl->glBufferData(GL_ARRAY_BUFFER, 3 * 3 * 4, vVertices, GL_STATIC_DRAW); 163 std::cout << __func__ << ":" << __LINE__ << std::endl;
166 std::cout << __func__ << ":" << __LINE__ << std::endl; 164 gl->glBufferData(GL_ARRAY_BUFFER, 3 * 3 * 4, vVertices, GL_STATIC_DRAW);
165 std::cout << __func__ << ":" << __LINE__ << std::endl;
167 166
168} 167}
169 168
@@ -268,8 +267,8 @@ elm_main (int argc, char *argv[])
268 win.resize_object_add(bx); 267 win.resize_object_add(bx);
269 bx.visibility_set(true); 268 bx.visibility_set(true);
270 269
271 ::elm_glview gl( gl.elm_obj_glview_version_constructor(EVAS_GL_GLES_2_X), 270 ::elm_glview gl(gl.elm_obj_glview_version_constructor(EVAS_GL_GLES_2_X),
272 efl::eo::parent = win); 271 efl::eo::parent = win);
273 gld->glapi = gl.gl_api_get(); 272 gld->glapi = gl.gl_api_get();
274 gl.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL); 273 gl.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
275 gl.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 274 gl.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -279,7 +278,7 @@ elm_main (int argc, char *argv[])
279 gl.resize_policy_set(ELM_GLVIEW_RESIZE_POLICY_RECREATE); 278 gl.resize_policy_set(ELM_GLVIEW_RESIZE_POLICY_RECREATE);
280 gl.render_policy_set(ELM_GLVIEW_RENDER_POLICY_ON_DEMAND); 279 gl.render_policy_set(ELM_GLVIEW_RENDER_POLICY_ON_DEMAND);
281 gl.init_func_set(_init_gl); 280 gl.init_func_set(_init_gl);
282 // gl.del_func_set(_del_gl); 281 gl.del_func_set(_del_gl);
283 gl.resize_func_set(_resize_gl); 282 gl.resize_func_set(_resize_gl);
284 gl.render_func_set(_draw_gl); 283 gl.render_func_set(_draw_gl);
285 284
diff --git a/src/examples/icon_cxx_example_01.cc b/src/examples/icon_cxx_example_01.cc
index f06992bc4..23b449be6 100644
--- a/src/examples/icon_cxx_example_01.cc
+++ b/src/examples/icon_cxx_example_01.cc
@@ -62,7 +62,6 @@ elm_main (int argc, char *argv[])
62 win.visibility_set(true); 62 win.visibility_set(true);
63 63
64 elm_run(); 64 elm_run();
65
66 return 0; 65 return 0;
67} 66}
68ELM_MAIN() 67ELM_MAIN()