* See stdout/stderr for output. Compile with:
*
* @verbatim
- * gcc -g `pkg-config --cflags --libs elementary` progressbar_example.c -o progressbar_example
+ * gcc -g progressbar_example.c -o progressbar_example `pkg-config --cflags --libs elementary`
* @endverbatim
*/
#include <Elementary.h>
-#ifdef HAVE_CONFIG_H
-# include "elementary_config.h"
-#else
-# define __UNUSED__
-#endif
typedef struct Progressbar_Example
{
static Progressbar_Example example_data;
static Eina_Bool
-_progressbar_example_value_set(void *data __UNUSED__)
+_progressbar_example_value_set(void *data)
{
double progress;
}
static void
-_progressbar_example_start(void *data __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_progressbar_example_start(void *data,
+ Evas_Object *obj,
+ void *event_info)
{
elm_progressbar_pulse(example_data.pb2, EINA_TRUE);
elm_progressbar_pulse(example_data.pb5, EINA_TRUE);
/* end of show */
static void
-_progressbar_example_stop(void *data __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_progressbar_example_stop(void *data,
+ Evas_Object *obj,
+ void *event_info)
{
elm_progressbar_pulse(example_data.pb2, EINA_FALSE);
elm_progressbar_pulse(example_data.pb5, EINA_FALSE);
}
static void
-_on_done(void *data __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_on_done(void *data,
+ Evas_Object *obj,
+ void *event_info)
{
_progressbar_example_stop(NULL, NULL, NULL);
elm_exit();
}
-int
-elm_main(int argc __UNUSED__,
- char **argv __UNUSED__)
+EAPI_MAIN int
+elm_main(int argc,
+ char **argv)
{
Evas_Object *win, *bg, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2;
char buf[PATH_MAX];
+ elm_app_info_set(elm_main, "elementary", "images/logo_small.png");
win = elm_win_add(NULL, "progressbar", ELM_WIN_BASIC);
elm_win_title_set(win, "Progress bar example");
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
example_data.pb2 = pb;
ic1 = elm_icon_add(win);
- snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_icon_file_set(ic1, buf, NULL);
evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
evas_object_show(win);
elm_run();
+ elm_shutdown();
+
return 0;
}
-
ELM_MAIN()