summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/examples/ecore/ecore_compose_get_example.c6
-rw-r--r--src/examples/ecore/ecore_evas_buffer_example_02.c2
-rw-r--r--src/examples/ecore/ecore_evas_window_sizes_example.c6
-rw-r--r--src/examples/ecore/ecore_imf_example.c2
-rw-r--r--src/examples/ecore/ecore_job_example.c5
-rw-r--r--src/examples/edje/edje-multisense.c2
-rw-r--r--src/examples/eet/eet-data-file_descriptor_01.c20
-rw-r--r--src/examples/eina/eina_hash_02.c2
-rw-r--r--src/examples/eina/eina_hash_03.c2
-rw-r--r--src/examples/eina/eina_hash_04.c2
-rw-r--r--src/examples/eina/eina_hash_05.c2
-rw-r--r--src/examples/eina/eina_hash_06.c2
-rw-r--r--src/examples/evas/evas-box.c8
-rw-r--r--src/examples/evas/evas-gl.c114
14 files changed, 91 insertions, 84 deletions
diff --git a/src/examples/ecore/ecore_compose_get_example.c b/src/examples/ecore/ecore_compose_get_example.c
index 846b43b68f..f9b45cfe86 100644
--- a/src/examples/ecore/ecore_compose_get_example.c
+++ b/src/examples/ecore/ecore_compose_get_example.c
@@ -45,7 +45,7 @@ _is_modifier(const char *key)
45/******* end 1 : Ecore compose stuff *******/ 45/******* end 1 : Ecore compose stuff *******/
46 46
47static void 47static void
48_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) 48_key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
49{ 49{
50 Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event; 50 Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event;
51 int alt; 51 int alt;
@@ -57,7 +57,7 @@ _key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
57 ctrl = evas_key_modifier_is_set(ev->modifiers, "Control"); 57 ctrl = evas_key_modifier_is_set(ev->modifiers, "Control");
58 58
59 printf("down : keyname: %s key: %s compose: **%s** string: **%s** [%zu] %d (%d:%d:%d)\n", 59 printf("down : keyname: %s key: %s compose: **%s** string: **%s** [%zu] %d (%d:%d:%d)\n",
60 ev->keyname, ev->key, ev->string, ev->compose, (ev->compose) ? strlen(ev->compose) : -1, (ev->compose) ? *(ev->compose) : -1, 60 ev->keyname, ev->key, ev->string, ev->compose, (ev->compose) ? strlen(ev->compose) : (size_t)-1, (ev->compose) ? *(ev->compose) : -1,
61 alt, shift, ctrl); 61 alt, shift, ctrl);
62} 62}
63 63
@@ -138,7 +138,7 @@ _key_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
138} 138}
139 139
140static void 140static void
141_del(Ecore_Evas *ee) 141_del(Ecore_Evas *ee EINA_UNUSED)
142{ 142{
143 ecore_main_loop_quit(); 143 ecore_main_loop_quit();
144} 144}
diff --git a/src/examples/ecore/ecore_evas_buffer_example_02.c b/src/examples/ecore/ecore_evas_buffer_example_02.c
index 15180b6d8c..e1e59c462b 100644
--- a/src/examples/ecore/ecore_evas_buffer_example_02.c
+++ b/src/examples/ecore/ecore_evas_buffer_example_02.c
@@ -31,7 +31,7 @@ static Ecore_Evas *ee;
31static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png"; 31static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png";
32 32
33static void 33static void
34_on_destroy(Ecore_Evas *ee EINA_UNUSED) 34_on_destroy(Ecore_Evas *ee_ EINA_UNUSED)
35{ 35{
36 ecore_main_loop_quit(); 36 ecore_main_loop_quit();
37} 37}
diff --git a/src/examples/ecore/ecore_evas_window_sizes_example.c b/src/examples/ecore/ecore_evas_window_sizes_example.c
index d7f66ae407..9c71cb56b2 100644
--- a/src/examples/ecore/ecore_evas_window_sizes_example.c
+++ b/src/examples/ecore/ecore_evas_window_sizes_example.c
@@ -41,12 +41,12 @@ static const char commands[] = \
41 41
42/* to inform current window's size */ 42/* to inform current window's size */
43static void 43static void
44_canvas_resize_cb(Ecore_Evas *ee) 44_canvas_resize_cb(Ecore_Evas *ee_)
45{ 45{
46 int w, h; 46 int w, h;
47 char buf[1024]; 47 char buf[1024];
48 48
49 ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); 49 ecore_evas_geometry_get(ee_, NULL, NULL, &w, &h);
50 snprintf(buf, sizeof(buf), "%d x %d", w, h); 50 snprintf(buf, sizeof(buf), "%d x %d", w, h);
51 evas_object_text_text_set(text, buf); 51 evas_object_text_text_set(text, buf);
52 evas_object_move(text, (w - 150) / 2, (h - 50) / 2); 52 evas_object_move(text, (w - 150) / 2, (h - 50) / 2);
@@ -55,7 +55,7 @@ _canvas_resize_cb(Ecore_Evas *ee)
55} 55}
56 56
57static void 57static void
58_on_destroy(Ecore_Evas *ee EINA_UNUSED) 58_on_destroy(Ecore_Evas *ee_ EINA_UNUSED)
59{ 59{
60 ecore_main_loop_quit(); 60 ecore_main_loop_quit();
61} 61}
diff --git a/src/examples/ecore/ecore_imf_example.c b/src/examples/ecore/ecore_imf_example.c
index 60750373fd..ca8569cde9 100644
--- a/src/examples/ecore/ecore_imf_example.c
+++ b/src/examples/ecore/ecore_imf_example.c
@@ -365,6 +365,8 @@ _key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
365 control = evas_key_modifier_is_set(ev->modifiers, "Control"); 365 control = evas_key_modifier_is_set(ev->modifiers, "Control");
366 alt = evas_key_modifier_is_set(ev->modifiers, "Alt"); 366 alt = evas_key_modifier_is_set(ev->modifiers, "Alt");
367 shift = evas_key_modifier_is_set(ev->modifiers, "Shift"); 367 shift = evas_key_modifier_is_set(ev->modifiers, "Shift");
368 (void)alt;
369 (void)shift;
368 370
369 if (!strcmp(ev->key, "BackSpace")) 371 if (!strcmp(ev->key, "BackSpace"))
370 { 372 {
diff --git a/src/examples/ecore/ecore_job_example.c b/src/examples/ecore/ecore_job_example.c
index 541cadbc3c..221f01228c 100644
--- a/src/examples/ecore/ecore_job_example.c
+++ b/src/examples/ecore/ecore_job_example.c
@@ -37,6 +37,11 @@ main(void)
37 job3 = ecore_job_add(_job_print_cb, str3); 37 job3 = ecore_job_add(_job_print_cb, str3);
38 38
39 job_quit = ecore_job_add(_job_quit_cb, NULL); 39 job_quit = ecore_job_add(_job_quit_cb, NULL);
40
41 (void)job1;
42 (void)job3;
43 (void)job_quit;
44
40 printf("Created jobs 1, 2, 3 and quit.\n"); 45 printf("Created jobs 1, 2, 3 and quit.\n");
41 46
42 if (job2) 47 if (job2)
diff --git a/src/examples/edje/edje-multisense.c b/src/examples/edje/edje-multisense.c
index 5de3ae8b14..ed3470ad34 100644
--- a/src/examples/edje/edje-multisense.c
+++ b/src/examples/edje/edje-multisense.c
@@ -51,7 +51,7 @@ static Evas_Object *create_my_group(Evas *canvas)
51 return edje; 51 return edje;
52} 52}
53 53
54int main(int argc, char *argv[]) 54int main()
55{ 55{
56 Ecore_Evas *window; 56 Ecore_Evas *window;
57 Evas *canvas; 57 Evas *canvas;
diff --git a/src/examples/eet/eet-data-file_descriptor_01.c b/src/examples/eet/eet-data-file_descriptor_01.c
index 4f7291e0a3..cbdcb59bdc 100644
--- a/src/examples/eet/eet-data-file_descriptor_01.c
+++ b/src/examples/eet/eet-data-file_descriptor_01.c
@@ -405,11 +405,11 @@ main(int argc,
405 { 405 {
406 if (argc == 5) 406 if (argc == 5)
407 { 407 {
408 My_Account *acc = _my_cache_account_find(my_cache, argv[4]); 408 My_Account *acc_ = _my_cache_account_find(my_cache, argv[4]);
409 if (!acc) 409 if (!acc_)
410 { 410 {
411 acc = _my_account_new(argv[4]); 411 acc_ = _my_account_new(argv[4]);
412 eina_hash_direct_add(my_cache->accounts, acc->name, acc); 412 eina_hash_direct_add(my_cache->accounts, acc_->name, acc);
413 } 413 }
414 else 414 else
415 fprintf(stderr, "ERROR: account '%s' already exists.\n", 415 fprintf(stderr, "ERROR: account '%s' already exists.\n",
@@ -424,10 +424,10 @@ main(int argc,
424 { 424 {
425 if (argc == 6) 425 if (argc == 6)
426 { 426 {
427 My_Account *acc = _my_cache_account_find(my_cache, argv[4]); 427 My_Account *acc_ = _my_cache_account_find(my_cache, argv[4]);
428 if (acc) 428 if (acc_)
429 { 429 {
430 _my_post_add(acc, argv[5]); 430 _my_post_add(acc_, argv[5]);
431 } 431 }
432 else 432 else
433 fprintf(stderr, "ERROR: unknown account: '%s'\n", argv[4]); 433 fprintf(stderr, "ERROR: unknown account: '%s'\n", argv[4]);
@@ -441,11 +441,11 @@ main(int argc,
441 { 441 {
442 if (argc == 6) 442 if (argc == 6)
443 { 443 {
444 My_Account *acc = _my_cache_account_find(my_cache, argv[4]); 444 My_Account *acc_ = _my_cache_account_find(my_cache, argv[4]);
445 if (acc) 445 if (acc_)
446 { 446 {
447 My_Message *msg = _my_message_new(argv[5]); 447 My_Message *msg = _my_message_new(argv[5]);
448 acc->messages = eina_list_append(acc->messages, msg); 448 acc_->messages = eina_list_append(acc_->messages, msg);
449 } 449 }
450 else 450 else
451 fprintf(stderr, "ERROR: unknown account: '%s'\n", argv[4]); 451 fprintf(stderr, "ERROR: unknown account: '%s'\n", argv[4]);
diff --git a/src/examples/eina/eina_hash_02.c b/src/examples/eina/eina_hash_02.c
index 348c6d1329..26de70a632 100644
--- a/src/examples/eina/eina_hash_02.c
+++ b/src/examples/eina/eina_hash_02.c
@@ -46,7 +46,7 @@ _phone_book_stringshared_free_cb(void *data)
46} 46}
47 47
48static Eina_Bool 48static Eina_Bool
49_phone_book_stringshared_foreach_cb(const Eina_Hash *phone_book, 49_phone_book_stringshared_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED,
50 const void *key EINA_UNUSED, 50 const void *key EINA_UNUSED,
51 void *data, 51 void *data,
52 void *fdata EINA_UNUSED) 52 void *fdata EINA_UNUSED)
diff --git a/src/examples/eina/eina_hash_03.c b/src/examples/eina/eina_hash_03.c
index 5e88a20a82..d674a231f5 100644
--- a/src/examples/eina/eina_hash_03.c
+++ b/src/examples/eina/eina_hash_03.c
@@ -37,7 +37,7 @@ _phone_entry_free_cb(void *data)
37} 37}
38 38
39static Eina_Bool 39static Eina_Bool
40_phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key, 40_phone_book_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED, const void *key,
41 void *data, void *fdata EINA_UNUSED) 41 void *data, void *fdata EINA_UNUSED)
42{ 42{
43 const char *name = key; 43 const char *name = key;
diff --git a/src/examples/eina/eina_hash_04.c b/src/examples/eina/eina_hash_04.c
index fd4624ccd2..f91a37db66 100644
--- a/src/examples/eina/eina_hash_04.c
+++ b/src/examples/eina/eina_hash_04.c
@@ -37,7 +37,7 @@ _phone_entry_free_cb(void *data)
37} 37}
38 38
39static Eina_Bool 39static Eina_Bool
40_phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key, 40_phone_book_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED, const void *key,
41 void *data, void *fdata EINA_UNUSED) 41 void *data, void *fdata EINA_UNUSED)
42{ 42{
43 const char *name = key; 43 const char *name = key;
diff --git a/src/examples/eina/eina_hash_05.c b/src/examples/eina/eina_hash_05.c
index b5956cbe3a..2277e6f7a8 100644
--- a/src/examples/eina/eina_hash_05.c
+++ b/src/examples/eina/eina_hash_05.c
@@ -37,7 +37,7 @@ _phone_entry_free_cb(void *data)
37} 37}
38 38
39static Eina_Bool 39static Eina_Bool
40_phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key, 40_phone_book_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED, const void *key,
41 void *data, void *fdata EINA_UNUSED) 41 void *data, void *fdata EINA_UNUSED)
42{ 42{
43 const int32_t *id = key; 43 const int32_t *id = key;
diff --git a/src/examples/eina/eina_hash_06.c b/src/examples/eina/eina_hash_06.c
index 7e961de3aa..3702ec8d0b 100644
--- a/src/examples/eina/eina_hash_06.c
+++ b/src/examples/eina/eina_hash_06.c
@@ -37,7 +37,7 @@ _phone_entry_free_cb(void *data)
37} 37}
38 38
39static Eina_Bool 39static Eina_Bool
40_phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key, 40_phone_book_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED, const void *key,
41 void *data, void *fdata EINA_UNUSED) 41 void *data, void *fdata EINA_UNUSED)
42{ 42{
43 const int64_t *id = key; 43 const int64_t *id = key;
diff --git a/src/examples/evas/evas-box.c b/src/examples/evas/evas-box.c
index 160135dc53..55e0c217b8 100644
--- a/src/examples/evas/evas-box.c
+++ b/src/examples/evas/evas-box.c
@@ -135,12 +135,12 @@ list_free:
135 135
136 if (evas_key_modifier_is_set(mods, "Control")) 136 if (evas_key_modifier_is_set(mods, "Control"))
137 { 137 {
138 Evas_Object *o; 138 Evas_Object *o_;
139 int pos; 139 int pos;
140 pos = atoi(ev->key); 140 pos = atoi(ev->key);
141 o = _new_rectangle_add(d.evas); 141 o_ = _new_rectangle_add(d.evas);
142 if (!evas_object_box_insert_at(d.box, o, pos)) 142 if (!evas_object_box_insert_at(d.box, o_, pos))
143 evas_object_box_append(d.box, o); 143 evas_object_box_append(d.box, o_);
144 return; 144 return;
145 } 145 }
146 146
diff --git a/src/examples/evas/evas-gl.c b/src/examples/evas/evas-gl.c
index 6593d64ea4..51e82f323d 100644
--- a/src/examples/evas/evas-gl.c
+++ b/src/examples/evas/evas-gl.c
@@ -214,29 +214,29 @@ view_set_ortho(float result[16], const float left, const float right,
214} 214}
215 215
216static void 216static void
217init_shaders(GLData *gldata) 217init_shaders(GLData *gl_data)
218{ 218{
219 Evas_GL_API *gl = gldata->glapi; 219 Evas_GL_API *gl = gl_data->glapi;
220 const char *p; 220 const char *p;
221 221
222 p = vertex_shader; 222 p = vertex_shader;
223 gldata->vtx_shader = gl->glCreateShader(GL_VERTEX_SHADER); 223 gl_data->vtx_shader = gl->glCreateShader(GL_VERTEX_SHADER);
224 gl->glShaderSource(gldata->vtx_shader, 1, &p, NULL); 224 gl->glShaderSource(gl_data->vtx_shader, 1, &p, NULL);
225 gl->glCompileShader(gldata->vtx_shader); 225 gl->glCompileShader(gl_data->vtx_shader);
226 226
227 p = fragment_shader; 227 p = fragment_shader;
228 gldata->fgmt_shader = gl->glCreateShader(GL_FRAGMENT_SHADER); 228 gl_data->fgmt_shader = gl->glCreateShader(GL_FRAGMENT_SHADER);
229 gl->glShaderSource(gldata->fgmt_shader, 1, &p, NULL); 229 gl->glShaderSource(gl_data->fgmt_shader, 1, &p, NULL);
230 gl->glCompileShader(gldata->fgmt_shader); 230 gl->glCompileShader(gl_data->fgmt_shader);
231 231
232 gldata->program = gl->glCreateProgram(); 232 gl_data->program = gl->glCreateProgram();
233 gl->glAttachShader(gldata->program, gldata->vtx_shader); 233 gl->glAttachShader(gl_data->program, gl_data->vtx_shader);
234 gl->glAttachShader(gldata->program, gldata->fgmt_shader); 234 gl->glAttachShader(gl_data->program, gl_data->fgmt_shader);
235 gl->glBindAttribLocation(gldata->program, 0, "vPosition"); 235 gl->glBindAttribLocation(gl_data->program, 0, "vPosition");
236 gl->glBindAttribLocation(gldata->program, 1, "inColor"); 236 gl->glBindAttribLocation(gl_data->program, 1, "inColor");
237 237
238 gl->glLinkProgram(gldata->program); 238 gl->glLinkProgram(gl_data->program);
239 gl->glUseProgram(gldata->program); 239 gl->glUseProgram(gl_data->program);
240 gl->glEnable(GL_DEPTH_TEST); 240 gl->glEnable(GL_DEPTH_TEST);
241} 241}
242 242
@@ -245,35 +245,35 @@ img_pixel_cb(void *data, Evas_Object *obj)
245{ 245{
246 //Define the model view projection matrix 246 //Define the model view projection matrix
247 float model[16], mvp[16]; 247 float model[16], mvp[16];
248 GLData *gldata = data; 248 GLData *gl_data = data;
249 Evas_GL_API *glapi = gldata->glapi; 249 Evas_GL_API *glapi = gl_data->glapi;
250 250
251 Evas_Coord w, h; 251 Evas_Coord w, h;
252 evas_object_image_size_get(obj, &w, &h); 252 evas_object_image_size_get(obj, &w, &h);
253 253
254 //Set up the context and surface as the current one 254 //Set up the context and surface as the current one
255 evas_gl_make_current(gldata->evasgl, gldata->sfc, gldata->ctx); 255 evas_gl_make_current(gl_data->evasgl, gl_data->sfc, gl_data->ctx);
256 256
257 //Initialize gl stuff just one time. 257 //Initialize gl stuff just one time.
258 if (!gldata->initialized) 258 if (!gl_data->initialized)
259 { 259 {
260 float aspect; 260 float aspect;
261 init_shaders(gldata); 261 init_shaders(gl_data);
262 glapi->glGenBuffers(1, &gldata->vbo); 262 glapi->glGenBuffers(1, &gl_data->vbo);
263 glapi->glBindBuffer(GL_ARRAY_BUFFER, gldata->vbo); 263 glapi->glBindBuffer(GL_ARRAY_BUFFER, gl_data->vbo);
264 glapi->glBufferData(GL_ARRAY_BUFFER, 3 * 72 * 4, cube_vertices,GL_STATIC_DRAW); 264 glapi->glBufferData(GL_ARRAY_BUFFER, 3 * 72 * 4, cube_vertices,GL_STATIC_DRAW);
265 init_matrix(gldata->view); 265 init_matrix(gl_data->view);
266 if(w > h) 266 if(w > h)
267 { 267 {
268 aspect = (float)w/h; 268 aspect = (float)w/h;
269 view_set_ortho(gldata->view, -1.0 * aspect, 1.0 * aspect, -1.0, 1.0, -1.0, 1.0); 269 view_set_ortho(gl_data->view, -1.0 * aspect, 1.0 * aspect, -1.0, 1.0, -1.0, 1.0);
270 } 270 }
271 else 271 else
272 { 272 {
273 aspect = (float)h/w; 273 aspect = (float)h/w;
274 view_set_ortho(gldata->view, -1.0, 1.0, -1.0 * aspect, 1.0 * aspect, -1.0, 1.0); 274 view_set_ortho(gl_data->view, -1.0, 1.0, -1.0 * aspect, 1.0 * aspect, -1.0, 1.0);
275 } 275 }
276 gldata->initialized = EINA_TRUE; 276 gl_data->initialized = EINA_TRUE;
277 } 277 }
278 278
279 glapi->glViewport(0, 0, w, h); 279 glapi->glViewport(0, 0, w, h);
@@ -281,19 +281,19 @@ img_pixel_cb(void *data, Evas_Object *obj)
281 glapi->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 281 glapi->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
282 282
283 init_matrix(model); 283 init_matrix(model);
284 rotate_xyz(model, gldata->xangle, gldata->yangle, 0.0f); 284 rotate_xyz(model, gl_data->xangle, gl_data->yangle, 0.0f);
285 multiply_matrix(mvp, gldata->view, model); 285 multiply_matrix(mvp, gl_data->view, model);
286 286
287 glapi->glUseProgram(gldata->program); 287 glapi->glUseProgram(gl_data->program);
288 glapi->glBindBuffer(GL_ARRAY_BUFFER, gldata->vbo); 288 glapi->glBindBuffer(GL_ARRAY_BUFFER, gl_data->vbo);
289 glapi->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 6, 0); 289 glapi->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 6, 0);
290 glapi->glEnableVertexAttribArray(0); 290 glapi->glEnableVertexAttribArray(0);
291 291
292 glapi->glBindBuffer(GL_ARRAY_BUFFER, gldata->vbo); 292 glapi->glBindBuffer(GL_ARRAY_BUFFER, gl_data->vbo);
293 glapi->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 6, (void*)(sizeof(float)*3)); 293 glapi->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 6, (void*)(sizeof(float)*3));
294 glapi->glEnableVertexAttribArray(1); 294 glapi->glEnableVertexAttribArray(1);
295 295
296 glapi->glUniformMatrix4fv( glapi->glGetUniformLocation(gldata->program, "mvpMatrix"), 1, GL_FALSE, mvp); 296 glapi->glUniformMatrix4fv( glapi->glGetUniformLocation(gl_data->program, "mvpMatrix"), 1, GL_FALSE, mvp);
297 glapi->glDrawArrays(GL_TRIANGLES, 0, 36); 297 glapi->glDrawArrays(GL_TRIANGLES, 0, 36);
298 298
299 glapi->glFinish(); 299 glapi->glFinish();
@@ -302,21 +302,21 @@ img_pixel_cb(void *data, Evas_Object *obj)
302static void 302static void
303img_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 303img_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
304{ 304{
305 GLData *gldata = data; 305 GLData *gl_data = data;
306 Evas_GL_API *glapi = gldata->glapi; 306 Evas_GL_API *glapi = gl_data->glapi;
307 307
308 //Free the gl resources when image object is deleted. 308 //Free the gl resources when image object is deleted.
309 evas_gl_make_current(gldata->evasgl, gldata->sfc, gldata->ctx); 309 evas_gl_make_current(gl_data->evasgl, gl_data->sfc, gl_data->ctx);
310 310
311 glapi->glDeleteShader(gldata->vtx_shader); 311 glapi->glDeleteShader(gl_data->vtx_shader);
312 glapi->glDeleteShader(gldata->fgmt_shader); 312 glapi->glDeleteShader(gl_data->fgmt_shader);
313 glapi->glDeleteProgram(gldata->program); 313 glapi->glDeleteProgram(gl_data->program);
314 glapi->glDeleteBuffers(1, &gldata->vbo); 314 glapi->glDeleteBuffers(1, &gl_data->vbo);
315 315
316 evas_gl_surface_destroy(gldata->evasgl, gldata->sfc); 316 evas_gl_surface_destroy(gl_data->evasgl, gl_data->sfc);
317 evas_gl_context_destroy(gldata->evasgl, gldata->ctx); 317 evas_gl_context_destroy(gl_data->evasgl, gl_data->ctx);
318 318
319 evas_gl_free(gldata->evasgl); 319 evas_gl_free(gl_data->evasgl);
320} 320}
321 321
322static Eina_Bool 322static Eina_Bool
@@ -335,8 +335,8 @@ _animator_cb(void *data)
335static void 335static void
336_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 336_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
337{ 337{
338 GLData *gldata = data; 338 GLData *gl_data = data;
339 gldata->mouse_down = EINA_TRUE; 339 gl_data->mouse_down = EINA_TRUE;
340} 340}
341 341
342static void 342static void
@@ -344,23 +344,23 @@ _mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
344{ 344{
345 Evas_Event_Mouse_Move *ev; 345 Evas_Event_Mouse_Move *ev;
346 ev = (Evas_Event_Mouse_Move *)event_info; 346 ev = (Evas_Event_Mouse_Move *)event_info;
347 GLData *gldata = data; 347 GLData *gl_data = data;
348 float dx = 0, dy = 0; 348 float dx = 0, dy = 0;
349 349
350 if( gldata->mouse_down) 350 if( gl_data->mouse_down)
351 { 351 {
352 dx = (ev->cur.canvas.x - ev->prev.canvas.x); 352 dx = (ev->cur.canvas.x - ev->prev.canvas.x);
353 dy = (ev->cur.canvas.y - ev->prev.canvas.y); 353 dy = (ev->cur.canvas.y - ev->prev.canvas.y);
354 gldata->xangle += dy; 354 gl_data->xangle += dy;
355 gldata->yangle += dx; 355 gl_data->yangle += dx;
356 } 356 }
357} 357}
358 358
359static void 359static void
360_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 360_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
361{ 361{
362 GLData *gldata = data; 362 GLData *gl_data = data;
363 gldata->mouse_down = EINA_FALSE; 363 gl_data->mouse_down = EINA_FALSE;
364} 364}
365 365
366static void 366static void
@@ -370,19 +370,19 @@ _win_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_in
370 Evas_Coord w,h; 370 Evas_Coord w,h;
371 evas_object_geometry_get( obj, NULL, NULL, &w, &h); 371 evas_object_geometry_get( obj, NULL, NULL, &w, &h);
372 372
373 GLData *gldata = data; 373 GLData *gl_data = data;
374 evas_object_resize(gldata->img, w, h); 374 evas_object_resize(gl_data->img, w, h);
375 375
376 init_matrix(gldata->view); 376 init_matrix(gl_data->view);
377 if(w > h) 377 if(w > h)
378 { 378 {
379 aspect = (float)w/h; 379 aspect = (float)w/h;
380 view_set_ortho(gldata->view, (-1.0 * aspect), (1.0 * aspect), -1.0, 1.0, -1.0, 1.0); 380 view_set_ortho(gl_data->view, (-1.0 * aspect), (1.0 * aspect), -1.0, 1.0, -1.0, 1.0);
381 } 381 }
382 else 382 else
383 { 383 {
384 aspect = (float)h/w; 384 aspect = (float)h/w;
385 view_set_ortho(gldata->view, -1.0, 1.0, (-1.0 * aspect), (1.0 * aspect), -1.0, 1.0); 385 view_set_ortho(gl_data->view, -1.0, 1.0, (-1.0 * aspect), (1.0 * aspect), -1.0, 1.0);
386 } 386 }
387} 387}
388 388