1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

feat(obj_class) use different prototype for the event_cb in lv_obj_class_t

It adds lv_obj_class_t * as the first arguement for MicroPython compatibility
This commit is contained in:
Gabor Kiss-Vamosi 2021-04-21 09:55:21 +02:00
parent 663f8c2672
commit 6c863cabb7
23 changed files with 101 additions and 56 deletions

View File

@ -60,7 +60,7 @@ typedef struct _lv_event_dsc_t{
static void lv_obj_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_obj_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_obj_draw(lv_event_t * e);
static void lv_obj_event_cb(lv_event_t * e);
static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_scrollbar(lv_obj_t * obj, const lv_area_t * clip_area);
static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc);
static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find);
@ -80,7 +80,7 @@ static lv_obj_t * event_original_target;
const lv_obj_class_t lv_obj_class = {
.constructor_cb = lv_obj_constructor,
.destructor_cb = lv_obj_destructor,
.event_cb = lv_obj_event_cb,
.event_cb = lv_obj_event,
.width_def = LV_DPI_DEF,
.height_def = LV_DPI_DEF,
.editable = LV_OBJ_CLASS_EDITABLE_FALSE,
@ -250,7 +250,7 @@ lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e)
/*Call the actual event callback*/
e->user_data = NULL;
base->event_cb(e);
base->event_cb(base, e);
lv_res_t res = LV_RES_OK;
/*Stop if the object is deleted*/
@ -830,10 +830,10 @@ static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc
#endif
}
#include "lvgl/lvgl.h"
static void lv_obj_event_cb(lv_event_t * e)
static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_target(e);
if(code == LV_EVENT_PRESSED) {

View File

@ -27,7 +27,6 @@ extern "C" {
/*********************
* DEFINES
*********************/
#define _LV_EVENT_FLAG_BUBBLED 0x80
/**********************
* TYPEDEFS
@ -96,7 +95,7 @@ typedef enum {
}lv_event_code_t;
typedef struct {
typedef struct _lv_event_t {
struct _lv_obj_t * target;
struct _lv_obj_t * original_target;
lv_event_code_t code;

View File

@ -26,6 +26,8 @@ extern "C" {
**********************/
struct _lv_obj_t;
struct _lv_obj_class_t;
struct _lv_event_t;
typedef enum {
LV_OBJ_CLASS_EDITABLE_INHERIT, /**< Check the base class. Must have 0 value to let zero initialized class inherit*/
@ -39,6 +41,8 @@ typedef enum {
LV_OBJ_CLASS_GROUP_DEF_FALSE,
}lv_obj_class_group_def_t;
typedef void (*lv_obj_class_event_cb_t)(struct _lv_obj_class_t * class_p, struct _lv_event_t * e);
/**
* Describe the common methods of every object.
* Similar to a C++ class.
@ -50,11 +54,11 @@ typedef struct _lv_obj_class_t {
#if LV_USE_USER_DATA
void * user_data;
#endif
lv_event_cb_t event_cb; /**< Object type specific event function*/
void (*event_cb)(const struct _lv_obj_class_t * class_p, struct _lv_event_t * e); /**< Widget type specific event function*/
lv_coord_t width_def;
lv_coord_t height_def;
uint32_t editable : 2; /**< Value from ::lv_obj_class_editable_t*/
uint32_t group_def : 2; /**< Value from ::lv_obj_class_group_def_t*/
uint32_t editable : 2; /**< Value from ::lv_obj_class_editable_t*/
uint32_t group_def : 2; /**< Value from ::lv_obj_class_group_def_t*/
uint32_t instance_size : 16;
}lv_obj_class_t;

View File

@ -33,7 +33,7 @@
* STATIC PROTOTYPES
**********************/
static void lv_colorwheel_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_colorwheel_event(lv_event_t * e);
static void lv_colorwheel_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_disc_grad(lv_event_t * e);
static void draw_knob(lv_event_t * e);
@ -337,8 +337,10 @@ static lv_area_t get_knob_area(lv_obj_t * obj)
return knob_area;
}
static void lv_colorwheel_event(lv_event_t * e)
static void lv_colorwheel_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
/*Call the ancestor's event handler*/
lv_res_t res = lv_obj_event_base(MY_CLASS, e);

View File

@ -25,7 +25,7 @@
**********************/
static void lv_imgbtn_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void draw_main(lv_event_t * e);
static void lv_imgbtn_event(lv_event_t * e);
static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void refr_img(lv_obj_t * imgbtn);
static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
lv_imgbtn_state_t get_state(const lv_obj_t * imgbtn);
@ -160,8 +160,10 @@ static void lv_imgbtn_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj
}
static void lv_imgbtn_event(lv_event_t * e)
static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res = lv_obj_event_base(&lv_imgbtn_class, e);
if(res != LV_RES_OK) return;

View File

@ -30,7 +30,7 @@
* STATIC PROTOTYPES
**********************/
static void lv_led_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_led_event(lv_event_t * e);
static void lv_led_event(const lv_obj_class_t * class_p, lv_event_t * e);
/**********************
* STATIC VARIABLES
@ -156,8 +156,10 @@ static void lv_led_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
led->bright = LV_LED_BRIGHT_MAX;
}
static void lv_led_event(lv_event_t * e)
static void lv_led_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/* Call the ancestor's event handler */

View File

@ -23,7 +23,7 @@
**********************/
static void lv_spinbox_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_spinbox_event(lv_event_t * e);
static void lv_spinbox_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void lv_spinbox_updatevalue(lv_obj_t * obj);
/**********************
@ -294,8 +294,10 @@ static void lv_spinbox_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
LV_LOG_TRACE("Spinbox constructor finished");
}
static void lv_spinbox_event(lv_event_t * e)
static void lv_spinbox_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
/*Call the ancestor's event handler*/
lv_res_t res = LV_RES_OK;
res = lv_obj_event_base(MY_CLASS, e);

View File

@ -358,7 +358,7 @@ static inline lv_res_t lv_style_get_prop_inlined(lv_style_t * style, lv_style_pr
* Initialize a transition descriptor.
* @param tr pointer to a transition descriptor to initialize
* @param props an array with the properties to transition. The last element must be zero.
* @param path_xcb and animation path (ease) callback. If `NULL` liner path will be used.
* @param path_cb and animation path (ease) callback. If `NULL` liner path will be used.
* @param time duration of the transition in [ms]
* @param delay delay before the transition in [ms]
* @example
@ -366,7 +366,7 @@ static inline lv_res_t lv_style_get_prop_inlined(lv_style_t * style, lv_style_pr
* static lv_style_transition_dsc_t trans1;
* lv_style_transition_dsc_init(&trans1, trans_props, NULL, 300, 0);
*/
void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t * props, lv_anim_path_cb_t path_xcb, uint32_t time, uint32_t delay);
void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t * props, lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay);
/**
* Get the default value of a property

View File

@ -32,7 +32,7 @@
static void lv_arc_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_arc_draw(lv_event_t * e);
static void lv_arc_event(lv_event_t * e);
static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void inv_arc_area(lv_obj_t * arc, uint16_t start_angle, uint16_t end_angle, lv_part_t part);
static void get_center(lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r);
static void get_knob_area(lv_obj_t * arc, const lv_point_t * center, lv_coord_t r, lv_area_t * knob_area);
@ -509,8 +509,10 @@ static void lv_arc_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
LV_TRACE_OBJ_CREATE("finished");
}
static void lv_arc_event(lv_event_t * e)
static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -47,7 +47,7 @@
**********************/
static void lv_bar_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_bar_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_bar_event(lv_event_t * e);
static void lv_bar_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_indic(lv_event_t * e);
static void lv_bar_set_value_with_anim(lv_obj_t * obj, int16_t new_value, int16_t * value_ptr,
lv_bar_anim_t * anim_info, lv_anim_enable_t en);
@ -466,8 +466,10 @@ static void draw_indic(lv_event_t * e)
#endif
}
static void lv_bar_event(lv_event_t * e)
static void lv_bar_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -34,7 +34,7 @@
**********************/
static void lv_btnmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_btnmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_btnmatrix_event(lv_event_t * e);
static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_main(lv_event_t * e);
static uint8_t get_button_width(lv_btnmatrix_ctrl_t ctrl_bits);
@ -387,8 +387,10 @@ static void lv_btnmatrix_destructor(const lv_obj_class_t * class_p, lv_obj_t * o
LV_TRACE_OBJ_CREATE("finshed");
}
static void lv_btnmatrix_event(lv_event_t * e)
static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -38,7 +38,7 @@
**********************/
static void lv_chart_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_chart_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_chart_event(lv_event_t * e);
static void lv_chart_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_div_lines(lv_obj_t * obj , const lv_area_t * mask);
static void draw_series_line(lv_obj_t * obj, const lv_area_t * clip_area);
@ -611,8 +611,10 @@ static void lv_chart_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
LV_TRACE_OBJ_CREATE("finished");
}
static void lv_chart_event(lv_event_t * e)
static void lv_chart_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
/*Call the ancestor's event handler*/
lv_res_t res;

View File

@ -28,7 +28,7 @@
**********************/
static void lv_checkbox_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_checkbox_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_checkbox_event(lv_event_t * e);
static void lv_checkbox_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void lv_checkbox_draw(lv_event_t * e);
/**********************
@ -140,8 +140,10 @@ static void lv_checkbox_destructor(const lv_obj_class_t * class_p, lv_obj_t * ob
LV_TRACE_OBJ_CREATE("finished");
}
static void lv_checkbox_event(lv_event_t * e)
static void lv_checkbox_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/
res = lv_obj_event_base(MY_CLASS, e);

View File

@ -39,12 +39,12 @@
static lv_obj_t * lv_dropdown_list_create(lv_obj_t * parent);
static void lv_dropdown_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_dropdown_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_dropdown_event(lv_event_t * e);
static void lv_dropdown_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_main(lv_event_t * e);
static void lv_dropdownlist_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_dropdownlist_destructor(const lv_obj_class_t * class_p, lv_obj_t * list_obj);
static void lv_dropdown_list_event(lv_event_t * e);
static void lv_dropdown_list_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_list(lv_event_t * e);
static void draw_box(lv_obj_t * dropdown_obj, const lv_area_t * clip_area, uint16_t id, lv_state_t state);
@ -601,8 +601,10 @@ static void lv_dropdownlist_destructor(const lv_obj_class_t * class_p, lv_obj_t
dropdown->list = NULL;
}
static void lv_dropdown_event(lv_event_t * e)
static void lv_dropdown_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/
@ -695,8 +697,10 @@ static void lv_dropdown_event(lv_event_t * e)
}
}
static void lv_dropdown_list_event(lv_event_t * e)
static void lv_dropdown_list_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -30,7 +30,7 @@
**********************/
static void lv_img_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_img_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_img_event(lv_event_t * e);
static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_img(lv_event_t * e);
/**********************
@ -397,8 +397,10 @@ static void lv_img_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
}
}
static void lv_img_event(lv_event_t * e)
static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_event_code_t code = lv_event_get_code(e);
/*Ancestor events will be called during drawing*/

View File

@ -36,7 +36,7 @@
**********************/
static void lv_label_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_label_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_label_event_cb(lv_event_t * e);
static void lv_label_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_main(lv_event_t * e);
static void lv_label_refr_text(lv_obj_t * obj);
@ -55,7 +55,7 @@ static void set_ofs_y_anim(void * obj, int32_t v);
const lv_obj_class_t lv_label_class = {
.constructor_cb = lv_label_constructor,
.destructor_cb = lv_label_destructor,
.event_cb = lv_label_event_cb,
.event_cb = lv_label_event,
.instance_size = sizeof(lv_label_t),
.base_class = &lv_obj_class
};
@ -738,8 +738,10 @@ static void lv_label_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
label->text = NULL;
}
static void lv_label_event_cb(lv_event_t * e)
static void lv_label_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -29,7 +29,7 @@
* STATIC PROTOTYPES
**********************/
static void lv_line_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_line_event(lv_event_t * e);
static void lv_line_event(const lv_obj_class_t * class_p, lv_event_t * e);
/**********************
* STATIC VARIABLES
@ -119,8 +119,10 @@ static void lv_line_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
LV_TRACE_OBJ_CREATE("finished");
}
static void lv_line_event(lv_event_t * e)
static void lv_line_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -29,7 +29,7 @@
**********************/
static void lv_meter_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_meter_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_meter_event(lv_event_t * e);
static void lv_meter_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_arcs(lv_obj_t * obj, const lv_area_t * clip_area, const lv_area_t * scale_area);
static void draw_ticks_and_labels(lv_obj_t * obj, const lv_area_t * clip_area, const lv_area_t * scale_area);
static void draw_needles(lv_obj_t * obj, const lv_area_t * clip_area, const lv_area_t * scale_area);
@ -278,8 +278,10 @@ static void lv_meter_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
}
static void lv_meter_event(lv_event_t * e)
static void lv_meter_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res = lv_obj_event_base(MY_CLASS, e);
if(res != LV_RES_OK) return;

View File

@ -29,8 +29,8 @@
* STATIC PROTOTYPES
**********************/
static void lv_roller_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_roller_event(lv_event_t * e);
static void lv_roller_label_event(lv_event_t * e);
static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void lv_roller_label_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_main(lv_event_t * e);
static void draw_label(lv_event_t * e);
static void refr_position(lv_obj_t * obj, lv_anim_enable_t animen);
@ -303,8 +303,10 @@ static void lv_roller_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj
LV_LOG_TRACE("finshed");
}
static void lv_roller_event(lv_event_t * e)
static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/
@ -400,8 +402,10 @@ static void lv_roller_event(lv_event_t * e)
}
}
static void lv_roller_label_event(lv_event_t * e)
static void lv_roller_label_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
lv_event_code_t code = lv_event_get_code(e);

View File

@ -32,7 +32,7 @@
* STATIC PROTOTYPES
**********************/
static void lv_slider_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_slider_event(lv_event_t * e);
static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void position_knob(lv_obj_t * obj, lv_area_t * knob_area, lv_coord_t knob_size, bool hor);
static void draw_knob(lv_event_t * e);
@ -90,8 +90,10 @@ static void lv_slider_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj
lv_obj_set_height(obj, LV_DPX(10));
}
static void lv_slider_event(lv_event_t * e)
static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -34,7 +34,7 @@
* STATIC PROTOTYPES
**********************/
static void lv_switch_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_switch_event(lv_event_t * e);
static void lv_switch_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_main(lv_event_t * e);
/**********************
@ -80,8 +80,10 @@ static void lv_switch_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj
}
static void lv_switch_event(lv_event_t * e)
static void lv_switch_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -31,7 +31,7 @@
**********************/
static void lv_table_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_table_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_table_event(lv_event_t * e);
static void lv_table_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_main(lv_event_t * e);
static lv_coord_t get_row_height(lv_obj_t * obj, uint16_t row_id, const lv_font_t * font,
lv_coord_t letter_space, lv_coord_t line_space,
@ -459,8 +459,10 @@ static void lv_table_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
if(table->row_h) lv_mem_free(table->row_h);
}
static void lv_table_event(lv_event_t * e)
static void lv_table_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/

View File

@ -44,7 +44,7 @@
**********************/
static void lv_textarea_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_textarea_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_textarea_event(lv_event_t * e);
static void lv_textarea_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void cursor_blink_anim_cb(void * obj, int32_t show);
static void pwd_char_hider_anim(void * obj, int32_t x);
static void pwd_char_hider_anim_ready(lv_anim_t * a);
@ -831,8 +831,10 @@ static void lv_textarea_destructor(const lv_obj_class_t * class_p, lv_obj_t * ob
}
}
static void lv_textarea_event(lv_event_t * e)
static void lv_textarea_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
lv_res_t res;
/*Call the ancestor's event handler*/
res = lv_obj_event_base(MY_CLASS, e);