efl: add and fix some gcc lines and fix some examples. Its not possible to build from outside the directory with eina_prefix, the build still depends on PACKAGE_DATA_DIR

Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>



SVN revision: 83794
This commit is contained in:
Ricardo de Almeida Gonzaga 2013-02-08 17:35:17 +00:00 committed by Bruno Dilly
parent 4b966d4a2c
commit e2dae9a49e
87 changed files with 358 additions and 484 deletions

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o banshee banshee.c `pkg-config --cflags --libs edbus2 ecore eina`
#include "EDBus.h" #include "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o client client.c `pkg-config --cflags --libs edbus2 ecore eina`
#include "EDBus.h" #include "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View 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 "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View 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 "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o complex-types complex-types.c `pkg-config --cflags --libs edbus2 ecore`
#include "EDBus.h" #include "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View 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 "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o ofono-dial ofono-dial.c `pkg-config --cflags --libs edbus2 ecore`
#include "EDBus.h" #include "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o server server.c `pkg-config --cflags --libs edbus2 ecore`
#include "EDBus.h" #include "EDBus.h"
#include <Ecore.h> #include <Ecore.h>

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o simple-signal-emit simple-signal-emit.c `pkg-config --cflags --libs edbus2`
#include <EDBus.h> #include <EDBus.h>
enum { enum {

View File

@ -1,5 +1,5 @@
//Compile with: //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.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>

View 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 <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>

View 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 <stdio.h>
#include <string.h> #include <string.h>
#include <libgen.h> #include <libgen.h>

View 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 <stdio.h>
#include <libgen.h> #include <libgen.h>
#include <sys/types.h> #include <sys/types.h>

View 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 <stdio.h>
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Con.h> #include <Ecore_Con.h>

View 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif

View 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 <stdio.h>
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Con.h> #include <Ecore_Con.h>

View 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 <stdio.h>
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Con.h> #include <Ecore_Con.h>

View 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif

View 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 <stdio.h>
#include <sys/time.h> #include <sys/time.h>
#include <Ecore.h> #include <Ecore.h>

View 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 <stdio.h>
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Con.h> #include <Ecore_Con.h>

View 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 <stdio.h>
#include <Eina.h> #include <Eina.h>
#include <Ecore.h> #include <Ecore.h>

View 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 <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>

View 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 <stdio.h>
#include <Eina.h> #include <Eina.h>
#include <Ecore.h> #include <Ecore.h>

View File

@ -5,7 +5,7 @@
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -7,7 +7,7 @@
* Compile with: * Compile with:
* *
* @verbatim * @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 * @endverbatim
* *
*/ */

View File

@ -7,7 +7,7 @@
* Compile with: * Compile with:
* *
* @verbatim * @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 * @endverbatim
* *
*/ */

View File

@ -5,7 +5,7 @@
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -5,7 +5,7 @@
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -5,7 +5,7 @@
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -6,7 +6,7 @@
* one). See stdout/stderr for output. * one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -1,7 +1,5 @@
/* //Compile with:
* Compile with: // gcc -g -Wall `pkg-config --cflags --libs ecore` -o ecore_event_example_01 ecore_event_example_01.c
* gcc -g -Wall `pkg-config --cflags --libs ecore` -o ecore_event_example ecore_event_example.c
*/
#include <Ecore.h> #include <Ecore.h>

View 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 <Ecore.h>
#include <unistd.h> #include <unistd.h>

View 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 <Ecore.h>
#include <fcntl.h> #include <fcntl.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>

View 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 <stdio.h>
#include <Eina.h> #include <Eina.h>
#include <Ecore.h> #include <Ecore.h>

View 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 <Ecore.h>
#include <unistd.h> #include <unistd.h>

View File

@ -2,7 +2,7 @@
* Ecore example illustrating how to use ecore imf. * Ecore example illustrating how to use ecore imf.
* *
* @verbatim * @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 * @endverbatim
*/ */

View 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 <Ecore.h>
#include <unistd.h> #include <unistd.h>

View 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 <gst/gst.h>
#include <Ecore.h> #include <Ecore.h>

View 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 <Ecore.h>
#include <unistd.h> #include <unistd.h>

View 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 <stdio.h>
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Con.h> #include <Ecore_Con.h>

View 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 <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View 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 <Ecore.h>
#include <unistd.h> #include <unistd.h>

View 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 <Ecore.h>
#include <unistd.h> #include <unistd.h>

View 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#else #else
@ -5,6 +8,10 @@
#define EINA_UNUSED #define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -14,19 +21,17 @@
#define HEIGHT (700) #define HEIGHT (700)
static void static void
_on_delete(Ecore_Evas *ee) _on_delete(Ecore_Evas *ee EINA_UNUSED)
{ {
ecore_main_loop_quit(); ecore_main_loop_quit();
} }
int 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 = PACKAGE_DATA_DIR"/animations2.edj";
const char *edje_file = "animations2.edj";
Evas *evas; Evas *evas;
Ecore_Evas *ee; Ecore_Evas *ee;
Eina_Prefix *pfx;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Evas_Object *bg; Evas_Object *bg;
@ -34,15 +39,9 @@ main(int argc EINA_UNUSED, char **argv)
if (!edje_init()) goto shutdown_ecore_evas; 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); 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_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Animations"); ecore_evas_title_set(ee, "Animations");
@ -60,15 +59,14 @@ main(int argc EINA_UNUSED, char **argv)
edje_obj = edje_object_add(evas); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), "%s/examples/%s", fprintf(stderr, "loading edje file; %s\n", edje_file);
eina_prefix_data_get(pfx), 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); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
fprintf(stderr, "Could not load the edje file - reason:%s\n", errmsg); 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); evas_object_resize(edje_obj, 700, 700);
@ -79,15 +77,12 @@ main(int argc EINA_UNUSED, char **argv)
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
edje_shutdown(); edje_shutdown();
ecore_evas_shutdown(); ecore_evas_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
eina_prefix_free: eina_prefix_free(pfx);
shutdown_edje: edje_shutdown(); shutdown_edje: edje_shutdown();
shutdown_ecore_evas: ecore_evas_shutdown(); shutdown_ecore_evas: ecore_evas_shutdown();

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -143,15 +147,13 @@ _on_key_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, v
} }
int 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 = PACKAGE_DATA_DIR"/animations.edj";
const char *edje_file = "animations.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -159,22 +161,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete_cb); ecore_evas_callback_delete_request_set(ee, _on_delete_cb);
ecore_evas_callback_resize_set(ee, _on_canvas_resize); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "animations_group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "animations_group");
evas_object_move(edje_obj, 0, 0); evas_object_move(edje_obj, 0, 0);
evas_object_resize(edje_obj, WIDTH, HEIGHT); evas_object_resize(edje_obj, WIDTH, HEIGHT);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -209,15 +197,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -6,7 +6,7 @@
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */
@ -16,6 +16,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <stdio.h> #include <stdio.h>
#include <Eina.h> #include <Eina.h>
@ -98,17 +102,15 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
} }
int int
main(int argc EINA_UNUSED, char *argv[]) main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
{ {
char border_img_path[PATH_MAX]; const char *img_file = PACKAGE_DATA_DIR"/red.png";
char edje_file_path[PATH_MAX]; const char *edje_file = PACKAGE_DATA_DIR"/basic.edj";
const char *edje_file = "basic.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *border; Evas_Object *border;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
int x; int x;
int y; int y;
int w; int w;
@ -120,22 +122,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Edje Basics Example"); 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); 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 */ /* 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); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
@ -165,7 +152,7 @@ main(int argc EINA_UNUSED, char *argv[])
" %s\n", errmsg); " %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); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
@ -173,7 +160,7 @@ main(int argc EINA_UNUSED, char *argv[])
errmsg); errmsg);
evas_object_del(edje_obj); evas_object_del(edje_obj);
goto free_prefix; goto shutdown_edje;
} }
fprintf(stdout, "Loaded Edje object bound to group 'example_group' from" 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); 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 /* this is a border around the Edje object above, here just to
* emphasize its geometry */ * emphasize its geometry */
border = evas_object_image_filled_add(evas); 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_set(border, 2, 2, 2, 2);
evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE); 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(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -1,6 +1,6 @@
/** /**
* @verbatim * @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 * @endverbatim
*/ */
@ -10,6 +10,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <stdio.h> #include <stdio.h>
#include <Eina.h> #include <Eina.h>
@ -76,11 +80,9 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
} }
int int
main(int argc EINA_UNUSED, char **argv) main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{ {
const char *edje_file = "basic2.edj"; const char *edje_file = PACKAGE_DATA_DIR"/basic2.edj";
char edje_file_path[PATH_MAX];
Eina_Prefix *pfx;
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
@ -92,22 +94,9 @@ main(int argc EINA_UNUSED, char **argv)
if(!edje_init()) if(!edje_init())
goto shutdown_ecore_evas; 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); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if(!ee) if(!ee) goto shutdown_edje;
goto eina_prefix_free;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Edje show image"); 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); ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
evas_object_focus_set(bg, EINA_TRUE); evas_object_focus_set(bg, EINA_TRUE);
edje_obj = edje_object_add(evas); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), if(!edje_object_file_set(edje_obj, edje_file, "image_group"))
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
if(!edje_object_file_set(edje_obj, edje_file_path, "image_group"))
{ {
int err = edje_object_load_error_get(edje_obj); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
fprintf(stderr, "Could not load the edje file - reason:%s\n", errmsg); 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_move(edje_obj, 50, 50);
evas_object_resize(edje_obj, 64, 64); evas_object_resize(edje_obj, 64, 64);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -151,16 +134,12 @@ main(int argc EINA_UNUSED, char **argv)
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
edje_shutdown(); edje_shutdown();
ecore_evas_shutdown(); ecore_evas_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
eina_prefix_free:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.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 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 = PACKAGE_DATA_DIR"/box.edj";
const char *edje_file = "box.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
int i; int i;
if (!ecore_evas_init()) if (!ecore_evas_init())
@ -169,22 +171,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_destroy_set(ee, _on_destroy); ecore_evas_callback_destroy_set(ee, _on_destroy);
ecore_evas_callback_resize_set(ee, _on_canvas_resize); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "example/group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "example/group");
evas_object_move(edje_obj, 0, 0); evas_object_move(edje_obj, 0, 0);
evas_object_resize(edje_obj, WIDTH, HEIGHT); evas_object_resize(edje_obj, WIDTH, HEIGHT);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -234,15 +222,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -151,17 +155,15 @@ on_destroy(Ecore_Evas *ee EINA_UNUSED)
} }
int 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 = PACKAGE_DATA_DIR"/box.edj";
const char *edje_file = "box.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Evas_Object *last; Evas_Object *last;
Evas_Object *o; Evas_Object *o;
Eina_Prefix *pfx;
int w; int w;
int h; int h;
int i; int i;
@ -172,22 +174,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, 640, 480, NULL); ee = ecore_evas_new(NULL, 0, 0, 640, 480, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_resize_set(ee, on_resize); ecore_evas_callback_resize_set(ee, on_resize);
ecore_evas_callback_destroy_set(ee, on_destroy); 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); edje_box_layout_register("custom_layout", custom_layout, NULL, NULL, NULL, NULL);
snprintf(edje_file_path, sizeof(edje_file_path), edje_obj = box_new(ee, edje_file, "box", 0, 0, w, h);
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_obj = box_new(ee, edje_file_path, "box", 0, 0, w, h);
evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, on_keydown, edje_obj); evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, on_keydown, edje_obj);
for (i = 1; i <= 5; i++) for (i = 1; i <= 5; i++)
@ -229,15 +217,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -29,6 +29,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include "codegen_example_generated.h" #include "codegen_example_generated.h"
#include <Ecore.h> #include <Ecore.h>
@ -39,7 +43,7 @@
#define HEIGHT (800) #define HEIGHT (800)
static void static void
_on_delete(Ecore_Evas *ee) _on_delete(Ecore_Evas *ee EINA_UNUSED)
{ {
ecore_main_loop_quit(); ecore_main_loop_quit();
} }
@ -56,11 +60,10 @@ _columns_rows_print(Evas_Object *edje_obj)
} }
static void 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) const char *source)
{ {
Evas_Object *rect; Evas_Object *rect;
Eina_Bool disabled;
static int i = 0; static int i = 0;
printf("Mouse over, source: %s - emission: %s\n", 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) 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); evas_object_color_set(rect, 0, 255, 0, 255);
codegen_example_part_below_over_callback_del_full(obj,_on_mouse_over, codegen_example_part_below_over_callback_del_full(obj,_on_mouse_over,
NULL); NULL);
@ -97,17 +100,14 @@ _rect_create(Evas *e, unsigned char r, unsigned char g, unsigned char b)
} }
int 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 = PACKAGE_DATA_DIR"/codegen.edj";
const char *edje_file = "codegen.edj", *aux;
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Evas_Object *red_rect, *yellow_rect, *blue_rect, *rects[4]; Evas_Object *red_rect, *yellow_rect, *blue_rect, *rects[4];
Eina_Prefix *pfx;
Eina_Bool disabled;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -115,25 +115,10 @@ main(int argc, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Edje codegen Example"); 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 */ evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */
ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); 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_resize(edje_obj, WIDTH, HEIGHT);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -184,15 +169,12 @@ main(int argc, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -210,9 +214,7 @@ _create_windows(const char *edje_file_path)
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
char edje_file_path[PATH_MAX]; const char *edje_file = PACKAGE_DATA_DIR"/color-class.edj";
const char *edje_file = "color-class.edj";
Eina_Prefix *pfx;
color c1, c2, c3; color c1, c2, c3;
int i; int i;
@ -242,21 +244,7 @@ main(int argc, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; goto shutdown_ecore_evas;
pfx = eina_prefix_new(argv[0], main, if (!_create_windows(edje_file)) goto shutdown_edje;
"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;
edje_color_class_set(argv[1], /* class name */ edje_color_class_set(argv[1], /* class name */
c1[0], c1[1], c1[2], c1[3], /* Object color */ c1[0], c1[1], c1[2], c1[3], /* Object color */
@ -277,15 +265,12 @@ main(int argc, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee1); ecore_evas_free(ee1);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -118,15 +122,13 @@ _on_knob_moved(void *data EINA_UNUSED, Evas_Object *o, const char *emission EINA
} }
int 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 = PACKAGE_DATA_DIR"/drag.edj";
const char *edje_file = "drag.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -134,22 +136,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_destroy_set(ee, _on_destroy); ecore_evas_callback_destroy_set(ee, _on_destroy);
ecore_evas_callback_resize_set(ee, _on_canvas_resize); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "example/group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "example/group");
evas_object_move(edje_obj, 0, 0); evas_object_move(edje_obj, 0, 0);
evas_object_resize(edje_obj, WIDTH, HEIGHT); evas_object_resize(edje_obj, WIDTH, HEIGHT);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -192,15 +180,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -5,7 +5,7 @@
* buffer one) and multisense support ine edje. See stdout/stderr for output. * buffer one) and multisense support ine edje. See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */
@ -15,6 +15,10 @@
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#define WIDTH 300 #define WIDTH 300
#define HEIGHT 300 #define HEIGHT 300
@ -29,7 +33,8 @@ static Evas_Object *create_my_group(Evas *canvas)
return NULL; 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); int err = edje_object_load_error_get(edje);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);

View 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 * You'll need at least one Evas engine built for it (excluding the
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */
@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -159,14 +163,12 @@ _animation_end_cb(void *data, Evas_Object *o EINA_UNUSED, const char *emission E
} }
int 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 = PACKAGE_DATA_DIR"/perspective.edj";
const char *edje_file = "perspective.edj";
struct _App app; struct _App app;
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -174,17 +176,6 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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); edje_frametime_set(1.0 / 60.0);
/* this will give you a window with an Evas canvas under the first /* 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; app.focal = 50;
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_destroy_set(ee, _on_destroy); ecore_evas_callback_destroy_set(ee, _on_destroy);
ecore_evas_callback_resize_set(ee, _on_canvas_resize); 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); app.edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(app.edje_obj, edje_file, "example/group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(app.edje_obj, edje_file_path, "example/group");
evas_object_move(app.edje_obj, 0, 0); evas_object_move(app.edje_obj, 0, 0);
evas_object_resize(app.edje_obj, WIDTH, HEIGHT); evas_object_resize(app.edje_obj, WIDTH, HEIGHT);
evas_object_show(app.edje_obj); evas_object_show(app.edje_obj);
@ -235,15 +223,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -5,7 +5,7 @@
* buffer one). See stdout/stderr for output. * buffer one). See stdout/stderr for output.
* *
* @verbatim * @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 * @endverbatim
*/ */
@ -16,6 +16,10 @@
#define EINA_UNUSED #define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -138,17 +142,15 @@ _message_handle(void *data EINA_UNUSED,
} }
int int
main(int argc EINA_UNUSED, char *argv[]) main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
{ {
char border_img_path[PATH_MAX]; const char *img_file = PACKAGE_DATA_DIR"/red.png";
char edje_file_path[PATH_MAX]; const char *edje_file = PACKAGE_DATA_DIR"/signals-messages.edj";
const char *edje_file = "signals-messages.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Evas_Object *border; Evas_Object *border;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -156,22 +158,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Edje Basics Example"); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), if (!edje_object_file_set(edje_obj, edje_file, "example_group"))
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
if (!edje_object_file_set(edje_obj, edje_file_path, "example_group"))
{ {
int err = edje_object_load_error_get(edje_obj); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); 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); "signals-messages.edj: %s\n", errmsg);
evas_object_del(edje_obj); evas_object_del(edje_obj);
goto free_prefix; goto shutdown_edje;
} }
edje_object_signal_callback_add(edje_obj, "mouse,wheel,*", "part_left", 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); 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 /* this is a border around the Edje object above, here just to
* emphasize its geometry */ * emphasize its geometry */
border = evas_object_image_filled_add(evas); 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_set(border, 2, 2, 2, 2);
evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE); 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(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -43,17 +47,15 @@ _on_canvas_resize(Ecore_Evas *ee)
} }
int 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 = PACKAGE_DATA_DIR"/swallow.edj";
const char *edje_file = "swallow.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *rect; Evas_Object *rect;
Evas_Object *obj; Evas_Object *obj;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -61,22 +63,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_callback_resize_set(ee, _on_canvas_resize); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "example_group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "example_group");
evas_object_move(edje_obj, 20, 20); evas_object_move(edje_obj, 20, 20);
evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -112,15 +100,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -29,19 +33,16 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
} }
int 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 = PACKAGE_DATA_DIR"/swallow.edj";
char img_file_path[PATH_MAX]; const char *img_file = PACKAGE_DATA_DIR"/bubble.png";
const char *edje_file = "swallow.edj";
const char *img_file = "bubble.png";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *img; Evas_Object *img;
Evas_Object *obj; Evas_Object *obj;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
Evas_Load_Error err; Evas_Load_Error err;
if (!ecore_evas_init()) if (!ecore_evas_init())
@ -50,22 +51,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "example_group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "example_group");
evas_object_move(edje_obj, 20, 20); evas_object_move(edje_obj, 20, 20);
evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
evas_object_show(edje_obj); 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); 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); err = evas_object_image_load_error_get(img);
if (err != EVAS_LOAD_ERROR_NONE) if (err != EVAS_LOAD_ERROR_NONE)
{ {
fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
img_file_path, evas_load_error_str(err)); img_file, evas_load_error_str(err));
goto free_prefix; goto shutdown_edje;
} }
edje_object_part_swallow(edje_obj, "part_one", img); edje_object_part_swallow(edje_obj, "part_one", img);
@ -117,15 +101,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -103,16 +107,14 @@ _rects_create(Evas *evas, Evas_Object **rects, Evas_Object *edje_obj)
} }
int 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 = PACKAGE_DATA_DIR"/table.edj";
const char *edje_file = "table.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Evas_Object *rects[4]; Evas_Object *rects[4];
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -120,22 +122,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_callback_resize_set(ee, _on_canvas_resize); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "example_table");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "example_table");
evas_object_move(edje_obj, 0, 0); /* at canvas' origin */ evas_object_move(edje_obj, 0, 0); /* at canvas' origin */
evas_object_resize(edje_obj, WIDTH, HEIGHT); evas_object_resize(edje_obj, WIDTH, HEIGHT);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -192,15 +180,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -15,6 +15,10 @@
# define EINA_UNUSED # define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -35,15 +39,13 @@ _on_text_change(void *data EINA_UNUSED, Evas_Object *obj, const char *part)
} }
int 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 = PACKAGE_DATA_DIR"/text.edj";
const char *edje_file = "text.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -51,22 +53,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Edje text Example"); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), edje_object_file_set(edje_obj, edje_file, "example_group");
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
edje_object_file_set(edje_obj, edje_file_path, "example_group");
evas_object_move(edje_obj, 20, 20); evas_object_move(edje_obj, 20, 20);
evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
evas_object_show(edje_obj); evas_object_show(edje_obj);
@ -103,15 +91,12 @@ main(int argc EINA_UNUSED, char *argv[])
ecore_main_loop_begin(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View 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 <Eina.h>
#include <Evas.h> #include <Evas.h>
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#define WIDTH 320 #define WIDTH 320
#define HEIGHT 240 #define HEIGHT 240
@ -18,7 +25,8 @@ static Evas_Object *create_my_group(Evas *canvas, const char *text)
return NULL; 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); int err = edje_object_load_error_get(edje);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);

View 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#else #else
@ -5,6 +8,10 @@
#define EINA_UNUSED #define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -56,11 +63,9 @@ _on_mouse_over(void *data, Evas_Object *edje_obj,
} }
int int
main(int argc EINA_UNUSED, char **argv) main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{ {
const char *edje_file = "signalsBubble.edj"; const char *edje_file = PACKAGE_DATA_DIR"/signalsBubble.edj";
char edje_file_path[PATH_MAX];
Eina_Prefix *pfx;
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
@ -70,15 +75,9 @@ main(int argc EINA_UNUSED, char **argv)
if (!edje_init()) goto shutdown_ecore_evas; 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); 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_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Edje animations and signals"); 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); edje_obj = edje_object_add(evas);
snprintf(edje_file_path, sizeof(edje_file_path), "%s/examples/%s", if (!edje_object_file_set(edje_obj, edje_file, "image_group"))
eina_prefix_data_get(pfx), edje_file);
if (!edje_object_file_set(edje_obj, edje_file_path, "image_group"))
{ {
int err = edje_object_load_error_get(edje_obj); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
fprintf(stderr, "Could not load the edje file - reason:%s\n", errmsg); 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", 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(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
edje_shutdown(); edje_shutdown();
ecore_evas_shutdown(); ecore_evas_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
eina_prefix_free: eina_prefix_free(pfx);
shutdown_edje: edje_shutdown(); shutdown_edje: edje_shutdown();
shutdown_ecore_evas: ecore_evas_shutdown(); shutdown_ecore_evas: ecore_evas_shutdown();

View 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#else #else
@ -5,6 +8,10 @@
#define EINA_UNUSED #define EINA_UNUSED
#endif #endif
#ifndef PACKAGE_DATA_DIR
#define PACKAGE_DATA_DIR "."
#endif
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Edje.h> #include <Edje.h>
@ -31,12 +38,12 @@ _on_keydown(void *data,
Ecore_Evas *ee; Ecore_Evas *ee;
Evas_Event_Key_Down *ev; Evas_Event_Key_Down *ev;
Evas_Object *edje_obj; Evas_Object *edje_obj;
char *edje_file_path; char *edje_file;
ee = (Ecore_Evas *)data; ee = (Ecore_Evas *)data;
ev = (Evas_Event_Key_Down *)einfo; ev = (Evas_Event_Key_Down *)einfo;
edje_obj = ecore_evas_data_get(ee, "edje_obj"); 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")) if (!strcmp(ev->keyname, "h"))
{ {
@ -45,7 +52,7 @@ _on_keydown(void *data,
} }
else if (!strcmp(ev->keyname, "e")) 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); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
@ -59,7 +66,7 @@ _on_keydown(void *data,
} }
else if (!strcmp(ev->keyname, "l")) 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); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
@ -225,17 +232,15 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
} }
int int
main(int argc EINA_UNUSED, char *argv[]) main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
{ {
char border_img_path[PATH_MAX]; const char *img_file = PACKAGE_DATA_DIR"/red.png";
char edje_file_path[PATH_MAX]; const char *edje_file = PACKAGE_DATA_DIR"/sigtest.edj";
const char *edje_file = "sigtest.edj";
Ecore_Evas *ee; Ecore_Evas *ee;
Evas *evas; Evas *evas;
Evas_Object *bg; Evas_Object *bg;
Evas_Object *border; Evas_Object *border;
Evas_Object *edje_obj; Evas_Object *edje_obj;
Eina_Prefix *pfx;
if (!ecore_evas_init()) if (!ecore_evas_init())
return EXIT_FAILURE; return EXIT_FAILURE;
@ -243,22 +248,10 @@ main(int argc EINA_UNUSED, char *argv[])
if (!edje_init()) if (!edje_init())
goto shutdown_ecore_evas; 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 /* this will give you a window with an Evas canvas under the first
* engine available */ * engine available */
ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!ee) if (!ee) goto shutdown_edje;
goto free_prefix;
ecore_evas_callback_delete_request_set(ee, _on_delete); ecore_evas_callback_delete_request_set(ee, _on_delete);
ecore_evas_title_set(ee, "Signals and wessages tester"); 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_message_handler_set(edje_obj, _on_message, NULL);
edje_object_signal_callback_add(edje_obj, "*", "*", _on_signal, NULL); edje_object_signal_callback_add(edje_obj, "*", "*", _on_signal, NULL);
snprintf(edje_file_path, sizeof(edje_file_path), if (!edje_object_file_set(edje_obj, edje_file, "lua_base"))
"%s/examples/%s", eina_prefix_data_get(pfx), edje_file);
if (!edje_object_file_set(edje_obj, edje_file_path, "lua_base"))
{ {
int err = edje_object_load_error_get(edje_obj); int err = edje_object_load_error_get(edje_obj);
const char *errmsg = edje_load_error_str(err); const char *errmsg = edje_load_error_str(err);
@ -289,7 +280,7 @@ main(int argc EINA_UNUSED, char *argv[])
errmsg); errmsg);
evas_object_del(edje_obj); evas_object_del(edje_obj);
goto free_prefix; goto shutdown_edje;
} }
fprintf(stdout, "Loaded Edje object bound to group 'lua_base' from" 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_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
evas_object_show(edje_obj); evas_object_show(edje_obj);
ecore_evas_data_set(ee, "edje_obj", 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); 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 /* this is a border around the Edje object above, here just to
* emphasize its geometry */ * emphasize its geometry */
border = evas_object_image_filled_add(evas); 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_set(border, 2, 2, 2, 2);
evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE); 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(); ecore_main_loop_begin();
eina_prefix_free(pfx);
ecore_evas_free(ee); ecore_evas_free(ee);
ecore_evas_shutdown(); ecore_evas_shutdown();
edje_shutdown(); edje_shutdown();
return EXIT_SUCCESS; return EXIT_SUCCESS;
free_prefix:
eina_prefix_free(pfx);
shutdown_edje: shutdown_edje:
edje_shutdown(); edje_shutdown();
shutdown_ecore_evas: shutdown_ecore_evas:

View File

@ -1,3 +1,6 @@
//Compile with:
// gcc -o eet-basic eet-basic.c `pkg-config --cflags --libs eet`
#include <Eet.h> #include <Eet.h>
int int

View File

@ -1,6 +1,5 @@
/* //Compile with:
* build: gcc -o eet_data_file_cipher_decipher eet-data-file_cipher_decipher.c `pkg-config --cflags --libs eet eina` // gcc -o eet-data-cipher_decipher eet-data-cipher_decipher.c `pkg-config --cflags --libs eet eina`
*/
#include <Eina.h> #include <Eina.h>
#include <Eet.h> #include <Eet.h>

View File

@ -1,6 +1,6 @@
/* //Compile with:
* build: gcc -o eet_data_file_descriptor eet-data-file_descriptor.c `pkg-config --cflags --libs eet eina` // gcc -o eet-data-file_descriptor_01 eet-data-file_descriptor_01.c `pkg-config --cflags --libs eet eina`
*/
#include <Eina.h> #include <Eina.h>
#include <Eet.h> #include <Eet.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,6 +1,5 @@
/* //Compile with:
* build: gcc -o eet_data_file_descriptor_02 eet-data-file_descriptor_02.c `pkg-config --cflags --libs eet eina` // gcc -o eet-data-file_descriptor_02 eet-data-file_descriptor_02.c `pkg-config --cflags --libs eet eina`
*/
#include <Eina.h> #include <Eina.h>
#include <Eet.h> #include <Eet.h>

View File

@ -1,6 +1,6 @@
/* //Compile with:
* build: gcc -o eet_data_nested eet-data-nested.c `pkg-config --cflags --libs eet eina` // gcc -o eet-data-nested eet-data-nested.c `pkg-config --cflags --libs eet eina`
*/
#include <Eina.h> #include <Eina.h>
#include <Eet.h> #include <Eet.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,6 +1,6 @@
/* //Compile with:
* build: gcc -o eet_data_simple eet-data-simple.c `pkg-config --cflags --libs eet eina` // gcc -o eet-data-simple eet-data-simple.c `pkg-config --cflags --libs eet eina`
*/
#include <Eina.h> #include <Eina.h>
#include <Eet.h> #include <Eet.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,6 +1,6 @@
/* //Compile with:
* build: gcc -o eet_file eet-file.c `pkg-config --cflags --libs eet` // gcc -o eet-file eet-file.c `pkg-config --cflags --libs eet`
*/
#include <Eet.h> #include <Eet.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -1,5 +1,5 @@
//Compile with: //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 <Eina.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,5 +1,5 @@
//Compile with: //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> #include <Eina.h>

View File

@ -1,6 +1,5 @@
/** //Compile with:
* Compile with gcc -o eio_file_copy eio_file_copy.c `pkg-config --cflags --libs ecore eio` //gcc -o eio_file_copy eio_file_copy.c `pkg-config --cflags --libs ecore eio`
*/
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,6 +1,5 @@
/** //Compile with:
* Compile with gcc -o eio_file_ls eio_file_ls.c `pkg-config --cflags --libs ecore eio` //gcc -o eio_file_ls eio_file_ls.c `pkg-config --cflags --libs ecore eio`
*/
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View 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.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Evas.h> #include <Evas.h>

View 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.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Evas.h> #include <Evas.h>

View 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.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Evas.h> #include <Evas.h>

View 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.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Evas.h> #include <Evas.h>

View 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.h>
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Evas.h> #include <Evas.h>

View File

@ -17,6 +17,8 @@
* License along with this library; * License along with this library;
* if not, see <http://www.gnu.org/licenses/>. * 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> * @author Rafael Antognolli <antognolli@profusion.mobi>
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H

View File

@ -9,7 +9,8 @@
* object implementing aspect control for children. * object implementing aspect control for children.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -10,7 +10,7 @@
* output. * output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -6,7 +6,7 @@
* for output. * for output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -8,8 +8,7 @@
* to. * to.
* *
* @verbatim * @verbatim
* gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs \ * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs --cflags evas`
* --cflags evas`
* @endverbatim * @endverbatim
* *
*/ */

View 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` * gcc -o evas-map-utils evas-map-utils.c `pkg-config --cflags --libs evas ecore ecore-evas`
* @endverbatim
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#else #else

View File

@ -9,7 +9,7 @@
* output. * output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -7,7 +7,7 @@
* output. * output.
* *
* @verbatim * @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 * @endverbatim
*/ */

View File

@ -5,7 +5,7 @@
* one) and the png image loader also built. * one) and the png image loader also built.
* *
* @verbatim * @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 * @endverbatim
*/ */