1 #include <Elementary.h>
13 #define MY_CLASS ELW_WIN_CLASS
16 my_win_del(void *data, Evas_Object *obj, void *event_info)
18 /* called when my_win_main is requested to be deleted */
19 elm_exit(); /* exit the program's main loop that runs in elm_run() */
26 _constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
28 eo_do_super(obj, eo_constructor());
30 Widget_Data *wd = class_data;
32 /* FIXME: Will actually do something about those when I care... */
33 wd->win = elm_win_add(NULL, "eo-test", ELM_WIN_BASIC);
34 elm_win_title_set(wd->win, "Eo Test");
35 elm_win_autodel_set(wd->win, EINA_TRUE);
36 evas_object_smart_callback_add(wd->win, "delete,request", my_win_del, NULL);
38 wd->bg = elm_bg_add(wd->win);
39 elm_win_resize_object_add(wd->win, wd->bg);
40 evas_object_size_hint_weight_set(wd->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
41 evas_object_show(wd->bg);
43 eo_evas_object_set(obj, wd->win);
47 _class_constructor(Eo_Class *klass)
49 const Eo_Op_Func_Description func_desc[] = {
50 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
54 eo_class_funcs_set(klass, func_desc);
57 static const Eo_Class_Description class_desc = {
59 EO_CLASS_TYPE_REGULAR,
60 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
68 EO_DEFINE_CLASS(elw_win_class_get, &class_desc, EVAS_OBJ_CLASS, NULL)