Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2020-01-21 10:16:10 +09:00
commit 4255c7896c
66 changed files with 750 additions and 1193 deletions

View File

@ -90,13 +90,13 @@ test_efl_anim_alpha(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Show Animation
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);

View File

@ -88,19 +88,19 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Hide Animation
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
//Rotate from 0 to 45 degrees Animation
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, EINA_VECTOR2(0.5, 0.5));
//Scale Animation to zoom in
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
//Hide Parallel Group Animation
Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win);
Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_PARALLEL_GROUP_ANIMATION_CLASS, win);
efl_animation_duration_set(parallel_hide_anim, 1.0);
efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE);

View File

@ -89,19 +89,19 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
/* Animations to hide button */
//Rotate from 0 to 45 degrees Animation
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, EINA_VECTOR2(0.5, 0.5));
//Scale Animation to zoom in
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
//Hide Animation
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
//Hide Sequential Group Animation
Efl_Canvas_Animation *sequential_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
Efl_Canvas_Animation *sequential_hide_anim = efl_add(EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_CLASS, win);
efl_animation_duration_set(sequential_hide_anim, 1.0);
efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE);

View File

@ -202,7 +202,7 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
ad->btn[i] = btn;
Efl_Canvas_Animation *anim =
efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
efl_animation_translate_set(anim, EINA_POSITION2D(0, 0), EINA_POSITION2D((WIN_W - BTN_W), 0));
efl_animation_duration_set(anim, 2.0);
efl_animation_final_state_keep_set(anim, EINA_FALSE);

View File

@ -115,13 +115,13 @@ test_efl_anim_pause(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Show Animation
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 2.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 2.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);

View File

@ -137,13 +137,13 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Show Animation
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);

View File

@ -88,13 +88,13 @@ test_efl_anim_rotate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Rotate from 0 to 45 degrees Animation
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(cw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
//Rotate from 45 to 0 degrees Animation
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
@ -147,13 +147,13 @@ test_efl_anim_rotate_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
evas_object_show(pivot);
//Rotate from 0 to 45 degrees Animation
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(cw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
//Rotate from 45 to 0 degrees Animation
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
@ -206,13 +206,13 @@ test_efl_anim_rotate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
evas_object_show(abs_center);
//Rotate from 0 to 45 degrees Animation
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, EINA_POSITION2D(0, 0));
efl_animation_duration_set(cw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
//Rotate from 45 to 0 degrees Animation
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, EINA_POSITION2D(0, 0));
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);

View File

@ -88,13 +88,13 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Scale Animation to zoom in
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(scale_double_anim, 1.0);
efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
//Scale Animation to zoom out
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(scale_half_anim, 1.0);
efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
@ -147,13 +147,13 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
evas_object_show(pivot);
//Scale Animation to zoom in
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), pivot, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(scale_double_anim, 1.0);
efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
//Scale Animation to zoom out
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), pivot, EINA_VECTOR2(0.5, 0.5));
efl_animation_duration_set(scale_half_anim, 1.0);
efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
@ -206,13 +206,13 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
evas_object_show(abs_center);
//Scale Animation to zoom in
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_absolute_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), EINA_POSITION2D(0, 0));
efl_animation_duration_set(scale_double_anim, 1.0);
efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
//Scale Animation to zoom out
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
efl_animation_scale_absolute_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), EINA_POSITION2D(0, 0));
efl_animation_duration_set(scale_half_anim, 1.0);
efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);

View File

@ -102,13 +102,13 @@ test_efl_anim_start_delay(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Show Animation
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);

View File

@ -88,13 +88,13 @@ test_efl_anim_translate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
efl_event_callback_array_add(btn, animation_stats_cb(), ad);
//Translate Animation to right bottom relatively
Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
efl_animation_translate_set(translate_rb_anim, EINA_POSITION2D(0, 0), EINA_POSITION2D(100, 100));
efl_animation_duration_set(translate_rb_anim, 1.0);
efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
//Translate Animation to left top relatively
Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
efl_animation_translate_set(translate_lt_anim, EINA_POSITION2D(100, 100), EINA_POSITION2D(0, 0));
efl_animation_duration_set(translate_lt_anim, 1.0);
efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE);
@ -147,13 +147,13 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U
evas_object_show(abs_center);
//Translate Animation to right bottom absolutely
Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
efl_animation_translate_absolute_set(translate_rb_anim, EINA_POSITION2D(0, 0), EINA_POSITION2D(100, 100));
efl_animation_duration_set(translate_rb_anim, 1.0);
efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
//Translate Animation to left top absolutely
Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win);
Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
efl_animation_translate_absolute_set(translate_lt_anim, EINA_POSITION2D(100, 100), EINA_POSITION2D(0, 0));
efl_animation_duration_set(translate_lt_anim, 1.0);
efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE);

View File

@ -150,34 +150,9 @@ inline bool is_alias_blacklisted(attributes::alias_def const& alias, Context con
return name_helpers::alias_full_eolian_name(alias) == "Eina.Error";
}
inline bool is_property_blacklisted(std::string const& name)
inline bool is_property_blacklisted(std::string const&)
{
auto properties = std::vector<std::string>{
// These properties encode (void* arr, int len) arrays
"Efl.Gfx.IGradient.Stop"
, "Efl.Gfx.GradientConcrete.Stop"
, "Efl.Gfx.IShape.StrokeDash"
, "Efl.Gfx.ShapeConcrete.StrokeDash"
, "Efl.Gfx.Vg.ValueProvider.Transform"
, "Efl.Canvas.Vg.Node.Transformation"
// Will be bound manually
, "Efl.Core.Env.Env"
// Setter returns a future
, "Efl.IModel.Property"
// Protected
, "Efl.Access.IAction.ActionName"
, "Efl.Access.IAction.ActionLocalizedName"
, "Efl.Access.IComponent.Extents"
, "Efl.Access.IText.AccessSelection"
, "Efl.Access.IText.AccessText"
, "Efl.Access.IText.BoundedRanges"
, "Efl.Access.IText.Character"
, "Efl.Access.IText.OffsetAtPoint"
, "Efl.Access.IText.String"
, "Efl.Access.IText.TextAttributes"
};
return std::find(std::begin(properties), std::end(properties), name) != std::end(properties);
return false;
}
template<typename Context>

View File

@ -21,7 +21,6 @@
#include "grammar/html_escaped_string.hpp"
#include "using_decl.hh"
#include "name_helpers.hh"
#include "helpers.hh"
#include "generation_contexts.hh"
#include "blacklist.hh"
@ -77,11 +76,7 @@ struct documentation_generator
// The name_tail parameter is the last 4 chars of the original string, which
// could be ".set" or ".get" and in this case they are ignored by Eolian.
// We want them to know what the documentation intended to reference.
template<typename Context>
static std::string function_conversion(const ::Eolian_Object *klass
, const ::Eolian_Function *function
, std::string name_tail
, Context const& context)
static std::string function_conversion(const ::Eolian_Object *klass, const ::Eolian_Function *function, std::string name_tail)
{
::Eolian_Function_Type ftype = ::eolian_function_type_get(function);
const char* eo_name = ::eolian_function_name_get(function);
@ -127,27 +122,13 @@ struct documentation_generator
break;
case ::EOLIAN_PROPERTY:
{
int getter_nkeys = property_num_keys(function, ::EOLIAN_PROP_GET);
int setter_nkeys = property_num_keys(function, ::EOLIAN_PROP_SET);
std::string short_name = name_helpers::property_managed_name(klass_d, eo_name);
// We need to replace the current class context with the context
// from the class that originated this property.
class_context::wrapper_kind klass_kind;
if (helpers::is_managed_interface(klass_d))
klass_kind = class_context::interface;
else
klass_kind = class_context::inherit;
auto my_context = grammar::context_replace_tag(class_context{klass_kind}, context);
auto unit = eolian_object_unit_get((const Eolian_Object*)function);
attributes::function_def getter_func{function, ::EOLIAN_PROP_GET, nullptr, unit};
attributes::function_def setter_func{function, ::EOLIAN_PROP_SET, nullptr, unit};
attributes::property_def prop{function, getter_func, setter_func, unit};
auto has_wrapper = helpers::has_property_wrapper(prop, &klass_d, my_context);
if (has_wrapper == helpers::has_property_wrapper_bit::has_none)
name += ".Get" + short_name;
bool blacklisted = blacklist::is_property_blacklisted(name + "." + short_name);
// EO properties with keys or blacklisted are not converted into C# properties.
// In these cases we refer to the getter method instead of the property.
if ((getter_nkeys > 0) || (setter_nkeys > 0) || (blacklisted)) name += ".Get" + short_name;
else if (name_tail == ".get") name += ".Get" + short_name;
else if (name_tail == ".set") name += ".Set" + short_name;
else name += "." + short_name;
@ -184,13 +165,9 @@ struct documentation_generator
}
// Turns an Eolian reference like @Efl.Input.Pointer.tool into a <see> tag
template<typename Context>
static std::string ref_conversion(const ::Eolian_Doc_Token *token
, const Eolian_State *state
, std::string name_tail
, Context const& context)
static std::string ref_conversion(const ::Eolian_Doc_Token *token, const Eolian_State *state, std::string name_tail,
bool want_beta)
{
bool want_beta = context_want_beta(context);
const Eolian_Object *data, *data2;
::Eolian_Object_Type type =
::eolian_doc_token_ref_resolve(token, state, &data, &data2);
@ -218,7 +195,7 @@ struct documentation_generator
is_beta = eolian_object_is_beta(data) || eolian_object_is_beta(data2);
break;
case ::EOLIAN_OBJECT_FUNCTION:
ref += function_conversion(data, (const ::Eolian_Function *)data2, name_tail, context);
ref += function_conversion(data, (const ::Eolian_Function *)data2, name_tail);
is_beta = eolian_object_is_beta(data) || eolian_object_is_beta(data2);
break;
case ::EOLIAN_OBJECT_CONSTANT:
@ -250,8 +227,7 @@ struct documentation_generator
}
// Turns EO documentation syntax into C# triple-slash XML comment syntax
template<typename Context>
static std::string syntax_conversion(std::string text, const Eolian_State *state, Context const& context)
static std::string syntax_conversion(std::string text, const Eolian_State *state, bool want_beta)
{
std::string new_text, ref;
::Eolian_Doc_Token_Type previous_token_type = ::EOLIAN_DOC_TOKEN_UNKNOWN;
@ -290,7 +266,7 @@ struct documentation_generator
new_text += token_text;
break;
case ::EOLIAN_DOC_TOKEN_REF:
ref = ref_conversion(&token, state, name_tail, context);
ref = ref_conversion(&token, state, name_tail, want_beta);
if (ref != "")
{
if (utils::ends_with(ref, BETA_REF_SUFFIX))
@ -355,7 +331,7 @@ struct documentation_generator
if (!as_generator(html_escaped_string).generate(std::back_inserter(new_text), text, context))
return false;
auto options = context_find_tag<options_context>(context);
new_text = syntax_conversion( new_text, context_find_tag<eolian_state_context>(context).state, context);
new_text = syntax_conversion( new_text, context_find_tag<eolian_state_context>(context).state, options.want_beta);
std::string tabs;
as_generator(scope_tab(scope_size) << "/// ").generate (std::back_inserter(tabs), attributes::unused, context);
@ -677,7 +653,7 @@ struct documentation_string_generator
auto options = context_find_tag<options_context>(context);
auto state = context_find_tag<eolian_state_context>(context).state;
if (!as_generator(string).generate(sink, documentation_generator::syntax_conversion(escaped, state, context), context))
if (!as_generator(string).generate(sink, documentation_generator::syntax_conversion(escaped, state, options.want_beta), context))
return false;
return true;

View File

@ -26,7 +26,6 @@
#include "grammar/list.hpp"
#include "grammar/alternative.hpp"
#include "grammar/attribute_reorder.hpp"
#include "grammar/eps.hpp"
#include "grammar/counter.hpp"
#include "logging.hh"
#include "type.hh"
@ -45,7 +44,7 @@ namespace eolian_mono {
struct native_function_definition_generator
{
attributes::klass_def const* klass;
template <typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
{
@ -182,7 +181,7 @@ struct native_function_definition_generator
return true;
}
};
struct function_definition_generator
{
function_definition_generator(bool do_super = false)
@ -323,199 +322,6 @@ property_extension_method_definition_generator property_extension_method_definit
struct property_wrapper_definition_generator
{
template <typename OutputIterator, typename Context>
bool generate_get_indexer(OutputIterator sink, attributes::property_def const& property, Context const& context
, std::string get_scope
, bool is_interface) const
{
if (is_interface)
{
if (!as_generator(scope_tab(3) << get_scope << "get;\n"
).generate(sink, attributes::unused, context))
return false;
}
else
{
if (!as_generator(scope_tab(2) << scope_tab << get_scope << "get\n"
<< scope_tab(2) << scope_tab << "{\n"
<< scope_tab(2) << scope_tab(2) << "var i = new "
<< name_helpers::property_concrete_indexer_name(property) << "();\n"
<< scope_tab(2) << scope_tab(2) << "i.Self = this;\n"
<< scope_tab(2) << scope_tab(2) << "return i;\n"
<< scope_tab(2) << scope_tab << "}\n"
).generate(sink, attributes::unused, context))
return false;
}
return true;
}
template <typename OutputIterator, typename Context, typename C1, typename C2>
bool generate_indexer(OutputIterator sink
, attributes::property_def const& property
, Context const& context
, std::string scope, std::string get_scope, std::string set_scope
, std::string class_name
, C1 keys, C2 values
, bool is_interface
, bool is_concrete_for_interface
, bool has_setter) const
{
if (is_interface)
return true;
auto size_not_one = [] (std::vector<attributes::parameter_def> k) { return k.size() != 1; };
auto type_or_tuple
=
(
(
attribute_conditional(size_not_one)["("]
<< (type(false) % ", ")
<< ")"
)
| *type(false)
)
;
std::string parentship = "\n";
bool is_self_property = *implementing_klass == *klass_from_property;
if (!(is_self_property && !is_concrete_for_interface))
parentship = " : " + name_helpers::property_interface_indexer_name(property, *klass_from_property) + "\n";
if (!as_generator
(
scope_tab(2) << scope << "class " << name_helpers::property_concrete_indexer_name(property) << parentship
<< scope_tab(2) << "{\n"
<< scope_tab(3) << "public " << class_name << " Self {get; set;}\n"
<< scope_tab(3) << "public "
<< type_or_tuple << " this[" << type_or_tuple <<" i]\n"
<< scope_tab(3) << "{\n"
).generate(sink, make_tuple(values, values, keys, keys), context))
return false;
assert (!keys.empty());
std::vector<std::string> get_keys;
if(keys.size() != 1)
{
unsigned int i = 0;
for (auto&& key : keys)
{
static_cast<void>(key);
++i;
get_keys.push_back("i.Item" + std::to_string(i));
}
}
else
{
get_keys.push_back ("i");
}
assert (!get_keys.empty());
generate_get(sink, property, context, get_scope, get_keys, values, is_interface, "Self.");
if (has_setter)
generate_set(sink, property, context, set_scope, get_keys, values, is_interface, "Self.");
if (!as_generator
(
scope_tab(3) << "}\n"
<< scope_tab(2) << "};\n"
).generate(sink, attributes::unused, context))
return false;
return true;
}
template <typename OutputIterator, typename Context, typename CK, typename CV>
bool generate_set(OutputIterator sink, attributes::property_def const& property, Context const& context
, std::string set_scope
, CK keys, CV values
, bool is_interface
, std::string name_prefix = "") const
{
using efl::eolian::grammar::counter;
if (is_interface)
{
if (!as_generator(scope_tab(2) << scope_tab << set_scope << "set;\n"
).generate(sink, attributes::unused, context))
return false;
}
else if (values.size() == 1)
{
if (!as_generator(scope_tab(2) << scope_tab << set_scope << "set " << "{ " << name_prefix << name_helpers::managed_method_name(*property.setter) + "(" << *(string << ",") << "value); }\n"
).generate(sink, keys, context))
return false;
}
else if (values.size() > 1)
{
if (!as_generator(
scope_tab(2) << scope_tab << set_scope << "set "
<< ("{ " << name_prefix << name_helpers::managed_method_name(*property.setter) + "(")
<< *(string << ",") << ((" value.Item" << counter(1)) % ", ")
<< "); }\n"
).generate(sink, std::make_tuple(keys, values), context))
return false;
}
return true;
}
template <typename OutputIterator, typename Context, typename CK, typename CV>
bool generate_get(OutputIterator sink, attributes::property_def const& property, Context const& context
, std::string get_scope
, CK keys, CV values
, bool is_interface
, std::string name_prefix = "") const
{
using efl::eolian::grammar::attribute_reorder;
using efl::eolian::grammar::attributes::parameter_direction;
using efl::eolian::grammar::attributes::parameter_def;
if (is_interface) // only declaration
{
if (!as_generator(scope_tab(2) << scope_tab << get_scope << "get;\n"
).generate(sink, attributes::unused, context))
return false;
}
else
if (/*has_getter && */values.size() == 1)
{
if (!as_generator
(scope_tab(2) << scope_tab << get_scope
<< "get " << "{ return " << name_prefix << name_helpers::managed_method_name(*property.getter)
<< "(" << (string % ",") << "); }\n"
).generate(sink, keys, context))
return false;
}
else if (/*has_getter && */values.size() > 1)
{
if (!as_generator
(scope_tab(2) << scope_tab << get_scope << "get "
<< "{\n"
<< *attribute_reorder<1, -1, 1>
(scope_tab(4) << type(true) << " _out_"
<< argument(false) << " = default(" << type(true) << ");\n"
)
<< scope_tab(4) << name_prefix << name_helpers::managed_method_name(*property.getter)
<< "(" << *(string << ",") << (("out _out_" << argument(false)) % ", ") << ");\n"
<< scope_tab(4) << "return (" << (("_out_"<< argument(false)) % ", ") << ");\n"
<< scope_tab(3) << "}" << "\n"
).generate(sink, std::make_tuple(values, keys, values, values), context))
return false;
}
// else if (values.size() == 1)
// {
// if (!as_generator
// (scope_tab << scope_tab << get_scope << "get "
// << "{\n"
// << *attribute_reorder<1, -1, 1>(scope_tab(3) << type(true) << " _out_" << argument(false) << " = default(" << type(true) << ");\n")
// << scope_tab(3) << name_prefix << name_helpers::managed_method_name(*property.getter)
// << "(" << *(string << ",") << (("out _out_" << argument(false)) % ",") << ");\n"
// << scope_tab(3) << "return " << (("_out_"<< argument(false)) % ",") << ";\n"
// << scope_tab(2) << "}" << "\n"
// ).generate(sink, std::make_tuple(values, keys, values, values), context))
// return false;
// }
return true;
}
template<typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::property_def const& property, Context const& context) const
{
@ -524,127 +330,103 @@ struct property_wrapper_definition_generator
using efl::eolian::grammar::attributes::parameter_direction;
using efl::eolian::grammar::attributes::parameter_def;
/// C(k) = keys count, C(v) = values count
/// /------------\ /------\.
/// |blacklisted?|---yes-----| skip |--------------\.
/// \------------/ \------/ |
/// | | |
/// no yes |
/// | | |
/// /---------\ /------------\ |
/// |is-static|----yes-----|is-interface| |
/// \---------/ \------------/ |
/// | | |
/// no no |
/// | | |
/// /--------\ /-----------\ |
/// |has-get?|---no-conc---|is-concrete|-----yes---/
/// \--------/ \-----------/
/// / \.
/// no yes
/// / \.
/// /----\ /--------------------------------------\.
/// |skip|-yes-|explicit return != Eina.Error or void |
/// \----/ \--------------------------------------/
/// |
/// no
/// |
/// /--------\.
/// |has-set?|
/// \--------/
/// / \.
/// no yes
/// / \.
/// /------\ /--------------------------------------\.
/// /------------------|no-set| |explicit return != Eina.Error or void |---- yes --\.
/// | \------/ \--------------------------------------/ |
/// | \------------|----------------------------------------------/
/// | no
/// | |
/// | /--------\.
/// | |has-both|
/// | \--------/
/// | |
/// | /-------------------\.
/// | |set-keys = get-keys|
/// | \-------------------/
/// | / |
/// | no |
/// | / |
/// | /----\ /-----------------------\.
/// | |skip|--no---|set-values = get-values|
/// | \----/ \-----------------------/
/// | /
/// | yes
/// | /
/// | /--------\.
/// \-------------------------| keys |
/// \--------/
/// / \.
/// 0 >0
/// / \.
/// /----------\ /----------\.
/// |no-indexer| | keys > 1 |
/// \----------/ \----------/
/// | / |
/// | no yes
/// | / |
/// | / |
/// | /---------\ /-------------------\.
/// | | indexer | | indexer tuple key |
/// | \---------/ \-------------------/
/// | / |
/// /--------\ |
/// | values |----------/
/// \--------/
/// / \.
/// 1 >1
/// / \.
/// /----------------\ /-------------\.
/// | no tuple value | | tuple value |
/// \----------------/ \-------------/
///
auto has_wrapper = helpers::has_property_wrapper (property, implementing_klass, context);
bool has_getter = has_wrapper & helpers::has_property_wrapper_bit::has_getter;
if (!has_getter) return true;
bool has_setter = has_wrapper & helpers::has_property_wrapper_bit::has_setter;
bool has_indexer = has_wrapper & helpers::has_property_wrapper_bit::has_indexer;
if (blacklist::is_property_blacklisted(property, *implementing_klass, context))
return true;
bool is_interface = context_find_tag<class_context>(context).current_wrapper_kind == class_context::interface;
bool is_static = (property.getter.is_engaged() && property.getter->is_static)
|| (property.setter.is_engaged() && property.setter->is_static);
bool is_concrete = context_find_tag<class_context>(context).current_wrapper_kind == class_context::concrete;
bool is_concrete_for_interface = is_concrete
&& (implementing_klass->type == attributes::class_type::interface_
|| implementing_klass->type == attributes::class_type::mixin);
//if (name_helpers::klass_concrete_or_interface_name (*implementing_klass) == "IMapping")
if (false)
if ((is_concrete || is_interface) && is_static)
return true;
auto get_params = property.getter.is_engaged() ? property.getter->parameters.size() : 0;
//auto set_params = property.setter.is_engaged() ? property.setter->parameters.size() : 0;
// C# properties must have a single value.
//
// Single values in getters are automatically converted to return_type,
// meaning they should have 0 parameters.
//
// For setters, we ignore the return type - usually boolean.
// if (get_params > 0 || set_params > 1)
// return true;
if (property.getter
&& std::find_if (property.getter->parameters.begin()
, property.getter->parameters.end()
, [] (parameter_def const& p)
{
return p.direction != parameter_direction::out;
}) != property.getter->parameters.end())
return true;
if (property.setter
&& std::find_if (property.setter->parameters.begin()
, property.setter->parameters.end()
, [] (parameter_def const& p)
{
return p.direction != parameter_direction::in;
}) != property.setter->parameters.end())
return true;
if (property.getter && property.setter)
{
if (!as_generator(grammar::lit("/// is interface ") << (int)is_interface
<< " is static " << (int)is_static
<< " is concrete " << (int)is_concrete
<< " is concrete_for_interface " << (int)is_concrete_for_interface
<< " klass_from_property->type " << (int)klass_from_property->type
<< " has_setter " << (int)has_setter
<< " property.setter->explicit_return_type != attributes::void_ " << (property.setter && property.setter->explicit_return_type != attributes::void_)
<< " property.setter->keys != property.getter->keys " << (property.setter && property.setter->keys != property.getter->keys)
<< " property.setter->values != property.getter->values " << (property.setter && property.setter->values != property.getter->values)
<< " has_setter && property.setter->scope != attributes::member_scope::scope_public " << (property.setter && property.setter->scope != attributes::member_scope::scope_public)
<< "\n")
.generate (sink, attributes::unused, context))
return false;
if (get_params != 0 && property.setter->parameters.size() != property.getter->parameters.size())
return true;
}
if (blacklist::is_property_blacklisted(property, context))
return true;
std::vector<attributes::parameter_def> parameters;
if (property.setter.is_engaged())
{
std::transform (property.setter->parameters.begin(), property.setter->parameters.end()
, std::back_inserter(parameters)
, [] (parameter_def p) -> parameter_def
{
//p.direction = efl::eolian::attributes::parameter_direction::in;
return p;
});
}
else if (property.getter.is_engaged())
{
// if getter has parameters, then we ignore return type, otherwise
// we use the return type.
if (get_params == 0)
parameters.push_back({parameter_direction::in
, property.getter->return_type, "propertyResult", {}
, property.getter->unit});
else
std::transform (property.getter->parameters.begin(), property.getter->parameters.end()
, std::back_inserter(parameters)
, [] (parameter_def p) -> parameter_def
{
p.direction = parameter_direction::in;
return p;
});
}
else
{
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain) << "Property must have either a getter or a setter." << std::endl;
return false;
}
std::string dir_mod;
if (property.setter.is_engaged())
dir_mod = direction_modifier(property.setter->parameters[0]);
std::string managed_name = name_helpers::property_managed_name(property);
std::string scope = "public ";
std::string get_scope = eolian_mono::function_scope_get(*property.getter);
std::string set_scope = has_setter ? eolian_mono::function_scope_get(*property.setter) : "";
std::string get_scope = property.getter.is_engaged() ? eolian_mono::function_scope_get(*property.getter) : "";
bool is_get_public = get_scope == "public ";
std::string set_scope = property.setter.is_engaged() ? eolian_mono::function_scope_get(*property.setter) : "";
bool is_set_public = set_scope == "public ";
// No need to generate this wrapper as no accessor is public.
if (is_interface && (!is_get_public && !is_set_public))
return true;
// C# interface members are declared automatically as public
if (is_interface)
@ -659,64 +441,23 @@ struct property_wrapper_definition_generator
get_scope = "";
set_scope = "";
}
else if (!has_setter || (get_scope == scope))
else if (!property.setter.is_engaged() || (get_scope == scope))
{
scope = get_scope;
get_scope = "";
}
std::string virtual_mod = (is_static || is_interface || is_concrete) ? "" : "virtual ";
auto keys = property.getter->keys;
auto values = property.getter->values;
auto generated_values = values;
auto klass_name = name_helpers::klass_concrete_or_interface_name (*implementing_klass);
if (has_indexer)
{
assert (!!implementing_klass);
generate_indexer (sink, property, context, scope, get_scope, set_scope
, klass_name, keys, values
, is_interface, is_concrete_for_interface, has_setter);
generated_values.clear();
if (!is_interface && *implementing_klass == *klass_from_property
&& !is_concrete_for_interface)
else if (!property.getter.is_engaged() || (set_scope == scope))
{
generated_values.push_back
(attributes::parameter_def
{parameter_direction::in
, attributes::type_def
{
attributes::regular_type_def{name_helpers::property_concrete_indexer_name(property), {attributes::qualifier_info::is_none, ""}, {}}
, name_helpers::property_concrete_indexer_name(property)
, false, false, false, ""
}
, "indexer", {}, nullptr
});
scope = set_scope;
set_scope = "";
}
else
{
generated_values.push_back
(attributes::parameter_def
{parameter_direction::in
, attributes::type_def
{
attributes::regular_type_def{name_helpers::klass_full_concrete_or_interface_name (*klass_from_property) + managed_name + "Indexer", {attributes::qualifier_info::is_none, ""}, {}}
, name_helpers::property_interface_indexer_name(property, *klass_from_property)
, false, false, false, ""
}
, "indexer", {}, nullptr
});
}
}
if (generated_values.size() == 1)
if (parameters.size() == 1)
{
if (!as_generator(
documentation(2)
<< scope_tab(2) << scope << (is_static ? "static " : virtual_mod) << type(true) << " " << managed_name << " {\n"
).generate(sink, std::make_tuple(property, generated_values[0].type), context))
<< scope_tab(2) << scope << (is_static ? "static " : "") << type(true) << " " << managed_name << " {\n"
).generate(sink, std::make_tuple(property, parameters[0].type), context))
return false;
}
else
@ -727,21 +468,73 @@ struct property_wrapper_definition_generator
<< scope_tab(2) << scope << (is_static ? "static (" : "(")
<< (attribute_reorder<1, -1>(type(true) /*<< " " << argument*/) % ", ") << ") "
<< managed_name << " {\n"
).generate(sink, std::make_tuple(property, generated_values), context))
).generate(sink, std::make_tuple(property, parameters), context))
return false;
}
if (has_indexer)
if (property.getter.is_engaged() && is_interface)
{
generate_get_indexer (sink, property, context, get_scope, is_interface);
if (is_get_public)
if (!as_generator(scope_tab(2) << scope_tab << set_scope << "get;\n"
).generate(sink, attributes::unused, context))
return false;
}
else
else if (property.getter.is_engaged() && get_params == 0/*parameters.size() == 1 && property.getter.is_engaged()*/)
{
std::vector<std::string> empty_keys;
generate_get(sink, property, context, get_scope, empty_keys, values, is_interface);
if (!as_generator
(scope_tab(2) << scope_tab << get_scope
<< "get " << "{ return " + name_helpers::managed_method_name(*property.getter) + "(); }\n"
).generate(sink, attributes::unused, context))
return false;
}
else if (parameters.size() >= 1 && property.getter)
{
if (!as_generator
(scope_tab(2) << scope_tab << get_scope << "get "
<< "{\n"
<< *attribute_reorder<1, -1, 1>
(scope_tab(4) << type(true) << " _out_"
<< argument(false) << " = default(" << type(true) << ");\n"
)
<< scope_tab(4) << name_helpers::managed_method_name(*property.getter)
<< "(" << (("out _out_" << argument(false)) % ", ") << ");\n"
<< scope_tab(4) << "return (" << (("_out_"<< argument(false)) % ", ") << ");\n"
<< scope_tab(3) << "}" << "\n"
).generate(sink, std::make_tuple(parameters, parameters, parameters), context))
return false;
}
// else if (parameters.size() == 1)
// {
// if (!as_generator
// (scope_tab << scope_tab << get_scope << "get "
// << "{\n"
// << *attribute_reorder<1, -1, 1>(scope_tab(3) << type(true) << " _out_" << argument(false) << " = default(" << type(true) << ");\n")
// << scope_tab(3) << name_helpers::managed_method_name(*property.getter)
// << "(" << (("out _out_" << argument(false)) % ",") << ");\n"
// << scope_tab(3) << "return " << (("_out_"<< argument(false)) % ",") << ";\n"
// << scope_tab(2) << "}" << "\n"
// ).generate(sink, std::make_tuple(parameters, parameters, parameters), context))
// return false;
// }
if (has_setter)
generate_set (sink, property, context, set_scope, empty_keys, values, is_interface);
if (property.setter.is_engaged() && is_interface)
{
if (is_set_public)
if (!as_generator(scope_tab(2) << scope_tab << set_scope << "set;\n"
).generate(sink, attributes::unused, context))
return false;
}
else if (parameters.size() == 1 && property.setter.is_engaged())
{
if (!as_generator(scope_tab(2) << scope_tab << set_scope << "set " << "{ " + name_helpers::managed_method_name(*property.setter) + "(" + dir_mod + "value); }\n"
).generate(sink, attributes::unused, context))
return false;
}
else if (parameters.size() > 1 && property.setter.is_engaged())
{
if (!as_generator(scope_tab(2) << scope_tab << set_scope << "set " << ("{ " + name_helpers::managed_method_name(*property.setter) + "(" + dir_mod) << ((" value.Item" << counter(1)) % ", ") << "); }" << "\n"
).generate(sink, parameters, context))
return false;
}
if (!as_generator(scope_tab(2) << "}\n\n").generate(sink, attributes::unused, context))
@ -749,56 +542,16 @@ struct property_wrapper_definition_generator
return true;
}
attributes::klass_def const* implementing_klass, *klass_from_property;
attributes::klass_def const* implementing_klass;
};
struct property_wrapper_definition_parameterized
{
property_wrapper_definition_generator operator()(attributes::klass_def const& klass
, attributes::klass_def const& prop_from_klass) const
{
return {&klass, &prop_from_klass};
}
} const property_wrapper_definition;
property_wrapper_definition_generator as_generator(property_wrapper_definition_parameterized)
{
return {};
}
struct interface_property_indexer_definition_generator
{
template<typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::property_def const& property, Context const& context) const
{
using efl::eolian::grammar::attribute_reorder;
using efl::eolian::grammar::counter;
using efl::eolian::grammar::attributes::parameter_direction;
using efl::eolian::grammar::attributes::parameter_def;
bool is_interface = context_find_tag<class_context>(context).current_wrapper_kind == class_context::interface;
assert (is_interface);
auto klass_name = name_helpers::klass_concrete_or_interface_name (*implementing_klass);
std::string managed_name = name_helpers::property_managed_name(property);
if (!as_generator
(scope_tab << "public interface " << name_helpers::property_interface_indexer_short_name(property, *implementing_klass) << "\n"
<< scope_tab << "{\n"
<< scope_tab << "}\n"
).generate (sink, attributes::unused, context))
return false;
return true;
}
attributes::klass_def const* implementing_klass;
};
struct interface_property_indexer_definition_parameterized
{
interface_property_indexer_definition_generator operator()(attributes::klass_def const& klass) const
property_wrapper_definition_generator operator()(attributes::klass_def const& klass) const
{
return {&klass};
}
} const interface_property_indexer_definition;
interface_property_indexer_definition_generator as_generator(interface_property_indexer_definition_parameterized)
} const property_wrapper_definition;
property_wrapper_definition_generator as_generator(property_wrapper_definition_parameterized)
{
return {};
}
@ -818,10 +571,6 @@ struct is_eager_generator< ::eolian_mono::property_wrapper_definition_generator>
template <>
struct is_eager_generator< ::eolian_mono::property_wrapper_definition_parameterized> : std::true_type {};
template <>
struct is_eager_generator< ::eolian_mono::interface_property_indexer_definition_parameterized> : std::true_type {};
template <>
struct is_eager_generator< ::eolian_mono::interface_property_indexer_definition_generator> : std::true_type {};
template <>
struct is_generator< ::eolian_mono::function_definition_generator> : std::true_type {};
template <>
struct is_generator< ::eolian_mono::native_function_definition_generator> : std::true_type {};
@ -833,10 +582,6 @@ template <>
struct is_generator< ::eolian_mono::property_wrapper_definition_generator> : std::true_type {};
template <>
struct is_generator< ::eolian_mono::property_wrapper_definition_parameterized> : std::true_type {};
template <>
struct is_generator< ::eolian_mono::interface_property_indexer_definition_parameterized> : std::true_type {};
template <>
struct is_generator< ::eolian_mono::interface_property_indexer_definition_generator> : std::true_type {};
namespace type_traits {
template <>
@ -855,13 +600,8 @@ template <>
struct attributes_needed< ::eolian_mono::property_wrapper_definition_generator> : std::integral_constant<int, 1> {};
template <>
struct attributes_needed< ::eolian_mono::property_wrapper_definition_parameterized> : std::integral_constant<int, 1> {};
template <>
struct attributes_needed< ::eolian_mono::interface_property_indexer_definition_parameterized> : std::integral_constant<int, 1> {};
template <>
struct attributes_needed< ::eolian_mono::interface_property_indexer_definition_generator> : std::integral_constant<int, 1> {};
}
} } }
#endif

View File

@ -26,7 +26,6 @@ namespace eolian_mono {
struct class_context
{
enum wrapper_kind {
none,
interface,
concrete,
inherit,
@ -110,12 +109,6 @@ struct options_context {
std::string examples_dir;
};
template<typename Context>
bool context_want_beta(Context const& context)
{
return efl::eolian::grammar::context_find_tag<options_context>(context).want_beta;
}
}
#endif

View File

@ -17,7 +17,6 @@
#define EOLIAN_MONO_HELPERS_HH
#include "grammar/klass_def.hpp"
#include "grammar/context.hpp"
#include "blacklist.hh"
#include "generation_contexts.hh"
#include "name_helpers.hh"
@ -306,106 +305,6 @@ inline std::vector<attributes::constructor_def> reorder_constructors(std::vector
return constructors;
}
enum class has_property_wrapper_bit
{
has_none = 0
, has_getter = 1 << 0
, has_setter = 1 << 1
, has_indexer = 1 << 2
, has_key_tuple = 1 << 3
, has_value_tuple = 1 << 4
, has_set_error_check = 1 << 5
, has_get_error_check = 1 << 6
};
has_property_wrapper_bit& operator|=(has_property_wrapper_bit& self, has_property_wrapper_bit bit)
{
self = static_cast<has_property_wrapper_bit>(static_cast<int>(self) | static_cast<int>(bit));
return self;
}
bool operator&(has_property_wrapper_bit self, has_property_wrapper_bit bit)
{
return static_cast<int>(self) & static_cast<int>(bit);
}
template <typename Context>
has_property_wrapper_bit has_property_wrapper(attributes::property_def const& property, attributes::klass_def const* implementing_klass
, Context const& context)
{
using efl::eolian::grammar::context_find_tag;
has_property_wrapper_bit r = has_property_wrapper_bit::has_none;
if (blacklist::is_property_blacklisted(property, *implementing_klass, context))
return r;
bool has_getter = property.getter.is_engaged();
bool has_setter = property.setter.is_engaged();
bool is_interface = context_find_tag<class_context>(context).current_wrapper_kind == class_context::interface;
bool is_static = (property.getter.is_engaged() && property.getter->is_static)
|| (has_setter && property.setter->is_static);
bool is_concrete = context_find_tag<class_context>(context).current_wrapper_kind == class_context::concrete;
if (is_static)
{
if (is_interface) return r;
else if (is_concrete) return r;
}
// EINA_LOG_ERR("Generating property %s", name_helpers::property_managed_name(property).c_str());
// C# interface can have only
if (is_interface)
{
has_getter = has_getter && property.getter->scope == attributes::member_scope:: scope_public;
}
if (!has_getter)
{
return r;
}
if (property.getter->explicit_return_type != attributes::void_)
{
return r;
}
else if (has_setter)
{
if (property.setter->explicit_return_type != attributes::void_)
has_setter = false; // do not generate setter
else if (property.setter->keys != property.getter->keys)
has_setter = false;
else if (property.setter->values != property.getter->values)
has_setter = false;
}
if (is_interface)
{
if (property.getter->scope != attributes::member_scope::scope_public)
return r;
else if (has_setter && property.setter->scope != attributes::member_scope::scope_public)
has_setter = false;
}
if (has_getter)
r |= has_property_wrapper_bit::has_getter;
if (has_setter)
r |= has_property_wrapper_bit::has_setter;
if (property.getter->keys.size() == 1)
r |= has_property_wrapper_bit::has_indexer;
else if (property.getter->keys.size() > 1)
{
r |= has_property_wrapper_bit::has_indexer;
r |= has_property_wrapper_bit::has_key_tuple;
}
if (property.getter->values.size() > 1)
r |= has_property_wrapper_bit::has_value_tuple;
return r;
}
} // namespace helpers
} // namespace eolian_mono

View File

@ -106,10 +106,6 @@ struct klass
name_helpers::klass_full_concrete_or_interface_name(cls)},
context);
// Property wrappers
if (!as_generator(*(interface_property_indexer_definition(cls))).generate(sink, cls.properties, iface_cxt))
return false;
if(!as_generator(documentation(1)).generate(sink, cls, iface_cxt))
return false;
@ -162,7 +158,7 @@ struct klass
).generate(sink, p, iface_cxt))
return false;
if (!as_generator(*(property_wrapper_definition(cls, cls))).generate(sink, cls.properties, iface_cxt))
if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, cls.properties, iface_cxt))
return false;
// End of interface declaration
@ -263,13 +259,13 @@ struct klass
return false;
// Property wrappers
if (!as_generator(*(property_wrapper_definition(cls, cls))).generate(sink, cls.properties, concrete_cxt))
if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, cls.properties, concrete_cxt))
return false;
for (auto&& klass : helpers::non_implemented_interfaces(cls, concrete_cxt))
{
attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
if (!as_generator(*(property_wrapper_definition(cls, c))).generate(sink, c.properties, concrete_cxt))
if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, c.properties, concrete_cxt))
return false;
}
@ -347,13 +343,13 @@ struct klass
return false;
// Property wrappers
if (!as_generator(*(property_wrapper_definition(cls, cls))).generate(sink, cls.properties, inherit_cxt))
if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, cls.properties, inherit_cxt))
return false;
for (auto&& klass : helpers::non_implemented_interfaces(cls, inherit_cxt))
{
attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
if (!as_generator(*(property_wrapper_definition(cls, c))).generate(sink, c.properties, inherit_cxt))
if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, c.properties, inherit_cxt))
return false;
}

View File

@ -334,6 +334,28 @@ inline std::string to_field_name(std::string const& in)
return utils::capitalize(in);
}
template<typename T>
inline std::string property_managed_name(T const& klass, std::string const& name)
{
auto names = utils::split(name, '_');
// No need to escape keyword here as it will be capitalized and already
// namespaced inside the owner class.
auto managed_name = utils::to_pascal_case(names);
auto managed_klass_name = klass_concrete_or_interface_name(klass);
if (managed_name == "Type")
managed_name = managed_klass_name + managed_name;
return managed_name;
}
inline std::string property_managed_name(attributes::property_def const& property)
{
return property_managed_name(property.klass, property.name);
}
inline std::string managed_part_name(attributes::part_def const& part)
{
std::vector<std::string> names = utils::split(part.name, '_');
@ -490,45 +512,6 @@ inline std::string translate_inherited_event_name(const attributes::event_def &e
return join_namespaces(klass.namespaces, '_') + klass_interface_name(klass) + "_" + managed_event_name(evt.name);
}
// Properties
template<typename T>
inline std::string property_managed_name(T const& klass, std::string const& name)
{
auto names = utils::split(name, '_');
// No need to escape keyword here as it will be capitalized and already
// namespaced inside the owner class.
auto managed_name = utils::to_pascal_case(names);
auto managed_klass_name = klass_concrete_or_interface_name(klass);
if (managed_name == "Type")
managed_name = managed_klass_name + managed_name;
return managed_name;
}
inline std::string property_managed_name(attributes::property_def const& property)
{
return property_managed_name(property.klass, property.name);
}
inline std::string property_concrete_indexer_name(attributes::property_def const& property)
{
return property_managed_name(property) + "Indexer";
}
template<typename T>
inline std::string property_interface_indexer_name(attributes::property_def const& property, T const& current_klass)
{
return name_helpers::klass_full_interface_name(current_klass) + property_concrete_indexer_name(property);
}
template<typename T>
inline std::string property_interface_indexer_short_name(attributes::property_def const& property, T const& current_klass)
{
return name_helpers::klass_interface_name(current_klass) + property_concrete_indexer_name(property);
}
// Open/close namespaces
template<typename OutputIterator, typename Context>
bool open_namespaces(OutputIterator sink, std::vector<std::string> namespaces, Context const& context)

View File

@ -65,7 +65,7 @@ struct is_generator< ::eolian_mono::parameter_generator> : std::true_type {};
namespace type_traits {
template <>
struct attributes_needed< ::eolian_mono::parameter_generator> : std::integral_constant<int, 1> {};
struct attributes_needed< ::eolian_mono::parameter_generator> : std::integral_constant<int, 1> {};
}
template <>
@ -75,9 +75,9 @@ struct is_generator< ::eolian_mono::marshall_parameter_generator> : std::true_ty
namespace type_traits {
template <>
struct attributes_needed< ::eolian_mono::marshall_parameter_generator> : std::integral_constant<int, 1> {};
struct attributes_needed< ::eolian_mono::marshall_parameter_generator> : std::integral_constant<int, 1> {};
}
template <>
struct is_eager_generator< ::eolian_mono::argument_generator> : std::true_type {};
template <>
@ -85,9 +85,9 @@ struct is_generator< ::eolian_mono::argument_generator> : std::true_type {};
namespace type_traits {
template <>
struct attributes_needed< ::eolian_mono::argument_generator> : std::integral_constant<int, 1> {};
struct attributes_needed< ::eolian_mono::argument_generator> : std::integral_constant<int, 1> {};
}
template <>
struct is_eager_generator< ::eolian_mono::argument_invocation_generator> : std::true_type {};
template <>
@ -1588,7 +1588,7 @@ struct native_convert_function_pointer_generator
struct constructor_parameter_name_generator
{
template <typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::parameter_def const& param, Context const& context) const
{

View File

@ -183,14 +183,13 @@ run(options_type const& opts)
auto context = context_add_tag(eolian_mono::indentation_context{0},
context_add_tag(eolian_mono::eolian_state_context{opts.state},
context_add_tag(eolian_mono::class_context{eolian_mono::class_context::none},
context_add_tag(eolian_mono::options_context{opts.want_beta,
opts.examples_dir},
context_add_tag(eolian_mono::library_context{opts.dllimport,
opts.v_major,
opts.v_minor,
opts.references_map},
efl::eolian::grammar::context_null())))));
efl::eolian::grammar::context_null()))));
EINA_ITERATOR_FOREACH(aliases, tp)
{

View File

@ -52,7 +52,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <summary>Gets the value of the given property in the wrapped model.</summary>
/// <param name="property">The property of the model.</param>
/// <returns>The value of the property.</returns>
public Eina.Value GetProperty(System.String property)
public Eina.Value GetProperty( System.String property)
{
return model.GetProperty(property);
}
@ -62,7 +62,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <param name="value">The value of the property.</param>
/// <returns>An <see cref="Eina.Future" /> that resolves when the property has
/// been set or reports an error if it could not be set.</returns>
public Eina.Future SetProperty(System.String property, Eina.Value value)
public Eina.Future SetProperty( System.String property, Eina.Value value)
{
return model.SetProperty(property, value);
}
@ -77,7 +77,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <summary>Returns an <see cref="Eina.Future" /> that will resolve when the property is ready to be read.</summary>
/// <param name="property">The property of the model.</param>
/// <returns>An <see cref="Eina.Future" /> that resolves when the property is ready.</returns>
public Eina.Future GetPropertyReady(System.String property)
public Eina.Future GetPropertyReady( System.String property)
{
return model.GetPropertyReady(property);
}
@ -87,7 +87,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <param name="count">The size of the range.</param>
/// <returns>An <see cref="Eina.Future" /> that resolves to an
/// <see cref="Eina.Array&lt;T&gt;" /> of children models.</returns>
public Eina.Future GetChildrenSlice(uint start, uint count)
public Eina.Future GetChildrenSlice( uint start, uint count)
{
return model.GetChildrenSlice(start, count);
}
@ -141,7 +141,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <param name="token">The token for the task's cancellation.</param>
/// <returns>Task that resolves when the property has been set or could not
/// be set.</returns>
public System.Threading.Tasks.Task<Eina.Value> SetPropertyAsync(System.String property, Eina.Value value, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
public System.Threading.Tasks.Task<Eina.Value> SetPropertyAsync( System.String property, Eina.Value value, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
{
return model.SetPropertyAsync(property, value, token);
}
@ -151,7 +151,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <param name="token">The token for the task's cancellation.</param>
/// <returns>Task that resolves when the given property is ready to be
/// read.</returns>
public System.Threading.Tasks.Task<Eina.Value> GetPropertyReadyAsync(System.String property, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
public System.Threading.Tasks.Task<Eina.Value> GetPropertyReadyAsync( System.String property, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
{
return model.GetPropertyReadyAsync(property, token);
}
@ -162,7 +162,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
/// <param name="token">Token to notify the async operation of external request to cancel.</param>
/// <returns>Task that resolves when the desired <see cref="Eina.Array&lt;T&gt;" /> of
/// children models is ready.</returns>
public System.Threading.Tasks.Task<Eina.Value> GetChildrenSliceAsync(uint start, uint count, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
public System.Threading.Tasks.Task<Eina.Value> GetChildrenSliceAsync( uint start, uint count, System.Threading.CancellationToken token=default(System.Threading.CancellationToken))
{
return model.GetChildrenSliceAsync(start, count, token);
}

View File

@ -114,7 +114,7 @@ main(void)
Evas_Object *scale_rect = _new_rectangle_add(d.evas);
efl_gfx_entity_geometry_set(scale_rect, EINA_RECT(50, 50, 50, 50));
efl_canvas_object_animation_start(scale_rect,
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
efl_new(EFL_CANVAS_SCALE_ANIMATION_CLASS,
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect, EINA_VECTOR2(0.5, 0.5)),
efl_animation_start_delay_set(efl_added, 5.0),
efl_animation_duration_set(efl_added, 2.0),
@ -125,7 +125,7 @@ main(void)
Evas_Object *scale_rect2 = _new_rectangle_add(d.evas);
efl_gfx_entity_geometry_set(scale_rect2, EINA_RECT(50, 200, 50, 50));
efl_canvas_object_animation_start(scale_rect2,
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
efl_new(EFL_CANVAS_SCALE_ANIMATION_CLASS,
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect2, EINA_VECTOR2(0.5, 0.5)),
efl_animation_duration_set(efl_added, 2.0),
efl_animation_play_count_set(efl_added, 0),
@ -136,7 +136,7 @@ main(void)
Evas_Object *scale_rect3 = _new_rectangle_add(d.evas);
efl_gfx_entity_geometry_set(scale_rect3, EINA_RECT(50, 350, 50, 50));
efl_canvas_object_animation_start(scale_rect3,
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
efl_new(EFL_CANVAS_SCALE_ANIMATION_CLASS,
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect3, EINA_VECTOR2(0.5, 0.5)),
efl_animation_duration_set(efl_added, 2.0),
efl_animation_play_count_set(efl_added, 4),
@ -147,7 +147,7 @@ main(void)
Evas_Object *scale_rect4 = _new_rectangle_add(d.evas);
efl_gfx_entity_geometry_set(scale_rect4, EINA_RECT(200, 50, 50, 50));
efl_canvas_object_animation_start(scale_rect4,
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
efl_new(EFL_CANVAS_SCALE_ANIMATION_CLASS,
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(3.0, 3.0), scale_rect4, EINA_VECTOR2(0.5, 0.5)),
efl_animation_duration_set(efl_added, 2.0),
efl_animation_final_state_keep_set(efl_added, EINA_TRUE)
@ -159,7 +159,7 @@ main(void)
efl_gfx_color_set(scale_rect5, 255, 0, 0, 255);
efl_gfx_entity_geometry_set(scale_rect5, EINA_RECT(200, 200, 50, 50));
efl_canvas_object_animation_start(scale_rect5,
efl_new(EFL_CANVAS_ANIMATION_SCALE_CLASS,
efl_new(EFL_CANVAS_SCALE_ANIMATION_CLASS,
efl_animation_scale_set(efl_added, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(5.0, 5.0), scale_rect5, EINA_VECTOR2(0.5, 0.5)),
efl_animation_duration_set(efl_added, 5.0),
efl_animation_play_count_set(efl_added, 0)

View File

@ -90,8 +90,6 @@ _ecore_wl2_surface_modules_init(void)
local_module = NULL;
return EINA_FALSE;
}
eina_module_free(local_module);
local_module = NULL;
return EINA_TRUE;
}
}

View File

@ -65,7 +65,7 @@ enum @beta Efl.Input_Text.Panel_Return_Key_State
disabled, [[The return key on input panel is disabled.]]
}
enum @beta Efl.Input_Text.Hints_Type
enum @beta Efl.Input_Text.Content_Type
{
[[Enumeration that defines the types of Input Hints.]]
none = 0, [[No active hints.]]
@ -178,14 +178,14 @@ interface @beta Efl.Input_Text {
}
}
// FIXME: I agree with Mike, looks bad
@property input_hint {
@property input_content_type @beta {
[[The input hint which allows input methods to fine-tune their behavior.]]
set {
}
get {
}
values {
hints: Efl.Input_Text.Hints_Type; [[Input hint.]]
hints: Efl.Input_Text.Content_Type; [[Input hint.]]
}
}
@property input_panel_layout {

View File

@ -25,13 +25,17 @@ interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font_Properties,
}
@property selection_cursors {
[[The cursors used for selection handling.
If the cursors are equal there's no selection.
You are allowed to retain and modify them. Modifying them modifies
the selection of the object.
]]
get {}
get {
[[You are allowed to retain and modify them. Modifying them modifies
the selection of the object (recommended to extend selection range).]]
}
set {
[[The positions of passed cursors will be used to set selection cursors positions.
Further modification for passed @Efl.Text.Cursor objects, will not affect selection.
Setter is recommended to set new range for selection.]]
}
values {
start: Efl.Text.Cursor; [[The start of the selection.]]
end: Efl.Text.Cursor; [[The end of the selection.]]

View File

@ -14,6 +14,7 @@
typedef struct _Efl_Ui_Internal_Text_Interactive_Data
{
Efl_Text_Cursor *sel_start, *sel_end;
int sel_start_pos, sel_end_pos;
Efl_Text_Cursor *main_cursor;
Efl_Text_Cursor *preedit_start, *preedit_end;
Ecore_Timer *pw_timer;
@ -33,7 +34,7 @@ typedef struct _Efl_Ui_Internal_Text_Interactive_Data
Efl_Input_Text_Capitalize_Type autocapital_type;
Efl_Input_Text_Panel_Language_Type input_panel_lang;
Efl_Input_Text_Panel_Return_Key_Type input_panel_return_key_type;
Efl_Input_Text_Hints_Type input_hints;
Efl_Input_Text_Content_Type input_hints;
Efl_Input_Text_Panel_Return_Key_State input_panel_return_key_state;
#ifdef HAVE_ECORE_IMF
@ -44,10 +45,11 @@ typedef struct _Efl_Ui_Internal_Text_Interactive_Data
} Efl_Ui_Internal_Text_Interactive_Data;
static void _sel_range_del_emit(Evas_Object *obj, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _sel_init(Efl_Text_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _sel_enable(Efl_Text_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _sel_extend(Efl_Text_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _sel_init(Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _sel_enable(Evas_Object *o,Efl_Ui_Internal_Text_Interactive_Data *en, Eina_Bool emit_event);
static void _sel_extend(Efl_Text_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Interactive_Data *en, Eina_Bool emit_event);
static void _sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en, Eina_Bool emit_event);
static void _emit_sel_state( Eo *o, Efl_Ui_Internal_Text_Interactive_Data *en);
static const char *_entry_selection_get(Efl_Ui_Internal_Text_Interactive *obj, Efl_Ui_Internal_Text_Interactive_Data *en);
static void _entry_imf_cursor_info_set(Efl_Ui_Internal_Text_Interactive_Data *en);
@ -201,7 +203,7 @@ _entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void
{
/* delete selected characters */
_sel_range_del_emit(obj, en);
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
}
}
@ -626,12 +628,12 @@ _entry_imf_event_selection_set_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED
}
else
{
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
efl_text_cursor_position_set(cur, ev->start);
_sel_enable(cur, obj, en);
_sel_init(cur, obj, en);
_sel_enable(obj, en, EINA_TRUE);
_sel_init(cur, en);
efl_text_cursor_position_set(cur, ev->end);
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
}
}
@ -747,18 +749,64 @@ _entry_selection_get(Efl_Ui_Internal_Text_Interactive *obj EINA_UNUSED, Efl_Ui_I
}
static void
_sel_cursor_changed(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
// Eo *obj = data;
_sel_reset(Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en){
if (!en->have_selection && efl_text_cursor_equal(en->sel_start, en->sel_end))
return;
if ( en->sel_start_pos == efl_text_cursor_position_get(en->sel_start) &&
en->sel_end_pos == efl_text_cursor_position_get(en->sel_end))
return;
if (en->have_selection)
{
if (efl_text_cursor_equal(en->sel_start, en->sel_end))
{
_sel_clear(obj, en, EINA_TRUE);
}
else
{
_entry_imf_cursor_info_set(en);
if (en->selection)
{
free(en->selection);
en->selection = NULL;
}
_emit_sel_state(obj, en);
}
}
else
{
if (!efl_text_cursor_equal(en->sel_start, en->sel_end))
{
_sel_enable(obj, en, EINA_TRUE);
_entry_imf_cursor_info_set(en);
if (en->selection)
{
free(en->selection);
en->selection = NULL;
}
_emit_sel_state(obj, en);
}
}
}
static void
_sel_init(Efl_Text_Cursor *c, Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en)
_sel_cursor_changed(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
Efl_Ui_Internal_Text_Interactive *obj = data;
Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS);
_sel_reset(obj, en);
}
static void
_sel_init(Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data *en)
{
if (en->have_selection)
return;
en->sel_start_pos = efl_text_cursor_position_get(c);
_cur_pos_copy(c, en->sel_start);
en->sel_end_pos = efl_text_cursor_position_get(c);
_cur_pos_copy(c, en->sel_end);
en->have_selection = EINA_FALSE;
@ -770,8 +818,7 @@ _sel_init(Efl_Text_Cursor *c, Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_I
}
static void
_sel_enable(Efl_Text_Cursor *c EINA_UNUSED,
Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en)
_sel_enable(Eo *o, Efl_Ui_Internal_Text_Interactive_Data *en, Eina_Bool emit_event)
{
if (en->have_selection) return;
en->have_selection = EINA_TRUE;
@ -781,8 +828,11 @@ _sel_enable(Efl_Text_Cursor *c EINA_UNUSED,
en->selection = NULL;
}
Eina_Bool b_value = EINA_TRUE;
efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
if (emit_event)
{
Eina_Bool b_value = EINA_TRUE;
efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
}
_entry_imf_context_reset(en);
}
@ -791,8 +841,7 @@ _emit_sel_state( Eo *o, Efl_Ui_Internal_Text_Interactive_Data *en)
{
if (!efl_text_cursor_compare(en->sel_start, en->sel_end))
{
Eina_Bool b_value = EINA_FALSE;
efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
_sel_clear(o, en, EINA_TRUE);
}
else
{
@ -804,12 +853,12 @@ _emit_sel_state( Eo *o, Efl_Ui_Internal_Text_Interactive_Data *en)
}
static void
_sel_extend(Efl_Text_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Interactive_Data *en)
_sel_extend(Efl_Text_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Interactive_Data *en, Eina_Bool emit_event)
{
if (!en->sel_end) return;
_sel_enable(c, o, en);
_sel_enable(o, en, emit_event);
if (efl_text_cursor_equal(c, en->sel_end)) return;
en->sel_end_pos = efl_text_cursor_position_get(c);
_cur_pos_copy(c, en->sel_end);
_entry_imf_cursor_info_set(en);
@ -824,7 +873,7 @@ _sel_extend(Efl_Text_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Interactive
}
static void
_sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en)
_sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en, Eina_Bool emit_change)
{
en->had_sel = EINA_FALSE;
if (en->selection)
@ -836,8 +885,10 @@ _sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en
{
en->have_selection = EINA_FALSE;
Eina_Bool b_value = en->have_selection;
en->sel_start_pos = en->sel_end_pos = efl_text_cursor_position_get(en->sel_start);
_cur_pos_copy(en->sel_start, en->sel_end);
efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
if (emit_change)
efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
}
}
@ -845,32 +896,32 @@ EOLIAN static void
_efl_ui_internal_text_interactive_efl_text_interactive_all_unselect(
Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
{
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
}
EOLIAN static Eina_Bool
_efl_ui_internal_text_interactive_efl_text_interactive_have_selection_get(
const Eo *obj EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en)
{
if (!en->have_selection) return en->have_selection;
return !efl_text_cursor_equal(en->sel_start, en->sel_end);
}
EOLIAN static void
_efl_ui_internal_text_interactive_efl_text_interactive_all_select(
Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en EINA_UNUSED)
{
if (!efl_text_interactive_selection_allowed_get(obj))
return;
Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj);
_entry_imf_context_reset(en);
Eo *c1 = efl_canvas_textblock_cursor_create(obj);
Eo *c2 = efl_canvas_textblock_cursor_create(obj);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
_entry_imf_context_reset(en);
_sel_init(cur, obj, en);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
_sel_extend(cur, obj, en);
efl_text_cursor_move(c1, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
efl_text_cursor_move(c2, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
efl_text_interactive_selection_cursors_set(obj, c1, c2);
}
@ -903,7 +954,7 @@ static void
_sel_range_del_emit(Evas_Object *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
{
_range_del_emit(obj, en->sel_start, en->sel_end);
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
}
static void
@ -1024,7 +1075,7 @@ _key_down_sel_pre(Efl_Ui_Internal_Text_Interactive *obj, Efl_Text_Cursor *cur, E
{
if (shift)
{
_sel_init(cur, obj, en);
_sel_init(cur, en);
}
else if (en->have_selection)
{
@ -1032,8 +1083,9 @@ _key_down_sel_pre(Efl_Ui_Internal_Text_Interactive *obj, Efl_Text_Cursor *cur, E
if ((sel_forward && movement_forward) || (!sel_forward && !movement_forward))
_cur_pos_copy(en->sel_end, cur);
else
_cur_pos_copy(en->sel_start, cur);
_sel_clear(obj, en);
_cur_pos_copy(en->sel_start, cur);
_sel_clear(obj, en, EINA_TRUE);
}
}
}
@ -1043,8 +1095,8 @@ _key_down_sel_post(Efl_Ui_Internal_Text_Interactive *obj, Efl_Text_Cursor *cur,
{
if (en->select_allow)
{
if (shift) _sel_extend(cur, obj, en);
else _sel_clear(obj, en);
if (shift) _sel_extend(cur, obj, en, EINA_TRUE);
else _sel_clear(obj, en, EINA_TRUE);
}
}
@ -1237,7 +1289,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
_delete_emit(obj, cur, en, old_cur_pos, EINA_TRUE);
}
}
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
else if (!strcmp(ev->key, "Delete") ||
@ -1273,7 +1325,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
_delete_emit(obj, cur, en, old_cur_pos, EINA_FALSE);
}
}
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
else if ((!alt) &&
@ -1561,19 +1613,19 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START);
else
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_END);
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
}
else
{
en->have_selection = EINA_FALSE;
en->selecting = EINA_FALSE;
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
tc = efl_canvas_textblock_cursor_create(obj);
_cur_pos_copy(cur, tc);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START);
_sel_init(cur, obj, en);
_sel_init(cur, en);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_END);
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
}
goto end;
}
@ -1590,20 +1642,20 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_END);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHARACTER_NEXT);
}
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
}
else
{
en->have_selection = EINA_FALSE;
en->selecting = EINA_FALSE;
_sel_clear(obj, en);
_sel_clear(obj, en, EINA_TRUE);
tc = efl_canvas_textblock_cursor_create(obj);
_cur_pos_copy(cur, tc);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START);
_sel_init(cur, obj, en);
_sel_init(cur, en);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_END);
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHARACTER_NEXT);
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
}
goto end;
}
@ -1614,13 +1666,13 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
{
if ((en->have_selection) && (shift))
{
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
}
else
{
en->selecting = EINA_TRUE;
_sel_clear(obj, en);
_sel_init(cur, obj, en);
_sel_clear(obj, en, EINA_TRUE);
_sel_init(cur, en);
}
}
@ -1716,10 +1768,10 @@ _mouse_move_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, vo
if (en->select_allow)
{
_sel_extend(cur, obj, en);
_sel_extend(cur, obj, en, EINA_TRUE);
if (!efl_text_cursor_equal(en->sel_start, en->sel_end))
_sel_enable(cur, obj, en);
_sel_enable(obj, en, EINA_TRUE);
}
efl_del(tc);
}
@ -1754,7 +1806,9 @@ _efl_ui_internal_text_interactive_efl_object_finalize(Eo *obj, Efl_Ui_Internal_T
en->sel_start = efl_canvas_textblock_cursor_create(obj);
en->sel_end = efl_canvas_textblock_cursor_create(obj);
efl_event_callback_add(efl_text_interactive_main_cursor_get(obj), EFL_TEXT_CURSOR_EVENT_CHANGED,
efl_event_callback_add(en->sel_start, EFL_TEXT_CURSOR_EVENT_CHANGED,
_sel_cursor_changed, obj);
efl_event_callback_add(en->sel_end, EFL_TEXT_CURSOR_EVENT_CHANGED,
_sel_cursor_changed, obj);
#ifdef HAVE_ECORE_IMF
@ -1847,7 +1901,7 @@ _efl_ui_internal_text_interactive_efl_text_interactive_selection_allowed_set(Eo
pd->select_allow = allowed;
if (!allowed)
{
_sel_clear(obj, pd);
_sel_clear(obj, pd, EINA_TRUE);
}
}
@ -1873,6 +1927,16 @@ _efl_ui_internal_text_interactive_efl_text_interactive_selection_cursors_get(con
}
}
EOLIAN static void
_efl_ui_internal_text_interactive_efl_text_interactive_selection_cursors_set(Eo *obj EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en, Efl_Text_Cursor *start, Efl_Text_Cursor *end)
{
en->sel_start_pos = efl_text_cursor_position_get(start);
en->sel_end_pos = efl_text_cursor_position_get(en->sel_end);
efl_text_cursor_position_set(en->sel_start, en->sel_start_pos);
en->sel_end_pos = -1;
efl_text_cursor_position_set(en->sel_end, efl_text_cursor_position_get(end));
}
EOLIAN static void
_efl_ui_internal_text_interactive_efl_text_interactive_editable_set(Eo *obj EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *sd, Eina_Bool editable)
{
@ -2044,9 +2108,9 @@ _efl_ui_internal_text_interactive_efl_input_text_input_panel_layout_set(Eo *obj
#endif
if (layout == EFL_INPUT_TEXT_PANEL_LAYOUT_TYPE_PASSWORD)
efl_input_text_input_hint_set(obj, ((sd->input_hints & ~EFL_INPUT_TEXT_HINTS_TYPE_AUTO_COMPLETE) | EFL_INPUT_TEXT_HINTS_TYPE_SENSITIVE_DATA));
efl_input_text_input_content_type_set(obj, ((sd->input_hints & ~EFL_INPUT_TEXT_CONTENT_TYPE_AUTO_COMPLETE) | EFL_INPUT_TEXT_CONTENT_TYPE_SENSITIVE_DATA));
else if (layout == EFL_INPUT_TEXT_PANEL_LAYOUT_TYPE_TERMINAL)
efl_input_text_input_hint_set(obj, (sd->input_hints & ~EFL_INPUT_TEXT_HINTS_TYPE_AUTO_COMPLETE));
efl_input_text_input_content_type_set(obj, (sd->input_hints & ~EFL_INPUT_TEXT_CONTENT_TYPE_AUTO_COMPLETE));
}
EOLIAN static Efl_Input_Text_Panel_Layout_Type
@ -2152,7 +2216,7 @@ _efl_ui_internal_text_interactive_efl_input_text_predictable_get(const Eo *obj,
EOLIAN static void
_efl_ui_internal_text_interactive_efl_input_text_input_hint_set(Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en, Efl_Input_Text_Hints_Type input_hints)
_efl_ui_internal_text_interactive_efl_input_text_input_content_type_set(Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en, Efl_Input_Text_Content_Type input_hints)
{
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
@ -2166,12 +2230,12 @@ _efl_ui_internal_text_interactive_efl_input_text_input_hint_set(Eo *obj, Efl_Ui_
}
EOLIAN static Efl_Input_Text_Hints_Type
_efl_ui_internal_text_interactive_efl_input_text_input_hint_get(const Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
EOLIAN static Efl_Input_Text_Content_Type
_efl_ui_internal_text_interactive_efl_input_text_input_content_type_get(const Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
{
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
return (Efl_Input_Text_Hints_Type)ecore_imf_context_input_hint_get(en->imf_context);
return (Efl_Input_Text_Content_Type)ecore_imf_context_input_hint_get(en->imf_context);
(void)obj;
#else
(void)obj;

View File

@ -9,7 +9,7 @@ class @beta Efl.Ui.Internal.Text.Interactive extends Efl.Canvas.Textblock implem
Efl.Object.finalize;
Efl.Text_Interactive.main_cursor { get; }
Efl.Text_Interactive.selection_allowed { get; set; }
Efl.Text_Interactive.selection_cursors { get; }
Efl.Text_Interactive.selection_cursors { get; set; }
Efl.Text_Interactive.editable { get; set; }
Efl.Text_Interactive.all_unselect;
Efl.Text_Interactive.all_select;
@ -22,7 +22,7 @@ class @beta Efl.Ui.Internal.Text.Interactive extends Efl.Canvas.Textblock implem
Efl.Input_Text.autocapitalization { get; set; }
Efl.Input_Text.input_panel_return_key_state { get; set; }
Efl.Input_Text.predictable { get; set; }
Efl.Input_Text.input_hint { get; set; }
Efl.Input_Text.input_content_type { get; set; }
Efl.Input_Text.input_panel_layout { get; set; }
Efl.Input_Text.input_panel_return_key_type { get; set; }
Efl.Input_Text.input_panel_autoshow { get; set; }

View File

@ -62,7 +62,7 @@ _efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Sp
{
pd->container = spotlight;
pd->alpha_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, obj);
pd->alpha_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, obj);
efl_animation_alpha_set(pd->alpha_anim, 0.0, 1.0);
efl_animation_duration_set(pd->alpha_anim, 0.5);

View File

@ -821,8 +821,7 @@ _efl_ui_textbox_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Textbox_Data *s
EOLIAN static Eina_Bool
_efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data *sd)
{
Evas_Object *top;
Eina_Bool top_is_win = EINA_FALSE;
Efl_Object *top;
if (!efl_text_interactive_editable_get(obj)) return EINA_FALSE;
@ -834,7 +833,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
_edje_signal_emit(sd, "efl,action,focus", "efl");
if (top && efl_input_text_input_panel_autoshow_get(obj) && !efl_input_text_input_panel_show_on_demand_get(obj))
if (efl_input_text_input_panel_autoshow_get(obj) && !efl_input_text_input_panel_show_on_demand_get(obj))
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
if (_elm_config->atspi_mode)
efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
@ -846,7 +845,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
_edje_signal_emit(sd, "efl,action,unfocus", "efl");
efl_canvas_object_key_focus_set(sw, EINA_FALSE);
if (top && top_is_win && efl_input_text_input_panel_autoshow_get(obj))
if (efl_input_text_input_panel_autoshow_get(obj))
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
if (_elm_config->atspi_mode)
efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_FALSE);
@ -1270,8 +1269,7 @@ _mouse_up_cb(void *data,
void *event_info)
{
Evas_Event_Mouse_Up *ev = event_info;
Eina_Bool top_is_win = EINA_FALSE;
Evas_Object *top;
Efl_Object *top;
EFL_UI_TEXT_DATA_GET(data, sd);
@ -1292,15 +1290,9 @@ _mouse_up_cb(void *data,
}
else
{
top = elm_widget_top_get(data);
if (top)
{
if (efl_isa(top, EFL_UI_WIN_CLASS))
top_is_win = EINA_TRUE;
if (top_is_win && efl_input_text_input_panel_autoshow_get(data) && efl_input_text_input_panel_show_on_demand_get(data))
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
}
top = efl_provider_find(data, EFL_UI_WIN_CLASS);
if (efl_input_text_input_panel_autoshow_get(data) && efl_input_text_input_panel_show_on_demand_get(data))
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
}
}
/* Since context menu disabled flag was checked at mouse right key down,
@ -1911,7 +1903,7 @@ _efl_ui_textbox_efl_object_finalize(Eo *obj,
efl_input_text_input_panel_layout_set(obj, EFL_INPUT_TEXT_PANEL_LAYOUT_TYPE_NORMAL);
efl_input_text_input_panel_autoshow_set(obj, EINA_TRUE);
efl_input_text_predictable_set(obj, EINA_TRUE);
efl_input_text_input_hint_set(obj, EFL_INPUT_TEXT_HINTS_TYPE_AUTO_COMPLETE);
efl_input_text_input_content_type_set(obj, EFL_INPUT_TEXT_CONTENT_TYPE_AUTO_COMPLETE);
sd->calc_force = EINA_TRUE;
@ -1992,7 +1984,7 @@ _efl_ui_textbox_efl_text_format_password_set(Eo *obj, Efl_Ui_Textbox_Data *sd, E
if (password)
{
efl_text_multiline_set(obj, EINA_FALSE);
efl_input_text_input_hint_set(obj, ((efl_input_text_input_hint_get(obj) & ~EFL_INPUT_TEXT_HINTS_TYPE_AUTO_COMPLETE) | EFL_INPUT_TEXT_HINTS_TYPE_SENSITIVE_DATA));
efl_input_text_input_content_type_set(obj, ((efl_input_text_input_content_type_get(obj) & ~EFL_INPUT_TEXT_CONTENT_TYPE_AUTO_COMPLETE) | EFL_INPUT_TEXT_CONTENT_TYPE_SENSITIVE_DATA));
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_PASSWORD_TEXT);
}
else
@ -2004,7 +1996,7 @@ _efl_ui_textbox_efl_text_format_password_set(Eo *obj, Efl_Ui_Textbox_Data *sd, E
_dnd_leave_cb, NULL,
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
efl_input_text_input_hint_set(obj, ((efl_input_text_input_hint_get(obj) | EFL_INPUT_TEXT_HINTS_TYPE_AUTO_COMPLETE) & ~EFL_INPUT_TEXT_HINTS_TYPE_SENSITIVE_DATA));
efl_input_text_input_content_type_set(obj, ((efl_input_text_input_content_type_get(obj) | EFL_INPUT_TEXT_CONTENT_TYPE_AUTO_COMPLETE) & ~EFL_INPUT_TEXT_CONTENT_TYPE_SENSITIVE_DATA));
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_ENTRY);
}

View File

@ -897,7 +897,7 @@ struct function_def
}
else if(type == EOLIAN_PROP_GET)
{
for(auto v : values)
for(auto&& v : values)
{
v.direction = parameter_direction::out;
parameters.push_back(v);

View File

@ -64,14 +64,14 @@ extern "C" {
#include <gesture/efl_canvas_gesture_manager.eo.h>
#include <canvas/efl_canvas_object.eo.h>
#include <canvas/efl_canvas_animation_alpha.eo.h>
#include <canvas/efl_canvas_alpha_animation.eo.h>
#include <canvas/efl_canvas_animation.eo.h>
#include <canvas/efl_canvas_animation_group.eo.h>
#include <canvas/efl_canvas_animation_group_parallel.eo.h>
#include <canvas/efl_canvas_animation_group_sequential.eo.h>
#include <canvas/efl_canvas_animation_rotate.eo.h>
#include <canvas/efl_canvas_animation_scale.eo.h>
#include <canvas/efl_canvas_animation_translate.eo.h>
#include <canvas/efl_canvas_group_animation.eo.h>
#include <canvas/efl_canvas_parallel_group_animation.eo.h>
#include <canvas/efl_canvas_sequential_group_animation.eo.h>
#include <canvas/efl_canvas_rotate_animation.eo.h>
#include <canvas/efl_canvas_scale_animation.eo.h>
#include <canvas/efl_canvas_translate_animation.eo.h>
#include <canvas/efl_canvas_event_grabber.eo.h>
#include <canvas/efl_canvas_group.eo.h>
#include <canvas/efl_canvas_image.eo.h>

View File

@ -3371,52 +3371,52 @@ typedef Eo Efl_Animation;
#endif
#ifndef _EFL_ANIMATION_ALPHA_EO_CLASS_TYPE
#define _EFL_ANIMATION_ALPHA_EO_CLASS_TYPE
#ifndef _EFL_ALPHA_ANIMATION_EO_CLASS_TYPE
#define _EFL_ALPHA_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Alpha;
typedef Eo Efl_Alpha_Animation;
#endif
#ifndef _EFL_ANIMATION_ROTATE_EO_CLASS_TYPE
#define _EFL_ANIMATION_ROTATE_EO_CLASS_TYPE
#ifndef _EFL_ROTATE_ANIMATION_EO_CLASS_TYPE
#define _EFL_ROTATE_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Rotate;
typedef Eo Efl_Rotate_Animation;
#endif
#ifndef _EFL_ANIMATION_SCALE_EO_CLASS_TYPE
#define _EFL_ANIMATION_SCALE_EO_CLASS_TYPE
#ifndef _EFL_SCALE_ANIMATION_EO_CLASS_TYPE
#define _EFL_SCALE_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Scale;
typedef Eo Efl_Scale_Animation;
#endif
#ifndef _EFL_ANIMATION_TRANSLATE_EO_CLASS_TYPE
#define _EFL_ANIMATION_TRANSLATE_EO_CLASS_TYPE
#ifndef _EFL_TRANSLATE_ANIMATION_EO_CLASS_TYPE
#define _EFL_TRANSLATE_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Translate;
typedef Eo Efl_Translate_Animation;
#endif
#ifndef _EFL_ANIMATION_GROUP_EO_CLASS_TYPE
#define _EFL_ANIMATION_GROUP_EO_CLASS_TYPE
#ifndef _EFL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Group;
typedef Eo Efl_Group_Animation;
#endif
#ifndef _EFL_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#define _EFL_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#ifndef _EFL_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Group_Parallel;
typedef Eo Efl_Parallel_Group_Animation;
#endif
#ifndef _EFL_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#define _EFL_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#ifndef _EFL_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Group_Sequential;
typedef Eo Efl_Sequential_Group_Animation;
#endif
@ -3462,17 +3462,17 @@ typedef Eo Efl_Animation_Player_Group;
#endif
#ifndef _EFL_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#define _EFL_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#ifndef _EFL_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Group_Parallel;
typedef Eo Efl_Parallel_Group_Animation;
#endif
#ifndef _EFL_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#define _EFL_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#ifndef _EFL_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Animation_Group_Sequential;
typedef Eo Efl_Sequential_Group_Animation;
#endif

View File

@ -17,52 +17,52 @@ typedef Eo Efl_Canvas_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_ALPHA_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_ALPHA_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_ALPHA_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_ALPHA_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Alpha;
typedef Eo Efl_Canvas_Alpha_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_ROTATE_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_ROTATE_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_ROTATE_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_ROTATE_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Rotate;
typedef Eo Efl_Canvas_Rotate_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_SCALE_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_SCALE_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_SCALE_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_SCALE_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Scale;
typedef Eo Efl_Canvas_Scale_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_TRANSLATE_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_TRANSLATE_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_TRANSLATE_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_TRANSLATE_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Translate;
typedef Eo Efl_Canvas_Translate_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_GROUP_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_GROUP_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Group;
typedef Eo Efl_Canvas_Group_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Group_Parallel;
typedef Eo Efl_Canvas_Parallel_Group_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Group_Sequential;
typedef Eo Efl_Canvas_Sequential_Group_Animation;
#endif
@ -108,17 +108,17 @@ typedef Eo Efl_Canvas_Animation_Player_Group;
#endif
#ifndef _EFL_CANVAS_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_GROUP_PARALLEL_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_PARALLEL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Group_Parallel;
typedef Eo Efl_Canvas_Parallel_Group_Animation;
#endif
#ifndef _EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#define _EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_EO_CLASS_TYPE
#ifndef _EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
#define _EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Animation_Group_Sequential;
typedef Eo Efl_Canvas_Sequential_Group_Animation;
#endif
@ -219,13 +219,13 @@ struct _Efl_Canvas_Object_Animation_Event
#include "canvas/efl_canvas_object.eo.h"
#include "canvas/efl_canvas_object_animation.eo.h"
#include "canvas/efl_canvas_animation.eo.h"
#include "canvas/efl_canvas_animation_alpha.eo.h"
#include "canvas/efl_canvas_animation_rotate.eo.h"
#include "canvas/efl_canvas_animation_scale.eo.h"
#include "canvas/efl_canvas_animation_translate.eo.h"
#include "canvas/efl_canvas_animation_group.eo.h"
#include "canvas/efl_canvas_animation_group_parallel.eo.h"
#include "canvas/efl_canvas_animation_group_sequential.eo.h"
#include "canvas/efl_canvas_alpha_animation.eo.h"
#include "canvas/efl_canvas_rotate_animation.eo.h"
#include "canvas/efl_canvas_scale_animation.eo.h"
#include "canvas/efl_canvas_translate_animation.eo.h"
#include "canvas/efl_canvas_group_animation.eo.h"
#include "canvas/efl_canvas_parallel_group_animation.eo.h"
#include "canvas/efl_canvas_sequential_group_animation.eo.h"
#include "canvas/efl_canvas_event_grabber.eo.h"
/**

View File

@ -1,10 +1,10 @@
#include "efl_canvas_animation_alpha_private.h"
#include "efl_canvas_alpha_animation_private.h"
#define MY_CLASS EFL_CANVAS_ANIMATION_ALPHA_CLASS
#define MY_CLASS EFL_CANVAS_ALPHA_ANIMATION_CLASS
EOLIAN static void
_efl_canvas_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Alpha_Data *pd,
_efl_canvas_alpha_animation_alpha_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Alpha_Animation_Data *pd,
double from_alpha,
double to_alpha)
{
@ -13,8 +13,8 @@ _efl_canvas_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_alpha_alpha_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Alpha_Data *pd,
_efl_canvas_alpha_animation_alpha_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Alpha_Animation_Data *pd,
double *from_alpha,
double *to_alpha)
{
@ -26,8 +26,8 @@ _efl_canvas_animation_alpha_alpha_get(const Eo *eo_obj EINA_UNUSED,
EOLIAN static double
_efl_canvas_animation_alpha_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Animation_Alpha_Data *pd EINA_UNUSED,
_efl_canvas_alpha_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Alpha_Animation_Data *pd EINA_UNUSED,
double progress,
Efl_Canvas_Object *target)
{
@ -50,8 +50,8 @@ _efl_canvas_animation_alpha_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
_efl_canvas_animation_alpha_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Animation_Alpha_Data *pd)
_efl_canvas_alpha_animation_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Alpha_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@ -61,4 +61,4 @@ _efl_canvas_animation_alpha_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
#include "efl_canvas_animation_alpha.eo.c"
#include "efl_canvas_alpha_animation.eo.c"

View File

@ -1,4 +1,4 @@
class Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation
class Efl.Canvas.Alpha_Animation extends Efl.Canvas.Animation
{
[[Animated alpha blending effect.
@ -9,7 +9,7 @@ class Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_alpha;
data: Efl_Canvas_Animation_Alpha_Data;
data: Efl_Canvas_Alpha_Animation_Data;
methods {
@property alpha {
[[Alpha range to animate. $[0.0] means the object is transparent and $[1.0] means

View File

@ -0,0 +1,19 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_ALPHA_ANIMATION_DATA_GET(o, pd) \
Efl_Canvas_Alpha_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ALPHA_ANIMATION_CLASS)
typedef struct _Efl_Canvas_Alpha_Animation_Property
{
double alpha;
} Efl_Canvas_Alpha_Animation_Property;
typedef struct _Efl_Canvas_Alpha_Animation_Data
{
Efl_Canvas_Alpha_Animation_Property from;
Efl_Canvas_Alpha_Animation_Property to;
} Efl_Canvas_Alpha_Animation_Data;

View File

@ -9,7 +9,7 @@ class Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
The value of the changed properties moves smoothly as the provided progress value
evolves from $[0] to $[1].
For example implementations see @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale.
For example implementations see @Efl.Canvas.Translate_Animation or @Efl.Canvas.Scale_Animation.
Note: Unless @.final_state_keep is used, when an animation finishes any effect it introduced on the object is
removed. This means that if the animation does not end in the object's initial state there will be a noticeable
@ -103,7 +103,7 @@ class Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
animation_apply {
[[Overwrite this method to implement your own animation subclasses.
This is used for example by @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale.
This is used for example by @Efl.Canvas.Translate_Animation or @Efl.Canvas.Scale_Animation.
Subclasses should call their parent's @.animation_apply to get the adjusted $progress value
and then perform the animation by modifying the $target's properties.

View File

@ -1,19 +0,0 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_ANIMATION_ALPHA_DATA_GET(o, pd) \
Efl_Canvas_Animation_Alpha_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_ALPHA_CLASS)
typedef struct _Efl_Canvas_Animation_Alpha_Property
{
double alpha;
} Efl_Canvas_Animation_Alpha_Property;
typedef struct _Efl_Canvas_Animation_Alpha_Data
{
Efl_Canvas_Animation_Alpha_Property from;
Efl_Canvas_Animation_Alpha_Property to;
} Efl_Canvas_Animation_Alpha_Data;

View File

@ -1,16 +0,0 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_CLASS
#define MY_CLASS_NAME efl_class_name_get(MY_CLASS)
#define EFL_ANIMATION_GROUP_DATA_GET(o, pd) \
Efl_Canvas_Animation_Group_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_GROUP_CLASS)
typedef struct _Efl_Canvas_Animation_Group_Data
{
Eina_List *animations;
Eina_Bool is_duration_set : 1; //EINA_TRUE if duration is set
} Efl_Canvas_Animation_Group_Data;

View File

@ -1,30 +0,0 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_ANIMATION_ROTATE_DATA_GET(o, pd) \
Efl_Canvas_Animation_Rotate_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_ROTATE_CLASS)
typedef struct _Efl_Canvas_Animation_Rotate_Property
{
double degree;
} Efl_Canvas_Animation_Rotate_Property;
typedef struct _Efl_Canvas_Animation_Rotate_Relative_Pivot
{
Efl_Canvas_Object *obj;
Eina_Vector2 pos;
} Efl_Canvas_Animation_Rotate_Relative_Pivot;
typedef struct _Efl_Canvas_Animation_Rotate_Data
{
Efl_Canvas_Animation_Rotate_Property from;
Efl_Canvas_Animation_Rotate_Property to;
Eina_Position2D abs_pivot;
Efl_Canvas_Animation_Rotate_Relative_Pivot rel_pivot;
Eina_Bool use_rel_pivot;
} Efl_Canvas_Animation_Rotate_Data;

View File

@ -1,25 +0,0 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \
Efl_Canvas_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_SCALE_CLASS)
typedef struct _Efl_Canvas_Animation_Scale_Relative_Pivot
{
Efl_Canvas_Object *obj;
Eina_Vector2 pos;
} Efl_Canvas_Animation_Scale_Relative_Pivot;
typedef struct _Efl_Canvas_Animation_Scale_Data
{
Eina_Vector2 from;
Eina_Vector2 to;
Eina_Position2D pos;
Efl_Canvas_Animation_Scale_Relative_Pivot rel_pivot;
Eina_Bool use_rel_pivot;
} Efl_Canvas_Animation_Scale_Data;

View File

@ -1,16 +0,0 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_ANIMATION_TRANSLATE_DATA_GET(o, pd) \
Efl_Canvas_Animation_Translate_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_TRANSLATE_CLASS)
typedef struct _Efl_Canvas_Animation_Translate_Data
{
Eina_Position2D from;
Eina_Position2D to;
Eina_Bool use_rel_move;
} Efl_Canvas_Animation_Translate_Data;

View File

@ -1,8 +1,8 @@
#include "efl_canvas_animation_group_private.h"
#include "efl_canvas_group_animation_private.h"
EOLIAN static void
_efl_canvas_animation_group_animation_add(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd,
_efl_canvas_group_animation_animation_add(Eo *eo_obj,
Efl_Canvas_Group_Animation_Data *pd,
Efl_Canvas_Animation *animation)
{
if (!animation) return;
@ -24,8 +24,8 @@ _efl_canvas_animation_group_animation_add(Eo *eo_obj,
}
EOLIAN static void
_efl_canvas_animation_group_animation_del(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Group_Data *pd,
_efl_canvas_group_animation_animation_del(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Group_Animation_Data *pd,
Efl_Canvas_Animation *animation)
{
Eina_List *list;
@ -45,15 +45,15 @@ _efl_canvas_animation_group_animation_del(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static Eina_Iterator*
_efl_canvas_animation_group_animations_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Group_Data *pd)
_efl_canvas_group_animation_animations_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Group_Animation_Data *pd)
{
return eina_list_iterator_new(pd->animations);
}
EOLIAN static void
_efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd,
_efl_canvas_group_animation_efl_canvas_animation_duration_set(Eo *eo_obj,
Efl_Canvas_Group_Animation_Data *pd,
double duration)
{
EINA_SAFETY_ON_FALSE_RETURN(duration >= 0.0);
@ -72,8 +72,8 @@ _efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
}
EOLIAN static void
_efl_canvas_animation_group_efl_canvas_animation_final_state_keep_set(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd,
_efl_canvas_group_animation_efl_canvas_animation_final_state_keep_set(Eo *eo_obj,
Efl_Canvas_Group_Animation_Data *pd,
Eina_Bool keep_final_state)
{
Eina_List *l;
@ -87,8 +87,8 @@ _efl_canvas_animation_group_efl_canvas_animation_final_state_keep_set(Eo *eo_obj
}
EOLIAN static void
_efl_canvas_animation_group_efl_canvas_animation_interpolator_set(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd,
_efl_canvas_group_animation_efl_canvas_animation_interpolator_set(Eo *eo_obj,
Efl_Canvas_Group_Animation_Data *pd,
Efl_Interpolator *interpolator)
{
Eina_List *l;
@ -102,8 +102,8 @@ _efl_canvas_animation_group_efl_canvas_animation_interpolator_set(Eo *eo_obj,
}
EOLIAN static Efl_Object *
_efl_canvas_animation_group_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd)
_efl_canvas_group_animation_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Group_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
pd->animations = NULL;
@ -112,8 +112,8 @@ _efl_canvas_animation_group_efl_object_constructor(Eo *eo_obj,
}
EOLIAN static void
_efl_canvas_animation_group_efl_object_destructor(Eo *eo_obj,
Efl_Canvas_Animation_Group_Data *pd)
_efl_canvas_group_animation_efl_object_destructor(Eo *eo_obj,
Efl_Canvas_Group_Animation_Data *pd)
{
Efl_Canvas_Animation *anim;
@ -123,4 +123,4 @@ _efl_canvas_animation_group_efl_object_destructor(Eo *eo_obj,
efl_destructor(efl_super(eo_obj, MY_CLASS));
}
#include "efl_canvas_animation_group.eo.c"
#include "efl_canvas_group_animation.eo.c"

View File

@ -1,15 +1,15 @@
abstract Efl.Canvas.Animation_Group extends Efl.Canvas.Animation
abstract Efl.Canvas.Group_Animation extends Efl.Canvas.Animation
{
[[Base class for combined animations (groups of animations that are played together).
This class provides methods to add, remove and retrieve individual animations from the group.
See for example @Efl.Canvas.Animation_Group_Parallel and @Efl.Canvas.Animation_Group_Sequential.
See for example @Efl.Canvas.Parallel_Group_Animation and @Efl.Canvas.Sequential_Group_Animation.
@since 1.24
]]
c_prefix: efl_animation_group;
data: Efl_Canvas_Animation_Group_Data;
data: Efl_Canvas_Group_Animation_Data;
methods {
animation_add {
[[Adds the given animation to the animation group.]]

View File

@ -0,0 +1,16 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#define MY_CLASS EFL_CANVAS_GROUP_ANIMATION_CLASS
#define MY_CLASS_NAME efl_class_name_get(MY_CLASS)
#define EFL_GROUP_ANIMATION_DATA_GET(o, pd) \
Efl_Canvas_Group_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_GROUP_ANIMATION_CLASS)
typedef struct _Efl_Canvas_Group_Animation_Data
{
Eina_List *animations;
Eina_Bool is_duration_set : 1; //EINA_TRUE if duration is set
} Efl_Canvas_Group_Animation_Data;

View File

@ -1,9 +1,9 @@
#include "efl_canvas_animation_group_parallel_private.h"
#include "efl_canvas_parallel_group_animation_private.h"
#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS
#define MY_CLASS EFL_CANVAS_PARALLEL_GROUP_ANIMATION_CLASS
EOLIAN static double
_efl_canvas_animation_group_parallel_efl_canvas_animation_animation_apply(Eo *eo_obj,
_efl_canvas_parallel_group_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
void *_pd EINA_UNUSED,
double progress,
Efl_Canvas_Object *target)
@ -53,7 +53,7 @@ _efl_canvas_animation_group_parallel_efl_canvas_animation_animation_apply(Eo *eo
}
EOLIAN static double
_efl_canvas_animation_group_parallel_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
_efl_canvas_parallel_group_animation_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
double child_total_duration;
double total_duration = 0.0;
@ -74,4 +74,4 @@ _efl_canvas_animation_group_parallel_efl_canvas_animation_duration_get(const Eo
return total_duration;
}
#include "efl_canvas_animation_group_parallel.eo.c"
#include "efl_canvas_parallel_group_animation.eo.c"

View File

@ -1,4 +1,4 @@
class Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group
class Efl.Canvas.Parallel_Group_Animation extends Efl.Canvas.Group_Animation
{
[[Combined animation which plays its individual animations in parallel
(all of them simultaneously).
@ -6,11 +6,10 @@ class Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group
For instance, this could be used to move an @Efl.Canvas.Object from one position to another
while rotating it along the way.
Use @Efl.Canvas.Animation_Group.animation_add to append individual animations.
Use @Efl.Canvas.Group_Animation.animation_add to append individual animations.
@since 1.24
]]
c_prefix: efl_animation_group_parallel;
data: null;
methods {
}

View File

@ -1,10 +1,10 @@
#include "efl_canvas_animation_rotate_private.h"
#include "efl_canvas_rotate_animation_private.h"
#define MY_CLASS EFL_CANVAS_ANIMATION_ROTATE_CLASS
#define MY_CLASS EFL_CANVAS_ROTATE_ANIMATION_CLASS
EOLIAN static void
_efl_canvas_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Rotate_Data *pd,
_efl_canvas_rotate_animation_rotate_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Rotate_Animation_Data *pd,
double from_degree,
double to_degree,
Efl_Canvas_Object *pivot,
@ -20,8 +20,8 @@ _efl_canvas_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_rotate_rotate_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Rotate_Data *pd,
_efl_canvas_rotate_animation_rotate_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Rotate_Animation_Data *pd,
double *from_degree,
double *to_degree,
Efl_Canvas_Object **pivot,
@ -47,8 +47,8 @@ _efl_canvas_animation_rotate_rotate_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Rotate_Data *pd,
_efl_canvas_rotate_animation_rotate_absolute_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Rotate_Animation_Data *pd,
double from_degree,
double to_degree,
Eina_Position2D abs)
@ -61,8 +61,8 @@ _efl_canvas_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_rotate_rotate_absolute_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Rotate_Data *pd,
_efl_canvas_rotate_animation_rotate_absolute_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Rotate_Animation_Data *pd,
double *from_degree,
double *to_degree,
Eina_Position2D *abs)
@ -84,8 +84,8 @@ _efl_canvas_animation_rotate_rotate_absolute_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static double
_efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Animation_Rotate_Data *pd,
_efl_canvas_rotate_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Rotate_Animation_Data *pd,
double progress,
Efl_Canvas_Object *target)
{
@ -114,8 +114,8 @@ _efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
_efl_canvas_animation_rotate_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Animation_Rotate_Data *pd)
_efl_canvas_rotate_animation_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Rotate_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@ -134,4 +134,4 @@ _efl_canvas_animation_rotate_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
#include "efl_canvas_animation_rotate.eo.c"
#include "efl_canvas_rotate_animation.eo.c"

View File

@ -1,4 +1,6 @@
class Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation
import eina_types;
class Efl.Canvas.Rotate_Animation extends Efl.Canvas.Animation
{
[[Animated rotation effect.
@ -12,7 +14,7 @@ class Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_rotate;
data: Efl_Canvas_Animation_Rotate_Data;
data: Efl_Canvas_Rotate_Animation_Data;
methods {
@property rotate {
[[Degree range to animate and pivot object.

View File

@ -0,0 +1,30 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_ROTATE_ANIMATION_DATA_GET(o, pd) \
Efl_Canvas_Rotate_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ROTATE_ANIMATION_CLASS)
typedef struct _Efl_Canvas_Rotate_Animation_Property
{
double degree;
} Efl_Canvas_Rotate_Animation_Property;
typedef struct _Efl_Canvas_Rotate_Animation_Relative_Pivot
{
Efl_Canvas_Object *obj;
Eina_Vector2 pos;
} Efl_Canvas_Rotate_Animation_Relative_Pivot;
typedef struct _Efl_Canvas_Rotate_Animation_Data
{
Efl_Canvas_Rotate_Animation_Property from;
Efl_Canvas_Rotate_Animation_Property to;
Eina_Position2D abs_pivot;
Efl_Canvas_Rotate_Animation_Relative_Pivot rel_pivot;
Eina_Bool use_rel_pivot;
} Efl_Canvas_Rotate_Animation_Data;

View File

@ -1,10 +1,10 @@
#include "efl_canvas_animation_scale_private.h"
#include "efl_canvas_scale_animation_private.h"
#define MY_CLASS EFL_CANVAS_ANIMATION_SCALE_CLASS
#define MY_CLASS EFL_CANVAS_SCALE_ANIMATION_CLASS
EOLIAN static void
_efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Scale_Data *pd,
_efl_canvas_scale_animation_scale_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 from_scale,
Eina_Vector2 to_scale,
Efl_Canvas_Object *pivot,
@ -21,8 +21,8 @@ _efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_scale_scale_get(const Eo *obj EINA_UNUSED,
Efl_Canvas_Animation_Scale_Data *pd,
_efl_canvas_scale_animation_scale_get(const Eo *obj EINA_UNUSED,
Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 *from_scale, Eina_Vector2 *to_scale,
Efl_Canvas_Object **pivot, Eina_Vector2 *pivot_pos)
{
@ -46,8 +46,8 @@ _efl_canvas_animation_scale_scale_get(const Eo *obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_scale_scale_absolute_set(Eo *obj EINA_UNUSED,
Efl_Canvas_Animation_Scale_Data *pd,
_efl_canvas_scale_animation_scale_absolute_set(Eo *obj EINA_UNUSED,
Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 from_scale, Eina_Vector2 to_scale,
Eina_Position2D pos)
{
@ -61,8 +61,8 @@ _efl_canvas_animation_scale_scale_absolute_set(Eo *obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_scale_scale_absolute_get(const Eo *obj EINA_UNUSED,
Efl_Canvas_Animation_Scale_Data *pd,
_efl_canvas_scale_animation_scale_absolute_get(const Eo *obj EINA_UNUSED,
Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 *from_scale, Eina_Vector2 *to_scale,
Eina_Position2D *pos)
{
@ -83,8 +83,8 @@ _efl_canvas_animation_scale_scale_absolute_get(const Eo *obj EINA_UNUSED,
}
EOLIAN static double
_efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Animation_Scale_Data *pd,
_efl_canvas_scale_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Scale_Animation_Data *pd,
double progress,
Efl_Canvas_Object *target)
{
@ -114,8 +114,8 @@ _efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
_efl_canvas_animation_scale_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Animation_Scale_Data *pd)
_efl_canvas_scale_animation_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Scale_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@ -130,4 +130,4 @@ _efl_canvas_animation_scale_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
#include "efl_canvas_animation_scale.eo.c"
#include "efl_canvas_scale_animation.eo.c"

View File

@ -1,4 +1,6 @@
class Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
import eina_types;
class Efl.Canvas.Scale_Animation extends Efl.Canvas.Animation
{
[[Animated scaling effect.
@ -13,7 +15,7 @@ class Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_scale;
data: Efl_Canvas_Animation_Scale_Data;
data: Efl_Canvas_Scale_Animation_Data;
methods {
@property scale {
[[Scale range and pivot object.

View File

@ -0,0 +1,25 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_SCALE_ANIMATION_DATA_GET(o, pd) \
Efl_Canvas_Scale_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_SCALE_ANIMATION_CLASS)
typedef struct _Efl_Canvas_Scale_Animation_Relative_Pivot
{
Efl_Canvas_Object *obj;
Eina_Vector2 pos;
} Efl_Canvas_Scale_Animation_Relative_Pivot;
typedef struct _Efl_Canvas_Scale_Animation_Data
{
Eina_Vector2 from;
Eina_Vector2 to;
Eina_Position2D pos;
Efl_Canvas_Scale_Animation_Relative_Pivot rel_pivot;
Eina_Bool use_rel_pivot;
} Efl_Canvas_Scale_Animation_Data;

View File

@ -1,9 +1,9 @@
#include "efl_canvas_animation_group_sequential_private.h"
#include "efl_canvas_sequential_group_animation_private.h"
#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS
#define MY_CLASS EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_CLASS
EOLIAN static double
_efl_canvas_animation_group_sequential_efl_canvas_animation_animation_apply(Eo *eo_obj,
_efl_canvas_sequential_group_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
void *_pd EINA_UNUSED,
double progress,
Efl_Canvas_Object *target)
@ -58,7 +58,7 @@ _efl_canvas_animation_group_sequential_efl_canvas_animation_animation_apply(Eo *
}
EOLIAN static double
_efl_canvas_animation_group_sequential_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
_efl_canvas_sequential_group_animation_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
double total_duration = 0.0;
double child_total_duration;
@ -78,4 +78,4 @@ _efl_canvas_animation_group_sequential_efl_canvas_animation_duration_get(const E
return total_duration;
}
#include "efl_canvas_animation_group_sequential.eo.c"
#include "efl_canvas_sequential_group_animation.eo.c"

View File

@ -1,4 +1,4 @@
class Efl.Canvas.Animation_Group_Sequential extends Efl.Canvas.Animation_Group
class Efl.Canvas.Sequential_Group_Animation extends Efl.Canvas.Group_Animation
{
[[Combined animation which plays its individual animations in a sequential order
(one after the other).
@ -6,7 +6,7 @@ class Efl.Canvas.Animation_Group_Sequential extends Efl.Canvas.Animation_Group
For instance, this could be used to move an @Efl.Canvas.Object from one position to another
and then start rotating it once it reaches its destination.
Use @Efl.Canvas.Animation_Group.animation_add to append individual animations.
Use @Efl.Canvas.Group_Animation.animation_add to append individual animations.
Animations are played in the order in which they are added.
@since 1.24

View File

@ -1,6 +1,6 @@
#include "efl_canvas_animation_translate_private.h"
#include "efl_canvas_translate_animation_private.h"
#define MY_CLASS EFL_CANVAS_ANIMATION_TRANSLATE_CLASS
#define MY_CLASS EFL_CANVAS_TRANSLATE_ANIMATION_CLASS
typedef struct __Translate_Property_Double
{
@ -9,8 +9,8 @@ typedef struct __Translate_Property_Double
} _Translate_Property_Double;
EOLIAN static void
_efl_canvas_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Translate_Data *pd,
_efl_canvas_translate_animation_translate_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D from,
Eina_Position2D to)
{
@ -22,8 +22,8 @@ _efl_canvas_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_translate_translate_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Translate_Data *pd,
_efl_canvas_translate_animation_translate_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D *from,
Eina_Position2D *to)
{
@ -41,8 +41,8 @@ _efl_canvas_animation_translate_translate_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Translate_Data *pd,
_efl_canvas_translate_animation_translate_absolute_set(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D from,
Eina_Position2D to)
{
@ -54,8 +54,8 @@ _efl_canvas_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
_efl_canvas_animation_translate_translate_absolute_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Translate_Data *pd,
_efl_canvas_translate_animation_translate_absolute_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D *from,
Eina_Position2D *to)
{
@ -73,8 +73,8 @@ _efl_canvas_animation_translate_translate_absolute_get(const Eo *eo_obj EINA_UNU
}
EOLIAN static double
_efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Animation_Translate_Data *pd,
_efl_canvas_translate_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
Efl_Canvas_Translate_Animation_Data *pd,
double progress,
Efl_Canvas_Object *target)
{
@ -102,8 +102,8 @@ _efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
_efl_canvas_animation_translate_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Animation_Translate_Data *pd)
_efl_canvas_translate_animation_efl_object_constructor(Eo *eo_obj,
Efl_Canvas_Translate_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@ -115,4 +115,4 @@ _efl_canvas_animation_translate_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
#include "efl_canvas_animation_translate.eo.c"
#include "efl_canvas_translate_animation.eo.c"

View File

@ -1,4 +1,6 @@
class Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation
import eina_types;
class Efl.Canvas.Translate_Animation extends Efl.Canvas.Animation
{
[[Animated translation effect.
@ -12,7 +14,7 @@ class Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_translate;
data: Efl_Canvas_Animation_Translate_Data;
data: Efl_Canvas_Translate_Animation_Data;
methods {
@property translate {
[[Translation vector, relative to the starting position of the object.

View File

@ -0,0 +1,16 @@
#define EFL_ANIMATION_PROTECTED
#include "evas_common_private.h"
#include <Ecore.h>
#include "efl_canvas_animation_private.h"
#define EFL_TRANSLATE_ANIMATION_DATA_GET(o, pd) \
Efl_Canvas_Translate_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_TRANSLATE_ANIMATION_CLASS)
typedef struct _Efl_Canvas_Translate_Animation_Data
{
Eina_Position2D from;
Eina_Position2D to;
Eina_Bool use_rel_move;
} Efl_Canvas_Translate_Animation_Data;

View File

@ -32,13 +32,13 @@ pub_eo_files = [
'efl_canvas_pointer.eo',
'efl_canvas_scene.eo',
'efl_canvas_animation.eo',
'efl_canvas_animation_alpha.eo',
'efl_canvas_animation_rotate.eo',
'efl_canvas_animation_scale.eo',
'efl_canvas_animation_translate.eo',
'efl_canvas_animation_group.eo',
'efl_canvas_animation_group_parallel.eo',
'efl_canvas_animation_group_sequential.eo',
'efl_canvas_alpha_animation.eo',
'efl_canvas_rotate_animation.eo',
'efl_canvas_scale_animation.eo',
'efl_canvas_translate_animation.eo',
'efl_canvas_group_animation.eo',
'efl_canvas_parallel_group_animation.eo',
'efl_canvas_sequential_group_animation.eo',
'efl_canvas_textblock_factory.eo',
'efl_canvas_rectangle.eo',
'efl_canvas_object.eo',
@ -179,13 +179,13 @@ evas_src += files([
'efl_input_clickable.c',
'efl_input_device.c',
'efl_canvas_animation.c',
'efl_canvas_animation_alpha.c',
'efl_canvas_animation_rotate.c',
'efl_canvas_animation_scale.c',
'efl_canvas_animation_translate.c',
'efl_canvas_animation_group.c',
'efl_canvas_animation_group_parallel.c',
'efl_canvas_animation_group_sequential.c',
'efl_canvas_alpha_animation.c',
'efl_canvas_rotate_animation.c',
'efl_canvas_scale_animation.c',
'efl_canvas_translate_animation.c',
'efl_canvas_group_animation.c',
'efl_canvas_parallel_group_animation.c',
'efl_canvas_sequential_group_animation.c',
'efl_gfx_vg_value_provider.c',
'efl_canvas_vg_object.c',
'efl_canvas_vg_node.c',

View File

@ -402,15 +402,15 @@ class TestCsharpProperties
obj.Dispose();
}
// public static void test_setter_only()
// {
// var obj = new Dummy.TestObject();
// int val = -1984;
public static void test_setter_only()
{
var obj = new Dummy.TestObject();
int val = -1984;
// obj.SetterOnly = val;
// Test.AssertEquals(val, obj.GetSetterOnly());
// obj.Dispose();
// }
obj.SetterOnly = val;
Test.AssertEquals(val, obj.GetSetterOnly());
obj.Dispose();
}
public static void test_class_property()
{
@ -436,52 +436,6 @@ class TestCsharpProperties
Test.AssertEquals(ret, (1, 2));
obj.Dispose();
}
public static void test_csharp_keyed_multi_valued_prop()
{
var obj = new Dummy.TestObject();
obj.KeyedMultiValuedProp[100] = (1, 2);
Test.AssertEquals(obj.KeyedMultiValuedProp[100], (1, 2));
obj.Dispose();
}
public static void test_csharp_multi_keyed_multi_valued_prop()
{
var obj = new Dummy.TestObject();
obj.MultiKeyedMultiValuedProp[(100, 101)] = (1, 2);
Test.AssertEquals(obj.MultiKeyedMultiValuedProp[(100, 101)], (1, 2));
obj.Dispose();
}
public static void test_csharp_multi_prop()
{
var obj = new Dummy.TestObject();
obj.MultiKeyedMultiValuedProp[(100, 101)] = (1, 2);
obj.KeyedMultiValuedProp[100] = (1, 2);
Test.AssertEquals(obj.KeyedMultiValuedProp[100],
obj.MultiKeyedMultiValuedProp[(100, 101)]);
int a1, b1, a2, b2;
#if __MonoCS__
(int a, int b) t1 = obj.MultiKeyedMultiValuedProp[(100, 101)];
(a1, b1) = (t1.Item1, t1.Item2);
(int a, int b) t2 = obj.KeyedMultiValuedProp[100];
(a2, b2) = (t2.Item1, t2.Item2);
#else
(a1, b1) = obj.MultiKeyedMultiValuedProp[(100, 101)];
(a2, b2) = obj.KeyedMultiValuedProp[100];
#endif
Test.AssertEquals(a1, a2);
Test.AssertEquals(b1, b2);
var i = (100, 101);
var j = 100;
Test.AssertEquals(obj.KeyedMultiValuedProp[j],
obj.MultiKeyedMultiValuedProp[i]);
obj.MultiKeyedMultiValuedProp[i] = (1, 3);
obj.KeyedMultiValuedProp[j] = obj.MultiKeyedMultiValuedProp[i];
Test.AssertEquals(obj.KeyedMultiValuedProp[j],
obj.MultiKeyedMultiValuedProp[i]);
}
}
class TestEoGrandChildrenFinalize

View File

@ -43,12 +43,6 @@ _dummy_event_manager_emitter_set(EINA_UNUSED Eo *obj, Dummy_Event_Manager_Data *
pd->emitter = emitter;
}
static Efl_Object*
_dummy_event_manager_emitter_get(EINA_UNUSED Eo const *obj, Dummy_Event_Manager_Data *pd)
{
return pd->emitter;
}
static Eina_Bool
_dummy_event_manager_emit_with_int(EINA_UNUSED Eo *obj, Dummy_Event_Manager_Data *pd, int data)
{

View File

@ -4,6 +4,8 @@ class Dummy.Event_Manager extends Efl.Object {
methods {
@property emitter {
set {
}
values {
emitter: Efl.Object @move;
}

View File

@ -16,7 +16,6 @@
#define DUMMY_TEST_IFACE_PROTECTED
#include <assert.h>
#include "libefl_mono_native_test.h"
typedef struct Dummy_Test_Object_Data
@ -4613,36 +4612,6 @@ void _dummy_test_object_multi_valued_prop_set(Eo* obj EINA_UNUSED, Dummy_Test_Ob
pd->prop2 = prop2;
}
void _dummy_test_object_keyed_multi_valued_prop_get(Eo const* obj EINA_UNUSED, Dummy_Test_Object_Data* pd, int prop_key1, int* prop1, int* prop2)
{
assert (prop_key1 == 100);
*prop1 = pd->prop1;
*prop2 = pd->prop2;
}
void _dummy_test_object_keyed_multi_valued_prop_set(Eo* obj EINA_UNUSED, Dummy_Test_Object_Data* pd, int prop_key1, int prop1, int prop2)
{
assert (prop_key1 == 100);
pd->prop1 = prop1;
pd->prop2 = prop2;
}
void _dummy_test_object_multi_keyed_multi_valued_prop_get(Eo const* obj EINA_UNUSED, Dummy_Test_Object_Data* pd, int prop_key1, int prop_key2, int* prop1, int* prop2)
{
assert (prop_key1 == 100);
assert (prop_key2 == 101);
*prop1 = pd->prop1;
*prop2 = pd->prop2;
}
void _dummy_test_object_multi_keyed_multi_valued_prop_set(Eo* obj EINA_UNUSED, Dummy_Test_Object_Data* pd, int prop_key1, int prop_key2, int prop1, int prop2)
{
assert (prop_key1 == 100);
assert (prop_key2 == 101);
pd->prop1 = prop1;
pd->prop2 = prop2;
}
/* Class Properties */
static int _dummy_test_object_klass_prop = 0;

View File

@ -1581,31 +1581,6 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface {
}
}
@property keyed_multi_valued_prop {
get {}
set {}
keys {
key1: int;
}
values {
prop1: int;
prop2: int;
}
}
@property multi_keyed_multi_valued_prop {
get {}
set {}
keys {
key1: int;
key2: int;
}
values {
prop1: int;
prop2: int;
}
}
@property klass_prop @static {
get {}
set {}

View File

@ -72,6 +72,45 @@ EFL_START_TEST(text_all_select_all_unselect)
ecore_main_loop_iterate();
ck_assert_int_eq(i_have_selection, 2);
ck_assert_int_eq(i_selection, 1);
/*Partial select, the select all*/
Eo *sel1, *sel2;
i_selection = 0;
efl_text_interactive_selection_cursors_get(txt, &sel1, &sel2);
efl_text_cursor_position_set(sel1, 1);
efl_text_cursor_position_set(sel2, 2);
ck_assert_int_eq(i_selection, 2);
efl_text_interactive_all_select(txt);
ck_assert_int_eq(i_selection, 3);
ck_assert_int_eq(efl_text_cursor_position_get(sel1), 0);
ck_assert_int_eq(efl_text_cursor_position_get(sel2), 5);
Eo *cur1 = efl_ui_textbox_cursor_create(txt);
Eo *cur2 = efl_ui_textbox_cursor_create(txt);
efl_text_cursor_position_set(cur1, 1);
efl_text_cursor_position_set(cur2, 2);
efl_text_interactive_selection_cursors_set(txt, cur1, cur2);
ck_assert_int_eq(i_selection, 4);
efl_text_interactive_selection_cursors_get(txt, &sel1, &sel2);
ck_assert_int_eq(efl_text_cursor_position_get(sel1),1);
ck_assert_int_eq(efl_text_cursor_position_get(sel2),2);
/*Select part then select all*/
efl_text_interactive_all_unselect(txt);
i_have_selection = 0, i_selection = 0;
efl_text_cursor_position_set(cur1, 1);
efl_text_cursor_position_set(cur2, 2);
efl_text_interactive_selection_cursors_set(txt, cur1, cur2);
ck_assert_int_eq(i_selection, 1);
ck_assert_int_eq(i_have_selection, 1);
efl_text_interactive_all_select(txt);
ck_assert_int_eq(i_selection, 2);
ck_assert_int_eq(i_have_selection, 1);
efl_text_interactive_all_unselect(txt);
ck_assert_int_eq(i_have_selection, 2);
efl_del(txt);
efl_del(win);
}