Fixing bugs in examples.
authorgastal <gastal@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 19 Mar 2012 12:58:07 +0000 (12:58 +0000)
committergastal <gastal@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 19 Mar 2012 12:58:07 +0000 (12:58 +0000)
Patch by: João Paulo Fernandes Ventura<ventura@profusion.mobi>

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69507 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

35 files changed:
doc/examples.dox
src/examples/bg_example_01.c
src/examples/bg_example_02.c
src/examples/bg_example_03.c
src/examples/bubble_example_01.c
src/examples/calendar_example_01.c
src/examples/calendar_example_02.c
src/examples/calendar_example_03.c
src/examples/calendar_example_04.c
src/examples/calendar_example_05.c
src/examples/calendar_example_06.c
src/examples/check_example_01.c
src/examples/conformant_example_01.c
src/examples/ctxpopup_example_01.c
src/examples/efl_thread_1.c
src/examples/efl_thread_2.c
src/examples/efl_thread_3.c
src/examples/efl_thread_4.c
src/examples/efl_thread_5.c
src/examples/efl_thread_6.c
src/examples/flip_example_01.c
src/examples/frame_example_01.c
src/examples/hover_example_01.c
src/examples/hoversel_example_01.c
src/examples/label_example_01.c
src/examples/notify_example_01.c
src/examples/photocam_example_01.c
src/examples/popup_example_01.c
src/examples/popup_example_02.c
src/examples/popup_example_03.c
src/examples/slideshow_example.c
src/examples/transit_example_01.c
src/examples/transit_example_02.c
src/examples/transit_example_03.c
src/examples/transit_example_04.c

index d43fe46..0af84f5 100644 (file)
  * If some decoration is required, a label can be set, and icon before and
  * after the bar as well. On the second slider will add a @c home icon
  * and a @c folder icon at @c end.
- * @skipline text_set
- * @until end_set
+ * @skip elm_object_text_set
+ * @until elm_object_part_content_set(sl, "end", ic)
  *
  * If the bar size need to be changed, it can be done with span set function,
  * that doesn't accounts other widget's parts size. Also the bar can starts
index 3811429..c168a9f 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` bg_example_01.c -o bg_example_01
+//gcc -o bg_example_01 bg_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
index e34347e..368830f 100644 (file)
@@ -1,6 +1,6 @@
 //Compile with:
-//gcc -g -DPACKAGE_DATA_DIR="\"<directory>\"" `pkg-config --cflags --libs elementary` bg_example_02.c -o bg_example_02
-// where directory is the a path where images/plant_01.jpg can be found.
+//gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\""
+//where directory is the a path where images/plant_01.jpg can be found.
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
index 8720254..5ee8fb4 100644 (file)
@@ -1,6 +1,6 @@
 //Compile with:
-//gcc -g -DPACKAGE_DATA_DIR="\"<directory>\"" `pkg-config --cflags --libs elementary` bg_example_03.c -o bg_example_03
-// where directory is the a path where images/plant_01.jpg can be found.
+//gcc -o bg_example_03 bg_example_03.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\""
+//where directory is the a path where images/plant_01.jpg can be found.
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
index b3432af..b601b85 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" bubble_example_01.c -o bubble_example_01
+//gcc -o bubble_example_01 bubble_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -32,8 +32,11 @@ elm_main(int argc, char **argv)
    elm_win_title_set(win, "Bubble");
    elm_win_autodel_set(win, EINA_TRUE);
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+   evas_object_resize(win, 300, 200);
+   evas_object_show(win);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
@@ -65,9 +68,6 @@ elm_main(int argc, char **argv)
    evas_object_move(bubble, 0, 110);
    evas_object_show(bubble);
 
-   evas_object_resize(win, 300, 200);
-   evas_object_show(win);
-
    elm_run();
 
    evas_object_del(icon);
index f22c284..e52afac 100644 (file)
@@ -5,7 +5,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` calendar_example_01.c -o calendar_example_01
+ * gcc -o calendar_example_01 calendar_example_01.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -24,6 +24,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
    elm_win_title_set(win, "Calendar Creation Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index f16743b..0a0085b 100644 (file)
@@ -6,7 +6,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` calendar_example_02.c -o calendar_example_02
+ * gcc -o calendar_example_02 calendar_example_02.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -38,6 +38,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
    elm_win_title_set(win, "Calendar Layout Formatting Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index 989f776..9804dac 100644 (file)
@@ -6,7 +6,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` calendar_example_03.c -o calendar_example_03
+ * gcc -o calendar_example_03 calendar_example_03.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -25,6 +25,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
    elm_win_title_set(win, "Calendar Min/Max Year Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index 7221557..55978ac 100644 (file)
@@ -6,7 +6,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` calendar_example_04.c -o calendar_example_04
+ * gcc -o calendar_example_04 calendar_example_04.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -29,6 +29,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
    elm_win_title_set(win, "Calendar Day Selection Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index e48a9e8..0a676a8 100644 (file)
@@ -5,7 +5,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` calendar_example_05.c -o calendar_example_05
+ * gcc -o calendar_example_05 calendar_example_05.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -49,6 +49,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
    elm_win_title_set(win, "Calendar Getters Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index 7a4cc1e..1cd5a85 100644 (file)
@@ -4,7 +4,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` calendar_example_06.c -o calendar_example_06
+ * gcc -o calendar_example_06 calendar_example_06.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -43,6 +43,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
    elm_win_title_set(win, "Calendar Marks Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index a796752..cec2096 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` check_example_01.c -o check_example_01
+//gcc -o check_example_01  check_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -21,6 +21,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index 0ec34fb..0ea316d 100644 (file)
@@ -5,7 +5,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` conformant_example_01.c -o conformant_example_01
+ * gcc -o conformant_example_01 conformant_example_01.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -24,6 +24,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC);
    elm_win_title_set(win, "Conformant Example");
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
index 939920b..2930d9b 100644 (file)
@@ -1,9 +1,11 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` ctxpopup_example_01.c -o ctxpopup_example_01
+//gcc -o ctxpopup_example_01 ctxpopup_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
 # include "elementary_config.h"
+#else
+# define __UNUSED__
 #endif
 
 static void
@@ -81,6 +83,8 @@ elm_main(int argc, char **argv)
    elm_win_title_set(win, "Contextual Popup");
    elm_win_autodel_set(win, EINA_TRUE);
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+   evas_object_resize(win, 400, 400);
+   evas_object_show(win);
 
    bg = elm_bg_add(win);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -88,6 +92,7 @@ elm_main(int argc, char **argv)
    evas_object_show(bg);
 
    list = elm_list_add(win);
+   evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, list);
    elm_list_mode_set(list, ELM_LIST_COMPRESS);
 
@@ -98,9 +103,6 @@ elm_main(int argc, char **argv)
    evas_object_show(list);
    elm_list_go(list);
 
-   evas_object_resize(win, 400, 400);
-   evas_object_show(win);
-
    elm_run();
 }
 ELM_MAIN()
index 98bc5e9..48ea3d2 100644 (file)
@@ -1,3 +1,5 @@
+//Compile with:
+//gcc -o efl_thread_1 efl_thread_1.c -g `pkg-config --cflags --libs elementary`
 #include <Elementary.h>
 #include <pthread.h>
 
@@ -50,12 +52,14 @@ elm_main(int argc, char **argv)
    
    win = elm_win_add(NULL, "efl-thread-1", ELM_WIN_BASIC);
    elm_win_title_set(win, "EFL Thread 1");
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
    evas_object_show(win);
    
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
    
    o = evas_object_rectangle_add(evas_object_evas_get(win));
index a9da805..1bca6bc 100644 (file)
@@ -1,3 +1,5 @@
+//Compile with:
+//gcc -o efl_thread_2 efl_thread_2.c -g `pkg-config --cflags --libs elementary`
 #include <Elementary.h>
 #include <pthread.h>
 
@@ -66,12 +68,14 @@ elm_main(int argc, char **argv)
    
    win = elm_win_add(NULL, "efl-thread-2", ELM_WIN_BASIC);
    elm_win_title_set(win, "EFL Thread 2");
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
    evas_object_show(win);
    
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
    
    o = evas_object_rectangle_add(evas_object_evas_get(win));
index 3019270..299776a 100644 (file)
@@ -1,3 +1,5 @@
+//Compile with:
+//gcc -o efl_thread_3 efl_thread_3.c -g `pkg-config --cflags --libs elementary`
 #include <Elementary.h>
 #include <pthread.h>
 
@@ -68,12 +70,14 @@ elm_main(int argc, char **argv)
    
    win = elm_win_add(NULL, "efl-thread-3", ELM_WIN_BASIC);
    elm_win_title_set(win, "EFL Thread 3");
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
    evas_object_show(win);
    
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
    
    o = evas_object_rectangle_add(evas_object_evas_get(win));
index 2eee3b7..ddb2368 100644 (file)
@@ -1,3 +1,5 @@
+//Compile with:
+//gcc -o efl_thread_4 efl_thread_4.c -g `pkg-config --cflags --libs elementary`
 #include <Elementary.h>
 #include <pthread.h>
 
@@ -88,12 +90,14 @@ elm_main(int argc, char **argv)
    
    win = elm_win_add(NULL, "efl-thread-4", ELM_WIN_BASIC);
    elm_win_title_set(win, "EFL Thread 4");
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
    evas_object_show(win);
    
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
    o = evas_object_rectangle_add(evas_object_evas_get(win));
index 7b3db3a..4f17ef5 100644 (file)
@@ -1,3 +1,5 @@
+//Compile with:
+//gcc -o efl_thread_5 efl_thread_5.c -g `pkg-config --cflags --libs elementary`
 #include <Elementary.h>
 
 static Ecore_Thread *th = NULL;
@@ -68,12 +70,14 @@ elm_main(int argc, char **argv)
    
    win = elm_win_add(NULL, "efl-thread-5", ELM_WIN_BASIC);
    elm_win_title_set(win, "EFL Thread 5");
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
    evas_object_show(win);
    
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
    
    o = evas_object_rectangle_add(evas_object_evas_get(win));
index 49efe05..2d47fb2 100644 (file)
@@ -1,3 +1,5 @@
+//Compile with:
+//gcc -o efl_thread_6 efl_thread_6.c -g `pkg-config --cflags --libs elementary`
 #include <Elementary.h>
 
 static Evas_Object *win = NULL;
@@ -124,12 +126,14 @@ elm_main(int argc, char **argv)
 
    win = elm_win_add(NULL, "efl-thread-6", ELM_WIN_BASIC);
    elm_win_title_set(win, "EFL Thread 6");
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
    evas_object_show(win);
 
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
    // queue up 64 mandel generation thread jobs
index 3de83df..a44504c 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` flip_example_01.c -o flip_example_01
+//gcc -o flip_example_01 flip_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -19,6 +19,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index d3e4b35..c58f858 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` frame_example_01.c -o frame_example_01
+//gcc -o frame_example_01 frame_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -19,6 +19,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index ec40f0b..3a337cb 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` hover_example_01.c -o hover_example_01
+//gcc -o hover_example_01 hover_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -29,6 +29,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index ed76d29..10cda69 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` hoversel_example_01.c -o hoversel_example_01
+//gcc -o hoversel_example_01 hoversel_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
index d863655..b9e26a6 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` label_example_01.c -o label_example_01
+//gcc -o label_example_01 label_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -17,6 +17,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index 98f41c4..33c4b78 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` notify_example_01.c -o notify_example_01
+//gcc -o notify_example_01 notify_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -19,6 +19,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index a2ba742..4a5eba8 100644 (file)
@@ -1,5 +1,6 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" photocam_example_01.c -o photocam_example_01
+//gcc -o photocam_example_01 photocam_example_01.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\""
+//where directory is the path where images/insanely_huge_test_image.jpg can be found.
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -22,6 +23,7 @@ elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index 27eb0e3..1d0747f 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` popup_example_01.c -o popup_example_01
+//gcc -o popup_example_01 popup_example_01.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -24,6 +24,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
 
    bg = elm_bg_add(win);
    elm_bg_color_set(bg, 128, 128, 128);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index 9ecd03a..48d0eba 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` popup_example_02.c -o popup_example_02
+//gcc -o popup_example_02 popup_example_02.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -23,6 +23,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index 92d598f..1f6993a 100644 (file)
@@ -1,5 +1,5 @@
 //Compile with:
-//gcc -g `pkg-config --cflags --libs elementary` popup_example_03.c -o popup_example_03
+//gcc -o popup_example_03 popup_example_03.c -g `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -25,6 +25,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
    bg = elm_bg_add(win);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
index b97d859..4d2ba3d 100644 (file)
@@ -5,7 +5,7 @@
  * See stdout/stderr for output. Compile with:
  *
  * @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` slideshow_example.c -o slideshow_example
+ * gcc -o slideshow_example slideshow_example.c -g `pkg-config --cflags --libs elementary`
  * @endverbatim
  */
 
@@ -191,17 +191,21 @@ elm_main(int    argc __UNUSED__,
    win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC);
    elm_win_title_set(win, "Slideshow example");
    evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
+   elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+   evas_object_resize(win, 600, 400);
+   evas_object_show(win);
 
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
    slideshow = elm_slideshow_add(win);
    elm_slideshow_loop_set(slideshow, EINA_TRUE);
-   elm_win_resize_object_add(win, slideshow);
    evas_object_size_hint_weight_set(slideshow,
                                     EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, slideshow);
    evas_object_show(slideshow);
 
    itc.func.get = _get;
@@ -225,6 +229,7 @@ elm_main(int    argc __UNUSED__,
 
    notify = elm_notify_add(win);
    elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
+   evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, notify);
    elm_notify_timeout_set(notify, 3.0);
 
@@ -311,9 +316,6 @@ elm_main(int    argc __UNUSED__,
 
    _notify_show(notify, NULL, NULL, NULL);
 
-   evas_object_resize(win, 600, 400);
-   evas_object_show(win);
-
    elm_run();
    return 0;
 }
index 3696307..f6c93dc 100644 (file)
@@ -1,6 +1,5 @@
 //Compile with:
-//gcc -g -DPACKAGE_DATA_DIR="\"<directory>\"" `pkg-config --cflags --libs elementary` transit_example_01.c -o transit_example_01
-// where directory is the a path where images/plant_01.jpg can be found.
+//gcc -o transit_example_01 transit_example_01.c `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -26,11 +25,12 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    elm_win_title_set(win, "Transit - Basic");
    evas_object_smart_callback_add(win, "delete,request", on_done, NULL);
    elm_win_autodel_set(win, EINA_TRUE);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_resize(win, 400, 400);
 
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
    bt = elm_button_add(win);
index bc75b48..86b124e 100644 (file)
@@ -1,6 +1,5 @@
 //Compile with:
-//gcc -g -DPACKAGE_DATA_DIR="\"<directory>\"" `pkg-config --cflags --libs elementary` transit_example_02.c -o transit_example_02
-// where directory is the a path where images/plant_01.jpg can be found.
+//gcc -o transit_example_02 transit_example_02.c `pkg-config --cflags --libs elementary`
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
@@ -26,11 +25,12 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    elm_win_title_set(win, "Transit 9");
    elm_win_autodel_set(win, EINA_TRUE);
    evas_object_resize(win, 400, 400);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    evas_object_show(win);
 
    bg = elm_bg_add(win);
-   elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
 
    bt = elm_button_add(win);
index a140788..a14078d 100644 (file)
@@ -1,6 +1,6 @@
 //Compile with:
-//gcc -g -DPACKAGE_DATA_DIR="\"<directory>\"" `pkg-config --cflags --libs elementary` transit_example_03.c -o transit_example_03
-// where directory is the a path where images/plant_01.jpg can be found.
+//gcc -o transit_example_03 transit_example_03.c `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\""
+//where directory is the a path where images/icon_07.png can be found.
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H
index faf4fe5..5b73fd5 100644 (file)
@@ -1,7 +1,6 @@
 //Compile with:
-//gcc -g -DPACKAGE_DATA_DIR="\"<directory>\"" `pkg-config --cflags --libs elementary` transit_example_04.c -o transit_example_04
-// where directory is the a path where images/plant_01.jpg can be found.
-
+//gcc -o transit_example_04 transit_example_04.c `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\""
+//where directory is the a path where images/icon_07.png can be found.
 
 #include <Elementary.h>
 #ifdef HAVE_CONFIG_H