summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_bg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/elementary/test_bg.c')
-rw-r--r--src/bin/elementary/test_bg.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 338084b..68e2ba9 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -2,8 +2,9 @@
2# include "elementary_config.h" 2# include "elementary_config.h"
3#endif 3#endif
4 4
5#include <Efl_Ui.h>
5#include <Elementary.h> 6#include <Elementary.h>
6#include "elm_colorselector.eo.h" 7#include "elm_colorselector_eo.h"
7 8
8static void 9static void
9_cb_size_radio_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED) 10_cb_size_radio_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED)
@@ -292,15 +293,15 @@ _file_cb(void *data, const Efl_Event *ev)
292 const char *f, *k; 293 const char *f, *k;
293 294
294 // File API 295 // File API
295 efl_file_get(efl_part(win, "background"), &f, &k); 296 efl_file_simple_get(efl_part(win, "background"), &f, &k);
296 if (f) 297 if (f)
297 { 298 {
298 efl_file_set(efl_part(win, "background"), NULL, NULL); 299 efl_file_simple_load(efl_part(win, "background"), NULL, NULL);
299 } 300 }
300 else 301 else
301 { 302 {
302 efl_file_get(ev->object, &f, &k); 303 efl_file_simple_get(ev->object, &f, &k);
303 efl_file_set(efl_part(win, "background"), f, k); 304 efl_file_simple_load(efl_part(win, "background"), f, k);
304 } 305 }
305} 306}
306 307
@@ -315,10 +316,11 @@ _image_cb(void *data, const Efl_Event *ev)
315 efl_content_set(efl_part(win, "background"), NULL); 316 efl_content_set(efl_part(win, "background"), NULL);
316 else 317 else
317 { 318 {
318 efl_file_get(ev->object, &f, &k); 319 efl_file_simple_get(ev->object, &f, &k);
319 o = efl_add(EFL_UI_IMAGE_CLASS, win, 320 o = efl_add(EFL_UI_IMAGE_CLASS, win,
320 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE), 321 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
321 efl_file_set(efl_added, f, k) 322 efl_file_set(efl_added, f),
323 efl_file_key_set(efl_added, k)
322 ); 324 );
323 efl_content_set(efl_part(win, "background"), o); 325 efl_content_set(efl_part(win, "background"), o);
324 } 326 }
@@ -353,7 +355,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
353 355
354 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 356 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
355 efl_add(EFL_UI_IMAGE_CLASS, win, 357 efl_add(EFL_UI_IMAGE_CLASS, win,
356 efl_file_set(efl_added, buf, NULL), 358 efl_file_set(efl_added, buf),
357 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 359 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
358 efl_gfx_hint_align_set(efl_added, 0.5, 0.5), 360 efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
359 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _file_cb, win), 361 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _file_cb, win),
@@ -361,7 +363,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
361 363
362 snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get()); 364 snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
363 efl_add(EFL_UI_IMAGE_CLASS, win, 365 efl_add(EFL_UI_IMAGE_CLASS, win,
364 efl_file_set(efl_added, buf, NULL), 366 efl_file_set(efl_added, buf),
365 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 367 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
366 efl_gfx_hint_align_set(efl_added, 0.5, 0.5), 368 efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
367 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, win), 369 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, win),
@@ -420,7 +422,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
420 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 422 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
421 423
422 o_bg = efl_add(EFL_UI_BG_CLASS, box, 424 o_bg = efl_add(EFL_UI_BG_CLASS, box,
423 efl_file_set(efl_added, buf, NULL), 425 efl_file_set(efl_added, buf),
424 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND), 426 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
425 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE), 427 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
426 efl_pack(box, efl_added)); 428 efl_pack(box, efl_added));