Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847 Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
parent
f05ba502b3
commit
fb666f9788
|
@ -5,7 +5,7 @@
|
|||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
efl::Gfx icon_still(nullptr);
|
||||
efl::gfx::Entity icon_still(nullptr);
|
||||
|
||||
static void
|
||||
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
||||
|
@ -117,7 +117,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
if (!icon_still)
|
||||
{
|
||||
efl::ui::Image obj(instantiate, cmid);
|
||||
efl::eina::optional<efl::Gfx> icon_still_p = cmid.content_unset();
|
||||
efl::eina::optional<efl::gfx::Entity> icon_still_p = cmid.content_unset();
|
||||
if (icon_still_p)
|
||||
{
|
||||
icon_still = *icon_still_p;
|
||||
|
|
|
@ -17,7 +17,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
|
||||
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), "TEST", ELM_WIN_BASIC,
|
||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||
efl_gfx_size_set(win, EINA_SIZE2D(300, 400));
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 400));
|
||||
|
||||
scroller = efl_add(EFL_UI_SCROLLER_CLASS, win);
|
||||
efl_content_set(win, scroller);
|
||||
|
@ -25,7 +25,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
content = efl_add(EFL_UI_IMAGE_CLASS, scroller);
|
||||
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
|
||||
efl_file_set(content, buf, NULL);
|
||||
efl_gfx_size_set(content, EINA_SIZE2D(5000, 5000));
|
||||
efl_gfx_entity_size_set(content, EINA_SIZE2D(5000, 5000));
|
||||
efl_content_set(scroller, content);
|
||||
}
|
||||
EFL_MAIN()
|
||||
|
|
|
@ -258,8 +258,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
btn = elm_button_add(win);
|
||||
evas_object_resize(btn, (WIDTH * 2) / 3, (HEIGHT * 2) / 3);
|
||||
|
|
|
@ -249,7 +249,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
_scene_setup(&data);
|
||||
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, data.scene);
|
||||
|
|
|
@ -814,7 +814,7 @@ elm_main(int argc, char **argv)
|
|||
_scene_setup(&data, 10.0, 10);
|
||||
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
efl_canvas_scene3d_set(image, data.scene);
|
||||
|
||||
evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
|
|
@ -110,8 +110,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -216,12 +216,12 @@ main(void)
|
|||
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
evas_object_focus_set(image, EINA_TRUE);
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
|
||||
|
|
|
@ -126,8 +126,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
|
||||
evas_object_resize(background, w, h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
|
|
@ -120,8 +120,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(bg, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(bg, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -392,8 +392,8 @@ int main(int argc, char **argv)
|
|||
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
evas_object_focus_set(image, EINA_TRUE);
|
||||
efl_canvas_scene3d_set(image, globalscene.scene);
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ main(void)
|
|||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_geometry_set(image, EINA_RECT(0, 0, WIDTH, HEIGHT));
|
||||
efl_gfx_entity_geometry_set(image, EINA_RECT(0, 0, WIDTH, HEIGHT));
|
||||
evas_object_show(image);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
|
|
|
@ -114,8 +114,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -239,13 +239,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, data.scene);
|
||||
|
|
|
@ -78,8 +78,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -235,13 +235,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, data.scene);
|
||||
|
|
|
@ -91,8 +91,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -187,13 +187,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
|
|
|
@ -61,8 +61,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
|
||||
evas_object_resize(background, w, h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -212,14 +212,14 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, data.scene);
|
||||
|
|
|
@ -195,8 +195,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -433,13 +433,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
evas_object_show(image),
|
||||
evas_object_focus_set(image, EINA_TRUE);
|
||||
|
|
|
@ -68,8 +68,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -154,13 +154,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
|
|
|
@ -155,8 +155,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -235,13 +235,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 20, 20, 200, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
|
|
|
@ -133,8 +133,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -216,13 +216,13 @@ main(void)
|
|||
/* Add a background rectangle MESHES. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
|
|
|
@ -80,8 +80,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -239,13 +239,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
evas_object_focus_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
|
|
|
@ -169,13 +169,13 @@ main(void)
|
|||
/* Add evas objects. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_on_mouse_down, NULL);
|
||||
|
||||
|
|
|
@ -98,8 +98,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -210,13 +210,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 100, 100, 100, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, scene);
|
||||
|
|
|
@ -63,8 +63,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -221,16 +221,16 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add a background image. */
|
||||
#ifdef USE_EO_IMAGE
|
||||
source = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
efl_gfx_buffer_copy_set(source, NULL, EINA_SIZE2D(IMG_WIDTH, IMG_HEIGHT), 0, EFL_GFX_COLORSPACE_ARGB8888, 0);
|
||||
efl_gfx_position_set(source, EINA_POSITION2D((WIDTH / 2), (HEIGHT / 2)));
|
||||
efl_gfx_size_set(source, EINA_SIZE2D((WIDTH / 2), (HEIGHT / 2)));
|
||||
efl_gfx_visible_set(source, EINA_TRUE);
|
||||
efl_gfx_entity_position_set(source, EINA_POSITION2D((WIDTH / 2), (HEIGHT / 2)));
|
||||
efl_gfx_entity_size_set(source, EINA_SIZE2D((WIDTH / 2), (HEIGHT / 2)));
|
||||
efl_gfx_entity_visible_set(source, EINA_TRUE);
|
||||
#else
|
||||
source = evas_object_image_filled_add(evas);
|
||||
evas_object_image_size_set(source, IMG_WIDTH, IMG_HEIGHT);
|
||||
|
@ -241,8 +241,8 @@ main(void)
|
|||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D((WIDTH / 2), (HEIGHT / 2)));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D((WIDTH / 2), (HEIGHT / 2)));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
/* Setup scene */
|
||||
_scene_setup(&data);
|
||||
|
|
|
@ -181,8 +181,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -644,13 +644,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
evas_object_anti_alias_set(image, EINA_TRUE);
|
||||
evas_object_focus_set(image, EINA_TRUE);
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
|
|
|
@ -66,8 +66,8 @@ _on_canvas_resize(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -256,13 +256,13 @@ main(void)
|
|||
/* Add a background rectangle object. */
|
||||
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
efl_gfx_color_set(background, 0, 0, 0, 255);
|
||||
efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(background, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(background, EINA_TRUE);
|
||||
|
||||
/* Add an image object for 3D scene rendering. */
|
||||
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
|
||||
efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(image, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
evas_object_focus_set(image, EINA_TRUE);
|
||||
/* Set the image object as render target for 3D scene. */
|
||||
efl_canvas_scene3d_set(image, data.scene);
|
||||
|
|
|
@ -90,7 +90,7 @@ _anim_cb(void *data)
|
|||
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj2");
|
||||
h = efl_gfx_size_get(o).h;
|
||||
h = efl_gfx_entity_size_get(o).h;
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
|
@ -105,7 +105,7 @@ _anim_cb(void *data)
|
|||
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj3");
|
||||
EINA_SIZE2D(w, h) = efl_gfx_size_get(o);
|
||||
EINA_SIZE2D(w, h) = efl_gfx_entity_size_get(o);
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
|
@ -122,13 +122,13 @@ _anim_cb(void *data)
|
|||
-256, 255, 255, 255, 0, 0, 0);
|
||||
}
|
||||
if (ad->backface_culling)
|
||||
efl_gfx_visible_set(o, efl_gfx_map_clockwise_get(o));
|
||||
efl_gfx_entity_visible_set(o, efl_gfx_map_clockwise_get(o));
|
||||
else
|
||||
efl_gfx_visible_set(o, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
||||
o = evas_object_name_find(ad->canvas, "obj4");
|
||||
rect = efl_gfx_geometry_get(o);
|
||||
rect = efl_gfx_entity_geometry_get(o);
|
||||
efl_gfx_map_reset(o);
|
||||
efl_gfx_map_smooth_set(o, ad->smooth);
|
||||
efl_gfx_map_alpha_set(o, ad->alpha);
|
||||
|
|
|
@ -55,7 +55,7 @@ _canvas_resize_cb(Ecore_Evas *ee)
|
|||
int w, h;
|
||||
|
||||
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
|
||||
efl_gfx_size_set(d.bg, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_size_set(d.bg, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -141,8 +141,8 @@ _on_keydown(void *data EINA_UNUSED,
|
|||
Eina_Bool visibility;
|
||||
/* Don't use "get"-"set" expressions in one eo_do call,
|
||||
* if you pass parameter to "set" by value. */
|
||||
visibility = efl_gfx_visible_get(d.clipper);
|
||||
efl_gfx_visible_set(d.clipper, !visibility);
|
||||
visibility = efl_gfx_entity_visible_get(d.clipper);
|
||||
efl_gfx_entity_visible_set(d.clipper, !visibility);
|
||||
printf("Clipper is now %s\n", visibility ? "hidden" : "visible");
|
||||
return;
|
||||
}
|
||||
|
@ -176,11 +176,11 @@ main(void)
|
|||
evas_object_name_set(d.bg, "background rectangle");
|
||||
efl_gfx_color_set(d.bg, 255, 255, 255, 255);
|
||||
/* white bg */
|
||||
efl_gfx_position_set(d.bg, EINA_POSITION2D(0, 0));
|
||||
efl_gfx_entity_position_set(d.bg, EINA_POSITION2D(0, 0));
|
||||
/* at canvas' origin */
|
||||
efl_gfx_size_set(d.bg, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_size_set(d.bg, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
/* covers full canvas */
|
||||
efl_gfx_visible_set(d.bg, EINA_TRUE);
|
||||
efl_gfx_entity_visible_set(d.bg, EINA_TRUE);
|
||||
evas_object_focus_set(d.bg, EINA_TRUE);
|
||||
|
||||
evas_object_event_callback_add(
|
||||
|
@ -202,9 +202,9 @@ main(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
efl_gfx_position_set(d.img, EINA_POSITION2D(0, 0));
|
||||
efl_gfx_size_set(d.img, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_visible_set(d.img, EINA_TRUE);
|
||||
efl_gfx_entity_position_set(d.img, EINA_POSITION2D(0, 0));
|
||||
efl_gfx_entity_size_set(d.img, EINA_SIZE2D(WIDTH, HEIGHT));
|
||||
efl_gfx_entity_visible_set(d.img, EINA_TRUE);
|
||||
printf("Image object added, class name is: %s\n",
|
||||
efl_class_name_get(d.img));
|
||||
}
|
||||
|
@ -222,9 +222,9 @@ main(void)
|
|||
{
|
||||
efl_image_border_set(d.clipper_border, 3, 3, 3, 3);
|
||||
efl_image_border_center_fill_set(d.clipper_border, EFL_GFX_BORDER_FILL_MODE_NONE);
|
||||
efl_gfx_position_set(d.clipper_border, EINA_POSITION2D((WIDTH / 4) -3, (HEIGHT / 4) - 3));
|
||||
efl_gfx_size_set(d.clipper_border, EINA_SIZE2D((WIDTH / 2) + 6, (HEIGHT / 2) + 6));
|
||||
efl_gfx_visible_set(d.clipper_border, EINA_TRUE);
|
||||
efl_gfx_entity_position_set(d.clipper_border, EINA_POSITION2D((WIDTH / 4) -3, (HEIGHT / 4) - 3));
|
||||
efl_gfx_entity_size_set(d.clipper_border, EINA_SIZE2D((WIDTH / 2) + 6, (HEIGHT / 2) + 6));
|
||||
efl_gfx_entity_visible_set(d.clipper_border, EINA_TRUE);
|
||||
}
|
||||
|
||||
/* solid white clipper (note that it's the default color for a
|
||||
|
@ -232,9 +232,9 @@ main(void)
|
|||
* by 255) */
|
||||
d.clipper = efl_add(EFL_CANVAS_RECTANGLE_CLASS, d.canvas);
|
||||
|
||||
efl_gfx_position_set(d.clipper, EINA_POSITION2D(WIDTH / 4, HEIGHT / 4));
|
||||
efl_gfx_size_set(d.clipper, EINA_SIZE2D(WIDTH / 2, HEIGHT / 2));
|
||||
efl_gfx_visible_set(d.clipper, EINA_TRUE);
|
||||
efl_gfx_entity_position_set(d.clipper, EINA_POSITION2D(WIDTH / 4, HEIGHT / 4));
|
||||
efl_gfx_entity_size_set(d.clipper, EINA_SIZE2D(WIDTH / 2, HEIGHT / 2));
|
||||
efl_gfx_entity_visible_set(d.clipper, EINA_TRUE);
|
||||
|
||||
efl_canvas_object_clip_set(d.img, d.clipper);
|
||||
|
||||
|
|
Loading…
Reference in New Issue