cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4cd50a447fc3887fdcf0f8041beb360e3729c448

commit 4cd50a447fc3887fdcf0f8041beb360e3729c448
Author: Bogdan Devichev <b.devic...@samsung.com>
Date:   Fri Feb 20 17:59:27 2015 +0100

    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 <ced...@osg.samsung.com>
---
 src/examples/evas/Makefile.am                           |   8 ++++----
 src/examples/evas/evas-3d-aabb.c                        |   9 ++++-----
 src/examples/evas/evas-3d-colorpick.c                   |  11 +++++------
 src/examples/evas/evas-3d-common.h                      |   3 ---
 src/examples/evas/evas-3d-cube2.c                       |   7 +++----
 src/examples/evas/evas-3d-eet.c                         |  14 +++++++-------
 src/examples/evas/evas-3d-frustum.c                     |   9 ++++-----
 src/examples/evas/evas-3d-md2.c                         |   9 ++++-----
 src/examples/evas/evas-3d-mmap-set.c                    |   7 +++----
 src/examples/evas/evas-3d-moon-space.c                  |  11 +++++------
 src/examples/evas/evas-3d-obj.c                         |  15 +++++++--------
 src/examples/evas/evas-3d-pick.c                        |   7 +++----
 src/examples/evas/evas-3d-ply.c                         |  16 ++++++++--------
 src/examples/evas/evas-3d-shadows.c                     |   7 +++----
 src/examples/evas/evas-aspect-hints.c                   |   3 ++-
 src/examples/evas/evas-common.h                         |   3 +++
 src/examples/evas/evas-events.c                         |   5 +++--
 src/examples/evas/evas-hints.c                          |   4 ++--
 src/examples/evas/evas-images.c                         |   6 ++++--
 src/examples/evas/evas-images2.c                        |   4 +++-
 src/examples/evas/evas-images3.c                        |   4 +++-
 src/examples/evas/evas-images4.c                        |   4 +++-
 src/examples/evas/evas-map-aa.c                         |   8 +++++---
 src/examples/evas/evas-map-utils.c                      |  13 +++++++++----
 src/examples/evas/evas-object-manipulation-eo.c         |   1 +
 src/examples/evas/evas-object-manipulation.c            |   5 +++--
 src/examples/evas/evas-smart-object.c                   |   5 +++--
 src/examples/evas/{ => resources/images}/cube1.png      | Bin
 .../evas/{ => resources/images}/enlightenment.png       | Bin
 src/examples/evas/{ => resources/images}/im1.png        | Bin
 src/examples/evas/{ => resources/images}/red.png        | Bin
 31 files changed, 104 insertions(+), 94 deletions(-)

diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am
index 300f978..9d81f15 100644
--- a/src/examples/evas/Makefile.am
+++ b/src/examples/evas/Makefile.am
@@ -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 \
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index ef3e079..90603be 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -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;
diff --git a/src/examples/evas/evas-3d-colorpick.c 
b/src/examples/evas/evas-3d-colorpick.c
index 6ca3376..b909a0c 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -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;
diff --git a/src/examples/evas/evas-3d-common.h 
b/src/examples/evas/evas-3d-common.h
deleted file mode 100644
index 4304b3d..0000000
--- a/src/examples/evas/evas-3d-common.h
+++ /dev/null
@@ -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"
diff --git a/src/examples/evas/evas-3d-cube2.c 
b/src/examples/evas/evas-3d-cube2.c
index 3009520..c0112d6 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -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
 {
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index c7139a8..f67f36e 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -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));
 
diff --git a/src/examples/evas/evas-3d-frustum.c 
b/src/examples/evas/evas-3d-frustum.c
index 90b8a6a..15ed883 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -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
 {
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index 5a9309e..f5344bb 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -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;
diff --git a/src/examples/evas/evas-3d-mmap-set.c 
b/src/examples/evas/evas-3d-mmap-set.c
index 923654e..084852b 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -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;
diff --git a/src/examples/evas/evas-3d-moon-space.c 
b/src/examples/evas/evas-3d-moon-space.c
index cbe4a92..928245c 100644
--- a/src/examples/evas/evas-3d-moon-space.c
+++ b/src/examples/evas/evas-3d-moon-space.c
@@ -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
 {
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index bccbea2..ea86377 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -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)
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 3d7c235..dded35e 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -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
 {
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 8e010fc..c35cd60 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -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++)
diff --git a/src/examples/evas/evas-3d-shadows.c 
b/src/examples/evas/evas-3d-shadows.c
index 710507c..3170eb7 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -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;
diff --git a/src/examples/evas/evas-aspect-hints.c 
b/src/examples/evas/evas-aspect-hints.c
index 6da0102..1d1b911 100644
--- a/src/examples/evas/evas-aspect-hints.c
+++ b/src/examples/evas/evas-aspect-hints.c
@@ -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
diff --git a/src/examples/evas/evas-common.h b/src/examples/evas/evas-common.h
new file mode 100644
index 0000000..4ce369a
--- /dev/null
+++ b/src/examples/evas/evas-common.h
@@ -0,0 +1,3 @@
+#define EVAS_IMAGE_FOLDER "/resources/images"
+#define EVAS_MODEL_FOLDER "/resources/models"
+#define EVAS_SAVED_FILES "/saved_files"
diff --git a/src/examples/evas/evas-events.c b/src/examples/evas/evas-events.c
index 937a900..7b61498 100644
--- a/src/examples/evas/evas-events.c
+++ b/src/examples/evas/evas-events.c
@@ -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"
diff --git a/src/examples/evas/evas-hints.c b/src/examples/evas/evas-hints.c
index 39deefc..23c6f3d 100644
--- a/src/examples/evas/evas-hints.c
+++ b/src/examples/evas/evas-hints.c
@@ -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
 {
diff --git a/src/examples/evas/evas-images.c b/src/examples/evas/evas-images.c
index d924d25..851b0d6 100644
--- a/src/examples/evas/evas-images.c
+++ b/src/examples/evas/evas-images.c
@@ -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"
diff --git a/src/examples/evas/evas-images2.c b/src/examples/evas/evas-images2.c
index f441301..45d7a4f 100644
--- a/src/examples/evas/evas-images2.c
+++ b/src/examples/evas/evas-images2.c
@@ -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"
diff --git a/src/examples/evas/evas-images3.c b/src/examples/evas/evas-images3.c
index 52e2656..7bd68f8 100644
--- a/src/examples/evas/evas-images3.c
+++ b/src/examples/evas/evas-images3.c
@@ -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"
diff --git a/src/examples/evas/evas-images4.c b/src/examples/evas/evas-images4.c
index 391664e..0bb51fa 100644
--- a/src/examples/evas/evas-images4.c
+++ b/src/examples/evas/evas-images4.c
@@ -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"
diff --git a/src/examples/evas/evas-map-aa.c b/src/examples/evas/evas-map-aa.c
index c396543..61413e9 100644
--- a/src/examples/evas/evas-map-aa.c
+++ b/src/examples/evas/evas-map-aa.c
@@ -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);
diff --git a/src/examples/evas/evas-map-utils.c 
b/src/examples/evas/evas-map-utils.c
index 644968c..766cf11 100644
--- a/src/examples/evas/evas-map-utils.c
+++ b/src/examples/evas/evas-map-utils.c
@@ -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);
 
diff --git a/src/examples/evas/evas-object-manipulation-eo.c 
b/src/examples/evas/evas-object-manipulation-eo.c
index 5191347..2b0bfbe 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -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"
diff --git a/src/examples/evas/evas-object-manipulation.c 
b/src/examples/evas/evas-object-manipulation.c
index d52f221..e6eaa18 100644
--- a/src/examples/evas/evas-object-manipulation.c
+++ b/src/examples/evas/evas-object-manipulation.c
@@ -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
 {
diff --git a/src/examples/evas/evas-smart-object.c 
b/src/examples/evas/evas-smart-object.c
index 3df08be..5cece8e 100644
--- a/src/examples/evas/evas-smart-object.c
+++ b/src/examples/evas/evas-smart-object.c
@@ -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"
diff --git a/src/examples/evas/cube1.png 
b/src/examples/evas/resources/images/cube1.png
similarity index 100%
rename from src/examples/evas/cube1.png
rename to src/examples/evas/resources/images/cube1.png
diff --git a/src/examples/evas/enlightenment.png 
b/src/examples/evas/resources/images/enlightenment.png
similarity index 100%
rename from src/examples/evas/enlightenment.png
rename to src/examples/evas/resources/images/enlightenment.png
diff --git a/src/examples/evas/im1.png 
b/src/examples/evas/resources/images/im1.png
similarity index 100%
rename from src/examples/evas/im1.png
rename to src/examples/evas/resources/images/im1.png
diff --git a/src/examples/evas/red.png 
b/src/examples/evas/resources/images/red.png
similarity index 100%
rename from src/examples/evas/red.png
rename to src/examples/evas/resources/images/red.png

-- 


Reply via email to