Evas: Cleanup evas smart clipped class

This is legacy stuff. I wish we could hide it from our inheritance
entirely. Instead, just make it abstract, remove all functions from
eo (doable here) and rename with the keyword "internal" in the new
ugly java style name.
This commit is contained in:
Jean-Philippe Andre 2016-06-17 15:32:37 +09:00
parent 9c156c0be7
commit 4653cc44dd
13 changed files with 57 additions and 67 deletions

View File

@ -42,7 +42,7 @@ evas_eolian_pub_files = \
lib/evas/canvas/efl_canvas_surface_x11.eo \
lib/evas/canvas/efl_canvas_surface_wayland.eo \
lib/evas/canvas/efl_canvas_filter_internal.eo \
lib/evas/canvas/evas_smart_clipped.eo \
lib/evas/canvas/efl_canvas_object_internal_smart_clipped.eo \
lib/evas/canvas/efl_event_input.eo \
lib/evas/canvas/efl_event_key.eo \
lib/evas/canvas/efl_event_pointer.eo \

View File

@ -1,6 +1,6 @@
import edje_types;
class Edje.Object (Evas.Smart.Clipped, Efl.File, Efl.Container, Efl.Part)
class Edje.Object (Efl.Canvas.Object.Internal.Smart.Clipped, Efl.File, Efl.Container, Efl.Part)
{
legacy_prefix: edje_object;
eo_prefix: edje_obj;

View File

@ -31,7 +31,7 @@ _edje_object_eo_base_constructor(Eo *obj, Edje *ed)
Evas *e;
void *tmp;
ed->base = eo_data_ref(obj, EVAS_SMART_CLIPPED_CLASS);
ed->base = eo_data_ref(obj, EFL_CANVAS_OBJECT_INTERNAL_SMART_CLIPPED_CLASS);
ed->duration_scale = 1.0;
obj = eo_constructor(eo_super(obj, MY_CLASS));

View File

@ -1,4 +1,4 @@
class Elm.Pan (Evas.Smart.Clipped)
class Elm.Pan (Efl.Canvas.Object.Internal.Smart.Clipped)
{
legacy_prefix: elm_pan;
eo_prefix: elm_obj_pan;

View File

@ -57,7 +57,7 @@
*
* @{
*/
#include "canvas/evas_smart_clipped.eo.h"
#include "canvas/efl_canvas_object_internal_smart_clipped.eo.h"
/**
* @}
*/

View File

@ -5191,6 +5191,16 @@ EAPI Evas_Smart *evas_object_smart_smart_get(const Evas_Object *obj) EINA_WARN_U
EAPI void evas_object_smart_data_set(Evas_Object *obj, void *data);
EAPI void *evas_object_smart_data_get(const Evas_Object *obj);
/**
* @brief Get the clipper object for the given clipped smart object.
*
* Use this function if you want to change any of this clipper's properties,
* like colors.
*
* @ingroup Evas_Object
*/
EAPI Evas_Object *evas_object_smart_clipped_clipper_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Retrieves the list of the member objects of a given Evas smart
* object.
@ -5254,7 +5264,7 @@ EAPI int evas_smart_objects_calculate_count_get(const Evas *e);
*/
EAPI Evas_Object *evas_object_smart_clipped_clipper_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
#include "canvas/evas_smart_clipped.eo.legacy.h"
#include "canvas/efl_canvas_object_internal_smart_clipped.eo.legacy.h"
/**
* @}

View File

@ -0,0 +1,17 @@
abstract Efl.Canvas.Object.Internal.Smart.Clipped (Evas.Object.Smart)
{
[[Internal class representing a canvas object group with a clipper.]]
data: Evas_Object_Smart_Clipped_Data;
implements {
Evas.Object.Smart.smart_hide;
Evas.Object.Smart.smart_clip.set;
Evas.Object.Smart.smart_clip_unset;
Evas.Object.Smart.smart_show;
Evas.Object.Smart.smart_color.set;
Evas.Object.Smart.smart_move;
Evas.Object.Smart.smart_member_del;
Evas.Object.Smart.smart_add;
Evas.Object.Smart.smart_del;
Evas.Object.Smart.smart_member_add;
}
}

View File

@ -4,7 +4,7 @@ type @extern Evas_Object_Box_Layout: __undefined_type; /* FIXME: Function pointe
type @extern Eina_Free_Cb: __undefined_type; /* FIXME: Function pointers are not supported */
type @extern va_list: __undefined_type; /* FIXME: va_list is not supported */
class Evas.Box (Evas.Smart.Clipped)
class Evas.Box (Efl.Canvas.Object.Internal.Smart.Clipped)
{
legacy_prefix: evas_object_box;
eo_prefix: evas_obj_box;

View File

@ -1,4 +1,4 @@
class Evas.Grid (Evas.Smart.Clipped)
class Evas.Grid (Efl.Canvas.Object.Internal.Smart.Clipped)
{
legacy_prefix: evas_object_grid;
eo_prefix: evas_obj_grid;

View File

@ -691,8 +691,8 @@ _evas_object_smart_smart_no_render_set(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSE
Evas_Object_Smart_Clipped_Data *cso;
Evas_Object *cso_clipper;
if (eo_isa(eo_obj, EVAS_SMART_CLIPPED_CLASS))
cso = eo_data_scope_get(eo_obj, EVAS_SMART_CLIPPED_CLASS);
if (eo_isa(eo_obj, EFL_CANVAS_OBJECT_INTERNAL_SMART_CLIPPED_CLASS))
cso = eo_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_INTERNAL_SMART_CLIPPED_CLASS);
else
cso = evas_object_smart_data_get(eo_obj);
cso_clipper = cso ? cso->clipper : NULL;

View File

@ -1,7 +1,7 @@
#include "evas_common_private.h"
#include "evas_private.h"
#define MY_CLASS EVAS_SMART_CLIPPED_CLASS
#define MY_CLASS EFL_CANVAS_OBJECT_INTERNAL_SMART_CLIPPED_CLASS
#define CSO_DATA_GET(eo_obj, ptr) \
Evas_Object_Smart_Clipped_Data *ptr = (eo_isa(eo_obj, MY_CLASS) ? \
@ -35,9 +35,14 @@ _evas_object_smart_smart_move_children_relative(Eo *eo_obj, Evas_Object_Protecte
}
}
static EOLIAN Evas_Object *
_evas_smart_clipped_smart_clipped_clipper_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Smart_Clipped_Data *obj)
EAPI Evas_Object *
evas_object_smart_clipped_clipper_get(const Evas_Object *eo_obj)
{
Evas_Object_Smart_Clipped_Data *obj;
if (!eo_isa(eo_obj, EFL_CANVAS_OBJECT_INTERNAL_SMART_CLIPPED_CLASS))
return NULL;
obj = eo_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_INTERNAL_SMART_CLIPPED_CLASS);
return obj->clipper;
}
@ -67,7 +72,7 @@ evas_object_smart_clipped_smart_add(Evas_Object *eo_obj)
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_add(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_add(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
{
evas_object_smart_clipped_smart_add(eo_obj);
}
@ -94,7 +99,7 @@ evas_object_smart_clipped_smart_del(Evas_Object *eo_obj)
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_del(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_del(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
{
evas_object_smart_clipped_smart_del(eo_obj);
}
@ -109,7 +114,7 @@ evas_object_smart_clipped_smart_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coo
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_move(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Coord x, Evas_Coord y)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_move(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Coord x, Evas_Coord y)
{
evas_object_smart_clipped_smart_move(eo_obj, x, y);
}
@ -123,7 +128,7 @@ evas_object_smart_clipped_smart_show(Evas_Object *eo_obj)
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_show(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_show(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
{
evas_object_smart_clipped_smart_show(eo_obj);
}
@ -136,7 +141,7 @@ evas_object_smart_clipped_smart_hide(Evas_Object *eo_obj)
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_hide(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_hide(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
{
evas_object_smart_clipped_smart_hide(eo_obj);
}
@ -149,7 +154,7 @@ evas_object_smart_clipped_smart_color_set(Evas_Object *eo_obj, int r, int g, int
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_color_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, int r, int g, int b, int a)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_color_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, int r, int g, int b, int a)
{
evas_object_smart_clipped_smart_color_set(eo_obj, r, g, b, a);
}
@ -162,7 +167,7 @@ evas_object_smart_clipped_smart_clip_set(Evas_Object *eo_obj, Evas_Object *clip)
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_clip_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *clip)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_clip_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *clip)
{
evas_object_smart_clipped_smart_clip_set(eo_obj, clip);
}
@ -175,7 +180,7 @@ evas_object_smart_clipped_smart_clip_unset(Evas_Object *eo_obj)
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_clip_unset(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_clip_unset(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED)
{
evas_object_smart_clipped_smart_clip_unset(eo_obj);
}
@ -192,7 +197,7 @@ evas_object_smart_clipped_smart_member_add(Evas_Object *eo_obj, Evas_Object *mem
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_member_add(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *member)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_member_add(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *member)
{
evas_obj_smart_member_add(eo_super(eo_obj, MY_CLASS), member);
evas_object_smart_clipped_smart_member_add(eo_obj, member);
@ -210,7 +215,7 @@ evas_object_smart_clipped_smart_member_del(Evas_Object *eo_obj, Evas_Object *mem
}
EOLIAN static void
_evas_smart_clipped_evas_object_smart_smart_member_del(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *member)
_efl_canvas_object_internal_smart_clipped_evas_object_smart_smart_member_del(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, Evas_Object *member)
{
evas_object_smart_clipped_smart_member_del(eo_obj, member);
evas_obj_smart_member_del(eo_super(eo_obj, MY_CLASS), member);
@ -249,11 +254,5 @@ evas_object_smart_clipped_class_get(void)
return class;
}
EOLIAN static Eo *
_evas_smart_clipped_eo_base_constructor(Eo *obj, Evas_Object_Smart_Clipped_Data *class_data EINA_UNUSED)
{
return eo_constructor(eo_super(obj, MY_CLASS));
}
#include "canvas/evas_smart_clipped.eo.c"
#include "canvas/efl_canvas_object_internal_smart_clipped.eo.c"

View File

@ -1,36 +0,0 @@
/* XXX: It's Evas.Smart.Clipped and not Evas.Object.Smart.smart_Clipped because of
clashes with legacy. Not edaling with it too much because it'll be deprecated
soon anyway. */
class Evas.Smart.Clipped (Evas.Object.Smart)
{
legacy_prefix: evas_object_smart_clipped;
eo_prefix: evas_obj_smart_clipped;
data: Evas_Object_Smart_Clipped_Data;
methods {
@property smart_clipped_clipper {
get {
[[Get the clipper object for the given clipped smart object.
Use this function if you want to change any of this clipper's
properties, like colors.
]]
return: Evas.Object @warn_unused;
}
}
}
implements {
Eo.Base.constructor;
Evas.Object.Smart.smart_hide;
Evas.Object.Smart.smart_clip.set;
Evas.Object.Smart.smart_clip_unset;
Evas.Object.Smart.smart_show;
Evas.Object.Smart.smart_color.set;
Evas.Object.Smart.smart_move;
Evas.Object.Smart.smart_member_del;
Evas.Object.Smart.smart_add;
Evas.Object.Smart.smart_del;
Evas.Object.Smart.smart_member_add;
}
}

View File

@ -9,7 +9,7 @@ enum Evas.Object_Table.Homogeneous_Mode {
item = 2
}
class Evas.Table (Evas.Smart.Clipped)
class Evas.Table (Efl.Canvas.Object.Internal.Smart.Clipped)
{
legacy_prefix: evas_object_table;
eo_prefix: evas_obj_table;