My_Widget.h #ifndef MY_WIDGET_H #define MY_WIDGET_H #define MY_WIDGET(w) ((My_Widget *)w) typedef struct My_Widget My_Widget; struct My_Widget { Ewl_Widget widget; }; Ewl_Widget *my_widget_new(void); int my_widget_init(My_Widget *w); #endif ----------------------------- My_Widget.c Ewl_Widget * my_widget_new(void) { Ewl_Widget *w; w = NEW(My_Widget, 1); if (!w) return NULL; if (!my_widget_init(MY_WIDGET(w))) return NULL; return w; } int my_widget_init(My_Widget *w) { if (!ewl_widget_init(EWL_WIDGET(w))) return 0; ewl_widget_appearance_set(EWL_WIDGET(w), "custom_edje"); ewl_theme_data_str_set(EWL_WIDGET(w), "/custom_edje/file", path_to_edje); ewl_theme_data_str_set(EWL_WIDGET(w), "/custom_edje/group", group_in_edje); return 1; }