Evas: Move smart_type_check[_ptr] to legacy
This commit is contained in:
parent
5974ff0175
commit
84a91ec6d4
|
@ -4968,6 +4968,41 @@ EAPI const void *evas_object_smart_interface_get(const Evas_Object *obj, c
|
||||||
*/
|
*/
|
||||||
EAPI void *evas_object_smart_interface_data_get(const Evas_Object *obj, const Evas_Smart_Interface *iface);
|
EAPI void *evas_object_smart_interface_data_get(const Evas_Object *obj, const Evas_Smart_Interface *iface);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Checks whether a given smart object or any of its smart object
|
||||||
|
* parents is of a given smart class.
|
||||||
|
*
|
||||||
|
* If @c obj is not a smart object, this call will fail immediately.
|
||||||
|
*
|
||||||
|
* This function supports Eo and legacy inheritance mechanisms. However, it is
|
||||||
|
* recommended to use @ref eo_isa instead if your object is using Eo from top
|
||||||
|
* to bottom.
|
||||||
|
*
|
||||||
|
* The checks use smart classes names and string comparison. There is a version
|
||||||
|
* of this same check using pointer comparison, since a smart class' name is a
|
||||||
|
* single string in Evas.
|
||||||
|
*
|
||||||
|
* See also @ref evas_object_smart_type_check_ptr.
|
||||||
|
*
|
||||||
|
* @param[in] type The name (type) of the smart class to check for.
|
||||||
|
*
|
||||||
|
* @ingroup Evas_Object
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool evas_object_smart_type_check(const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Checks whether a given smart object or any of its smart object
|
||||||
|
* parents is of a given smart class, using pointer comparison.
|
||||||
|
*
|
||||||
|
* @param[in] type The type (name string) to check for. Must be the name.
|
||||||
|
*
|
||||||
|
* @return @c true if @c obj or any of its parents is of type @c type, @c false
|
||||||
|
* otherwise.
|
||||||
|
*
|
||||||
|
* @ingroup Evas_Object
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This gets the internal counter that counts the number of smart calculations
|
* This gets the internal counter that counts the number of smart calculations
|
||||||
*
|
*
|
||||||
|
|
|
@ -614,27 +614,6 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx, Efl.Gfx.Stack,
|
||||||
receiving the $keyname events.]]
|
receiving the $keyname events.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
smart_type_check @const {
|
|
||||||
[[Checks whether a given smart object or any of its smart object
|
|
||||||
parents is of a given smart class.
|
|
||||||
|
|
||||||
If $obj is not a smart object, this call will fail immediately.
|
|
||||||
|
|
||||||
This function supports Eo and legacy inheritance mechanisms.
|
|
||||||
However, it is recommended to use \@ref eo_isa instead if your
|
|
||||||
object is using Eo from top to bottom.
|
|
||||||
|
|
||||||
The checks use smart classes names and string comparison. There
|
|
||||||
is a version of this same check using pointer comparison, since
|
|
||||||
a smart class' name is a single string in Evas.
|
|
||||||
|
|
||||||
See also @.smart_type_check_ptr.
|
|
||||||
]]
|
|
||||||
return: bool @warn_unused;
|
|
||||||
params {
|
|
||||||
@in type: string @nonull; [[The name (type) of the smart class to check for.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key_ungrab {
|
key_ungrab {
|
||||||
[[Removes the grab on $keyname key events by $obj.
|
[[Removes the grab on $keyname key events by $obj.
|
||||||
|
|
||||||
|
@ -690,16 +669,6 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx, Efl.Gfx.Stack,
|
||||||
@in dy: Evas.Coord; [[Vertical offset (delta).]]
|
@in dy: Evas.Coord; [[Vertical offset (delta).]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
smart_type_check_ptr @const {
|
|
||||||
[[Checks whether a given smart object or any of its smart object
|
|
||||||
parents is of a given smart class, using pointer comparison.
|
|
||||||
]]
|
|
||||||
return: bool @warn_unused; [[$true if $obj or any of its parents
|
|
||||||
is of type $type, $false otherwise.]]
|
|
||||||
params {
|
|
||||||
@in type: string @nonull; [[The type (name string) to check for. Must be the name.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property no_render {
|
@property no_render {
|
||||||
get {
|
get {
|
||||||
[[Returns the state of the "no-render" flag, which means, when
|
[[Returns the state of the "no-render" flag, which means, when
|
||||||
|
|
|
@ -2135,18 +2135,6 @@ _evas_object_render_parent_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Dat
|
||||||
return obj->smart.parent;
|
return obj->smart.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
|
||||||
_evas_object_smart_type_check(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, const char *type EINA_UNUSED)
|
|
||||||
{
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
|
||||||
_evas_object_smart_type_check_ptr(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, const char *type EINA_UNUSED)
|
|
||||||
{
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_object_paragraph_direction_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_BiDi_Direction dir EINA_UNUSED)
|
_evas_object_paragraph_direction_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_BiDi_Direction dir EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -346,15 +346,14 @@ _evas_object_smart_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUSED, E
|
||||||
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
evas_object_mapped_clip_across_mark(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EAPI Eina_Bool
|
||||||
_evas_object_smart_evas_object_smart_type_check(const Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, const char *type)
|
evas_object_smart_type_check(const Evas_Object *eo_obj, const char *type)
|
||||||
{
|
{
|
||||||
const Evas_Smart_Class *sc;
|
const Evas_Smart_Class *sc;
|
||||||
Eo_Class *klass;
|
Eo_Class *klass;
|
||||||
Eina_Bool type_check = EINA_FALSE;
|
Eina_Bool type_check = EINA_FALSE;
|
||||||
|
|
||||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
|
||||||
if (!obj) return EINA_FALSE;
|
|
||||||
|
|
||||||
klass = eina_hash_find(_evas_smart_class_names_hash_table, type);
|
klass = eina_hash_find(_evas_smart_class_names_hash_table, type);
|
||||||
if (klass) type_check = eo_isa(eo_obj, klass);
|
if (klass) type_check = eo_isa(eo_obj, klass);
|
||||||
|
@ -376,15 +375,14 @@ _evas_object_smart_evas_object_smart_type_check(const Eo *eo_obj, Evas_Smart_Dat
|
||||||
return type_check;
|
return type_check;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EAPI Eina_Bool
|
||||||
_evas_object_smart_evas_object_smart_type_check_ptr(const Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, const char* type)
|
evas_object_smart_type_check_ptr(const Eo *eo_obj, const char* type)
|
||||||
{
|
{
|
||||||
Eo_Class *klass;
|
Eo_Class *klass;
|
||||||
const Evas_Smart_Class *sc;
|
const Evas_Smart_Class *sc;
|
||||||
Eina_Bool type_check = EINA_FALSE;
|
Eina_Bool type_check = EINA_FALSE;
|
||||||
|
|
||||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
|
||||||
if (!obj) return EINA_FALSE;
|
|
||||||
|
|
||||||
klass = eina_hash_find(_evas_smart_class_names_hash_table, type);
|
klass = eina_hash_find(_evas_smart_class_names_hash_table, type);
|
||||||
if (klass) type_check = eo_isa(eo_obj, klass);
|
if (klass) type_check = eo_isa(eo_obj, klass);
|
||||||
|
|
|
@ -304,8 +304,6 @@ class Evas.Object.Smart (Evas.Object)
|
||||||
class.constructor;
|
class.constructor;
|
||||||
class.destructor;
|
class.destructor;
|
||||||
Eo.Base.constructor;
|
Eo.Base.constructor;
|
||||||
Evas.Object.smart_type_check_ptr;
|
|
||||||
Evas.Object.smart_type_check;
|
|
||||||
Evas.Object.paragraph_direction.set;
|
Evas.Object.paragraph_direction.set;
|
||||||
Evas.Object.paragraph_direction.get;
|
Evas.Object.paragraph_direction.get;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ _evas_object_smart_move_children_relative(Eo *eo_obj, Evas_Object_Protected_Data
|
||||||
}
|
}
|
||||||
|
|
||||||
static EOLIAN Evas_Object *
|
static EOLIAN Evas_Object *
|
||||||
_evas_object_smart_clipped_smart_clipped_clipper_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Smart_Clipped_Data *obj)
|
_evas_smart_clipped_smart_clipped_clipper_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Smart_Clipped_Data *obj)
|
||||||
{
|
{
|
||||||
return obj->clipper;
|
return obj->clipper;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue