efl: add and fix some gcc lines and fix some examples. Its not possible to build...
authorRicardo de Almeida Gonzaga <ricardo@profusion.mobi>
Fri, 8 Feb 2013 17:35:17 +0000 (17:35 +0000)
committerBruno Dilly <bdilly@profusion.mobi>
Fri, 8 Feb 2013 17:35:17 +0000 (17:35 +0000)
Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>

SVN revision: 83794

87 files changed:
src/examples/ecore/ecore_animator_example.c
src/examples/ecore/ecore_audio_custom.c
src/examples/ecore/ecore_audio_playback.c
src/examples/ecore/ecore_audio_to_ogg.c
src/examples/ecore/ecore_client_bench.c
src/examples/ecore/ecore_con_client_example.c
src/examples/ecore/ecore_con_client_simple_example.c
src/examples/ecore/ecore_con_lookup_example.c
src/examples/ecore/ecore_con_server_example.c
src/examples/ecore/ecore_con_server_http_example.c
src/examples/ecore/ecore_con_server_simple_example.c
src/examples/ecore/ecore_con_url_cookies_example.c
src/examples/ecore/ecore_con_url_download_example.c
src/examples/ecore/ecore_con_url_headers_example.c
src/examples/ecore/ecore_evas_basics_example.c
src/examples/ecore/ecore_evas_buffer_example_01.c
src/examples/ecore/ecore_evas_buffer_example_02.c
src/examples/ecore/ecore_evas_callbacks.c
src/examples/ecore/ecore_evas_ews_example.c
src/examples/ecore/ecore_evas_object_example.c
src/examples/ecore/ecore_evas_window_sizes_example.c
src/examples/ecore/ecore_event_example_01.c
src/examples/ecore/ecore_event_example_02.c
src/examples/ecore/ecore_fd_handler_gnutls_example.c
src/examples/ecore/ecore_file_download_example.c
src/examples/ecore/ecore_idler_example.c
src/examples/ecore/ecore_imf_example.c
src/examples/ecore/ecore_job_example.c
src/examples/ecore/ecore_pipe_gstreamer_example.c
src/examples/ecore/ecore_poller_example.c
src/examples/ecore/ecore_server_bench.c
src/examples/ecore/ecore_thread_example.c
src/examples/ecore/ecore_time_functions_example.c
src/examples/ecore/ecore_timer_example.c
src/examples/edbus/banshee.c
src/examples/edbus/client.c
src/examples/edbus/complex-types-client-eina-value.c
src/examples/edbus/complex-types-server.c
src/examples/edbus/complex-types.c
src/examples/edbus/connman-list-services.c
src/examples/edbus/ofono-dial.c
src/examples/edbus/server.c
src/examples/edbus/simple-signal-emit.c
src/examples/edje/animations2.c
src/examples/edje/edje-animations.c
src/examples/edje/edje-basic.c
src/examples/edje/edje-basic2.c
src/examples/edje/edje-box.c
src/examples/edje/edje-box2.c
src/examples/edje/edje-codegen-example.c
src/examples/edje/edje-color-class.c
src/examples/edje/edje-drag.c
src/examples/edje/edje-multisense.c
src/examples/edje/edje-perspective.c
src/examples/edje/edje-signals-messages.c
src/examples/edje/edje-swallow.c
src/examples/edje/edje-swallow2.c
src/examples/edje/edje-table.c
src/examples/edje/edje-text.c
src/examples/edje/edje_example.c
src/examples/edje/signals2.c
src/examples/edje/sigtest.c
src/examples/eet/eet-basic.c
src/examples/eet/eet-data-cipher_decipher.c
src/examples/eet/eet-data-file_descriptor_01.c
src/examples/eet/eet-data-file_descriptor_02.c
src/examples/eet/eet-data-nested.c
src/examples/eet/eet-data-simple.c
src/examples/eet/eet-file.c
src/examples/eina/eina_simple_xml_parser_01.c
src/examples/eina/eina_xattr_01.c
src/examples/eio/eio_file_copy.c
src/examples/eio/eio_file_ls.c
src/examples/emotion/emotion_basic_example.c
src/examples/emotion/emotion_border_example.c
src/examples/emotion/emotion_generic_example.c
src/examples/emotion/emotion_generic_subtitle_example.c
src/examples/emotion/emotion_signals_example.c
src/examples/ethumb_client/ethumb_dbus.c
src/examples/evas/evas-aspect-hints.c
src/examples/evas/evas-hints.c
src/examples/evas/evas-images3.c
src/examples/evas/evas-init-shutdown.c
src/examples/evas/evas-map-utils.c
src/examples/evas/evas-object-manipulation-eo.c
src/examples/evas/evas-stacking.c
src/examples/evas/evas-table.c

index 545d48a..c35261d 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g -Wall `pkg-config --cflags --libs ecore-evas` -o ecore_animator_example ecore_animator_example.c
+//gcc -g -Wall `pkg-config --cflags --libs evas ecore-evas` -o ecore_animator_example ecore_animator_example.c
 
 #include <Ecore.h>
 #include <Ecore_Evas.h>
index d94a4b4..b63d2a5 100644 (file)
@@ -1,3 +1,6 @@
+// Compile with:
+// gcc -o ecore_audio_custom ecore_audio_custom.c `pkg-config --libs --cflags ecore ecore-audio`
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 1ec7444..6b0f0f4 100644 (file)
@@ -1,3 +1,6 @@
+// Compile with:
+// gcc -o ecore_audio_playback ecore_audio_playback.c `pkg-config --libs --cflags ecore eina ecore-audio`
+
 #include <stdio.h>
 #include <string.h>
 #include <libgen.h>
index 120f9f9..8cbf288 100644 (file)
@@ -1,3 +1,6 @@
+// Compile with:
+// gcc -o ecore_audio_to_ogg ecore_audio_to_ogg.c `pkg-config --libs --cflags ecore eina ecore-audio`
+
 #include <stdio.h>
 #include <libgen.h>
 #include <sys/types.h>
index dc550ee..f4ef3ed 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_client_bench ecore_client_bench.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #include <stdio.h>
 #include <Ecore.h>
 #include <Ecore_Con.h>
index ae4bd84..580289f 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_client_example ecore_con_client_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 48b1933..d315bd6 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_client_simple_example ecore_con_client_simple_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #include <stdio.h>
 #include <Ecore.h>
 #include <Ecore_Con.h>
index 1a47d0b..d81abf3 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_lookup_example ecore_con_lookup_example.c `pkg-config --libs --cflags ecore ecore-con`
+
 #include <stdio.h>
 #include <Ecore.h>
 #include <Ecore_Con.h>
index 9b929e4..da63d28 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_server_example ecore_con_server_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 14d1ecb..c6e9c23 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_server_http_example ecore_con_server_http_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #include <stdio.h>
 #include <sys/time.h>
 #include <Ecore.h>
index c771b2a..8cae748 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_server_simple_example ecore_con_server_simple_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #include <stdio.h>
 #include <Ecore.h>
 #include <Ecore_Con.h>
index 908df0f..dce9989 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_url_cookies_example ecore_con_url_cookies_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #include <stdio.h>
 #include <Eina.h>
 #include <Ecore.h>
index 6eed89a..2723cc8 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_url_download_example ecore_con_url_download_example.c `pkg-config --libs --cflags ecore ecore-con`
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index fb05df3..0911c68 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_con_url_headers_example ecore_con_url_headers_example.c `pkg-config --libs --cflags ecore ecore-con eina`
+
 #include <stdio.h>
 #include <Eina.h>
 #include <Ecore.h>
index b62c64a..b6fb94a 100644 (file)
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o ecore_evas_basics_example ecore_evas_basics_example.c `pkg-config --libs --cflags ecore-evas`
+ * gcc -o ecore_evas_basics_example ecore_evas_basics_example.c `pkg-config --libs --cflags ecore evas ecore-evas`
  * @endverbatim
  */
 
index 39f6dd1..71ed986 100644 (file)
@@ -7,7 +7,7 @@
  * Compile with:
  *
  * @verbatim
- * gcc -o evas-buffer-simple evas-buffer-simple.c `pkg-config --libs --cflags evas evas-software-buffer`
+ * gcc -o ecore_evas_buffer_example_01 ecore_evas_buffer_example_01.c `pkg-config --libs --cflags evas ecore-evas evas-software-buffer`
  * @endverbatim
  *
  */
index d30d764..0d59e1f 100644 (file)
@@ -7,7 +7,7 @@
  * Compile with:
  *
  * @verbatim
- * gcc -o evas-buffer-simple evas-buffer-simple.c `pkg-config --libs --cflags evas evas-software-buffer`
+ * gcc -o ecore_evas_buffer_example_02 ecore_evas_buffer_example_02.c `pkg-config --libs --cflags ecore evas ecore-evas evas-software-buffer`
  * @endverbatim
  *
  */
index 3e42da1..5c1a5d6 100644 (file)
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o ecore_evas_callbacks ecore_evas_callbacks.c `pkg-config --libs --cflags ecore-evas`
+ * gcc -o ecore_evas_callbacks ecore_evas_callbacks.c `pkg-config --libs --cflags ecore ecore-evas`
  * @endverbatim
  */
 
index 1209ffd..07c0a23 100644 (file)
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o ecore_evas_ews_example ecore_evas_ews_example.c `pkg-config --libs --cflags ecore-evas`
+ * gcc -o ecore_evas_ews_example ecore_evas_ews_example.c `pkg-config --libs --cflags ecore evas ecore-evas`
  * @endverbatim
  */
 
index 38e4c4b..c76f186 100644 (file)
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o ecore_evas_object_example ecore_evas_object_example.c `pkg-config --libs --cflags ecore-evas`
+ * gcc -o ecore_evas_object_example ecore_evas_object_example.c `pkg-config --libs --cflags ecore evas ecore-evas`
  * @endverbatim
  */
 
index 833529e..5edd52a 100644 (file)
@@ -6,7 +6,7 @@
  * one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o evas-smart-object evas-smart-object.c `pkg-config --libs --cflags evas ecore ecore-evas`
+ * gcc -o ecore_evas_window_sizes_example ecore_evas_window_sizes_example.c `pkg-config --libs --cflags evas ecore ecore-evas`
  * @endverbatim
  */
 
index 64a5be8..708afba 100644 (file)
@@ -1,7 +1,5 @@
-/*
- * Compile with:
- * gcc -g -Wall `pkg-config --cflags --libs ecore` -o ecore_event_example ecore_event_example.c
- */
+//Compile with:
+// gcc -g -Wall `pkg-config --cflags --libs ecore` -o ecore_event_example_01 ecore_event_example_01.c
 
 #include <Ecore.h>
 
index c293e65..c8161ba 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -g -Wall `pkg-config --cflags --libs ecore` -o ecore_event_example_02 ecore_event_example_02.c
+
 #include <Ecore.h>
 #include <unistd.h>
 
index 5635b13..078b5d7 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_fd_handler_gnutls_example ecore_fd_handler_gnutls_example.c `pkg-config --cflags --libs ecore gnutls`
+
 #include <Ecore.h>
 #include <fcntl.h>
 #include <netinet/tcp.h>
index 42cff6c..e44c7e7 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_file_download_example ecore_file_download_example.c `pkg-config --libs --cflags ecore eina ecore-file`
+
 #include <stdio.h>
 #include <Eina.h>
 #include <Ecore.h>
index 9db99cd..de69a44 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_idler_example ecore_idler_example.c `pkg-config --libs --cflags ecore eo`
+
 #include <Ecore.h>
 #include <unistd.h>
 
index 9aa3334..bc03db9 100644 (file)
@@ -2,7 +2,7 @@
  * Ecore example illustrating how to use ecore imf.
  *
  * @verbatim
- * gcc -o ecore_imf_example ecore_imf_example.c `pkg-config --cflags --libs ecore evas ecore-evas ecore-imf ecore-imf-evas`
+ * gcc -o ecore_imf_example ecore_imf_example.c `pkg-config --cflags --libs ecore evas eina ecore-evas ecore-imf ecore-imf-evas`
  * @endverbatim
  */
 
index 561a851..2621d7f 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_job_example ecore_job_example.c `pkg-config --libs --cflags ecore`
+
 #include <Ecore.h>
 #include <unistd.h>
 
index 7eb5370..008b96e 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_pipe_gstreamer_example ecore_pipe_gstreamer_example.c `pkg-config --libs --cflags ecore gstreamer-0.10`
+
 #include <gst/gst.h>
 #include <Ecore.h>
 
index ccd1c2e..ef8592b 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_poller_example ecore_poller_example.c `pkg-config --libs --cflags ecore eo`
+
 #include <Ecore.h>
 #include <unistd.h>
 
index 1f9b63a..8c5961e 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_server_bench ecore_server_bench.c `pkg-config --libs --cflags ecore eina ecore-con`
+
 #include <stdio.h>
 #include <Ecore.h>
 #include <Ecore_Con.h>
index a344919..74cbffb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * gcc -o ecore_thread_example ecore_thread_example.c `pkg-config --cflags --libs ecore`
+ * gcc -o ecore_thread_example ecore_thread_example.c `pkg-config --cflags --libs ecore eina`
  */
 #include <stdio.h>
 #include <stdlib.h>
index d742c8b..3e7b703 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_time_functions_example ecore_time_functions_example.c `pkg-config --libs --cflags ecore`
+
 #include <Ecore.h>
 #include <unistd.h>
 
index bafeacb..27d2958 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ecore_timer_example ecore_timer_example.c `pkg-config --libs --cflags ecore`
+
 #include <Ecore.h>
 #include <unistd.h>
 
index 8223139..62194b3 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o banshee banshee.c `pkg-config --cflags --libs edbus2 ecore eina`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index 8a0420c..61b3e24 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o client client.c `pkg-config --cflags --libs edbus2 ecore eina`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index cde7c9b..91b3ecc 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o complex-types-client-eina-value complex-types-client-eina-value.c `pkg-config --cflags --libs edbus2 ecore eina`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index 7441690..2409ce7 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o complex-types-server complex-types-server.c `pkg-config --cflags --libs edbus2 ecore`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index e60badf..3fa4e0b 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o complex-types complex-types.c `pkg-config --cflags --libs edbus2 ecore`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index 73b3970..7bd81c2 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o connman-list-services connman-list-services.c `pkg-config --cflags --libs edbus2 ecore`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index b2da855..84729db 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o ofono-dial ofono-dial.c `pkg-config --cflags --libs edbus2 ecore`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index dd606bd..d10a672 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o server server.c `pkg-config --cflags --libs edbus2 ecore`
+
 #include "EDBus.h"
 #include <Ecore.h>
 
index 960bfe6..14e1fee 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o simple-signal-emit simple-signal-emit.c `pkg-config --cflags --libs edbus2`
+
 #include <EDBus.h>
 
 enum {
index 045c5cc..e33f0e7 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// edje_cc animations2.edc && gcc -o animations2 animations2.c `pkg-config --libs --cflags ecore ecore-evas edje`
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #else
@@ -5,6 +8,10 @@
 #define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
 #define HEIGHT    (700)
 
 static void
-_on_delete(Ecore_Evas *ee)
+_on_delete(Ecore_Evas *ee EINA_UNUSED)
 {
    ecore_main_loop_quit();
 }
 
 int
-main(int argc EINA_UNUSED, char **argv)
+main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
 {
-   char edje_file_path[PATH_MAX];
-   const char *edje_file = "animations2.edj";
+   const char *edje_file = PACKAGE_DATA_DIR"/animations2.edj";
    Evas *evas;
    Ecore_Evas *ee;
-   Eina_Prefix *pfx;
    Evas_Object *edje_obj;
    Evas_Object *bg;
 
@@ -34,15 +39,9 @@ main(int argc EINA_UNUSED, char **argv)
 
    if (!edje_init()) goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main, "EDJE_EXAMPLES", "edje/examples",
-                         edje_file, PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
-
-   if (!pfx) goto shutdown_edje;
-
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
 
-   if (!ee) goto eina_prefix_free;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Animations");
@@ -60,15 +59,14 @@ main(int argc EINA_UNUSED, char **argv)
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path), "%s/examples/%s",
-            eina_prefix_data_get(pfx), edje_file);
+   fprintf(stderr, "loading edje file; %s\n", edje_file);
 
-   if (!edje_object_file_set(edje_obj, edje_file_path, "animation_group"))
+   if (!edje_object_file_set(edje_obj, edje_file, "animation_group"))
      {
         int err = edje_object_load_error_get(edje_obj);
         const char *errmsg = edje_load_error_str(err);
         fprintf(stderr, "Could not load the edje file - reason:%s\n", errmsg);
-        goto eina_prefix_free;
+        goto shutdown_edje;
      }
 
    evas_object_resize(edje_obj, 700, 700);
@@ -79,15 +77,12 @@ main(int argc EINA_UNUSED, char **argv)
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    edje_shutdown();
    ecore_evas_shutdown();
 
    return EXIT_SUCCESS;
 
-   eina_prefix_free: eina_prefix_free(pfx);
-
    shutdown_edje: edje_shutdown();
 
    shutdown_ecore_evas: ecore_evas_shutdown();
index c873781..413394c 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -143,15 +147,13 @@ _on_key_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, v
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "animations.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/animations.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -159,22 +161,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete_cb);
    ecore_evas_callback_resize_set(ee, _on_canvas_resize);
@@ -191,9 +181,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "animations_group");
+   edje_object_file_set(edje_obj, edje_file, "animations_group");
    evas_object_move(edje_obj, 0, 0);
    evas_object_resize(edje_obj, WIDTH, HEIGHT);
    evas_object_show(edje_obj);
@@ -209,15 +197,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 4d4bc27..4c7fad6 100644 (file)
@@ -6,7 +6,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o edje-basic edje-basic.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
+ * edje_cc basic.edc && gcc -o edje-basic edje-basic.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
  * @endverbatim
  */
 
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <stdio.h>
 
 #include <Eina.h>
@@ -98,17 +102,15 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         border_img_path[PATH_MAX];
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "basic.edj";
+   const char  *img_file = PACKAGE_DATA_DIR"/red.png";
+   const char  *edje_file = PACKAGE_DATA_DIR"/basic.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *border;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
    int          x;
    int          y;
    int          w;
@@ -120,22 +122,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Edje Basics Example");
@@ -153,11 +143,8 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   printf("%s\n", edje_file_path);
    /* exercising Edje loading error, on purpose */
-   if (!edje_object_file_set(edje_obj, edje_file_path, "unexistant_group"))
+   if (!edje_object_file_set(edje_obj, edje_file, "unexistant_group"))
      {
         int err = edje_object_load_error_get(edje_obj);
         const char *errmsg = edje_load_error_str(err);
@@ -165,7 +152,7 @@ main(int argc EINA_UNUSED, char *argv[])
                         " %s\n", errmsg);
      }
 
-   if (!edje_object_file_set(edje_obj, edje_file_path, "example_group"))
+   if (!edje_object_file_set(edje_obj, edje_file, "example_group"))
      {
         int err = edje_object_load_error_get(edje_obj);
         const char *errmsg = edje_load_error_str(err);
@@ -173,7 +160,7 @@ main(int argc EINA_UNUSED, char *argv[])
                 errmsg);
 
         evas_object_del(edje_obj);
-        goto free_prefix;
+        goto shutdown_edje;
      }
 
    fprintf(stdout, "Loaded Edje object bound to group 'example_group' from"
@@ -185,13 +172,10 @@ main(int argc EINA_UNUSED, char *argv[])
 
    evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, edje_obj);
 
-   snprintf(border_img_path, sizeof(border_img_path),
-            "%s/edje/examples/red.png", eina_prefix_data_get(pfx));
-
    /* this is a border around the Edje object above, here just to
     * emphasize its geometry */
    border = evas_object_image_filled_add(evas);
-   evas_object_image_file_set(border, border_img_path, NULL);
+   evas_object_image_file_set(border, img_file, NULL);
    evas_object_image_border_set(border, 2, 2, 2, 2);
    evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE);
 
@@ -239,15 +223,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index e68d1ec..8836e7e 100644 (file)
@@ -1,6 +1,6 @@
 /**
 * @verbatim
-* gcc -o edje-basic2 edje-basic2.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
+* edje_cc basic2.edc && gcc -o edje-basic2 edje-basic2.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
 * @endverbatim
 */
 
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <stdio.h>
 
 #include <Eina.h>
@@ -76,11 +80,9 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
 }
 
 int
-main(int argc EINA_UNUSED, char **argv)
+main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
 {
-  const char *edje_file = "basic2.edj";
-  char edje_file_path[PATH_MAX];
-  Eina_Prefix *pfx;
+  const char *edje_file = PACKAGE_DATA_DIR"/basic2.edj";
   Ecore_Evas *ee;
   Evas *evas;
   Evas_Object *bg;
@@ -92,22 +94,9 @@ main(int argc EINA_UNUSED, char **argv)
   if(!edje_init())
        goto shutdown_ecore_evas;
 
-  pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-
-  if(!pfx)
-    goto shutdown_edje;
-
   ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
 
-  if(!ee)
-    goto eina_prefix_free;
+  if(!ee) goto shutdown_edje;
 
   ecore_evas_callback_delete_request_set(ee, _on_delete);
   ecore_evas_title_set(ee, "Edje show image");
@@ -123,22 +112,16 @@ main(int argc EINA_UNUSED, char **argv)
   ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
   evas_object_focus_set(bg, EINA_TRUE);
 
-
   edje_obj = edje_object_add(evas);
 
-  snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-
-  if(!edje_object_file_set(edje_obj, edje_file_path, "image_group"))
+  if(!edje_object_file_set(edje_obj, edje_file, "image_group"))
   {
     int err = edje_object_load_error_get(edje_obj);
     const char *errmsg = edje_load_error_str(err);
     fprintf(stderr, "Could not load the edje file - reason:%s\n", errmsg);
-    goto eina_prefix_free;
+    goto shutdown_edje;
   }
 
-
-
   evas_object_move(edje_obj, 50, 50);
   evas_object_resize(edje_obj, 64, 64);
   evas_object_show(edje_obj);
@@ -151,16 +134,12 @@ main(int argc EINA_UNUSED, char **argv)
 
   ecore_main_loop_begin();
 
-  eina_prefix_free(pfx);
   ecore_evas_free(ee);
   edje_shutdown();
   ecore_evas_shutdown();
 
   return EXIT_SUCCESS;
 
-eina_prefix_free:
-  eina_prefix_free(pfx);
-
 shutdown_edje:
   edje_shutdown();
 
index 3da66e2..20cf56e 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -152,15 +156,13 @@ _on_bg_key_down(void *data, Evas *e, Evas_Object *o EINA_UNUSED, void *event_inf
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "box.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/box.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
    int          i;
 
    if (!ecore_evas_init())
@@ -169,22 +171,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_destroy_set(ee, _on_destroy);
    ecore_evas_callback_resize_set(ee, _on_canvas_resize);
@@ -203,9 +193,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "example/group");
+   edje_object_file_set(edje_obj, edje_file, "example/group");
    evas_object_move(edje_obj, 0, 0);
    evas_object_resize(edje_obj, WIDTH, HEIGHT);
    evas_object_show(edje_obj);
@@ -234,15 +222,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 436b621..e2a172f 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -151,17 +155,15 @@ on_destroy(Ecore_Evas *ee EINA_UNUSED)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "box.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/box.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
    Evas_Object *last;
    Evas_Object *o;
-   Eina_Prefix *pfx;
    int          w;
    int          h;
    int          i;
@@ -172,22 +174,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, 640, 480, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_resize_set(ee, on_resize);
    ecore_evas_callback_destroy_set(ee, on_destroy);
@@ -203,9 +193,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_box_layout_register("custom_layout", custom_layout, NULL, NULL, NULL, NULL);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_obj = box_new(ee, edje_file_path, "box", 0, 0, w, h);
+   edje_obj = box_new(ee, edje_file, "box", 0, 0, w, h);
    evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, on_keydown, edje_obj);
 
    for (i = 1; i <= 5; i++)
@@ -229,15 +217,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 6eff233..910fd54 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include "codegen_example_generated.h"
 
 #include <Ecore.h>
@@ -39,7 +43,7 @@
 #define HEIGHT (800)
 
 static void
-_on_delete(Ecore_Evas *ee)
+_on_delete(Ecore_Evas *ee EINA_UNUSED)
 {
    ecore_main_loop_quit();
 }
@@ -56,11 +60,10 @@ _columns_rows_print(Evas_Object *edje_obj)
 }
 
 static void
-_on_mouse_over(void *data, Evas_Object *obj, const char *emission,
+_on_mouse_over(void *data EINA_UNUSED, Evas_Object *obj, const char *emission,
               const char *source)
 {
    Evas_Object *rect;
-   Eina_Bool disabled;
    static int i = 0;
 
    printf("Mouse over, source: %s - emission: %s\n",
@@ -72,7 +75,7 @@ _on_mouse_over(void *data, Evas_Object *obj, const char *emission,
      }
    if (i++ == 5)
      {
-       Evas_Object *rect = codegen_example_part_two_get(obj);
+       rect = codegen_example_part_two_get(obj);
        evas_object_color_set(rect, 0, 255, 0, 255);
        codegen_example_part_below_over_callback_del_full(obj,_on_mouse_over,
                                                          NULL);
@@ -97,17 +100,14 @@ _rect_create(Evas *e, unsigned char r, unsigned char g, unsigned char b)
 }
 
 int
-main(int argc, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "codegen.edj", *aux;
+   const char  *edje_file = PACKAGE_DATA_DIR"/codegen.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
    Evas_Object *red_rect, *yellow_rect, *blue_rect, *rects[4];
-   Eina_Prefix *pfx;
-   Eina_Bool    disabled;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -115,25 +115,10 @@ main(int argc, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Edje codegen Example");
@@ -145,7 +130,7 @@ main(int argc, char *argv[])
    evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */
    ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
 
-   edje_obj = codegen_example_object_add(evas, edje_file_path);
+   edje_obj = codegen_example_object_add(evas, edje_file);
    evas_object_resize(edje_obj, WIDTH, HEIGHT);
    evas_object_show(edje_obj);
 
@@ -184,15 +169,12 @@ main(int argc, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 883e258..a4a5a1e 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -210,9 +214,7 @@ _create_windows(const char *edje_file_path)
 int
 main(int argc, char *argv[])
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "color-class.edj";
-   Eina_Prefix *pfx;
+   const char  *edje_file = PACKAGE_DATA_DIR"/color-class.edj";
    color        c1, c2, c3;
    int          i;
 
@@ -242,21 +244,7 @@ main(int argc, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   if (!_create_windows(edje_file_path))
-     goto free_prefix;
+   if (!_create_windows(edje_file)) goto shutdown_edje;
 
    edje_color_class_set(argv[1],                     /* class name   */
                         c1[0], c1[1], c1[2], c1[3],  /* Object color */
@@ -277,15 +265,12 @@ main(int argc, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee1);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 6b3f6b2..da7504f 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -118,15 +122,13 @@ _on_knob_moved(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "drag.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/drag.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -134,22 +136,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_destroy_set(ee, _on_destroy);
    ecore_evas_callback_resize_set(ee, _on_canvas_resize);
@@ -168,9 +158,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "example/group");
+   edje_object_file_set(edje_obj, edje_file, "example/group");
    evas_object_move(edje_obj, 0, 0);
    evas_object_resize(edje_obj, WIDTH, HEIGHT);
    evas_object_show(edje_obj);
@@ -192,15 +180,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index c66c568..5de3ae8 100644 (file)
@@ -5,7 +5,7 @@
  * buffer one) and multisense support ine edje. See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o edje-multisense edje-multisense.c `pkg-config --libs --cflags eina evas ecore ecore-evas edje`
+ * edje_cc multisense.edc && gcc -o edje-multisense edje-multisense.c `pkg-config --libs --cflags eina evas ecore ecore-evas edje`
  * @endverbatim
  */
 
 #include <Ecore_Evas.h>
 #include <Edje.h>
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #define WIDTH  300
 #define HEIGHT 300
 
@@ -29,7 +33,8 @@ static Evas_Object *create_my_group(Evas *canvas)
         return NULL;
      }
 
-   if (!edje_object_file_set(edje, "multisense.edj", "example_group"))
+   if (!edje_object_file_set(edje, PACKAGE_DATA_DIR"/multisense.edj",
+                             "example_group"))
      {
         int err = edje_object_load_error_get(edje);
         const char *errmsg = edje_load_error_str(err);
index dbb3e22..dc8c248 100644 (file)
@@ -1,11 +1,11 @@
 /**
- * Simple Edje example illustrating drag functions.
+ * Simple Edje example illustrating perspective functions.
  *
  * You'll need at least one Evas engine built for it (excluding the
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * edje_cc drag.edc && gcc -o drag-box drag-box.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
+ * edje_cc perspective.edc && gcc -o edje-perspective edje-perspective.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
  * @endverbatim
  */
 
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -159,14 +163,12 @@ _animation_end_cb(void *data, Evas_Object *o EINA_UNUSED, const char *emission E
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "perspective.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/perspective.edj";
    struct _App  app;
    Ecore_Evas  *ee;
    Evas        *evas;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -174,17 +176,6 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    edje_frametime_set(1.0 / 60.0);
 
    /* this will give you a window with an Evas canvas under the first
@@ -195,8 +186,7 @@ main(int argc EINA_UNUSED, char *argv[])
    app.focal = 50;
 
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_destroy_set(ee, _on_destroy);
    ecore_evas_callback_resize_set(ee, _on_canvas_resize);
@@ -216,9 +206,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    app.edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(app.edje_obj, edje_file_path, "example/group");
+   edje_object_file_set(app.edje_obj, edje_file, "example/group");
    evas_object_move(app.edje_obj, 0, 0);
    evas_object_resize(app.edje_obj, WIDTH, HEIGHT);
    evas_object_show(app.edje_obj);
@@ -235,15 +223,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 380d1e5..b9b5f34 100644 (file)
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * gcc -o edje-signals-messages edje-signals-messages.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
+ * edje_cc signals-messages.edc && gcc -o edje-signals-messages edje-signals-messages.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
  * @endverbatim
  */
 
 #define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -138,17 +142,15 @@ _message_handle(void             *data EINA_UNUSED,
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         border_img_path[PATH_MAX];
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "signals-messages.edj";
+   const char  *img_file = PACKAGE_DATA_DIR"/red.png";
+   const char  *edje_file = PACKAGE_DATA_DIR"/signals-messages.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
    Evas_Object *border;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -156,22 +158,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Edje Basics Example");
@@ -188,9 +178,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   if (!edje_object_file_set(edje_obj, edje_file_path, "example_group"))
+   if (!edje_object_file_set(edje_obj, edje_file, "example_group"))
      {
         int err = edje_object_load_error_get(edje_obj);
         const char *errmsg = edje_load_error_str(err);
@@ -198,7 +186,7 @@ main(int argc EINA_UNUSED, char *argv[])
                         "signals-messages.edj: %s\n", errmsg);
 
         evas_object_del(edje_obj);
-        goto free_prefix;
+        goto shutdown_edje;
      }
 
    edje_object_signal_callback_add(edje_obj, "mouse,wheel,*", "part_left",
@@ -215,13 +203,10 @@ main(int argc EINA_UNUSED, char *argv[])
 
    evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, edje_obj);
 
-   snprintf(border_img_path, sizeof(border_img_path),
-            "%s/edje/examples/red.png", eina_prefix_data_get(pfx));
-
    /* this is a border around the Edje object above, here just to
     * emphasize its geometry */
    border = evas_object_image_filled_add(evas);
-   evas_object_image_file_set(border, border_img_path, NULL);
+   evas_object_image_file_set(border, img_file, NULL);
    evas_object_image_border_set(border, 2, 2, 2, 2);
    evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE);
 
@@ -236,15 +221,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 4769cc1..2b93ce0 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -43,17 +47,15 @@ _on_canvas_resize(Ecore_Evas *ee)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "swallow.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/swallow.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *rect;
    Evas_Object *obj;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -61,22 +63,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_callback_resize_set(ee, _on_canvas_resize);
@@ -93,9 +83,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "example_group");
+   edje_object_file_set(edje_obj, edje_file, "example_group");
    evas_object_move(edje_obj, 20, 20);
    evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
    evas_object_show(edje_obj);
@@ -112,15 +100,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 884578c..fe3f956 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -29,19 +33,16 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   char         img_file_path[PATH_MAX];
-   const char  *edje_file = "swallow.edj";
-   const char  *img_file = "bubble.png";
+   const char  *edje_file = PACKAGE_DATA_DIR"/swallow.edj";
+   const char  *img_file = PACKAGE_DATA_DIR"/bubble.png";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *img;
    Evas_Object *obj;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
    Evas_Load_Error err;
 
    if (!ecore_evas_init())
@@ -50,22 +51,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
 
@@ -84,26 +73,21 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "example_group");
+   edje_object_file_set(edje_obj, edje_file, "example_group");
    evas_object_move(edje_obj, 20, 20);
    evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
    evas_object_show(edje_obj);
 
-   snprintf(img_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), img_file);
-
    img = evas_object_image_filled_add(evas);
-   evas_object_image_file_set(img, img_file_path, NULL);
+   evas_object_image_file_set(img, img_file, NULL);
 
    err = evas_object_image_load_error_get(img);
 
    if (err != EVAS_LOAD_ERROR_NONE)
    {
       fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
-              img_file_path, evas_load_error_str(err));
-     goto free_prefix;
+              img_file, evas_load_error_str(err));
+     goto shutdown_edje;
    }
 
    edje_object_part_swallow(edje_obj, "part_one", img);
@@ -117,15 +101,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 51042d2..965a0f4 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -103,16 +107,14 @@ _rects_create(Evas *evas, Evas_Object **rects, Evas_Object *edje_obj)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "table.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/table.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
    Evas_Object *rects[4];
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -120,22 +122,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_callback_resize_set(ee, _on_canvas_resize);
@@ -152,9 +142,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "example_table");
+   edje_object_file_set(edje_obj, edje_file, "example_table");
    evas_object_move(edje_obj, 0, 0); /* at canvas' origin */
    evas_object_resize(edje_obj, WIDTH, HEIGHT);
    evas_object_show(edje_obj);
@@ -192,15 +180,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 5bfaaa4..8242ea9 100644 (file)
 # define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -35,15 +39,13 @@ _on_text_change(void *data EINA_UNUSED, Evas_Object *obj, const char *part)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "text.edj";
+   const char  *edje_file = PACKAGE_DATA_DIR"/text.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -51,22 +53,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Edje text Example");
@@ -82,9 +72,7 @@ main(int argc EINA_UNUSED, char *argv[])
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   edje_object_file_set(edje_obj, edje_file_path, "example_group");
+   edje_object_file_set(edje_obj, edje_file, "example_group");
    evas_object_move(edje_obj, 20, 20);
    evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
    evas_object_show(edje_obj);
@@ -103,15 +91,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 103e867..a39a082 100644 (file)
@@ -1,9 +1,16 @@
+//Compile with:
+// edje_cc edje_example.edc && gcc -o edje_example edje_example.c `pkg-config --libs --cflags ecore ecore-evas edje`
+
 #include <Eina.h>
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #define WIDTH 320
 #define HEIGHT 240
 
@@ -18,7 +25,8 @@ static Evas_Object *create_my_group(Evas *canvas, const char *text)
         return NULL;
      }
 
-   if (!edje_object_file_set(edje, "edje_example.edj", "my_group"))
+   if (!edje_object_file_set(edje, PACKAGE_DATA_DIR"/edje_example.edj",
+                             "my_group"))
      {
         int err = edje_object_load_error_get(edje);
         const char *errmsg = edje_load_error_str(err);
index b43b887..61b6a77 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// edje_cc signalsBubble.edc && gcc -o signals2 signals2.c `pkg-config --libs --cflags ecore ecore-evas edje`
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #else
@@ -5,6 +8,10 @@
 #define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -56,11 +63,9 @@ _on_mouse_over(void *data, Evas_Object *edje_obj,
 }
 
 int
-main(int argc EINA_UNUSED, char **argv)
+main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
 {
-   const char *edje_file = "signalsBubble.edj";
-   char edje_file_path[PATH_MAX];
-   Eina_Prefix *pfx;
+   const char *edje_file = PACKAGE_DATA_DIR"/signalsBubble.edj";
    Ecore_Evas *ee;
    Evas *evas;
    Evas_Object *bg;
@@ -70,15 +75,9 @@ main(int argc EINA_UNUSED, char **argv)
 
    if (!edje_init()) goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main, "EDJE_EXAMPLES", "edje/examples",
-                         edje_file, PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
-
-   if (!pfx) goto shutdown_edje;
-
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
 
-   if (!ee) goto eina_prefix_free;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Edje animations and signals");
@@ -96,15 +95,12 @@ main(int argc EINA_UNUSED, char **argv)
 
    edje_obj = edje_object_add(evas);
 
-   snprintf(edje_file_path, sizeof(edje_file_path), "%s/examples/%s",
-            eina_prefix_data_get(pfx), edje_file);
-
-   if (!edje_object_file_set(edje_obj, edje_file_path, "image_group"))
+   if (!edje_object_file_set(edje_obj, edje_file, "image_group"))
      {
         int err = edje_object_load_error_get(edje_obj);
         const char *errmsg = edje_load_error_str(err);
         fprintf(stderr, "Could not load the edje file - reason:%s\n", errmsg);
-        goto eina_prefix_free;
+        goto shutdown_edje;
      }
 
    edje_object_signal_callback_add(edje_obj, "mouse,move", "part_image",
@@ -117,15 +113,12 @@ main(int argc EINA_UNUSED, char **argv)
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    edje_shutdown();
    ecore_evas_shutdown();
 
    return EXIT_SUCCESS;
 
-   eina_prefix_free: eina_prefix_free(pfx);
-
    shutdown_edje: edje_shutdown();
 
    shutdown_ecore_evas: ecore_evas_shutdown();
index 08300a2..2d600ff 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// edje_cc sigtest.edc && gcc -o sigtest sigtest.c `pkg-config --libs --cflags ecore ecore-evas edje`
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #else
@@ -5,6 +8,10 @@
 #define EINA_UNUSED
 #endif
 
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -31,12 +38,12 @@ _on_keydown(void        *data,
    Ecore_Evas          *ee;
    Evas_Event_Key_Down *ev;
    Evas_Object         *edje_obj;
-   char                *edje_file_path;
+   char                *edje_file;
 
    ee = (Ecore_Evas *)data;
    ev = (Evas_Event_Key_Down *)einfo;
    edje_obj = ecore_evas_data_get(ee, "edje_obj");
-   edje_file_path = ecore_evas_data_get(ee, "file_path");
+   edje_file = ecore_evas_data_get(ee, "file");
 
    if (!strcmp(ev->keyname, "h"))
      {
@@ -45,7 +52,7 @@ _on_keydown(void        *data,
      }
    else if (!strcmp(ev->keyname, "e"))
      {
-      if (!edje_object_file_set(edje_obj, edje_file_path, "plain/edje/group"))
+      if (!edje_object_file_set(edje_obj, edje_file, "plain/edje/group"))
         {
            int err = edje_object_load_error_get(edje_obj);
            const char *errmsg = edje_load_error_str(err);
@@ -59,7 +66,7 @@ _on_keydown(void        *data,
      }
    else if (!strcmp(ev->keyname, "l"))
      {
-      if (!edje_object_file_set(edje_obj, edje_file_path, "lua_base"))
+      if (!edje_object_file_set(edje_obj, edje_file, "lua_base"))
         {
            int err = edje_object_load_error_get(edje_obj);
            const char *errmsg = edje_load_error_str(err);
@@ -225,17 +232,15 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
 }
 
 int
-main(int argc EINA_UNUSED, char *argv[])
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   char         border_img_path[PATH_MAX];
-   char         edje_file_path[PATH_MAX];
-   const char  *edje_file = "sigtest.edj";
+   const char  *img_file = PACKAGE_DATA_DIR"/red.png";
+   const char  *edje_file = PACKAGE_DATA_DIR"/sigtest.edj";
    Ecore_Evas  *ee;
    Evas        *evas;
    Evas_Object *bg;
    Evas_Object *border;
    Evas_Object *edje_obj;
-   Eina_Prefix *pfx;
 
    if (!ecore_evas_init())
      return EXIT_FAILURE;
@@ -243,22 +248,10 @@ main(int argc EINA_UNUSED, char *argv[])
    if (!edje_init())
      goto shutdown_ecore_evas;
 
-   pfx = eina_prefix_new(argv[0], main,
-                         "EDJE_EXAMPLES",
-                         "edje/examples",
-                         edje_file,
-                         PACKAGE_BIN_DIR,
-                         PACKAGE_LIB_DIR,
-                         PACKAGE_DATA_DIR,
-                         PACKAGE_DATA_DIR);
-   if (!pfx)
-     goto shutdown_edje;
-
    /* this will give you a window with an Evas canvas under the first
     * engine available */
    ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
-   if (!ee)
-     goto free_prefix;
+   if (!ee) goto shutdown_edje;
 
    ecore_evas_callback_delete_request_set(ee, _on_delete);
    ecore_evas_title_set(ee, "Signals and wessages tester");
@@ -279,9 +272,7 @@ main(int argc EINA_UNUSED, char *argv[])
    edje_object_message_handler_set(edje_obj, _on_message, NULL);
    edje_object_signal_callback_add(edje_obj, "*", "*", _on_signal, NULL);
 
-   snprintf(edje_file_path, sizeof(edje_file_path),
-            "%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
-   if (!edje_object_file_set(edje_obj, edje_file_path, "lua_base"))
+   if (!edje_object_file_set(edje_obj, edje_file, "lua_base"))
      {
         int err = edje_object_load_error_get(edje_obj);
         const char *errmsg = edje_load_error_str(err);
@@ -289,7 +280,7 @@ main(int argc EINA_UNUSED, char *argv[])
                 errmsg);
 
         evas_object_del(edje_obj);
-        goto free_prefix;
+        goto shutdown_edje;
      }
 
    fprintf(stdout, "Loaded Edje object bound to group 'lua_base' from"
@@ -299,17 +290,14 @@ main(int argc EINA_UNUSED, char *argv[])
    evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
    evas_object_show(edje_obj);
    ecore_evas_data_set(ee, "edje_obj", edje_obj);
-   ecore_evas_data_set(ee, "file_path", edje_file_path);
+   ecore_evas_data_set(ee, "file", edje_file);
 
    evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, ee);
 
-   snprintf(border_img_path, sizeof(border_img_path),
-            "%s/edje/examples/red.png", eina_prefix_data_get(pfx));
-
    /* this is a border around the Edje object above, here just to
     * emphasize its geometry */
    border = evas_object_image_filled_add(evas);
-   evas_object_image_file_set(border, border_img_path, NULL);
+   evas_object_image_file_set(border, img_file, NULL);
    evas_object_image_border_set(border, 2, 2, 2, 2);
    evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE);
 
@@ -323,15 +311,12 @@ main(int argc EINA_UNUSED, char *argv[])
 
    ecore_main_loop_begin();
 
-   eina_prefix_free(pfx);
    ecore_evas_free(ee);
    ecore_evas_shutdown();
    edje_shutdown();
 
    return EXIT_SUCCESS;
 
- free_prefix:
-   eina_prefix_free(pfx);
  shutdown_edje:
    edje_shutdown();
  shutdown_ecore_evas:
index 05ff397..acd61a4 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o eet-basic eet-basic.c `pkg-config --cflags --libs eet`
+
 #include <Eet.h>
 
 int
index 2ef965c..1708b78 100644 (file)
@@ -1,6 +1,5 @@
-/*
- * build: gcc -o eet_data_file_cipher_decipher eet-data-file_cipher_decipher.c `pkg-config --cflags --libs eet eina`
- */
+//Compile with:
+// gcc -o eet-data-cipher_decipher eet-data-cipher_decipher.c `pkg-config --cflags --libs eet eina`
 
 #include <Eina.h>
 #include <Eet.h>
index 4b5b75f..be43df9 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * build: gcc -o eet_data_file_descriptor eet-data-file_descriptor.c `pkg-config --cflags --libs eet eina`
- */
+//Compile with:
+// gcc -o eet-data-file_descriptor_01 eet-data-file_descriptor_01.c `pkg-config --cflags --libs eet eina`
+
 #include <Eina.h>
 #include <Eet.h>
 #include <stdio.h>
index 65ba79e..bfd34d1 100644 (file)
@@ -1,6 +1,5 @@
-/*
- * build: gcc -o eet_data_file_descriptor_02 eet-data-file_descriptor_02.c `pkg-config --cflags --libs eet eina`
- */
+//Compile with:
+// gcc -o eet-data-file_descriptor_02 eet-data-file_descriptor_02.c `pkg-config --cflags --libs eet eina`
 
 #include <Eina.h>
 #include <Eet.h>
index a6b0e12..cfded40 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * build: gcc -o eet_data_nested eet-data-nested.c `pkg-config --cflags --libs eet eina`
- */
+//Compile with:
+// gcc -o eet-data-nested eet-data-nested.c `pkg-config --cflags --libs eet eina`
+
 #include <Eina.h>
 #include <Eet.h>
 #include <stdio.h>
index 1951fc0..3931e83 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * build: gcc -o eet_data_simple eet-data-simple.c `pkg-config --cflags --libs eet eina`
- */
+//Compile with:
+// gcc -o eet-data-simple eet-data-simple.c `pkg-config --cflags --libs eet eina`
+
 #include <Eina.h>
 #include <Eet.h>
 #include <stdio.h>
index 740c179..9b64425 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * build: gcc -o eet_file eet-file.c `pkg-config --cflags --libs eet`
- */
+//Compile with:
+// gcc -o eet-file eet-file.c `pkg-config --cflags --libs eet`
+
 #include <Eet.h>
 #include <stdio.h>
 #include <string.h>
index e85f2f0..ff217c0 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -Wall -o eina_simple_xml_01 eina_simple_xml_01.c `pkg-config --cflags --libs eina`
+//gcc -Wall -o eina_simple_xml_parser_01 eina_simple_xml_parser_01.c `pkg-config --cflags --libs eina`
 
 #include <Eina.h>
 #include <stdio.h>
index c26c441..c739dfe 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g eina_xattr_02.c -o eina_xattr_02 `pkg-config --cflags --libs eina`
+//gcc -g eina_xattr_01.c -o eina_xattr_01 `pkg-config --cflags --libs eina`
 
 #include <Eina.h>
 
index 7704cfc..72da1b7 100644 (file)
@@ -1,6 +1,5 @@
-/**
-  * Compile with gcc -o eio_file_copy eio_file_copy.c `pkg-config --cflags --libs ecore eio`
-  */
+//Compile with:
+//gcc -o eio_file_copy eio_file_copy.c `pkg-config --cflags --libs ecore eio`
 
 #include <stdlib.h>
 #include <stdio.h>
index 7a9e7f5..795e80b 100644 (file)
@@ -1,6 +1,5 @@
-/**
-  * Compile with gcc -o eio_file_ls eio_file_ls.c `pkg-config --cflags --libs ecore eio`
-  */
+//Compile with:
+//gcc -o eio_file_ls eio_file_ls.c `pkg-config --cflags --libs ecore eio`
 
 #include <stdlib.h>
 #include <stdio.h>
index 7e3e4c2..df3ce15 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o emotion_basic_example emotion_basic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas`
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
index 9df53f4..5fa6f0f 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o emotion_border_example emotion_border_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina`
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
index b838286..580cae9 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o emotion_generic_example emotion_generic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina`
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
index 448b505..fcdf177 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o emotion_generic_subtitle_example emotion_generic_subtitle_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas`
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
index 2469c46..efba9ff 100644 (file)
@@ -1,3 +1,6 @@
+//Compile with:
+// gcc -o emotion_signals_example emotion_signals_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas`
+
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
index 2f613e9..aa3b2f5 100644 (file)
@@ -17,6 +17,8 @@
  * License along with this library;
  * if not, see <http://www.gnu.org/licenses/>.
  *
+ * gcc -o ethumb_dbus ethumb_dbus.c `pkg-config --libs --cflags eina ecore ethumb ethumb_client`
+ *
  * @author Rafael Antognolli <antognolli@profusion.mobi>
  */
 #ifdef HAVE_CONFIG_H
index be301cb..0d81027 100644 (file)
@@ -9,7 +9,8 @@
  * object implementing aspect control for children.
  *
  * @verbatim
- * gcc -o evas-events evas-events.c `pkg-config --libs --cflags ecore-evas edje`
+ * edje_cc aspect.edc
+ * gcc -o evas-aspect-hints evas-aspect-hints.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
  * @endverbatim
  */
 
index d88924b..8cfbdb1 100644 (file)
@@ -10,7 +10,7 @@
  * output.
  *
  * @verbatim
- * gcc -o evas-events evas-events.c `pkg-config --libs --cflags ecore-evas`
+ * gcc -o evas-hints evas-hints.c `pkg-config --libs --cflags evas ecore ecore-evas`
  * @endverbatim
  */
 
index 1c66772..fe35ca3 100644 (file)
@@ -6,7 +6,7 @@
  * for output.
  *
  * @verbatim
- * gcc -o evas-images2 evas-images2.c `pkg-config --libs --cflags evas ecore ecore-evas`
+ * gcc -o evas-images3 evas-images3.c `pkg-config --libs --cflags evas ecore ecore-evas`
  * @endverbatim
  */
 
index a7508d8..eb20089 100644 (file)
@@ -8,8 +8,7 @@
  * to.
  *
  * @verbatim
- * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs \
- * --cflags evas`
+ * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs --cflags evas`
  * @endverbatim
  *
  */
index 78fdd68..30eb052 100644 (file)
@@ -1,6 +1,14 @@
-/*
+/**
+ * Simple Evas example illustrating basic map utils.
+ *
+ * You'll need at least one engine built for it (excluding the buffer
+ * one). See stdout/stderr for output.
+ *
+ * @verbatim
  * gcc -o evas-map-utils evas-map-utils.c `pkg-config --cflags --libs evas ecore ecore-evas`
+ * @endverbatim
  */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #else
index 99f1064..2fc5c8d 100644 (file)
@@ -9,7 +9,7 @@
  * output.
  *
  * @verbatim
- * gcc -o evas-object-manipulation-eo evas-object-manipulation-eo.c `pkg-config --libs --cflags ecore evas ecore-evas`
+ * gcc -o evas-object-manipulation-eo evas-object-manipulation-eo.c `pkg-config --libs --cflags ecore evas ecore-evas eo`
  * @endverbatim
  */
 
index d8e60d6..67e85c1 100644 (file)
@@ -7,7 +7,7 @@
  * output.
  *
  * @verbatim
- * gcc -o evas-stacking evas-stacking.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
+ * gcc -o evas-stacking evas-stacking.c `pkg-config --libs --cflags evas ecore ecore-evas`
  * @endverbatim
  */
 
index 8aa2b5e..f3f5d6c 100644 (file)
@@ -5,7 +5,7 @@
  * one) and the png image loader also built.
  *
  * @verbatim
- * gcc -o evas-table evas-table.c `pkg-config --libs --cflags ecore-evas`
+ * gcc -o evas-table evas-table.c `pkg-config --libs --cflags evas ecore ecore-evas`
  * @endverbatim
  */