elm-theme-viewer/main.c

43 lines
812 B
C
Raw Normal View History

2012-08-12 19:50:58 -07:00
#include <Elementary.h>
2012-12-02 07:33:47 -08:00
#include "common.h"
2012-08-14 23:05:19 -07:00
#include "log.h"
2012-08-12 19:52:52 -07:00
#include "gui.h"
2012-08-12 19:55:07 -07:00
#include "theme.h"
2012-08-12 19:50:58 -07:00
EAPI_MAIN int
elm_main(int argc, char **argv)
{
2012-11-29 08:53:38 -08:00
const char *edje_file = NULL;
2012-12-02 07:33:47 -08:00
elm_app_compile_data_dir_set(ELM_THEME_VIEWER_DATA_DIR);
elm_app_info_set(elm_main, "elm-theme-viewer", "images/logo.png");
2012-11-29 08:53:38 -08:00
if (argc > 2)
{
printf("Usage: elm-theme-viewer EDJE_FILE_NAME\n");
return 0;
}
if ((argc == 2) && argv[1])
edje_file = argv[1];
else
edje_file = "/usr/local/share/elementary/themes/default.edj";
2012-08-14 23:05:19 -07:00
log_init();
// TODO: run this in a background
2012-08-13 04:23:49 -07:00
theme_init();
2012-11-29 08:53:38 -08:00
theme_load(edje_file);
2012-11-29 23:21:32 -08:00
theme_set(edje_file);
2012-08-12 19:52:52 -07:00
2012-11-29 08:53:38 -08:00
gui_create(edje_file);
gui_widget_load();
2012-08-12 19:50:58 -07:00
elm_run();
2012-11-29 23:21:32 -08:00
theme_unset(edje_file);
2012-08-12 19:50:58 -07:00
elm_shutdown();
return 0;
}
ELM_MAIN()