evas: resources for evas-2d examples are added to resource folder.

Summary:  Process of loading is standard now. TODOs which are added here will be done in one of the next commits soon.

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2013

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Bogdan Devichev 2015-02-20 17:59:27 +01:00 committed by Cedric BAIL
parent f377770cc1
commit 4cd50a447f
31 changed files with 104 additions and 94 deletions

View File

@ -327,10 +327,10 @@ evas-multi-touch.c \
evas-text.c
DATA_FILES = \
enlightenment.png \
red.png \
im1.png \
cube1.png \
resources/images/enlightenment.png \
resources/images/red.png \
resources/images/im1.png \
resources/images/cube1.png \
resources/images/bg_space.jpg \
resources/images/eagle.png \
resources/images/EarthDiffuse.png \

View File

@ -10,22 +10,21 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 400
#define HEIGHT 400
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/sonic.md2";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/sonic.png";
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/sonic.md2";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sonic.png";
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;

View File

@ -15,17 +15,16 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Ecore_Getopt.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 800
#define HEIGHT 600
@ -33,9 +32,9 @@
#define ANIMATION_COUNT 3
#define MAX_PATH 128
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/M15.obj";
static const char *image1_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/M15.png";
static const char *image2_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/M15_1.png";
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/M15.obj";
static const char *image1_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/M15.png";
static const char *image2_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/M15_1.png";
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;

View File

@ -1,3 +0,0 @@
#define EVAS_3D_IMAGE_FOLDER "/resources/images"
#define EVAS_3D_MODEL_FOLDER "/resources/models"
#define EVAS_3D_SAVED_FILES "/saved_files"

View File

@ -2,21 +2,20 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 400
#define HEIGHT 400
static const char *normal_map_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/normal_lego.png";
static const char *normal_map_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/normal_lego.png";
typedef struct _Scene_Data
{

View File

@ -17,22 +17,22 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include <Ecore_File.h>
#include "evas-common.h"
#define WIDTH 1024
#define HEIGHT 1024
static const char *input_model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/sonic.md2";
static const char *output_model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES "/saved_Sonic_EET.eet";
static const char *input_model_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/sonic.md2";
static const char *output_model_path = PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES "/saved_Sonic_EET.eet";
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;
@ -178,9 +178,9 @@ main(void)
0.50, 0.00, 0.50, 0.30),
evas_3d_material_shininess_set(50.0));
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES))
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES))
fprintf(stderr, "Failed to create folder %s\n\n",
PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES);
PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES);
eo_do(mesh, efl_file_save(output_model_path, NULL, NULL));

View File

@ -15,23 +15,22 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Evas.h>
#include <Eo.h>
#include <math.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 800
#define HEIGHT 600
static const char *image_eagle_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/eagle.png";
static const char *eagle_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/eagle.md2";
static const char *image_eagle_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/eagle.png";
static const char *eagle_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/eagle.md2";
typedef struct _Scene_Data
{

View File

@ -2,22 +2,21 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 400
#define HEIGHT 400
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/sonic.md2";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/sonic.png";
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/sonic.md2";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sonic.png";
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;

View File

@ -14,16 +14,15 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#include <math.h>
@ -54,7 +53,7 @@
initial_node_data[number * 10 + 9]));\
ecore_timer_add(0.01, _animate_##extention, node_##extention);
static const char *template_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/mesh_for_mmap.";
static const char *template_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/mesh_for_mmap.";
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;

View File

@ -20,10 +20,9 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Ecore_Evas.h>
#include <Ecore.h>
@ -31,14 +30,14 @@
#include <stdio.h>
#include <math.h>
#include <Eo.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 1024
#define HEIGHT 1024
static const char *bg_image = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/bg_space.jpg";
static const char *moon_image = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/moon.png";
static const char *earth_image = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/EarthDiffuse.png";
static const char *bg_image = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/bg_space.jpg";
static const char *moon_image = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/moon.png";
static const char *earth_image = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/EarthDiffuse.png";
typedef struct _Scene_Data
{

View File

@ -17,16 +17,15 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 1900
#define HEIGHT 1080
@ -90,9 +89,9 @@
COL_BLUE, 0.5), \
evas_3d_material_shininess_set(100.0));
static const char *texture_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/sweet_home_reversed.png";
static const char *output_template = PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES "/saved_";
static const char *input_template = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/sweet_";
static const char *texture_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sweet_home_reversed.png";
static const char *output_template = PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES "/saved_";
static const char *input_template = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/sweet_";
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;
@ -213,9 +212,9 @@ main(void)
eo_do(material_with_tex,
evas_3d_material_texture_set(EVAS_3D_MATERIAL_DIFFUSE, texture));
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES))
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES))
fprintf(stderr, "Failed to create folder %s\n\n",
PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES);
PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES);
ADD_OBJ_MESH_AND_SAVED_COPY(home, -GRID_SIZE, -GRID_SIZE, 0,
EVAS_3D_SHADE_MODE_PHONG, material_with_tex)

View File

@ -2,22 +2,21 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <math.h>
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include "evas-common.h"
#define WIDTH 400
#define HEIGHT 400
static const char *earth_image = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/EarthDiffuse.png";
static const char *earth_image = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/EarthDiffuse.png";
typedef struct _vec4
{

View File

@ -16,25 +16,25 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include "evas-3d-common.h"
#include <Ecore_File.h>
#include "evas-common.h"
#define WIDTH 1024
#define HEIGHT 1024
#define NUMBER_OF_MESHES 32
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/normal_lego.png";
static const char *input_template = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/";
static const char *output_template = PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES "/";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/normal_lego.png";
static const char *input_template = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/";
static const char *output_template = PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES "/";
static const char *file_name[8] = {"Normal_UVs_Colors.ply",
"Normal_UVs_NoColors.ply",
"Normal_NoUVs_Colors.ply",
@ -185,9 +185,9 @@ main(void)
1.0, 1.0, 1.0, 1.0),
evas_3d_material_shininess_set(50.0));
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES))
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES))
fprintf(stderr, "Failed to create folder %s\n\n",
PACKAGE_EXAMPLES_DIR EVAS_3D_SAVED_FILES);
PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES);
/* Add the meshes. */
for (i = 0; i < NUMBER_OF_MESHES; i++)

View File

@ -12,10 +12,9 @@
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
#endif
#define EFL_EO_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eo.h>
#include <Evas.h>
@ -35,8 +34,8 @@
#define DIFFUSE_LIGHT 1.0, 1.0, 1.0
#define SPECULAR_LIGHT 1.0, 1.0, 1.0
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/sonic.md2";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/sonic.png";
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/sonic.md2";
static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sonic.png";
static const vec2 tex_scale = {1, 1};
Ecore_Evas *ecore_evas = NULL;

View File

@ -25,11 +25,12 @@
#include <Edje.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH 320
#define HEIGHT 480
static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/red.png";
static const char *edje_file_path = PACKAGE_EXAMPLES_DIR "/aspect.edj";
struct test_data

View File

@ -0,0 +1,3 @@
#define EVAS_IMAGE_FOLDER "/resources/images"
#define EVAS_MODEL_FOLDER "/resources/models"
#define EVAS_SAVED_FILES "/saved_files"

View File

@ -10,9 +10,9 @@
* gcc -o evas-events evas-events.c `pkg-config --libs --cflags evas ecore ecore-evas`
* @endverbatim
*/
//TODO: Fix warning.
#ifdef HAVE_CONFIG_H
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
@ -22,11 +22,12 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
static const char *img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/enlightenment.png";
static const char *commands = \
"commands are:\n"

View File

@ -22,10 +22,10 @@
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "evas-common.h"
#define WIDTH 320
#define HEIGHT 480
@ -45,7 +45,7 @@ static const char commands[] = \
"\ts - print current hints information\n"
"\th - print help\n";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/red.png";
struct coord_tuple
{

View File

@ -9,6 +9,7 @@
* gcc -o evas-images evas-images.c `pkg-config --libs --cflags evas ecore ecore-evas`
* @endverbatim
*/
//TODO: Fix warnings.
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -20,12 +21,13 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png";
static const char *valid_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/red.png";
static const char *valid_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/enlightenment.png";
static const char *bogus_path = "/tmp/non-existent-220986.png";
static const char *commands = \
"commands are:\n"

View File

@ -9,6 +9,7 @@
* gcc -o evas-images2 evas-images2.c `pkg-config --libs --cflags evas ecore ecore-evas`
* @endverbatim
*/
//TODO: Fix warnings
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -20,11 +21,12 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
static const char *img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/enlightenment.png";
static const char *commands = \
"commands are:\n"
"\tp - change proxy image's source\n"

View File

@ -9,6 +9,7 @@
* gcc -o evas-images3 evas-images3.c `pkg-config --libs --cflags evas ecore ecore-evas`
* @endverbatim
*/
//TODO: Fix warnings.
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -20,11 +21,12 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
static const char *img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/enlightenment.png";
static const char *commands = \
"commands are:\n"
"\tw - write new pixel data to image\n"

View File

@ -9,6 +9,7 @@
* gcc -o evas-images4 evas-images4.c `pkg-config --libs --cflags evas ecore ecore-evas`
* @endverbatim
*/
//TODO: Fix warnings.
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -20,11 +21,12 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
static const char *img_path = PACKAGE_EXAMPLES_DIR "/im1.png";
static const char *img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/im1.png";
static const char *commands = \
"commands are:\n"
"\tp - print image fill property\n"

View File

@ -15,10 +15,10 @@
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "evas-common.h"
#define WIDTH (800)
#define HEIGHT (400)
@ -44,6 +44,8 @@ struct exemple_data
Eina_Bool image;
};
static const char *img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/cube1.png";
static struct exemple_data d =
{ NULL, NULL, NULL, NULL, NULL, 62, 62, 262, 62, 262, 262, 62, 262,
EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE };
@ -225,14 +227,14 @@ _on_keydown(void *data EINA_UNUSED, Evas *e, Evas_Object *obj EINA_UNUSED,
{
evas_object_del(d.target1);
d.target1 = evas_object_image_filled_add(e);
evas_object_image_file_set(d.target1, "cube1.png", NULL);
evas_object_image_file_set(d.target1, img_path, NULL);
evas_object_image_smooth_scale_set(d.target1, 0);
evas_object_resize(d.target1, 200, 200);
evas_object_show(d.target1);
evas_object_del(d.target2);
d.target2 = evas_object_image_filled_add(e);
evas_object_image_file_set(d.target2, "cube1.png", NULL);
evas_object_image_file_set(d.target2, img_path, NULL);
evas_object_image_smooth_scale_set(d.target2, 0);
evas_object_anti_alias_set(d.target2, EINA_TRUE);
evas_object_resize(d.target2, 200, 200);

View File

@ -22,6 +22,7 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "evas-common.h"
#define WIDTH 480
#define HEIGHT 480
@ -42,6 +43,10 @@ typedef struct
Eina_Bool apply_lighting : 1;
} App_Data;
static const char *img1_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/cube1.png";
static const char *img2_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/enlightenment.png";
static const char *img3_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/im1.png";
static const char *help_string =
"Valid commands:\n"
"\ta - toggle alpha for maps\n"
@ -271,7 +276,7 @@ main(void)
d.canvas = ecore_evas_get(d.ee);
bg = evas_object_image_filled_add(d.canvas);
evas_object_image_file_set(bg, "cube1.png", NULL);
evas_object_image_file_set(bg, img1_path, NULL);
ecore_evas_object_associate(d.ee, bg, 0);
evas_object_focus_set(bg, EINA_TRUE);
evas_object_move(bg, 0, 0);
@ -285,16 +290,16 @@ main(void)
o = evas_object_image_filled_add(d.canvas);
evas_object_name_set(o, "obj2");
evas_object_image_file_set(o, "enlightenment.png", NULL);
evas_object_image_file_set(o, img2_path, NULL);
evas_object_show(o);
o = evas_object_image_filled_add(d.canvas);
evas_object_name_set(o, "obj3");
evas_object_image_file_set(o, "enlightenment.png", NULL);
evas_object_image_file_set(o, img2_path, NULL);
evas_object_show(o);
osrc = evas_object_image_filled_add(d.canvas);
evas_object_image_file_set(osrc, "im1.png", NULL);
evas_object_image_file_set(osrc, img3_path, NULL);
evas_object_name_set(osrc, "obj4_source");
evas_object_show(osrc);

View File

@ -12,6 +12,7 @@
* gcc -o evas-object-manipulation-eo evas-object-manipulation-eo.c `pkg-config --libs --cflags ecore evas ecore-evas eo`
* @endverbatim
*/
//TODO: Fix error and warning.
#ifdef HAVE_CONFIG_H
#include "config.h"

View File

@ -20,12 +20,13 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png";
static const char *img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/enlightenment.png";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/red.png";
struct test_data
{

View File

@ -8,9 +8,9 @@
* gcc -o evas-smart-object evas-smart-object.c `pkg-config --libs --cflags evas ecore ecore-evas`
* @endverbatim
*/
//TODO: Fix warnings.
#ifdef HAVE_CONFIG_H
#include "config.h"
#else
#define PACKAGE_EXAMPLES_DIR "."
@ -20,6 +20,7 @@
#include <Ecore_Evas.h>
#include <stdio.h>
#include <errno.h>
#include "evas-common.h"
#define WIDTH (320)
#define HEIGHT (240)
@ -84,7 +85,7 @@ _index_to_color(int i)
}
static struct test_data d = {0};
static const char *border_img_path = PACKAGE_EXAMPLES_DIR "/red.png";
static const char *border_img_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/red.png";
#define _evas_smart_example_type "Evas_Smart_Example"
#define EVT_CHILDREN_NUMBER_CHANGED "children,changed"

View File

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 457 KiB

After

Width:  |  Height:  |  Size: 457 KiB

View File

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B