Eo: Removed "type" property from event/op descriptions.
[profile/ivi/eobj.git] / examples / evas / elw_boxedbutton.c
1 #include <Elementary.h>
2
3 #include "Eo.h"
4 #include "evas_obj.h"
5 #include "elw_box.h"
6 #include "elw_button.h"
7 #include "elw_boxedbutton.h"
8
9 #include "config.h"
10
11 typedef struct
12 {
13 //   Evas_Object *bx;
14 } Widget_Data;
15
16 #define MY_CLASS ELW_BOXEDBUTTON_CLASS
17
18 static void
19 _constructor(Eo *obj, void *class_data EINA_UNUSED)
20 {
21    eo_constructor_super(obj);
22
23    Eo *bt = eo_add(ELW_BUTTON_CLASS, obj);
24    eo_composite_object_attach(obj, bt);
25    eo_do(bt, eo_event_callback_forwarder_add(EV_CLICKED, obj));
26    eo_do(bt, evas_obj_visibility_set(EINA_TRUE));
27
28    eo_do(obj, elw_box_pack_end(bt));
29    eo_unref(bt);
30 }
31
32 static const Eo_Class_Description class_desc = {
33      "Elw BoxedButton",
34      EO_CLASS_TYPE_REGULAR,
35      EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
36      NULL,
37      sizeof(Widget_Data),
38      _constructor,
39      NULL,
40      NULL,
41      NULL
42 };
43
44 EO_DEFINE_CLASS(elw_boxedbutton_class_get, &class_desc, ELW_BOX_CLASS, ELW_BUTTON_CLASS, NULL)
45