summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-09-16 11:06:02 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-16 11:06:02 +0200
commit944d5f37c7add5772a62d0d976db48b3a2a90982 (patch)
treefb50f8b08247c02c1b0f2f5c0f03e1125ba35233 /src/bin
parente18d07b2979e5b80ce930fa6f525b9e02f19db01 (diff)
efl/image: Efl.Gfx.Image_Scale_Type -> Efl.Gfx.Image_Scale_Method
ref T7927, T7875 Depends on D9931
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/test_bg.c18
-rw-r--r--src/bin/elementary/test_efl_gfx_mapping.c2
-rw-r--r--src/bin/elementary/test_evas_map.c2
-rw-r--r--src/bin/elementary/test_image.c20
-rw-r--r--src/bin/elementary/test_part_bg.c6
-rw-r--r--src/bin/elementary/test_ui_image.c20
6 files changed, 34 insertions, 34 deletions
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 45afcac..29fdeec 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -318,7 +318,7 @@ _image_cb(void *data, const Efl_Event *ev)
318 { 318 {
319 efl_file_simple_get(ev->object, &f, &k); 319 efl_file_simple_get(ev->object, &f, &k);
320 o = efl_add(EFL_UI_IMAGE_CLASS, win, 320 o = efl_add(EFL_UI_IMAGE_CLASS, win,
321 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_EXPAND), 321 efl_gfx_image_scale_method_set(efl_added, EFL_GFX_IMAGE_SCALE_METHOD_EXPAND),
322 efl_file_set(efl_added, f), 322 efl_file_set(efl_added, f),
323 efl_file_key_set(efl_added, k) 323 efl_file_key_set(efl_added, k)
324 ); 324 );
@@ -380,7 +380,7 @@ _cb_radio_changed_scale_type(void *data, const Efl_Event *ev)
380 int v = efl_ui_radio_group_selected_value_get(bx); 380 int v = efl_ui_radio_group_selected_value_get(bx);
381 if (v == -1) v = 0; 381 if (v == -1) v = 0;
382 382
383 efl_gfx_image_scale_type_set(o_bg, v); 383 efl_gfx_image_scale_method_set(o_bg, v);
384} 384}
385 385
386static void 386static void
@@ -437,48 +437,48 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
437 efl_pack(box, efl_added)); 437 efl_pack(box, efl_added));
438 438
439 rd = efl_add(EFL_UI_RADIO_CLASS, hbox); 439 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
440 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 440 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_METHOD_FILL);
441 efl_text_set(rd, "Fill"); 441 efl_text_set(rd, "Fill");
442 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0); 442 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
443 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg); 443 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
444 efl_pack(hbox, rd); 444 efl_pack(hbox, rd);
445 445
446 rd = efl_add(EFL_UI_RADIO_CLASS, hbox); 446 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
447 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FIT); 447 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_METHOD_FIT);
448 efl_text_set(rd, "Fit"); 448 efl_text_set(rd, "Fit");
449 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0); 449 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
450 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg); 450 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
451 efl_pack(hbox, rd); 451 efl_pack(hbox, rd);
452 452
453 rd = efl_add(EFL_UI_RADIO_CLASS, hbox); 453 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
454 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FIT_WIDTH); 454 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_METHOD_FIT_WIDTH);
455 efl_text_set(rd, "Fit Horizontally"); 455 efl_text_set(rd, "Fit Horizontally");
456 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0); 456 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
457 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg); 457 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
458 efl_pack(hbox, rd); 458 efl_pack(hbox, rd);
459 459
460 rd = efl_add(EFL_UI_RADIO_CLASS, hbox); 460 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
461 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FIT_HEIGHT); 461 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_METHOD_FIT_HEIGHT);
462 efl_text_set(rd, "Fit Verically"); 462 efl_text_set(rd, "Fit Verically");
463 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0); 463 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
464 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg); 464 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
465 efl_pack(hbox, rd); 465 efl_pack(hbox, rd);
466 466
467 rd = efl_add(EFL_UI_RADIO_CLASS, hbox); 467 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
468 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_EXPAND); 468 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_METHOD_EXPAND);
469 efl_text_set(rd, "Expand"); 469 efl_text_set(rd, "Expand");
470 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0); 470 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
471 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg); 471 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
472 efl_pack(hbox, rd); 472 efl_pack(hbox, rd);
473 473
474 rd = efl_add(EFL_UI_RADIO_CLASS, hbox); 474 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
475 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_TILE); 475 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_METHOD_TILE);
476 efl_text_set(rd, "Tile"); 476 efl_text_set(rd, "Tile");
477 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0); 477 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
478 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg); 478 efl_event_callback_add(rd, EFL_UI_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
479 efl_pack(hbox, rd); 479 efl_pack(hbox, rd);
480 480
481 efl_ui_radio_group_selected_value_set(hbox, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 481 efl_ui_radio_group_selected_value_set(hbox, EFL_GFX_IMAGE_SCALE_METHOD_FILL);
482 482
483 c = efl_add(EFL_UI_CHECK_CLASS, box); 483 c = efl_add(EFL_UI_CHECK_CLASS, box);
484 efl_text_set(c, "Bg Color"); 484 efl_text_set(c, "Bg Color");
diff --git a/src/bin/elementary/test_efl_gfx_mapping.c b/src/bin/elementary/test_efl_gfx_mapping.c
index c4080c1..fecfc45 100644
--- a/src/bin/elementary/test_efl_gfx_mapping.c
+++ b/src/bin/elementary/test_efl_gfx_mapping.c
@@ -55,7 +55,7 @@ test_efl_gfx_mapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
55 img = efl_add(EFL_UI_IMAGE_CLASS, win, 55 img = efl_add(EFL_UI_IMAGE_CLASS, win,
56 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 56 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
57 efl_file_set(efl_added, buf)); 57 efl_file_set(efl_added, buf));
58 efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 58 efl_gfx_image_scale_method_set(img, EFL_GFX_IMAGE_SCALE_METHOD_FILL);
59 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE, 59 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
60 _image_resize_cb, NULL); 60 _image_resize_cb, NULL);
61 61
diff --git a/src/bin/elementary/test_evas_map.c b/src/bin/elementary/test_evas_map.c
index 3cabe96..0687a33 100644
--- a/src/bin/elementary/test_evas_map.c
+++ b/src/bin/elementary/test_evas_map.c
@@ -64,7 +64,7 @@ test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
64 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 64 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
65 efl_file_set(efl_added, buf), 65 efl_file_set(efl_added, buf),
66 efl_file_load(efl_added)); 66 efl_file_load(efl_added));
67 efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 67 efl_gfx_image_scale_method_set(img, EFL_GFX_IMAGE_SCALE_METHOD_FILL);
68 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE, 68 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
69 _image_resize_cb, NULL); 69 _image_resize_cb, NULL);
70 70
diff --git a/src/bin/elementary/test_image.c b/src/bin/elementary/test_image.c
index cbc127e..38304cc 100644
--- a/src/bin/elementary/test_image.c
+++ b/src/bin/elementary/test_image.c
@@ -100,16 +100,16 @@ im_align_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
100} 100}
101 101
102static const struct { 102static const struct {
103 Efl_Gfx_Image_Scale_Type scale_type; 103 Efl_Gfx_Image_Scale_Method scale_type;
104 const char *name; 104 const char *name;
105} images_scale_type[] = { 105} images_scale_type[] = {
106 { EFL_GFX_IMAGE_SCALE_TYPE_NONE, "None" }, 106 { EFL_GFX_IMAGE_SCALE_METHOD_NONE, "None" },
107 { EFL_GFX_IMAGE_SCALE_TYPE_FILL, "Fill" }, 107 { EFL_GFX_IMAGE_SCALE_METHOD_FILL, "Fill" },
108 { EFL_GFX_IMAGE_SCALE_TYPE_FIT, "Fit" }, 108 { EFL_GFX_IMAGE_SCALE_METHOD_FIT, "Fit" },
109 { EFL_GFX_IMAGE_SCALE_TYPE_FIT_WIDTH, "Fit Horizontally" }, 109 { EFL_GFX_IMAGE_SCALE_METHOD_FIT_WIDTH, "Fit Horizontally" },
110 { EFL_GFX_IMAGE_SCALE_TYPE_FIT_HEIGHT, "Fit Vertically" }, 110 { EFL_GFX_IMAGE_SCALE_METHOD_FIT_HEIGHT, "Fit Vertically" },
111 { EFL_GFX_IMAGE_SCALE_TYPE_EXPAND, "Expand" }, 111 { EFL_GFX_IMAGE_SCALE_METHOD_EXPAND, "Expand" },
112 { EFL_GFX_IMAGE_SCALE_TYPE_TILE, "Tile" }, 112 { EFL_GFX_IMAGE_SCALE_METHOD_TILE, "Tile" },
113 { 0, NULL } 113 { 0, NULL }
114}; 114};
115 115
@@ -121,9 +121,9 @@ my_im_scale_ch(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_U
121 Evas_Object *rdg = evas_object_data_get(win, "rdg"); 121 Evas_Object *rdg = evas_object_data_get(win, "rdg");
122 int v = elm_radio_value_get(rdg); 122 int v = elm_radio_value_get(rdg);
123 123
124 efl_gfx_image_scale_type_set(im, images_scale_type[v].scale_type); 124 efl_gfx_image_scale_method_set(im, images_scale_type[v].scale_type);
125 fprintf(stderr, "Set %d[%s] and got %d\n", 125 fprintf(stderr, "Set %d[%s] and got %d\n",
126 images_scale_type[v].scale_type, images_scale_type[v].name, efl_gfx_image_scale_type_get(im)); 126 images_scale_type[v].scale_type, images_scale_type[v].name, efl_gfx_image_scale_method_get(im));
127} 127}
128 128
129void 129void
diff --git a/src/bin/elementary/test_part_bg.c b/src/bin/elementary/test_part_bg.c
index 3f8f30b..da50aae 100644
--- a/src/bin/elementary/test_part_bg.c
+++ b/src/bin/elementary/test_part_bg.c
@@ -40,7 +40,7 @@ _scale_type_cb(void *data, const Efl_Event *ev EINA_UNUSED)
40{ 40{
41 Efl_Ui_Radio_Group *radio = data; 41 Efl_Ui_Radio_Group *radio = data;
42 Evas_Object *target; 42 Evas_Object *target;
43 Efl_Gfx_Image_Scale_Type type; 43 Efl_Gfx_Image_Scale_Method type;
44 char buf[PATH_MAX]; 44 char buf[PATH_MAX];
45 45
46 radio = efl_ui_single_selectable_last_selected_get(radio); 46 radio = efl_ui_single_selectable_last_selected_get(radio);
@@ -48,9 +48,9 @@ _scale_type_cb(void *data, const Efl_Event *ev EINA_UNUSED)
48 48
49 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 49 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
50 efl_file_simple_load(efl_part(target, "background"), buf, NULL); 50 efl_file_simple_load(efl_part(target, "background"), buf, NULL);
51 type = efl_gfx_image_scale_type_get(efl_part(target, "background")); 51 type = efl_gfx_image_scale_method_get(efl_part(target, "background"));
52 type = (type + 1) % 6; 52 type = (type + 1) % 6;
53 efl_gfx_image_scale_type_set(efl_part(target, "background"), type); 53 efl_gfx_image_scale_method_set(efl_part(target, "background"), type);
54} 54}
55 55
56static Efl_Ui_Radio_Group * 56static Efl_Ui_Radio_Group *
diff --git a/src/bin/elementary/test_ui_image.c b/src/bin/elementary/test_ui_image.c
index 87ad9fb..c93fd4c 100644
--- a/src/bin/elementary/test_ui_image.c
+++ b/src/bin/elementary/test_ui_image.c
@@ -107,16 +107,16 @@ im_align_cb(void *data, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
107} 107}
108 108
109static const struct { 109static const struct {
110 Efl_Gfx_Image_Scale_Type scale_type; 110 Efl_Gfx_Image_Scale_Method scale_type;
111 const char *name; 111 const char *name;
112} images_scale_type[] = { 112} images_scale_type[] = {
113 { EFL_GFX_IMAGE_SCALE_TYPE_NONE, "None" }, 113 { EFL_GFX_IMAGE_SCALE_METHOD_NONE, "None" },
114 { EFL_GFX_IMAGE_SCALE_TYPE_FILL, "Fill" }, 114 { EFL_GFX_IMAGE_SCALE_METHOD_FILL, "Fill" },
115 { EFL_GFX_IMAGE_SCALE_TYPE_FIT, "Fit" }, 115 { EFL_GFX_IMAGE_SCALE_METHOD_FIT, "Fit" },
116 { EFL_GFX_IMAGE_SCALE_TYPE_FIT_WIDTH, "Fit Horizontally" }, 116 { EFL_GFX_IMAGE_SCALE_METHOD_FIT_WIDTH, "Fit Horizontally" },
117 { EFL_GFX_IMAGE_SCALE_TYPE_FIT_HEIGHT, "Fit Vertically" }, 117 { EFL_GFX_IMAGE_SCALE_METHOD_FIT_HEIGHT, "Fit Vertically" },
118 { EFL_GFX_IMAGE_SCALE_TYPE_EXPAND, "Expand" }, 118 { EFL_GFX_IMAGE_SCALE_METHOD_EXPAND, "Expand" },
119 { EFL_GFX_IMAGE_SCALE_TYPE_TILE, "Tile" }, 119 { EFL_GFX_IMAGE_SCALE_METHOD_TILE, "Tile" },
120 { 0, NULL } 120 { 0, NULL }
121}; 121};
122 122
@@ -128,9 +128,9 @@ my_im_scale_ch(void *data, const Efl_Event *ev EINA_UNUSED)
128 int v = efl_ui_radio_group_selected_value_get(ev->object); 128 int v = efl_ui_radio_group_selected_value_get(ev->object);
129 if (v == -1) v = 0; 129 if (v == -1) v = 0;
130 130
131 efl_gfx_image_scale_type_set(im, images_scale_type[v].scale_type); 131 efl_gfx_image_scale_method_set(im, images_scale_type[v].scale_type);
132 fprintf(stderr, "Set %d[%s] and got %d\n", 132 fprintf(stderr, "Set %d[%s] and got %d\n",
133 images_scale_type[v].scale_type, images_scale_type[v].name, efl_gfx_image_scale_type_get(im)); 133 images_scale_type[v].scale_type, images_scale_type[v].name, efl_gfx_image_scale_method_get(im));
134} 134}
135 135
136void 136void