added theme_init().

This commit is contained in:
Daniel Juyung Seo 2012-08-13 20:23:49 +09:00 committed by Daniel Juyung Seo
parent a2fe980f55
commit 85787d5ac7
2 changed files with 41 additions and 0 deletions

1
main.c
View File

@ -6,6 +6,7 @@ EAPI_MAIN int
elm_main(int argc, char **argv)
{
gui_create();
theme_init();
theme_load();
elm_run();

40
theme.c
View File

@ -1,5 +1,45 @@
#include <Edje.h>
typedef struct _Widget_Data Widget_Data;
struct _Widget_Data
{
Eina_List *styles;
};
char *widgets[] = {
"actionslider", "bg", "border?", "bubble", "button", "calendar",
"check", "clock", "colorselector", "conformant", "ctxpopup",
"datetime", "dayselector", "diskselector", "entry", "fileselector",
"flipselector", "frame", "gengrid", "genlist", "hover", "icon", "index",
"label", "layout", "list", "map", "menu", "multibuttonentry", "naviframe",
"notify", "panel", "panes", "photo", "photocam", "player", "pointer",
"popup", "progressbar", "radio", "scroller", "segment_control",
"separator", "slider", "slideshow", "spinner", "thumb", "toolbar",
"tooltip", "video", "win", NULL };
Eina_Hash *widget_list;
static void
_widget_entry_free_cb(void *data)
{
free(data);
}
void
theme_init(void)
{
int i = 0;
Widget_Data *wd = NULL;
widget_list = eina_hash_string_superfast_new(_widget_entry_free_cb);
while (widgets[i])
{
// TODO : free the data when it's not used anymore.
wd = (Widget_Data *)calloc(1, sizeof(Widget_Data));
eina_hash_add(widget_list, widgets[i], wd);
//fprintf(stderr, "%s\n", widgets[i++]);
}
}
void
theme_load(void)
{