forked from enlightenment/efl
eo: changes made for the support of the Eo concept
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 77604
This commit is contained in:
parent
9ac7594b3a
commit
a01418aff8
|
@ -1080,4 +1080,9 @@
|
||||||
the GL calls are called within the Pixel Getter function for Direct
|
the GL calls are called within the Pixel Getter function for Direct
|
||||||
Rendering option.
|
Rendering option.
|
||||||
|
|
||||||
|
2012-10-09 Daniel Zaoui and Tom Hacohen
|
||||||
|
|
||||||
|
* Evas: change Evas to use Eo.
|
||||||
|
This change adds Eo support to Evas while keeping the old API intact.
|
||||||
|
For more information, go to Eo.
|
||||||
|
|
||||||
|
|
|
@ -266,6 +266,11 @@ PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.3.0])
|
||||||
|
|
||||||
requirement_evas="freetype2 eina >= 1.6.0 ${requirement_evas}"
|
requirement_evas="freetype2 eina >= 1.6.0 ${requirement_evas}"
|
||||||
|
|
||||||
|
# Eo
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([EO], [eo])
|
||||||
|
requirement_evas="eo ${requirement_evas}"
|
||||||
|
|
||||||
## optional dependencies
|
## optional dependencies
|
||||||
|
|
||||||
# FontConfig
|
# FontConfig
|
||||||
|
@ -1699,8 +1704,8 @@ AC_SUBST(EVAS_LIBS)
|
||||||
|
|
||||||
# General CFLAGS
|
# General CFLAGS
|
||||||
|
|
||||||
EVAS_GENERAL_CFLAGS="${EINA_CFLAGS}"
|
EVAS_GENERAL_CFLAGS="${EINA_CFLAGS} ${EO_CFLAGS}"
|
||||||
EVAS_GENERAL_LIBS="${EINA_LIBS}"
|
EVAS_GENERAL_LIBS="${EINA_LIBS} ${EO_LIBS}"
|
||||||
AC_SUBST(EVAS_GENERAL_CFLAGS)
|
AC_SUBST(EVAS_GENERAL_CFLAGS)
|
||||||
AC_SUBST(EVAS_GENERAL_LIBS)
|
AC_SUBST(EVAS_GENERAL_LIBS)
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -171,6 +171,7 @@ AM_CPPFLAGS = \
|
||||||
@EET_CFLAGS@ \
|
@EET_CFLAGS@ \
|
||||||
@FONTCONFIG_CFLAGS@ \
|
@FONTCONFIG_CFLAGS@ \
|
||||||
@pthread_cflags@ \
|
@pthread_cflags@ \
|
||||||
|
@EO_CFLAGS@ \
|
||||||
@PIXMAN_CFLAGS@
|
@PIXMAN_CFLAGS@
|
||||||
|
|
||||||
lib_LTLIBRARIES = libevas.la
|
lib_LTLIBRARIES = libevas.la
|
||||||
|
@ -209,6 +210,7 @@ engines/common/libevas_engine_common.la \
|
||||||
$(EVAS_STATIC_MODULE) \
|
$(EVAS_STATIC_MODULE) \
|
||||||
$(EVAS_STATIC_LIBADD) \
|
$(EVAS_STATIC_LIBADD) \
|
||||||
@PIXMAN_LIBS@ \
|
@PIXMAN_LIBS@ \
|
||||||
|
@EO_LIBS@ \
|
||||||
-lm
|
-lm
|
||||||
|
|
||||||
libevas_la_DEPENDENCIES = \
|
libevas_la_DEPENDENCIES = \
|
||||||
|
|
|
@ -20,8 +20,10 @@ AM_CPPFLAGS = \
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libevas_canvas.la
|
noinst_LTLIBRARIES = libevas_canvas.la
|
||||||
libevas_canvas_la_SOURCES = \
|
libevas_canvas_la_SOURCES = \
|
||||||
|
common_interfaces.c \
|
||||||
evas_callbacks.c \
|
evas_callbacks.c \
|
||||||
evas_clip.c \
|
evas_clip.c \
|
||||||
|
evas_common_interface.c \
|
||||||
evas_data.c \
|
evas_data.c \
|
||||||
evas_device.c \
|
evas_device.c \
|
||||||
evas_events.c \
|
evas_events.c \
|
||||||
|
|
|
@ -0,0 +1,271 @@
|
||||||
|
#include "evas_common.h"
|
||||||
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
#include "Eo.h"
|
||||||
|
|
||||||
|
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", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SCROLL_ANIM_START_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("scroll,anim,start", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SCROLL_ANIM_STOP_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("scroll,anim,stop", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SCROLL_DRAG_START_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("scroll,drag,start", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SCROLL_DRAG_STOP_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("scroll,drag,stop", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _ZOOM_START_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("zoom,start", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _ZOOM_STOP_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("zoom,stop", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _ZOOM_CHANGE_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("zoom,changed", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTED_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selected", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _UNSELECTED_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("unselected", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTION_PASTE_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selection,paste", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTION_COPY_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selection,copy", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTION_CUT_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selection,cut", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTION_START_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selection,start", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTION_CHANGED_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selection,changed", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _SELECTION_CLEARED_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("selection,cleared", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_START_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,start", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_STOP_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,stop", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_END_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,end", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_START_UP_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,start,up", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_START_DOWN_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,start,down", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_START_RIGHT_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,start,right", "");
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _DRAG_START_LEFT_EVENT =
|
||||||
|
EO_EVENT_DESCRIPTION("drag,start,left", "");
|
||||||
|
|
||||||
|
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,
|
||||||
|
EVAS_SMART_SCROLL_ANIM_START_EVENT,
|
||||||
|
EVAS_SMART_SCROLL_ANIM_STOP_EVENT,
|
||||||
|
EVAS_SMART_SCROLL_DRAG_START_EVENT,
|
||||||
|
EVAS_SMART_SCROLL_DRAG_STOP_EVENT,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Event_Description *_zoomable_events_desc[] = {
|
||||||
|
EVAS_SMART_ZOOM_START_EVENT,
|
||||||
|
EVAS_SMART_ZOOM_STOP_EVENT,
|
||||||
|
EVAS_SMART_ZOOM_CHANGE_EVENT,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Event_Description *_selectable_events_desc[] = {
|
||||||
|
EVAS_SMART_SELECTED_EVENT,
|
||||||
|
EVAS_SMART_UNSELECTED_EVENT,
|
||||||
|
EVAS_SMART_SELECTION_PASTE_EVENT,
|
||||||
|
EVAS_SMART_SELECTION_COPY_EVENT,
|
||||||
|
EVAS_SMART_SELECTION_CUT_EVENT,
|
||||||
|
EVAS_SMART_SELECTION_START_EVENT,
|
||||||
|
EVAS_SMART_SELECTION_CHANGED_EVENT,
|
||||||
|
EVAS_SMART_SELECTION_CLEARED_EVENT,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Event_Description *_draggable_events_desc[] = {
|
||||||
|
EVAS_SMART_DRAG_EVENT,
|
||||||
|
EVAS_SMART_DRAG_START_EVENT,
|
||||||
|
EVAS_SMART_DRAG_STOP_EVENT,
|
||||||
|
EVAS_SMART_DRAG_END_EVENT,
|
||||||
|
EVAS_SMART_DRAG_START_UP_EVENT,
|
||||||
|
EVAS_SMART_DRAG_START_DOWN_EVENT,
|
||||||
|
EVAS_SMART_DRAG_START_RIGHT_EVENT,
|
||||||
|
EVAS_SMART_DRAG_START_LEFT_EVENT,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ADD_SIGNAL(name, event) eina_hash_add(signals_hash_table, name, event)
|
||||||
|
#define ADD_INTERFACE_SIGNALS(events_desc) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
int i = 0; \
|
||||||
|
while (events_desc[i]) { \
|
||||||
|
_Evas_Event_Description *desc = calloc(1, sizeof(*desc)); \
|
||||||
|
desc->eo_desc = (Eo_Event_Description *)events_desc[i]; \
|
||||||
|
desc->is_desc_allocated = EINA_FALSE; \
|
||||||
|
ADD_SIGNAL(events_desc[i]->name, desc); \
|
||||||
|
i++; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
while (0);
|
||||||
|
|
||||||
|
static void
|
||||||
|
_signal_interface_del(void *data)
|
||||||
|
{
|
||||||
|
_Evas_Event_Description *desc = data;
|
||||||
|
if (desc->is_desc_allocated) free(desc->eo_desc);
|
||||||
|
free(desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_signal_interface_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(_scrollable_events_desc);
|
||||||
|
ADD_INTERFACE_SIGNALS(_zoomable_events_desc);
|
||||||
|
ADD_INTERFACE_SIGNALS(_selectable_events_desc);
|
||||||
|
ADD_INTERFACE_SIGNALS(_draggable_events_desc);
|
||||||
|
}
|
||||||
|
#undef ADD_INTERFACE_SIGNALS
|
||||||
|
#undef ADD_SIGNAL
|
||||||
|
|
||||||
|
static void
|
||||||
|
_signal_interface_destructor(Eo_Class *klass EINA_UNUSED)
|
||||||
|
{
|
||||||
|
eina_hash_free(signals_hash_table);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eo_Class_Description signal_interface_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Signal_Interface",
|
||||||
|
EO_CLASS_TYPE_INTERFACE,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
_signal_interface_constructor,
|
||||||
|
_signal_interface_destructor
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_smart_signal_interface_get, &signal_interface_desc, NULL, NULL);
|
||||||
|
|
||||||
|
static const Eo_Class_Description clickable_interface_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"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_SMART_SIGNAL_INTERFACE, NULL);
|
||||||
|
|
||||||
|
static const Eo_Class_Description scrollable_interface_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Scrollable_Interface",
|
||||||
|
EO_CLASS_TYPE_INTERFACE,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
||||||
|
_scrollable_events_desc,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_smart_scrollable_interface_get, &scrollable_interface_desc, EVAS_SMART_SIGNAL_INTERFACE, NULL);
|
||||||
|
|
||||||
|
static const Eo_Class_Description zoomable_interface_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Zoomable_Interface",
|
||||||
|
EO_CLASS_TYPE_INTERFACE,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
||||||
|
_zoomable_events_desc,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_smart_zoomable_interface_get, &zoomable_interface_desc, EVAS_SMART_SIGNAL_INTERFACE, NULL);
|
||||||
|
|
||||||
|
static const Eo_Class_Description selectable_interface_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Selectable_Interface",
|
||||||
|
EO_CLASS_TYPE_INTERFACE,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
||||||
|
_selectable_events_desc,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_smart_selectable_interface_get, &selectable_interface_desc, EVAS_SMART_SIGNAL_INTERFACE, NULL);
|
||||||
|
|
||||||
|
static const Eo_Class_Description draggable_interface_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Draggable_Interface",
|
||||||
|
EO_CLASS_TYPE_INTERFACE,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
|
||||||
|
_draggable_events_desc,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_smart_draggable_interface_get, &draggable_interface_desc, EVAS_SMART_SIGNAL_INTERFACE, NULL);
|
||||||
|
|
|
@ -1,16 +1,125 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
static void evas_object_event_callback_clear(Evas_Object *obj);
|
static void evas_object_event_callback_clear(Evas_Object *eo_obj);
|
||||||
static void evas_event_callback_clear(Evas *e);
|
static void evas_event_callback_clear(Evas *eo_e);
|
||||||
int _evas_event_counter = 0;
|
int _evas_event_counter = 0;
|
||||||
|
|
||||||
EVAS_MEMPOOL(_mp_fn);
|
EVAS_MEMPOOL(_mp_fn);
|
||||||
EVAS_MEMPOOL(_mp_cb);
|
EVAS_MEMPOOL(_mp_cb);
|
||||||
EVAS_MEMPOOL(_mp_pc);
|
EVAS_MEMPOOL(_mp_pc);
|
||||||
|
|
||||||
|
extern Eina_Hash* signals_hash_table;
|
||||||
|
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_IN =
|
||||||
|
EO_EVENT_DESCRIPTION("Mouse In", "Mouse In Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_OUT =
|
||||||
|
EO_EVENT_DESCRIPTION("Mouse Out", "Mouse Out Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_DOWN =
|
||||||
|
EO_EVENT_DESCRIPTION("Mouse Down", "Mouse Button Down Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_UP =
|
||||||
|
EO_EVENT_DESCRIPTION("Mouse Up", "Mouse Button Up Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_MOVE =
|
||||||
|
EO_EVENT_DESCRIPTION("Mouse Move", "Mouse Move Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_WHEEL =
|
||||||
|
EO_EVENT_DESCRIPTION("Mouse Wheel", "Mouse Wheel Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MULTI_DOWN =
|
||||||
|
EO_EVENT_DESCRIPTION("Multi Down", "Mouse-touch Down Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MULTI_UP =
|
||||||
|
EO_EVENT_DESCRIPTION("Multi Up", "Mouse-touch Up Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MULTI_MOVE =
|
||||||
|
EO_EVENT_DESCRIPTION("Multi Move", "Multi-touch Move Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_FREE =
|
||||||
|
EO_EVENT_DESCRIPTION("Free", "Object Being Freed (Called after Del)");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_KEY_DOWN =
|
||||||
|
EO_EVENT_DESCRIPTION("Key Down", "Key Press Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_KEY_UP =
|
||||||
|
EO_EVENT_DESCRIPTION("Key Up", "Key Release Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_FOCUS_IN =
|
||||||
|
EO_EVENT_DESCRIPTION("Focus In", "Focus In Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_FOCUS_OUT =
|
||||||
|
EO_EVENT_DESCRIPTION("Focus Out", "Focus Out Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_SHOW =
|
||||||
|
EO_EVENT_DESCRIPTION("Show", "Show Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_HIDE =
|
||||||
|
EO_EVENT_DESCRIPTION("Hide", "Hide Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_MOVE =
|
||||||
|
EO_EVENT_DESCRIPTION("Move", "Move Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_RESIZE =
|
||||||
|
EO_EVENT_DESCRIPTION("Resize", "Resize Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_RESTACK =
|
||||||
|
EO_EVENT_DESCRIPTION("Restack", "Restack Event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_DEL =
|
||||||
|
EO_EVENT_DESCRIPTION("Del", "Object Being Deleted (called before Free)");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_HOLD =
|
||||||
|
EO_EVENT_DESCRIPTION("Hold", "Events go on/off hold");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_CHANGED_SIZE_HINTS =
|
||||||
|
EO_EVENT_DESCRIPTION("Changed Size Hints", "Size hints changed event");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_IMAGE_PRELOADED =
|
||||||
|
EO_EVENT_DESCRIPTION("Image Preloaded", "Image has been preloaded");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_IMAGE_RESIZE=
|
||||||
|
EO_EVENT_DESCRIPTION("Image Resize", "Image resize");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_FOCUS_IN =
|
||||||
|
EO_EVENT_DESCRIPTION("Canvas Focus In", "Canvas got focus as a whole");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_FOCUS_OUT =
|
||||||
|
EO_EVENT_DESCRIPTION("Canvas Focus Out", "Canvas lost focus as a whole");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_FLUSH_PRE =
|
||||||
|
EO_EVENT_DESCRIPTION("Render Flush Pre", "Called just before rendering is updated on the canvas target");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_FLUSH_POST =
|
||||||
|
EO_EVENT_DESCRIPTION("Render Flush Post", "Called just after rendering is updated on the canvas target");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN =
|
||||||
|
EO_EVENT_DESCRIPTION("Canvas Object Focus In", "Canvas object got focus");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT =
|
||||||
|
EO_EVENT_DESCRIPTION("Canvas Object Focus Out", "Canvas object lost focus");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_IMAGE_UNLOADED =
|
||||||
|
EO_EVENT_DESCRIPTION("Image Unloaded", "Image data has been unloaded (by some mechanism in Evas that throw out original image data)");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_PRE =
|
||||||
|
EO_EVENT_DESCRIPTION("Render Pre", "Called just before rendering starts on the canvas target @since 1.2");
|
||||||
|
EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_POST =
|
||||||
|
EO_EVENT_DESCRIPTION("Render Post", "Called just after rendering stops on the canvas target @since 1.2");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Evas events descriptions for Eo.
|
||||||
|
*/
|
||||||
|
static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAST] =
|
||||||
|
{
|
||||||
|
EVAS_EVENT_MOUSE_IN,
|
||||||
|
EVAS_EVENT_MOUSE_OUT,
|
||||||
|
EVAS_EVENT_MOUSE_DOWN,
|
||||||
|
EVAS_EVENT_MOUSE_UP,
|
||||||
|
EVAS_EVENT_MOUSE_MOVE,
|
||||||
|
EVAS_EVENT_MOUSE_WHEEL,
|
||||||
|
EVAS_EVENT_MULTI_DOWN,
|
||||||
|
EVAS_EVENT_MULTI_UP,
|
||||||
|
EVAS_EVENT_MULTI_MOVE,
|
||||||
|
EVAS_EVENT_FREE,
|
||||||
|
EVAS_EVENT_KEY_DOWN,
|
||||||
|
EVAS_EVENT_KEY_UP,
|
||||||
|
EVAS_EVENT_FOCUS_IN,
|
||||||
|
EVAS_EVENT_FOCUS_OUT,
|
||||||
|
EVAS_EVENT_SHOW,
|
||||||
|
EVAS_EVENT_HIDE,
|
||||||
|
EVAS_EVENT_MOVE,
|
||||||
|
EVAS_EVENT_RESIZE,
|
||||||
|
EVAS_EVENT_RESTACK,
|
||||||
|
EVAS_EVENT_DEL,
|
||||||
|
EVAS_EVENT_HOLD,
|
||||||
|
EVAS_EVENT_CHANGED_SIZE_HINTS,
|
||||||
|
EVAS_EVENT_IMAGE_PRELOADED,
|
||||||
|
EVAS_EVENT_IMAGE_RESIZE,
|
||||||
|
EVAS_EVENT_CANVAS_FOCUS_IN,
|
||||||
|
EVAS_EVENT_CANVAS_FOCUS_OUT,
|
||||||
|
EVAS_EVENT_RENDER_FLUSH_PRE,
|
||||||
|
EVAS_EVENT_RENDER_FLUSH_POST,
|
||||||
|
EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN,
|
||||||
|
EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT,
|
||||||
|
EVAS_EVENT_IMAGE_UNLOADED,
|
||||||
|
EVAS_EVENT_RENDER_PRE,
|
||||||
|
EVAS_EVENT_RENDER_POST
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
_evas_post_event_callback_call(Evas *e)
|
_evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e)
|
||||||
{
|
{
|
||||||
Evas_Post_Callback *pc;
|
Evas_Post_Callback *pc;
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
|
@ -21,7 +130,7 @@ _evas_post_event_callback_call(Evas *e)
|
||||||
{
|
{
|
||||||
if ((!skip) && (!e->delete_me) && (!pc->delete_me))
|
if ((!skip) && (!e->delete_me) && (!pc->delete_me))
|
||||||
{
|
{
|
||||||
if (!pc->func((void*)pc->data, e)) skip = 1;
|
if (!pc->func((void*)pc->data, eo_e)) skip = 1;
|
||||||
}
|
}
|
||||||
EVAS_MEMPOOL_FREE(_mp_pc, pc);
|
EVAS_MEMPOOL_FREE(_mp_pc, pc);
|
||||||
}
|
}
|
||||||
|
@ -29,8 +138,9 @@ _evas_post_event_callback_call(Evas *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_evas_post_event_callback_free(Evas *e)
|
_evas_post_event_callback_free(Evas *eo_e)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Post_Callback *pc;
|
Evas_Post_Callback *pc;
|
||||||
|
|
||||||
EINA_LIST_FREE(e->post_events, pc)
|
EINA_LIST_FREE(e->post_events, pc)
|
||||||
|
@ -60,8 +170,9 @@ evas_event_callback_list_post_free(Eina_Inlist **list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_event_callback_clear(Evas_Object *obj)
|
evas_object_event_callback_clear(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!obj->callbacks) return;
|
if (!obj->callbacks) return;
|
||||||
if (!obj->callbacks->deletions_waiting) return;
|
if (!obj->callbacks->deletions_waiting) return;
|
||||||
obj->callbacks->deletions_waiting = 0;
|
obj->callbacks->deletions_waiting = 0;
|
||||||
|
@ -74,8 +185,9 @@ evas_object_event_callback_clear(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_event_callback_clear(Evas *e)
|
evas_event_callback_clear(Evas *eo_e)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
if (!e->callbacks) return;
|
if (!e->callbacks) return;
|
||||||
if (!e->callbacks->deletions_waiting) return;
|
if (!e->callbacks->deletions_waiting) return;
|
||||||
e->callbacks->deletions_waiting = 0;
|
e->callbacks->deletions_waiting = 0;
|
||||||
|
@ -88,9 +200,10 @@ evas_event_callback_clear(Evas *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_event_callback_all_del(Evas_Object *obj)
|
evas_object_event_callback_all_del(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if (!obj->callbacks) return;
|
if (!obj->callbacks) return;
|
||||||
EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
|
EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
|
||||||
|
@ -98,9 +211,10 @@ evas_object_event_callback_all_del(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_event_callback_cleanup(Evas_Object *obj)
|
evas_object_event_callback_cleanup(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!obj->callbacks) return;
|
if (!obj->callbacks) return;
|
||||||
evas_event_callback_list_post_free(&obj->callbacks->callbacks);
|
evas_event_callback_list_post_free(&obj->callbacks->callbacks);
|
||||||
EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks);
|
EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks);
|
||||||
|
@ -108,8 +222,9 @@ evas_object_event_callback_cleanup(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_event_callback_all_del(Evas *e)
|
evas_event_callback_all_del(Evas *eo_e)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
if (!e->callbacks) return;
|
if (!e->callbacks) return;
|
||||||
|
@ -118,8 +233,9 @@ evas_event_callback_all_del(Evas *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_event_callback_cleanup(Evas *e)
|
evas_event_callback_cleanup(Evas *eo_e)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
if (!e->callbacks) return;
|
if (!e->callbacks) return;
|
||||||
evas_event_callback_list_post_free(&e->callbacks->callbacks);
|
evas_event_callback_list_post_free(&e->callbacks->callbacks);
|
||||||
|
@ -128,8 +244,9 @@ evas_event_callback_cleanup(Evas *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
|
evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Eina_Inlist **l_mod = NULL, *l;
|
Eina_Inlist **l_mod = NULL, *l;
|
||||||
|
|
||||||
_evas_walk(e);
|
_evas_walk(e);
|
||||||
|
@ -146,14 +263,14 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
|
||||||
{
|
{
|
||||||
Evas_Event_Cb func = fn->func;
|
Evas_Event_Cb func = fn->func;
|
||||||
if (func)
|
if (func)
|
||||||
func(fn->data, e, event_info);
|
func(fn->data, eo_e, event_info);
|
||||||
}
|
}
|
||||||
if (e->delete_me) break;
|
if (e->delete_me) break;
|
||||||
}
|
}
|
||||||
e->callbacks->walking_list--;
|
e->callbacks->walking_list--;
|
||||||
if (!e->callbacks->walking_list)
|
if (!e->callbacks->walking_list)
|
||||||
{
|
{
|
||||||
evas_event_callback_clear(e);
|
evas_event_callback_clear(eo_e);
|
||||||
l_mod = NULL;
|
l_mod = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,12 +278,12 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id)
|
evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Callback_Type type, void *event_info, int event_id)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Eina_Inlist **l_mod = NULL, *l;
|
Eina_Inlist **l_mod = NULL, *l;
|
||||||
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
|
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
|
||||||
Evas *e;
|
Evas_Public_Data *e;
|
||||||
|
|
||||||
if ((obj->delete_me) || (!obj->layer)) return;
|
if ((obj->delete_me) || (!obj->layer)) return;
|
||||||
if ((obj->last_event == event_id) &&
|
if ((obj->last_event == event_id) &&
|
||||||
|
@ -229,17 +346,21 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
|
||||||
{
|
{
|
||||||
Evas_Object_Event_Cb func = fn->func;
|
Evas_Object_Event_Cb func = fn->func;
|
||||||
if (func)
|
if (func)
|
||||||
func(fn->data, obj->layer->evas, obj, event_info);
|
func(fn->data, obj->layer->evas->evas, eo_obj, event_info);
|
||||||
}
|
}
|
||||||
if (obj->delete_me) break;
|
if (obj->delete_me) break;
|
||||||
}
|
}
|
||||||
obj->callbacks->walking_list--;
|
obj->callbacks->walking_list--;
|
||||||
if (!obj->callbacks->walking_list)
|
if (!obj->callbacks->walking_list)
|
||||||
{
|
{
|
||||||
evas_object_event_callback_clear(obj);
|
evas_object_event_callback_clear(eo_obj);
|
||||||
l_mod = NULL;
|
l_mod = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Eo_Event_Description *event_desc = eina_hash_find(signals_hash_table, _legacy_evas_callback_table[type]->name);
|
||||||
|
if (event_desc)
|
||||||
|
eo_do(eo_obj, eo_event_callback_call(_legacy_evas_callback_table[type], event_info, NULL));
|
||||||
|
|
||||||
if (type == EVAS_CALLBACK_MOUSE_DOWN)
|
if (type == EVAS_CALLBACK_MOUSE_DOWN)
|
||||||
{
|
{
|
||||||
Evas_Event_Mouse_Down *ev = event_info;
|
Evas_Event_Mouse_Down *ev = event_info;
|
||||||
|
@ -258,7 +379,10 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
|
||||||
{
|
{
|
||||||
if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) &&
|
if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) &&
|
||||||
(type <= EVAS_CALLBACK_KEY_UP))
|
(type <= EVAS_CALLBACK_KEY_UP))
|
||||||
evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id);
|
{
|
||||||
|
Evas_Object_Protected_Data *smart_parent = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_event_callback_call(obj->smart.parent, smart_parent, type, event_info, event_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_evas_unwalk(e);
|
_evas_unwalk(e);
|
||||||
|
@ -277,19 +401,20 @@ _callback_priority_cmp(const void *_a, const void *_b)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
|
evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
evas_object_event_callback_priority_add(obj, type,
|
evas_object_event_callback_priority_add(eo_obj, type,
|
||||||
EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
|
EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
|
evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
@ -318,14 +443,15 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
|
evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
|
||||||
|
@ -341,7 +467,7 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O
|
||||||
fn->delete_me = 1;
|
fn->delete_me = 1;
|
||||||
obj->callbacks->deletions_waiting = 1;
|
obj->callbacks->deletions_waiting = 1;
|
||||||
if (!obj->callbacks->walking_list)
|
if (!obj->callbacks->walking_list)
|
||||||
evas_object_event_callback_clear(obj);
|
evas_object_event_callback_clear(eo_obj);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -349,14 +475,15 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
|
evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
|
||||||
|
@ -372,7 +499,7 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E
|
||||||
fn->delete_me = 1;
|
fn->delete_me = 1;
|
||||||
obj->callbacks->deletions_waiting = 1;
|
obj->callbacks->deletions_waiting = 1;
|
||||||
if (!obj->callbacks->walking_list)
|
if (!obj->callbacks->walking_list)
|
||||||
evas_object_event_callback_clear(obj);
|
evas_object_event_callback_clear(eo_obj);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -380,19 +507,20 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
|
evas_event_callback_add(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT,
|
evas_event_callback_priority_add(eo_e, type, EVAS_CALLBACK_PRIORITY_DEFAULT,
|
||||||
func, data);
|
func, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
|
evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
@ -420,12 +548,13 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
|
evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
@ -443,7 +572,7 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
|
||||||
fn->delete_me = 1;
|
fn->delete_me = 1;
|
||||||
e->callbacks->deletions_waiting = 1;
|
e->callbacks->deletions_waiting = 1;
|
||||||
if (!e->callbacks->walking_list)
|
if (!e->callbacks->walking_list)
|
||||||
evas_event_callback_clear(e);
|
evas_event_callback_clear(eo_e);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -451,14 +580,15 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
|
evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Func_Node *fn;
|
Evas_Func_Node *fn;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
|
||||||
|
@ -474,7 +604,7 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun
|
||||||
fn->delete_me = 1;
|
fn->delete_me = 1;
|
||||||
e->callbacks->deletions_waiting = 1;
|
e->callbacks->deletions_waiting = 1;
|
||||||
if (!e->callbacks->walking_list)
|
if (!e->callbacks->walking_list)
|
||||||
evas_event_callback_clear(e);
|
evas_event_callback_clear(eo_e);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -482,14 +612,15 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
|
evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Evas_Post_Callback *pc;
|
Evas_Post_Callback *pc;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
|
EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
|
||||||
pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback);
|
pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback);
|
||||||
if (!pc) return;
|
if (!pc) return;
|
||||||
|
@ -502,15 +633,16 @@ evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const voi
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
|
evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func)
|
||||||
{
|
{
|
||||||
Evas_Post_Callback *pc;
|
Evas_Post_Callback *pc;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
EINA_LIST_FOREACH(e->post_events, l, pc)
|
EINA_LIST_FOREACH(e->post_events, l, pc)
|
||||||
{
|
{
|
||||||
if (pc->func == func)
|
if (pc->func == func)
|
||||||
|
@ -522,15 +654,16 @@ evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
|
evas_post_event_callback_remove_full(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Evas_Post_Callback *pc;
|
Evas_Post_Callback *pc;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
EINA_LIST_FOREACH(e->post_events, l, pc)
|
EINA_LIST_FOREACH(e->post_events, l, pc)
|
||||||
{
|
{
|
||||||
if ((pc->func == func) && (pc->data == data))
|
if ((pc->func == func) && (pc->data == data))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_clip_dirty(Evas_Object *obj)
|
evas_object_clip_dirty(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *data;
|
Evas_Object *data;
|
||||||
|
@ -10,31 +10,42 @@ evas_object_clip_dirty(Evas_Object *obj)
|
||||||
if (obj->cur.cache.clip.dirty) return;
|
if (obj->cur.cache.clip.dirty) return;
|
||||||
|
|
||||||
obj->cur.cache.clip.dirty = 1;
|
obj->cur.cache.clip.dirty = 1;
|
||||||
|
Evas_Object_Protected_Data *clipee = NULL;
|
||||||
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
|
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
|
||||||
evas_object_clip_dirty(data);
|
{
|
||||||
|
clipee = eo_data_get(data, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_clip_dirty(data, clipee);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_recalc_clippees(Evas_Object *obj)
|
evas_object_recalc_clippees(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *data;
|
Evas_Object *data;
|
||||||
|
|
||||||
if (obj->cur.cache.clip.dirty)
|
if (obj->cur.cache.clip.dirty)
|
||||||
{
|
{
|
||||||
evas_object_clip_recalc(obj);
|
evas_object_clip_recalc(eo_obj, obj);
|
||||||
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
|
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
|
||||||
evas_object_recalc_clippees(data);
|
{
|
||||||
|
Evas_Object_Protected_Data *clipee = eo_data_get(data, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_recalc_clippees(data, clipee);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_clippers_was_visible(Evas_Object *obj)
|
evas_object_clippers_was_visible(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->prev.visible)
|
if (obj->prev.visible)
|
||||||
{
|
{
|
||||||
if (obj->prev.clipper)
|
if (obj->prev.clipper)
|
||||||
return evas_object_clippers_is_visible(obj->prev.clipper);
|
{
|
||||||
|
Evas_Object_Protected_Data *prev_clipper =
|
||||||
|
eo_data_get(obj->prev.clipper, EVAS_OBJ_CLASS);
|
||||||
|
return evas_object_clippers_is_visible(obj->prev.clipper, prev_clipper);
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -76,63 +87,71 @@ evas_object_clippers_was_visible(Evas_Object *obj)
|
||||||
|
|
||||||
#define MAP_ACROSS 1
|
#define MAP_ACROSS 1
|
||||||
static void
|
static void
|
||||||
evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force)
|
evas_object_child_map_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *map_obj, Eina_Bool force)
|
||||||
{
|
{
|
||||||
#ifdef MAP_ACROSS
|
#ifdef MAP_ACROSS
|
||||||
if ((obj->cur.map_parent != map_obj) || force)
|
if ((obj->cur.map_parent != map_obj) || force)
|
||||||
{
|
{
|
||||||
obj->cur.map_parent = map_obj;
|
obj->cur.map_parent = map_obj;
|
||||||
obj->cur.cache.clip.dirty = 1;
|
obj->cur.cache.clip.dirty = 1;
|
||||||
evas_object_clip_recalc(obj);
|
evas_object_clip_recalc(eo_obj, obj);
|
||||||
if (obj->smart.smart)
|
if (obj->is_smart)
|
||||||
{
|
{
|
||||||
Evas_Object *obj2;
|
Evas_Object_Protected_Data *obj2;
|
||||||
|
|
||||||
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
|
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
// if obj has its own map - skip it. already done
|
// if obj has its own map - skip it. already done
|
||||||
if ((obj2->cur.map) && (obj2->cur.usemap)) continue;
|
if ((obj2->cur.map) && (obj2->cur.usemap)) continue;
|
||||||
evas_object_child_map_across_mark(obj2, map_obj, force);
|
Evas_Object *eo_obj2 = obj2->object;
|
||||||
|
evas_object_child_map_across_mark(eo_obj2, obj2, map_obj, force);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (obj->clip.clipees)
|
else if (obj->clip.clipees)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *obj2;
|
Evas_Object *eo_obj2;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
|
EINA_LIST_FOREACH(obj->clip.clipees, l, eo_obj2)
|
||||||
evas_object_child_map_across_mark(obj2, map_obj, force);
|
{
|
||||||
|
Evas_Object_Protected_Data *obj2 = eo_data_get(eo_obj2, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_child_map_across_mark(eo_obj2, obj2, map_obj, force);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_clip_across_check(Evas_Object *obj)
|
evas_object_clip_across_check(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
#ifdef MAP_ACROSS
|
#ifdef MAP_ACROSS
|
||||||
if (!obj->cur.clipper) return;
|
if (!obj->cur.clipper) return;
|
||||||
if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent)
|
Evas_Object_Protected_Data *clipper = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1);
|
if (clipper->cur.map_parent != obj->cur.map_parent)
|
||||||
|
evas_object_child_map_across_mark(eo_obj, obj, obj->cur.map_parent, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_clip_across_clippees_check(Evas_Object *obj)
|
evas_object_clip_across_clippees_check(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
#ifdef MAP_ACROSS
|
#ifdef MAP_ACROSS
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *obj2;
|
Evas_Object *eo_obj2;
|
||||||
|
|
||||||
if (!obj->clip.clipees) return;
|
if (!obj->clip.clipees) return;
|
||||||
// schloooooooooooow:
|
// schloooooooooooow:
|
||||||
// evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1);
|
// evas_object_child_map_across_mark(eo_obj, obj->cur.map_parent, 1);
|
||||||
// buggy:
|
// buggy:
|
||||||
evas_object_child_map_across_mark(obj, obj->cur.map_parent, 0);
|
evas_object_child_map_across_mark(eo_obj, obj, obj->cur.map_parent, 0);
|
||||||
if (obj->cur.cache.clip.dirty)
|
if (obj->cur.cache.clip.dirty)
|
||||||
{
|
{
|
||||||
EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
|
EINA_LIST_FOREACH(obj->clip.clipees, l, eo_obj2)
|
||||||
evas_object_clip_across_clippees_check(obj2);
|
{
|
||||||
|
Evas_Object_Protected_Data *obj2 = eo_data_get(eo_obj2, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_clip_across_clippees_check(eo_obj2, obj2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -142,18 +161,22 @@ evas_object_clip_across_clippees_check(Evas_Object *obj)
|
||||||
//
|
//
|
||||||
// FIXME: flip2 test broken in elm - might be show/hide of clips
|
// FIXME: flip2 test broken in elm - might be show/hide of clips
|
||||||
void
|
void
|
||||||
evas_object_mapped_clip_across_mark(Evas_Object *obj)
|
evas_object_mapped_clip_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
#ifdef MAP_ACROSS
|
#ifdef MAP_ACROSS
|
||||||
if ((obj->cur.map) && (obj->cur.usemap))
|
if ((obj->cur.map) && (obj->cur.usemap))
|
||||||
evas_object_child_map_across_mark(obj, obj, 0);
|
evas_object_child_map_across_mark(eo_obj, obj, eo_obj, 0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
|
{
|
||||||
|
Evas_Object_Protected_Data *smart_parent_obj =
|
||||||
|
eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS);
|
||||||
evas_object_child_map_across_mark
|
evas_object_child_map_across_mark
|
||||||
(obj, obj->smart.parent->cur.map_parent, 0);
|
(eo_obj, obj, smart_parent_obj->cur.map_parent, 0);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
evas_object_child_map_across_mark(obj, NULL, 0);
|
evas_object_child_map_across_mark(eo_obj, obj, NULL, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -162,40 +185,51 @@ evas_object_mapped_clip_across_mark(Evas_Object *obj)
|
||||||
extern const char *o_rect_type;
|
extern const char *o_rect_type;
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
|
evas_object_clip_set(
|
||||||
|
Evas_Object *eo_obj,
|
||||||
|
Evas_Object *clip)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!clip)
|
eo_do(eo_obj, evas_obj_clip_set(clip));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clip_set(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
evas_object_clip_unset(obj);
|
Evas_Object *eo_clip = va_arg(*list, Evas_Object *);
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
if (!eo_clip)
|
||||||
|
{
|
||||||
|
evas_object_clip_unset(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MAGIC_CHECK(clip, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_clip, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (obj->cur.clipper == clip) return;
|
Evas_Object_Protected_Data *clip = eo_data_get(eo_clip, EVAS_OBJ_CLASS);
|
||||||
if (obj == clip)
|
if (obj->cur.clipper == eo_clip) return;
|
||||||
|
if (eo_obj == eo_clip)
|
||||||
{
|
{
|
||||||
CRIT("Setting clip %p on itself", obj);
|
CRIT("Setting clip %p on itself", eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (clip->delete_me)
|
if (clip->delete_me)
|
||||||
{
|
{
|
||||||
CRIT("Setting deleted object %p as clip obj %p", clip, obj);
|
CRIT("Setting deleted object %p as clip obj %p", eo_clip, eo_obj);
|
||||||
abort();
|
abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->delete_me)
|
if (obj->delete_me)
|
||||||
{
|
{
|
||||||
CRIT("Setting object %p as clip to deleted obj %p", clip, obj);
|
CRIT("Setting object %p as clip to deleted obj %p", eo_clip, eo_obj);
|
||||||
abort();
|
abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!obj->layer)
|
if (!obj->layer)
|
||||||
{
|
{
|
||||||
CRIT("No evas surface associated with object (%p)", obj);
|
CRIT("No evas surface associated with object (%p)", eo_obj);
|
||||||
abort();
|
abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,34 +241,34 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evas_object_intercept_call_clip_set(obj, clip)) return;
|
if (evas_object_intercept_call_clip_set(eo_obj, obj, eo_clip)) return;
|
||||||
// illegal to set anything but a rect as a clip
|
// illegal to set anything but a rect as a clip
|
||||||
if (clip->type != o_rect_type)
|
if (clip->type != o_rect_type)
|
||||||
{
|
{
|
||||||
ERR("For now a clip on other object than a rectangle is disabled");
|
ERR("For now a clip on other object than a rectangle is disabled");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->smart.smart)
|
if (obj->is_smart)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart->smart_class->clip_set)
|
eo_do(eo_obj, evas_obj_smart_clip_set(eo_clip));
|
||||||
obj->smart.smart->smart_class->clip_set(obj, clip);
|
|
||||||
}
|
}
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
{
|
{
|
||||||
/* unclip */
|
/* unclip */
|
||||||
obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj);
|
Evas_Object_Protected_Data *cur_clipper = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
if (!obj->cur.clipper->clip.clipees)
|
cur_clipper->clip.clipees = eina_list_remove(cur_clipper->clip.clipees, eo_obj);
|
||||||
|
if (!cur_clipper->clip.clipees)
|
||||||
{
|
{
|
||||||
obj->cur.clipper->cur.have_clipees = 0;
|
cur_clipper->cur.have_clipees = 0;
|
||||||
if (obj->cur.clipper->cur.visible)
|
if (cur_clipper->cur.visible)
|
||||||
evas_damage_rectangle_add(obj->cur.clipper->layer->evas,
|
evas_damage_rectangle_add(cur_clipper->layer->evas->evas,
|
||||||
obj->cur.clipper->cur.geometry.x,
|
cur_clipper->cur.geometry.x,
|
||||||
obj->cur.clipper->cur.geometry.y,
|
cur_clipper->cur.geometry.y,
|
||||||
obj->cur.clipper->cur.geometry.w,
|
cur_clipper->cur.geometry.w,
|
||||||
obj->cur.clipper->cur.geometry.h);
|
cur_clipper->cur.geometry.h);
|
||||||
}
|
}
|
||||||
evas_object_change(obj->cur.clipper);
|
evas_object_change(obj->cur.clipper, cur_clipper);
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
obj->cur.clipper = NULL;
|
obj->cur.clipper = NULL;
|
||||||
}
|
}
|
||||||
/* clip me */
|
/* clip me */
|
||||||
|
@ -243,17 +277,17 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||||
/* Basically it just went invisible */
|
/* Basically it just went invisible */
|
||||||
clip->changed = 1;
|
clip->changed = 1;
|
||||||
clip->layer->evas->changed = 1;
|
clip->layer->evas->changed = 1;
|
||||||
evas_damage_rectangle_add(clip->layer->evas,
|
evas_damage_rectangle_add(clip->layer->evas->evas,
|
||||||
clip->cur.geometry.x, clip->cur.geometry.y,
|
clip->cur.geometry.x, clip->cur.geometry.y,
|
||||||
clip->cur.geometry.w, clip->cur.geometry.h);
|
clip->cur.geometry.w, clip->cur.geometry.h);
|
||||||
}
|
}
|
||||||
obj->cur.clipper = clip;
|
obj->cur.clipper = eo_clip;
|
||||||
clip->clip.clipees = eina_list_append(clip->clip.clipees, obj);
|
clip->clip.clipees = eina_list_append(clip->clip.clipees, eo_obj);
|
||||||
if (clip->clip.clipees)
|
if (clip->clip.clipees)
|
||||||
{
|
{
|
||||||
clip->cur.have_clipees = 1;
|
clip->cur.have_clipees = 1;
|
||||||
if (clip->changed)
|
if (clip->changed)
|
||||||
evas_object_update_bounding_box(clip);
|
evas_object_update_bounding_box(eo_clip, clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If it's NOT a rectangle set the mask bits too */
|
/* If it's NOT a rectangle set the mask bits too */
|
||||||
|
@ -263,95 +297,122 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
void *engdata;
|
void *engdata;
|
||||||
obj->cur.mask = clip;
|
obj->cur.mask = eo_clip;
|
||||||
engdata = clip->func->engine_data_get(clip);
|
engdata = clip->func->engine_data_get(eo_clip);
|
||||||
/* FIXME: Images only */
|
/* FIXME: Images only */
|
||||||
clip->layer->evas->engine.func->image_mask_create(
|
clip->layer->evas->engine.func->image_mask_create(
|
||||||
clip->layer->evas->engine.data.output,
|
clip->layer->evas->engine.data.output,
|
||||||
engdata);
|
engdata);
|
||||||
}
|
}
|
||||||
evas_object_change(clip);
|
evas_object_change(eo_clip, clip);
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
evas_object_recalc_clippees(obj);
|
evas_object_recalc_clippees(eo_obj, obj);
|
||||||
if ((!obj->smart.smart) &&
|
if ((!obj->is_smart) &&
|
||||||
(!((obj->cur.map) && (obj->cur.usemap))))
|
(!((obj->cur.map) && (obj->cur.usemap))))
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1))
|
obj->layer->evas->pointer.y, 1, 1))
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
evas_object_clip_across_check(obj);
|
evas_object_clip_across_check(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_clip_get(const Evas_Object *obj)
|
evas_object_clip_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return obj->cur.clipper;
|
Evas_Object *clip = NULL;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_clip_get(&clip));
|
||||||
|
return clip;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clip_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object **clip = va_arg(*list, Evas_Object **);
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
*clip = obj->cur.clipper;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_clip_unset(Evas_Object *obj)
|
evas_object_clip_unset(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_clip_unset());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
if (!obj->cur.clipper) return;
|
if (!obj->cur.clipper) return;
|
||||||
/* unclip */
|
/* unclip */
|
||||||
if (evas_object_intercept_call_clip_unset(obj)) return;
|
if (evas_object_intercept_call_clip_unset(eo_obj)) return;
|
||||||
if (obj->smart.smart)
|
if (obj->is_smart)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart->smart_class->clip_unset)
|
eo_do(eo_obj, evas_obj_smart_clip_unset());
|
||||||
obj->smart.smart->smart_class->clip_unset(obj);
|
|
||||||
}
|
}
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
{
|
{
|
||||||
obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj);
|
Evas_Object_Protected_Data *cur_clipper = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
if (!obj->cur.clipper->clip.clipees)
|
cur_clipper->clip.clipees = eina_list_remove(cur_clipper->clip.clipees, eo_obj);
|
||||||
|
if (!cur_clipper->clip.clipees)
|
||||||
{
|
{
|
||||||
obj->cur.clipper->cur.have_clipees = 0;
|
cur_clipper->cur.have_clipees = 0;
|
||||||
if (obj->cur.clipper->cur.visible)
|
if (cur_clipper->cur.visible)
|
||||||
evas_damage_rectangle_add(obj->cur.clipper->layer->evas,
|
evas_damage_rectangle_add(cur_clipper->layer->evas->evas,
|
||||||
obj->cur.clipper->cur.geometry.x,
|
cur_clipper->cur.geometry.x,
|
||||||
obj->cur.clipper->cur.geometry.y,
|
cur_clipper->cur.geometry.y,
|
||||||
obj->cur.clipper->cur.geometry.w,
|
cur_clipper->cur.geometry.w,
|
||||||
obj->cur.clipper->cur.geometry.h);
|
cur_clipper->cur.geometry.h);
|
||||||
}
|
}
|
||||||
evas_object_change(obj->cur.clipper);
|
evas_object_change(obj->cur.clipper, cur_clipper);
|
||||||
}
|
}
|
||||||
obj->cur.clipper = NULL;
|
obj->cur.clipper = NULL;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
evas_object_recalc_clippees(obj);
|
evas_object_recalc_clippees(eo_obj, obj);
|
||||||
if ((!obj->smart.smart) &&
|
if ((!obj->is_smart) &&
|
||||||
(!((obj->cur.map) && (obj->cur.usemap))))
|
(!((obj->cur.map) && (obj->cur.usemap))))
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1))
|
obj->layer->evas->pointer.y, 1, 1))
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
evas_object_clip_across_check(obj);
|
evas_object_clip_across_check(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const Eina_List *
|
EAPI const Eina_List *
|
||||||
evas_object_clipees_get(const Evas_Object *obj)
|
evas_object_clipees_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return obj->clip.clipees;
|
const Eina_List *clipees = NULL;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_clipees_get(&clipees));
|
||||||
|
return clipees;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_clipees_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Eina_List **clipees = va_arg(*list, const Eina_List **);
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
*clipees = obj->clip.clipees;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include "evas_common.h"
|
||||||
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
#include "Eo.h"
|
||||||
|
|
||||||
|
EAPI Eo_Op EVAS_COMMON_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION(EVAS_COMMON_SUB_ID_EVAS_GET, "Return the evas parent attached to the object"),
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Common_Interface",
|
||||||
|
EO_CLASS_TYPE_INTERFACE,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_COMMON_BASE_ID, op_desc, EVAS_COMMON_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_common_class_get, &class_desc, NULL, NULL)
|
|
@ -5,68 +5,30 @@
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
|
evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
|
||||||
{
|
{
|
||||||
Evas_Data_Node *node;
|
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!key) return;
|
eo_do(obj, eo_base_data_set(key, data, NULL));
|
||||||
|
|
||||||
evas_object_data_del(obj, key);
|
|
||||||
if (!data) return;
|
|
||||||
node = malloc(sizeof(Evas_Data_Node) + strlen(key) + 1);
|
|
||||||
node->key = (char *)node + sizeof(Evas_Data_Node);
|
|
||||||
strcpy(node->key, key);
|
|
||||||
node->data = (void *)data;
|
|
||||||
obj->data.elements = eina_list_prepend(obj->data.elements, node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_data_get(const Evas_Object *obj, const char *key)
|
evas_object_data_get(const Evas_Object *obj, const char *key)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
|
||||||
Evas_Data_Node *node;
|
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!key) return NULL;
|
void *data = NULL;
|
||||||
|
eo_do((Evas_Object *)obj, eo_base_data_get(key, &data));
|
||||||
EINA_LIST_FOREACH(obj->data.elements, l, node)
|
return data;
|
||||||
{
|
|
||||||
if (!strcmp(node->key, key))
|
|
||||||
{
|
|
||||||
Eina_List *lst;
|
|
||||||
lst = obj->data.elements;
|
|
||||||
lst = eina_list_promote_list(lst, l);
|
|
||||||
((Evas_Object *)obj)->data.elements = lst;
|
|
||||||
return node->data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_data_del(Evas_Object *obj, const char *key)
|
evas_object_data_del(Evas_Object *obj, const char *key)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
|
||||||
Evas_Data_Node *node;
|
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!key) return NULL;
|
void *data = NULL;
|
||||||
EINA_LIST_FOREACH(obj->data.elements, l, node)
|
eo_do(obj, eo_base_data_get(key, &data), eo_base_data_del(key));
|
||||||
{
|
|
||||||
if (!strcmp(node->key, key))
|
|
||||||
{
|
|
||||||
void *data;
|
|
||||||
|
|
||||||
data = node->data;
|
|
||||||
obj->data.elements = eina_list_remove_list(obj->data.elements, l);
|
|
||||||
free(node);
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
|
@ -2,20 +2,21 @@
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
EAPI Evas_Device *
|
EAPI Evas_Device *
|
||||||
evas_device_new(Evas *e)
|
evas_device_new(Evas *eo_e)
|
||||||
{
|
{
|
||||||
Evas_Device *dev;
|
Evas_Device *dev;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
dev = calloc(1, sizeof(Evas_Device));
|
dev = calloc(1, sizeof(Evas_Device));
|
||||||
if (!dev) return NULL;
|
if (!dev) return NULL;
|
||||||
dev->magic = MAGIC_DEV;
|
dev->magic = MAGIC_DEV;
|
||||||
dev->evas = e;
|
dev->evas = eo_e;
|
||||||
dev->ref = 1;
|
dev->ref = 1;
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
e->devices = eina_list_append(e->devices, dev);
|
e->devices = eina_list_append(e->devices, dev);
|
||||||
evas_event_callback_call(e, EVAS_CALLBACK_DEVICE_CHANGED, dev);
|
evas_event_callback_call(eo_e, EVAS_CALLBACK_DEVICE_CHANGED, dev);
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,14 +46,15 @@ evas_device_free(Evas_Device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_device_push(Evas *e, Evas_Device *dev)
|
evas_device_push(Evas *eo_e, Evas_Device *dev)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV);
|
MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
if (!e->cur_device)
|
if (!e->cur_device)
|
||||||
{
|
{
|
||||||
e->cur_device = eina_array_new(4);
|
e->cur_device = eina_array_new(4);
|
||||||
|
@ -63,21 +65,22 @@ evas_device_push(Evas *e, Evas_Device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_device_pop(Evas *e)
|
evas_device_pop(Evas *eo_e)
|
||||||
{
|
{
|
||||||
Evas_Device *dev;
|
Evas_Device *dev;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
dev = eina_array_pop(e->cur_device);
|
dev = eina_array_pop(e->cur_device);
|
||||||
if (dev) _evas_device_unref(dev);
|
if (dev) _evas_device_unref(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const Eina_List *
|
EAPI const Eina_List *
|
||||||
evas_device_list(Evas *e, const Evas_Device *dev)
|
evas_device_list(Evas *eo_e, const Evas_Device *dev)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (dev)
|
if (dev)
|
||||||
|
@ -87,6 +90,7 @@ evas_device_list(Evas *e, const Evas_Device *dev)
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
}
|
}
|
||||||
if (dev) return dev->children;
|
if (dev) return dev->children;
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
return e->devices;
|
return e->devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,10 +210,11 @@ evas_device_emulation_source_get(const Evas_Device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_evas_device_cleanup(Evas *e)
|
_evas_device_cleanup(Evas *eo_e)
|
||||||
{
|
{
|
||||||
Evas_Device *dev;
|
Evas_Device *dev;
|
||||||
|
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
if (e->cur_device)
|
if (e->cur_device)
|
||||||
{
|
{
|
||||||
while ((dev = eina_array_pop(e->cur_device)))
|
while ((dev = eina_array_pop(e->cur_device)))
|
||||||
|
@ -224,10 +229,11 @@ _evas_device_cleanup(Evas *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
Evas_Device *
|
Evas_Device *
|
||||||
_evas_device_top_get(const Evas *e)
|
_evas_device_top_get(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
if (!e->cur_device) return NULL;
|
if (!e->cur_device) return NULL;
|
||||||
num = eina_array_count(e->cur_device);
|
num = eina_array_count(e->cur_device);
|
||||||
if (num < 1) return NULL;
|
if (num < 1) return NULL;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,12 +8,21 @@
|
||||||
/* public calls */
|
/* public calls */
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_focus_set(Evas_Object *obj, Eina_Bool focus)
|
evas_object_focus_set(Evas_Object *eo_obj, Eina_Bool focus)
|
||||||
{
|
{
|
||||||
|
eo_do(eo_obj, evas_obj_focus_set(focus));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_focus_set(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool focus = va_arg(*list, int);
|
||||||
|
|
||||||
int event_id = 0;
|
int event_id = 0;
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
|
@ -24,31 +33,42 @@ evas_object_focus_set(Evas_Object *obj, Eina_Bool focus)
|
||||||
if (obj->layer->evas->focused)
|
if (obj->layer->evas->focused)
|
||||||
evas_object_focus_set(obj->layer->evas->focused, 0);
|
evas_object_focus_set(obj->layer->evas->focused, 0);
|
||||||
obj->focused = 1;
|
obj->focused = 1;
|
||||||
obj->layer->evas->focused = obj;
|
obj->layer->evas->focused = eo_obj;
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id);
|
||||||
evas_event_callback_call(obj->layer->evas,
|
evas_event_callback_call(obj->layer->evas->evas,
|
||||||
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj);
|
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, eo_obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!obj->focused) goto end;
|
if (!obj->focused) goto end;
|
||||||
obj->focused = 0;
|
obj->focused = 0;
|
||||||
obj->layer->evas->focused = NULL;
|
obj->layer->evas->focused = NULL;
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id);
|
||||||
evas_event_callback_call(obj->layer->evas,
|
evas_event_callback_call(obj->layer->evas->evas,
|
||||||
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj);
|
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, eo_obj);
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_focus_get(const Evas_Object *obj)
|
evas_object_focus_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return 0;
|
return 0;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return obj->focused;
|
Eina_Bool focus = 0;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_focus_get(&focus));
|
||||||
|
return focus;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_focus_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool *focus = va_arg(*list, Eina_Bool *);
|
||||||
|
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
*focus = obj->focused;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
|
@ -57,5 +77,16 @@ evas_focus_get(const Evas *e)
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return e->focused;
|
Evas_Object *ret = NULL;
|
||||||
|
eo_do((Eo *)e, evas_canvas_focus_get(&ret));
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_focus_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = e->focused;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,9 +135,10 @@ evas_font_set_get(const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_fonts_zero_free(Evas *evas)
|
evas_fonts_zero_free(Evas *eo_evas)
|
||||||
{
|
{
|
||||||
Fndat *fd;
|
Fndat *fd;
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
|
|
||||||
EINA_LIST_FREE(fonts_zero, fd)
|
EINA_LIST_FREE(fonts_zero, fd)
|
||||||
{
|
{
|
||||||
|
@ -153,9 +154,10 @@ evas_fonts_zero_free(Evas *evas)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_fonts_zero_presure(Evas *evas)
|
evas_fonts_zero_presure(Evas *eo_evas)
|
||||||
{
|
{
|
||||||
Fndat *fd;
|
Fndat *fd;
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
|
|
||||||
while (fonts_zero
|
while (fonts_zero
|
||||||
&& eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */
|
&& eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */
|
||||||
|
@ -179,10 +181,11 @@ evas_fonts_zero_presure(Evas *evas)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_font_free(Evas *evas, void *font)
|
evas_font_free(Evas *eo_evas, void *font)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Fndat *fd;
|
Fndat *fd;
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(fonts_cache, l, fd)
|
EINA_LIST_FOREACH(fonts_cache, l, fd)
|
||||||
{
|
{
|
||||||
|
@ -236,9 +239,10 @@ evas_font_init(void)
|
||||||
|
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
static Evas_Font_Set *
|
static Evas_Font_Set *
|
||||||
evas_load_fontconfig(Evas *evas, FcFontSet *set, int size,
|
evas_load_fontconfig(Evas *eo_evas, FcFontSet *set, int size,
|
||||||
Font_Rend_Flags wanted_rend)
|
Font_Rend_Flags wanted_rend)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
Evas_Font_Set *font = NULL;
|
Evas_Font_Set *font = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -494,8 +498,9 @@ evas_font_name_parse(Evas_Font_Description *fdesc, const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size)
|
evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
FcPattern *p_nm = NULL;
|
FcPattern *p_nm = NULL;
|
||||||
FcFontSet *set = NULL;
|
FcFontSet *set = NULL;
|
||||||
|
@ -545,7 +550,7 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
if (found_fd)
|
if (found_fd)
|
||||||
{
|
{
|
||||||
font = evas_load_fontconfig(evas, found_fd->set, size, wanted_rend);
|
font = evas_load_fontconfig(evas->evas, found_fd->set, size, wanted_rend);
|
||||||
goto on_find;
|
goto on_find;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -578,7 +583,7 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva
|
||||||
#ifdef HAVE_FONTCONFIG
|
#ifdef HAVE_FONTCONFIG
|
||||||
if (found_fd)
|
if (found_fd)
|
||||||
{
|
{
|
||||||
font = evas_load_fontconfig(evas, found_fd->set, size, wanted_rend);
|
font = evas_load_fontconfig(evas->evas, found_fd->set, size, wanted_rend);
|
||||||
goto on_find;
|
goto on_find;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -765,7 +770,7 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
font = evas_load_fontconfig(evas, set, size, wanted_rend);
|
font = evas_load_fontconfig(evas->evas, set, size, wanted_rend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -796,15 +801,17 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_font_load_hinting_set(Evas *evas, void *font, int hinting)
|
evas_font_load_hinting_set(Evas *eo_evas, void *font, int hinting)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
evas->engine.func->font_hinting_set(evas->engine.data.output, font,
|
evas->engine.func->font_hinting_set(evas->engine.data.output, font,
|
||||||
hinting);
|
hinting);
|
||||||
}
|
}
|
||||||
|
|
||||||
Eina_List *
|
Eina_List *
|
||||||
evas_font_dir_available_list(const Evas *evas)
|
evas_font_dir_available_list(const Evas *eo_evas)
|
||||||
{
|
{
|
||||||
|
const Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Eina_List *ll;
|
Eina_List *ll;
|
||||||
Eina_List *available = NULL;
|
Eina_List *available = NULL;
|
||||||
|
@ -1217,152 +1224,243 @@ evas_object_text_font_string_parse(char *buffer, char dest[14][256])
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_path_clear(Evas *e)
|
evas_font_path_clear(Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
while (e->font_path)
|
eo_do(eo_e, evas_canvas_font_path_clear());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_path_clear(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(e->font_path->data);
|
Evas_Public_Data *evas = _pd;
|
||||||
e->font_path = eina_list_remove(e->font_path, e->font_path->data);
|
while (evas->font_path)
|
||||||
|
{
|
||||||
|
eina_stringshare_del(evas->font_path->data);
|
||||||
|
evas->font_path = eina_list_remove(evas->font_path, evas->font_path->data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_path_append(Evas *e, const char *path)
|
evas_font_path_append(Evas *eo_e, const char *path)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_font_path_append(path));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_path_append(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *path = va_arg(*list, const char *);
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (!path) return;
|
if (!path) return;
|
||||||
e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
|
e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_path_prepend(Evas *e, const char *path)
|
evas_font_path_prepend(Evas *eo_e, const char *path)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_font_path_prepend(path));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_path_prepend(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *path = va_arg(*list, const char *);
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (!path) return;
|
if (!path) return;
|
||||||
e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
|
e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const Eina_List *
|
EAPI const Eina_List *
|
||||||
evas_font_path_list(const Evas *e)
|
evas_font_path_list(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return e->font_path;
|
const Eina_List *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_font_path_list(&ret));
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
evas_font_object_rehint(Evas_Object *obj)
|
_canvas_font_path_list(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart)
|
const Eina_List **ret = va_arg(*list, const Eina_List **);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = e->font_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
evas_font_object_rehint(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj)
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
evas_font_object_rehint(obj);
|
if (obj->is_smart)
|
||||||
|
{
|
||||||
|
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj)
|
||||||
|
evas_font_object_rehint(obj->object);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!strcmp(obj->type, "text"))
|
if (!strcmp(obj->type, "text"))
|
||||||
_evas_object_text_rehint(obj);
|
_evas_object_text_rehint(eo_obj);
|
||||||
if (!strcmp(obj->type, "textblock"))
|
if (!strcmp(obj->type, "textblock"))
|
||||||
_evas_object_textblock_rehint(obj);
|
_evas_object_textblock_rehint(eo_obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting)
|
evas_font_hinting_set(Evas *eo_e, Evas_Font_Hinting_Flags hinting)
|
||||||
{
|
{
|
||||||
Evas_Layer *lay;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_font_hinting_set(hinting));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_hinting_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Font_Hinting_Flags hinting = va_arg(*list, Evas_Font_Hinting_Flags);
|
||||||
|
Evas_Layer *lay;
|
||||||
|
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (e->hinting == hinting) return;
|
if (e->hinting == hinting) return;
|
||||||
e->hinting = hinting;
|
e->hinting = hinting;
|
||||||
|
|
||||||
EINA_INLIST_FOREACH(e->layers, lay)
|
EINA_INLIST_FOREACH(e->layers, lay)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
Evas_Object_Protected_Data *obj;
|
||||||
|
|
||||||
EINA_INLIST_FOREACH(lay->objects, obj)
|
EINA_INLIST_FOREACH(lay->objects, obj)
|
||||||
evas_font_object_rehint(obj);
|
evas_font_object_rehint(obj->object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Font_Hinting_Flags
|
EAPI Evas_Font_Hinting_Flags
|
||||||
evas_font_hinting_get(const Evas *e)
|
evas_font_hinting_get(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return EVAS_FONT_HINTING_BYTECODE;
|
return EVAS_FONT_HINTING_BYTECODE;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return e->hinting;
|
Evas_Font_Hinting_Flags ret = EVAS_FONT_HINTING_BYTECODE;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_font_hinting_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_hinting_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Font_Hinting_Flags *ret = va_arg(*list, Evas_Font_Hinting_Flags *);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = e->hinting;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting)
|
evas_font_hinting_can_hint(const Evas *eo_e, Evas_Font_Hinting_Flags hinting)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return 0;
|
return 0;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Eina_Bool ret = 0;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_font_hinting_can_hint(hinting, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_hinting_can_hint(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Font_Hinting_Flags hinting = va_arg(*list, Evas_Font_Hinting_Flags);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
if (e->engine.func->font_hinting_can_hint)
|
if (e->engine.func->font_hinting_can_hint)
|
||||||
return e->engine.func->font_hinting_can_hint(e->engine.data.output,
|
*ret = e->engine.func->font_hinting_can_hint(e->engine.data.output,
|
||||||
hinting);
|
hinting);
|
||||||
return EINA_FALSE;
|
else *ret = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_cache_flush(Evas *e)
|
evas_font_cache_flush(Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_font_cache_flush());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_cache_flush(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
e->engine.func->font_cache_flush(e->engine.data.output);
|
e->engine.func->font_cache_flush(e->engine.data.output);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_cache_set(Evas *e, int size)
|
evas_font_cache_set(Evas *eo_e, int size)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_font_cache_set(size));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_font_cache_set(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
int size = va_arg(*list, int);
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (size < 0) size = 0;
|
if (size < 0) size = 0;
|
||||||
e->engine.func->font_cache_set(e->engine.data.output, size);
|
e->engine.func->font_cache_set(e->engine.data.output, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
evas_font_cache_get(const Evas *e)
|
evas_font_cache_get(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return 0;
|
return 0;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
int ret = 0;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_font_cache_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return e->engine.func->font_cache_get(e->engine.data.output);
|
void
|
||||||
|
_canvas_font_cache_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
int *ret = va_arg(*list, int *);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = e->engine.func->font_cache_get(e->engine.data.output);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_List *
|
EAPI Eina_List *
|
||||||
evas_font_available_list(const Evas *e)
|
evas_font_available_list(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Eina_List *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_font_available_list(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return evas_font_dir_available_list(e);
|
void
|
||||||
|
_canvas_font_available_list(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_List **ret = va_arg(*list, Eina_List **);
|
||||||
|
*ret = evas_font_dir_available_list(eo_e);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_font_available_list_free(Evas *e, Eina_List *available)
|
evas_font_available_list_free(Evas *eo_e, Eina_List *available)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
struct _Evas_GL
|
struct _Evas_GL
|
||||||
{
|
{
|
||||||
DATA32 magic;
|
DATA32 magic;
|
||||||
Evas *evas;
|
Evas_Public_Data *evas;
|
||||||
|
|
||||||
Eina_List *contexts;
|
Eina_List *contexts;
|
||||||
Eina_List *surfaces;
|
Eina_List *surfaces;
|
||||||
|
@ -35,7 +35,7 @@ evas_gl_new(Evas *e)
|
||||||
if (!evas_gl) return NULL;
|
if (!evas_gl) return NULL;
|
||||||
|
|
||||||
evas_gl->magic = MAGIC_EVAS_GL;
|
evas_gl->magic = MAGIC_EVAS_GL;
|
||||||
evas_gl->evas = e;
|
evas_gl->evas = eo_data_get(e, EVAS_CLASS);
|
||||||
|
|
||||||
if (!evas_gl->evas->engine.func->gl_context_create)
|
if (!evas_gl->evas->engine.func->gl_context_create)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,21 +32,41 @@ evas_key_lock_number(const Evas_Lock *l, const char *keyname)
|
||||||
/* public calls */
|
/* public calls */
|
||||||
|
|
||||||
EAPI const Evas_Modifier *
|
EAPI const Evas_Modifier *
|
||||||
evas_key_modifier_get(const Evas *e)
|
evas_key_modifier_get(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return &(e->modifiers);
|
const Evas_Modifier *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_key_modifier_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_modifier_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Modifier **ret = va_arg(*list, const Evas_Modifier **);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = &(e->modifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const Evas_Lock *
|
EAPI const Evas_Lock *
|
||||||
evas_key_lock_get(const Evas *e)
|
evas_key_lock_get(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return &(e->locks);
|
const Evas_Lock *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_key_lock_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_lock_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Lock **ret = va_arg(*list, const Evas_Lock **);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = &(e->locks);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
|
@ -82,14 +102,23 @@ evas_key_lock_is_set(const Evas_Lock *l, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_modifier_add(Evas *e, const char *keyname)
|
evas_key_modifier_add(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_modifier_add(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_modifier_add(Eo *eo_e, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (!keyname) return;
|
if (!keyname) return;
|
||||||
if (e->modifiers.mod.count >= 64) return;
|
if (e->modifiers.mod.count >= 64) return;
|
||||||
evas_key_modifier_del(e, keyname);
|
evas_key_modifier_del(eo_e, keyname);
|
||||||
e->modifiers.mod.count++;
|
e->modifiers.mod.count++;
|
||||||
e->modifiers.mod.list = realloc(e->modifiers.mod.list, e->modifiers.mod.count * sizeof(char *));
|
e->modifiers.mod.list = realloc(e->modifiers.mod.list, e->modifiers.mod.count * sizeof(char *));
|
||||||
e->modifiers.mod.list[e->modifiers.mod.count - 1] = strdup(keyname);
|
e->modifiers.mod.list[e->modifiers.mod.count - 1] = strdup(keyname);
|
||||||
|
@ -97,13 +126,23 @@ evas_key_modifier_add(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_modifier_del(Evas *e, const char *keyname)
|
evas_key_modifier_del(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
int i;
|
if (!eo_e) return;
|
||||||
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_modifier_del(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_modifier_del(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (!keyname) return;
|
if (!keyname) return;
|
||||||
for (i = 0; i < e->modifiers.mod.count; i++)
|
for (i = 0; i < e->modifiers.mod.count; i++)
|
||||||
{
|
{
|
||||||
|
@ -122,14 +161,23 @@ evas_key_modifier_del(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_lock_add(Evas *e, const char *keyname)
|
evas_key_lock_add(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_lock_add(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_lock_add(Eo *eo_e, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
if (!keyname) return;
|
if (!keyname) return;
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (e->locks.lock.count >= 64) return;
|
if (e->locks.lock.count >= 64) return;
|
||||||
evas_key_lock_del(e, keyname);
|
evas_key_lock_del(eo_e, keyname);
|
||||||
e->locks.lock.count++;
|
e->locks.lock.count++;
|
||||||
e->locks.lock.list = realloc(e->locks.lock.list, e->locks.lock.count * sizeof(char *));
|
e->locks.lock.list = realloc(e->locks.lock.list, e->locks.lock.count * sizeof(char *));
|
||||||
e->locks.lock.list[e->locks.lock.count - 1] = strdup(keyname);
|
e->locks.lock.list[e->locks.lock.count - 1] = strdup(keyname);
|
||||||
|
@ -137,13 +185,21 @@ evas_key_lock_add(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_lock_del(Evas *e, const char *keyname)
|
evas_key_lock_del(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
int i;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_lock_del(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_lock_del(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
|
int i;
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
if (!keyname) return;
|
if (!keyname) return;
|
||||||
e->locks.mask = 0;
|
e->locks.mask = 0;
|
||||||
for (i = 0; i < e->locks.lock.count; i++)
|
for (i = 0; i < e->locks.lock.count; i++)
|
||||||
|
@ -163,14 +219,23 @@ evas_key_lock_del(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_modifier_on(Evas *e, const char *keyname)
|
evas_key_modifier_on(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_modifier_on(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_modifier_on(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
Evas_Modifier_Mask num;
|
Evas_Modifier_Mask num;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
Evas_Public_Data *e = _pd;
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname);
|
n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname);
|
||||||
if (n < 0) return;
|
if (n < 0) return;
|
||||||
num = (Evas_Modifier_Mask)n;
|
num = (Evas_Modifier_Mask)n;
|
||||||
|
@ -179,14 +244,23 @@ evas_key_modifier_on(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_modifier_off(Evas *e, const char *keyname)
|
evas_key_modifier_off(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_modifier_off(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_modifier_off(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
Evas_Modifier_Mask num;
|
Evas_Modifier_Mask num;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
Evas_Public_Data *e = _pd;
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
n = evas_key_modifier_number(&(e->modifiers), keyname);
|
n = evas_key_modifier_number(&(e->modifiers), keyname);
|
||||||
if (n < 0) return;
|
if (n < 0) return;
|
||||||
num = (Evas_Modifier_Mask)n;
|
num = (Evas_Modifier_Mask)n;
|
||||||
|
@ -195,14 +269,23 @@ evas_key_modifier_off(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_lock_on(Evas *e, const char *keyname)
|
evas_key_lock_on(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_lock_on(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_lock_on(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
Evas_Modifier_Mask num;
|
Evas_Modifier_Mask num;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
Evas_Public_Data *e = _pd;
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
n = evas_key_lock_number(&(e->locks), keyname);
|
n = evas_key_lock_number(&(e->locks), keyname);
|
||||||
if (n < 0) return;
|
if (n < 0) return;
|
||||||
num = (Evas_Modifier_Mask)n;
|
num = (Evas_Modifier_Mask)n;
|
||||||
|
@ -211,14 +294,23 @@ evas_key_lock_on(Evas *e, const char *keyname)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_key_lock_off(Evas *e, const char *keyname)
|
evas_key_lock_off(Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_key_lock_off(keyname));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_key_lock_off(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
|
||||||
Evas_Modifier_Mask num;
|
Evas_Modifier_Mask num;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
Evas_Public_Data *e = _pd;
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
n = evas_key_lock_number(&(e->locks), keyname);
|
n = evas_key_lock_number(&(e->locks), keyname);
|
||||||
if (n < 0) return;
|
if (n < 0) return;
|
||||||
num = (Evas_Modifier_Mask)n;
|
num = (Evas_Modifier_Mask)n;
|
||||||
|
@ -229,17 +321,34 @@ evas_key_lock_off(Evas *e, const char *keyname)
|
||||||
/* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */
|
/* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */
|
||||||
|
|
||||||
EAPI Evas_Modifier_Mask
|
EAPI Evas_Modifier_Mask
|
||||||
evas_key_modifier_mask_get(const Evas *e, const char *keyname)
|
evas_key_modifier_mask_get(const Evas *eo_e, const char *keyname)
|
||||||
{
|
{
|
||||||
Evas_Modifier_Mask num;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
int n;
|
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
return 0;
|
return 0;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!keyname) return 0;
|
Evas_Modifier_Mask ret = 0;
|
||||||
n = evas_key_modifier_number(&(e->modifiers), keyname);
|
eo_do((Eo *)eo_e, evas_canvas_key_modifier_mask_get(keyname, &ret));
|
||||||
if (n < 0) return 0;
|
return ret;
|
||||||
num = (Evas_Modifier_Mask)n;
|
}
|
||||||
return 1 << num;
|
|
||||||
|
void
|
||||||
|
_canvas_key_modifier_mask_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
Evas_Modifier_Mask *ret = va_arg(*list, Evas_Modifier_Mask *);
|
||||||
|
|
||||||
|
Evas_Modifier_Mask num;
|
||||||
|
int n;
|
||||||
|
*ret = 0;
|
||||||
|
|
||||||
|
if (!keyname) return;
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
n = evas_key_modifier_number(&(e->modifiers), keyname);
|
||||||
|
if (n < 0)
|
||||||
|
{
|
||||||
|
*ret = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
num = (Evas_Modifier_Mask)n;
|
||||||
|
*ret = 1 << num;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,18 +7,18 @@
|
||||||
/* Evas and then a linked lists of grabs for that key and what */
|
/* Evas and then a linked lists of grabs for that key and what */
|
||||||
/* modifiers/not_modifers they use */
|
/* modifiers/not_modifers they use */
|
||||||
|
|
||||||
static Evas_Key_Grab *evas_key_grab_new (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive);
|
static Evas_Key_Grab *evas_key_grab_new (Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive);
|
||||||
static Evas_Key_Grab *evas_key_grab_find (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive);
|
static Evas_Key_Grab *evas_key_grab_find (Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive);
|
||||||
|
|
||||||
static Evas_Key_Grab *
|
static Evas_Key_Grab *
|
||||||
evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
|
evas_key_grab_new(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Key_Grab *g;
|
Evas_Key_Grab *g;
|
||||||
|
|
||||||
g = evas_mem_calloc(sizeof(Evas_Key_Grab));
|
g = evas_mem_calloc(sizeof(Evas_Key_Grab));
|
||||||
if (!g) return NULL;
|
if (!g) return NULL;
|
||||||
g->object = obj;
|
g->object = eo_obj;
|
||||||
g->modifiers = modifiers;
|
g->modifiers = modifiers;
|
||||||
g->not_modifiers = not_modifiers;
|
g->not_modifiers = not_modifiers;
|
||||||
g->exclusive = exclusive;
|
g->exclusive = exclusive;
|
||||||
|
@ -39,12 +39,12 @@ evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modi
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g->object->grabs = eina_list_append(g->object->grabs, g);
|
obj->grabs = eina_list_append(obj->grabs, g);
|
||||||
if (eina_error_get())
|
if (eina_error_get())
|
||||||
{
|
{
|
||||||
MERR_BAD();
|
MERR_BAD();
|
||||||
evas_mem_free(sizeof(Eina_List));
|
evas_mem_free(sizeof(Eina_List));
|
||||||
g->object->grabs = eina_list_append(g->object->grabs, g);
|
obj->grabs = eina_list_append(obj->grabs, g);
|
||||||
if (eina_error_get())
|
if (eina_error_get())
|
||||||
{
|
{
|
||||||
MERR_FATAL();
|
MERR_FATAL();
|
||||||
|
@ -62,7 +62,7 @@ evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modi
|
||||||
if (eina_error_get())
|
if (eina_error_get())
|
||||||
{
|
{
|
||||||
MERR_FATAL();
|
MERR_FATAL();
|
||||||
g->object->grabs = eina_list_remove(g->object->grabs, g);
|
obj->grabs = eina_list_remove(obj->grabs, g);
|
||||||
free(g->keyname);
|
free(g->keyname);
|
||||||
free(g);
|
free(g);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -72,7 +72,7 @@ evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modi
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Key_Grab *
|
static Evas_Key_Grab *
|
||||||
evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
|
evas_key_grab_find(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
@ -84,7 +84,7 @@ evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask mod
|
||||||
(g->not_modifiers == not_modifiers) &&
|
(g->not_modifiers == not_modifiers) &&
|
||||||
(!strcmp(g->keyname, keyname)))
|
(!strcmp(g->keyname, keyname)))
|
||||||
{
|
{
|
||||||
if ((exclusive) || (obj == g->object)) return g;
|
if ((exclusive) || (eo_obj == g->object)) return g;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -93,7 +93,7 @@ evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask mod
|
||||||
/* local calls */
|
/* local calls */
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_grabs_cleanup(Evas_Object *obj)
|
evas_object_grabs_cleanup(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->layer->evas->walking_grabs)
|
if (obj->layer->evas->walking_grabs)
|
||||||
{
|
{
|
||||||
|
@ -118,14 +118,15 @@ evas_object_grabs_cleanup(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
|
evas_key_grab_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
|
||||||
{
|
{
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Key_Grab *g;
|
Evas_Key_Grab *g;
|
||||||
|
|
||||||
g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0);
|
g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers, 0);
|
||||||
if (!g) return;
|
if (!g) return;
|
||||||
g->object->grabs = eina_list_remove(g->object->grabs, g);
|
Evas_Object_Protected_Data *g_object = eo_data_get(g->object, EVAS_OBJ_CLASS);
|
||||||
|
g_object->grabs = eina_list_remove(g_object->grabs, g);
|
||||||
obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g);
|
obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g);
|
||||||
if (g->keyname) free(g->keyname);
|
if (g->keyname) free(g->keyname);
|
||||||
free(g);
|
free(g);
|
||||||
|
@ -134,46 +135,74 @@ evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask mod
|
||||||
/* public calls */
|
/* public calls */
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
|
evas_object_key_grab(Evas_Object *eo_obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
|
||||||
{
|
{
|
||||||
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return EINA_FALSE;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do(eo_obj, evas_obj_key_grab(keyname, modifiers, not_modifiers, exclusive, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_key_grab(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
Evas_Modifier_Mask modifiers = va_arg(*list, Evas_Modifier_Mask);
|
||||||
|
Evas_Modifier_Mask not_modifiers = va_arg(*list, Evas_Modifier_Mask);
|
||||||
|
Eina_Bool exclusive = va_arg(*list, int);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Key_Grab *g;
|
Evas_Key_Grab *g;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
return EINA_FALSE;
|
if (!keyname)
|
||||||
MAGIC_CHECK_END();
|
*ret = EINA_FALSE;
|
||||||
if (!keyname) return EINA_FALSE;
|
|
||||||
if (exclusive)
|
if (exclusive)
|
||||||
{
|
{
|
||||||
g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers,
|
g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers,
|
||||||
exclusive);
|
exclusive);
|
||||||
if (g) return EINA_FALSE;
|
if (g)
|
||||||
|
*ret = EINA_FALSE;
|
||||||
}
|
}
|
||||||
g = evas_key_grab_new(obj, keyname, modifiers, not_modifiers, exclusive);
|
g = evas_key_grab_new(eo_obj, obj, keyname, modifiers, not_modifiers, exclusive);
|
||||||
if (!g) return EINA_FALSE;
|
*ret = (!g) ? EINA_FALSE : EINA_TRUE;
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
|
evas_object_key_ungrab(Evas_Object *eo_obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
|
||||||
{
|
{
|
||||||
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_key_ungrab(keyname, modifiers, not_modifiers));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_key_ungrab(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *keyname = va_arg(*list, const char *);
|
||||||
|
Evas_Modifier_Mask modifiers = va_arg(*list, Evas_Modifier_Mask);
|
||||||
|
Evas_Modifier_Mask not_modifiers = va_arg(*list, Evas_Modifier_Mask);
|
||||||
|
|
||||||
/* MEM OK */
|
/* MEM OK */
|
||||||
Evas_Key_Grab *g;
|
Evas_Key_Grab *g;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
if (!keyname) return;
|
if (!keyname) return;
|
||||||
g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0);
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers, 0);
|
||||||
if (!g) return;
|
if (!g) return;
|
||||||
if (g->object->layer->evas->walking_grabs)
|
Evas_Object_Protected_Data *g_object = eo_data_get(g->object, EVAS_OBJ_CLASS);
|
||||||
|
if (g_object->layer->evas->walking_grabs)
|
||||||
{
|
{
|
||||||
if (!g->delete_me)
|
if (!g->delete_me)
|
||||||
{
|
{
|
||||||
g->object->layer->evas->delete_grabs++;
|
g_object->layer->evas->delete_grabs++;
|
||||||
g->delete_me = EINA_TRUE;
|
g->delete_me = EINA_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
evas_key_grab_free(g->object, keyname, modifiers, not_modifiers);
|
evas_key_grab_free(g->object, g_object, keyname, modifiers, not_modifiers);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
static void _evas_layer_free(Evas_Layer *lay);
|
static void _evas_layer_free(Evas_Layer *lay);
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inject(Evas_Object *obj, Evas *e)
|
evas_object_inject(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas *e)
|
||||||
{
|
{
|
||||||
Evas_Layer *lay;
|
Evas_Layer *lay;
|
||||||
|
|
||||||
|
@ -16,17 +16,17 @@ evas_object_inject(Evas_Object *obj, Evas *e)
|
||||||
lay->layer = obj->cur.layer;
|
lay->layer = obj->cur.layer;
|
||||||
evas_layer_add(lay);
|
evas_layer_add(lay);
|
||||||
}
|
}
|
||||||
lay->objects = (Evas_Object *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj));
|
lay->objects = (Evas_Object_Protected_Data *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj));
|
||||||
lay->usage++;
|
lay->usage++;
|
||||||
obj->layer = lay;
|
obj->layer = lay;
|
||||||
obj->in_layer = 1;
|
obj->in_layer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_release(Evas_Object *obj, int clean_layer)
|
evas_object_release(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, int clean_layer)
|
||||||
{
|
{
|
||||||
if (!obj->in_layer) return;
|
if (!obj->in_layer) return;
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
|
||||||
obj->layer->usage--;
|
obj->layer->usage--;
|
||||||
if (clean_layer)
|
if (clean_layer)
|
||||||
{
|
{
|
||||||
|
@ -41,8 +41,9 @@ evas_object_release(Evas_Object *obj, int clean_layer)
|
||||||
}
|
}
|
||||||
|
|
||||||
Evas_Layer *
|
Evas_Layer *
|
||||||
evas_layer_new(Evas *e)
|
evas_layer_new(Evas *eo_e)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Layer *lay;
|
Evas_Layer *lay;
|
||||||
|
|
||||||
lay = calloc(1, sizeof(Evas_Layer));
|
lay = calloc(1, sizeof(Evas_Layer));
|
||||||
|
@ -60,12 +61,12 @@ _evas_layer_free(Evas_Layer *lay)
|
||||||
void
|
void
|
||||||
evas_layer_pre_free(Evas_Layer *lay)
|
evas_layer_pre_free(Evas_Layer *lay)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
Evas_Object_Protected_Data *obj;
|
||||||
|
|
||||||
EINA_INLIST_FOREACH(lay->objects, obj)
|
EINA_INLIST_FOREACH(lay->objects, obj)
|
||||||
{
|
{
|
||||||
if ((!obj->smart.parent) && (!obj->delete_me))
|
if ((!obj->smart.parent) && (!obj->delete_me))
|
||||||
evas_object_del(obj);
|
evas_object_del(obj->object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,16 +75,17 @@ evas_layer_free_objects(Evas_Layer *lay)
|
||||||
{
|
{
|
||||||
while (lay->objects)
|
while (lay->objects)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
Evas_Object_Protected_Data *obj;
|
||||||
|
|
||||||
obj = (Evas_Object *)lay->objects;
|
obj = (Evas_Object_Protected_Data *)lay->objects;
|
||||||
evas_object_free(obj, 0);
|
evas_object_free(obj->object, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_layer_clean(Evas *e)
|
evas_layer_clean(Evas *eo_e)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Layer *tmp;
|
Evas_Layer *tmp;
|
||||||
|
|
||||||
while (e->layers)
|
while (e->layers)
|
||||||
|
@ -95,8 +97,9 @@ evas_layer_clean(Evas *e)
|
||||||
}
|
}
|
||||||
|
|
||||||
Evas_Layer *
|
Evas_Layer *
|
||||||
evas_layer_find(Evas *e, short layer_num)
|
evas_layer_find(Evas *eo_e, short layer_num)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Layer *layer;
|
Evas_Layer *layer;
|
||||||
|
|
||||||
EINA_INLIST_FOREACH(e->layers, layer)
|
EINA_INLIST_FOREACH(e->layers, layer)
|
||||||
|
@ -127,30 +130,33 @@ evas_layer_add(Evas_Layer *lay)
|
||||||
void
|
void
|
||||||
evas_layer_del(Evas_Layer *lay)
|
evas_layer_del(Evas_Layer *lay)
|
||||||
{
|
{
|
||||||
Evas *e;
|
Evas_Public_Data *e;
|
||||||
|
|
||||||
e = lay->evas;
|
e = lay->evas;
|
||||||
e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay));
|
e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_object_layer_set_child(Evas_Object *obj, Evas_Object *par, short l)
|
_evas_object_layer_set_child(Evas_Object *eo_obj, Evas_Object *par, short l)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
Evas_Object_Protected_Data *par_obj = eo_data_get(par, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if (obj->delete_me) return;
|
if (obj->delete_me) return;
|
||||||
if (obj->cur.layer == l) return;
|
if (obj->cur.layer == l) return;
|
||||||
evas_object_release(obj, 1);
|
evas_object_release(eo_obj, obj, 1);
|
||||||
obj->cur.layer = l;
|
obj->cur.layer = l;
|
||||||
obj->layer = par->layer;
|
obj->layer = par_obj->layer;
|
||||||
obj->layer->usage++;
|
obj->layer->usage++;
|
||||||
if (obj->smart.smart)
|
if (obj->is_smart)
|
||||||
{
|
{
|
||||||
Eina_Inlist *contained;
|
Eina_Inlist *contained;
|
||||||
Evas_Object *member;
|
Evas_Object_Protected_Data *member;
|
||||||
|
|
||||||
contained = (Eina_Inlist *)evas_object_smart_members_get_direct(obj);
|
contained = (Eina_Inlist *)evas_object_smart_members_get_direct(eo_obj);
|
||||||
EINA_INLIST_FOREACH(contained, member)
|
EINA_INLIST_FOREACH(contained, member)
|
||||||
{
|
{
|
||||||
_evas_object_layer_set_child(member, obj, l);
|
_evas_object_layer_set_child(member->object, eo_obj, l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,41 +164,50 @@ _evas_object_layer_set_child(Evas_Object *obj, Evas_Object *par, short l)
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_layer_set(Evas_Object *obj, short l)
|
evas_object_layer_set(Evas_Object *eo_obj, short l)
|
||||||
{
|
{
|
||||||
Evas *e;
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_layer_set(l));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_layer_set(Eo *eo_obj, void *_obj, va_list *list)
|
||||||
|
{
|
||||||
|
short l = va_arg(*list, int);
|
||||||
|
|
||||||
|
Evas *eo_e;
|
||||||
|
Evas_Object_Protected_Data *obj = _obj;
|
||||||
|
|
||||||
if (obj->delete_me) return;
|
if (obj->delete_me) return;
|
||||||
if (evas_object_intercept_call_layer_set(obj, l)) return;
|
if (evas_object_intercept_call_layer_set(eo_obj, l)) return;
|
||||||
if (obj->smart.parent) return;
|
if (obj->smart.parent) return;
|
||||||
if (obj->cur.layer == l)
|
if (obj->cur.layer == l)
|
||||||
{
|
{
|
||||||
evas_object_raise(obj);
|
evas_object_raise(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e = obj->layer->evas;
|
eo_e = obj->layer->evas->evas;
|
||||||
evas_object_release(obj, 1);
|
evas_object_release(eo_obj, obj, 1);
|
||||||
obj->cur.layer = l;
|
obj->cur.layer = l;
|
||||||
evas_object_inject(obj, e);
|
evas_object_inject(eo_obj, obj, eo_e);
|
||||||
obj->restack = 1;
|
obj->restack = 1;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
if (obj->clip.clipees)
|
if (obj->clip.clipees)
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
if (!obj->smart.smart)
|
if (!obj->is_smart)
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1) &&
|
obj->layer->evas->pointer.y, 1, 1) &&
|
||||||
obj->cur.visible)
|
obj->cur.visible)
|
||||||
if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj))
|
if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj))
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
|
@ -201,26 +216,37 @@ evas_object_layer_set(Evas_Object *obj, short l)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Eina_Inlist *contained;
|
Eina_Inlist *contained;
|
||||||
Evas_Object *member;
|
Evas_Object_Protected_Data *member;
|
||||||
|
|
||||||
contained = (Eina_Inlist *)evas_object_smart_members_get_direct(obj);
|
contained = (Eina_Inlist *)evas_object_smart_members_get_direct(eo_obj);
|
||||||
EINA_INLIST_FOREACH(contained, member)
|
EINA_INLIST_FOREACH(contained, member)
|
||||||
{
|
{
|
||||||
_evas_object_layer_set_child(member, obj, l);
|
_evas_object_layer_set_child(member->object, eo_obj, l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI short
|
EAPI short
|
||||||
evas_object_layer_get(const Evas_Object *obj)
|
evas_object_layer_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return 0;
|
return 0;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
short layer = 0;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_layer_get(&layer));
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_layer_get(Eo *eo_obj EINA_UNUSED, void *_obj, va_list *list)
|
||||||
|
{
|
||||||
|
short *layer = va_arg(*list, short *);
|
||||||
|
const Evas_Object_Protected_Data *obj = _obj;
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
{
|
{
|
||||||
return obj->smart.parent->cur.layer;
|
Evas_Object_Protected_Data *smart_parent_obj = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS);
|
||||||
|
*layer = smart_parent_obj->cur.layer;
|
||||||
}
|
}
|
||||||
return obj->cur.layer;
|
*layer = obj->cur.layer;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,39 +3,40 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_map_calc_geom_change(Evas_Object *obj)
|
_evas_map_calc_geom_change(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
int is, was = 0;
|
int is, was = 0;
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
if (!(obj->layer->evas->is_frozen))
|
||||||
{
|
{
|
||||||
evas_object_recalc_clippees(obj);
|
evas_object_recalc_clippees(eo_obj, obj);
|
||||||
if (!obj->smart.smart)
|
if (!obj->is_smart)
|
||||||
{
|
{
|
||||||
is = evas_object_is_in_output_rect(obj,
|
is = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1);
|
obj->layer->evas->pointer.y, 1, 1);
|
||||||
if ((is ^ was) && obj->cur.visible)
|
if ((is ^ was) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evas_object_inform_call_move(obj);
|
evas_object_inform_call_move(eo_obj, obj);
|
||||||
evas_object_inform_call_resize(obj);
|
evas_object_inform_call_resize(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_map_calc_map_geometry(Evas_Object *obj)
|
_evas_map_calc_map_geometry(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Coord x1, x2, yy1, yy2;
|
Evas_Coord x1, x2, yy1, yy2;
|
||||||
const Evas_Map_Point *p, *p_end;
|
const Evas_Map_Point *p, *p_end;
|
||||||
Eina_Bool ch = EINA_FALSE;
|
Eina_Bool ch = EINA_FALSE;
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!obj->cur.map) return;
|
if (!obj->cur.map) return;
|
||||||
// WARN: Do not merge below code to SLP until it is fixed.
|
// WARN: Do not merge below code to SLP until it is fixed.
|
||||||
// It has an infinite loop bug.
|
// It has an infinite loop bug.
|
||||||
|
@ -99,8 +100,8 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
|
||||||
// This shouldn't really be needed, but without it we do have case
|
// This shouldn't really be needed, but without it we do have case
|
||||||
// where the clip is wrong when a map doesn't change, so always forcing
|
// where the clip is wrong when a map doesn't change, so always forcing
|
||||||
// it, as long as someone doesn't find a better fix.
|
// it, as long as someone doesn't find a better fix.
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
if (ch) _evas_map_calc_geom_change(obj);
|
if (ch) _evas_map_calc_geom_change(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Evas_Map *
|
static inline Evas_Map *
|
||||||
|
@ -162,10 +163,11 @@ _evas_map_dup(const Evas_Map *orig)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
_evas_map_free(Evas_Object *obj, Evas_Map *m)
|
_evas_map_free(Evas_Object *eo_obj, Evas_Map *m)
|
||||||
{
|
{
|
||||||
if (obj)
|
if (eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (obj->spans)
|
if (obj->spans)
|
||||||
{
|
{
|
||||||
obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->spans);
|
obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->spans);
|
||||||
|
@ -367,13 +369,13 @@ evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_evas_object_map_parent_check(Evas_Object *parent)
|
_evas_object_map_parent_check(Evas_Object *eo_parent)
|
||||||
{
|
{
|
||||||
const Eina_Inlist *list;
|
const Eina_Inlist *list;
|
||||||
const Evas_Object *o;
|
const Evas_Object_Protected_Data *o;
|
||||||
|
|
||||||
if (!parent) return EINA_FALSE;
|
|
||||||
|
|
||||||
|
if (!eo_parent) return EINA_FALSE;
|
||||||
|
Evas_Object_Protected_Data *parent = eo_data_get(eo_parent, EVAS_OBJ_CLASS);
|
||||||
list = evas_object_smart_members_get_direct(parent->smart.parent);
|
list = evas_object_smart_members_get_direct(parent->smart.parent);
|
||||||
EINA_INLIST_FOREACH(list, o)
|
EINA_INLIST_FOREACH(list, o)
|
||||||
if (o->cur.usemap) break ;
|
if (o->cur.usemap) break ;
|
||||||
|
@ -384,12 +386,20 @@ _evas_object_map_parent_check(Evas_Object *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
|
evas_object_map_enable_set(Evas_Object *eo_obj, Eina_Bool enabled)
|
||||||
{
|
{
|
||||||
Evas_Object *parents;
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_map_enable_set(enabled));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_map_enable_set(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool enabled = va_arg(*list, int);
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
Eina_Bool pchange = EINA_FALSE;
|
Eina_Bool pchange = EINA_FALSE;
|
||||||
|
|
||||||
enabled = !!enabled;
|
enabled = !!enabled;
|
||||||
|
@ -400,7 +410,7 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
|
||||||
{
|
{
|
||||||
if (!obj->cur.map)
|
if (!obj->cur.map)
|
||||||
obj->cur.map = _evas_map_new(4);
|
obj->cur.map = _evas_map_new(4);
|
||||||
evas_object_mapped_clip_across_mark(obj);
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
||||||
// obj->cur.map->normal_geometry = obj->cur.geometry;
|
// obj->cur.map->normal_geometry = obj->cur.geometry;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -414,44 +424,67 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
|
||||||
}
|
}
|
||||||
if (obj->cur.map)
|
if (obj->cur.map)
|
||||||
{
|
{
|
||||||
_evas_map_calc_geom_change(obj);
|
_evas_map_calc_geom_change(eo_obj);
|
||||||
evas_object_mapped_clip_across_mark(obj);
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_evas_map_calc_map_geometry(obj);
|
_evas_map_calc_map_geometry(eo_obj);
|
||||||
/* This is a bit heavy handed, but it fixes the case of same geometry, but
|
/* This is a bit heavy handed, but it fixes the case of same geometry, but
|
||||||
* changed colour or UV settings. */
|
* changed colour or UV settings. */
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
if (!obj->changed_pchange) obj->changed_pchange = pchange;
|
if (!obj->changed_pchange) obj->changed_pchange = pchange;
|
||||||
obj->changed_map = EINA_TRUE;
|
obj->changed_map = EINA_TRUE;
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
for (parents = obj->smart.parent; parents; parents = parents->smart.parent)
|
Evas_Object *eo_parents;
|
||||||
|
Evas_Object_Protected_Data *parents = NULL;
|
||||||
|
for (eo_parents = obj->smart.parent; eo_parents; eo_parents = parents->smart.parent)
|
||||||
|
{
|
||||||
|
parents = eo_data_get(eo_parents, EVAS_OBJ_CLASS);
|
||||||
parents->child_has_map = EINA_TRUE;
|
parents->child_has_map = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_evas_object_map_parent_check(obj->smart.parent))
|
if (_evas_object_map_parent_check(obj->smart.parent))
|
||||||
evas_object_update_bounding_box(obj);
|
evas_object_update_bounding_box(eo_obj, obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_map_enable_get(const Evas_Object *obj)
|
evas_object_map_enable_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return obj->cur.usemap;
|
Eina_Bool enabled = EINA_FALSE;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_map_enable_get(&enabled));
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_map_enable_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool *enabled = va_arg(*list, Eina_Bool *);
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
*enabled = obj->cur.usemap;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
|
evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_map_set(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_map_set(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Map *map = va_arg(*list, const Evas_Map *);
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
|
||||||
if ((!map) || (map->count < 4))
|
if ((!map) || (map->count < 4))
|
||||||
{
|
{
|
||||||
|
@ -476,20 +509,20 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_evas_map_free(obj, obj->cur.map);
|
_evas_map_free(eo_obj, obj->cur.map);
|
||||||
obj->cur.map = NULL;
|
obj->cur.map = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!obj->prev.map)
|
if (!obj->prev.map)
|
||||||
{
|
{
|
||||||
evas_object_mapped_clip_across_mark(obj);
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!obj->cur.usemap) _evas_map_calc_geom_change(obj);
|
if (!obj->cur.usemap) _evas_map_calc_geom_change(eo_obj);
|
||||||
else _evas_map_calc_map_geometry(obj);
|
else _evas_map_calc_map_geometry(eo_obj);
|
||||||
if (obj->cur.usemap)
|
if (obj->cur.usemap)
|
||||||
evas_object_mapped_clip_across_mark(obj);
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -508,23 +541,33 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
|
||||||
_evas_map_copy(obj->cur.map, map);
|
_evas_map_copy(obj->cur.map, map);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (obj->cur.map) _evas_map_free(obj, obj->cur.map);
|
if (obj->cur.map) _evas_map_free(eo_obj, obj->cur.map);
|
||||||
obj->cur.map = _evas_map_dup(map);
|
obj->cur.map = _evas_map_dup(map);
|
||||||
if (obj->cur.usemap)
|
if (obj->cur.usemap)
|
||||||
evas_object_mapped_clip_across_mark(obj);
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
_evas_map_calc_map_geometry(obj);
|
_evas_map_calc_map_geometry(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const Evas_Map *
|
EAPI const Evas_Map *
|
||||||
evas_object_map_get(const Evas_Object *obj)
|
evas_object_map_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
const Evas_Map *map = NULL;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_map_get(&map));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
return obj->cur.map;
|
void
|
||||||
|
_map_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Map **map = va_arg(*list, const Evas_Map **);
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
|
||||||
|
*map = obj->cur.map;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Map *
|
EAPI Evas_Map *
|
||||||
|
@ -717,11 +760,12 @@ evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z)
|
evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *eo_obj, Evas_Coord z)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if (m->count != 4)
|
if (m->count != 4)
|
||||||
{
|
{
|
||||||
|
@ -733,15 +777,16 @@ evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *o
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj)
|
evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
|
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if (m->count != 4)
|
if (m->count != 4)
|
||||||
{
|
{
|
||||||
|
@ -1092,11 +1137,12 @@ evas_map_util_clockwise_get(Evas_Map *m)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_map_update(Evas_Object *obj,
|
evas_object_map_update(Evas_Object *eo_obj,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
int imagew, int imageh,
|
int imagew, int imageh,
|
||||||
int uvw, int uvh)
|
int uvw, int uvh)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
const Evas_Map_Point *p, *p_end;
|
const Evas_Map_Point *p, *p_end;
|
||||||
RGBA_Map_Point *pts, *pt;
|
RGBA_Map_Point *pts, *pt;
|
||||||
|
|
||||||
|
|
|
@ -2,31 +2,50 @@
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_name_set(Evas_Object *obj, const char *name)
|
evas_object_name_set(Evas_Object *eo_obj, const char *name)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_name_set(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_name_set(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *name = va_arg(*list, const char *);
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
if (obj->name)
|
if (obj->name)
|
||||||
{
|
{
|
||||||
eina_hash_del(obj->layer->evas->name_hash, obj->name, obj);
|
eina_hash_del(obj->layer->evas->name_hash, obj->name, eo_obj);
|
||||||
free(obj->name);
|
free(obj->name);
|
||||||
}
|
}
|
||||||
if (!name) obj->name = NULL;
|
if (!name) obj->name = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
obj->name = strdup(name);
|
obj->name = strdup(name);
|
||||||
eina_hash_add(obj->layer->evas->name_hash, obj->name, obj);
|
eina_hash_add(obj->layer->evas->name_hash, obj->name, eo_obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
evas_object_name_get(const Evas_Object *obj)
|
evas_object_name_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return obj->name;
|
const char *name = NULL;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_name_get(&name));
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_name_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char **name = va_arg(*list, const char **);
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
*name = obj->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
|
@ -35,38 +54,59 @@ evas_object_name_find(const Evas *e, const char *name)
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!name) return NULL;
|
Evas_Object *ret = NULL;
|
||||||
return (Evas_Object *)eina_hash_find(e->name_hash, name);
|
eo_do((Eo *)e, evas_canvas_object_name_find(name, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_object_name_find(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const char *name = va_arg(*list, const char *);
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
if (!name) *ret = NULL;
|
||||||
|
else *ret = (Evas_Object *)eina_hash_find(e->name_hash, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
_evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse)
|
_evas_object_name_child_find(const Evas_Object *eo_obj, const char *name, int recurse)
|
||||||
{
|
{
|
||||||
const Eina_Inlist *lst;
|
const Eina_Inlist *lst;
|
||||||
Evas_Object *child;
|
Evas_Object_Protected_Data *child;
|
||||||
|
|
||||||
if (!obj->smart.smart) return NULL;
|
if (!eo_isa(eo_obj, EVAS_OBJ_SMART_CLASS)) return NULL;
|
||||||
lst = evas_object_smart_members_get_direct(obj);
|
lst = evas_object_smart_members_get_direct(eo_obj);
|
||||||
EINA_INLIST_FOREACH(lst, child)
|
EINA_INLIST_FOREACH(lst, child)
|
||||||
{
|
{
|
||||||
if (child->delete_me) continue;
|
if (child->delete_me) continue;
|
||||||
if (!child->name) continue;
|
if (!child->name) continue;
|
||||||
if (!strcmp(name, child->name)) return child;
|
if (!strcmp(name, child->name)) return child->object;
|
||||||
if (recurse != 0)
|
if (recurse != 0)
|
||||||
{
|
{
|
||||||
if ((obj = _evas_object_name_child_find(child, name, recurse - 1)))
|
if ((eo_obj = _evas_object_name_child_find(child->object, name, recurse - 1)))
|
||||||
return (Evas_Object *)obj;
|
return (Evas_Object *)eo_obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse)
|
evas_object_name_child_find(const Evas_Object *eo_obj, const char *name, int recurse)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!name) return NULL;
|
Evas_Object *child = NULL;
|
||||||
return _evas_object_name_child_find(obj, name, recurse);
|
eo_do((Eo *)eo_obj, evas_obj_name_child_find(name, recurse, &child));
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_name_child_find(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
const char *name = va_arg(*list, const char *);
|
||||||
|
int recurse = va_arg(*list, int);
|
||||||
|
Evas_Object **child = va_arg(*list, Evas_Object **);
|
||||||
|
*child = (!name ? NULL : _evas_object_name_child_find(eo_obj, name, recurse));
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,13 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
|
#include "evas_private.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <Eo.h>
|
||||||
|
|
||||||
|
EAPI Eo_Op EVAS_OBJ_GRID_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
|
#define MY_CLASS EVAS_OBJ_GRID_CLASS
|
||||||
|
|
||||||
typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data;
|
typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data;
|
||||||
typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option;
|
typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option;
|
||||||
typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator;
|
typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator;
|
||||||
|
@ -40,7 +47,7 @@ struct _Evas_Object_Grid_Accessor
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \
|
#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \
|
||||||
Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o)
|
Evas_Object_Grid_Data *ptr = eo_data_get(o, MY_CLASS)
|
||||||
|
|
||||||
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
|
#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
|
||||||
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
|
EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
|
||||||
|
@ -131,7 +138,7 @@ _evas_object_grid_option_del(Evas_Object *o)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__)
|
_on_child_del(void *data, Evas *evas EINA_UNUSED, Evas_Object *child, void *einfo EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object *grid = data;
|
Evas_Object *grid = data;
|
||||||
evas_object_grid_unpack(grid, child);
|
evas_object_grid_unpack(grid, child);
|
||||||
|
@ -158,7 +165,14 @@ EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
|
||||||
static void
|
static void
|
||||||
_evas_object_grid_smart_add(Evas_Object *o)
|
_evas_object_grid_smart_add(Evas_Object *o)
|
||||||
{
|
{
|
||||||
EVAS_SMART_DATA_ALLOC(o, Evas_Object_Grid_Data)
|
Evas_Object_Grid_Data *priv;
|
||||||
|
|
||||||
|
priv = evas_object_smart_data_get(o);
|
||||||
|
if (!priv)
|
||||||
|
{
|
||||||
|
priv = eo_data_get(o, MY_CLASS);
|
||||||
|
evas_object_smart_data_set(o, priv);
|
||||||
|
}
|
||||||
|
|
||||||
priv->size.w = 100;
|
priv->size.w = 100;
|
||||||
priv->size.h = 100;
|
priv->size.h = 100;
|
||||||
|
@ -238,25 +252,51 @@ _evas_object_grid_smart_set_user(Evas_Smart_Class *sc)
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_grid_add(Evas *evas)
|
evas_object_grid_add(Evas *evas)
|
||||||
{
|
{
|
||||||
return evas_object_smart_add(evas, _evas_object_grid_smart_class_new());
|
Evas_Object *obj = eo_add(MY_CLASS, evas);
|
||||||
|
eo_unref(obj);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
eo_do_super(obj, eo_constructor());
|
||||||
|
eo_do(obj, evas_obj_smart_attach(_evas_object_grid_smart_class_new()));
|
||||||
|
|
||||||
|
// return evas_object_smart_add(evas, _evas_object_grid_smart_class_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_grid_add_to(Evas_Object *parent)
|
evas_object_grid_add_to(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
Evas *evas;
|
Evas_Object *o = NULL;
|
||||||
Evas_Object *o;
|
eo_do(parent, evas_obj_grid_add_to(&o));
|
||||||
|
|
||||||
evas = evas_object_evas_get(parent);
|
|
||||||
o = evas_object_grid_add(evas);
|
|
||||||
evas_object_smart_member_add(o, parent);
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_add_to(Eo *parent, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas *evas;
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
evas = evas_object_evas_get(parent);
|
||||||
|
*ret = evas_object_grid_add(evas);
|
||||||
|
evas_object_smart_member_add(*ret, parent);
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_grid_size_set(Evas_Object *o, int w, int h)
|
evas_object_grid_size_set(Evas_Object *o, int w, int h)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
|
eo_do(o, evas_obj_grid_size_set(w, h));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_size_set(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
int w = va_arg(*list, int);
|
||||||
|
int h = va_arg(*list, int);
|
||||||
|
|
||||||
if ((priv->size.w == w) && (priv->size.h == h)) return;
|
if ((priv->size.w == w) && (priv->size.h == h)) return;
|
||||||
priv->size.w = w;
|
priv->size.w = w;
|
||||||
priv->size.h = h;
|
priv->size.h = h;
|
||||||
|
@ -266,20 +306,42 @@ evas_object_grid_size_set(Evas_Object *o, int w, int h)
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_grid_size_get(const Evas_Object *o, int *w, int *h)
|
evas_object_grid_size_get(const Evas_Object *o, int *w, int *h)
|
||||||
{
|
{
|
||||||
if (w) *w = 0;
|
eo_do((Eo *)o, evas_obj_grid_size_get(w, h));
|
||||||
if (h) *h = 0;
|
}
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
|
|
||||||
|
static void
|
||||||
|
_size_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
int *w = va_arg(*list, int *);
|
||||||
|
int *h = va_arg(*list, int *);
|
||||||
if (w) *w = priv->size.w;
|
if (w) *w = priv->size.w;
|
||||||
if (h) *h = priv->size.h;
|
if (h) *h = priv->size.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h)
|
evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h)
|
||||||
|
{
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do(o, evas_obj_grid_pack(child, x, y, w, h, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_pack(Eo *o, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
Evas_Object_Grid_Option *opt;
|
Evas_Object_Grid_Option *opt;
|
||||||
Eina_Bool newobj = EINA_FALSE;
|
Eina_Bool newobj = EINA_FALSE;
|
||||||
|
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
|
||||||
|
Evas_Object *child = va_arg(*list, Evas_Object *);
|
||||||
|
int x = va_arg(*list, int);
|
||||||
|
int y = va_arg(*list, int);
|
||||||
|
int w = va_arg(*list, int);
|
||||||
|
int h = va_arg(*list, int);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
if (ret) *ret = EINA_FALSE;
|
||||||
|
|
||||||
opt = _evas_object_grid_option_get(child);
|
opt = _evas_object_grid_option_get(child);
|
||||||
if (!opt)
|
if (!opt)
|
||||||
|
@ -288,7 +350,7 @@ evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, i
|
||||||
if (!opt)
|
if (!opt)
|
||||||
{
|
{
|
||||||
ERR("could not allocate grid option data.");
|
ERR("could not allocate grid option data.");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
newobj = EINA_TRUE;
|
newobj = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -309,7 +371,7 @@ evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, i
|
||||||
}
|
}
|
||||||
// FIXME: we could keep a changed list
|
// FIXME: we could keep a changed list
|
||||||
evas_object_smart_changed(o);
|
evas_object_smart_changed(o);
|
||||||
return EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -321,37 +383,56 @@ _evas_object_grid_remove_opt(Evas_Object_Grid_Data *priv, Evas_Object_Grid_Optio
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_grid_unpack(Evas_Object *o, Evas_Object *child)
|
evas_object_grid_unpack(Evas_Object *o, Evas_Object *child)
|
||||||
|
{
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do(o, evas_obj_grid_unpack(child, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_unpack(Eo *o, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
Evas_Object_Grid_Option *opt;
|
Evas_Object_Grid_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
|
||||||
|
Evas_Object *child = va_arg(*list, Evas_Object *);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
if (ret) *ret = EINA_FALSE;
|
||||||
|
|
||||||
if (o != evas_object_smart_parent_get(child))
|
if (o != evas_object_smart_parent_get(child))
|
||||||
{
|
{
|
||||||
ERR("cannot unpack child from incorrect grid!");
|
ERR("cannot unpack child from incorrect grid!");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
opt = _evas_object_grid_option_del(child);
|
opt = _evas_object_grid_option_del(child);
|
||||||
if (!opt)
|
if (!opt)
|
||||||
{
|
{
|
||||||
ERR("cannot unpack child with no packing option!");
|
ERR("cannot unpack child with no packing option!");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_evas_object_grid_child_disconnect(o, child);
|
_evas_object_grid_child_disconnect(o, child);
|
||||||
_evas_object_grid_remove_opt(priv, opt);
|
_evas_object_grid_remove_opt(priv, opt);
|
||||||
evas_object_smart_member_del(child);
|
evas_object_smart_member_del(child);
|
||||||
free(opt);
|
free(opt);
|
||||||
return EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
|
evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
|
||||||
|
{
|
||||||
|
eo_do(o, evas_obj_grid_clear(clear));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_clear(Eo *o, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
Evas_Object_Grid_Option *opt;
|
Evas_Object_Grid_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
|
Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
Eina_Bool clear = va_arg(*list, int);
|
||||||
|
|
||||||
EINA_LIST_FREE(priv->children, opt)
|
EINA_LIST_FREE(priv->children, opt)
|
||||||
{
|
{
|
||||||
|
@ -367,33 +448,68 @@ evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_grid_pack_get(const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h)
|
evas_object_grid_pack_get(const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h)
|
||||||
{
|
{
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do((Eo *)o, evas_obj_grid_pack_get(child, x, y, w, h, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_pack_get(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object *child = va_arg(*list, Evas_Object *);
|
||||||
|
int *x = va_arg(*list, int *);
|
||||||
|
int *y = va_arg(*list, int *);
|
||||||
|
int *w = va_arg(*list, int *);
|
||||||
|
int *h = va_arg(*list, int *);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
|
||||||
Evas_Object_Grid_Option *opt;
|
Evas_Object_Grid_Option *opt;
|
||||||
|
|
||||||
if (x) *x = 0;
|
if (x) *x = 0;
|
||||||
if (y) *y = 0;
|
if (y) *y = 0;
|
||||||
if (w) *w = 0;
|
if (w) *w = 0;
|
||||||
if (h) *h = 0;
|
if (h) *h = 0;
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
|
||||||
opt = _evas_object_grid_option_get(child);
|
opt = _evas_object_grid_option_get(child);
|
||||||
if (!opt) return 0;
|
if (!opt)
|
||||||
|
{
|
||||||
|
*ret = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (x) *x = opt->x;
|
if (x) *x = opt->x;
|
||||||
if (y) *y = opt->y;
|
if (y) *y = opt->y;
|
||||||
if (w) *w = opt->w;
|
if (w) *w = opt->w;
|
||||||
if (h) *h = opt->h;
|
if (h) *h = opt->h;
|
||||||
return 1;
|
*ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Iterator *
|
EAPI Eina_Iterator *
|
||||||
evas_object_grid_iterator_new(const Evas_Object *o)
|
evas_object_grid_iterator_new(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
|
Eina_Iterator *ret = NULL;
|
||||||
|
eo_do((Eo *)o, evas_obj_grid_iterator_new(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_iterator_new(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Iterator **ret = va_arg(*list, Eina_Iterator **);
|
||||||
Evas_Object_Grid_Iterator *it;
|
Evas_Object_Grid_Iterator *it;
|
||||||
|
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
const Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
|
||||||
if (!priv->children) return NULL;
|
if (!priv->children)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
it = calloc(1, sizeof(Evas_Object_Grid_Iterator));
|
it = calloc(1, sizeof(Evas_Object_Grid_Iterator));
|
||||||
if (!it) return NULL;
|
if (!it)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
||||||
|
|
||||||
|
@ -404,20 +520,37 @@ evas_object_grid_iterator_new(const Evas_Object *o)
|
||||||
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container);
|
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container);
|
||||||
it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free);
|
it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free);
|
||||||
|
|
||||||
return &it->iterator;
|
*ret = &it->iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Accessor *
|
EAPI Eina_Accessor *
|
||||||
evas_object_grid_accessor_new(const Evas_Object *o)
|
evas_object_grid_accessor_new(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
|
Eina_Accessor *ret = NULL;
|
||||||
|
eo_do((Eo *)o, evas_obj_grid_accessor_new(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_accessor_new(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Accessor **ret = va_arg(*list, Eina_Accessor **);
|
||||||
Evas_Object_Grid_Accessor *it;
|
Evas_Object_Grid_Accessor *it;
|
||||||
|
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
const Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
|
||||||
if (!priv->children) return NULL;
|
if (!priv->children)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
it = calloc(1, sizeof(Evas_Object_Grid_Accessor));
|
it = calloc(1, sizeof(Evas_Object_Grid_Accessor));
|
||||||
if (!it) return NULL;
|
if (!it)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
|
EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
|
||||||
|
|
||||||
|
@ -428,38 +561,117 @@ evas_object_grid_accessor_new(const Evas_Object *o)
|
||||||
it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container);
|
it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container);
|
||||||
it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free);
|
it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free);
|
||||||
|
|
||||||
return &it->accessor;
|
*ret = &it->accessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_List *
|
EAPI Eina_List *
|
||||||
evas_object_grid_children_get(const Evas_Object *o)
|
evas_object_grid_children_get(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
|
Eina_List *ret = NULL;
|
||||||
|
eo_do((Eo *)o, evas_obj_grid_children_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_children_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_List **ret = va_arg(*list, Eina_List **);
|
||||||
|
|
||||||
Eina_List *new_list = NULL, *l;
|
Eina_List *new_list = NULL, *l;
|
||||||
Evas_Object_Grid_Option *opt;
|
Evas_Object_Grid_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
const Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(priv->children, l, opt)
|
EINA_LIST_FOREACH(priv->children, l, opt)
|
||||||
new_list = eina_list_append(new_list, opt->obj);
|
new_list = eina_list_append(new_list, opt->obj);
|
||||||
|
|
||||||
return new_list;
|
*ret = new_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_grid_mirrored_get(const Evas_Object *obj)
|
evas_object_grid_mirrored_get(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE);
|
Eina_Bool ret = EINA_FALSE;
|
||||||
return priv->is_mirrored;
|
eo_do((Eo *)o, evas_obj_grid_mirrored_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_mirrored_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
const Evas_Object_Grid_Data *priv = _pd;
|
||||||
|
*ret = priv->is_mirrored;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
|
evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(obj, priv);
|
eo_do(obj, evas_obj_grid_mirrored_set(mirrored));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_mirrored_set(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool mirrored = va_arg(*list, int);
|
||||||
|
|
||||||
|
Evas_Object_Grid_Data *priv = _pd;
|
||||||
mirrored = !!mirrored;
|
mirrored = !!mirrored;
|
||||||
if (priv->is_mirrored != mirrored)
|
if (priv->is_mirrored != mirrored)
|
||||||
{
|
{
|
||||||
priv->is_mirrored = mirrored;
|
priv->is_mirrored = mirrored;
|
||||||
_evas_object_grid_smart_calculate(obj);
|
_evas_object_grid_smart_calculate(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ADD_TO), _add_to),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_SET), _size_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_GET), _size_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK), _pack),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_UNPACK), _unpack),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CLEAR), _clear),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK_GET), _pack_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ITERATOR_NEW), _iterator_new),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ACCESSOR_NEW), _accessor_new),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CHILDREN_GET), _children_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_GET), _mirrored_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_SET), _mirrored_set),
|
||||||
|
EO_OP_FUNC_SENTINEL
|
||||||
|
};
|
||||||
|
eo_class_funcs_set(klass, func_desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_ADD_TO, "Create a grid that is child of a given element parent."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_SIZE_SET, "Set the virtual resolution for the grid."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_SIZE_GET, "Get the current virtual resolution."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_PACK, "Add a new child to a grid object."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_UNPACK, "Remove child from grid."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_CLEAR, "Faster way to remove all child objects from a grid object."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_PACK_GET, "Get the pack options for a grid child."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_ITERATOR_NEW, "Get an iterator to walk the list of children for the grid."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_ACCESSOR_NEW, "Get an accessor to get random access to the list of children for the grid."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_CHILDREN_GET, "Get the list of children for the grid."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_MIRRORED_GET, "Gets the mirrored mode of the grid."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_GRID_SUB_ID_MIRRORED_SET, "Sets the mirrored mode of the grid."),
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Object_Grid",
|
||||||
|
EO_CLASS_TYPE_REGULAR,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_GRID_BASE_ID, op_desc, EVAS_OBJ_GRID_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
sizeof(Evas_Object_Grid_Data),
|
||||||
|
_class_constructor,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_object_grid_class_get, &class_desc, EVAS_OBJ_SMART_CLIPPED_CLASS, NULL);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,84 +4,92 @@
|
||||||
/* local calls */
|
/* local calls */
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_show(Evas_Object *obj)
|
evas_object_inform_call_show(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_hide(Evas_Object *obj)
|
evas_object_inform_call_hide(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_move(Evas_Object *obj)
|
evas_object_inform_call_move(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_resize(Evas_Object *obj)
|
evas_object_inform_call_resize(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_restack(Evas_Object *obj)
|
evas_object_inform_call_restack(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_changed_size_hints(Evas_Object *obj)
|
evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_image_preloaded(Evas_Object *obj)
|
evas_object_inform_call_image_preloaded(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
if (!_evas_object_image_preloading_get(obj)) return;
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_image_preloading_check(obj);
|
if (!_evas_object_image_preloading_get(eo_obj)) return;
|
||||||
_evas_object_image_preloading_set(obj, 0);
|
_evas_object_image_preloading_check(eo_obj);
|
||||||
|
_evas_object_image_preloading_set(eo_obj, 0);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_image_unloaded(Evas_Object *obj)
|
evas_object_inform_call_image_unloaded(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
|
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_inform_call_image_resize(Evas_Object *obj)
|
evas_object_inform_call_image_resize(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
_evas_object_event_new();
|
_evas_object_event_new();
|
||||||
evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, _evas_event_counter);
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, _evas_event_counter);
|
||||||
_evas_post_event_callback_call(obj->layer->evas);
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,19 +3,21 @@
|
||||||
|
|
||||||
/* local calls */
|
/* local calls */
|
||||||
|
|
||||||
static void evas_object_intercept_init(Evas_Object *obj);
|
static void evas_object_intercept_init(Evas_Object *eo_obj);
|
||||||
static void evas_object_intercept_deinit(Evas_Object *obj);
|
static void evas_object_intercept_deinit(Evas_Object *eo_obj);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_intercept_init(Evas_Object *obj)
|
evas_object_intercept_init(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!obj->interceptors)
|
if (!obj->interceptors)
|
||||||
obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func));
|
obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_intercept_deinit(Evas_Object *obj)
|
evas_object_intercept_deinit(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
if ((obj->interceptors->show.func) ||
|
if ((obj->interceptors->show.func) ||
|
||||||
(obj->interceptors->hide.func) ||
|
(obj->interceptors->hide.func) ||
|
||||||
|
@ -37,14 +39,16 @@ evas_object_intercept_deinit(Evas_Object *obj)
|
||||||
/* private calls */
|
/* private calls */
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_object_intercept_cleanup(Evas_Object *obj)
|
evas_object_intercept_cleanup(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (obj->interceptors) free(obj->interceptors);
|
if (obj->interceptors) free(obj->interceptors);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_show(Evas_Object *obj)
|
evas_object_intercept_call_show(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -52,14 +56,15 @@ evas_object_intercept_call_show(Evas_Object *obj)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->show.func);
|
ret = !!(obj->interceptors->show.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->show.func(obj->interceptors->show.data, obj);
|
obj->interceptors->show.func(obj->interceptors->show.data, eo_obj);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_hide(Evas_Object *obj)
|
evas_object_intercept_call_hide(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -67,13 +72,13 @@ evas_object_intercept_call_hide(Evas_Object *obj)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->hide.func);
|
ret = !!(obj->interceptors->hide.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->hide.func(obj->interceptors->hide.data, obj);
|
obj->interceptors->hide.func(obj->interceptors->hide.data, eo_obj);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
evas_object_intercept_call_move(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -82,14 +87,15 @@ evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->move.func);
|
ret = !!(obj->interceptors->move.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y);
|
obj->interceptors->move.func(obj->interceptors->move.data, eo_obj, x, y);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
evas_object_intercept_call_resize(Evas_Object *eo_obj, Evas_Coord w, Evas_Coord h)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -97,14 +103,15 @@ evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->resize.func);
|
ret = !!(obj->interceptors->resize.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h);
|
obj->interceptors->resize.func(obj->interceptors->resize.data, eo_obj, w, h);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_raise(Evas_Object *obj)
|
evas_object_intercept_call_raise(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -112,14 +119,15 @@ evas_object_intercept_call_raise(Evas_Object *obj)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->raise.func);
|
ret = !!(obj->interceptors->raise.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->raise.func(obj->interceptors->raise.data, obj);
|
obj->interceptors->raise.func(obj->interceptors->raise.data, eo_obj);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_lower(Evas_Object *obj)
|
evas_object_intercept_call_lower(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -127,14 +135,15 @@ evas_object_intercept_call_lower(Evas_Object *obj)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->lower.func);
|
ret = !!(obj->interceptors->lower.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->lower.func(obj->interceptors->lower.data, obj);
|
obj->interceptors->lower.func(obj->interceptors->lower.data, eo_obj);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above)
|
evas_object_intercept_call_stack_above(Evas_Object *eo_obj, Evas_Object *above)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -142,14 +151,15 @@ evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->stack_above.func);
|
ret = !!(obj->interceptors->stack_above.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above);
|
obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, eo_obj, above);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below)
|
evas_object_intercept_call_stack_below(Evas_Object *eo_obj, Evas_Object *below)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -157,14 +167,15 @@ evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->stack_below.func);
|
ret = !!(obj->interceptors->stack_below.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below);
|
obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, eo_obj, below);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_layer_set(Evas_Object *obj, int l)
|
evas_object_intercept_call_layer_set(Evas_Object *eo_obj, int l)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -172,14 +183,15 @@ evas_object_intercept_call_layer_set(Evas_Object *obj, int l)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->layer_set.func);
|
ret = !!(obj->interceptors->layer_set.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l);
|
obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, eo_obj, l);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
evas_object_intercept_call_color_set(Evas_Object *eo_obj, int r, int g, int b, int a)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -187,13 +199,13 @@ evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->color_set.func);
|
ret = !!(obj->interceptors->color_set.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a);
|
obj->interceptors->color_set.func(obj->interceptors->color_set.data, eo_obj, r, g, b, a);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip)
|
evas_object_intercept_call_clip_set(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *clip)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -202,14 +214,15 @@ evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->clip_set.func);
|
ret = !!(obj->interceptors->clip_set.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip);
|
obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, eo_obj, clip);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evas_object_intercept_call_clip_unset(Evas_Object *obj)
|
evas_object_intercept_call_clip_unset(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!obj->interceptors) return 0;
|
if (!obj->interceptors) return 0;
|
||||||
|
@ -217,7 +230,7 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj)
|
||||||
obj->intercepted = EINA_TRUE;
|
obj->intercepted = EINA_TRUE;
|
||||||
ret = !!(obj->interceptors->clip_unset.func);
|
ret = !!(obj->interceptors->clip_unset.func);
|
||||||
if (ret)
|
if (ret)
|
||||||
obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj);
|
obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, eo_obj);
|
||||||
obj->intercepted = EINA_FALSE;
|
obj->intercepted = EINA_FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -225,54 +238,58 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj)
|
||||||
/* public calls */
|
/* public calls */
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data)
|
evas_object_intercept_show_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Show_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->show.func = func;
|
obj->interceptors->show.func = func;
|
||||||
obj->interceptors->show.data = (void *)data;
|
obj->interceptors->show.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func)
|
evas_object_intercept_show_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Show_Cb func)
|
||||||
{
|
{
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
if (!obj->interceptors) return NULL;
|
if (!obj->interceptors) return NULL;
|
||||||
obj->interceptors->show.func = NULL;
|
obj->interceptors->show.func = NULL;
|
||||||
data = obj->interceptors->show.data;
|
data = obj->interceptors->show.data;
|
||||||
obj->interceptors->show.data = NULL;
|
obj->interceptors->show.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data)
|
evas_object_intercept_hide_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Hide_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->hide.func = func;
|
obj->interceptors->hide.func = func;
|
||||||
obj->interceptors->hide.data = (void *)data;
|
obj->interceptors->hide.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func)
|
evas_object_intercept_hide_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Hide_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -280,29 +297,31 @@ evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_
|
||||||
obj->interceptors->hide.func = NULL;
|
obj->interceptors->hide.func = NULL;
|
||||||
data = obj->interceptors->hide.data;
|
data = obj->interceptors->hide.data;
|
||||||
obj->interceptors->hide.data = NULL;
|
obj->interceptors->hide.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data)
|
evas_object_intercept_move_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Move_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->move.func = func;
|
obj->interceptors->move.func = func;
|
||||||
obj->interceptors->move.data = (void *)data;
|
obj->interceptors->move.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func)
|
evas_object_intercept_move_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Move_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -310,29 +329,31 @@ evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_
|
||||||
obj->interceptors->move.func = NULL;
|
obj->interceptors->move.func = NULL;
|
||||||
data = obj->interceptors->move.data;
|
data = obj->interceptors->move.data;
|
||||||
obj->interceptors->move.data = NULL;
|
obj->interceptors->move.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data)
|
evas_object_intercept_resize_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Resize_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->resize.func = func;
|
obj->interceptors->resize.func = func;
|
||||||
obj->interceptors->resize.data = (void *)data;
|
obj->interceptors->resize.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func)
|
evas_object_intercept_resize_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Resize_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -340,29 +361,31 @@ evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercep
|
||||||
obj->interceptors->resize.func = NULL;
|
obj->interceptors->resize.func = NULL;
|
||||||
data = obj->interceptors->resize.data;
|
data = obj->interceptors->resize.data;
|
||||||
obj->interceptors->resize.data = NULL;
|
obj->interceptors->resize.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data)
|
evas_object_intercept_raise_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Raise_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->raise.func = func;
|
obj->interceptors->raise.func = func;
|
||||||
obj->interceptors->raise.data = (void *)data;
|
obj->interceptors->raise.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func)
|
evas_object_intercept_raise_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Raise_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -370,29 +393,31 @@ evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept
|
||||||
obj->interceptors->raise.func = NULL;
|
obj->interceptors->raise.func = NULL;
|
||||||
data = obj->interceptors->raise.data;
|
data = obj->interceptors->raise.data;
|
||||||
obj->interceptors->raise.data = NULL;
|
obj->interceptors->raise.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data)
|
evas_object_intercept_lower_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Lower_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->lower.func = func;
|
obj->interceptors->lower.func = func;
|
||||||
obj->interceptors->lower.data = (void *)data;
|
obj->interceptors->lower.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func)
|
evas_object_intercept_lower_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Lower_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -400,29 +425,31 @@ evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept
|
||||||
obj->interceptors->lower.func = NULL;
|
obj->interceptors->lower.func = NULL;
|
||||||
data = obj->interceptors->lower.data;
|
data = obj->interceptors->lower.data;
|
||||||
obj->interceptors->lower.data = NULL;
|
obj->interceptors->lower.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data)
|
evas_object_intercept_stack_above_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->stack_above.func = func;
|
obj->interceptors->stack_above.func = func;
|
||||||
obj->interceptors->stack_above.data = (void *)data;
|
obj->interceptors->stack_above.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func)
|
evas_object_intercept_stack_above_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Stack_Above_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -430,29 +457,31 @@ evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Int
|
||||||
obj->interceptors->stack_above.func = NULL;
|
obj->interceptors->stack_above.func = NULL;
|
||||||
data = obj->interceptors->stack_above.data;
|
data = obj->interceptors->stack_above.data;
|
||||||
obj->interceptors->stack_above.data = NULL;
|
obj->interceptors->stack_above.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data)
|
evas_object_intercept_stack_below_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->stack_below.func = func;
|
obj->interceptors->stack_below.func = func;
|
||||||
obj->interceptors->stack_below.data = (void *)data;
|
obj->interceptors->stack_below.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func)
|
evas_object_intercept_stack_below_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Stack_Below_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -460,29 +489,31 @@ evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Int
|
||||||
obj->interceptors->stack_below.func = NULL;
|
obj->interceptors->stack_below.func = NULL;
|
||||||
data = obj->interceptors->stack_below.data;
|
data = obj->interceptors->stack_below.data;
|
||||||
obj->interceptors->stack_below.data = NULL;
|
obj->interceptors->stack_below.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data)
|
evas_object_intercept_layer_set_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->layer_set.func = func;
|
obj->interceptors->layer_set.func = func;
|
||||||
obj->interceptors->layer_set.data = (void *)data;
|
obj->interceptors->layer_set.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func)
|
evas_object_intercept_layer_set_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Layer_Set_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -490,29 +521,31 @@ evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Inter
|
||||||
obj->interceptors->layer_set.func = NULL;
|
obj->interceptors->layer_set.func = NULL;
|
||||||
data = obj->interceptors->layer_set.data;
|
data = obj->interceptors->layer_set.data;
|
||||||
obj->interceptors->layer_set.data = NULL;
|
obj->interceptors->layer_set.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data)
|
evas_object_intercept_color_set_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->color_set.func = func;
|
obj->interceptors->color_set.func = func;
|
||||||
obj->interceptors->color_set.data = (void *)data;
|
obj->interceptors->color_set.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func)
|
evas_object_intercept_color_set_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Color_Set_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -520,29 +553,31 @@ evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Inter
|
||||||
obj->interceptors->color_set.func = NULL;
|
obj->interceptors->color_set.func = NULL;
|
||||||
data = obj->interceptors->color_set.data;
|
data = obj->interceptors->color_set.data;
|
||||||
obj->interceptors->color_set.data = NULL;
|
obj->interceptors->color_set.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data)
|
evas_object_intercept_clip_set_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->clip_set.func = func;
|
obj->interceptors->clip_set.func = func;
|
||||||
obj->interceptors->clip_set.data = (void *)data;
|
obj->interceptors->clip_set.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func)
|
evas_object_intercept_clip_set_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Clip_Set_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -550,29 +585,31 @@ evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Interc
|
||||||
obj->interceptors->clip_set.func = NULL;
|
obj->interceptors->clip_set.func = NULL;
|
||||||
data = obj->interceptors->clip_set.data;
|
data = obj->interceptors->clip_set.data;
|
||||||
obj->interceptors->clip_set.data = NULL;
|
obj->interceptors->clip_set.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data)
|
evas_object_intercept_clip_unset_callback_add(Evas_Object *eo_obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (!func) return;
|
if (!func) return;
|
||||||
evas_object_intercept_init(obj);
|
evas_object_intercept_init(eo_obj);
|
||||||
if (!obj->interceptors) return;
|
if (!obj->interceptors) return;
|
||||||
obj->interceptors->clip_unset.func = func;
|
obj->interceptors->clip_unset.func = func;
|
||||||
obj->interceptors->clip_unset.data = (void *)data;
|
obj->interceptors->clip_unset.data = (void *)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func)
|
evas_object_intercept_clip_unset_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Clip_Unset_Cb func)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
|
@ -580,6 +617,6 @@ evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Inte
|
||||||
obj->interceptors->clip_unset.func = NULL;
|
obj->interceptors->clip_unset.func = NULL;
|
||||||
data = obj->interceptors->clip_unset.data;
|
data = obj->interceptors->clip_unset.data;
|
||||||
obj->interceptors->clip_unset.data = NULL;
|
obj->interceptors->clip_unset.data = NULL;
|
||||||
evas_object_intercept_deinit(obj);
|
evas_object_intercept_deinit(eo_obj);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
#include "Eo.h"
|
||||||
|
|
||||||
|
EAPI Eo_Op EVAS_OBJ_LINE_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
|
#define MY_CLASS EVAS_OBJ_LINE_CLASS
|
||||||
|
|
||||||
/* private magic number for line objects */
|
/* private magic number for line objects */
|
||||||
static const char o_type[] = "line";
|
static const char o_type[] = "line";
|
||||||
|
|
||||||
|
@ -9,7 +15,6 @@ typedef struct _Evas_Object_Line Evas_Object_Line;
|
||||||
|
|
||||||
struct _Evas_Object_Line
|
struct _Evas_Object_Line
|
||||||
{
|
{
|
||||||
DATA32 magic;
|
|
||||||
struct {
|
struct {
|
||||||
struct {
|
struct {
|
||||||
Evas_Coord x1, y1, x2, y2;
|
Evas_Coord x1, y1, x2, y2;
|
||||||
|
@ -25,27 +30,25 @@ struct _Evas_Object_Line
|
||||||
};
|
};
|
||||||
|
|
||||||
/* private methods for line objects */
|
/* private methods for line objects */
|
||||||
static void evas_object_line_init(Evas_Object *obj);
|
static void evas_object_line_init(Evas_Object *eo_obj);
|
||||||
static void *evas_object_line_new(void);
|
static void evas_object_line_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y);
|
||||||
static void evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
|
static void evas_object_line_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_line_free(Evas_Object *obj);
|
static void evas_object_line_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_line_render_pre(Evas_Object *obj);
|
|
||||||
static void evas_object_line_render_post(Evas_Object *obj);
|
|
||||||
|
|
||||||
static unsigned int evas_object_line_id_get(Evas_Object *obj);
|
static unsigned int evas_object_line_id_get(Evas_Object *eo_obj);
|
||||||
static unsigned int evas_object_line_visual_id_get(Evas_Object *obj);
|
static unsigned int evas_object_line_visual_id_get(Evas_Object *eo_obj);
|
||||||
static void *evas_object_line_engine_data_get(Evas_Object *obj);
|
static void *evas_object_line_engine_data_get(Evas_Object *eo_obj);
|
||||||
|
|
||||||
static int evas_object_line_is_opaque(Evas_Object *obj);
|
static int evas_object_line_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static int evas_object_line_was_opaque(Evas_Object *obj);
|
static int evas_object_line_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static int evas_object_line_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
static int evas_object_line_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y);
|
||||||
static int evas_object_line_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
static int evas_object_line_was_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y);
|
||||||
static void evas_object_line_coords_recalc(Evas_Object *obj);
|
static void evas_object_line_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
|
|
||||||
static const Evas_Object_Func object_func =
|
static const Evas_Object_Func object_func =
|
||||||
{
|
{
|
||||||
/* methods (compulsory) */
|
/* methods (compulsory) */
|
||||||
evas_object_line_free,
|
NULL,
|
||||||
evas_object_line_render,
|
evas_object_line_render,
|
||||||
evas_object_line_render_pre,
|
evas_object_line_render_pre,
|
||||||
evas_object_line_render_post,
|
evas_object_line_render_post,
|
||||||
|
@ -71,43 +74,47 @@ static const Evas_Object_Func object_func =
|
||||||
/* the actual api call to add a rect */
|
/* the actual api call to add a rect */
|
||||||
/* it has no other api calls as all properties are standard */
|
/* it has no other api calls as all properties are standard */
|
||||||
|
|
||||||
EVAS_MEMPOOL(_mp_obj);
|
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_line_add(Evas *e)
|
evas_object_line_add(Evas *e)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
obj = evas_object_new(e);
|
Evas_Object *eo_obj = eo_add(EVAS_OBJ_LINE_CLASS, e);
|
||||||
evas_object_line_init(obj);
|
eo_unref(eo_obj);
|
||||||
evas_object_inject(obj, e);
|
return eo_obj;
|
||||||
return obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2)
|
evas_object_line_xy_set(Evas_Object *eo_obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
eo_do(eo_obj, evas_obj_line_xy_set(x1, y1, x2, y2));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_line_xy_set(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Coord x1 = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord y1 = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord x2 = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord y2 = va_arg(*list, Evas_Coord);
|
||||||
|
|
||||||
|
Evas_Object_Line *o = _pd;
|
||||||
Evas_Coord min_x, max_x, min_y, max_y;
|
Evas_Coord min_x, max_x, min_y, max_y;
|
||||||
int is, was = 0;
|
int is, was = 0;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
|
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if ((x1 == o->cur.x1) && (y1 == o->cur.y1) &&
|
if ((x1 == o->cur.x1) && (y1 == o->cur.y1) &&
|
||||||
(x2 == o->cur.x2) && (y2 == o->cur.y2)) return;
|
(x2 == o->cur.x2) && (y2 == o->cur.y2)) return;
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
if (!(obj->layer->evas->is_frozen))
|
||||||
{
|
{
|
||||||
if (!evas_event_passes_through(obj) &&
|
if (!evas_event_passes_through(eo_obj, obj) &&
|
||||||
!evas_event_freezes_through(obj))
|
!evas_event_freezes_through(eo_obj, obj))
|
||||||
was = evas_object_is_in_output_rect(obj,
|
was = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
1, 1);
|
1, 1);
|
||||||
|
@ -142,49 +149,53 @@ evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coo
|
||||||
o->cur.x2 = x2 - min_x;
|
o->cur.x2 = x2 - min_x;
|
||||||
o->cur.y2 = y2 - min_y;
|
o->cur.y2 = y2 - min_y;
|
||||||
o->changed = EINA_TRUE;
|
o->changed = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_coords_recalc(obj);
|
evas_object_coords_recalc(eo_obj, obj);
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
if (!(obj->layer->evas->is_frozen))
|
||||||
{
|
{
|
||||||
is = evas_object_is_in_output_rect(obj,
|
is = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1);
|
obj->layer->evas->pointer.y, 1, 1);
|
||||||
if (!evas_event_passes_through(obj) &&
|
if (!evas_event_passes_through(eo_obj, obj) &&
|
||||||
!evas_event_freezes_through(obj))
|
!evas_event_freezes_through(eo_obj, obj))
|
||||||
{
|
{
|
||||||
if ((is ^ was) && obj->cur.visible)
|
if ((is ^ was) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evas_object_inform_call_move(obj);
|
evas_object_inform_call_move(eo_obj, obj);
|
||||||
evas_object_inform_call_resize(obj);
|
evas_object_inform_call_resize(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2)
|
evas_object_line_xy_get(const Evas_Object *eo_obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
if (x1) *x1 = 0;
|
||||||
|
if (y1) *y1 = 0;
|
||||||
|
if (x2) *x2 = 0;
|
||||||
|
if (y2) *y2 = 0;
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_line_xy_get(x1, y1, x2, y2));
|
||||||
|
}
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
static void
|
||||||
if (x1) *x1 = 0;
|
_line_xy_get(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
if (y1) *y1 = 0;
|
{
|
||||||
if (x2) *x2 = 0;
|
const Evas_Object_Line *o = _pd;
|
||||||
if (y2) *y2 = 0;
|
|
||||||
return;
|
Evas_Coord *x1 = va_arg(*list, Evas_Coord *);
|
||||||
MAGIC_CHECK_END();
|
Evas_Coord *y1 = va_arg(*list, Evas_Coord *);
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
Evas_Coord *x2 = va_arg(*list, Evas_Coord *);
|
||||||
MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
|
Evas_Coord *y2 = va_arg(*list, Evas_Coord *);
|
||||||
if (x1) *x1 = 0;
|
|
||||||
if (y1) *y1 = 0;
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
if (x2) *x2 = 0;
|
|
||||||
if (y2) *y2 = 0;
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
if (x1) *x1 = obj->cur.geometry.x + o->cur.x1;
|
if (x1) *x1 = obj->cur.geometry.x + o->cur.x1;
|
||||||
if (y1) *y1 = obj->cur.geometry.y + o->cur.y1;
|
if (y1) *y1 = obj->cur.geometry.y + o->cur.y1;
|
||||||
if (x2) *x2 = obj->cur.geometry.x + o->cur.x2;
|
if (x2) *x2 = obj->cur.geometry.x + o->cur.x2;
|
||||||
|
@ -193,10 +204,9 @@ evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1,
|
||||||
|
|
||||||
/* all nice and private */
|
/* all nice and private */
|
||||||
static void
|
static void
|
||||||
evas_object_line_init(Evas_Object *obj)
|
evas_object_line_init(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* alloc image ob, setup methods and default values */
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
obj->object_data = evas_object_line_new();
|
|
||||||
/* set up default settings for this kind of object */
|
/* set up default settings for this kind of object */
|
||||||
obj->cur.color.r = 255;
|
obj->cur.color.r = 255;
|
||||||
obj->cur.color.g = 255;
|
obj->cur.color.g = 255;
|
||||||
|
@ -216,47 +226,37 @@ evas_object_line_init(Evas_Object *obj)
|
||||||
obj->type = o_type;
|
obj->type = o_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void
|
||||||
evas_object_line_new(void)
|
_constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
eo_do_super(eo_obj, eo_constructor());
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_line_init(eo_obj);
|
||||||
|
evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj)));
|
||||||
|
|
||||||
|
Evas_Object_Line *o = class_data;
|
||||||
/* alloc obj private data */
|
/* alloc obj private data */
|
||||||
EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 4, NULL);
|
|
||||||
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Line);
|
|
||||||
if (!o) return NULL;
|
|
||||||
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Line);
|
|
||||||
o->magic = MAGIC_OBJ_LINE;
|
|
||||||
o->cur.x1 = 0;
|
o->cur.x1 = 0;
|
||||||
o->cur.y1 = 0;
|
o->cur.y1 = 0;
|
||||||
o->cur.x2 = 31;
|
o->cur.x2 = 31;
|
||||||
o->cur.y2 = 31;
|
o->cur.y2 = 31;
|
||||||
o->prev = o->cur;
|
o->prev = o->cur;
|
||||||
return o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_line_free(Evas_Object *obj)
|
_destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
eo_do_super(eo_obj, eo_destructor());
|
||||||
|
|
||||||
/* frees private object data. very simple here */
|
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
/* free obj */
|
|
||||||
o->magic = 0;
|
|
||||||
EVAS_MEMPOOL_FREE(_mp_obj, o);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
|
evas_object_line_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
/* render object to surface with context, and offxet by x,y */
|
/* render object to surface with context, and offxet by x,y */
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
obj->layer->evas->engine.func->context_color_set(output,
|
obj->layer->evas->engine.func->context_color_set(output,
|
||||||
context,
|
context,
|
||||||
obj->cur.cache.clip.r,
|
obj->cur.cache.clip.r,
|
||||||
|
@ -279,9 +279,9 @@ evas_object_line_render(Evas_Object *obj, void *output, void *context, void *sur
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_line_render_pre(Evas_Object *obj)
|
evas_object_line_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
int is_v, was_v;
|
int is_v, was_v;
|
||||||
Eina_Bool changed_color = EINA_FALSE;
|
Eina_Bool changed_color = EINA_FALSE;
|
||||||
|
|
||||||
|
@ -293,34 +293,33 @@ evas_object_line_render_pre(Evas_Object *obj)
|
||||||
/* elsewhere, decoding video etc. */
|
/* elsewhere, decoding video etc. */
|
||||||
/* then when this is done the object needs to figure if it changed and */
|
/* then when this is done the object needs to figure if it changed and */
|
||||||
/* if so what and where and add the appropriate redraw lines */
|
/* if so what and where and add the appropriate redraw lines */
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
/* if someone is clipping this obj - go calculate the clipper */
|
/* if someone is clipping this obj - go calculate the clipper */
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *cur_clipper = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
if (obj->cur.cache.clip.dirty)
|
if (obj->cur.cache.clip.dirty)
|
||||||
evas_object_clip_recalc(obj->cur.clipper);
|
evas_object_clip_recalc(obj->cur.clipper, cur_clipper);
|
||||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
cur_clipper->func->render_pre(obj->cur.clipper, cur_clipper);
|
||||||
}
|
}
|
||||||
/* now figure what changed and add draw rects */
|
/* now figure what changed and add draw rects */
|
||||||
/* if it just became visible or invisible */
|
/* if it just became visible or invisible */
|
||||||
is_v = evas_object_is_visible(obj);
|
is_v = evas_object_is_visible(eo_obj, obj);
|
||||||
was_v = evas_object_was_visible(obj);
|
was_v = evas_object_was_visible(eo_obj, obj);
|
||||||
if (is_v != was_v)
|
if (is_v != was_v)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
|
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
|
||||||
obj, is_v, was_v);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (obj->changed_map)
|
if (obj->changed_map)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj,
|
||||||
obj);
|
obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* it's not visible - we accounted for it appearing or not so just abort */
|
/* it's not visible - we accounted for it appearing or not so just abort */
|
||||||
if (!is_v) goto done;
|
if (!is_v) goto done;
|
||||||
/* clipper changed this is in addition to anything else for obj */
|
/* clipper changed this is in addition to anything else for obj */
|
||||||
evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, eo_obj);
|
||||||
|
|
||||||
if ((obj->cur.color.r != obj->prev.color.r) ||
|
if ((obj->cur.color.r != obj->prev.color.r) ||
|
||||||
(obj->cur.color.g != obj->prev.color.g) ||
|
(obj->cur.color.g != obj->prev.color.g) ||
|
||||||
|
@ -339,7 +338,7 @@ evas_object_line_render_pre(Evas_Object *obj)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||||
obj);
|
eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,62 +356,51 @@ evas_object_line_render_pre(Evas_Object *obj)
|
||||||
(o->cur.y2 != o->prev.y2)))
|
(o->cur.y2 != o->prev.y2)))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
obj);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj,
|
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
|
||||||
is_v, was_v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_line_render_post(Evas_Object *obj)
|
evas_object_line_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
/* this moves the current data to the previous state parts of the object */
|
/* this moves the current data to the previous state parts of the object */
|
||||||
/* in whatever way is safest for the object. also if we don't need object */
|
/* in whatever way is safest for the object. also if we don't need object */
|
||||||
/* data anymore we can free it if the object deems this is a good idea */
|
/* data anymore we can free it if the object deems this is a good idea */
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
/* remove those pesky changes */
|
/* remove those pesky changes */
|
||||||
evas_object_clip_changes_clean(obj);
|
evas_object_clip_changes_clean(eo_obj);
|
||||||
/* move cur to prev safely for object data */
|
/* move cur to prev safely for object data */
|
||||||
evas_object_cur_prev(obj);
|
evas_object_cur_prev(eo_obj);
|
||||||
o->prev = o->cur;
|
o->prev = o->cur;
|
||||||
o->changed = EINA_FALSE;
|
o->changed = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int evas_object_line_id_get(Evas_Object *obj)
|
static unsigned int evas_object_line_id_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
if (!o) return 0;
|
||||||
return MAGIC_OBJ_LINE;
|
return MAGIC_OBJ_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int evas_object_line_visual_id_get(Evas_Object *obj)
|
static unsigned int evas_object_line_visual_id_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
if (!o) return 0;
|
||||||
return MAGIC_OBJ_SHAPE;
|
return MAGIC_OBJ_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *evas_object_line_engine_data_get(Evas_Object *obj)
|
static void *evas_object_line_engine_data_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
if (!o) return NULL;
|
|
||||||
return o->engine_data;
|
return o->engine_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_line_is_opaque(Evas_Object *obj __UNUSED__)
|
evas_object_line_is_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data implies that the object is */
|
/* this returns 1 if the internal object data implies that the object is */
|
||||||
/* currently fully opaque over the entire line it occupies */
|
/* currently fully opaque over the entire line it occupies */
|
||||||
|
@ -420,7 +408,7 @@ evas_object_line_is_opaque(Evas_Object *obj __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_line_was_opaque(Evas_Object *obj __UNUSED__)
|
evas_object_line_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data implies that the object was */
|
/* this returns 1 if the internal object data implies that the object was */
|
||||||
/* previously fully opaque over the entire line it occupies */
|
/* previously fully opaque over the entire line it occupies */
|
||||||
|
@ -428,7 +416,7 @@ evas_object_line_was_opaque(Evas_Object *obj __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_line_is_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__)
|
evas_object_line_is_inside(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the canvas co-ordinates are inside the object based */
|
/* this returns 1 if the canvas co-ordinates are inside the object based */
|
||||||
/* on object private data. not much use for rects, but for polys, images */
|
/* on object private data. not much use for rects, but for polys, images */
|
||||||
|
@ -437,7 +425,7 @@ evas_object_line_is_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_line_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__)
|
evas_object_line_was_inside(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the canvas co-ordinates were inside the object based */
|
/* this returns 1 if the canvas co-ordinates were inside the object based */
|
||||||
/* on object private data. not much use for rects, but for polys, images */
|
/* on object private data. not much use for rects, but for polys, images */
|
||||||
|
@ -446,11 +434,10 @@ evas_object_line_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_line_coords_recalc(Evas_Object *obj)
|
evas_object_line_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Line *o;
|
Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Line *)(obj->object_data);
|
|
||||||
o->cur.cache.x1 = obj->cur.geometry.x + o->cur.x1;
|
o->cur.cache.x1 = obj->cur.geometry.x + o->cur.x1;
|
||||||
o->cur.cache.y1 = obj->cur.geometry.y + o->cur.y1;
|
o->cur.cache.y1 = obj->cur.geometry.y + o->cur.y1;
|
||||||
o->cur.cache.x2 = obj->cur.geometry.x + o->cur.x2;
|
o->cur.cache.x2 = obj->cur.geometry.x + o->cur.x2;
|
||||||
|
@ -458,3 +445,37 @@ evas_object_line_coords_recalc(Evas_Object *obj)
|
||||||
o->cur.cache.object.w = obj->cur.geometry.w;
|
o->cur.cache.object.w = obj->cur.geometry.w;
|
||||||
o->cur.cache.object.h = obj->cur.geometry.h;
|
o->cur.cache.object.h = obj->cur.geometry.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_LINE_ID(EVAS_OBJ_LINE_SUB_ID_XY_SET), _line_xy_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_LINE_ID(EVAS_OBJ_LINE_SUB_ID_XY_GET), _line_xy_get),
|
||||||
|
EO_OP_FUNC_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
eo_class_funcs_set(klass, func_desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_LINE_SUB_ID_XY_SET, "Sets the coordinates of the end points of the given evas line object."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_LINE_SUB_ID_XY_GET, "Retrieves the coordinates of the end points of the given evas line object."),
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Object_Line",
|
||||||
|
EO_CLASS_TYPE_REGULAR,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_LINE_BASE_ID, op_desc, EVAS_OBJ_LINE_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
sizeof(Evas_Object_Line),
|
||||||
|
_class_constructor,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_object_line_class_get, &class_desc, EVAS_OBJ_CLASS, NULL);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,12 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
#include "Eo.h"
|
||||||
|
|
||||||
|
EAPI Eo_Op EVAS_OBJ_POLYGON_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
|
#define MY_CLASS EVAS_OBJ_POLYGON_CLASS
|
||||||
|
|
||||||
/* private magic number for polygon objects */
|
/* private magic number for polygon objects */
|
||||||
static const char o_type[] = "polygon";
|
static const char o_type[] = "polygon";
|
||||||
|
|
||||||
|
@ -10,7 +16,6 @@ typedef struct _Evas_Polygon_Point Evas_Polygon_Point;
|
||||||
|
|
||||||
struct _Evas_Object_Polygon
|
struct _Evas_Object_Polygon
|
||||||
{
|
{
|
||||||
DATA32 magic;
|
|
||||||
Eina_List *points;
|
Eina_List *points;
|
||||||
void *engine_data;
|
void *engine_data;
|
||||||
struct {
|
struct {
|
||||||
|
@ -26,21 +31,20 @@ struct _Evas_Polygon_Point
|
||||||
};
|
};
|
||||||
|
|
||||||
/* private methods for polygon objects */
|
/* private methods for polygon objects */
|
||||||
static void evas_object_polygon_init(Evas_Object *obj);
|
static void evas_object_polygon_init(Evas_Object *eo_obj);
|
||||||
static void *evas_object_polygon_new(void);
|
static void evas_object_polygon_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y);
|
||||||
static void evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
|
static void evas_object_polygon_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_polygon_free(Evas_Object *obj);
|
static void evas_object_polygon_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_polygon_render_pre(Evas_Object *obj);
|
static void evas_object_polygon_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_polygon_render_post(Evas_Object *obj);
|
|
||||||
|
|
||||||
static unsigned int evas_object_polygon_id_get(Evas_Object *obj);
|
static unsigned int evas_object_polygon_id_get(Evas_Object *eo_obj);
|
||||||
static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj);
|
static unsigned int evas_object_polygon_visual_id_get(Evas_Object *eo_obj);
|
||||||
static void *evas_object_polygon_engine_data_get(Evas_Object *obj);
|
static void *evas_object_polygon_engine_data_get(Evas_Object *eo_obj);
|
||||||
|
|
||||||
static int evas_object_polygon_is_opaque(Evas_Object *obj);
|
static int evas_object_polygon_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static int evas_object_polygon_was_opaque(Evas_Object *obj);
|
static int evas_object_polygon_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static int evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
static int evas_object_polygon_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y);
|
||||||
static int evas_object_polygon_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
static int evas_object_polygon_was_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y);
|
||||||
|
|
||||||
static const Evas_Object_Func object_func =
|
static const Evas_Object_Func object_func =
|
||||||
{
|
{
|
||||||
|
@ -71,43 +75,53 @@ static const Evas_Object_Func object_func =
|
||||||
/* the actual api call to add a rect */
|
/* the actual api call to add a rect */
|
||||||
/* it has no other api calls as all properties are standard */
|
/* it has no other api calls as all properties are standard */
|
||||||
|
|
||||||
EVAS_MEMPOOL(_mp_obj);
|
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_polygon_add(Evas *e)
|
evas_object_polygon_add(Evas *e)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
obj = evas_object_new(e);
|
Evas_Object *eo_obj = eo_add(EVAS_OBJ_POLYGON_CLASS, e);
|
||||||
evas_object_polygon_init(obj);
|
eo_unref(eo_obj);
|
||||||
evas_object_inject(obj, e);
|
return eo_obj;
|
||||||
return obj;
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
eo_do_super(eo_obj, eo_constructor());
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_polygon_init(eo_obj);
|
||||||
|
evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj)));
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
evas_object_polygon_point_add(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_polygon_point_add(x, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_polygon_point_add(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
Evas_Object_Polygon *o = _pd;
|
||||||
Evas_Polygon_Point *p;
|
Evas_Polygon_Point *p;
|
||||||
Evas_Coord min_x, max_x, min_y, max_y;
|
Evas_Coord min_x, max_x, min_y, max_y;
|
||||||
int is, was = 0;
|
int is, was = 0;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
Evas_Coord x = va_arg(*list, Evas_Coord);
|
||||||
return;
|
Evas_Coord y = va_arg(*list, Evas_Coord);
|
||||||
MAGIC_CHECK_END();
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON);
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
|
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
if (!obj->layer->evas->is_frozen)
|
||||||
{
|
{
|
||||||
if (!evas_event_passes_through(obj) &&
|
if (!evas_event_passes_through(eo_obj, obj) &&
|
||||||
!evas_event_freezes_through(obj))
|
!evas_event_freezes_through(eo_obj, obj))
|
||||||
was = evas_object_is_in_output_rect(obj,
|
was = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
1, 1);
|
1, 1);
|
||||||
|
@ -166,43 +180,46 @@ evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
|
|
||||||
//// obj->cur.cache.geometry.validity = 0;
|
//// obj->cur.cache.geometry.validity = 0;
|
||||||
o->changed = EINA_TRUE;
|
o->changed = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
evas_object_coords_recalc(obj);
|
evas_object_coords_recalc(eo_obj, obj);
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
if (!obj->layer->evas->is_frozen)
|
||||||
{
|
{
|
||||||
is = evas_object_is_in_output_rect(obj,
|
is = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1);
|
obj->layer->evas->pointer.y, 1, 1);
|
||||||
if (!evas_event_passes_through(obj) &&
|
if (!evas_event_passes_through(eo_obj, obj) &&
|
||||||
!evas_event_freezes_through(obj) )
|
!evas_event_freezes_through(eo_obj, obj) )
|
||||||
{
|
{
|
||||||
if ((is ^ was) && obj->cur.visible)
|
if ((is ^ was) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evas_object_inform_call_move(obj);
|
evas_object_inform_call_move(eo_obj, obj);
|
||||||
evas_object_inform_call_resize(obj);
|
evas_object_inform_call_resize(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_polygon_points_clear(Evas_Object *obj)
|
evas_object_polygon_points_clear(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_obj, evas_obj_polygon_points_clear());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_polygon_points_clear(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
Evas_Object_Polygon *o = _pd;
|
||||||
int is, was;
|
int is, was;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
was = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON);
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
was = evas_object_is_in_output_rect(obj,
|
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1);
|
obj->layer->evas->pointer.y, 1, 1);
|
||||||
while (o->points)
|
while (o->points)
|
||||||
|
@ -216,28 +233,27 @@ evas_object_polygon_points_clear(Evas_Object *obj)
|
||||||
obj->cur.geometry.h = 0;
|
obj->cur.geometry.h = 0;
|
||||||
//// obj->cur.cache.geometry.validity = 0;
|
//// obj->cur.cache.geometry.validity = 0;
|
||||||
o->changed = EINA_TRUE;
|
o->changed = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_clip_dirty(obj);
|
evas_object_clip_dirty(eo_obj, obj);
|
||||||
evas_object_coords_recalc(obj);
|
evas_object_coords_recalc(eo_obj, obj);
|
||||||
is = evas_object_is_in_output_rect(obj,
|
is = evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y, 1, 1);
|
obj->layer->evas->pointer.y, 1, 1);
|
||||||
if ((is || was) && obj->cur.visible)
|
if ((is || was) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
NULL);
|
NULL);
|
||||||
evas_object_inform_call_move(obj);
|
evas_object_inform_call_move(eo_obj, obj);
|
||||||
evas_object_inform_call_resize(obj);
|
evas_object_inform_call_resize(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* all nice and private */
|
/* all nice and private */
|
||||||
static void
|
static void
|
||||||
evas_object_polygon_init(Evas_Object *obj)
|
evas_object_polygon_init(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* alloc image ob, setup methods and default values */
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
obj->object_data = evas_object_polygon_new();
|
|
||||||
/* set up default settings for this kind of object */
|
/* set up default settings for this kind of object */
|
||||||
obj->cur.color.r = 255;
|
obj->cur.color.r = 255;
|
||||||
obj->cur.color.g = 255;
|
obj->cur.color.g = 255;
|
||||||
|
@ -255,30 +271,18 @@ evas_object_polygon_init(Evas_Object *obj)
|
||||||
obj->type = o_type;
|
obj->type = o_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void
|
||||||
evas_object_polygon_new(void)
|
_destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_polygon_free(eo_obj, obj);
|
||||||
/* alloc obj private data */
|
eo_do_super(eo_obj, eo_destructor());
|
||||||
EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_polygon", Evas_Object_Polygon, 4, NULL);
|
|
||||||
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Polygon);
|
|
||||||
if (!o) return NULL;
|
|
||||||
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Polygon);
|
|
||||||
o->magic = MAGIC_OBJ_POLYGON;
|
|
||||||
return o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_polygon_free(Evas_Object *obj)
|
evas_object_polygon_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
/* frees private object data. very simple here */
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON);
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
/* free obj */
|
/* free obj */
|
||||||
while (o->points)
|
while (o->points)
|
||||||
{
|
{
|
||||||
|
@ -288,19 +292,16 @@ evas_object_polygon_free(Evas_Object *obj)
|
||||||
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
|
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
|
||||||
obj->layer->evas->engine.data.context,
|
obj->layer->evas->engine.data.context,
|
||||||
o->engine_data);
|
o->engine_data);
|
||||||
o->magic = 0;
|
|
||||||
EVAS_MEMPOOL_FREE(_mp_obj, o);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
|
evas_object_polygon_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Polygon_Point *p;
|
Evas_Polygon_Point *p;
|
||||||
|
|
||||||
/* render object to surface with context, and offxet by x,y */
|
/* render object to surface with context, and offxet by x,y */
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
obj->layer->evas->engine.func->context_color_set(output,
|
obj->layer->evas->engine.func->context_color_set(output,
|
||||||
context,
|
context,
|
||||||
obj->cur.cache.clip.r,
|
obj->cur.cache.clip.r,
|
||||||
|
@ -336,9 +337,9 @@ evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_polygon_render_pre(Evas_Object *obj)
|
evas_object_polygon_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
int is_v, was_v;
|
int is_v, was_v;
|
||||||
|
|
||||||
/* dont pre-render the obj twice! */
|
/* dont pre-render the obj twice! */
|
||||||
|
@ -349,43 +350,44 @@ evas_object_polygon_render_pre(Evas_Object *obj)
|
||||||
/* elsewhere, decoding video etc. */
|
/* elsewhere, decoding video etc. */
|
||||||
/* then when this is done the object needs to figure if it changed and */
|
/* then when this is done the object needs to figure if it changed and */
|
||||||
/* if so what and where and add the appropriate redraw lines */
|
/* if so what and where and add the appropriate redraw lines */
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
/* if someone is clipping this obj - go calculate the clipper */
|
/* if someone is clipping this obj - go calculate the clipper */
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *cur_clipper = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
if (obj->cur.cache.clip.dirty)
|
if (obj->cur.cache.clip.dirty)
|
||||||
evas_object_clip_recalc(obj->cur.clipper);
|
evas_object_clip_recalc(obj->cur.clipper, cur_clipper);
|
||||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
cur_clipper->func->render_pre(obj->cur.clipper, cur_clipper);
|
||||||
}
|
}
|
||||||
/* now figure what changed and add draw rects */
|
/* now figure what changed and add draw rects */
|
||||||
/* if it just became visible or invisible */
|
/* if it just became visible or invisible */
|
||||||
is_v = evas_object_is_visible(obj);
|
is_v = evas_object_is_visible(eo_obj, obj);
|
||||||
was_v = evas_object_was_visible(obj);
|
was_v = evas_object_was_visible(eo_obj, obj);
|
||||||
if (is_v != was_v)
|
if (is_v != was_v)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (obj->changed_map)
|
if (obj->changed_map)
|
||||||
|
if ((obj->cur.map != obj->prev.map) ||
|
||||||
|
(obj->cur.usemap != obj->prev.usemap))
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
obj);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* it's not visible - we accounted for it appearing or not so just abort */
|
/* it's not visible - we accounted for it appearing or not so just abort */
|
||||||
if (!is_v) goto done;
|
if (!is_v) goto done;
|
||||||
/* clipper changed this is in addition to anything else for obj */
|
/* clipper changed this is in addition to anything else for obj */
|
||||||
evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, eo_obj);
|
||||||
/* if we restacked (layer or just within a layer) */
|
/* if we restacked (layer or just within a layer) */
|
||||||
if (obj->restack)
|
if (obj->restack)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* if it changed render op */
|
/* if it changed render op */
|
||||||
if (obj->cur.render_op != obj->prev.render_op)
|
if (obj->cur.render_op != obj->prev.render_op)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* if it changed color */
|
/* if it changed color */
|
||||||
|
@ -394,7 +396,7 @@ evas_object_polygon_render_pre(Evas_Object *obj)
|
||||||
(obj->cur.color.b != obj->prev.color.b) ||
|
(obj->cur.color.b != obj->prev.color.b) ||
|
||||||
(obj->cur.color.a != obj->prev.color.a))
|
(obj->cur.color.a != obj->prev.color.a))
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* if it changed geometry - and obviously not visibility or color */
|
/* if it changed geometry - and obviously not visibility or color */
|
||||||
|
@ -406,7 +408,7 @@ evas_object_polygon_render_pre(Evas_Object *obj)
|
||||||
(obj->cur.geometry.h != obj->prev.geometry.h) ||
|
(obj->cur.geometry.h != obj->prev.geometry.h) ||
|
||||||
(o->changed))
|
(o->changed))
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
|
@ -424,54 +426,46 @@ evas_object_polygon_render_pre(Evas_Object *obj)
|
||||||
o->offset.y += obj->cur.geometry.y - o->geometry.y;
|
o->offset.y += obj->cur.geometry.y - o->geometry.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_polygon_render_post(Evas_Object *obj)
|
evas_object_polygon_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
/* this moves the current data to the previous state parts of the object */
|
/* this moves the current data to the previous state parts of the object */
|
||||||
/* in whatever way is safest for the object. also if we don't need object */
|
/* in whatever way is safest for the object. also if we don't need object */
|
||||||
/* data anymore we can free it if the object deems this is a good idea */
|
/* data anymore we can free it if the object deems this is a good idea */
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
/* remove those pesky changes */
|
/* remove those pesky changes */
|
||||||
evas_object_clip_changes_clean(obj);
|
evas_object_clip_changes_clean(eo_obj);
|
||||||
/* move cur to prev safely for object data */
|
/* move cur to prev safely for object data */
|
||||||
evas_object_cur_prev(obj);
|
evas_object_cur_prev(eo_obj);
|
||||||
o->changed = 0;
|
o->changed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int evas_object_polygon_id_get(Evas_Object *obj)
|
static unsigned int evas_object_polygon_id_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
if (!o) return 0;
|
||||||
return MAGIC_OBJ_POLYGON;
|
return MAGIC_OBJ_POLYGON;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj)
|
static unsigned int evas_object_polygon_visual_id_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
if (!o) return 0;
|
||||||
return MAGIC_OBJ_SHAPE;
|
return MAGIC_OBJ_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *evas_object_polygon_engine_data_get(Evas_Object *obj)
|
static void *evas_object_polygon_engine_data_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
if (!o) return NULL;
|
|
||||||
return o->engine_data;
|
return o->engine_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_polygon_is_opaque(Evas_Object *obj __UNUSED__)
|
evas_object_polygon_is_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data implies that the object is */
|
/* this returns 1 if the internal object data implies that the object is */
|
||||||
/* currently fully opaque over the entire line it occupies */
|
/* currently fully opaque over the entire line it occupies */
|
||||||
|
@ -479,7 +473,7 @@ evas_object_polygon_is_opaque(Evas_Object *obj __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_polygon_was_opaque(Evas_Object *obj __UNUSED__)
|
evas_object_polygon_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data implies that the object was */
|
/* this returns 1 if the internal object data implies that the object was */
|
||||||
/* previously fully opaque over the entire line it occupies */
|
/* previously fully opaque over the entire line it occupies */
|
||||||
|
@ -490,15 +484,13 @@ evas_object_polygon_was_opaque(Evas_Object *obj __UNUSED__)
|
||||||
* intersects with. If it's even, we are outside of the polygon, if it's odd,
|
* intersects with. If it's even, we are outside of the polygon, if it's odd,
|
||||||
* we are inside of it. */
|
* we are inside of it. */
|
||||||
static int
|
static int
|
||||||
evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
evas_object_polygon_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
Evas_Object_Polygon *o;
|
Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
int num_edges = 0; /* Number of edges we crossed */
|
int num_edges = 0; /* Number of edges we crossed */
|
||||||
Eina_List *itr;
|
Eina_List *itr;
|
||||||
Evas_Polygon_Point *p;
|
Evas_Polygon_Point *p;
|
||||||
|
|
||||||
o = (Evas_Object_Polygon *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
|
||||||
if (!o->points) return 0;
|
if (!o->points) return 0;
|
||||||
|
|
||||||
/* Adjust X and Y according to current geometry */
|
/* Adjust X and Y according to current geometry */
|
||||||
|
@ -545,10 +537,44 @@ evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_polygon_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__)
|
evas_object_polygon_was_inside(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the canvas co-ordinates were inside the object based */
|
/* this returns 1 if the canvas co-ordinates were inside the object based */
|
||||||
/* on object private data. not much use for rects, but for polys, images */
|
/* on object private data. not much use for rects, but for polys, images */
|
||||||
/* and other complex objects it might be */
|
/* and other complex objects it might be */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_POLYGON_ID(EVAS_OBJ_POLYGON_SUB_ID_POINT_ADD), _polygon_point_add),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_POLYGON_ID(EVAS_OBJ_POLYGON_SUB_ID_POINTS_CLEAR), _polygon_points_clear),
|
||||||
|
EO_OP_FUNC_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
eo_class_funcs_set(klass, func_desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_POLYGON_SUB_ID_POINT_ADD, "Adds the given point to the given evas polygon object."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_POLYGON_SUB_ID_POINTS_CLEAR, "Removes all of the points from the given evas polygon object."),
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Object_Polygon",
|
||||||
|
EO_CLASS_TYPE_REGULAR,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_POLYGON_BASE_ID, op_desc, EVAS_OBJ_POLYGON_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
sizeof(Evas_Object_Polygon),
|
||||||
|
_class_constructor,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_object_polygon_class_get, &class_desc, EVAS_OBJ_CLASS, NULL);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
#include "Eo.h"
|
||||||
|
|
||||||
|
EAPI Eo_Op EVAS_OBJ_RECTANGLE_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
|
#define MY_CLASS EVAS_OBJ_RECTANGLE_CLASS
|
||||||
|
|
||||||
/* private magic number for rectangle objects */
|
/* private magic number for rectangle objects */
|
||||||
static const char o_type[] = "rectangle";
|
static const char o_type[] = "rectangle";
|
||||||
|
|
||||||
|
@ -11,38 +17,35 @@ typedef struct _Evas_Object_Rectangle Evas_Object_Rectangle;
|
||||||
|
|
||||||
struct _Evas_Object_Rectangle
|
struct _Evas_Object_Rectangle
|
||||||
{
|
{
|
||||||
DATA32 magic;
|
|
||||||
void *engine_data;
|
void *engine_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* private methods for rectangle objects */
|
/* private methods for rectangle objects */
|
||||||
static void evas_object_rectangle_init(Evas_Object *obj);
|
static void evas_object_rectangle_init(Evas_Object *eo_obj);
|
||||||
static void *evas_object_rectangle_new(void);
|
static void evas_object_rectangle_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y);
|
||||||
static void evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
|
static void evas_object_rectangle_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_rectangle_free(Evas_Object *obj);
|
static void evas_object_rectangle_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static void evas_object_rectangle_render_pre(Evas_Object *obj);
|
|
||||||
static void evas_object_rectangle_render_post(Evas_Object *obj);
|
|
||||||
|
|
||||||
static unsigned int evas_object_rectangle_id_get(Evas_Object *obj);
|
static unsigned int evas_object_rectangle_id_get(Evas_Object *eo_obj);
|
||||||
static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj);
|
static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *eo_obj);
|
||||||
static void *evas_object_rectangle_engine_data_get(Evas_Object *obj);
|
static void *evas_object_rectangle_engine_data_get(Evas_Object *eo_obj);
|
||||||
|
|
||||||
static int evas_object_rectangle_is_opaque(Evas_Object *obj);
|
static int evas_object_rectangle_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
static int evas_object_rectangle_was_opaque(Evas_Object *obj);
|
static int evas_object_rectangle_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
||||||
|
|
||||||
#if 0 /* usless calls for a rect object. much more useful for images etc. */
|
#if 0 /* usless calls for a rect object. much more useful for images etc. */
|
||||||
static void evas_object_rectangle_store(Evas_Object *obj);
|
static void evas_object_rectangle_store(Evas_Object *eo_obj);
|
||||||
static void evas_object_rectangle_unstore(Evas_Object *obj);
|
static void evas_object_rectangle_unstore(Evas_Object *eo_obj);
|
||||||
static int evas_object_rectangle_is_visible(Evas_Object *obj);
|
static int evas_object_rectangle_is_visible(Evas_Object *eo_obj);
|
||||||
static int evas_object_rectangle_was_visible(Evas_Object *obj);
|
static int evas_object_rectangle_was_visible(Evas_Object *eo_obj);
|
||||||
static int evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y);
|
static int evas_object_rectangle_is_inside(Evas_Object *eo_obj, double x, double y);
|
||||||
static int evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y);
|
static int evas_object_rectangle_was_inside(Evas_Object *eo_obj, double x, double y);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const Evas_Object_Func object_func =
|
static const Evas_Object_Func object_func =
|
||||||
{
|
{
|
||||||
/* methods (compulsory) */
|
/* methods (compulsory) */
|
||||||
evas_object_rectangle_free,
|
NULL,
|
||||||
evas_object_rectangle_render,
|
evas_object_rectangle_render,
|
||||||
evas_object_rectangle_render_pre,
|
evas_object_rectangle_render_pre,
|
||||||
evas_object_rectangle_render_post,
|
evas_object_rectangle_render_post,
|
||||||
|
@ -68,28 +71,32 @@ static const Evas_Object_Func object_func =
|
||||||
/* the actual api call to add a rect */
|
/* the actual api call to add a rect */
|
||||||
/* it has no other api calls as all properties are standard */
|
/* it has no other api calls as all properties are standard */
|
||||||
|
|
||||||
EVAS_MEMPOOL(_mp_obj);
|
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_rectangle_add(Evas *e)
|
evas_object_rectangle_add(Evas *e)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
obj = evas_object_new(e);
|
Evas_Object *eo_obj = eo_add(EVAS_OBJ_RECTANGLE_CLASS, e);
|
||||||
evas_object_rectangle_init(obj);
|
eo_unref(eo_obj);
|
||||||
evas_object_inject(obj, e);
|
return eo_obj;
|
||||||
return obj;
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
eo_do_super(eo_obj, eo_constructor());
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
evas_object_rectangle_init(eo_obj);
|
||||||
|
evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* all nice and private */
|
/* all nice and private */
|
||||||
static void
|
static void
|
||||||
evas_object_rectangle_init(Evas_Object *obj)
|
evas_object_rectangle_init(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* alloc image ob, setup methods and default values */
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
obj->object_data = evas_object_rectangle_new();
|
|
||||||
/* set up default settings for this kind of object */
|
/* set up default settings for this kind of object */
|
||||||
obj->cur.color.r = 255;
|
obj->cur.color.r = 255;
|
||||||
obj->cur.color.g = 255;
|
obj->cur.color.g = 255;
|
||||||
|
@ -108,37 +115,14 @@ evas_object_rectangle_init(Evas_Object *obj)
|
||||||
obj->type = o_type;
|
obj->type = o_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void
|
||||||
evas_object_rectangle_new(void)
|
_destructor(Eo *eo_obj, void *_obj EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object_Rectangle *o;
|
eo_do_super(eo_obj, eo_destructor());
|
||||||
|
|
||||||
/* alloc obj private data */
|
|
||||||
EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 16, NULL);
|
|
||||||
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Rectangle);
|
|
||||||
if (!o) return NULL;
|
|
||||||
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Rectangle);
|
|
||||||
o->magic = MAGIC_OBJ_RECTANGLE;
|
|
||||||
return o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_rectangle_free(Evas_Object *obj)
|
evas_object_rectangle_render(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y)
|
||||||
{
|
|
||||||
Evas_Object_Rectangle *o;
|
|
||||||
|
|
||||||
/* frees private object data. very simple here */
|
|
||||||
o = (Evas_Object_Rectangle *)(obj->object_data);
|
|
||||||
MAGIC_CHECK(o, Evas_Object_Rectangle, MAGIC_OBJ_RECTANGLE);
|
|
||||||
return;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
/* free obj */
|
|
||||||
o->magic = 0;
|
|
||||||
EVAS_MEMPOOL_FREE(_mp_obj, o);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
|
|
||||||
{
|
{
|
||||||
/* render object to surface with context, and offxet by x,y */
|
/* render object to surface with context, and offxet by x,y */
|
||||||
obj->layer->evas->engine.func->context_color_set(output,
|
obj->layer->evas->engine.func->context_color_set(output,
|
||||||
|
@ -165,7 +149,7 @@ evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_rectangle_render_pre(Evas_Object *obj)
|
evas_object_rectangle_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
int is_v, was_v;
|
int is_v, was_v;
|
||||||
|
|
||||||
|
@ -180,40 +164,40 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
||||||
/* if someone is clipping this obj - go calculate the clipper */
|
/* if someone is clipping this obj - go calculate the clipper */
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *cur_clipper_obj = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
if (obj->cur.cache.clip.dirty)
|
if (obj->cur.cache.clip.dirty)
|
||||||
evas_object_clip_recalc(obj->cur.clipper);
|
evas_object_clip_recalc(obj->cur.clipper, cur_clipper_obj);
|
||||||
obj->cur.clipper->func->render_pre(obj->cur.clipper);
|
cur_clipper_obj->func->render_pre(obj->cur.clipper, cur_clipper_obj);
|
||||||
}
|
}
|
||||||
/* now figure what changed and add draw rects */
|
/* now figure what changed and add draw rects */
|
||||||
/* if it just became visible or invisible */
|
/* if it just became visible or invisible */
|
||||||
is_v = evas_object_is_visible(obj);
|
is_v = evas_object_is_visible(eo_obj, obj);
|
||||||
was_v = evas_object_was_visible(obj);
|
was_v = evas_object_was_visible(eo_obj,obj);
|
||||||
if (!(is_v | was_v)) goto done;
|
if (!(is_v | was_v)) goto done;
|
||||||
if (is_v != was_v)
|
if (is_v != was_v)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (obj->changed_map)
|
if (obj->changed_map)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
obj);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* it's not visible - we accounted for it appearing or not so just abort */
|
/* it's not visible - we accounted for it appearing or not so just abort */
|
||||||
if (!is_v) goto done;
|
if (!is_v) goto done;
|
||||||
/* clipper changed this is in addition to anything else for obj */
|
/* clipper changed this is in addition to anything else for obj */
|
||||||
evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, eo_obj);
|
||||||
/* if we restacked (layer or just within a layer) and don't clip anyone */
|
/* if we restacked (layer or just within a layer) and don't clip anyone */
|
||||||
if ((obj->restack) && (!obj->clip.clipees))
|
if ((obj->restack) && (!obj->clip.clipees))
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* if it changed render op */
|
/* if it changed render op */
|
||||||
if (obj->cur.render_op != obj->prev.render_op)
|
if (obj->cur.render_op != obj->prev.render_op)
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* if it changed color */
|
/* if it changed color */
|
||||||
|
@ -222,7 +206,7 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
||||||
(obj->cur.color.b != obj->prev.color.b) ||
|
(obj->cur.color.b != obj->prev.color.b) ||
|
||||||
(obj->cur.color.a != obj->prev.color.a))
|
(obj->cur.color.a != obj->prev.color.a))
|
||||||
{
|
{
|
||||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
|
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* if it changed geometry - and obviously not visibility or color */
|
/* if it changed geometry - and obviously not visibility or color */
|
||||||
|
@ -256,8 +240,8 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
||||||
/* area so if there were updates for it they get wiped. don't do it if we */
|
/* area so if there were updates for it they get wiped. don't do it if we */
|
||||||
/* arent fully opaque and we are visible */
|
/* arent fully opaque and we are visible */
|
||||||
/*
|
/*
|
||||||
if (evas_object_is_visible(obj) &&
|
if (evas_object_is_visible(eo_obj) &&
|
||||||
evas_object_is_opaque(obj) &&
|
evas_object_is_opaque(eo_obj) &&
|
||||||
(!obj->clip.clipees))
|
(!obj->clip.clipees))
|
||||||
obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output,
|
obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output,
|
||||||
obj->cur.cache.clip.x,
|
obj->cur.cache.clip.x,
|
||||||
|
@ -266,24 +250,24 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
||||||
obj->cur.cache.clip.h);
|
obj->cur.cache.clip.h);
|
||||||
*/
|
*/
|
||||||
done:
|
done:
|
||||||
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
|
evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_rectangle_render_post(Evas_Object *obj)
|
evas_object_rectangle_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* this moves the current data to the previous state parts of the object */
|
/* this moves the current data to the previous state parts of the object */
|
||||||
/* in whatever way is safest for the object. also if we don't need object */
|
/* in whatever way is safest for the object. also if we don't need object */
|
||||||
/* data anymore we can free it if the object deems this is a good idea */
|
/* data anymore we can free it if the object deems this is a good idea */
|
||||||
/* remove those pesky changes */
|
/* remove those pesky changes */
|
||||||
evas_object_clip_changes_clean(obj);
|
evas_object_clip_changes_clean(eo_obj);
|
||||||
/* move cur to prev safely for object data */
|
/* move cur to prev safely for object data */
|
||||||
evas_object_cur_prev(obj);
|
evas_object_cur_prev(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_rectangle_is_opaque(Evas_Object *obj)
|
evas_object_rectangle_is_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data implies that the object is */
|
/* this returns 1 if the internal object data implies that the object is */
|
||||||
/* currently fully opaque over the entire rectangle it occupies */
|
/* currently fully opaque over the entire rectangle it occupies */
|
||||||
|
@ -296,7 +280,7 @@ evas_object_rectangle_is_opaque(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_rectangle_was_opaque(Evas_Object *obj)
|
evas_object_rectangle_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data implies that the object was */
|
/* this returns 1 if the internal object data implies that the object was */
|
||||||
/* previously fully opaque over the entire rectangle it occupies */
|
/* previously fully opaque over the entire rectangle it occupies */
|
||||||
|
@ -307,37 +291,59 @@ evas_object_rectangle_was_opaque(Evas_Object *obj)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int evas_object_rectangle_id_get(Evas_Object *obj)
|
static unsigned int evas_object_rectangle_id_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Rectangle *o;
|
Evas_Object_Rectangle *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Rectangle *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
if (!o) return 0;
|
||||||
return MAGIC_OBJ_RECTANGLE;
|
return MAGIC_OBJ_RECTANGLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj)
|
static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Rectangle *o;
|
Evas_Object_Rectangle *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Rectangle *)(obj->object_data);
|
|
||||||
if (!o) return 0;
|
if (!o) return 0;
|
||||||
return MAGIC_OBJ_SHAPE;
|
return MAGIC_OBJ_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *evas_object_rectangle_engine_data_get(Evas_Object *obj)
|
static void *evas_object_rectangle_engine_data_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Rectangle *o;
|
Evas_Object_Rectangle *o = eo_data_get(eo_obj, MY_CLASS);
|
||||||
|
|
||||||
o = (Evas_Object_Rectangle *)(obj->object_data);
|
|
||||||
if (!o) return NULL;
|
|
||||||
return o->engine_data;
|
return o->engine_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
|
||||||
|
EO_OP_FUNC_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
eo_class_funcs_set(klass, func_desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Object_Rectangle",
|
||||||
|
EO_CLASS_TYPE_REGULAR,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_RECTANGLE_BASE_ID, op_desc, EVAS_OBJ_RECTANGLE_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
sizeof(Evas_Object_Rectangle),
|
||||||
|
_class_constructor,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_object_rectangle_class_get, &class_desc, EVAS_OBJ_CLASS, NULL);
|
||||||
|
|
||||||
|
|
||||||
#if 0 /* usless calls for a rect object. much more useful for images etc. */
|
#if 0 /* usless calls for a rect object. much more useful for images etc. */
|
||||||
static void
|
static void
|
||||||
evas_object_rectangle_store(Evas_Object *obj)
|
evas_object_rectangle_store(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* store... nothing for rectangle objects... it's a bit silly */
|
/* store... nothing for rectangle objects... it's a bit silly */
|
||||||
/* but for others that may have expensive caluclations to do to */
|
/* but for others that may have expensive caluclations to do to */
|
||||||
|
@ -346,13 +352,13 @@ evas_object_rectangle_store(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_rectangle_unstore(Evas_Object *obj)
|
evas_object_rectangle_unstore(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* store... nothing for rectangle objects... it's a bit silly */
|
/* store... nothing for rectangle objects... it's a bit silly */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_rectangle_is_visible(Evas_Object *obj)
|
evas_object_rectangle_is_visible(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data would imply that it is */
|
/* this returns 1 if the internal object data would imply that it is */
|
||||||
/* visible (ie drawing it draws something. this is not to do with events */
|
/* visible (ie drawing it draws something. this is not to do with events */
|
||||||
|
@ -360,7 +366,7 @@ evas_object_rectangle_is_visible(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_rectangle_was_visible(Evas_Object *obj)
|
evas_object_rectangle_was_visible(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the internal object data would imply that it was */
|
/* this returns 1 if the internal object data would imply that it was */
|
||||||
/* visible (ie drawing it draws something. this is not to do with events */
|
/* visible (ie drawing it draws something. this is not to do with events */
|
||||||
|
@ -368,7 +374,7 @@ evas_object_rectangle_was_visible(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y)
|
evas_object_rectangle_is_inside(Evas_Object *eo_obj, double x, double y)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the canvas co-ordinates are inside the object based */
|
/* this returns 1 if the canvas co-ordinates are inside the object based */
|
||||||
/* on object private data. not much use for rects, but for polys, images */
|
/* on object private data. not much use for rects, but for polys, images */
|
||||||
|
@ -377,7 +383,7 @@ evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y)
|
evas_object_rectangle_was_inside(Evas_Object *eo_obj, double x, double y)
|
||||||
{
|
{
|
||||||
/* this returns 1 if the canvas co-ordinates were inside the object based */
|
/* this returns 1 if the canvas co-ordinates were inside the object based */
|
||||||
/* on object private data. not much use for rects, but for polys, images */
|
/* on object private data. not much use for rects, but for polys, images */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,20 +1,38 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
#define CSO_DATA_GET_OR_RETURN(obj, ptr) \
|
EAPI Eo_Op EVAS_OBJ_SMART_CLIPPED_BASE_ID = EO_NOOP;
|
||||||
Evas_Object_Smart_Clipped_Data *ptr = evas_object_smart_data_get(obj); \
|
|
||||||
|
#define MY_CLASS EVAS_OBJ_SMART_CLIPPED_CLASS
|
||||||
|
|
||||||
|
#define CSO_DATA_GET(eo_obj, ptr) \
|
||||||
|
Evas_Object_Smart_Clipped_Data *ptr = (eo_isa(eo_obj, MY_CLASS) ? \
|
||||||
|
eo_data_get(eo_obj, MY_CLASS) : \
|
||||||
|
evas_object_smart_data_get(eo_obj));
|
||||||
|
|
||||||
|
#define CSO_DATA_GET_OR_RETURN(eo_obj, ptr) \
|
||||||
|
CSO_DATA_GET(eo_obj, ptr) \
|
||||||
if (!ptr) return;
|
if (!ptr) return;
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
|
evas_object_smart_move_children_relative(Evas_Object *eo_obj, Evas_Coord dx, Evas_Coord dy)
|
||||||
{
|
{
|
||||||
|
eo_do(eo_obj, evas_obj_smart_move_children_relative(dx, dy));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_smart_move_children_relative(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Coord dx = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord dy = va_arg(*list, Evas_Coord);
|
||||||
|
|
||||||
const Eina_Inlist *lst;
|
const Eina_Inlist *lst;
|
||||||
Evas_Object *child;
|
Evas_Object_Protected_Data *child;
|
||||||
|
|
||||||
if ((dx == 0) && (dy == 0))
|
if ((dx == 0) && (dy == 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lst = evas_object_smart_members_get_direct(obj);
|
lst = evas_object_smart_members_get_direct(eo_obj);
|
||||||
EINA_INLIST_FOREACH(lst, child)
|
EINA_INLIST_FOREACH(lst, child)
|
||||||
{
|
{
|
||||||
Evas_Coord orig_x, orig_y;
|
Evas_Coord orig_x, orig_y;
|
||||||
|
@ -25,35 +43,43 @@ evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_C
|
||||||
if (child->is_static_clip) continue;
|
if (child->is_static_clip) continue;
|
||||||
orig_x = child->cur.geometry.x;
|
orig_x = child->cur.geometry.x;
|
||||||
orig_y = child->cur.geometry.y;
|
orig_y = child->cur.geometry.y;
|
||||||
evas_object_move(child, orig_x + dx, orig_y + dy);
|
evas_object_move(child->object, orig_x + dx, orig_y + dy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_smart_clipped_clipper_get(Evas_Object *obj)
|
evas_object_smart_clipped_clipper_get(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(obj);
|
Evas_Object *ret = NULL;
|
||||||
if (!cso)
|
eo_do((Eo *)eo_obj, evas_obj_smart_clipped_clipper_get(&ret));
|
||||||
return NULL;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return cso->clipper;
|
void
|
||||||
|
_smart_clipped_clipper_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
CSO_DATA_GET(eo_obj, cso)
|
||||||
|
if (!cso)
|
||||||
|
*ret = NULL;
|
||||||
|
else
|
||||||
|
*ret = cso->clipper;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_add(Evas_Object *obj)
|
evas_object_smart_clipped_smart_add(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Smart_Clipped_Data *cso;
|
|
||||||
Evas_Object *clipper;
|
Evas_Object *clipper;
|
||||||
|
|
||||||
cso = evas_object_smart_data_get(obj);
|
CSO_DATA_GET(eo_obj, cso)
|
||||||
if (!cso)
|
if (!cso)
|
||||||
cso = calloc(1, sizeof(*cso)); /* users can provide it or realloc() later */
|
cso = calloc(1, sizeof(*cso)); /* users can provide it or realloc() later */
|
||||||
|
|
||||||
cso->evas = evas_object_evas_get(obj);
|
cso->evas = evas_object_evas_get(eo_obj);
|
||||||
clipper = evas_object_rectangle_add(cso->evas);
|
clipper = evas_object_rectangle_add(cso->evas);
|
||||||
evas_object_static_clip_set(clipper, 1);
|
evas_object_static_clip_set(clipper, 1);
|
||||||
cso->clipper = NULL;
|
cso->clipper = NULL;
|
||||||
evas_object_smart_member_add(clipper, obj);
|
evas_object_smart_member_add(clipper, eo_obj);
|
||||||
cso->clipper = clipper;
|
cso->clipper = clipper;
|
||||||
evas_object_color_set(cso->clipper, 255, 255, 255, 255);
|
evas_object_color_set(cso->clipper, 255, 255, 255, 255);
|
||||||
evas_object_move(cso->clipper, -100000, -100000);
|
evas_object_move(cso->clipper, -100000, -100000);
|
||||||
|
@ -61,13 +87,19 @@ evas_object_smart_clipped_smart_add(Evas_Object *obj)
|
||||||
evas_object_pass_events_set(cso->clipper, 1);
|
evas_object_pass_events_set(cso->clipper, 1);
|
||||||
evas_object_hide(cso->clipper); /* show when have something clipped to it */
|
evas_object_hide(cso->clipper); /* show when have something clipped to it */
|
||||||
|
|
||||||
evas_object_smart_data_set(obj, cso);
|
evas_object_smart_data_set(eo_obj, cso);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_del(Evas_Object *obj)
|
_smart_add(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
evas_object_smart_clipped_smart_add(eo_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_del(Evas_Object *eo_obj)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
|
|
||||||
if (cso->clipper)
|
if (cso->clipper)
|
||||||
{
|
{
|
||||||
|
@ -76,72 +108,128 @@ evas_object_smart_clipped_smart_del(Evas_Object *obj)
|
||||||
evas_object_del(clipper);
|
evas_object_del(clipper);
|
||||||
}
|
}
|
||||||
|
|
||||||
_evas_object_smart_members_all_del(obj);
|
_evas_object_smart_members_all_del(eo_obj);
|
||||||
|
|
||||||
free(cso);
|
evas_object_smart_data_set(eo_obj, NULL);
|
||||||
evas_object_smart_data_set(obj, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
_smart_del(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
evas_object_smart_clipped_smart_del(eo_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
Evas_Coord orig_x, orig_y;
|
Evas_Coord orig_x, orig_y;
|
||||||
|
|
||||||
evas_object_geometry_get(obj, &orig_x, &orig_y, NULL, NULL);
|
evas_object_geometry_get(eo_obj, &orig_x, &orig_y, NULL, NULL);
|
||||||
evas_object_smart_move_children_relative(obj, x - orig_x, y - orig_y);
|
evas_object_smart_move_children_relative(eo_obj, x - orig_x, y - orig_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_show(Evas_Object *obj)
|
_smart_move(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
Evas_Coord x = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord y = va_arg(*list, Evas_Coord);
|
||||||
|
evas_object_smart_clipped_smart_move(eo_obj, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_show(Evas_Object *eo_obj)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
if (evas_object_clipees_get(cso->clipper))
|
if (evas_object_clipees_get(cso->clipper))
|
||||||
evas_object_show(cso->clipper); /* just show if clipper being used */
|
evas_object_show(cso->clipper); /* just show if clipper being used */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_hide(Evas_Object *obj)
|
_smart_show(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
evas_object_smart_clipped_smart_show(eo_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_hide(Evas_Object *eo_obj)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
evas_object_hide(cso->clipper);
|
evas_object_hide(cso->clipper);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
_smart_hide(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
evas_object_smart_clipped_smart_hide(eo_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_color_set(Evas_Object *eo_obj, int r, int g, int b, int a)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
evas_object_color_set(cso->clipper, r, g, b, a);
|
evas_object_color_set(cso->clipper, r, g, b, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
|
_smart_color_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
int r = va_arg(*list, int);
|
||||||
|
int g = va_arg(*list, int);
|
||||||
|
int b = va_arg(*list, int);
|
||||||
|
int a = va_arg(*list, int);
|
||||||
|
evas_object_smart_clipped_smart_color_set(eo_obj, r, g, b, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_clip_set(Evas_Object *eo_obj, Evas_Object *clip)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
evas_object_clip_set(cso->clipper, clip);
|
evas_object_clip_set(cso->clipper, clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_clip_unset(Evas_Object *obj)
|
_smart_clip_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
Evas_Object *clip = va_arg(*list, Evas_Object *);
|
||||||
|
evas_object_smart_clipped_smart_clip_set(eo_obj, clip);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_clip_unset(Evas_Object *eo_obj)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
evas_object_clip_unset(cso->clipper);
|
evas_object_clip_unset(cso->clipper);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_member_add(Evas_Object *obj, Evas_Object *member)
|
_smart_clip_unset(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
evas_object_smart_clipped_smart_clip_unset(eo_obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_member_add(Evas_Object *eo_obj, Evas_Object *member)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
if (!cso->clipper || member == cso->clipper)
|
if (!cso->clipper || member == cso->clipper)
|
||||||
return;
|
return;
|
||||||
evas_object_clip_set(member, cso->clipper);
|
evas_object_clip_set(member, cso->clipper);
|
||||||
if (evas_object_visible_get(obj))
|
if (evas_object_visible_get(eo_obj))
|
||||||
evas_object_show(cso->clipper);
|
evas_object_show(cso->clipper);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member)
|
_smart_member_add(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
CSO_DATA_GET_OR_RETURN(obj, cso);
|
Evas_Object *member = va_arg(*list, Evas_Object *);
|
||||||
|
eo_do_super(eo_obj, evas_obj_smart_member_add(member));
|
||||||
|
evas_object_smart_clipped_smart_member_add(eo_obj, member);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
evas_object_smart_clipped_smart_member_del(Evas_Object *eo_obj, Evas_Object *member)
|
||||||
|
{
|
||||||
|
CSO_DATA_GET_OR_RETURN(eo_obj, cso);
|
||||||
if (!cso->clipper)
|
if (!cso->clipper)
|
||||||
return;
|
return;
|
||||||
evas_object_clip_unset(member);
|
evas_object_clip_unset(member);
|
||||||
|
@ -149,6 +237,14 @@ evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member
|
||||||
evas_object_hide(cso->clipper);
|
evas_object_hide(cso->clipper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_smart_member_del(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object *member = va_arg(*list, Evas_Object *);
|
||||||
|
evas_object_smart_clipped_smart_member_del(eo_obj, member);
|
||||||
|
eo_do_super(eo_obj, evas_obj_smart_member_del(member));
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
|
evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
|
||||||
{
|
{
|
||||||
|
@ -181,3 +277,60 @@ evas_object_smart_clipped_class_get(void)
|
||||||
class = &_sc;
|
class = &_sc;
|
||||||
return class;
|
return class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_type_check(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
const char *type = va_arg(*list, const char *);
|
||||||
|
Eina_Bool *type_check = va_arg(*list, Eina_Bool *);
|
||||||
|
if (0 == strcmp(type, "EvasObjectSmartClipped"))
|
||||||
|
*type_check = EINA_TRUE;
|
||||||
|
else
|
||||||
|
eo_do_super(eo_obj, evas_obj_type_check(type, type_check));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
eo_do_super(eo_obj, eo_constructor());
|
||||||
|
}
|
||||||
|
|
||||||
|
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(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_TYPE_CHECK), _type_check),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _smart_add),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _smart_del),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _smart_move),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _smart_show),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_HIDE), _smart_hide),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_COLOR_SET), _smart_color_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_CLIP_SET), _smart_clip_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_CLIP_UNSET), _smart_clip_unset),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MEMBER_ADD), _smart_member_add),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MEMBER_DEL), _smart_member_del),
|
||||||
|
EO_OP_FUNC_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
eo_class_funcs_set(klass, func_desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Object_Smart_Clipped",
|
||||||
|
EO_CLASS_TYPE_REGULAR,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_SMART_CLIPPED_BASE_ID, op_desc, EVAS_OBJ_SMART_CLIPPED_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
sizeof(Evas_Object_Smart_Clipped_Data),
|
||||||
|
_class_constructor,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_object_smart_clipped_eo_class_get, &class_desc, EVAS_OBJ_SMART_CLASS, NULL);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
|
#include "evas_private.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <Eo.h>
|
||||||
|
|
||||||
|
EAPI Eo_Op EVAS_OBJ_TABLE_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
|
#define MY_CLASS EVAS_OBJ_TABLE_CLASS
|
||||||
|
|
||||||
|
#define MY_CLASS_NAME "Evas_Object_Table"
|
||||||
|
|
||||||
typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data;
|
typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data;
|
||||||
typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option;
|
typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option;
|
||||||
typedef struct _Evas_Object_Table_Cache Evas_Object_Table_Cache;
|
typedef struct _Evas_Object_Table_Cache Evas_Object_Table_Cache;
|
||||||
|
@ -53,7 +62,6 @@ struct _Evas_Object_Table_Cache
|
||||||
|
|
||||||
struct _Evas_Object_Table_Data
|
struct _Evas_Object_Table_Data
|
||||||
{
|
{
|
||||||
Evas_Object_Smart_Clipped_Data base;
|
|
||||||
Eina_List *children;
|
Eina_List *children;
|
||||||
struct {
|
struct {
|
||||||
Evas_Coord h, v;
|
Evas_Coord h, v;
|
||||||
|
@ -89,7 +97,7 @@ struct _Evas_Object_Table_Accessor
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \
|
#define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \
|
||||||
Evas_Object_Table_Data *ptr = evas_object_smart_data_get(o)
|
Evas_Object_Table_Data *ptr = eo_data_get(o, MY_CLASS)
|
||||||
|
|
||||||
#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \
|
#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \
|
||||||
EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
|
EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
|
||||||
|
@ -867,15 +875,10 @@ _evas_object_table_smart_calculate_regular(Evas_Object *o, Evas_Object_Table_Dat
|
||||||
_evas_object_table_calculate_layout_regular(o, priv);
|
_evas_object_table_calculate_layout_regular(o, priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVAS_SMART_SUBCLASS_NEW("Evas_Object_Table", _evas_object_table,
|
|
||||||
Evas_Smart_Class, Evas_Smart_Class,
|
|
||||||
evas_object_smart_clipped_class_get, NULL)
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_object_table_smart_add(Evas_Object *o)
|
_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
EVAS_SMART_DATA_ALLOC(o, Evas_Object_Table_Data)
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
priv->pad.h = 0;
|
priv->pad.h = 0;
|
||||||
priv->pad.v = 0;
|
priv->pad.v = 0;
|
||||||
priv->align.h = 0.5;
|
priv->align.h = 0.5;
|
||||||
|
@ -888,20 +891,20 @@ _evas_object_table_smart_add(Evas_Object *o)
|
||||||
priv->expand_h = 0;
|
priv->expand_h = 0;
|
||||||
priv->expand_v = 0;
|
priv->expand_v = 0;
|
||||||
|
|
||||||
_evas_object_table_parent_sc->add(o);
|
eo_do_super(obj, evas_obj_smart_add());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_object_table_smart_del(Evas_Object *o)
|
_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET(o, priv);
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
l = priv->children;
|
l = priv->children;
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
Evas_Object_Table_Option *opt = l->data;
|
Evas_Object_Table_Option *opt = l->data;
|
||||||
_evas_object_table_child_disconnect(o, opt->obj);
|
_evas_object_table_child_disconnect(obj, opt->obj);
|
||||||
_evas_object_table_option_del(opt->obj);
|
_evas_object_table_option_del(opt->obj);
|
||||||
free(opt);
|
free(opt);
|
||||||
l = eina_list_remove_list(l, l);
|
l = eina_list_remove_list(l, l);
|
||||||
|
@ -913,22 +916,24 @@ _evas_object_table_smart_del(Evas_Object *o)
|
||||||
priv->cache = NULL;
|
priv->cache = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_evas_object_table_parent_sc->del(o);
|
eo_do_super(obj, evas_obj_smart_del());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_object_table_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
|
_smart_resize(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
|
Evas_Coord w = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord h = va_arg(*list, Evas_Coord);
|
||||||
Evas_Coord ow, oh;
|
Evas_Coord ow, oh;
|
||||||
evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
|
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
||||||
if ((ow == w) && (oh == h)) return;
|
if ((ow == w) && (oh == h)) return;
|
||||||
evas_object_smart_changed(o);
|
evas_object_smart_changed(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_object_table_smart_calculate(Evas_Object *o)
|
_smart_calculate(Eo *o, void *_pd, va_list *list EINA_UNUSED)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
if ((priv->size.cols < 1) || (priv->size.rows < 1))
|
if ((priv->size.cols < 1) || (priv->size.rows < 1))
|
||||||
{
|
{
|
||||||
|
@ -943,37 +948,52 @@ _evas_object_table_smart_calculate(Evas_Object *o)
|
||||||
_evas_object_table_smart_calculate_regular(o, priv);
|
_evas_object_table_smart_calculate_regular(o, priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_evas_object_table_smart_set_user(Evas_Smart_Class *sc)
|
|
||||||
{
|
|
||||||
sc->add = _evas_object_table_smart_add;
|
|
||||||
sc->del = _evas_object_table_smart_del;
|
|
||||||
sc->resize = _evas_object_table_smart_resize;
|
|
||||||
sc->calculate = _evas_object_table_smart_calculate;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_table_add(Evas *evas)
|
evas_object_table_add(Evas *evas)
|
||||||
{
|
{
|
||||||
return evas_object_smart_add(evas, _evas_object_table_smart_class_new());
|
Evas_Object *obj = eo_add(MY_CLASS, evas);
|
||||||
|
eo_unref(obj);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
eo_do_super(obj, eo_constructor());
|
||||||
|
eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_table_add_to(Evas_Object *parent)
|
evas_object_table_add_to(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
|
Evas_Object *ret = NULL;
|
||||||
|
eo_do(parent, evas_obj_table_add_to(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_add_to(Eo *parent, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
Evas_Object *o;
|
|
||||||
|
|
||||||
evas = evas_object_evas_get(parent);
|
evas = evas_object_evas_get(parent);
|
||||||
o = evas_object_table_add(evas);
|
*ret = evas_object_table_add(evas);
|
||||||
evas_object_smart_member_add(o, parent);
|
evas_object_smart_member_add(*ret, parent);
|
||||||
return o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
|
evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
|
eo_do(o, evas_obj_table_homogeneous_set(homogeneous));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_homogeneous_set(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object_Table_Homogeneous_Mode homogeneous = va_arg(*list, Evas_Object_Table_Homogeneous_Mode);
|
||||||
|
|
||||||
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv->homogeneous == homogeneous)
|
if (priv->homogeneous == homogeneous)
|
||||||
return;
|
return;
|
||||||
priv->homogeneous = homogeneous;
|
priv->homogeneous = homogeneous;
|
||||||
|
@ -984,14 +1004,32 @@ evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_
|
||||||
EAPI Evas_Object_Table_Homogeneous_Mode
|
EAPI Evas_Object_Table_Homogeneous_Mode
|
||||||
evas_object_table_homogeneous_get(const Evas_Object *o)
|
evas_object_table_homogeneous_get(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
Evas_Object_Table_Homogeneous_Mode ret = EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE;
|
||||||
return priv->homogeneous;
|
eo_do((Eo *)o, evas_obj_table_homogeneous_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_homogeneous_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object_Table_Homogeneous_Mode *ret = va_arg(*list, Evas_Object_Table_Homogeneous_Mode *);
|
||||||
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
|
*ret = priv->homogeneous;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical)
|
evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
|
eo_do(o, evas_obj_table_align_set(horizontal, vertical));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_align_set(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
double horizontal = va_arg(*list, double);
|
||||||
|
double vertical = va_arg(*list, double);
|
||||||
|
|
||||||
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv->align.h == horizontal && priv->align.v == vertical)
|
if (priv->align.h == horizontal && priv->align.v == vertical)
|
||||||
return;
|
return;
|
||||||
priv->align.h = horizontal;
|
priv->align.h = horizontal;
|
||||||
|
@ -1002,7 +1040,16 @@ evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical)
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical)
|
evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET(o, priv);
|
eo_do((Eo *)o, evas_obj_table_align_get(horizontal, vertical));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_align_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
double *horizontal = va_arg(*list, double *);
|
||||||
|
double *vertical = va_arg(*list, double *);
|
||||||
|
|
||||||
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv)
|
if (priv)
|
||||||
{
|
{
|
||||||
if (horizontal) *horizontal = priv->align.h;
|
if (horizontal) *horizontal = priv->align.h;
|
||||||
|
@ -1018,7 +1065,16 @@ evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *ve
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
|
evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
|
eo_do(o, evas_obj_table_padding_set(horizontal, vertical));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_padding_set(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Coord horizontal = va_arg(*list, Evas_Coord);
|
||||||
|
Evas_Coord vertical = va_arg(*list, Evas_Coord);
|
||||||
|
|
||||||
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv->pad.h == horizontal && priv->pad.v == vertical)
|
if (priv->pad.h == horizontal && priv->pad.v == vertical)
|
||||||
return;
|
return;
|
||||||
priv->pad.h = horizontal;
|
priv->pad.h = horizontal;
|
||||||
|
@ -1030,7 +1086,16 @@ evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
|
evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET(o, priv);
|
eo_do((Eo *)o, evas_obj_table_padding_get(horizontal, vertical));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_padding_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Coord *horizontal = va_arg(*list, Evas_Coord *);
|
||||||
|
Evas_Coord *vertical = va_arg(*list, Evas_Coord *);
|
||||||
|
|
||||||
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv)
|
if (priv)
|
||||||
{
|
{
|
||||||
if (horizontal) *horizontal = priv->pad.h;
|
if (horizontal) *horizontal = priv->pad.h;
|
||||||
|
@ -1046,9 +1111,24 @@ evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_table_pack_get(const Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan)
|
evas_object_table_pack_get(const Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan)
|
||||||
{
|
{
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do((Eo *)o, evas_obj_table_pack_get(child, col, row, colspan, rowspan, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_pack_get(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object *child = va_arg(*list, Evas_Object *);
|
||||||
|
unsigned short *col = va_arg(*list, unsigned short *);
|
||||||
|
unsigned short *row = va_arg(*list, unsigned short *);
|
||||||
|
unsigned short *colspan = va_arg(*list, unsigned short *);
|
||||||
|
unsigned short *rowspan = va_arg(*list, unsigned short *);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
if (ret) *ret = EINA_FALSE;
|
||||||
|
|
||||||
Evas_Object_Table_Option *opt;
|
Evas_Object_Table_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
|
||||||
opt = _evas_object_table_option_get(child);
|
opt = _evas_object_table_option_get(child);
|
||||||
if (!opt)
|
if (!opt)
|
||||||
{
|
{
|
||||||
|
@ -1056,31 +1136,47 @@ evas_object_table_pack_get(const Evas_Object *o, Evas_Object *child, unsigned sh
|
||||||
if (row) *row = 0;
|
if (row) *row = 0;
|
||||||
if (colspan) *colspan = 0;
|
if (colspan) *colspan = 0;
|
||||||
if (rowspan) *rowspan = 0;
|
if (rowspan) *rowspan = 0;
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
if (col) *col = opt->col;
|
if (col) *col = opt->col;
|
||||||
if (row) *row = opt->row;
|
if (row) *row = opt->row;
|
||||||
if (colspan) *colspan = opt->colspan;
|
if (colspan) *colspan = opt->colspan;
|
||||||
if (rowspan) *rowspan = opt->rowspan;
|
if (rowspan) *rowspan = opt->rowspan;
|
||||||
return EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
|
evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
|
||||||
{
|
{
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do(o, evas_obj_table_pack(child, col, row, colspan, rowspan, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_pack(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object *child = va_arg(*list, Evas_Object *);
|
||||||
|
unsigned short col = va_arg(*list, int);
|
||||||
|
unsigned short row = va_arg(*list, int);
|
||||||
|
unsigned short colspan = va_arg(*list, int);
|
||||||
|
unsigned short rowspan = va_arg(*list, int);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
if (ret) *ret = EINA_FALSE;
|
||||||
|
|
||||||
Evas_Object_Table_Option *opt;
|
Evas_Object_Table_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
if (rowspan < 1)
|
if (rowspan < 1)
|
||||||
{
|
{
|
||||||
ERR("rowspan < 1");
|
ERR("rowspan < 1");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
if (colspan < 1)
|
if (colspan < 1)
|
||||||
{
|
{
|
||||||
ERR("colspan < 1");
|
ERR("colspan < 1");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
opt = _evas_object_table_option_get(child);
|
opt = _evas_object_table_option_get(child);
|
||||||
|
@ -1090,7 +1186,7 @@ evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, u
|
||||||
if (!opt)
|
if (!opt)
|
||||||
{
|
{
|
||||||
ERR("could not allocate table option data.");
|
ERR("could not allocate table option data.");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,7 +1254,7 @@ evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, u
|
||||||
}
|
}
|
||||||
_evas_object_table_cache_invalidate(priv);
|
_evas_object_table_cache_invalidate(priv);
|
||||||
evas_object_smart_changed(o);
|
evas_object_smart_changed(o);
|
||||||
return EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1210,21 +1306,33 @@ _evas_object_table_remove_opt(Evas_Object_Table_Data *priv, Evas_Object_Table_Op
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
|
evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
|
||||||
{
|
{
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do(o, evas_obj_table_unpack(child, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_unpack(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object *child = va_arg(*list, Evas_Object *);
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
if (ret) *ret = EINA_FALSE;
|
||||||
|
|
||||||
Evas_Object_Table_Option *opt;
|
Evas_Object_Table_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
if (o != evas_object_smart_parent_get(child))
|
if (o != evas_object_smart_parent_get(child))
|
||||||
{
|
{
|
||||||
ERR("cannot unpack child from incorrect table!");
|
ERR("cannot unpack child from incorrect table!");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
opt = _evas_object_table_option_del(child);
|
opt = _evas_object_table_option_del(child);
|
||||||
if (!opt)
|
if (!opt)
|
||||||
{
|
{
|
||||||
ERR("cannot unpack child with no packing option!");
|
ERR("cannot unpack child with no packing option!");
|
||||||
return EINA_FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_evas_object_table_child_disconnect(o, child);
|
_evas_object_table_child_disconnect(o, child);
|
||||||
|
@ -1234,15 +1342,23 @@ evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
|
||||||
_evas_object_table_cache_invalidate(priv);
|
_evas_object_table_cache_invalidate(priv);
|
||||||
evas_object_smart_changed(o);
|
evas_object_smart_changed(o);
|
||||||
|
|
||||||
return EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_clear(Evas_Object *o, Eina_Bool clear)
|
evas_object_table_clear(Evas_Object *o, Eina_Bool clear)
|
||||||
{
|
{
|
||||||
|
eo_do(o, evas_obj_table_clear(clear));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_clear(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool clear = va_arg(*list, int);
|
||||||
|
|
||||||
Evas_Object_Table_Option *opt;
|
Evas_Object_Table_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
EINA_LIST_FREE(priv->children, opt)
|
EINA_LIST_FREE(priv->children, opt)
|
||||||
{
|
{
|
||||||
|
@ -1262,7 +1378,16 @@ evas_object_table_clear(Evas_Object *o, Eina_Bool clear)
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows)
|
evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET(o, priv);
|
eo_do((Eo *)o, evas_obj_table_col_row_size_get(cols, rows));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_col_row_size_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
int *cols = va_arg(*list, int *);
|
||||||
|
int *rows = va_arg(*list, int *);
|
||||||
|
|
||||||
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv)
|
if (priv)
|
||||||
{
|
{
|
||||||
if (cols) *cols = priv->size.cols;
|
if (cols) *cols = priv->size.cols;
|
||||||
|
@ -1278,14 +1403,32 @@ evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows)
|
||||||
EAPI Eina_Iterator *
|
EAPI Eina_Iterator *
|
||||||
evas_object_table_iterator_new(const Evas_Object *o)
|
evas_object_table_iterator_new(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
|
Eina_Iterator *ret = NULL;
|
||||||
|
eo_do((Eo *)o, evas_obj_table_iterator_new(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_iterator_new(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Iterator **ret = va_arg(*list, Eina_Iterator **);
|
||||||
|
|
||||||
Evas_Object_Table_Iterator *it;
|
Evas_Object_Table_Iterator *it;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
if (!priv->children) return NULL;
|
if (!priv->children)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
it = calloc(1, sizeof(Evas_Object_Table_Iterator));
|
it = calloc(1, sizeof(Evas_Object_Table_Iterator));
|
||||||
if (!it) return NULL;
|
if (!it)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
||||||
|
|
||||||
|
@ -1296,20 +1439,38 @@ evas_object_table_iterator_new(const Evas_Object *o)
|
||||||
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_table_iterator_get_container);
|
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_table_iterator_get_container);
|
||||||
it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_table_iterator_free);
|
it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_table_iterator_free);
|
||||||
|
|
||||||
return &it->iterator;
|
*ret = &it->iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Accessor *
|
EAPI Eina_Accessor *
|
||||||
evas_object_table_accessor_new(const Evas_Object *o)
|
evas_object_table_accessor_new(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
|
Eina_Accessor *ret = NULL;
|
||||||
|
eo_do((Eo *)o, evas_obj_table_accessor_new(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_accessor_new(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Accessor **ret = va_arg(*list, Eina_Accessor **);
|
||||||
|
|
||||||
Evas_Object_Table_Accessor *it;
|
Evas_Object_Table_Accessor *it;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
if (!priv->children) return NULL;
|
if (!priv->children)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
it = calloc(1, sizeof(Evas_Object_Table_Accessor));
|
it = calloc(1, sizeof(Evas_Object_Table_Accessor));
|
||||||
if (!it) return NULL;
|
if (!it)
|
||||||
|
{
|
||||||
|
*ret = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
|
EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
|
||||||
|
|
||||||
|
@ -1320,21 +1481,31 @@ evas_object_table_accessor_new(const Evas_Object *o)
|
||||||
it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_table_accessor_get_container);
|
it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_table_accessor_get_container);
|
||||||
it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_table_accessor_free);
|
it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_table_accessor_free);
|
||||||
|
|
||||||
return &it->accessor;
|
*ret = &it->accessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_List *
|
EAPI Eina_List *
|
||||||
evas_object_table_children_get(const Evas_Object *o)
|
evas_object_table_children_get(const Evas_Object *o)
|
||||||
{
|
{
|
||||||
|
Eina_List *ret = NULL;
|
||||||
|
eo_do((Eo *)o, evas_obj_table_children_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_children_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_List **ret = va_arg(*list, Eina_List **);
|
||||||
|
|
||||||
Eina_List *new_list = NULL, *l;
|
Eina_List *new_list = NULL, *l;
|
||||||
Evas_Object_Table_Option *opt;
|
Evas_Object_Table_Option *opt;
|
||||||
|
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(priv->children, l, opt)
|
EINA_LIST_FOREACH(priv->children, l, opt)
|
||||||
new_list = eina_list_append(new_list, opt->obj);
|
new_list = eina_list_append(new_list, opt->obj);
|
||||||
|
|
||||||
return new_list;
|
*ret = new_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
Evas_Object *
|
Evas_Object *
|
||||||
|
@ -1354,18 +1525,100 @@ evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned s
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_table_mirrored_get(const Evas_Object *obj)
|
evas_object_table_mirrored_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE);
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
eo_do((Eo *)obj, evas_obj_table_mirrored_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return priv->is_mirrored;
|
static void
|
||||||
|
_mirrored_get(Eo *o EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
|
|
||||||
|
const Evas_Object_Table_Data *priv = _pd;
|
||||||
|
|
||||||
|
*ret = priv->is_mirrored;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
|
evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
|
||||||
{
|
{
|
||||||
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(obj, priv);
|
eo_do(obj, evas_obj_table_mirrored_set(mirrored));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_mirrored_set(Eo *o, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Eina_Bool mirrored = va_arg(*list, int);
|
||||||
|
|
||||||
|
Evas_Object_Table_Data *priv = _pd;
|
||||||
if (priv->is_mirrored != mirrored)
|
if (priv->is_mirrored != mirrored)
|
||||||
{
|
{
|
||||||
priv->is_mirrored = mirrored;
|
priv->is_mirrored = mirrored;
|
||||||
_evas_object_table_smart_calculate(obj);
|
eo_do(o, evas_obj_smart_calculate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ADD_TO), _add_to),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET), _homogeneous_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET), _homogeneous_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ALIGN_SET), _align_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ALIGN_GET), _align_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PADDING_SET), _padding_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PADDING_GET), _padding_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PACK_GET), _pack_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PACK), _pack),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_UNPACK), _unpack),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_CLEAR), _clear),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_COL_ROW_SIZE_GET), _col_row_size_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ITERATOR_NEW), _iterator_new),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ACCESSOR_NEW), _accessor_new),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_CHILDREN_GET), _children_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_GET), _mirrored_get),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_SET), _mirrored_set),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _smart_add),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _smart_del),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _smart_resize),
|
||||||
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_CALCULATE), _smart_calculate),
|
||||||
|
EO_OP_FUNC_SENTINEL
|
||||||
|
};
|
||||||
|
eo_class_funcs_set(klass, func_desc);
|
||||||
|
}
|
||||||
|
static const Eo_Op_Description op_desc[] = {
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_ADD_TO, "Create a table that is child of a given element parent."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET, "Set how this table should layout children."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET, "Get the current layout homogeneous mode."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_ALIGN_SET, "Set the alignment of the whole bounding box of contents."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_ALIGN_GET, "Get alignment of the whole bounding box of contents."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_PADDING_SET, "Set padding between cells."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_PADDING_GET, "Get padding between cells."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_PACK_GET, "Get packing location of a child of table."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_PACK, "Add a new child to a table object or set its current packing."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_UNPACK, "Remove child from table."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_CLEAR, "Faster way to remove all child objects from a table object."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_COL_ROW_SIZE_GET, "Get the number of columns and rows this table takes."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_ITERATOR_NEW, "Get an iterator to walk the list of children for the table."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_ACCESSOR_NEW, "Get an accessor to get random access to the list of children for the table."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_CHILDREN_GET, "Get the list of children for the table."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_GET, "Gets the mirrored mode of the table."),
|
||||||
|
EO_OP_DESCRIPTION(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_SET, "Sets the mirrored mode of the table."),
|
||||||
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
};
|
||||||
|
static const Eo_Class_Description class_desc = {
|
||||||
|
EO_VERSION,
|
||||||
|
"Evas_Object_Table",
|
||||||
|
EO_CLASS_TYPE_REGULAR,
|
||||||
|
EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_TABLE_BASE_ID, op_desc, EVAS_OBJ_TABLE_SUB_ID_LAST),
|
||||||
|
NULL,
|
||||||
|
sizeof(Evas_Object_Table_Data),
|
||||||
|
_class_constructor,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
EO_DEFINE_CLASS(evas_object_table_class_get, &class_desc, EVAS_OBJ_SMART_CLIPPED_CLASS, NULL);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,80 +1,88 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object_Protected_Data *
|
||||||
evas_object_above_get_internal(const Evas_Object *obj)
|
evas_object_above_get_internal(const Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if ((EINA_INLIST_GET(obj))->next)
|
if ((EINA_INLIST_GET(obj))->next)
|
||||||
return (Evas_Object *)((EINA_INLIST_GET(obj))->next);
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((EINA_INLIST_GET(((Evas_Object*)(obj))->layer))->next)
|
if ((EINA_INLIST_GET(obj->layer))->next)
|
||||||
{
|
{
|
||||||
Evas_Layer *l;
|
Evas_Layer *l;
|
||||||
|
|
||||||
l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->next);
|
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->next);
|
||||||
return l->objects;
|
return l->objects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object_Protected_Data *
|
||||||
evas_object_below_get_internal(const Evas_Object *obj)
|
evas_object_below_get_internal(const Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if ((EINA_INLIST_GET(obj))->prev)
|
if ((EINA_INLIST_GET(obj))->prev)
|
||||||
return (Evas_Object *)((EINA_INLIST_GET(obj))->prev);
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->prev);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev)
|
if ((EINA_INLIST_GET(obj->layer))->prev)
|
||||||
{
|
{
|
||||||
Evas_Layer *l;
|
Evas_Layer *l;
|
||||||
|
|
||||||
l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev);
|
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->prev);
|
||||||
return (Evas_Object *)((EINA_INLIST_GET((l->objects)))->last);
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET((l->objects)))->last);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_raise(Evas_Object *obj)
|
evas_object_raise(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (evas_object_intercept_call_raise(obj)) return;
|
eo_do(eo_obj, evas_obj_raise());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_raise(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
if (evas_object_intercept_call_raise(eo_obj)) return;
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
if (!((EINA_INLIST_GET(obj))->next))
|
if (!((EINA_INLIST_GET(obj))->next))
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
evas_object_smart_member_raise(obj);
|
evas_object_smart_member_raise(eo_obj);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (obj->in_layer)
|
if (obj->in_layer)
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
|
||||||
}
|
}
|
||||||
if (obj->clip.clipees)
|
if (obj->clip.clipees)
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->layer) evas_render_invalidate(obj->layer->evas);
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
||||||
obj->restack = EINA_TRUE;
|
obj->restack = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
if (obj->layer->evas->events_frozen > 0) return;
|
if (obj->layer->evas->is_frozen) return;
|
||||||
if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
|
if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)))
|
||||||
{
|
{
|
||||||
if (!obj->smart.smart)
|
if (!obj->is_smart)
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
1, 1) && obj->cur.visible)
|
1, 1) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
|
@ -84,44 +92,52 @@ evas_object_raise(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_lower(Evas_Object *obj)
|
evas_object_lower(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (evas_object_intercept_call_lower(obj)) return;
|
eo_do(eo_obj, evas_obj_lower());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_lower(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
{
|
||||||
|
if (evas_object_intercept_call_lower(eo_obj)) return;
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
if (!((EINA_INLIST_GET(obj))->prev))
|
if (!((EINA_INLIST_GET(obj))->prev))
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
evas_object_smart_member_lower(obj);
|
evas_object_smart_member_lower(eo_obj);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (obj->in_layer)
|
if (obj->in_layer)
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects),
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects),
|
||||||
EINA_INLIST_GET(obj));
|
EINA_INLIST_GET(obj));
|
||||||
}
|
}
|
||||||
if (obj->clip.clipees)
|
if (obj->clip.clipees)
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->layer) evas_render_invalidate(obj->layer->evas);
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
||||||
obj->restack = EINA_TRUE;
|
obj->restack = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
if (obj->layer->evas->events_frozen > 0) return;
|
if (obj->layer->evas->is_frozen) return;
|
||||||
if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
|
if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)))
|
||||||
{
|
{
|
||||||
if (!obj->smart.smart)
|
if (!obj->is_smart)
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
1, 1) && obj->cur.visible)
|
1, 1) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
|
@ -131,75 +147,82 @@ evas_object_lower(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
|
evas_object_stack_above(Evas_Object *eo_obj, Evas_Object *above)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
MAGIC_CHECK(above, Evas_Object, MAGIC_OBJ);
|
eo_do(eo_obj, evas_obj_stack_above(above));
|
||||||
return;
|
}
|
||||||
MAGIC_CHECK_END();
|
|
||||||
if (obj == above) return;
|
void
|
||||||
if (evas_object_intercept_call_stack_above(obj, above)) return;
|
_stack_above(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
if (!above)
|
|
||||||
{
|
{
|
||||||
evas_object_raise(obj);
|
Evas_Object *eo_above = va_arg(*list, Evas_Object *);
|
||||||
|
if (!eo_above) return;
|
||||||
|
if (eo_obj == eo_above) return;
|
||||||
|
if (evas_object_intercept_call_stack_above(eo_obj, eo_above)) return;
|
||||||
|
if (!eo_above)
|
||||||
|
{
|
||||||
|
evas_object_raise(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
Evas_Object_Protected_Data *above = eo_data_get(eo_above, EVAS_OBJ_CLASS);
|
||||||
if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above))
|
if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above))
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
{
|
{
|
||||||
if (obj->smart.parent != above->smart.parent)
|
if (obj->smart.parent != above->smart.parent)
|
||||||
{
|
{
|
||||||
ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above);
|
ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", eo_obj, eo_above);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
evas_object_smart_member_stack_above(obj, above);
|
evas_object_smart_member_stack_above(eo_obj, eo_above);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (above->smart.parent)
|
if (above->smart.parent)
|
||||||
{
|
{
|
||||||
ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", obj, above);
|
ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", eo_obj, eo_above);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->layer != above->layer)
|
if (obj->layer != above->layer)
|
||||||
{
|
{
|
||||||
ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", obj, above);
|
ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", eo_obj, eo_above);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->in_layer)
|
if (obj->in_layer)
|
||||||
{
|
{
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
|
||||||
EINA_INLIST_GET(obj));
|
EINA_INLIST_GET(obj));
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects),
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects),
|
||||||
EINA_INLIST_GET(obj),
|
EINA_INLIST_GET(obj),
|
||||||
EINA_INLIST_GET(above));
|
EINA_INLIST_GET(above));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (obj->clip.clipees)
|
if (obj->clip.clipees)
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->layer) evas_render_invalidate(obj->layer->evas);
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
||||||
obj->restack = EINA_TRUE;
|
obj->restack = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
if (obj->layer->evas->events_frozen > 0) return;
|
if (obj->layer->evas->is_frozen) return;
|
||||||
if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
|
if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)))
|
||||||
{
|
{
|
||||||
if (!obj->smart.smart)
|
if (!obj->is_smart)
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
1, 1) && obj->cur.visible)
|
1, 1) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
|
@ -209,75 +232,82 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
|
evas_object_stack_below(Evas_Object *eo_obj, Evas_Object *eo_below)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
MAGIC_CHECK(below, Evas_Object, MAGIC_OBJ);
|
eo_do(eo_obj, evas_obj_stack_below(eo_below));
|
||||||
return;
|
}
|
||||||
MAGIC_CHECK_END();
|
|
||||||
if (obj == below) return;
|
void
|
||||||
if (evas_object_intercept_call_stack_below(obj, below)) return;
|
_stack_below(Eo *eo_obj, void *_pd, va_list *list)
|
||||||
if (!below)
|
|
||||||
{
|
{
|
||||||
evas_object_lower(obj);
|
Evas_Object *eo_below = va_arg(*list, Evas_Object *);
|
||||||
|
if (!eo_below) return;
|
||||||
|
if (eo_obj == eo_below) return;
|
||||||
|
if (evas_object_intercept_call_stack_below(eo_obj, eo_below)) return;
|
||||||
|
if (!eo_below)
|
||||||
|
{
|
||||||
|
evas_object_lower(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
Evas_Object_Protected_Data *below = eo_data_get(eo_below, EVAS_OBJ_CLASS);
|
||||||
if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below))
|
if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below))
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
{
|
{
|
||||||
if (obj->smart.parent != below->smart.parent)
|
if (obj->smart.parent != below->smart.parent)
|
||||||
{
|
{
|
||||||
ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below);
|
ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", eo_obj, eo_below);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
evas_object_smart_member_stack_below(obj, below);
|
evas_object_smart_member_stack_below(eo_obj, eo_below);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (below->smart.parent)
|
if (below->smart.parent)
|
||||||
{
|
{
|
||||||
ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", obj, below);
|
ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", eo_obj, eo_below);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->layer != below->layer)
|
if (obj->layer != below->layer)
|
||||||
{
|
{
|
||||||
ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", obj, below);
|
ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", eo_obj, eo_below);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->in_layer)
|
if (obj->in_layer)
|
||||||
{
|
{
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
|
||||||
EINA_INLIST_GET(obj));
|
EINA_INLIST_GET(obj));
|
||||||
obj->layer->objects = (Evas_Object *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects),
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects),
|
||||||
EINA_INLIST_GET(obj),
|
EINA_INLIST_GET(obj),
|
||||||
EINA_INLIST_GET(below));
|
EINA_INLIST_GET(below));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (obj->clip.clipees)
|
if (obj->clip.clipees)
|
||||||
{
|
{
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->layer) evas_render_invalidate(obj->layer->evas);
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
||||||
obj->restack = EINA_TRUE;
|
obj->restack = EINA_TRUE;
|
||||||
evas_object_change(obj);
|
evas_object_change(eo_obj, obj);
|
||||||
evas_object_inform_call_restack(obj);
|
evas_object_inform_call_restack(eo_obj);
|
||||||
if (obj->layer->evas->events_frozen > 0) return;
|
if (obj->layer->evas->is_frozen) return;
|
||||||
if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
|
if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)))
|
||||||
{
|
{
|
||||||
if (!obj->smart.smart)
|
if (!obj->is_smart)
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj,
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
1, 1) && obj->cur.visible)
|
1, 1) && obj->cur.visible)
|
||||||
evas_event_feed_mouse_move(obj->layer->evas,
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
||||||
obj->layer->evas->pointer.x,
|
obj->layer->evas->pointer.x,
|
||||||
obj->layer->evas->pointer.y,
|
obj->layer->evas->pointer.y,
|
||||||
obj->layer->evas->last_timestamp,
|
obj->layer->evas->last_timestamp,
|
||||||
|
@ -287,53 +317,91 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_above_get(const Evas_Object *obj)
|
evas_object_above_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_above_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_above_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
obj = (Evas_Object *)((EINA_INLIST_GET(obj))->next);
|
obj = (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
|
||||||
if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj;
|
if ((obj) && (!obj->delete_me))
|
||||||
|
{
|
||||||
|
*ret = obj->object;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (obj);
|
while (obj);
|
||||||
return NULL;
|
*ret = NULL;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
obj = evas_object_above_get_internal(obj);
|
obj = evas_object_above_get_internal(obj);
|
||||||
while (obj)
|
while (obj)
|
||||||
{
|
{
|
||||||
if (!obj->delete_me) return (Evas_Object *)obj;
|
if (!obj->delete_me)
|
||||||
|
{
|
||||||
|
*ret = obj->object;
|
||||||
|
return;
|
||||||
|
}
|
||||||
obj = evas_object_above_get_internal(obj);
|
obj = evas_object_above_get_internal(obj);
|
||||||
}
|
}
|
||||||
return NULL;
|
*ret = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_below_get(const Evas_Object *obj)
|
evas_object_below_get(const Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_obj, evas_obj_below_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_below_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
const Evas_Object_Protected_Data *obj = _pd;
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
*ret = NULL;
|
||||||
if (obj->smart.parent)
|
if (obj->smart.parent)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
obj = (Evas_Object *)((EINA_INLIST_GET(obj))->prev);
|
obj = (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->prev);
|
||||||
if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj;
|
if ((obj) && (!obj->delete_me))
|
||||||
|
{
|
||||||
|
*ret = obj->object;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (obj);
|
while (obj);
|
||||||
return NULL;
|
return;
|
||||||
}
|
}
|
||||||
obj = evas_object_below_get_internal(obj);
|
obj = evas_object_below_get_internal(obj);
|
||||||
while (obj)
|
while (obj)
|
||||||
{
|
{
|
||||||
if (!obj->delete_me) return (Evas_Object *)obj;
|
if (!obj->delete_me)
|
||||||
|
{
|
||||||
|
*ret = obj->object;
|
||||||
|
return;
|
||||||
|
}
|
||||||
obj = evas_object_below_get_internal(obj);
|
obj = evas_object_below_get_internal(obj);
|
||||||
}
|
}
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -344,48 +412,76 @@ evas_object_bottom_get(const Evas *e)
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
||||||
return NULL;
|
return NULL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object *ret = NULL;
|
||||||
|
eo_do((Eo *)e, evas_canvas_object_bottom_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_object_bottom_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
if (e->layers)
|
if (e->layers)
|
||||||
{
|
{
|
||||||
Evas_Object *obj;
|
Evas_Object_Protected_Data *obj;
|
||||||
|
|
||||||
obj = e->layers->objects;
|
obj = e->layers->objects;
|
||||||
while (obj)
|
while (obj)
|
||||||
{
|
{
|
||||||
if (!obj->delete_me) return obj;
|
if (!obj->delete_me)
|
||||||
|
{
|
||||||
|
*ret = obj->object;
|
||||||
|
return;
|
||||||
|
}
|
||||||
obj = evas_object_above_get_internal(obj);
|
obj = evas_object_above_get_internal(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
*ret = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
evas_object_top_get(const Evas *e)
|
evas_object_top_get(const Evas *eo_e)
|
||||||
{
|
{
|
||||||
Evas_Object *obj = NULL;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
return NULL;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Object *ret = NULL;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_object_top_get(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_object_top_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *params_list)
|
||||||
|
{
|
||||||
|
Evas_Object **ret = va_arg(*params_list, Evas_Object **);
|
||||||
|
*ret = NULL;
|
||||||
|
Evas_Object_Protected_Data *obj = NULL;
|
||||||
Eina_Inlist *list;
|
Eina_Inlist *list;
|
||||||
Evas_Layer *layer;
|
Evas_Layer *layer;
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
const Evas_Public_Data *e = _pd;
|
||||||
return NULL;
|
|
||||||
MAGIC_CHECK_END();
|
|
||||||
|
|
||||||
list = EINA_INLIST_GET(e->layers);
|
list = EINA_INLIST_GET(e->layers);
|
||||||
if (!list) return NULL;
|
if (!list) return;
|
||||||
|
|
||||||
layer = (Evas_Layer *) list->last;
|
layer = (Evas_Layer *) list->last;
|
||||||
if (!layer) return NULL;
|
if (!layer) return;
|
||||||
|
|
||||||
list = EINA_INLIST_GET(layer->objects);
|
list = EINA_INLIST_GET(layer->objects);
|
||||||
if (!list) return NULL;
|
if (!list) return;
|
||||||
|
|
||||||
obj = (Evas_Object *) list->last;
|
obj = (Evas_Object_Protected_Data *) list->last;
|
||||||
if (!obj) return NULL;
|
if (!obj) return;
|
||||||
|
|
||||||
while (obj)
|
while (obj)
|
||||||
{
|
{
|
||||||
if (!obj->delete_me) return obj;
|
if (!obj->delete_me)
|
||||||
|
{
|
||||||
|
*ret = obj->object;
|
||||||
|
return;
|
||||||
|
}
|
||||||
obj = evas_object_below_get_internal(obj);
|
obj = evas_object_below_get_internal(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
*ret = obj->object;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
_evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y)
|
_evas_touch_point_append(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Coord_Touch_Point *point;
|
Evas_Coord_Touch_Point *point;
|
||||||
|
|
||||||
/* create new Evas_Coord_Touch_Point */
|
/* create new Evas_Coord_Touch_Point */
|
||||||
|
@ -16,8 +17,9 @@ _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state)
|
_evas_touch_point_update(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Coord_Touch_Point *point = NULL;
|
Evas_Coord_Touch_Point *point = NULL;
|
||||||
|
|
||||||
|
@ -34,8 +36,9 @@ _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_evas_touch_point_remove(Evas *e, int id)
|
_evas_touch_point_remove(Evas *eo_e, int id)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Coord_Touch_Point *point = NULL;
|
Evas_Coord_Touch_Point *point = NULL;
|
||||||
|
|
||||||
|
@ -51,25 +54,45 @@ _evas_touch_point_remove(Evas *e, int id)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI unsigned int
|
EAPI unsigned int
|
||||||
evas_touch_point_list_count(Evas *e)
|
evas_touch_point_list_count(Evas *eo_e)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
return 0;
|
return 0;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return eina_list_count(e->touch_points);
|
unsigned int ret = 0;
|
||||||
|
eo_do((Eo *)eo_e, evas_canvas_touch_point_list_count(&ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_touch_point_list_count(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
unsigned int *ret = va_arg(*list, unsigned int *);
|
||||||
|
const Evas_Public_Data *e = _pd;
|
||||||
|
*ret = eina_list_count(e->touch_points);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y)
|
evas_touch_point_list_nth_xy_get(Evas *eo_e, unsigned int n, Evas_Coord *x, Evas_Coord *y)
|
||||||
{
|
{
|
||||||
Evas_Coord_Touch_Point *point = NULL;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
if (x) *x = 0;
|
if (x) *x = 0;
|
||||||
if (y) *y = 0;
|
if (y) *y = 0;
|
||||||
return;
|
return;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
eo_do(eo_e, evas_canvas_touch_point_list_nth_xy_get(n, x, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_touch_point_list_nth_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
unsigned int n = va_arg(*list, unsigned int);
|
||||||
|
Evas_Coord *x = va_arg(*list, Evas_Coord *);
|
||||||
|
Evas_Coord *y = va_arg(*list, Evas_Coord *);
|
||||||
|
|
||||||
|
Evas_Coord_Touch_Point *point = NULL;
|
||||||
|
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
|
point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
|
||||||
if (!point)
|
if (!point)
|
||||||
{
|
{
|
||||||
|
@ -82,29 +105,51 @@ evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Co
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
evas_touch_point_list_nth_id_get(Evas *e, unsigned int n)
|
evas_touch_point_list_nth_id_get(Evas *eo_e, unsigned int n)
|
||||||
{
|
{
|
||||||
Evas_Coord_Touch_Point *point = NULL;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
return -1;
|
return -1;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
int ret = -1;
|
||||||
|
eo_do(eo_e, evas_canvas_touch_point_list_nth_id_get(n, &ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_touch_point_list_nth_id_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
unsigned int n = va_arg(*list, unsigned int);
|
||||||
|
int *ret = va_arg(*list, int *);
|
||||||
|
|
||||||
|
Evas_Coord_Touch_Point *point = NULL;
|
||||||
|
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
|
point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
|
||||||
if (!point) return -1;
|
if (!point) *ret = -1;
|
||||||
return point->id;
|
else *ret = point->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Touch_Point_State
|
EAPI Evas_Touch_Point_State
|
||||||
evas_touch_point_list_nth_state_get(Evas *e, unsigned int n)
|
evas_touch_point_list_nth_state_get(Evas *eo_e, unsigned int n)
|
||||||
{
|
{
|
||||||
Evas_Coord_Touch_Point *point = NULL;
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
||||||
|
|
||||||
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
||||||
return EVAS_TOUCH_POINT_CANCEL;
|
return EVAS_TOUCH_POINT_CANCEL;
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
|
Evas_Touch_Point_State ret = EVAS_TOUCH_POINT_CANCEL;
|
||||||
point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
|
eo_do(eo_e, evas_canvas_touch_point_list_nth_state_get(n, &ret));
|
||||||
if (!point) return EVAS_TOUCH_POINT_CANCEL;
|
return ret;
|
||||||
return point->state;
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_canvas_touch_point_list_nth_state_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
||||||
|
{
|
||||||
|
unsigned int n = va_arg(*list, unsigned int);
|
||||||
|
Evas_Touch_Point_State *ret = va_arg(*list, Evas_Touch_Point_State *);
|
||||||
|
|
||||||
|
Evas_Coord_Touch_Point *point = NULL;
|
||||||
|
|
||||||
|
Evas_Public_Data *e = _pd;
|
||||||
|
point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
|
||||||
|
if (!point) *ret = EVAS_TOUCH_POINT_CANCEL;
|
||||||
|
else *ret = point->state;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
#define EVAS_INLINE_H
|
#define EVAS_INLINE_H
|
||||||
|
|
||||||
static inline Eina_Bool
|
static inline Eina_Bool
|
||||||
_evas_render_has_map(Evas_Object *obj)
|
_evas_render_has_map(Evas_Object *eo_obj)
|
||||||
{
|
{
|
||||||
return ((!((obj->func->can_map) && (obj->func->can_map(obj)))) &&
|
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||||
|
return ((!((obj->func->can_map) && (obj->func->can_map(eo_obj)))) &&
|
||||||
((obj->cur.map) && (obj->cur.usemap)));
|
((obj->cur.map) && (obj->cur.usemap)));
|
||||||
// return ((obj->cur.map) && (obj->cur.usemap));
|
// return ((obj->cur.map) && (obj->cur.usemap));
|
||||||
}
|
}
|
||||||
|
@ -16,15 +17,15 @@ _evas_object_event_new(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_object_was_visible(Evas_Object *obj)
|
evas_object_was_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if ((obj->prev.visible) &&
|
if ((obj->prev.visible) &&
|
||||||
((obj->prev.cache.clip.visible) || (obj->smart.smart)) &&
|
((obj->prev.cache.clip.visible) || obj->is_smart) &&
|
||||||
((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND)
|
((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND)
|
||||||
|| obj->prev.render_op != EVAS_RENDER_BLEND))
|
|| obj->prev.render_op != EVAS_RENDER_BLEND))
|
||||||
{
|
{
|
||||||
if (obj->func->was_visible)
|
if (obj->func->was_visible)
|
||||||
return obj->func->was_visible(obj);
|
return obj->func->was_visible(eo_obj);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -62,15 +63,15 @@ evas_common_draw_context_cutouts_add(Cutout_Rects* rects,
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_object_is_opaque(Evas_Object *obj)
|
evas_object_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart) return 0;
|
if (obj->is_smart) return 0;
|
||||||
/* If a mask: Assume alpha */
|
/* If a mask: Assume alpha */
|
||||||
if (obj->cur.mask) return 0;
|
if (obj->cur.mask) return 0;
|
||||||
if (obj->cur.cache.clip.a == 255)
|
if (obj->cur.cache.clip.a == 255)
|
||||||
{
|
{
|
||||||
if (obj->func->is_opaque)
|
if (obj->func->is_opaque)
|
||||||
return obj->func->is_opaque(obj);
|
return obj->func->is_opaque(eo_obj, obj);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (obj->cur.render_op == EVAS_RENDER_COPY)
|
if (obj->cur.render_op == EVAS_RENDER_COPY)
|
||||||
|
@ -79,60 +80,66 @@ evas_object_is_opaque(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_event_freezes_through(Evas_Object *obj)
|
evas_event_freezes_through(Evas_Object *eo_obj __UNUSED__, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->freeze_events) return 1;
|
if (obj->freeze_events) return 1;
|
||||||
if (obj->parent_cache.freeze_events_valid)
|
if (obj->parent_cache.freeze_events_valid)
|
||||||
return obj->parent_cache.freeze_events;
|
return obj->parent_cache.freeze_events;
|
||||||
if (!obj->smart.parent) return 0;
|
if (!obj->smart.parent) return 0;
|
||||||
|
Evas_Object_Protected_Data *smart_parent_pd = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS);
|
||||||
obj->parent_cache.freeze_events =
|
obj->parent_cache.freeze_events =
|
||||||
evas_event_freezes_through(obj->smart.parent);
|
evas_event_freezes_through(obj->smart.parent, smart_parent_pd);
|
||||||
obj->parent_cache.freeze_events_valid = EINA_TRUE;
|
obj->parent_cache.freeze_events_valid = EINA_TRUE;
|
||||||
return obj->parent_cache.freeze_events;
|
return obj->parent_cache.freeze_events;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_event_passes_through(Evas_Object *obj)
|
evas_event_passes_through(Evas_Object *eo_obj __UNUSED__, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->pass_events) return 1;
|
if (obj->pass_events) return 1;
|
||||||
if (obj->parent_cache.pass_events_valid)
|
if (obj->parent_cache.pass_events_valid)
|
||||||
return obj->parent_cache.pass_events;
|
return obj->parent_cache.pass_events;
|
||||||
if (!obj->smart.parent) return 0;
|
if (!obj->smart.parent) return 0;
|
||||||
|
Evas_Object_Protected_Data *smart_parent_pd = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS);
|
||||||
obj->parent_cache.pass_events =
|
obj->parent_cache.pass_events =
|
||||||
evas_event_passes_through(obj->smart.parent);
|
evas_event_passes_through(obj->smart.parent, smart_parent_pd);
|
||||||
obj->parent_cache.pass_events_valid = EINA_TRUE;
|
obj->parent_cache.pass_events_valid = EINA_TRUE;
|
||||||
return obj->parent_cache.pass_events;
|
return obj->parent_cache.pass_events;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_object_is_visible(Evas_Object *obj)
|
evas_object_is_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{ /* post 1.0 -> enable? */
|
{ /* post 1.0 -> enable? */
|
||||||
if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ &&
|
if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ &&
|
||||||
((obj->cur.cache.clip.visible) || (obj->smart.smart)) &&
|
((obj->cur.cache.clip.visible) || (obj->is_smart)) &&
|
||||||
((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND)
|
((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND)
|
||||||
|| obj->cur.render_op != EVAS_RENDER_BLEND))
|
|| obj->cur.render_op != EVAS_RENDER_BLEND))
|
||||||
{
|
{
|
||||||
if (obj->func->is_visible)
|
if (obj->func->is_visible)
|
||||||
return obj->func->is_visible(obj);
|
return obj->func->is_visible(eo_obj);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_object_clippers_is_visible(Evas_Object *obj)
|
evas_object_clippers_is_visible(Evas_Object *eo_obj __UNUSED__, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (obj->cur.visible)
|
if (obj->cur.visible)
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *clipper_pd = NULL;
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
return evas_object_clippers_is_visible(obj->cur.clipper);
|
{
|
||||||
|
clipper_pd = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
|
return evas_object_clippers_is_visible(obj->cur.clipper, clipper_pd);
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
|
evas_object_is_in_output_rect(Evas_Object *eo_obj __UNUSED__, Evas_Object_Protected_Data *obj, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
/* assumes coords have been recalced */
|
/* assumes coords have been recalced */
|
||||||
if ((RECTS_INTERSECT(x, y, w, h,
|
if ((RECTS_INTERSECT(x, y, w, h,
|
||||||
|
@ -145,26 +152,26 @@ evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_object_is_active(Evas_Object *obj)
|
evas_object_is_active(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
if (evas_object_is_visible(obj) || evas_object_was_visible(obj))
|
if (evas_object_is_visible(eo_obj, obj) || evas_object_was_visible(eo_obj, obj))
|
||||||
{
|
{
|
||||||
if (obj->smart.smart)
|
if (obj->is_smart)
|
||||||
{
|
{
|
||||||
int mapsmt = 0;
|
int mapsmt = 0;
|
||||||
if (obj->smart.smart && (obj->cur.map && obj->cur.usemap)) mapsmt = 1;
|
if (obj->cur.map && obj->cur.usemap) mapsmt = 1;
|
||||||
if (!mapsmt) return 1;
|
if (!mapsmt) return 1;
|
||||||
if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
|
if (evas_object_is_in_output_rect(eo_obj, obj, 0, 0, obj->layer->evas->output.w,
|
||||||
obj->layer->evas->output.h) ||
|
obj->layer->evas->output.h) ||
|
||||||
evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
|
evas_object_was_in_output_rect(eo_obj, obj, 0, 0, obj->layer->evas->output.w,
|
||||||
obj->layer->evas->output.h))
|
obj->layer->evas->output.h))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
|
if (evas_object_is_in_output_rect(eo_obj, obj, 0, 0, obj->layer->evas->output.w,
|
||||||
obj->layer->evas->output.h) ||
|
obj->layer->evas->output.h) ||
|
||||||
evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
|
evas_object_was_in_output_rect(eo_obj, obj, 0, 0, obj->layer->evas->output.w,
|
||||||
obj->layer->evas->output.h))
|
obj->layer->evas->output.h))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +184,7 @@ evas_object_is_active(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
evas_object_coords_recalc(Evas_Object *obj)
|
evas_object_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
//// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity)
|
//// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity)
|
||||||
//// return;
|
//// return;
|
||||||
|
@ -191,23 +198,27 @@ evas_object_coords_recalc(Evas_Object *obj)
|
||||||
//// obj->cur.cache.geometry.h =
|
//// obj->cur.cache.geometry.h =
|
||||||
//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) -
|
//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) -
|
||||||
//// evas_coord_world_y_to_screen(obj->layer->evas, 0);
|
//// evas_coord_world_y_to_screen(obj->layer->evas, 0);
|
||||||
if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
|
if (obj->func->coords_recalc) obj->func->coords_recalc(eo_obj, obj);
|
||||||
//// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity;
|
//// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
evas_object_clip_recalc(Evas_Object *obj)
|
evas_object_clip_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
int cx, cy, cw, ch, cr, cg, cb, ca;
|
int cx, cy, cw, ch, cr, cg, cb, ca;
|
||||||
int nx, ny, nw, nh, nr, ng, nb, na;
|
int nx, ny, nw, nh, nr, ng, nb, na;
|
||||||
Eina_Bool cvis, nvis;
|
Eina_Bool cvis, nvis;
|
||||||
|
|
||||||
|
Evas_Object_Protected_Data *clipper = NULL;
|
||||||
|
if (obj->cur.clipper)
|
||||||
|
clipper = eo_data_get(obj->cur.clipper, EVAS_OBJ_CLASS);
|
||||||
|
|
||||||
if ((!obj->cur.cache.clip.dirty) &&
|
if ((!obj->cur.cache.clip.dirty) &&
|
||||||
!(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty)) return;
|
!(!obj->cur.clipper || clipper->cur.cache.clip.dirty)) return;
|
||||||
|
|
||||||
if (obj->layer->evas->events_frozen > 0) return;
|
if (obj->layer->evas->is_frozen) return;
|
||||||
|
|
||||||
evas_object_coords_recalc(obj);
|
evas_object_coords_recalc(eo_obj, obj);
|
||||||
|
|
||||||
if ((obj->cur.map) && (obj->cur.usemap))
|
if ((obj->cur.map) && (obj->cur.usemap))
|
||||||
{
|
{
|
||||||
|
@ -234,26 +245,26 @@ evas_object_clip_recalc(Evas_Object *obj)
|
||||||
if (obj->cur.clipper)
|
if (obj->cur.clipper)
|
||||||
{
|
{
|
||||||
// this causes problems... hmmm ?????
|
// this causes problems... hmmm ?????
|
||||||
if (obj->cur.clipper->cur.cache.clip.dirty)
|
if (clipper->cur.cache.clip.dirty)
|
||||||
evas_object_clip_recalc(obj->cur.clipper);
|
evas_object_clip_recalc(obj->cur.clipper, clipper);
|
||||||
|
|
||||||
// I don't know why this test was here in the first place. As I have
|
// I don't know why this test was here in the first place. As I have
|
||||||
// no issue showing up due to this, I keep it and move color out of it.
|
// no issue showing up due to this, I keep it and move color out of it.
|
||||||
// breaks cliping of mapped images!!!
|
// breaks cliping of mapped images!!!
|
||||||
if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent)
|
if (clipper->cur.map_parent == obj->cur.map_parent)
|
||||||
{
|
{
|
||||||
nx = obj->cur.clipper->cur.cache.clip.x;
|
nx = clipper->cur.cache.clip.x;
|
||||||
ny = obj->cur.clipper->cur.cache.clip.y;
|
ny = clipper->cur.cache.clip.y;
|
||||||
nw = obj->cur.clipper->cur.cache.clip.w;
|
nw = clipper->cur.cache.clip.w;
|
||||||
nh = obj->cur.clipper->cur.cache.clip.h;
|
nh = clipper->cur.cache.clip.h;
|
||||||
RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
|
RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
|
||||||
}
|
}
|
||||||
|
|
||||||
nvis = obj->cur.clipper->cur.cache.clip.visible;
|
nvis = clipper->cur.cache.clip.visible;
|
||||||
nr = obj->cur.clipper->cur.cache.clip.r;
|
nr = clipper->cur.cache.clip.r;
|
||||||
ng = obj->cur.clipper->cur.cache.clip.g;
|
ng = clipper->cur.cache.clip.g;
|
||||||
nb = obj->cur.clipper->cur.cache.clip.b;
|
nb = clipper->cur.cache.clip.b;
|
||||||
na = obj->cur.clipper->cur.cache.clip.a;
|
na = clipper->cur.cache.clip.a;
|
||||||
cvis = (cvis & nvis);
|
cvis = (cvis & nvis);
|
||||||
cr = (cr * (nr + 1)) >> 8;
|
cr = (cr * (nr + 1)) >> 8;
|
||||||
cg = (cg * (ng + 1)) >> 8;
|
cg = (cg * (ng + 1)) >> 8;
|
||||||
|
|
|
@ -128,11 +128,9 @@ OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */
|
||||||
# define MAGIC_CHECK_FAILED(o, t, m) \
|
# define MAGIC_CHECK_FAILED(o, t, m) \
|
||||||
{evas_debug_error(); \
|
{evas_debug_error(); \
|
||||||
if (!o) evas_debug_input_null(); \
|
if (!o) evas_debug_input_null(); \
|
||||||
else if (((t *)o)->magic == 0) evas_debug_magic_null(); \
|
|
||||||
else evas_debug_magic_wrong((m), ((t *)o)->magic); \
|
|
||||||
}
|
}
|
||||||
# define MAGIC_CHECK(o, t, m) \
|
# define MAGIC_CHECK(o, t, m) \
|
||||||
{if (EINA_UNLIKELY((!o) || (!(((t *)o)->magic == (m))))) { \
|
{if (EINA_UNLIKELY(!o)) { \
|
||||||
MAGIC_CHECK_FAILED(o, t, m)
|
MAGIC_CHECK_FAILED(o, t, m)
|
||||||
# define MAGIC_CHECK_END() }}
|
# define MAGIC_CHECK_END() }}
|
||||||
#else
|
#else
|
||||||
|
@ -255,6 +253,16 @@ struct _Evas_Smart_Interfaces_Array
|
||||||
const Evas_Smart_Interface **array;
|
const Evas_Smart_Interface **array;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def evas_obj_smart_attach
|
||||||
|
*
|
||||||
|
* Attach a given smart data to a given smart object.
|
||||||
|
*
|
||||||
|
* @param[in] s in
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define evas_obj_smart_attach(s) EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ATTACH), EO_TYPECHECK(Evas_Smart *, s)
|
||||||
|
|
||||||
struct _Evas_Smart
|
struct _Evas_Smart
|
||||||
{
|
{
|
||||||
DATA32 magic;
|
DATA32 magic;
|
||||||
|
@ -304,11 +312,12 @@ struct _Evas_Callbacks
|
||||||
unsigned char deletions_waiting : 1;
|
unsigned char deletions_waiting : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Evas
|
struct _Evas_Public_Data
|
||||||
{
|
{
|
||||||
EINA_INLIST;
|
EINA_INLIST;
|
||||||
|
|
||||||
DATA32 magic;
|
DATA32 magic;
|
||||||
|
Evas *evas;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned char inside : 1;
|
unsigned char inside : 1;
|
||||||
|
@ -350,7 +359,6 @@ struct _Evas
|
||||||
int output_validity;
|
int output_validity;
|
||||||
|
|
||||||
int walking_list;
|
int walking_list;
|
||||||
int events_frozen;
|
|
||||||
Evas_Event_Flags default_event_flags;
|
Evas_Event_Flags default_event_flags;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
@ -383,6 +391,7 @@ struct _Evas
|
||||||
Eina_List *post_events; // free me on evas_free
|
Eina_List *post_events; // free me on evas_free
|
||||||
|
|
||||||
Evas_Callbacks *callbacks;
|
Evas_Callbacks *callbacks;
|
||||||
|
Eina_Inlist *callbacks_infos;
|
||||||
|
|
||||||
int delete_grabs;
|
int delete_grabs;
|
||||||
int walking_grabs;
|
int walking_grabs;
|
||||||
|
@ -407,6 +416,7 @@ struct _Evas
|
||||||
unsigned char invalidate : 1;
|
unsigned char invalidate : 1;
|
||||||
unsigned char cleanup : 1;
|
unsigned char cleanup : 1;
|
||||||
unsigned char focus : 1;
|
unsigned char focus : 1;
|
||||||
|
Eina_Bool is_frozen : 1;
|
||||||
|
|
||||||
Eina_List *touch_points;
|
Eina_List *touch_points;
|
||||||
Eina_List *devices;
|
Eina_List *devices;
|
||||||
|
@ -418,9 +428,9 @@ struct _Evas_Layer
|
||||||
EINA_INLIST;
|
EINA_INLIST;
|
||||||
|
|
||||||
short layer;
|
short layer;
|
||||||
Evas_Object *objects;
|
Evas_Object_Protected_Data *objects;
|
||||||
|
|
||||||
Evas *evas;
|
Evas_Public_Data *evas;
|
||||||
|
|
||||||
void *engine_data;
|
void *engine_data;
|
||||||
int usage;
|
int usage;
|
||||||
|
@ -509,12 +519,10 @@ EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
|
||||||
void evas_filter_free(Evas_Object *o);
|
void evas_filter_free(Evas_Object *o);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct _Evas_Object
|
struct _Evas_Object_Protected_Data
|
||||||
{
|
{
|
||||||
EINA_INLIST;
|
EINA_INLIST;
|
||||||
|
|
||||||
DATA32 magic;
|
|
||||||
|
|
||||||
const char *type;
|
const char *type;
|
||||||
Evas_Layer *layer;
|
Evas_Layer *layer;
|
||||||
|
|
||||||
|
@ -575,8 +583,6 @@ struct _Evas_Object
|
||||||
|
|
||||||
const Evas_Object_Func *func;
|
const Evas_Object_Func *func;
|
||||||
|
|
||||||
void *object_data;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Evas_Smart *smart;
|
Evas_Smart *smart;
|
||||||
Evas_Object *parent;
|
Evas_Object *parent;
|
||||||
|
@ -589,6 +595,8 @@ struct _Evas_Object
|
||||||
Eina_Bool redraw;
|
Eina_Bool redraw;
|
||||||
} proxy;
|
} proxy;
|
||||||
|
|
||||||
|
// Pointer to the Evas_Object itself
|
||||||
|
Evas_Object *object;
|
||||||
#if 0 // filtering disabled
|
#if 0 // filtering disabled
|
||||||
Evas_Filter_Info *filter;
|
Evas_Filter_Info *filter;
|
||||||
#endif
|
#endif
|
||||||
|
@ -601,6 +609,8 @@ struct _Evas_Object
|
||||||
int last_mouse_up_counter;
|
int last_mouse_up_counter;
|
||||||
int mouse_grabbed;
|
int mouse_grabbed;
|
||||||
|
|
||||||
|
// Daniel: Added because the destructor can't take parameters, at least for the moment
|
||||||
|
int clean_layer;
|
||||||
int last_event;
|
int last_event;
|
||||||
Evas_Callback_Type last_event_type;
|
Evas_Callback_Type last_event_type;
|
||||||
|
|
||||||
|
@ -613,6 +623,7 @@ struct _Evas_Object
|
||||||
void **interface_privates;
|
void **interface_privates;
|
||||||
|
|
||||||
unsigned int ref;
|
unsigned int ref;
|
||||||
|
Eina_List *supported_types;
|
||||||
|
|
||||||
unsigned char delete_me;
|
unsigned char delete_me;
|
||||||
|
|
||||||
|
@ -654,6 +665,8 @@ struct _Evas_Object
|
||||||
|
|
||||||
Eina_Bool is_frame : 1;
|
Eina_Bool is_frame : 1;
|
||||||
Eina_Bool child_has_map : 1;
|
Eina_Bool child_has_map : 1;
|
||||||
|
Eina_Bool eo_del_called : 1;
|
||||||
|
Eina_Bool is_smart : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Evas_Func_Node
|
struct _Evas_Func_Node
|
||||||
|
@ -730,10 +743,10 @@ struct _Evas_Device
|
||||||
|
|
||||||
struct _Evas_Object_Func
|
struct _Evas_Object_Func
|
||||||
{
|
{
|
||||||
void (*free) (Evas_Object *obj);
|
void (*free) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
|
void (*render) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *output, void *context, void *surface, int x, int y);
|
||||||
void (*render_pre) (Evas_Object *obj);
|
void (*render_pre) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void (*render_post) (Evas_Object *obj);
|
void (*render_post) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
|
|
||||||
unsigned int (*type_id_get) (Evas_Object *obj);
|
unsigned int (*type_id_get) (Evas_Object *obj);
|
||||||
unsigned int (*visual_id_get) (Evas_Object *obj);
|
unsigned int (*visual_id_get) (Evas_Object *obj);
|
||||||
|
@ -745,18 +758,18 @@ struct _Evas_Object_Func
|
||||||
int (*is_visible) (Evas_Object *obj);
|
int (*is_visible) (Evas_Object *obj);
|
||||||
int (*was_visible) (Evas_Object *obj);
|
int (*was_visible) (Evas_Object *obj);
|
||||||
|
|
||||||
int (*is_opaque) (Evas_Object *obj);
|
int (*is_opaque) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
int (*was_opaque) (Evas_Object *obj);
|
int (*was_opaque) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
|
|
||||||
int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
int (*is_inside) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y);
|
||||||
int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
int (*was_inside) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y);
|
||||||
|
|
||||||
void (*coords_recalc) (Evas_Object *obj);
|
void (*coords_recalc) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
|
|
||||||
void (*scale_update) (Evas_Object *obj);
|
void (*scale_update) (Evas_Object *obj);
|
||||||
|
|
||||||
int (*has_opaque_rect) (Evas_Object *obj);
|
int (*has_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
int (*get_opaque_rect) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
||||||
|
|
||||||
int (*can_map) (Evas_Object *obj);
|
int (*can_map) (Evas_Object *obj);
|
||||||
};
|
};
|
||||||
|
@ -931,6 +944,13 @@ struct _Evas_Image_Save_Func
|
||||||
int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
|
int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
Eo_Event_Description *eo_desc;
|
||||||
|
Eina_Bool is_desc_allocated : 1;
|
||||||
|
} _Evas_Event_Description;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -939,19 +959,19 @@ Evas_Object *evas_object_new(Evas *e);
|
||||||
void evas_object_change_reset(Evas_Object *obj);
|
void evas_object_change_reset(Evas_Object *obj);
|
||||||
void evas_object_cur_prev(Evas_Object *obj);
|
void evas_object_cur_prev(Evas_Object *obj);
|
||||||
void evas_object_free(Evas_Object *obj, int clean_layer);
|
void evas_object_free(Evas_Object *obj, int clean_layer);
|
||||||
void evas_object_update_bounding_box(Evas_Object *obj);
|
void evas_object_update_bounding_box(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_inject(Evas_Object *obj, Evas *e);
|
void evas_object_inject(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas *e);
|
||||||
void evas_object_release(Evas_Object *obj, int clean_layer);
|
void evas_object_release(Evas_Object *obj, Evas_Object_Protected_Data *pd, int clean_layer);
|
||||||
void evas_object_change(Evas_Object *obj);
|
void evas_object_change(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_clip_changes_clean(Evas_Object *obj);
|
void evas_object_clip_changes_clean(Evas_Object *obj);
|
||||||
void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
|
void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
|
||||||
void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
|
void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
|
||||||
void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj);
|
void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
|
void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
|
||||||
void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
|
void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
|
||||||
|
|
||||||
void evas_object_clip_dirty(Evas_Object *obj);
|
void evas_object_clip_dirty(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_recalc_clippees(Evas_Object *obj);
|
void evas_object_recalc_clippees(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
Evas_Layer *evas_layer_new(Evas *e);
|
Evas_Layer *evas_layer_new(Evas *e);
|
||||||
void evas_layer_pre_free(Evas_Layer *lay);
|
void evas_layer_pre_free(Evas_Layer *lay);
|
||||||
void evas_layer_free_objects(Evas_Layer *lay);
|
void evas_layer_free_objects(Evas_Layer *lay);
|
||||||
|
@ -960,17 +980,17 @@ Evas_Layer *evas_layer_find(Evas *e, short layer_num);
|
||||||
void evas_layer_add(Evas_Layer *lay);
|
void evas_layer_add(Evas_Layer *lay);
|
||||||
void evas_layer_del(Evas_Layer *lay);
|
void evas_layer_del(Evas_Layer *lay);
|
||||||
|
|
||||||
int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
|
int evas_object_was_in_output_rect(Evas_Object *obj, Evas_Object_Protected_Data *pd, int x, int y, int w, int h);
|
||||||
|
|
||||||
int evas_object_was_opaque(Evas_Object *obj);
|
int evas_object_was_opaque(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
int evas_object_is_inside(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y);
|
||||||
int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
int evas_object_was_inside(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y);
|
||||||
int evas_object_clippers_was_visible(Evas_Object *obj);
|
int evas_object_clippers_was_visible(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_clip_across_check(Evas_Object *obj);
|
void evas_object_clip_across_check(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_clip_across_clippees_check(Evas_Object *obj);
|
void evas_object_clip_across_clippees_check(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_mapped_clip_across_mark(Evas_Object *obj);
|
void evas_object_mapped_clip_across_mark(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
|
void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
|
||||||
void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id);
|
void evas_object_event_callback_call(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Callback_Type type, void *event_info, int event_id);
|
||||||
Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
|
Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
|
||||||
int evas_mem_free(int mem_required);
|
int evas_mem_free(int mem_required);
|
||||||
int evas_mem_degrade(int mem_required);
|
int evas_mem_degrade(int mem_required);
|
||||||
|
@ -1004,7 +1024,7 @@ void evas_call_smarts_calculate(Evas *e);
|
||||||
void evas_object_smart_bouding_box_update(Evas_Object *obj);
|
void evas_object_smart_bouding_box_update(Evas_Object *obj);
|
||||||
void evas_object_smart_need_bounding_box_update(Evas_Object *obj);
|
void evas_object_smart_need_bounding_box_update(Evas_Object *obj);
|
||||||
void *evas_mem_calloc(int size);
|
void *evas_mem_calloc(int size);
|
||||||
void _evas_post_event_callback_call(Evas *e);
|
void _evas_post_event_callback_call(Evas *e, Evas_Public_Data* e_pd);
|
||||||
void _evas_post_event_callback_free(Evas *e);
|
void _evas_post_event_callback_free(Evas *e);
|
||||||
void evas_event_callback_list_post_free(Eina_Inlist **list);
|
void evas_event_callback_list_post_free(Eina_Inlist **list);
|
||||||
void evas_object_event_callback_all_del(Evas_Object *obj);
|
void evas_object_event_callback_all_del(Evas_Object *obj);
|
||||||
|
@ -1013,7 +1033,7 @@ void evas_event_callback_all_del(Evas *e);
|
||||||
void evas_event_callback_cleanup(Evas *e);
|
void evas_event_callback_cleanup(Evas *e);
|
||||||
void evas_object_inform_call_show(Evas_Object *obj);
|
void evas_object_inform_call_show(Evas_Object *obj);
|
||||||
void evas_object_inform_call_hide(Evas_Object *obj);
|
void evas_object_inform_call_hide(Evas_Object *obj);
|
||||||
void evas_object_inform_call_move(Evas_Object *obj);
|
void evas_object_inform_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_object_inform_call_resize(Evas_Object *obj);
|
void evas_object_inform_call_resize(Evas_Object *obj);
|
||||||
void evas_object_inform_call_restack(Evas_Object *obj);
|
void evas_object_inform_call_restack(Evas_Object *obj);
|
||||||
void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
|
void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
|
||||||
|
@ -1023,7 +1043,7 @@ void evas_object_inform_call_image_resize(Evas_Object *obj);
|
||||||
void evas_object_intercept_cleanup(Evas_Object *obj);
|
void evas_object_intercept_cleanup(Evas_Object *obj);
|
||||||
int evas_object_intercept_call_show(Evas_Object *obj);
|
int evas_object_intercept_call_show(Evas_Object *obj);
|
||||||
int evas_object_intercept_call_hide(Evas_Object *obj);
|
int evas_object_intercept_call_hide(Evas_Object *obj);
|
||||||
int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
int evas_object_intercept_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Coord x, Evas_Coord y);
|
||||||
int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||||
int evas_object_intercept_call_raise(Evas_Object *obj);
|
int evas_object_intercept_call_raise(Evas_Object *obj);
|
||||||
int evas_object_intercept_call_lower(Evas_Object *obj);
|
int evas_object_intercept_call_lower(Evas_Object *obj);
|
||||||
|
@ -1031,10 +1051,10 @@ int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above)
|
||||||
int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
|
int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
|
||||||
int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
|
int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
|
||||||
int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
||||||
int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
|
int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object_Protected_Data *pd, Evas_Object *clip);
|
||||||
int evas_object_intercept_call_clip_unset(Evas_Object *obj);
|
int evas_object_intercept_call_clip_unset(Evas_Object *obj);
|
||||||
void evas_object_grabs_cleanup(Evas_Object *obj);
|
void evas_object_grabs_cleanup(Evas_Object *obj, Evas_Object_Protected_Data *pd);
|
||||||
void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
|
void evas_key_grab_free(Evas_Object *obj, Evas_Object_Protected_Data *pd, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
|
||||||
void evas_font_dir_cache_free(void);
|
void evas_font_dir_cache_free(void);
|
||||||
const char *evas_font_dir_cache_find(char *dir, char *font);
|
const char *evas_font_dir_cache_find(char *dir, char *font);
|
||||||
Eina_List *evas_font_dir_available_list(const Evas* evas);
|
Eina_List *evas_font_dir_available_list(const Evas* evas);
|
||||||
|
@ -1056,6 +1076,123 @@ void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t,
|
||||||
void _evas_object_text_rehint(Evas_Object *obj);
|
void _evas_object_text_rehint(Evas_Object *obj);
|
||||||
void _evas_object_textblock_rehint(Evas_Object *obj);
|
void _evas_object_textblock_rehint(Evas_Object *obj);
|
||||||
|
|
||||||
|
|
||||||
|
void _freeze_events_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _freeze_events_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _pass_events_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _pass_events_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _repeat_events_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _repeat_events_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _propagate_events_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _propagate_events_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _pointer_mode_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _pointer_mode_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _key_grab(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _key_ungrab(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _focus_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _focus_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _name_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _name_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _name_child_find(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _layer_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _layer_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _clip_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _clip_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _clip_unset(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _clipees_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _map_enable_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _map_enable_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _map_source_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _map_source_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _map_set(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _map_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _raise(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _lower(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _stack_above(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _stack_below(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _above_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _below_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _smart_move_children_relative(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _smart_clipped_clipper_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_event_default_flags_set(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_default_flags_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_freeze(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_thaw(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_down(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_up(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_cancel(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_wheel(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_move(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_in(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_mouse_out(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_multi_down(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_multi_up(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_multi_move(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_key_down(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_key_up(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_feed_hold(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_refeed_event(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_event_down_count_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_focus_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_path_clear(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_path_append(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_path_prepend(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_path_list(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_hinting_set(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_hinting_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_hinting_can_hint(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_cache_flush(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_cache_set(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_cache_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_font_available_list(Eo *e, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_key_modifier_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_lock_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_modifier_add(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_modifier_del(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_lock_add(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_lock_del(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_modifier_on(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_modifier_off(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_lock_on(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_lock_off(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_key_modifier_mask_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_damage_rectangle_add(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_obscured_rectangle_add(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_obscured_clear(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_render_updates(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_render(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_norender(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_render_idle_flush(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_sync(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_render_dump(Eo *obj, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_object_bottom_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_object_top_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_touch_point_list_count(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_touch_point_list_nth_xy_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_touch_point_list_nth_id_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
void _canvas_touch_point_list_nth_state_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_image_cache_flush(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_image_cache_reload(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_image_cache_set(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_image_cache_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_image_max_size_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_object_name_find(Eo *e, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_object_top_at_xy_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_object_top_in_rectangle_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_objects_at_xy_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_objects_in_rectangle_get(Eo *obj, void *_pd, va_list *list);
|
||||||
|
|
||||||
|
void _canvas_smart_objects_calculate(Eo *e, void *_pd, va_list *list);
|
||||||
|
void _canvas_smart_objects_calculate_count_get(Eo *e, void *_pd, va_list *list);
|
||||||
|
|
||||||
extern int _evas_alloc_error;
|
extern int _evas_alloc_error;
|
||||||
extern int _evas_event_counter;
|
extern int _evas_event_counter;
|
||||||
|
|
||||||
|
@ -1081,14 +1218,14 @@ Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data),
|
||||||
const void *data);
|
const void *data);
|
||||||
Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
|
Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
|
||||||
|
|
||||||
void _evas_walk(Evas *e);
|
void _evas_walk(Evas_Public_Data *e_pd);
|
||||||
void _evas_unwalk(Evas *e);
|
void _evas_unwalk(Evas_Public_Data *e_pd);
|
||||||
|
|
||||||
// expose for use in engines
|
// expose for use in engines
|
||||||
EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
|
EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
|
||||||
EAPI const char *_evas_module_libdir_get(void);
|
EAPI const char *_evas_module_libdir_get(void);
|
||||||
|
|
||||||
Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj,
|
Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, Evas_Object_Protected_Data *source_pd,
|
||||||
void *context, void *surface,
|
void *context, void *surface,
|
||||||
int off_x, int off_y, int mapped,
|
int off_x, int off_y, int mapped,
|
||||||
int ecx, int ecy, int ecw, int ech
|
int ecx, int ecy, int ecw, int ech
|
||||||
|
|
|
@ -32,9 +32,9 @@ struct _Render_Engine
|
||||||
/* prototypes we will use here */
|
/* prototypes we will use here */
|
||||||
static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void *dest_buffer), void *switch_data);
|
static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void *dest_buffer), void *switch_data);
|
||||||
|
|
||||||
static void *eng_info(Evas *e __UNUSED__);
|
static void *eng_info(Evas *eo_e __UNUSED__);
|
||||||
static void eng_info_free(Evas *e __UNUSED__, void *info);
|
static void eng_info_free(Evas *eo_e __UNUSED__, void *info);
|
||||||
static int eng_setup(Evas *e, void *info);
|
static int eng_setup(Evas *eo_e, void *info);
|
||||||
static void eng_output_free(void *data);
|
static void eng_output_free(void *data);
|
||||||
static void eng_output_resize(void *data, int w, int h);
|
static void eng_output_resize(void *data, int w, int h);
|
||||||
static void eng_output_tile_size_set(void *data, int w, int h);
|
static void eng_output_tile_size_set(void *data, int w, int h);
|
||||||
|
@ -125,7 +125,7 @@ _output_setup(int w,
|
||||||
|
|
||||||
/* engine api this module provides */
|
/* engine api this module provides */
|
||||||
static void *
|
static void *
|
||||||
eng_info(Evas *e __UNUSED__)
|
eng_info(Evas *eo_e __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Buffer *info;
|
Evas_Engine_Info_Buffer *info;
|
||||||
info = calloc(1, sizeof(Evas_Engine_Info_Buffer));
|
info = calloc(1, sizeof(Evas_Engine_Info_Buffer));
|
||||||
|
@ -136,7 +136,7 @@ eng_info(Evas *e __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eng_info_free(Evas *e __UNUSED__, void *info)
|
eng_info_free(Evas *eo_e __UNUSED__, void *info)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Buffer *in;
|
Evas_Engine_Info_Buffer *in;
|
||||||
in = (Evas_Engine_Info_Buffer *)info;
|
in = (Evas_Engine_Info_Buffer *)info;
|
||||||
|
@ -144,8 +144,9 @@ eng_info_free(Evas *e __UNUSED__, void *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
eng_setup(Evas *e, void *in)
|
eng_setup(Evas *eo_e, void *in)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
Evas_Engine_Info_Buffer *info;
|
Evas_Engine_Info_Buffer *info;
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@ struct _Render_Engine
|
||||||
/* prototypes we will use here */
|
/* prototypes we will use here */
|
||||||
static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh);
|
static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh);
|
||||||
|
|
||||||
static void *eng_info(Evas *e);
|
static void *eng_info(Evas *eo_e);
|
||||||
static void eng_info_free(Evas *e, void *info);
|
static void eng_info_free(Evas *eo_e, void *info);
|
||||||
static int eng_setup(Evas *e, void *info);
|
static int eng_setup(Evas *eo_e, void *info);
|
||||||
static void eng_output_free(void *data);
|
static void eng_output_free(void *data);
|
||||||
static void eng_output_resize(void *data, int w, int h);
|
static void eng_output_resize(void *data, int w, int h);
|
||||||
static void eng_output_tile_size_set(void *data, int w, int h);
|
static void eng_output_tile_size_set(void *data, int w, int h);
|
||||||
|
@ -74,7 +74,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh)
|
||||||
|
|
||||||
/* engine api this module provides */
|
/* engine api this module provides */
|
||||||
static void *
|
static void *
|
||||||
eng_info(Evas *e __UNUSED__)
|
eng_info(Evas *eo_e __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_FB *info;
|
Evas_Engine_Info_FB *info;
|
||||||
info = calloc(1, sizeof(Evas_Engine_Info_FB));
|
info = calloc(1, sizeof(Evas_Engine_Info_FB));
|
||||||
|
@ -85,7 +85,7 @@ eng_info(Evas *e __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eng_info_free(Evas *e __UNUSED__, void *info)
|
eng_info_free(Evas *eo_e __UNUSED__, void *info)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_FB *in;
|
Evas_Engine_Info_FB *in;
|
||||||
in = (Evas_Engine_Info_FB *)info;
|
in = (Evas_Engine_Info_FB *)info;
|
||||||
|
@ -93,8 +93,9 @@ eng_info_free(Evas *e __UNUSED__, void *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
eng_setup(Evas *e, void *in)
|
eng_setup(Evas *eo_e, void *in)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
Evas_Engine_Info_FB *info;
|
Evas_Engine_Info_FB *info;
|
||||||
|
|
||||||
|
|
|
@ -158,13 +158,14 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
|
||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
int imgc[4], int objc[4])
|
int imgc[4], int objc[4])
|
||||||
{
|
{
|
||||||
|
Evas_Object_Protected_Data *pd = eo_data_get(obj, EVAS_OBJ_CLASS);
|
||||||
if (rot == 0)
|
if (rot == 0)
|
||||||
{
|
{
|
||||||
// oringinal image object coordinate in gl coordinate
|
// oringinal image object coordinate in gl coordinate
|
||||||
imgc[0] = obj->cur.geometry.x;
|
imgc[0] = pd->cur.geometry.x;
|
||||||
imgc[1] = obj->layer->evas->output.h - obj->cur.geometry.y - obj->cur.geometry.h;
|
imgc[1] = pd->layer->evas->output.h - pd->cur.geometry.y - pd->cur.geometry.h;
|
||||||
imgc[2] = imgc[0] + obj->cur.geometry.w;
|
imgc[2] = imgc[0] + pd->cur.geometry.w;
|
||||||
imgc[3] = imgc[1] + obj->cur.geometry.h;
|
imgc[3] = imgc[1] + pd->cur.geometry.h;
|
||||||
|
|
||||||
// transformed (x,y,width,height) in gl coordinate
|
// transformed (x,y,width,height) in gl coordinate
|
||||||
objc[0] = imgc[0] + x;
|
objc[0] = imgc[0] + x;
|
||||||
|
@ -175,14 +176,14 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
|
||||||
else if (rot == 180)
|
else if (rot == 180)
|
||||||
{
|
{
|
||||||
// oringinal image object coordinate in gl coordinate
|
// oringinal image object coordinate in gl coordinate
|
||||||
imgc[0] = obj->layer->evas->output.w - obj->cur.geometry.x - obj->cur.geometry.w;
|
imgc[0] = pd->layer->evas->output.w - pd->cur.geometry.x - pd->cur.geometry.w;
|
||||||
imgc[1] = obj->cur.geometry.y;
|
imgc[1] = pd->cur.geometry.y;
|
||||||
imgc[2] = imgc[0] + obj->cur.geometry.w;
|
imgc[2] = imgc[0] + pd->cur.geometry.w;
|
||||||
imgc[3] = imgc[1] + obj->cur.geometry.h;
|
imgc[3] = imgc[1] + pd->cur.geometry.h;
|
||||||
|
|
||||||
// transformed (x,y,width,height) in gl coordinate
|
// transformed (x,y,width,height) in gl coordinate
|
||||||
objc[0] = imgc[0] + obj->cur.geometry.w - x - width;
|
objc[0] = imgc[0] + pd->cur.geometry.w - x - width;
|
||||||
objc[1] = imgc[1] + obj->cur.geometry.h - y - height;
|
objc[1] = imgc[1] + pd->cur.geometry.h - y - height;
|
||||||
objc[2] = objc[0] + width;
|
objc[2] = objc[0] + width;
|
||||||
objc[3] = objc[1] + height;
|
objc[3] = objc[1] + height;
|
||||||
|
|
||||||
|
@ -190,13 +191,13 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
|
||||||
else if (rot == 90)
|
else if (rot == 90)
|
||||||
{
|
{
|
||||||
// oringinal image object coordinate in gl coordinate
|
// oringinal image object coordinate in gl coordinate
|
||||||
imgc[0] = obj->cur.geometry.y;
|
imgc[0] = pd->cur.geometry.y;
|
||||||
imgc[1] = obj->cur.geometry.x;
|
imgc[1] = pd->cur.geometry.x;
|
||||||
imgc[2] = imgc[0] + obj->cur.geometry.h;
|
imgc[2] = imgc[0] + pd->cur.geometry.h;
|
||||||
imgc[3] = imgc[1] + obj->cur.geometry.w;
|
imgc[3] = imgc[1] + pd->cur.geometry.w;
|
||||||
|
|
||||||
// transformed (x,y,width,height) in gl coordinate
|
// transformed (x,y,width,height) in gl coordinate
|
||||||
objc[0] = imgc[0] + obj->cur.geometry.h - y - height;
|
objc[0] = imgc[0] + pd->cur.geometry.h - y - height;
|
||||||
objc[1] = imgc[1] + x;
|
objc[1] = imgc[1] + x;
|
||||||
objc[2] = objc[0] + height;
|
objc[2] = objc[0] + height;
|
||||||
objc[3] = objc[1] + width;
|
objc[3] = objc[1] + width;
|
||||||
|
@ -204,14 +205,14 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
|
||||||
else if (rot == 270)
|
else if (rot == 270)
|
||||||
{
|
{
|
||||||
// oringinal image object coordinate in gl coordinate
|
// oringinal image object coordinate in gl coordinate
|
||||||
imgc[0] = obj->layer->evas->output.h - obj->cur.geometry.y - obj->cur.geometry.h;
|
imgc[0] = pd->layer->evas->output.h - pd->cur.geometry.y - pd->cur.geometry.h;
|
||||||
imgc[1] = obj->layer->evas->output.w - obj->cur.geometry.x - obj->cur.geometry.w;
|
imgc[1] = pd->layer->evas->output.w - pd->cur.geometry.x - pd->cur.geometry.w;
|
||||||
imgc[2] = imgc[0] + obj->cur.geometry.h;
|
imgc[2] = imgc[0] + pd->cur.geometry.h;
|
||||||
imgc[3] = imgc[1] + obj->cur.geometry.w;
|
imgc[3] = imgc[1] + pd->cur.geometry.w;
|
||||||
|
|
||||||
// transformed (x,y,width,height) in gl coordinate
|
// transformed (x,y,width,height) in gl coordinate
|
||||||
objc[0] = imgc[0] + y;
|
objc[0] = imgc[0] + y;
|
||||||
objc[1] = imgc[1] + obj->cur.geometry.w - x - width;
|
objc[1] = imgc[1] + pd->cur.geometry.w - x - width;
|
||||||
objc[2] = objc[0] + height;
|
objc[2] = objc[0] + height;
|
||||||
objc[3] = objc[1] + width;
|
objc[3] = objc[1] + width;
|
||||||
}
|
}
|
||||||
|
|
|
@ -592,7 +592,7 @@ int _evas_engine_GL_X11_log_dom = -1;
|
||||||
static Evas_Func func, pfunc;
|
static Evas_Func func, pfunc;
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
eng_info(Evas *e)
|
eng_info(Evas *eo_e)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_GL_X11 *info;
|
Evas_Engine_Info_GL_X11 *info;
|
||||||
|
|
||||||
|
@ -603,11 +603,11 @@ eng_info(Evas *e)
|
||||||
info->func.best_depth_get = eng_best_depth_get;
|
info->func.best_depth_get = eng_best_depth_get;
|
||||||
info->render_mode = EVAS_RENDER_MODE_BLOCKING;
|
info->render_mode = EVAS_RENDER_MODE_BLOCKING;
|
||||||
return info;
|
return info;
|
||||||
e = NULL;
|
eo_e = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eng_info_free(Evas *e __UNUSED__, void *info)
|
eng_info_free(Evas *eo_e __UNUSED__, void *info)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_GL_X11 *in;
|
Evas_Engine_Info_GL_X11 *in;
|
||||||
// dont free! why bother? its not worth it
|
// dont free! why bother? its not worth it
|
||||||
|
@ -637,8 +637,9 @@ _re_winfree(Render_Engine *re)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
eng_setup(Evas *e, void *in)
|
eng_setup(Evas *eo_e, void *in)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
Evas_Engine_Info_GL_X11 *info;
|
Evas_Engine_Info_GL_X11 *info;
|
||||||
const char *s;
|
const char *s;
|
||||||
|
@ -1271,6 +1272,7 @@ eng_output_idle_flush(void *data)
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
|
|
||||||
re = (Render_Engine *)data;
|
re = (Render_Engine *)data;
|
||||||
|
(void) re;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1335,6 +1337,7 @@ eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
|
|
||||||
re = (Render_Engine *)data;
|
re = (Render_Engine *)data;
|
||||||
|
(void) re;
|
||||||
return evas_gl_common_poly_point_add(polygon, x, y);
|
return evas_gl_common_poly_point_add(polygon, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1344,6 +1347,7 @@ eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon)
|
||||||
Render_Engine *re;
|
Render_Engine *re;
|
||||||
|
|
||||||
re = (Render_Engine *)data;
|
re = (Render_Engine *)data;
|
||||||
|
(void) re;
|
||||||
return evas_gl_common_poly_points_clear(polygon);
|
return evas_gl_common_poly_points_clear(polygon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1483,6 +1487,7 @@ eng_image_format_get(void *data __UNUSED__, void *image)
|
||||||
|
|
||||||
// re = (Render_Engine *)data;
|
// re = (Render_Engine *)data;
|
||||||
im = image;
|
im = image;
|
||||||
|
(void) im;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ static void *_best_visual_get(int backend, void *connection, int screen);
|
||||||
static unsigned int _best_colormap_get(int backend, void *connection, int screen);
|
static unsigned int _best_colormap_get(int backend, void *connection, int screen);
|
||||||
static int _best_depth_get(int backend, void *connection, int screen);
|
static int _best_depth_get(int backend, void *connection, int screen);
|
||||||
|
|
||||||
static void *eng_info(Evas *e);
|
static void *eng_info(Evas *eo_e);
|
||||||
static void eng_info_free(Evas *e, void *info);
|
static void eng_info_free(Evas *eo_e, void *info);
|
||||||
static int eng_setup(Evas *e, void *info);
|
static int eng_setup(Evas *eo_e, void *info);
|
||||||
static void eng_output_free(void *data);
|
static void eng_output_free(void *data);
|
||||||
static void eng_output_resize(void *data, int w, int h);
|
static void eng_output_resize(void *data, int w, int h);
|
||||||
static void eng_output_tile_size_set(void *data, int w, int h);
|
static void eng_output_tile_size_set(void *data, int w, int h);
|
||||||
|
@ -355,7 +355,7 @@ _best_depth_get(int backend, void *connection, int screen)
|
||||||
|
|
||||||
/* engine api this module provides */
|
/* engine api this module provides */
|
||||||
static void *
|
static void *
|
||||||
eng_info(Evas *e __UNUSED__)
|
eng_info(Evas *eo_e __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Software_X11 *info;
|
Evas_Engine_Info_Software_X11 *info;
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ eng_info(Evas *e __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eng_info_free(Evas *e __UNUSED__, void *info)
|
eng_info_free(Evas *eo_e __UNUSED__, void *info)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Software_X11 *in;
|
Evas_Engine_Info_Software_X11 *in;
|
||||||
|
|
||||||
|
@ -383,8 +383,9 @@ eng_info_free(Evas *e __UNUSED__, void *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
eng_setup(Evas *e, void *in)
|
eng_setup(Evas *eo_e, void *in)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
|
||||||
Evas_Engine_Info_Software_X11 *info;
|
Evas_Engine_Info_Software_X11 *info;
|
||||||
Render_Engine *re = NULL;
|
Render_Engine *re = NULL;
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,9 @@ int _evas_engine_way_shm_log_dom = -1;
|
||||||
static void *_output_setup(int w, int h, int rotation, Eina_Bool alpha, void *dest);
|
static void *_output_setup(int w, int h, int rotation, Eina_Bool alpha, void *dest);
|
||||||
|
|
||||||
/* engine function prototypes */
|
/* engine function prototypes */
|
||||||
static void *eng_info(Evas *evas __UNUSED__);
|
static void *eng_info(Evas *eo_evas __UNUSED__);
|
||||||
static void eng_info_free(Evas *evas __UNUSED__, void *info);
|
static void eng_info_free(Evas *eo_evas __UNUSED__, void *info);
|
||||||
static int eng_setup(Evas *evas, void *info);
|
static int eng_setup(Evas *eo_evas, void *info);
|
||||||
static void eng_output_free(void *data);
|
static void eng_output_free(void *data);
|
||||||
static void eng_output_resize(void *data, int w, int h);
|
static void eng_output_resize(void *data, int w, int h);
|
||||||
static void eng_output_tile_size_set(void *data, int w, int h);
|
static void eng_output_tile_size_set(void *data, int w, int h);
|
||||||
|
@ -75,7 +75,7 @@ _output_setup(int w, int h, int rotation, Eina_Bool alpha, void *dest)
|
||||||
|
|
||||||
/* engine functions */
|
/* engine functions */
|
||||||
static void *
|
static void *
|
||||||
eng_info(Evas *evas __UNUSED__)
|
eng_info(Evas *eo_evas __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Wayland_Shm *info;
|
Evas_Engine_Info_Wayland_Shm *info;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ eng_info(Evas *evas __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eng_info_free(Evas *evas __UNUSED__, void *info)
|
eng_info_free(Evas *eo_evas __UNUSED__, void *info)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Wayland_Shm *in;
|
Evas_Engine_Info_Wayland_Shm *in;
|
||||||
|
|
||||||
|
@ -102,8 +102,9 @@ eng_info_free(Evas *evas __UNUSED__, void *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
eng_setup(Evas *evas, void *info)
|
eng_setup(Evas *eo_evas, void *info)
|
||||||
{
|
{
|
||||||
|
Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS);
|
||||||
Evas_Engine_Info_Wayland_Shm *in;
|
Evas_Engine_Info_Wayland_Shm *in;
|
||||||
Render_Engine *re = NULL;
|
Render_Engine *re = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue