2012-09-04 00:03:02 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2012-04-05 08:31:15 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
#include "Eo.h"
|
2012-10-05 13:09:47 -07:00
|
|
|
#include "evas_evas_obj.h"
|
|
|
|
#include "evas_elw_box.h"
|
|
|
|
#include "evas_elw_button.h"
|
|
|
|
#include "evas_elw_boxedbutton.h"
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
// Evas_Object *bx;
|
|
|
|
} Widget_Data;
|
|
|
|
|
2012-04-23 01:09:54 -07:00
|
|
|
#define MY_CLASS ELW_BOXEDBUTTON_CLASS
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
static void
|
2012-06-10 07:04:53 -07:00
|
|
|
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
2012-04-05 08:31:15 -07:00
|
|
|
{
|
2012-06-10 07:04:53 -07:00
|
|
|
eo_do_super(obj, eo_constructor());
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
Eo *bt = eo_add(ELW_BUTTON_CLASS, obj);
|
2012-06-10 08:02:44 -07:00
|
|
|
eo_composite_attach(bt, obj);
|
2012-05-14 00:35:19 -07:00
|
|
|
eo_do(bt, eo_event_callback_forwarder_add(EV_CLICKED, obj));
|
2012-06-10 23:34:46 -07:00
|
|
|
eo_do(bt, exevas_obj_visibility_set(EINA_TRUE));
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
eo_do(obj, elw_box_pack_end(bt));
|
|
|
|
eo_unref(bt);
|
2012-04-05 08:31:15 -07:00
|
|
|
}
|
|
|
|
|
2012-06-10 07:13:34 -07:00
|
|
|
static void
|
|
|
|
_class_constructor(Eo_Class *klass)
|
|
|
|
{
|
|
|
|
const Eo_Op_Func_Description func_desc[] = {
|
|
|
|
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
|
|
|
|
EO_OP_FUNC_SENTINEL
|
|
|
|
};
|
|
|
|
|
|
|
|
eo_class_funcs_set(klass, func_desc);
|
|
|
|
}
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
static const Eo_Class_Description class_desc = {
|
2012-07-09 02:09:46 -07:00
|
|
|
EO_VERSION,
|
2012-04-23 01:09:54 -07:00
|
|
|
"Elw BoxedButton",
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_CLASS_TYPE_REGULAR,
|
|
|
|
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL,
|
|
|
|
sizeof(Widget_Data),
|
2012-06-10 07:13:34 -07:00
|
|
|
_class_constructor,
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_DEFINE_CLASS(elw_boxedbutton_class_get, &class_desc, ELW_BOX_CLASS, ELW_BUTTON_CLASS, NULL)
|
2012-04-05 08:31:15 -07:00
|
|
|
|