//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>
+// 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>
+// 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>
+// 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>
+//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>
+//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
+//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>
+//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>
+//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
+//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>
+//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>
+//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>
+//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>
+//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>
* 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
*/
* 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
*
*/
* 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
*
*/
* 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
*/
* 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
*/
* 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
*/
* 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
*/
-/*
- * 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>
+//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>
+//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>
+//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>
+//Compile with:
+// gcc -o ecore_idler_example ecore_idler_example.c `pkg-config --libs --cflags ecore eo`
+
#include <Ecore.h>
#include <unistd.h>
* 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
*/
+//Compile with:
+// gcc -o ecore_job_example ecore_job_example.c `pkg-config --libs --cflags ecore`
+
#include <Ecore.h>
#include <unistd.h>
+//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>
+//Compile with:
+// gcc -o ecore_poller_example ecore_poller_example.c `pkg-config --libs --cflags ecore eo`
+
#include <Ecore.h>
#include <unistd.h>
+//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>
/*
- * 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>
+//Compile with:
+// gcc -o ecore_time_functions_example ecore_time_functions_example.c `pkg-config --libs --cflags ecore`
+
#include <Ecore.h>
#include <unistd.h>
+//Compile with:
+// gcc -o ecore_timer_example ecore_timer_example.c `pkg-config --libs --cflags ecore`
+
#include <Ecore.h>
#include <unistd.h>
+//Compile with:
+// gcc -o banshee banshee.c `pkg-config --cflags --libs edbus2 ecore eina`
+
#include "EDBus.h"
#include <Ecore.h>
+//Compile with:
+// gcc -o client client.c `pkg-config --cflags --libs edbus2 ecore eina`
+
#include "EDBus.h"
#include <Ecore.h>
+//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>
+//Compile with:
+// gcc -o complex-types-server complex-types-server.c `pkg-config --cflags --libs edbus2 ecore`
+
#include "EDBus.h"
#include <Ecore.h>
+//Compile with:
+// gcc -o complex-types complex-types.c `pkg-config --cflags --libs edbus2 ecore`
+
#include "EDBus.h"
#include <Ecore.h>
+//Compile with:
+// gcc -o connman-list-services connman-list-services.c `pkg-config --cflags --libs edbus2 ecore`
+
#include "EDBus.h"
#include <Ecore.h>
+//Compile with:
+// gcc -o ofono-dial ofono-dial.c `pkg-config --cflags --libs edbus2 ecore`
+
#include "EDBus.h"
#include <Ecore.h>
+//Compile with:
+// gcc -o server server.c `pkg-config --cflags --libs edbus2 ecore`
+
#include "EDBus.h"
#include <Ecore.h>
+//Compile with:
+// gcc -o simple-signal-emit simple-signal-emit.c `pkg-config --cflags --libs edbus2`
+
#include <EDBus.h>
enum {
+//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
#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;
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");
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);
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();
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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;
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);
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);
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:
* 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>
}
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;
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");
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);
" %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);
errmsg);
evas_object_del(edje_obj);
- goto free_prefix;
+ goto shutdown_edje;
}
fprintf(stdout, "Loaded Edje object bound to group 'example_group' from"
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);
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:
/**
* @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>
}
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;
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");
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);
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();
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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())
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);
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);
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
}
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;
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);
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++)
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include "codegen_example_generated.h"
#include <Ecore.h>
#define HEIGHT (800)
static void
-_on_delete(Ecore_Evas *ee)
+_on_delete(Ecore_Evas *ee EINA_UNUSED)
{
ecore_main_loop_quit();
}
}
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",
}
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);
}
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;
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");
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);
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
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;
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 */
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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;
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);
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);
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:
* 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
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);
/**
- * 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>
}
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;
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
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);
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);
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:
* 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>
}
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;
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");
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);
"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",
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);
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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;
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);
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);
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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())
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);
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);
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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;
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);
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);
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:
# define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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;
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");
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);
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:
+//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
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);
+//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
#define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
}
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;
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");
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",
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();
+//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
#define EINA_UNUSED
#endif
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Edje.h>
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"))
{
}
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);
}
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);
}
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;
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");
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);
errmsg);
evas_object_del(edje_obj);
- goto free_prefix;
+ goto shutdown_edje;
}
fprintf(stdout, "Loaded Edje object bound to group 'lua_base' from"
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);
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:
+//Compile with:
+// gcc -o eet-basic eet-basic.c `pkg-config --cflags --libs eet`
+
#include <Eet.h>
int
-/*
- * 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>
-/*
- * 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>
-/*
- * 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>
-/*
- * 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>
-/*
- * 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>
-/*
- * 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>
//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>
//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>
-/**
- * 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>
-/**
- * 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>
+//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>
+//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>
+//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>
+//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>
+//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>
* 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
* 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
*/
* 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
*/
* 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
*/
* 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
*
*/
-/*
+/**
+ * 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
* 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
*/
* 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
*/
* 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
*/