diff options
author | Daniel Juyung Seo <seojuyung2@gmail.com> | 2012-03-28 08:42:24 +0000 |
---|---|---|
committer | Daniel Juyung Seo <seojuyung2@gmail.com> | 2012-03-28 08:42:24 +0000 |
commit | fc704fd5d7981fe4cccd990873fd352d69707d17 (patch) | |
tree | 64ba4f245d28fa274931e05daa818802963af9ed /src | |
parent | f84b3cda618180232412b72ad849a5d23b80dbcd (diff) |
elm examples: Adjust directory names.
SVN revision: 69699
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/bg_example_02.c | 7 | ||||
-rw-r--r-- | src/examples/bg_example_03.c | 9 | ||||
-rw-r--r-- | src/examples/general_funcs_example.c | 12 | ||||
-rw-r--r-- | src/examples/gengrid_example.c | 4 | ||||
-rw-r--r-- | src/examples/icon_example_01.c | 2 | ||||
-rw-r--r-- | src/examples/image_example_01.c | 4 | ||||
-rw-r--r-- | src/examples/index_example_02.c | 4 | ||||
-rw-r--r-- | src/examples/layout_example_01.c | 4 | ||||
-rw-r--r-- | src/examples/layout_example_03.c | 4 | ||||
-rw-r--r-- | src/examples/map_example_02.c | 21 | ||||
-rw-r--r-- | src/examples/photocam_example_01.c | 7 | ||||
-rw-r--r-- | src/examples/popup_example_01.c | 2 | ||||
-rw-r--r-- | src/examples/popup_example_02.c | 4 | ||||
-rw-r--r-- | src/examples/popup_example_03.c | 4 | ||||
-rw-r--r-- | src/examples/progressbar_example.c | 7 | ||||
-rw-r--r-- | src/examples/slideshow_example.c | 20 | ||||
-rw-r--r-- | src/examples/thumb_example_01.c | 4 | ||||
-rw-r--r-- | src/examples/transit_example_03.c | 7 | ||||
-rw-r--r-- | src/examples/transit_example_04.c | 9 | ||||
-rw-r--r-- | src/examples/win_example.c | 4 |
20 files changed, 80 insertions, 59 deletions
diff --git a/src/examples/bg_example_02.c b/src/examples/bg_example_02.c index 9ebc73cce..ea5905ca3 100644 --- a/src/examples/bg_example_02.c +++ b/src/examples/bg_example_02.c | |||
@@ -1,8 +1,11 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | //gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" | 2 | //gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" |
3 | //where directory is the a path where images/plant_01.jpg can be found. | 3 | //where directory is the a path where images/plant_01.jpg can be found. |
4 | 4 | ||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | #ifndef DATA_DIR | ||
7 | # define DATA_DIR "/usr/share/elementary" | ||
8 | #endif | ||
6 | 9 | ||
7 | static void | 10 | static void |
8 | on_done(void *data, Evas_Object *obj, void *event_info) | 11 | on_done(void *data, Evas_Object *obj, void *event_info) |
@@ -25,7 +28,7 @@ elm_main(int argc, char **argv) | |||
25 | bg = elm_bg_add(win); | 28 | bg = elm_bg_add(win); |
26 | elm_bg_load_size_set(bg, 20, 20); | 29 | elm_bg_load_size_set(bg, 20, 20); |
27 | elm_bg_option_set(bg, ELM_BG_OPTION_CENTER); | 30 | elm_bg_option_set(bg, ELM_BG_OPTION_CENTER); |
28 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR); | 31 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", DATA_DIR); |
29 | elm_bg_file_set(bg, buf, NULL); | 32 | elm_bg_file_set(bg, buf, NULL); |
30 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 33 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
31 | elm_win_resize_object_add(win, bg); | 34 | elm_win_resize_object_add(win, bg); |
diff --git a/src/examples/bg_example_03.c b/src/examples/bg_example_03.c index fa70a03b1..3c56a6a3d 100644 --- a/src/examples/bg_example_03.c +++ b/src/examples/bg_example_03.c | |||
@@ -1,8 +1,11 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | //gcc -o bg_example_03 bg_example_03.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" | 2 | //gcc -o bg_example_03 bg_example_03.c -g `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" |
3 | //where directory is the a path where images/plant_01.jpg can be found. | 3 | //where directory is the a path where images/plant_01.jpg can be found. |
4 | 4 | ||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | #ifndef DATA_DIR | ||
7 | # define DATA_DIR "/usr/share/elementary" | ||
8 | #endif | ||
6 | 9 | ||
7 | static void | 10 | static void |
8 | on_done(void *data, Evas_Object *obj, void *event_info) | 11 | on_done(void *data, Evas_Object *obj, void *event_info) |
@@ -29,7 +32,7 @@ _cb_overlay_changed(void *data, Evas_Object *obj, void *event) | |||
29 | Evas_Object *parent, *over; | 32 | Evas_Object *parent, *over; |
30 | char buff[PATH_MAX]; | 33 | char buff[PATH_MAX]; |
31 | 34 | ||
32 | snprintf(buff, sizeof(buff), "%s/objects/test.edj", PACKAGE_DATA_DIR); | 35 | snprintf(buff, sizeof(buff), "%s/objects/test.edj", DATA_DIR); |
33 | parent = elm_object_parent_widget_get(o_bg); | 36 | parent = elm_object_parent_widget_get(o_bg); |
34 | over = edje_object_add(evas_object_evas_get(parent)); | 37 | over = edje_object_add(evas_object_evas_get(parent)); |
35 | edje_object_file_set(over, buff, "bg_overlay"); | 38 | edje_object_file_set(over, buff, "bg_overlay"); |
@@ -80,7 +83,7 @@ elm_main(int argc, char **argv) | |||
80 | evas_object_show(box); | 83 | evas_object_show(box); |
81 | 84 | ||
82 | o_bg = elm_bg_add(win); | 85 | o_bg = elm_bg_add(win); |
83 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR); | 86 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", DATA_DIR); |
84 | elm_bg_file_set(o_bg, buf, NULL); | 87 | elm_bg_file_set(o_bg, buf, NULL); |
85 | evas_object_size_hint_weight_set(o_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 88 | evas_object_size_hint_weight_set(o_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
86 | evas_object_size_hint_align_set(o_bg, EVAS_HINT_FILL, EVAS_HINT_FILL); | 89 | evas_object_size_hint_align_set(o_bg, EVAS_HINT_FILL, EVAS_HINT_FILL); |
diff --git a/src/examples/general_funcs_example.c b/src/examples/general_funcs_example.c index 97388095b..a90c4d97c 100644 --- a/src/examples/general_funcs_example.c +++ b/src/examples/general_funcs_example.c | |||
@@ -4,9 +4,9 @@ | |||
4 | 4 | ||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | 6 | ||
7 | #define PACKAGE_BIN_DIR "/usr/bin" | 7 | #define BIN_DIR "/usr/bin" |
8 | #define PACKAGE_LIB_DIR "/usr/lib" | 8 | #define LIB_DIR "/usr/lib" |
9 | #define PACKAGE_DATA_DIR "/usr/share/elementary" | 9 | #define DATA_DIR "/usr/share/elementary" |
10 | 10 | ||
11 | #define WIDTH 300 | 11 | #define WIDTH 300 |
12 | #define HEIGHT 300 | 12 | #define HEIGHT 300 |
@@ -71,9 +71,9 @@ elm_main(int argc, | |||
71 | Evas_Object *win, *bg, *box, *frame, *check, *b, *slider; | 71 | Evas_Object *win, *bg, *box, *frame, *check, *b, *slider; |
72 | 72 | ||
73 | /* tell elm about our app so it can figure out where to get files */ | 73 | /* tell elm about our app so it can figure out where to get files */ |
74 | elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); | 74 | elm_app_compile_bin_dir_set(BIN_DIR); |
75 | elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); | 75 | elm_app_compile_data_dir_set(DATA_DIR); |
76 | elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); | 76 | elm_app_compile_lib_dir_set(LIB_DIR); |
77 | elm_app_info_set(elm_main, "elementary", "images/logo.png"); | 77 | elm_app_info_set(elm_main, "elementary", "images/logo.png"); |
78 | 78 | ||
79 | fprintf(stdout, "prefix was set to: %s\n", elm_app_prefix_dir_get()); | 79 | fprintf(stdout, "prefix was set to: %s\n", elm_app_prefix_dir_get()); |
diff --git a/src/examples/gengrid_example.c b/src/examples/gengrid_example.c index 7315d4c89..fd8f3402d 100644 --- a/src/examples/gengrid_example.c +++ b/src/examples/gengrid_example.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <Elementary.h> | 12 | #include <Elementary.h> |
13 | #define PACKAGE_DATA_DIR "../../data" | 13 | #define DATA_DIR "../../data" |
14 | 14 | ||
15 | typedef struct _Example_Item | 15 | typedef struct _Example_Item |
16 | { | 16 | { |
@@ -325,7 +325,7 @@ _grid_content_get(void *data, | |||
325 | Evas_Object *icon = elm_bg_add(obj); | 325 | Evas_Object *icon = elm_bg_add(obj); |
326 | char buf[PATH_MAX]; | 326 | char buf[PATH_MAX]; |
327 | 327 | ||
328 | snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, | 328 | snprintf(buf, sizeof(buf), "%s/images/%s", DATA_DIR, |
329 | it->path); | 329 | it->path); |
330 | 330 | ||
331 | elm_bg_file_set(icon, buf, NULL); | 331 | elm_bg_file_set(icon, buf, NULL); |
diff --git a/src/examples/icon_example_01.c b/src/examples/icon_example_01.c index 13902f172..5bdaa14c3 100644 --- a/src/examples/icon_example_01.c +++ b/src/examples/icon_example_01.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01 | 2 | //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01 |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "." | 5 | #define DATA_DIR "." |
6 | 6 | ||
7 | EAPI_MAIN int | 7 | EAPI_MAIN int |
8 | elm_main(int argc, char **argv) | 8 | elm_main(int argc, char **argv) |
diff --git a/src/examples/image_example_01.c b/src/examples/image_example_01.c index a6a3cde96..0b358d8d2 100644 --- a/src/examples/image_example_01.c +++ b/src/examples/image_example_01.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01 | 2 | //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01 |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "." | 5 | #define DATA_DIR "." |
6 | 6 | ||
7 | int | 7 | int |
8 | elm_main(int argc, char **argv) | 8 | elm_main(int argc, char **argv) |
@@ -21,7 +21,7 @@ elm_main(int argc, char **argv) | |||
21 | elm_win_resize_object_add(win, bg); | 21 | elm_win_resize_object_add(win, bg); |
22 | evas_object_show(bg); | 22 | evas_object_show(bg); |
23 | 23 | ||
24 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR); | 24 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", DATA_DIR); |
25 | 25 | ||
26 | image = elm_image_add(win); | 26 | image = elm_image_add(win); |
27 | if (!elm_image_file_set(image, buf, NULL)) | 27 | if (!elm_image_file_set(image, buf, NULL)) |
diff --git a/src/examples/index_example_02.c b/src/examples/index_example_02.c index 1dec07036..f8dd36595 100644 --- a/src/examples/index_example_02.c +++ b/src/examples/index_example_02.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <Elementary.h> | 12 | #include <Elementary.h> |
13 | #define PACKAGE_DATA_DIR "../../data" | 13 | #define DATA_DIR "../../data" |
14 | 14 | ||
15 | static const char *items[] = \ | 15 | static const char *items[] = \ |
16 | { | 16 | { |
@@ -57,7 +57,7 @@ _grid_content_get(void *data, | |||
57 | if (!strcmp(part, "elm.swallow.icon")) | 57 | if (!strcmp(part, "elm.swallow.icon")) |
58 | { | 58 | { |
59 | char buf[PATH_MAX]; | 59 | char buf[PATH_MAX]; |
60 | snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, | 60 | snprintf(buf, sizeof(buf), "%s/images/%s", DATA_DIR, |
61 | "sky_01.jpg"); | 61 | "sky_01.jpg"); |
62 | 62 | ||
63 | Evas_Object *icon = elm_bg_add(obj); | 63 | Evas_Object *icon = elm_bg_add(obj); |
diff --git a/src/examples/layout_example_01.c b/src/examples/layout_example_01.c index 8165d5650..5ddb8b69a 100644 --- a/src/examples/layout_example_01.c +++ b/src/examples/layout_example_01.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -g `pkg-config --cflags --libs elementary` layout_example_01.c -o layout_example_01 | 2 | //gcc -g `pkg-config --cflags --libs elementary` layout_example_01.c -o layout_example_01 |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "." | 5 | #define DATA_DIR "." |
6 | 6 | ||
7 | #define TABLE "example/table" | 7 | #define TABLE "example/table" |
8 | #define BOX "example/box" | 8 | #define BOX "example/box" |
@@ -73,7 +73,7 @@ elm_main(int argc, char **argv) | |||
73 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 73 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
74 | elm_win_resize_object_add(win, layout); | 74 | elm_win_resize_object_add(win, layout); |
75 | elm_layout_file_set( | 75 | elm_layout_file_set( |
76 | layout, PACKAGE_DATA_DIR "/examples/layout_example.edj", | 76 | layout, DATA_DIR "/examples/layout_example.edj", |
77 | "example/mylayout"); | 77 | "example/mylayout"); |
78 | evas_object_show(layout); | 78 | evas_object_show(layout); |
79 | 79 | ||
diff --git a/src/examples/layout_example_03.c b/src/examples/layout_example_03.c index 9bed3465b..9b49e6e0b 100644 --- a/src/examples/layout_example_03.c +++ b/src/examples/layout_example_03.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -g `pkg-config --cflags --libs elementary` layout_example_03.c -o layout_example_03 | 2 | //gcc -g `pkg-config --cflags --libs elementary` layout_example_03.c -o layout_example_03 |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "." | 5 | #define DATA_DIR "." |
6 | 6 | ||
7 | #define TITLE "example/title" | 7 | #define TITLE "example/title" |
8 | #define SWALLOW "example/custom" | 8 | #define SWALLOW "example/custom" |
@@ -60,7 +60,7 @@ elm_main(int argc, char **argv) | |||
60 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 60 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
61 | elm_win_resize_object_add(win, layout); | 61 | elm_win_resize_object_add(win, layout); |
62 | elm_layout_file_set( | 62 | elm_layout_file_set( |
63 | layout, PACKAGE_DATA_DIR "/examples/layout_example.edj", | 63 | layout, DATA_DIR "/examples/layout_example.edj", |
64 | "example/mylayout3"); | 64 | "example/mylayout3"); |
65 | evas_object_show(layout); | 65 | evas_object_show(layout); |
66 | 66 | ||
diff --git a/src/examples/map_example_02.c b/src/examples/map_example_02.c index 808f7295a..404b56810 100644 --- a/src/examples/map_example_02.c +++ b/src/examples/map_example_02.c | |||
@@ -10,6 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <Elementary.h> | 12 | #include <Elementary.h> |
13 | #ifndef DATA_DIR | ||
14 | # define DATA_DIR "/usr/share/elementary" | ||
15 | #endif | ||
13 | 16 | ||
14 | typedef struct _Overlay_Data | 17 | typedef struct _Overlay_Data |
15 | { | 18 | { |
@@ -18,15 +21,15 @@ typedef struct _Overlay_Data | |||
18 | } Overlay_Data; | 21 | } Overlay_Data; |
19 | 22 | ||
20 | Overlay_Data data_argentina = {"Argentina", | 23 | Overlay_Data data_argentina = {"Argentina", |
21 | PACKAGE_DATA_DIR"/images/rock_01.jpg"}; | 24 | DATA_DIR"/images/rock_01.jpg"}; |
22 | Overlay_Data data_chile = {"Chile", | 25 | Overlay_Data data_chile = {"Chile", |
23 | PACKAGE_DATA_DIR"/images/rock_02.jpg"}; | 26 | DATA_DIR"/images/rock_02.jpg"}; |
24 | Overlay_Data data_sampa = {"São Paulo", | 27 | Overlay_Data data_sampa = {"São Paulo", |
25 | PACKAGE_DATA_DIR"/images/sky_01.jpg"}; | 28 | DATA_DIR"/images/sky_01.jpg"}; |
26 | Overlay_Data data_rio = {"Rio de Janeiro", | 29 | Overlay_Data data_rio = {"Rio de Janeiro", |
27 | PACKAGE_DATA_DIR"/images/sky_02.jpg"}; | 30 | DATA_DIR"/images/sky_02.jpg"}; |
28 | Overlay_Data data_brasilia = {"BrasÃlia", | 31 | Overlay_Data data_brasilia = {"BrasÃlia", |
29 | PACKAGE_DATA_DIR"/images/sky_03.jpg"}; | 32 | DATA_DIR"/images/sky_03.jpg"}; |
30 | 33 | ||
31 | static Elm_Map_Overlay *bubble; | 34 | static Elm_Map_Overlay *bubble; |
32 | 35 | ||
@@ -42,25 +45,25 @@ _icon_get(Evas_Object *obj, const char *file) | |||
42 | static Evas_Object * | 45 | static Evas_Object * |
43 | _city_icon_get(Evas_Object *obj) | 46 | _city_icon_get(Evas_Object *obj) |
44 | { | 47 | { |
45 | return _icon_get(obj, PACKAGE_DATA_DIR"/images/icon_07.png"); | 48 | return _icon_get(obj, DATA_DIR"/images/icon_07.png"); |
46 | } | 49 | } |
47 | 50 | ||
48 | static Evas_Object * | 51 | static Evas_Object * |
49 | _clas_city_icon_get(Evas_Object *obj) | 52 | _clas_city_icon_get(Evas_Object *obj) |
50 | { | 53 | { |
51 | return _icon_get(obj, PACKAGE_DATA_DIR"/images/icon_05.png"); | 54 | return _icon_get(obj, DATA_DIR"/images/icon_05.png"); |
52 | } | 55 | } |
53 | 56 | ||
54 | static Evas_Object * | 57 | static Evas_Object * |
55 | _country_icon_get(Evas_Object *obj) | 58 | _country_icon_get(Evas_Object *obj) |
56 | { | 59 | { |
57 | return _icon_get(obj, PACKAGE_DATA_DIR"/images/icon_06.png"); | 60 | return _icon_get(obj, DATA_DIR"/images/icon_06.png"); |
58 | } | 61 | } |
59 | 62 | ||
60 | static Evas_Object * | 63 | static Evas_Object * |
61 | _clas_country_icon_get(Evas_Object *obj) | 64 | _clas_country_icon_get(Evas_Object *obj) |
62 | { | 65 | { |
63 | return _icon_get(obj, PACKAGE_DATA_DIR"/images/icon_04.png"); | 66 | return _icon_get(obj, DATA_DIR"/images/icon_04.png"); |
64 | } | 67 | } |
65 | 68 | ||
66 | static Evas_Object * | 69 | static Evas_Object * |
diff --git a/src/examples/photocam_example_01.c b/src/examples/photocam_example_01.c index e7ec401e8..1dfdf7c3a 100644 --- a/src/examples/photocam_example_01.c +++ b/src/examples/photocam_example_01.c | |||
@@ -1,8 +1,11 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | //gcc -o photocam_example_01 photocam_example_01.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" | 2 | //gcc -o photocam_example_01 photocam_example_01.c -g `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" |
3 | //where directory is the path where images/insanely_huge_test_image.jpg can be found. | 3 | //where directory is the path where images/insanely_huge_test_image.jpg can be found. |
4 | 4 | ||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | #ifndef DATA_DIR | ||
7 | # define DATA_DIR "/usr/share/elementary" | ||
8 | #endif | ||
6 | 9 | ||
7 | static void _fit(void *data, Evas_Object *obj, void *event_info); | 10 | static void _fit(void *data, Evas_Object *obj, void *event_info); |
8 | static void _unfit(void *data, Evas_Object *obj, void *event_info); | 11 | static void _unfit(void *data, Evas_Object *obj, void *event_info); |
@@ -25,7 +28,7 @@ elm_main(int argc, char **argv) | |||
25 | evas_object_show(bg); | 28 | evas_object_show(bg); |
26 | 29 | ||
27 | photocam = elm_photocam_add(win); | 30 | photocam = elm_photocam_add(win); |
28 | elm_photocam_file_set(photocam, PACKAGE_DATA_DIR"/images/insanely_huge_test_image.jpg"); | 31 | elm_photocam_file_set(photocam, DATA_DIR"/images/insanely_huge_test_image.jpg"); |
29 | elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE); | 32 | elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE); |
30 | evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL); | 33 | evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL); |
31 | evas_object_resize(photocam, 500, 400); | 34 | evas_object_resize(photocam, 500, 400); |
diff --git a/src/examples/popup_example_01.c b/src/examples/popup_example_01.c index 141317e5f..fa8d9643f 100644 --- a/src/examples/popup_example_01.c +++ b/src/examples/popup_example_01.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -o popup_example_01 popup_example_01.c -g `pkg-config --cflags --libs elementary` | 2 | //gcc -o popup_example_01 popup_example_01.c -g `pkg-config --cflags --libs elementary` |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "../../data" | 5 | #define DATA_DIR "../../data" |
6 | 6 | ||
7 | static void _block_clicked(void *data, Evas_Object *obj, void *event_info); | 7 | static void _block_clicked(void *data, Evas_Object *obj, void *event_info); |
8 | static void _timeout(void *data, Evas_Object *obj, void *event_info); | 8 | static void _timeout(void *data, Evas_Object *obj, void *event_info); |
diff --git a/src/examples/popup_example_02.c b/src/examples/popup_example_02.c index 2a5e0306b..0f839d3e2 100644 --- a/src/examples/popup_example_02.c +++ b/src/examples/popup_example_02.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -o popup_example_02 popup_example_02.c -g `pkg-config --cflags --libs elementary` | 2 | //gcc -o popup_example_02 popup_example_02.c -g `pkg-config --cflags --libs elementary` |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "../../data" | 5 | #define DATA_DIR "../../data" |
6 | 6 | ||
7 | static void _response_cb(void *data, Evas_Object *obj, void *event_info); | 7 | static void _response_cb(void *data, Evas_Object *obj, void *event_info); |
8 | 8 | ||
@@ -34,7 +34,7 @@ elm_main(int argc, char **argv) | |||
34 | elm_object_part_text_set(popup, "title,text", "Title"); | 34 | elm_object_part_text_set(popup, "title,text", "Title"); |
35 | 35 | ||
36 | icon1 = elm_icon_add(popup); | 36 | icon1 = elm_icon_add(popup); |
37 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR); | 37 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", DATA_DIR); |
38 | elm_icon_file_set(icon1, buf, NULL); | 38 | elm_icon_file_set(icon1, buf, NULL); |
39 | //Setting popup title-icon | 39 | //Setting popup title-icon |
40 | elm_object_part_content_set(popup, "title,icon", icon1); | 40 | elm_object_part_content_set(popup, "title,icon", icon1); |
diff --git a/src/examples/popup_example_03.c b/src/examples/popup_example_03.c index 44741ab34..175a88427 100644 --- a/src/examples/popup_example_03.c +++ b/src/examples/popup_example_03.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -o popup_example_03 popup_example_03.c -g `pkg-config --cflags --libs elementary` | 2 | //gcc -o popup_example_03 popup_example_03.c -g `pkg-config --cflags --libs elementary` |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "../../data" | 5 | #define DATA_DIR "../../data" |
6 | 6 | ||
7 | static void _item_selected_cb(void *data, Evas_Object *obj, void *event_info); | 7 | static void _item_selected_cb(void *data, Evas_Object *obj, void *event_info); |
8 | static void _response_cb(void *data, Evas_Object *obj, void *event_info); | 8 | static void _response_cb(void *data, Evas_Object *obj, void *event_info); |
@@ -27,7 +27,7 @@ elm_main(int argc, char **argv) | |||
27 | popup = elm_popup_add(win); | 27 | popup = elm_popup_add(win); |
28 | 28 | ||
29 | icon1 = elm_icon_add(popup); | 29 | icon1 = elm_icon_add(popup); |
30 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR); | 30 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", DATA_DIR); |
31 | elm_icon_file_set(icon1, buf, NULL); | 31 | elm_icon_file_set(icon1, buf, NULL); |
32 | 32 | ||
33 | //Seting popup title-text | 33 | //Seting popup title-text |
diff --git a/src/examples/progressbar_example.c b/src/examples/progressbar_example.c index 9d92312ae..ccec197e9 100644 --- a/src/examples/progressbar_example.c +++ b/src/examples/progressbar_example.c | |||
@@ -5,11 +5,14 @@ | |||
5 | * See stdout/stderr for output. Compile with: | 5 | * See stdout/stderr for output. Compile with: |
6 | * | 6 | * |
7 | * @verbatim | 7 | * @verbatim |
8 | * gcc -g `pkg-config --cflags --libs elementary` progressbar_example.c -o progressbar_example | 8 | * gcc -g `pkg-config --cflags --libs elementary` progressbar_example.c -o progressbar_example -DDATA_DIR="\"<directory>\'"" |
9 | * @endverbatim | 9 | * @endverbatim |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <Elementary.h> | 12 | #include <Elementary.h> |
13 | #ifndef DATA_DIR | ||
14 | # define DATA_DIR "/usr/share/elementary" | ||
15 | #endif | ||
13 | 16 | ||
14 | typedef struct Progressbar_Example | 17 | typedef struct Progressbar_Example |
15 | { | 18 | { |
@@ -131,7 +134,7 @@ elm_main(int argc, | |||
131 | example_data.pb2 = pb; | 134 | example_data.pb2 = pb; |
132 | 135 | ||
133 | ic1 = elm_icon_add(win); | 136 | ic1 = elm_icon_add(win); |
134 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR); | 137 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", DATA_DIR); |
135 | elm_icon_file_set(ic1, buf, NULL); | 138 | elm_icon_file_set(ic1, buf, NULL); |
136 | evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | 139 | evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); |
137 | 140 | ||
diff --git a/src/examples/slideshow_example.c b/src/examples/slideshow_example.c index 1f092107b..ec4f5bf6d 100644 --- a/src/examples/slideshow_example.c +++ b/src/examples/slideshow_example.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <Elementary.h> | 12 | #include <Elementary.h> |
13 | #define PACKAGE_DATA_DIR "../../data" | 13 | #define DATA_DIR "../../data" |
14 | 14 | ||
15 | static void | 15 | static void |
16 | _on_done(void *data, | 16 | _on_done(void *data, |
@@ -23,15 +23,15 @@ _on_done(void *data, | |||
23 | static Evas_Object *slideshow, *bt_start, *bt_stop; | 23 | static Evas_Object *slideshow, *bt_start, *bt_stop; |
24 | static Elm_Slideshow_Item_Class itc; | 24 | static Elm_Slideshow_Item_Class itc; |
25 | 25 | ||
26 | static const char *img1 = PACKAGE_DATA_DIR "/images/logo.png"; | 26 | static const char *img1 = DATA_DIR "/images/logo.png"; |
27 | static const char *img2 = PACKAGE_DATA_DIR "/images/plant_01.jpg"; | 27 | static const char *img2 = DATA_DIR "/images/plant_01.jpg"; |
28 | static const char *img3 = PACKAGE_DATA_DIR "/images/rock_01.jpg"; | 28 | static const char *img3 = DATA_DIR "/images/rock_01.jpg"; |
29 | static const char *img4 = PACKAGE_DATA_DIR "/images/rock_02.jpg"; | 29 | static const char *img4 = DATA_DIR "/images/rock_02.jpg"; |
30 | static const char *img5 = PACKAGE_DATA_DIR "/images/sky_01.jpg"; | 30 | static const char *img5 = DATA_DIR "/images/sky_01.jpg"; |
31 | static const char *img6 = PACKAGE_DATA_DIR "/images/sky_04.jpg"; | 31 | static const char *img6 = DATA_DIR "/images/sky_04.jpg"; |
32 | static const char *img7 = PACKAGE_DATA_DIR "/images/wood_01.jpg"; | 32 | static const char *img7 = DATA_DIR "/images/wood_01.jpg"; |
33 | static const char *img8 = PACKAGE_DATA_DIR "/images/mystrale.jpg"; | 33 | static const char *img8 = DATA_DIR "/images/mystrale.jpg"; |
34 | static const char *img9 = PACKAGE_DATA_DIR "/images/mystrale_2.jpg"; | 34 | static const char *img9 = DATA_DIR "/images/mystrale_2.jpg"; |
35 | 35 | ||
36 | static void | 36 | static void |
37 | _notify_show(void *data, | 37 | _notify_show(void *data, |
diff --git a/src/examples/thumb_example_01.c b/src/examples/thumb_example_01.c index 9061cade5..9ffd7523d 100644 --- a/src/examples/thumb_example_01.c +++ b/src/examples/thumb_example_01.c | |||
@@ -2,7 +2,7 @@ | |||
2 | //gcc -g `pkg-config --cflags --libs elementary` thumb_example_01.c -o thumb_example_01 | 2 | //gcc -g `pkg-config --cflags --libs elementary` thumb_example_01.c -o thumb_example_01 |
3 | 3 | ||
4 | #include <Elementary.h> | 4 | #include <Elementary.h> |
5 | #define PACKAGE_DATA_DIR "." | 5 | #define DATA_DIR "." |
6 | 6 | ||
7 | static void | 7 | static void |
8 | _generation_started_cb(void *data, Evas_Object *o, void *event_info) | 8 | _generation_started_cb(void *data, Evas_Object *o, void *event_info) |
@@ -57,7 +57,7 @@ elm_main(int argc, char **argv) | |||
57 | evas_object_smart_callback_add(thumb, "generate,error", _generation_error_cb, NULL); | 57 | evas_object_smart_callback_add(thumb, "generate,error", _generation_error_cb, NULL); |
58 | 58 | ||
59 | elm_thumb_editable_set(thumb, EINA_FALSE); | 59 | elm_thumb_editable_set(thumb, EINA_FALSE); |
60 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR); | 60 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", DATA_DIR); |
61 | elm_thumb_file_set(thumb, buf, NULL); | 61 | elm_thumb_file_set(thumb, buf, NULL); |
62 | elm_thumb_reload(thumb); | 62 | elm_thumb_reload(thumb); |
63 | 63 | ||
diff --git a/src/examples/transit_example_03.c b/src/examples/transit_example_03.c index 4a3fb36eb..3ae256442 100644 --- a/src/examples/transit_example_03.c +++ b/src/examples/transit_example_03.c | |||
@@ -1,8 +1,11 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | //gcc -o transit_example_03 transit_example_03.c `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" | 2 | //gcc -o transit_example_03 transit_example_03.c `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" |
3 | //where directory is the a path where images/icon_07.png can be found. | 3 | //where directory is the a path where images/icon_07.png can be found. |
4 | 4 | ||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | #ifndef DATA_DIR | ||
7 | # define DATA_DIR "/usr/share/elementary" | ||
8 | #endif | ||
6 | 9 | ||
7 | /* structure to hold context for many callbacks */ | 10 | /* structure to hold context for many callbacks */ |
8 | struct Context { | 11 | struct Context { |
@@ -219,7 +222,7 @@ elm_main(int argc, char **argv) | |||
219 | obj = elm_button_add(win); | 222 | obj = elm_button_add(win); |
220 | elm_object_text_set(obj, "Transformed object!"); | 223 | elm_object_text_set(obj, "Transformed object!"); |
221 | icon = elm_icon_add(win); | 224 | icon = elm_icon_add(win); |
222 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", PACKAGE_DATA_DIR); | 225 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", DATA_DIR); |
223 | elm_icon_file_set(icon, buf, NULL); | 226 | elm_icon_file_set(icon, buf, NULL); |
224 | elm_object_part_content_set(obj, "icon", icon); | 227 | elm_object_part_content_set(obj, "icon", icon); |
225 | evas_object_move(obj, 160, 60); | 228 | evas_object_move(obj, 160, 60); |
diff --git a/src/examples/transit_example_04.c b/src/examples/transit_example_04.c index 62af7dcc9..c9a5aca69 100644 --- a/src/examples/transit_example_04.c +++ b/src/examples/transit_example_04.c | |||
@@ -1,8 +1,11 @@ | |||
1 | //Compile with: | 1 | //Compile with: |
2 | //gcc -o transit_example_04 transit_example_04.c `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" | 2 | //gcc -o transit_example_04 transit_example_04.c `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" |
3 | //where directory is the a path where images/icon_07.png can be found. | 3 | //where directory is the a path where images/icon_07.png can be found. |
4 | 4 | ||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | #ifndef DATA_DIR | ||
7 | # define DATA_DIR "/usr/share/elementary" | ||
8 | #endif | ||
6 | 9 | ||
7 | static void | 10 | static void |
8 | _transit_flip(Elm_Transit *trans) | 11 | _transit_flip(Elm_Transit *trans) |
@@ -123,7 +126,7 @@ elm_main(int argc, char **argv) | |||
123 | obj = elm_button_add(win); | 126 | obj = elm_button_add(win); |
124 | elm_object_text_set(obj, "Transformed object!"); | 127 | elm_object_text_set(obj, "Transformed object!"); |
125 | icon = elm_icon_add(win); | 128 | icon = elm_icon_add(win); |
126 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", PACKAGE_DATA_DIR); | 129 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", DATA_DIR); |
127 | elm_icon_file_set(icon, buf, NULL); | 130 | elm_icon_file_set(icon, buf, NULL); |
128 | elm_object_part_content_set(obj, "icon", icon); | 131 | elm_object_part_content_set(obj, "icon", icon); |
129 | evas_object_move(obj, 160, 60); | 132 | evas_object_move(obj, 160, 60); |
@@ -136,7 +139,7 @@ elm_main(int argc, char **argv) | |||
136 | obj = elm_button_add(win); | 139 | obj = elm_button_add(win); |
137 | elm_object_text_set(obj, "Another object!"); | 140 | elm_object_text_set(obj, "Another object!"); |
138 | icon = elm_icon_add(win); | 141 | icon = elm_icon_add(win); |
139 | snprintf(buf, sizeof(buf), "%s/images/icon_08.png", PACKAGE_DATA_DIR); | 142 | snprintf(buf, sizeof(buf), "%s/images/icon_08.png", DATA_DIR); |
140 | elm_icon_file_set(icon, buf, NULL); | 143 | elm_icon_file_set(icon, buf, NULL); |
141 | elm_object_part_content_set(obj, "icon", icon); | 144 | elm_object_part_content_set(obj, "icon", icon); |
142 | evas_object_move(obj, 160, 60); | 145 | evas_object_move(obj, 160, 60); |
diff --git a/src/examples/win_example.c b/src/examples/win_example.c index 8f0fa637f..f97ec761d 100644 --- a/src/examples/win_example.c +++ b/src/examples/win_example.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #include <Elementary.h> | 8 | #include <Elementary.h> |
9 | #define PACKAGE_DATA_DIR "../../data" | 9 | #define DATA_DIR "../../data" |
10 | 10 | ||
11 | static void | 11 | static void |
12 | _btn_activate_cb(void *data, Evas_Object *obj, void *event) | 12 | _btn_activate_cb(void *data, Evas_Object *obj, void *event) |
@@ -210,7 +210,7 @@ elm_main(int argc, char *argv[]) | |||
210 | evas_object_smart_callback_add(win2, "focus,in", _win_focused_cb, "managed"); | 210 | evas_object_smart_callback_add(win2, "focus,in", _win_focused_cb, "managed"); |
211 | 211 | ||
212 | o = elm_icon_add(win2); | 212 | o = elm_icon_add(win2); |
213 | elm_icon_file_set(o, PACKAGE_DATA_DIR "/images/logo.png", NULL); | 213 | elm_icon_file_set(o, DATA_DIR "/images/logo.png", NULL); |
214 | elm_icon_resizable_set(o, 0, 0); | 214 | elm_icon_resizable_set(o, 0, 0); |
215 | elm_icon_no_scale_set(o, EINA_TRUE); | 215 | elm_icon_no_scale_set(o, EINA_TRUE); |
216 | elm_win_resize_object_add(win2, o); | 216 | elm_win_resize_object_add(win2, o); |