evas: resources for evas-2d examples are added to resource folder.
authorBogdan Devichev <b.devichev@samsung.com>
Fri, 20 Feb 2015 16:59:27 +0000 (17:59 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 20 Feb 2015 17:37:03 +0000 (18:37 +0100)
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>
35 files changed:
src/examples/evas/Makefile.am
src/examples/evas/cube1.png [deleted file]
src/examples/evas/enlightenment.png [deleted file]
src/examples/evas/evas-3d-aabb.c
src/examples/evas/evas-3d-colorpick.c
src/examples/evas/evas-3d-common.h [deleted file]
src/examples/evas/evas-3d-cube2.c
src/examples/evas/evas-3d-eet.c
src/examples/evas/evas-3d-frustum.c
src/examples/evas/evas-3d-md2.c
src/examples/evas/evas-3d-mmap-set.c
src/examples/evas/evas-3d-moon-space.c
src/examples/evas/evas-3d-obj.c
src/examples/evas/evas-3d-pick.c
src/examples/evas/evas-3d-ply.c
src/examples/evas/evas-3d-shadows.c
src/examples/evas/evas-aspect-hints.c
src/examples/evas/evas-common.h [new file with mode: 0644]
src/examples/evas/evas-events.c
src/examples/evas/evas-hints.c
src/examples/evas/evas-images.c
src/examples/evas/evas-images2.c
src/examples/evas/evas-images3.c
src/examples/evas/evas-images4.c
src/examples/evas/evas-map-aa.c
src/examples/evas/evas-map-utils.c
src/examples/evas/evas-object-manipulation-eo.c
src/examples/evas/evas-object-manipulation.c
src/examples/evas/evas-smart-object.c
src/examples/evas/im1.png [deleted file]
src/examples/evas/red.png [deleted file]
src/examples/evas/resources/images/cube1.png [new file with mode: 0644]
src/examples/evas/resources/images/enlightenment.png [new file with mode: 0644]
src/examples/evas/resources/images/im1.png [new file with mode: 0644]
src/examples/evas/resources/images/red.png [new file with mode: 0644]

index 300f97867440c0a9c7529d790b33ff6e413b9fe4..9d81f15a707bd5c60c9f398fb65ae2711e439b29 100644 (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 \
diff --git a/src/examples/evas/cube1.png b/src/examples/evas/cube1.png
deleted file mode 100644 (file)
index c2f4fda..0000000
Binary files a/src/examples/evas/cube1.png and /dev/null differ
diff --git a/src/examples/evas/enlightenment.png b/src/examples/evas/enlightenment.png
deleted file mode 100644 (file)
index aeb836b..0000000
Binary files a/src/examples/evas/enlightenment.png and /dev/null differ
index ef3e0793f7cf8970474f8dd3e1f52a4fe05eb0e0..90603be90ec68f0c415c0d8d1f072343f7e6b358 100644 (file)
 #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;
index 6ca3376dbe55ee3f5259bd0468ca99116e10615b..b909a0ccd0d3c8542aaee8e3afb77dbe438547b5 100644 (file)
 #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 (file)
index 4304b3d..0000000
+++ /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"
index 30095209093aced37ed50a23e0628939ac2541ff..c0112d6eb2dba1e52029c42f8e8a7a68b80d59d2 100644 (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
 {
index c7139a89059803b26e7f146c969ef640bca9e38a..f67f36e1865edf32edf70ef1faf2514e6fc6563b 100644 (file)
 #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));
 
index 90b8a6a00601d27adb2d06acadb17251fc3d1a61..15ed883830ccfa3f10a24df2b7a8c1c852b8512c 100644 (file)
 #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
 {
index 5a9309e148fea4ebf4b4fe922c460f6a89d29334..f5344bbc50ac9fd8a5c5a3981b1ff69ae2d1dffc 100644 (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;
index 923654ef2c7530cd37a45c1c8a6a3ed8611b45e2..084852b6c795668d374cb57b649eb5e4cd2f3125 100644 (file)
 #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;
index cbe4a925697962cc6a5d4021a90a788e9cb9cb2e..928245cc3e15ac73c1e3644c02832f138a05ed9a 100644 (file)
 #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>
 #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
 {
index bccbea22ea29f6da66a1aa7bbbc38feb97036040..ea86377995c17e1264bee2105ea8115c8520b88e 100644 (file)
 #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)
index 3d7c235e94794cbd1e641746228ddbe35ce6b064..dded35e4b1ebe492412627c2b63b5ae17f94ac7e 100644 (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
 {
index 8e010fc99886645ce09ca0fbe3772b32c003a918..c35cd605c3a040ccacf7c9ca48d500acf7dea5d2 100644 (file)
 #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++)
index 710507c40bbea8df406374a6f34be581ee378aea..3170eb7a4959b6da2ec5dd0c25fcb64ac3ee8f24 100644 (file)
 #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;
index 6da0102ecd450d7edb73df97184be71ec11b9f00..1d1b911a0b8d3a2b4d2a76334df8cb81e0e82331 100644 (file)
 #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 (file)
index 0000000..4ce369a
--- /dev/null
@@ -0,0 +1,3 @@
+#define EVAS_IMAGE_FOLDER "/resources/images"
+#define EVAS_MODEL_FOLDER "/resources/models"
+#define EVAS_SAVED_FILES "/saved_files"
index 937a900e75bb07fe1c2e405c18c3582e125d6a73..7b6149895dbf4cbe481a1a15b72351de94f4dc19 100644 (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 "."
 #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"
index 39deefca148e4950c63a2ad84d1b8019bc9be777..23c6f3d57e01ecaa05922bdd1b38cd163cf4cead 100644 (file)
 
 #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
 {
index d924d2539ae0f87f78d27e289a541695c6c4c478..851b0d6ad116b00c4698d48d4af08f9ff229fb5f 100644 (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"
 #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"
index f4413018f3999570ee6056dcc498348260d2f3f4..45d7a4f11df1fec8be4270e7de35e37114c7a3f2 100644 (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"
 #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"
index 52e2656ca3c92adf67d77f9d8ecae6ada74c443b..7bd68f8410cf699501b57a9b6cadcf5d09bfb5c3 100644 (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"
 #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"
index 391664ef94896734dbc70d03e9ddd0257a83624d..0bb51fac3cc730ba43ba629850ee69b1b3ff3cc6 100644 (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"
 #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"
index c396543312673ea029244c6067c4732c5ac6c20f..61413e9324f6c75baf6fdb2a88206eb49126b777 100644 (file)
 
 #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);
index 644968c43a6e714ceb3967f09eb08a5941e751ac..766cf1129060fda304c466e55f8ba8c851016b0f 100644 (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);
 
index 51913471a4be1141c636c89d73ec638c6dee1162..2b0bfbe05f0bee354af572ef36cabec5496be98f 100644 (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"
index d52f221683f4591bccda4b67123ba3a5c2dcb4d4..e6eaa18969933895d78babb4c2097b7e768c5cec 100644 (file)
 #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
 {
index 3df08be56c51435b67521c838bad2c0dd3072685..5cece8e6d908f6e87d04a5ce3d5f1d755dcb0f26 100644 (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"
diff --git a/src/examples/evas/im1.png b/src/examples/evas/im1.png
deleted file mode 100644 (file)
index aa37869..0000000
Binary files a/src/examples/evas/im1.png and /dev/null differ
diff --git a/src/examples/evas/red.png b/src/examples/evas/red.png
deleted file mode 100644 (file)
index dd03528..0000000
Binary files a/src/examples/evas/red.png and /dev/null differ
diff --git a/src/examples/evas/resources/images/cube1.png b/src/examples/evas/resources/images/cube1.png
new file mode 100644 (file)
index 0000000..c2f4fda
Binary files /dev/null and b/src/examples/evas/resources/images/cube1.png differ
diff --git a/src/examples/evas/resources/images/enlightenment.png b/src/examples/evas/resources/images/enlightenment.png
new file mode 100644 (file)
index 0000000..aeb836b
Binary files /dev/null and b/src/examples/evas/resources/images/enlightenment.png differ
diff --git a/src/examples/evas/resources/images/im1.png b/src/examples/evas/resources/images/im1.png
new file mode 100644 (file)
index 0000000..aa37869
Binary files /dev/null and b/src/examples/evas/resources/images/im1.png differ
diff --git a/src/examples/evas/resources/images/red.png b/src/examples/evas/resources/images/red.png
new file mode 100644 (file)
index 0000000..dd03528
Binary files /dev/null and b/src/examples/evas/resources/images/red.png differ