forked from enlightenment/efl
Eolian: Integration of Evas Clickable Interface
This commit is contained in:
parent
0a6cce196c
commit
7c9ce7dcf1
|
@ -35,7 +35,9 @@ BUILT_SOURCES += \
|
|||
lib/evas/canvas/evas_out.eo.c \
|
||||
lib/evas/canvas/evas_out.eo.h \
|
||||
lib/evas/canvas/evas_draggable_interface.eo.c \
|
||||
lib/evas/canvas/evas_draggable_interface.eo.h
|
||||
lib/evas/canvas/evas_draggable_interface.eo.h \
|
||||
lib/evas/canvas/evas_clickable_interface.eo.c \
|
||||
lib/evas/canvas/evas_clickable_interface.eo.h
|
||||
|
||||
evaseolianfilesdir = $(datadir)/eolian/include/evas-@VMAJ@
|
||||
evaseolianfiles_DATA = \
|
||||
|
@ -55,7 +57,8 @@ evaseolianfiles_DATA = \
|
|||
lib/evas/canvas/evas_grid.eo \
|
||||
lib/evas/canvas/evas_image.eo \
|
||||
lib/evas/canvas/evas_out.eo \
|
||||
lib/evas/canvas/evas_draggable_interface.eo
|
||||
lib/evas/canvas/evas_draggable_interface.eo \
|
||||
lib/evas/canvas/evas_clickable_interface.eo
|
||||
|
||||
EXTRA_DIST += \
|
||||
${evaseolianfiles_DATA}
|
||||
|
@ -90,7 +93,8 @@ nodist_installed_evascanvasheaders_DATA = \
|
|||
lib/evas/canvas/evas_grid.eo.h \
|
||||
lib/evas/canvas/evas_image.eo.h \
|
||||
lib/evas/canvas/evas_out.eo.h \
|
||||
lib/evas/canvas/evas_draggable_interface.eo.h
|
||||
lib/evas/canvas/evas_draggable_interface.eo.h \
|
||||
lib/evas/canvas/evas_clickable_interface.eo.h
|
||||
|
||||
noinst_HEADERS = \
|
||||
lib/evas/include/evas_inline.x \
|
||||
|
|
|
@ -74,13 +74,13 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST;
|
|||
#define EVAS_CANVAS_EVENT_RENDER_PRE (&(_EVAS_CANVAS_EVENT_RENDER_PRE))
|
||||
#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST))
|
||||
|
||||
EAPI extern const Eo_Event_Description _CLICKED_EVENT;
|
||||
EAPI extern const Eo_Event_Description _CLICKED_DOUBLE_EVENT;
|
||||
EAPI extern const Eo_Event_Description _CLICKED_TRIPLE_EVENT;
|
||||
EAPI extern const Eo_Event_Description _PRESSED_EVENT;
|
||||
EAPI extern const Eo_Event_Description _UNPRESSED_EVENT;
|
||||
EAPI extern const Eo_Event_Description _LONGPRESSED_EVENT;
|
||||
EAPI extern const Eo_Event_Description _REPEATED_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _CLICKED_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _CLICKED_DOUBLE_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _CLICKED_TRIPLE_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _PRESSED_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _UNPRESSED_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _LONGPRESSED_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _REPEATED_EVENT;
|
||||
EAPI extern const Eo_Event_Description _SCROLL_EVENT;
|
||||
EAPI extern const Eo_Event_Description _SCROLL_ANIM_START_EVENT;
|
||||
EAPI extern const Eo_Event_Description _SCROLL_ANIM_STOP_EVENT;
|
||||
|
@ -106,13 +106,13 @@ EAPI extern const Eo_Event_Description _SELECTION_CLEARED_EVENT;
|
|||
//EAPI extern const Eo_Event_Description _DRAG_START_RIGHT_EVENT;
|
||||
//EAPI extern const Eo_Event_Description _DRAG_START_LEFT_EVENT;
|
||||
|
||||
#define EVAS_SMART_CLICKED_EVENT (&(_CLICKED_EVENT))
|
||||
#define EVAS_SMART_CLICKED_DOUBLE_EVENT (&(_CLICKED_DOUBLE_EVENT))
|
||||
#define EVAS_SMART_CLICKED_TRIPLE_EVENT (&(_CLICKED_TRIPLE_EVENT))
|
||||
#define EVAS_SMART_PRESSED_EVENT (&(_PRESSED_EVENT))
|
||||
#define EVAS_SMART_UNPRESSED_EVENT (&(_UNPRESSED_EVENT))
|
||||
#define EVAS_SMART_LONGPRESSED_EVENT (&(_LONGPRESSED_EVENT))
|
||||
#define EVAS_SMART_REPEATED_EVENT (&(_REPEATED_EVENT))
|
||||
//#define EVAS_SMART_CLICKED_EVENT (&(_CLICKED_EVENT))
|
||||
//#define EVAS_SMART_CLICKED_DOUBLE_EVENT (&(_CLICKED_DOUBLE_EVENT))
|
||||
//#define EVAS_SMART_CLICKED_TRIPLE_EVENT (&(_CLICKED_TRIPLE_EVENT))
|
||||
//#define EVAS_SMART_PRESSED_EVENT (&(_PRESSED_EVENT))
|
||||
//#define EVAS_SMART_UNPRESSED_EVENT (&(_UNPRESSED_EVENT))
|
||||
//#define EVAS_SMART_LONGPRESSED_EVENT (&(_LONGPRESSED_EVENT))
|
||||
//#define EVAS_SMART_REPEATED_EVENT (&(_REPEATED_EVENT))
|
||||
#define EVAS_SMART_SCROLL_EVENT (&(_SCROLL_EVENT))
|
||||
#define EVAS_SMART_SCROLL_ANIM_START_EVENT (&(_SCROLL_ANIM_START_EVENT))
|
||||
#define EVAS_SMART_SCROLL_ANIM_STOP_EVENT (&(_SCROLL_ANIM_STOP_EVENT))
|
||||
|
@ -140,14 +140,14 @@ EAPI extern const Eo_Event_Description _SELECTION_CLEARED_EVENT;
|
|||
|
||||
|
||||
//const Eo_Class *evas_smart_signal_interface_get(void) EINA_CONST;
|
||||
const Eo_Class *evas_smart_clickable_interface_get(void) EINA_CONST;
|
||||
//const Eo_Class *evas_smart_clickable_interface_get(void) EINA_CONST;
|
||||
const Eo_Class *evas_smart_scrollable_interface_get(void) EINA_CONST;
|
||||
const Eo_Class *evas_smart_zoomable_interface_get(void) EINA_CONST;
|
||||
const Eo_Class *evas_smart_selectable_interface_get(void) EINA_CONST;
|
||||
//const Eo_Class *evas_smart_draggable_interface_get(void) EINA_CONST;
|
||||
|
||||
//#define EVAS_SMART_SIGNAL_INTERFACE evas_smart_signal_interface_get()
|
||||
#define EVAS_SMART_CLICKABLE_INTERFACE evas_smart_clickable_interface_get()
|
||||
//#define EVAS_SMART_CLICKABLE_INTERFACE evas_smart_clickable_interface_get()
|
||||
#define EVAS_SMART_SCROLLABLE_INTERFACE evas_smart_scrollable_interface_get()
|
||||
#define EVAS_SMART_ZOOMABLE_INTERFACE evas_smart_zoomable_interface_get()
|
||||
#define EVAS_SMART_SELECTABLE_INTERFACE evas_smart_selectable_interface_get()
|
||||
|
@ -155,6 +155,7 @@ const Eo_Class *evas_smart_selectable_interface_get(void) EINA_CONST;
|
|||
|
||||
#include "canvas/evas_signal_interface.eo.h"
|
||||
#include "canvas/evas_draggable_interface.eo.h"
|
||||
#include "canvas/evas_clickable_interface.eo.h"
|
||||
|
||||
#include "canvas/evas.eo.h"
|
||||
#define EVAS_CLASS EVAS_CANVAS_CLASS
|
||||
|
|
|
@ -5,27 +5,6 @@
|
|||
|
||||
Eina_Hash* signals_hash_table = NULL;
|
||||
|
||||
EAPI const Eo_Event_Description _CLICKED_EVENT =
|
||||
EO_EVENT_DESCRIPTION("clicked", "");
|
||||
|
||||
EAPI const Eo_Event_Description _CLICKED_DOUBLE_EVENT =
|
||||
EO_EVENT_DESCRIPTION("clicked,double", "");
|
||||
|
||||
EAPI const Eo_Event_Description _CLICKED_TRIPLE_EVENT =
|
||||
EO_EVENT_DESCRIPTION("clicked,triple", "");
|
||||
|
||||
EAPI const Eo_Event_Description _PRESSED_EVENT =
|
||||
EO_EVENT_DESCRIPTION("pressed", "");
|
||||
|
||||
EAPI const Eo_Event_Description _UNPRESSED_EVENT =
|
||||
EO_EVENT_DESCRIPTION("unpressed", "");
|
||||
|
||||
EAPI const Eo_Event_Description _LONGPRESSED_EVENT =
|
||||
EO_EVENT_DESCRIPTION("longpressed", "");
|
||||
|
||||
EAPI const Eo_Event_Description _REPEATED_EVENT =
|
||||
EO_EVENT_DESCRIPTION("repeated", "");
|
||||
|
||||
EAPI const Eo_Event_Description _SCROLL_EVENT =
|
||||
EO_EVENT_DESCRIPTION("scroll", "");
|
||||
|
||||
|
@ -74,16 +53,6 @@ EAPI const Eo_Event_Description _SELECTION_CHANGED_EVENT =
|
|||
EAPI const Eo_Event_Description _SELECTION_CLEARED_EVENT =
|
||||
EO_EVENT_DESCRIPTION("selection,cleared", "");
|
||||
|
||||
static const Eo_Event_Description *_clickable_events_desc[] = {
|
||||
EVAS_SMART_CLICKED_EVENT,
|
||||
EVAS_SMART_CLICKED_DOUBLE_EVENT,
|
||||
EVAS_SMART_CLICKED_TRIPLE_EVENT,
|
||||
EVAS_SMART_PRESSED_EVENT,
|
||||
EVAS_SMART_UNPRESSED_EVENT,
|
||||
EVAS_SMART_LONGPRESSED_EVENT,
|
||||
EVAS_SMART_REPEATED_EVENT,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const Eo_Event_Description *_scrollable_events_desc[] = {
|
||||
EVAS_SMART_SCROLL_EVENT,
|
||||
|
@ -113,6 +82,7 @@ static const Eo_Event_Description *_selectable_events_desc[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static const Eo_Event_Description *_evas_clickable_interface_event_desc[];
|
||||
static const Eo_Event_Description *_evas_draggable_interface_event_desc[];
|
||||
|
||||
#define ADD_SIGNAL(name, event) eina_hash_add(signals_hash_table, name, event)
|
||||
|
@ -142,7 +112,7 @@ static void
|
|||
_evas_signal_interface_class_constructor(Eo_Class *klass EINA_UNUSED)
|
||||
{
|
||||
signals_hash_table = eina_hash_string_superfast_new(_signal_interface_del);
|
||||
ADD_INTERFACE_SIGNALS(_clickable_events_desc);
|
||||
ADD_INTERFACE_SIGNALS(_evas_draggable_interface_event_desc);
|
||||
ADD_INTERFACE_SIGNALS(_scrollable_events_desc);
|
||||
ADD_INTERFACE_SIGNALS(_zoomable_events_desc);
|
||||
ADD_INTERFACE_SIGNALS(_selectable_events_desc);
|
||||
|
@ -157,19 +127,6 @@ _evas_signal_interface_class_destructor(Eo_Class *klass EINA_UNUSED)
|
|||
eina_hash_free(signals_hash_table);
|
||||
}
|
||||
|
||||
static const Eo_Class_Description clickable_interface_desc = {
|
||||
EO_VERSION,
|
||||
"Evas_Clickable_Interface",
|
||||
EO_CLASS_TYPE_INTERFACE,
|
||||
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
||||
_clickable_events_desc,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
EO_DEFINE_CLASS(evas_smart_clickable_interface_get, &clickable_interface_desc, EVAS_SIGNAL_INTERFACE_CLASS, NULL);
|
||||
|
||||
static const Eo_Class_Description scrollable_interface_desc = {
|
||||
EO_VERSION,
|
||||
"Evas_Scrollable_Interface",
|
||||
|
@ -211,3 +168,4 @@ EO_DEFINE_CLASS(evas_smart_selectable_interface_get, &selectable_interface_desc,
|
|||
|
||||
#include "canvas/evas_signal_interface.eo.c"
|
||||
#include "canvas/evas_draggable_interface.eo.c"
|
||||
#include "canvas/evas_clickable_interface.eo.c"
|
|
@ -0,0 +1,13 @@
|
|||
interface Evas_Clickable_Interface (Evas_Signal_Interface)
|
||||
{
|
||||
data: null;
|
||||
events {
|
||||
clicked;
|
||||
clicked,double;
|
||||
clicked,triple;
|
||||
pressed;
|
||||
unpressed;
|
||||
longpressed;
|
||||
repeated;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue