Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2020-01-02 10:45:02 +09:00
commit c9a3d3eb4c
39 changed files with 1176 additions and 730 deletions

View File

@ -311,6 +311,18 @@ option('mono-beta',
description: 'Mono/C# @beta Eo methods enabled in the efl'
)
option('dotnet-stylecop',
type: 'string',
description: 'Dotnet StyleCop checks. Use * for all, or use comma listed: -Ddotnet-stylecop=ca1062,CA1032, sa0001, SA0002, cA2225'
)
option('dotnet-stylecop-severity',
type: 'combo',
choices: ['Warning', 'Error'],
value: 'Warning',
description: 'Dotnet StyleCop checks cause compilation errors or just warnings'
)
option('mono-examples-dir',
type: 'string',
value: '',

View File

@ -161,7 +161,7 @@ elementary_test_src = [
'test_ui_collection_view.c',
'test_ui_items.c',
'test_ui_frame.c',
'test_efl_ui_animation_view.c',
'test_efl_ui_vg_animation.c',
'test_efl_gfx_vg_value_provider.c',
'test.h'
]

View File

@ -407,7 +407,7 @@ void test_efl_ui_collection_view(void *data, Evas_Object *obj, void *event_info)
void test_efl_ui_item(void *data, Evas_Object *obj, void *event_info);
void test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
void test_efl_ui_animation_view(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_vg_animation(void *data, Evas_Object *obj, void *event_info);
void test_efl_gfx_vg_value_provider(void *data, Evas_Object *obj, void *event_info);
static void _list_udpate(void);
@ -1305,7 +1305,7 @@ add_tests:
ADD_TEST_EO(NULL, "Widgets Part", "Part Shadow", test_part_shadow);
//------------------------------//
ADD_TEST_EO(NULL, "Vector Animation", "Animation View", test_efl_ui_animation_view);
ADD_TEST_EO(NULL, "Vector Animation", "Vector Graphics Animation", test_efl_ui_vg_animation);
ADD_TEST_EO(NULL, "Vector Animation", "Value Provider", test_efl_gfx_vg_value_provider);
#undef ADD_TEST

View File

@ -51,7 +51,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
}
efl_ui_animation_view_value_provider_override(anim_view, vp);
efl_ui_vg_animation_value_provider_override(anim_view, vp);
}
if (!strcmp(type, "StrokeWidth"))
{
@ -61,7 +61,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
char* v = (char*)efl_text_get(values[0]);
if (v) width = strtod(v, NULL);
efl_gfx_vg_value_provider_stroke_width_set(vp, width);
efl_ui_animation_view_value_provider_override(anim_view, vp);
efl_ui_vg_animation_value_provider_override(anim_view, vp);
evas_object_show(anim_view);
sprintf(new_path, "%s", path);
sprintf(new_type, "StrokeWidth");
@ -78,15 +78,23 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
if (!text) return;
if (!strcmp("Play", text))
efl_ui_animation_view_play((Evas_Object*)data);
{
double speed = efl_player_playback_speed_get(anim_view);
efl_player_playback_speed_set(anim_view, speed < 0 ? speed * -1 : speed);
efl_player_playing_set(anim_view, EINA_TRUE);
}
else if (!strcmp("Pause", text))
efl_ui_animation_view_pause((Evas_Object*)data);
efl_player_paused_set((Evas_Object*)data, EINA_TRUE);
else if (!strcmp("Resume", text))
efl_ui_animation_view_resume((Evas_Object*)data);
else if (!strcmp("Play Back", text))
efl_ui_animation_view_play_back((Evas_Object*)data);
efl_player_paused_set((Evas_Object*)data, EINA_FALSE);
else if (!strcmp("Play Backwards", text))
{
double speed = efl_player_playback_speed_get(anim_view);
efl_player_playback_speed_set(anim_view, speed > 0 ? speed * -1 : speed);
efl_player_playing_set(anim_view, EINA_TRUE);
}
else if (!strcmp("Stop", text))
efl_ui_animation_view_stop((Evas_Object*)data);
efl_player_playing_set((Evas_Object*)data, EINA_FALSE);
else if (!strcmp("ADD", text))
{
Evas_Object *list = (Evas_Object*)data;
@ -96,7 +104,7 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
{
char buf[255];
//TODO: Even if there is the same path as the existing item, it is added without updating.
// In efl_ui_animation_view, duplicate paths are managed.
// In efl_ui_vg_animation, duplicate paths are managed.
// However, animator (lottie) does not have an implementation that manages overridden values.
/*Eina_List *items = (Eina_List*)elm_list_items_get(list);
Eina_List *l;
@ -145,7 +153,7 @@ static void
check_changed_cb(void *data, const Efl_Event *event)
{
Evas_Object *anim_view = data;
efl_ui_animation_view_auto_repeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
efl_ui_vg_animation_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
}
static void
@ -154,25 +162,25 @@ speed_changed_cb(void *data, const Efl_Event *event)
Evas_Object *anim_view = data;
double speed = 1;
if (efl_ui_selectable_selected_get(event->object)) speed = 0.25;
efl_ui_animation_view_speed_set(anim_view, speed);
efl_player_playback_speed_set(anim_view, speed);
}
static void
limit_frame_cb(void *data, const Efl_Event *event)
{
Evas_Object *anim_view = data;
int frame_count = efl_ui_animation_view_frame_count_get(anim_view);
int frame_count = efl_ui_vg_animation_frame_count_get(anim_view);
printf("Total Frame Count : %d\n", frame_count);
if (efl_ui_selectable_selected_get(event->object))
{
efl_ui_animation_view_min_frame_set(anim_view, 5);
efl_ui_animation_view_max_frame_set(anim_view, 10);
efl_ui_vg_animation_min_frame_set(anim_view, 5);
efl_ui_vg_animation_max_frame_set(anim_view, 10);
printf("Frames to show 5-10 only\n");
}
else
{
efl_ui_animation_view_min_frame_set(anim_view, 0);
efl_ui_animation_view_max_frame_set(anim_view, frame_count);
efl_ui_vg_animation_min_frame_set(anim_view, 0);
efl_ui_vg_animation_max_frame_set(anim_view, frame_count);
printf("Showing all frames now\n");
}
}
@ -180,23 +188,24 @@ limit_frame_cb(void *data, const Efl_Event *event)
static void
update_anim_view_state(Evas_Object *anim_view, Evas_Object *label)
{
Efl_Ui_Animation_View_State state = efl_ui_animation_view_state_get(anim_view);
Efl_Ui_Vg_Animation_State state = efl_ui_vg_animation_state_get(anim_view);
switch (state)
{
case EFL_UI_ANIMATION_VIEW_STATE_NOT_READY:
case EFL_UI_VG_ANIMATION_STATE_NOT_READY:
efl_text_set(label, "State = Not Ready");
break;
case EFL_UI_ANIMATION_VIEW_STATE_PLAY:
case EFL_UI_VG_ANIMATION_STATE_PLAYING:
efl_text_set(label, "State = Playing");
break;
case EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK:
efl_text_set(label, "State = Playing Back");
case EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS:
efl_text_set(label, "State = Playing Backwards");
break;
case EFL_UI_ANIMATION_VIEW_STATE_PAUSE:
case EFL_UI_VG_ANIMATION_STATE_PAUSED:
efl_text_set(label, "State = Paused");
break;
case EFL_UI_ANIMATION_VIEW_STATE_STOP:
case EFL_UI_VG_ANIMATION_STATE_STOPPED:
efl_text_set(label, "State = Stopped");
break;
}
@ -206,7 +215,7 @@ static void
_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED)
{
Evas_Object *slider = data;
efl_ui_range_value_set(slider, efl_ui_animation_view_progress_get(obj));
efl_ui_range_value_set(slider, efl_player_playback_progress_get(obj));
}
static void
@ -232,7 +241,7 @@ static void
_slider_changed_cb(void *data, const Efl_Event *ev)
{
Evas_Object *anim_view = data;
efl_ui_animation_view_progress_set(anim_view, efl_ui_range_value_get(ev->object));
efl_player_playback_progress_set(anim_view, efl_ui_range_value_get(ev->object));
}
static void
@ -301,7 +310,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// Create a box in Canvas
@ -317,7 +326,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
//Create Animation View to play animation directly from JSON file
snprintf(buf, sizeof(buf), "%s/images/three_box.json", elm_app_data_dir_get());
anim_view = efl_add(EFL_UI_ANIMATION_VIEW_CLASS, win,
anim_view = efl_add(EFL_UI_VG_ANIMATION_CLASS, win,
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)),
@ -478,7 +487,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
//Duration Text
snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_animation_view_duration_time_get(anim_view));
snprintf(buf, sizeof(buf), "Duration(Length): %1.2fs", efl_playable_length_get(anim_view));
efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
@ -514,7 +523,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
efl_add(EFL_UI_BUTTON_CLASS, box_sub,
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
efl_text_set(efl_added, "Play Back"),
efl_text_set(efl_added, "Play Backwards"),
efl_pack(box_sub, efl_added),
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, btn_clicked_cb, anim_view));
@ -575,7 +584,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// Create a box

View File

@ -234,7 +234,6 @@ test_efl_ui_text_inputfield(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED
efl_text_multiline_set(en, EINA_TRUE);
efl_ui_textbox_scrollable_set(en, EINA_TRUE);
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.5);
efl_pack(bx, en);
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 200));

View File

@ -23,22 +23,30 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
if (!text) return;
if (!strcmp("Play", text))
efl_ui_animation_view_play(anim_view);
{
double speed = efl_player_playback_speed_get(anim_view);
efl_player_playback_speed_set(anim_view, speed < 0 ? speed * -1 : speed);
efl_player_playing_set(anim_view, EINA_TRUE);
}
else if (!strcmp("Pause", text))
efl_ui_animation_view_pause(anim_view);
efl_player_paused_set(anim_view, EINA_TRUE);
else if (!strcmp("Resume", text))
efl_ui_animation_view_resume(anim_view);
else if (!strcmp("Play Back", text))
efl_ui_animation_view_play_back(anim_view);
efl_player_paused_set(anim_view, EINA_FALSE);
else if (!strcmp("Play Backwards", text))
{
double speed = efl_player_playback_speed_get(anim_view);
efl_player_playback_speed_set(anim_view, speed > 0 ? speed * -1 : speed);
efl_player_playing_set(anim_view, EINA_TRUE);
}
else if (!strcmp("Stop", text))
efl_ui_animation_view_stop(anim_view);
efl_player_playing_set(anim_view, EINA_FALSE);
}
static void
check_changed_cb(void *data, const Efl_Event *event)
{
Evas_Object *anim_view = data;
efl_ui_animation_view_auto_repeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
efl_ui_vg_animation_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
}
static void
@ -47,25 +55,25 @@ speed_changed_cb(void *data, const Efl_Event *event)
Evas_Object *anim_view = data;
double speed = 1;
if (efl_ui_selectable_selected_get(event->object)) speed = 0.25;
efl_ui_animation_view_speed_set(anim_view, speed);
efl_player_playback_speed_set(anim_view, speed);
}
static void
limit_frame_cb(void *data, const Efl_Event *event)
{
Evas_Object *anim_view = data;
int frame_count = efl_ui_animation_view_frame_count_get(anim_view);
int frame_count = efl_ui_vg_animation_frame_count_get(anim_view);
printf("Total Frame Count : %d\n", frame_count);
if (efl_ui_selectable_selected_get(event->object))
{
efl_ui_animation_view_min_frame_set(anim_view, 5);
efl_ui_animation_view_max_frame_set(anim_view, 10);
efl_ui_vg_animation_min_frame_set(anim_view, 5);
efl_ui_vg_animation_max_frame_set(anim_view, 10);
printf("Frames to show 5-10 only\n");
}
else
{
efl_ui_animation_view_min_frame_set(anim_view, 0);
efl_ui_animation_view_max_frame_set(anim_view, frame_count);
efl_ui_vg_animation_min_frame_set(anim_view, 0);
efl_ui_vg_animation_max_frame_set(anim_view, frame_count);
printf("Showing all frames now\n");
}
}
@ -73,23 +81,23 @@ limit_frame_cb(void *data, const Efl_Event *event)
static void
update_anim_view_state(Evas_Object *anim_view, Evas_Object *label)
{
Efl_Ui_Animation_View_State state = efl_ui_animation_view_state_get(anim_view);
Efl_Ui_Vg_Animation_State state = efl_ui_vg_animation_state_get(anim_view);
switch (state)
{
case EFL_UI_ANIMATION_VIEW_STATE_NOT_READY:
case EFL_UI_VG_ANIMATION_STATE_NOT_READY:
efl_text_set(label, "State = Not Ready");
break;
case EFL_UI_ANIMATION_VIEW_STATE_PLAY:
case EFL_UI_VG_ANIMATION_STATE_PLAYING:
efl_text_set(label, "State = Playing");
break;
case EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK:
efl_text_set(label, "State = Playing Back");
case EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS:
efl_text_set(label, "State = Playing Backwards");
break;
case EFL_UI_ANIMATION_VIEW_STATE_PAUSE:
case EFL_UI_VG_ANIMATION_STATE_PAUSED:
efl_text_set(label, "State = Paused");
break;
case EFL_UI_ANIMATION_VIEW_STATE_STOP:
case EFL_UI_VG_ANIMATION_STATE_STOPPED:
efl_text_set(label, "State = Stopped");
break;
}
@ -99,7 +107,7 @@ static void
_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED)
{
Evas_Object *slider = data;
efl_ui_range_value_set(slider, efl_ui_animation_view_progress_get(obj));
efl_ui_range_value_set(slider, efl_player_playback_progress_get(obj));
}
static void
@ -125,7 +133,7 @@ static void
_slider_changed_cb(void *data, const Efl_Event *ev)
{
Evas_Object *anim_view = data;
efl_ui_animation_view_progress_set(anim_view, efl_ui_range_value_get(ev->object));
efl_player_playback_progress_set(anim_view, efl_ui_range_value_get(ev->object));
}
static void
@ -136,13 +144,13 @@ _slider_reset(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
}
void
test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
test_efl_ui_vg_animation(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Eo *win, *box, *box2, *box3, *box4, *label, *anim_view, *check, *slider;
char buf[255];
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// Create a box in Canvas
@ -158,7 +166,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
//Create Animation View to play animation directly from JSON file
snprintf(buf, sizeof(buf), "%s/images/emoji_wink.json", elm_app_data_dir_get());
anim_view = efl_add(EFL_UI_ANIMATION_VIEW_CLASS, win,
anim_view = efl_add(EFL_UI_VG_ANIMATION_CLASS, win,
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)),
@ -200,7 +208,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
//Duration Text
snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_animation_view_duration_time_get(anim_view));
snprintf(buf, sizeof(buf), "Duration(Length): %1.2fs", efl_playable_length_get(anim_view));
efl_add(EFL_UI_TEXTBOX_CLASS, box2,
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
@ -236,7 +244,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
efl_add(EFL_UI_BUTTON_CLASS, box3,
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
efl_text_set(efl_added, "Play Back"),
efl_text_set(efl_added, "Play Backwards"),
efl_pack(box3, efl_added),
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, btn_clicked_cb, anim_view));
@ -290,13 +298,13 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
#else
void
test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
test_efl_ui_vg_animation(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Eo *win, *box;
char buf[255];
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_text_set(efl_added, "Efl_Ui_Animation_View demo"),
efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// Create a box

View File

@ -0,0 +1,334 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="CustomRulset" Description="Custom Rulset" ToolsVersion="14.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<!-- Do not declare static members on Generic Types -->
@CA1000@
<!-- Consider making Raise an event -->
@CA1030@
<!-- Catch generic exception -->
@CA1031@
<!-- Add extra exception constructors -->
@CA1032@
<!-- Do not nest NativeTypes -->
@CA1034@
<!-- IComparable must implement other comparison operators -->
@CA1036@
<!-- Avoid empty interface -->
@CA1040@
<!-- Use Integral Or String Argument For Indexers -->
@CA1043@
<!-- Consider making property with getter -->
@CA1044@
<!-- Visible instance fields -->
@CA1051@
<!-- Static holder can be static -->
@CA1052@
<!-- Using parameters before checking for null -->
@CA1062@
<!-- Remove IDisposable as Object already has it -->
@CA1063@
<!-- Exceptions must be public -->
@CA1064@
<!-- Do not raise exception in unexpected locations -->
@CA1065@
<!-- String localization -->
@CA1303@
<!-- Specify IFormatProvider -->
@CA1305@
<!-- Specify Stringcomparison -->
@CA1307@
<!-- PInvoke should not be visible -->
@CA1401@
<!-- Use nameof -->
@CA1507@
<!-- Parameter underscore -->
@CA1707@
<!-- Attribute classes must have the Attribute Suffix -->
@CA1710@
<!-- Replace generic parameter with T -->
@CA1715@
<!-- Parameter End conflicts with VB -->
@CA1716@
<!-- Enum field must be plural -->
@CA1717@
<!-- Variable has type name -->
@CA1720@
<!-- Property with same name as getter -->
@CA1721@
<!-- Type name must not match namespace -->
@CA1724@
<!-- Unused parameter. Lots of warnings regarding Dispose(disposing) -->
@CA1801@
<!-- Do not ignore function result -->
@CA1806@
<!-- Remove static constructors -->
@CA1810@
<!-- Realized classes are never instantiated -->
@CA1812@
<!-- Override equal and operator equal on Value Types-->
@CA1815@
<!-- Dispose must call SuppressFinalizers -->
@CA1816@
<!-- Member can be static -->
@CA1822@
<!-- Consider zero length array allocation -->
@CA1825@
<!-- Count() is used where Any() could be used instead to improve performance -->
@CA1827@
<!-- Use Count instead of Count() -->
@CA1829@
<!-- Call dispose before going out of scope -->
@CA2000@
<!-- Call ConfigureWait-->
@CA2007@
<!-- PInvoke should specify string marshalling -->
@CA2101@
<!-- Rethrow loses stack info -->
@CA2200@
<!-- Declare static fields when they are declared and remove static constructor -->
@CA2207@
<!-- Instantiate exception params correctly -->
@CA2208@
<!-- Dot not call overrideable methods in constructors -->
@CA2214@
<!-- Replace implicit operator -->
@CA2225@
<!-- Change 'XXXXX' to be read-only by removing the property setter -->
@CA2227@
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<!-- Ignore docs -->
@SA0001@
<!-- 10** Spacing rules -->
@SA1000@
@SA1001@
@SA1002@
@SA1003@
<!-- Documentation must start with single space -->
@SA1004@
@SA1005@
@SA1006@
@SA1007@
@SA1008@
@SA1009@
@SA1010@
@SA1011@
@SA1012@
@SA1013@
@SA1014@
@SA1015@
@SA1016@
@SA1017@
@SA1018@
@SA1019@
@SA1020@
@SA1021@
@SA1022@
@SA1023@
@SA1024@
@SA1025@
@SA1026@
@SA1027@
@SA1028@
<!-- Readability -->
@SA1100@
@SA1101@
@SA1102@
@SA1103@
@SA1104@
@SA1105@
@SA1106@
@SA1107@
@SA1108@
@SA1109@
@SA1110@
@SA1111@
@SA1112@
@SA1113@
@SA1114@
@SA1115@
@SA1116@
@SA1117@
@SA1118@
@SA1119@
@SA1120@
@SA1121@
@SA1122@
@SA1123@
@SA1124@
@SA1125@
@SA1126@
@SA1127@
@SA1128@
@SA1129@
@SA1130@
@SA1131@
@SA1132@
@SA1133@
@SA1134@
@SA1135@
@SA1136@
@SA1137@
@SA1138@
@SA1139@
<!-- 12** Ordering -->
<!-- FIXME Check if this somehow affects docfx output -->
@SA1200@
@SA1201@
@SA1202@
@SA1203@
@SA1204@
@SA1205@
@SA1206@
@SA1207@
@SA1208@
@SA1209@
@SA1210@
@SA1211@
@SA1212@
@SA1213@
@SA1214@
@SA1215@
@SA1216@
@SA1217@
<!-- 13** Naming Rules -->
<!-- Element start with upper case -->
@SA1300@
@SA1301@
<!-- Interface start with I -->
@SA1302@
<!-- Upper/lower score rules -->
@SA1303@
@SA1304@
@SA1305@
@SA1306@
@SA1307@
<!-- Variable field prefixes -->
@SA1308@
@SA1309@
@SA1310@
@SA1311@
@SA1312@
@SA1313@
@SA1314@
<!-- 14** Maintainability -->
<!-- Access modifier -->
@SA1400@
<!-- Field must be private -->
@SA1401@
<!-- File Must contain single class or namespace -->
@SA1402@
@SA1403@
<!-- CodeAnalysis suppress does not have justification -->
@SA1404@
<!-- Debug.Assert/Fail must provide a message -->
@SA1405@
@SA1406@
<!-- Arithmetic/Conditional expression must declare precedence -->
@SA1407@
@SA1408@
<!-- Remove unecessary code -->
@SA1409@
<!-- Delegate/Attribute parentheses -->
@SA1410@
@SA1411@
<!-- Utf8 file -->
@SA1412@
<!-- Trailing commas multiline initializer -->
@SA1413@
<!-- 15** Layout Rules -->
@SA1500@
@SA1501@
@SA1502@
@SA1503@
@SA1504@
@SA1505@
@SA1506@
@SA1507@
@SA1508@
@SA1509@
@SA1510@
@SA1511@
@SA1512@
@SA1513@
@SA1514@
@SA1515@
@SA1516@
@SA1517@
@SA1518@
@SA1519@
@SA1520@
<!-- 16** Documentation rules -->
<!-- Things must be documented -->
@SA1600@
@SA1601@
@SA1602@
<!-- Valid xml in docs -->
@SA1603@
@SA1604@
@SA1605@
@SA1606@
@SA1607@
@SA1608@
@SA1609@
@SA1610@
@SA1611@
@SA1612@
@SA1613@
@SA1614@
@SA1615@
@SA1616@
@SA1617@
@SA1618@
@SA1619@
@SA1620@
@SA1621@
@SA1622@
@SA1623@
@SA1624@
@SA1625@
@SA1626@
@SA1627@
@SA1628@
@SA1629@
@SA1630@
@SA1631@
@SA1632@
<!-- File headers -->
@SA1633@
@SA1634@
@SA1635@
@SA1636@
@SA1637@
@SA1638@
@SA1639@
@SA1640@
@SA1641@
<!-- Constructor/Destructor -->
@SA1642@
@SA1643@
<!-- File header -->
@SA1644@
<!-- Miscellaneous doc -->
@SA1645@
@SA1646@
@SA1647@
@SA1648@
<!-- Filename must match file type -->
@SA1649@
<!-- Spelling -->
@SA1650@
<!-- Placeholder -->
@SA1651@
</Rules>
</RuleSet>

View File

@ -12,11 +12,6 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup>
<DocumentationFile>$(AssemblyName).xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- <PropertyGroup Condition="'$(BuildType)'=='Beta'"> -->
<!-- <DefineConstants>EFL_BETA</DefineConstants> -->
<!-- </PropertyGroup> -->
@ -41,4 +36,13 @@
<Compile Include="./*.cs" />
</ItemGroup>
<!-- Code style configuration -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.6" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>@CA_RULESET@</CodeAnalysisRuleSet>
</PropertyGroup>
</Project>

View File

@ -124,8 +124,9 @@ efl_mono_conf_data.set('ELDBUS', eldbus_lib.full_path())
efl_mono_conf_data.set('ELEMENTARY', elementary_lib.full_path())
efl_mono_dll_config = configure_file(input : 'efl_mono.dll.config.in',
output : 'efl_mono.dll.config',
configuration : efl_mono_conf_data)
output : 'efl_mono.dll.config',
configuration : efl_mono_conf_data)
extra_cs_args = runtime_assemblies
@ -137,8 +138,69 @@ efl_mono_install_dir = join_paths(dir_lib, 'efl-mono-'+version_major)
efl_mono_xml_doc = join_paths(meson.current_build_dir(), 'efl_mono.xml')
if (get_option('dotnet'))
styles = ['CA1000', 'CA1030', 'CA1031', 'CA1032', 'CA1034', 'CA1036', 'CA1040',
'CA1043', 'CA1044', 'CA1051', 'CA1052', 'CA1062', 'CA1063', 'CA1064',
'CA1065', 'CA1303', 'CA1305', 'CA1307', 'CA1401', 'CA1507', 'CA1707',
'CA1710', 'CA1715', 'CA1716', 'CA1717', 'CA1720', 'CA1721', 'CA1724',
'CA1801', 'CA1806', 'CA1810', 'CA1812', 'CA1815', 'CA1816', 'CA1822',
'CA1825', 'CA1827', 'CA1829', 'CA2000', 'CA2007', 'CA2101', 'CA2200',
'CA2207', 'CA2208', 'CA2214', 'CA2225', 'CA2227', 'SA0001', 'SA1000',
'SA1001', 'SA1002', 'SA1003', 'SA1004', 'SA1005',
'SA1006', 'SA1007', 'SA1008', 'SA1009', 'SA1010', 'SA1011', 'SA1012',
'SA1013', 'SA1014', 'SA1015', 'SA1016', 'SA1017', 'SA1018', 'SA1019',
'SA1020', 'SA1021', 'SA1022', 'SA1023', 'SA1024', 'SA1025', 'SA1026',
'SA1027', 'SA1028', 'SA1100', 'SA1101', 'SA1102', 'SA1103', 'SA1104',
'SA1105', 'SA1106', 'SA1107', 'SA1108', 'SA1109', 'SA1110', 'SA1111',
'SA1112', 'SA1113', 'SA1114', 'SA1115', 'SA1116', 'SA1117', 'SA1118',
'SA1119', 'SA1120', 'SA1121', 'SA1122', 'SA1123', 'SA1124', 'SA1125',
'SA1126', 'SA1127', 'SA1128', 'SA1129', 'SA1130', 'SA1131', 'SA1132',
'SA1133', 'SA1134', 'SA1135', 'SA1136', 'SA1137', 'SA1138', 'SA1139',
'SA1200', 'SA1201', 'SA1202', 'SA1203', 'SA1204', 'SA1205', 'SA1206',
'SA1207', 'SA1208', 'SA1209', 'SA1210', 'SA1211', 'SA1212', 'SA1213',
'SA1214', 'SA1215', 'SA1216', 'SA1217', 'SA1300', 'SA1301', 'SA1302',
'SA1303', 'SA1304', 'SA1305', 'SA1306', 'SA1307', 'SA1308', 'SA1309',
'SA1310', 'SA1311', 'SA1312', 'SA1313', 'SA1314', 'SA1400', 'SA1401',
'SA1402', 'SA1403', 'SA1404', 'SA1405', 'SA1406', 'SA1407', 'SA1408',
'SA1409', 'SA1410', 'SA1411', 'SA1412', 'SA1413', 'SA1500', 'SA1501',
'SA1502', 'SA1503', 'SA1504', 'SA1505', 'SA1506', 'SA1507', 'SA1508',
'SA1509', 'SA1510', 'SA1511', 'SA1512', 'SA1513', 'SA1514', 'SA1515',
'SA1516', 'SA1517', 'SA1518', 'SA1519', 'SA1520', 'SA1600', 'SA1601',
'SA1602', 'SA1603', 'SA1604', 'SA1605', 'SA1606', 'SA1607', 'SA1608',
'SA1609', 'SA1610', 'SA1611', 'SA1612', 'SA1613', 'SA1614', 'SA1615',
'SA1616', 'SA1617', 'SA1618', 'SA1619', 'SA1620', 'SA1621', 'SA1622',
'SA1623', 'SA1624', 'SA1625', 'SA1626', 'SA1627', 'SA1628', 'SA1629',
'SA1630', 'SA1631', 'SA1632', 'SA1633', 'SA1634', 'SA1635', 'SA1636',
'SA1637', 'SA1638', 'SA1639', 'SA1640', 'SA1641', 'SA1642', 'SA1643',
'SA1644', 'SA1645', 'SA1646', 'SA1647', 'SA1648', 'SA1649', 'SA1650',
'SA1651']
efl_stylecop_data = configuration_data()
watched_styles = []
severity_styles = get_option('dotnet-stylecop-severity')
if get_option('dotnet-stylecop') == '*'
watched_styles = styles
elif get_option('dotnet-stylecop') != ''
s = get_option('dotnet-stylecop').to_upper().split(',')
foreach cc : s
if cc.startswith('CA') or cc.startswith('SA')
watched_styles += cc
endif
endforeach
endif
foreach s : styles
if s in watched_styles
efl_stylecop_data.set('@0@'.format(s), '<Rule Id="@0@" Action="@1@"/>'.format(s, severity_styles))
else
efl_stylecop_data.set('@0@'.format(s), '<Rule Id="@0@" Action="None"/>'.format(s))
endif
endforeach
ca_ruleset = configure_file(input : 'ca.ruleset.in',
output : 'ca.ruleset',
configuration : efl_stylecop_data)
dotnet = find_program('dotnet')
warning('Dotnet support is still experimental.')
lib_csproj_conf_data = configuration_data()
@ -160,6 +222,7 @@ if (get_option('dotnet'))
lib_csproj_conf_data.set('NETSTANDARD_VERSION', dotnet_standard_version)
lib_csproj_conf_data.set('BINDING_SRC', meson.current_source_dir())
lib_csproj_conf_data.set('CA_RULESET', join_paths(meson.build_root(), '@0@'.format(ca_ruleset)))
lib_csproj_conf_data.set('EFL_VERSION', meson.project_version())
if get_option('mono-beta')
@ -173,7 +236,7 @@ if (get_option('dotnet'))
configuration: lib_csproj_conf_data)
efl_mono = custom_target('efl_mono',
input: mono_generator_target + mono_files + [efl_src] + [lib_csproj],
input: mono_generator_target + mono_files + [efl_src] + [lib_csproj] + [ca_ruleset],
output: 'efl_sharp.dll',
build_by_default: true,
command: [dotnet,

View File

@ -67,9 +67,11 @@ interface Efl.Player
@property playback_progress {
[[How much of the file has been played.
This function gets the progress in playing the file, the
return value is in the [0, 1] range.
This function sets or gets the progress in playing the file, the
value is in the [0, 1] range.
]]
set {
}
get {
}
values {

View File

@ -229,7 +229,7 @@ typedef void (*Context_Item_Clicked_Cb)(void *data, Eo *obj, void *event_info);
# include <efl_ui_textbox.eo.h>
# include <efl_ui_textbox_async.eo.h>
# include <efl_ui_animation_view.eo.h>
# include <efl_ui_vg_animation.eo.h>
# include <efl_ui_clock.eo.h>
# include <efl_ui_video.eo.h>

View File

@ -193,7 +193,7 @@ EAPI extern Elm_Version *elm_version;
#include <elm_cache.h>
#include <elm_calendar.h>
/* this is elm_animation_view */
#include <efl_ui_animation_view.h>
#include <efl_ui_vg_animation.h>
#include <elm_check.h>
#include <elm_clock.h>
#include <elm_cnp.h>

View File

@ -1,162 +0,0 @@
EAPI void
elm_animation_view_auto_play_set(Efl_Ui_Animation_View *obj, Eina_Bool auto_play)
{
efl_ui_animation_view_auto_play_set(obj, auto_play);
}
EAPI Eina_Bool
elm_animation_view_auto_play_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_auto_play_get(obj);
}
EAPI void
elm_animation_view_auto_repeat_set(Efl_Ui_Animation_View *obj, Eina_Bool auto_repeat)
{
efl_ui_animation_view_auto_repeat_set(obj, auto_repeat);
}
EAPI Eina_Bool
elm_animation_view_auto_repeat_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_auto_repeat_get(obj);
}
EAPI Eina_Bool
elm_animation_view_speed_set(Efl_Ui_Animation_View *obj, double speed)
{
return efl_ui_animation_view_speed_set(obj, speed);
}
EAPI double
elm_animation_view_speed_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_speed_get(obj);
}
EAPI double
elm_animation_view_duration_time_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_duration_time_get(obj);
}
EAPI void
elm_animation_view_progress_set(Efl_Ui_Animation_View *obj, double progress)
{
efl_ui_animation_view_progress_set(obj, progress);
}
EAPI double
elm_animation_view_progress_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_progress_get(obj);
}
EAPI void
elm_animation_view_frame_set(Efl_Ui_Animation_View *obj, int frame_num)
{
efl_ui_animation_view_frame_set(obj, frame_num);
}
EAPI int
elm_animation_view_frame_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_frame_get(obj);
}
EAPI Eina_Bool
elm_animation_view_play(Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_play(obj);
}
EAPI Eina_Bool
elm_animation_view_play_back(Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_play_back(obj);
}
EAPI Eina_Bool
elm_animation_view_pause(Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_pause(obj);
}
EAPI Eina_Bool
elm_animation_view_resume(Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_resume(obj);
}
EAPI Eina_Bool
elm_animation_view_stop(Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_stop(obj);
}
EAPI Eina_Size2D
elm_animation_view_default_size_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_default_view_size_get(obj);
}
EAPI Eina_Bool
elm_animation_view_is_playing_back(Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_is_playing_back(obj);
}
EAPI int
elm_animation_view_frame_count_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_frame_count_get(obj);
}
EAPI void
elm_animation_view_min_progress_set(Efl_Ui_Animation_View *obj, double min_progress)
{
efl_ui_animation_view_min_progress_set(obj, min_progress);
}
EAPI double
elm_animation_view_min_progress_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_min_progress_get(obj);
}
EAPI void
elm_animation_view_max_progress_set(Efl_Ui_Animation_View *obj, double max_progress)
{
efl_ui_animation_view_max_progress_set(obj, max_progress);
}
EAPI double
elm_animation_view_max_progress_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_max_progress_get(obj);
}
EAPI void
elm_animation_view_min_frame_set(Efl_Ui_Animation_View *obj, int min_frame)
{
efl_ui_animation_view_min_frame_set(obj, min_frame);
}
EAPI int
elm_animation_view_min_frame_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_min_frame_get(obj);
}
EAPI void
elm_animation_view_max_frame_set(Efl_Ui_Animation_View *obj, int max_frame)
{
efl_ui_animation_view_max_frame_set(obj, max_frame);
}
EAPI int
elm_animation_view_max_frame_get(const Efl_Ui_Animation_View *obj)
{
return efl_ui_animation_view_max_frame_get(obj);
}

View File

@ -1,9 +0,0 @@
class @beta Efl.Ui.Animation_View_Part extends Efl.Ui.Widget_Part implements Efl.Content
{
[[Efl UI Animation_View internal part class]]
data: null;
implements {
Efl.Content.content { set; get; }
Efl.Content.content_unset;
}
}

View File

@ -1,43 +0,0 @@
#ifndef EFL_UI_ANIMATION_VIEW_PRIVATE_H
#define EFL_UI_ANIMATION_VIEW_PRIVATE_H
#include "Elementary.h"
#include "efl_ui_animation_view.eo.h"
typedef struct _Efl_Ui_Animation_View_Data Efl_Ui_Animation_View_Data;
struct _Efl_Ui_Animation_View_Data
{
Eo* vg; //Evas_Object_Vg
Efl_Ui_Animation_View_State state;
Elm_Transit *transit;
Eina_Stringshare *file;
double speed;
double progress;
double frame_cnt;
int repeat_times;
double frame_duration;
double min_progress;
double max_progress;
Eina_List *subs;
Eina_List *vp_list;
Eina_Bool play_back : 1;
Eina_Bool auto_play : 1;
Eina_Bool auto_play_pause: 1;
Eina_Bool auto_repeat : 1;
};
#define EFL_UI_ANIMATION_VIEW_DATA_GET(o, sd) \
Efl_Ui_Animation_View_Data * sd = efl_data_scope_safe_get(o, EFL_UI_ANIMATION_VIEW_CLASS)
#define EFL_UI_ANIMATION_VIEW_DATA_GET_OR_RETURN(o, ptr) \
EFL_UI_ANIMATION_VIEW_DATA_GET(o, ptr); \
if (EINA_UNLIKELY(!ptr)) \
{ \
ERR("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
return; \
}
#endif

View File

@ -18,7 +18,7 @@
Efl_Time t = efl_datetime_manager_value_get(pd->dt_manager); \
pd->cur_date[DATEPICKER_YEAR] = t.tm_year + 1900; \
pd->cur_date[DATEPICKER_MONTH] = t.tm_mon + 1; \
pd->cur_date[DATEPICKER_DAY] = t.tm_mday + 1; \
pd->cur_date[DATEPICKER_DAY] = t.tm_mday; \
} while (0)
#define DATE_SET() \
@ -26,7 +26,7 @@
Efl_Time t = { 0 }; \
t.tm_year = pd->cur_date[DATEPICKER_YEAR] - 1900; \
t.tm_mon = pd->cur_date[DATEPICKER_MONTH] - 1; \
t.tm_mday = pd->cur_date[DATEPICKER_DAY] - 1; \
t.tm_mday = pd->cur_date[DATEPICKER_DAY]; \
t.tm_sec = 0; \
efl_datetime_manager_value_set(pd->dt_manager, t); \
} while (0)

View File

@ -1753,7 +1753,7 @@ _efl_ui_image_animated_set_internal(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool an
if (anim)
{
sd->frame_count = evas_object_image_animated_frame_count_get(sd->img);
sd->cur_frame = 1;
sd->cur_frame = 0;
sd->frame_duration =
evas_object_image_animated_frame_duration_get
(sd->img, sd->cur_frame, 0);
@ -1859,11 +1859,23 @@ _efl_ui_image_efl_player_playback_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui
{
if (sd->edje)
efl_player_playback_progress_get(sd->img);
else if ((sd->frame_count > 0) && (sd->frame_duration > 0.0))
return (sd->cur_frame * sd->frame_duration) / sd->frame_count;
else if (sd->frame_count > 1)
return sd->cur_frame / (sd->frame_count - 1);
return 0.0;
}
EOLIAN static void
_efl_ui_image_efl_player_playback_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, double progress)
{
EINA_SAFETY_ON_TRUE_RETURN(progress > 1 || progress < 0);
if (sd->edje)
efl_player_playback_progress_set(sd->img, progress);
else if (sd->frame_count > 1)
sd->cur_frame = lround(progress * (sd->frame_count - 1));
else
sd->cur_frame = 0;
}
static Eina_Bool
_efl_ui_image_animated_paused_set_internal(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool paused)
{

View File

@ -103,7 +103,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, Efl.Ui.
Efl.Player.playing { get; set; }
Efl.Player.paused { get; set; }
Efl.Player.playback_position { get; set; }
Efl.Player.playback_progress { get; }
Efl.Player.playback_progress { get; set; }
Efl.Player.playback_speed { get; set; }
Efl.Layout.Signal.signal_emit;
Efl.Layout.Signal.message_send;

View File

@ -3058,7 +3058,7 @@ _efl_ui_image_zoomable_animated_set_internal(Eo *obj EINA_UNUSED, Efl_Ui_Image_Z
if (anim)
{
sd->frame_count = evas_object_image_animated_frame_count_get(sd->img);
sd->cur_frame = 1;
sd->cur_frame = 0;
sd->frame_duration =
evas_object_image_animated_frame_duration_get
(sd->img, sd->cur_frame, 0);
@ -3178,11 +3178,26 @@ _efl_ui_image_zoomable_efl_player_playback_progress_get(const Eo *obj EINA_UNUSE
{
if (sd->edje)
efl_player_playback_progress_get(sd->edje);
else if ((sd->frame_count > 0) && (sd->frame_duration > 0.0))
return (sd->cur_frame * sd->frame_duration) / sd->frame_count;
else if (sd->frame_count > 1)
return sd->cur_frame / (sd->frame_count - 1);
return 0.0;
}
EOLIAN static void
_efl_ui_image_zoomable_efl_player_playback_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, double progress)
{
EINA_SAFETY_ON_TRUE_RETURN(progress > 1 || progress < 0);
if (sd->edje)
{
efl_player_playback_progress_set(sd->img, progress);
}
else if (sd->frame_count > 1)
sd->cur_frame = lround(progress * (sd->frame_count - 1));
else
sd->cur_frame = 0;
}
EOLIAN static void
_efl_ui_image_zoomable_class_constructor(Efl_Class *klass EINA_UNUSED)
{

View File

@ -50,7 +50,7 @@ class Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom
Efl.Player.playing { get; set; }
Efl.Player.paused { get; set; }
Efl.Player.playback_position { get; set; }
Efl.Player.playback_progress { get; }
Efl.Player.playback_progress { get; set; }
Efl.Player.playback_speed { get; set; }
Efl.Ui.Zoom.zoom_animation { set; get; }
Efl.Ui.Zoom.zoom_level { set; get; }

View File

@ -1137,8 +1137,10 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
{
_key_down_sel_pre(obj, cur, en, shift, EINA_FALSE);
efl_text_cursor_line_jump_by(cur, -1);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_interactive_have_selection_get(obj))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_cursor_line_jump_by(cur, -1))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
_key_down_sel_post(obj, cur, en, shift);
}
@ -1151,8 +1153,10 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
{
_key_down_sel_pre(obj, cur, en, shift, EINA_TRUE);
efl_text_cursor_line_jump_by(cur, 1);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_interactive_have_selection_get(obj))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_cursor_line_jump_by(cur, 1))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
_key_down_sel_post(obj, cur, en, shift);
}
@ -1163,14 +1167,16 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
_compose_seq_reset(en);
_key_down_sel_pre(obj, cur, en, shift, EINA_FALSE);
efl_text_cursor_move(cur,EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV);
#if defined(__APPLE__) && defined(__MACH__)
if (altgr) efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START);
#else
/* If control is pressed, go to the start of the word */
if (control) efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START);
#endif
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_interactive_have_selection_get(obj))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_cursor_move(cur,EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
_key_down_sel_post(obj, cur, en, shift);
}
@ -1186,8 +1192,10 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
/* If control is pressed, go to the end of the word */
if (control) efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_END);
#endif
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_NEXT);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_interactive_have_selection_get(obj))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_NEXT))
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
_key_down_sel_post(obj, cur, en, shift);
}

View File

@ -870,9 +870,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
if (!efl_text_interactive_editable_get(obj)) return EINA_FALSE;
top = elm_widget_top_get(obj);
if (top && efl_isa(top, EFL_UI_WIN_CLASS))
top_is_win = EINA_TRUE;
top = efl_provider_find(obj, EFL_UI_WIN_CLASS);
if (efl_ui_focus_object_focus_get(obj))
{
@ -882,7 +880,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
if (sd->scroll)
efl_layout_signal_emit(sd->scr_edje, "efl,action,focus", "efl");
if (top && top_is_win && efl_input_text_input_panel_autoshow_get(obj) && !efl_input_text_input_panel_show_on_demand_get(obj))
if (top && 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);

View File

@ -8,14 +8,14 @@
#include <Elementary.h>
#include "elm_priv.h"
#include "efl_ui_animation_view_private.h"
#include "efl_ui_animation_view_part.eo.h"
#include "efl_ui_vg_animation_private.h"
#include "efl_ui_vg_animation_part.eo.h"
#include "elm_part_helper.h"
#define MY_CLASS EFL_UI_ANIMATION_VIEW_CLASS
#define MY_CLASS EFL_UI_VG_ANIMATION_CLASS
#define MY_CLASS_NAME "Efl_Ui_Animation_View"
#define MY_CLASS_NAME_LEGACY "efl_ui_animation_view"
#define MY_CLASS_NAME "Efl_Ui_Vg_Animation"
#define MY_CLASS_NAME_LEGACY "efl_ui_vg_animation"
#define GROW_SIZE 50
#define QUEUE_SIZE 350
@ -33,7 +33,7 @@ static const char SIG_PLAY_RESUME[] = "play,resume";
static const char SIG_PLAY_STOP[] = "play,stop";
static const char SIG_PLAY_UPDATE[] = "play,update";
/* smart callbacks coming from Efl_Ui_Animation_View objects: */
/* smart callbacks coming from Efl_Ui_Vg_Animation objects: */
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_FOCUSED, ""},
{SIG_UNFOCUSED, ""},
@ -493,7 +493,7 @@ _on_sub_object_size_hint_change(void *data,
static void
_sizing_eval(Eo *obj, void *data)
{
Efl_Ui_Animation_View_Data *pd = data;
Efl_Ui_Vg_Animation_Data *pd = data;
if (!efl_file_loaded_get(obj)) return;
double hw,hh;
@ -515,16 +515,15 @@ _size_hint_event_cb(void *data, const Efl_Event *event)
}
static void
_transit_go_facade(Eo* obj, Efl_Ui_Animation_View_Data *pd)
_transit_go_facade(Eo* obj, Efl_Ui_Vg_Animation_Data *pd)
{
pd->repeat_times = 0;
if (pd->play_back)
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK;
if (pd->playing_reverse)
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS;
else
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY;
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING;
evas_object_smart_callback_call(obj, SIG_PLAY_START, NULL);
if (pd->transit) elm_transit_go(pd->transit);
}
if (pd->transit) elm_transit_go(pd->transit);}
static Eina_Bool
_visible_check(Eo *obj)
@ -551,33 +550,33 @@ _visible_check(Eo *obj)
}
static void
_auto_play(Eo *obj, Efl_Ui_Animation_View_Data *pd, Eina_Bool vis)
_autoplay(Eo *obj, Efl_Ui_Vg_Animation_Data *pd, Eina_Bool vis)
{
if (!pd->auto_play || !pd->transit) return;
if (!pd->autoplay || !pd->transit) return;
//Resume Animation
if (vis)
{
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_PAUSE && pd->auto_play_pause)
if (pd->state == EFL_UI_VG_ANIMATION_STATE_PAUSED && pd->autoplay_pause)
{
elm_transit_paused_set(pd->transit, EINA_FALSE);
if (pd->play_back)
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK;
if (pd->playing_reverse)
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS;
else
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY;
pd->auto_play_pause = EINA_FALSE;
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING;
pd->autoplay_pause = EINA_FALSE;
evas_object_smart_callback_call(obj, SIG_PLAY_RESUME, NULL);
}
}
//Pause Animation
else
{
if ((pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY) ||
(pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK))
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING) ||
(pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS))
{
elm_transit_paused_set(pd->transit, EINA_TRUE);
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PAUSE;
pd->auto_play_pause = EINA_TRUE;
pd->state = EFL_UI_VG_ANIMATION_STATE_PAUSED;
pd->autoplay_pause = EINA_TRUE;
evas_object_smart_callback_call(obj, SIG_PLAY_PAUSE, NULL);
}
}
@ -587,21 +586,21 @@ static void
_transit_del_cb(Elm_Transit_Effect *effect, Elm_Transit *transit)
{
Eo *obj = (Eo *) effect;
EFL_UI_ANIMATION_VIEW_DATA_GET(obj, pd);
EFL_UI_VG_ANIMATION_DATA_GET(obj, pd);
if (!pd) return;
if ((pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY && pd->progress == 1) ||
(pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK && pd->progress == 0))
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING && pd->progress == 1) ||
(pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS && pd->progress == 0))
evas_object_smart_callback_call(obj, SIG_PLAY_DONE, NULL);
if (pd->transit != transit) return;
Efl_Ui_Animation_View_State prev_state = pd->state;
pd->state = EFL_UI_ANIMATION_VIEW_STATE_STOP;
Efl_Ui_Vg_Animation_State prev_state = pd->state;
pd->state = EFL_UI_VG_ANIMATION_STATE_STOPPED;
pd->transit = NULL;
pd->auto_play_pause = EINA_FALSE;
pd->autoplay_pause = EINA_FALSE;
if (prev_state != EFL_UI_ANIMATION_VIEW_STATE_STOP)
if (prev_state != EFL_UI_VG_ANIMATION_STATE_STOPPED)
{
evas_object_smart_callback_call(obj, SIG_PLAY_STOP, NULL);
pd->progress = 0;
@ -612,21 +611,31 @@ static void
_transit_cb(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
Eo *obj = (Eo *) effect;
EFL_UI_ANIMATION_VIEW_DATA_GET(obj, pd);
EFL_UI_VG_ANIMATION_DATA_GET(obj, pd);
if (!pd || !pd->vg)
{
ERR("Vector Object is removed in wrong way!, Efl_Ui_Animation_View = %p", obj);
ERR("Vector Object is removed in wrong way!, Efl_Ui_Vg_Animation = %p", obj);
elm_transit_del(transit);
return;
}
if (pd->play_back)
if (pd->playback_direction_changed)
{
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK;
elm_transit_progress_value_set(pd->transit, 1 - progress);
progress = 1 - progress ;
if (pd->playback_speed <= 0) pd->playing_reverse = EINA_TRUE;
else pd->playing_reverse = EINA_FALSE;
pd->playback_direction_changed = EINA_FALSE;
}
if (pd->playing_reverse)
{
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS;
progress = 1 - progress;
}
else pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY;
else pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING;
pd->progress = progress;
int minframe = (pd->frame_cnt - 1) * pd->min_progress;
@ -634,9 +643,13 @@ _transit_cb(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
int update_frame = (int)((maxframe - minframe) * progress) + minframe;
int current_frame = evas_object_vg_animated_frame_get(pd->vg);
if (pd->playback_speed == 0)
update_frame = current_frame;
_frame_set_facade(obj, pd, update_frame);
if (pd->auto_repeat)
if (pd->autorepeat)
{
int repeat_times = elm_transit_current_repeat_times_get(pd->transit);
if (pd->repeat_times != repeat_times)
@ -653,7 +666,7 @@ _transit_cb(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
}
EOLIAN static void
_efl_ui_animation_view_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Animation_View_Data *priv)
_efl_ui_vg_animation_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Vg_Animation_Data *priv)
{
efl_canvas_group_add(efl_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
@ -664,14 +677,14 @@ _efl_ui_animation_view_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Animation_View
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _size_hint_event_cb, priv);
priv->vg = vg;
priv->speed = 1;
priv->playback_speed = 1;
priv->frame_duration = 0;
priv->min_progress = 0.0;
priv->max_progress = 1.0;
}
EOLIAN static void
_efl_ui_animation_view_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Animation_View_Data *pd EINA_UNUSED)
_efl_ui_vg_animation_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
{
if (pd->transit)
{
@ -679,14 +692,14 @@ _efl_ui_animation_view_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Animation_View
pd->transit = NULL; //Skip perform transit_del_cb()
elm_transit_del(transit);
}
pd->state = EFL_UI_ANIMATION_VIEW_STATE_NOT_READY;
pd->state = EFL_UI_VG_ANIMATION_STATE_NOT_READY;
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
EOLIAN static void
_efl_ui_animation_view_efl_object_destructor(Eo *obj,
Efl_Ui_Animation_View_Data *pd EINA_UNUSED)
_efl_ui_vg_animation_efl_object_destructor(Eo *obj,
Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
{
Efl_Gfx_Vg_Value_Provider *vp;
EINA_LIST_FREE(pd->vp_list, vp)
@ -697,8 +710,8 @@ _efl_ui_animation_view_efl_object_destructor(Eo *obj,
}
EOLIAN static Eo *
_efl_ui_animation_view_efl_object_constructor(Eo *obj,
Efl_Ui_Animation_View_Data *pd EINA_UNUSED)
_efl_ui_vg_animation_efl_object_constructor(Eo *obj,
Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
@ -708,23 +721,24 @@ _efl_ui_animation_view_efl_object_constructor(Eo *obj,
}
static void
_update_frame_duration(Efl_Ui_Animation_View_Data *pd)
_update_frame_duration(Efl_Ui_Vg_Animation_Data *pd)
{
int frame_count = evas_object_vg_animated_frame_count_get(pd->vg);
int min_frame = (frame_count - 1) * pd->min_progress;
int max_frame = (frame_count - 1) * pd->max_progress;
double frame_rate = round((double)frame_count / evas_object_vg_animated_frame_duration_get(pd->vg, 0, 0));
double speed = pd->playback_speed < 0 ? pd->playback_speed * -1 : pd->playback_speed;
pd->frame_duration = (double)(max_frame - min_frame) / frame_rate;
if (pd->transit)
elm_transit_duration_set(pd->transit, pd->frame_duration * (1/pd->speed));
elm_transit_duration_set(pd->transit, speed != 0 ? pd->frame_duration * (1 / speed) : 0);
}
static Eina_Bool
_ready_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
_ready_play(Eo *obj, Efl_Ui_Vg_Animation_Data *pd)
{
pd->auto_play_pause = EINA_FALSE;
pd->state = EFL_UI_ANIMATION_VIEW_STATE_STOP;
pd->autoplay_pause = EINA_FALSE;
pd->state = EFL_UI_VG_ANIMATION_STATE_STOPPED;
if (pd->transit) elm_transit_del(pd->transit);
@ -734,9 +748,10 @@ _ready_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
if (pd->frame_duration > 0)
{
double speed = pd->playback_speed < 0 ? pd->playback_speed * -1 : pd->playback_speed;
Elm_Transit *transit = elm_transit_add();
elm_transit_object_add(transit, pd->vg);
if (pd->auto_repeat) elm_transit_repeat_times_set(transit, -1);
if (pd->autorepeat) elm_transit_repeat_times_set(transit, -1);
elm_transit_effect_add(transit, _transit_cb, obj, _transit_del_cb);
elm_transit_progress_value_set(transit, pd->progress);
elm_transit_objects_final_state_keep_set(transit, EINA_TRUE);
@ -744,7 +759,7 @@ _ready_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
if (pd->min_progress != 0.0 || pd->max_progress != 1.0)
_update_frame_duration(pd);
else
elm_transit_duration_set(transit, pd->frame_duration * (1/pd->speed));
elm_transit_duration_set(transit, speed != 0 ? pd->frame_duration * (1 / speed) : 0);
return EINA_TRUE;
}
@ -752,9 +767,9 @@ _ready_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
}
EOLIAN static void
_efl_ui_animation_view_efl_file_unload(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_efl_file_unload(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
pd->state = EFL_UI_ANIMATION_VIEW_STATE_NOT_READY;
pd->state = EFL_UI_VG_ANIMATION_STATE_NOT_READY;
pd->frame_cnt = 0;
pd->frame_duration = 0;
if (pd->transit) elm_transit_del(pd->transit);
@ -779,7 +794,7 @@ _efl_ui_animation_view_efl_file_unload(Eo *obj EINA_UNUSED, Efl_Ui_Animation_Vie
}
EOLIAN static Eina_Error
_efl_ui_animation_view_efl_file_load(Eo *obj, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_efl_file_load(Eo *obj, Efl_Ui_Vg_Animation_Data *pd)
{
Eina_Error err;
Eina_Bool ret;
@ -806,15 +821,15 @@ _efl_ui_animation_view_efl_file_load(Eo *obj, Efl_Ui_Animation_View_Data *pd)
if (!_ready_play(obj, pd)) return 1;
if (pd->auto_play)
if (pd->autoplay)
{
_transit_go_facade(obj, pd);
if (!_visible_check(obj))
{
elm_transit_paused_set(pd->transit, EINA_TRUE);
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PAUSE;
pd->auto_play_pause = EINA_TRUE;
pd->state = EFL_UI_VG_ANIMATION_STATE_PAUSED;
pd->autoplay_pause = EINA_TRUE;
evas_object_smart_callback_call(obj, SIG_PLAY_PAUSE, NULL);
}
}
@ -822,9 +837,9 @@ _efl_ui_animation_view_efl_file_load(Eo *obj, Efl_Ui_Animation_View_Data *pd)
}
EOLIAN static void
_efl_ui_animation_view_efl_gfx_entity_position_set(Eo *obj,
Efl_Ui_Animation_View_Data *pd,
Eina_Position2D pos)
_efl_ui_vg_animation_efl_gfx_entity_position_set(Eo *obj,
Efl_Ui_Vg_Animation_Data *pd,
Eina_Position2D pos EINA_UNUSED)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
@ -837,8 +852,8 @@ _efl_ui_animation_view_efl_gfx_entity_position_set(Eo *obj,
}
EOLIAN static void
_efl_ui_animation_view_efl_gfx_entity_size_set(Eo *obj,
Efl_Ui_Animation_View_Data *pd,
_efl_ui_vg_animation_efl_gfx_entity_size_set(Eo *obj,
Efl_Ui_Vg_Animation_Data *pd,
Eina_Size2D size)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, size.w, size.h))
@ -848,12 +863,12 @@ _efl_ui_animation_view_efl_gfx_entity_size_set(Eo *obj,
_sizing_eval(obj, pd);
_auto_play(obj, pd, _visible_check(obj));
_autoplay(obj, pd, _visible_check(obj));
}
EOLIAN static void
_efl_ui_animation_view_efl_gfx_entity_visible_set(Eo *obj,
Efl_Ui_Animation_View_Data *pd,
_efl_ui_vg_animation_efl_gfx_entity_visible_set(Eo *obj,
Efl_Ui_Vg_Animation_Data *pd,
Eina_Bool vis)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis))
@ -867,8 +882,8 @@ _efl_ui_animation_view_efl_gfx_entity_visible_set(Eo *obj,
}
EOLIAN static void
_efl_ui_animation_view_efl_gfx_view_view_size_set(Eo *obj EINA_UNUSED,
Efl_Ui_Animation_View_Data *pd,
_efl_ui_vg_animation_efl_gfx_view_view_size_set(Eo *obj EINA_UNUSED,
Efl_Ui_Vg_Animation_Data *pd,
Eina_Size2D size)
{
Eina_Rect viewbox;
@ -880,8 +895,8 @@ _efl_ui_animation_view_efl_gfx_view_view_size_set(Eo *obj EINA_UNUSED,
}
EOLIAN Eina_Size2D
_efl_ui_animation_view_efl_gfx_view_view_size_get(const Eo *obj EINA_UNUSED,
Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_efl_gfx_view_view_size_get(const Eo *obj EINA_UNUSED,
Efl_Ui_Vg_Animation_Data *pd)
{
Eina_Rect viewbox = efl_canvas_vg_object_viewbox_get(pd->vg);
@ -889,60 +904,38 @@ _efl_ui_animation_view_efl_gfx_view_view_size_get(const Eo *obj EINA_UNUSED,
}
EOLIAN static void
_efl_ui_animation_view_auto_repeat_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, Eina_Bool auto_repeat)
_efl_ui_vg_animation_autorepeat_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, Eina_Bool autorepeat)
{
if (pd->auto_repeat == auto_repeat) return;
pd->auto_repeat = auto_repeat;
if (pd->autorepeat == autorepeat) return;
pd->autorepeat = autorepeat;
if (pd->transit)
{
if (auto_repeat) elm_transit_repeat_times_set(pd->transit, -1);
if (autorepeat) elm_transit_repeat_times_set(pd->transit, -1);
else elm_transit_repeat_times_set(pd->transit, 0);
}
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_auto_repeat_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_autorepeat_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->auto_repeat;
return pd->autorepeat;
}
EOLIAN static void
_efl_ui_animation_view_auto_play_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd,
Eina_Bool auto_play)
_efl_ui_vg_animation_autoplay_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd,
Eina_Bool autoplay)
{
pd->auto_play = auto_play;
if (!auto_play) pd->auto_play_pause = EINA_FALSE;
pd->autoplay = autoplay;
if (!autoplay) pd->autoplay_pause = EINA_FALSE;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_auto_play_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_autoplay_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->auto_play;
return pd->autoplay;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
{
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY) return EINA_FALSE;
Eina_Bool rewind = EINA_FALSE;
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK) rewind = EINA_TRUE;
pd->play_back = EINA_FALSE;
pd->auto_play_pause = EINA_FALSE;
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
if (!pd->transit && !_ready_play(obj, pd)) return EINA_FALSE;
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_STOP)
_transit_go_facade(obj, pd);
else if (rewind)
elm_transit_progress_value_set(pd->transit, pd->progress);
return EINA_TRUE;
}
Eina_Bool _efl_ui_animation_view_play_sector(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *start, const char *end)
Eina_Bool _efl_ui_vg_animation_playing_sector(Eo *obj, Efl_Ui_Vg_Animation_Data *pd, const char *start, const char *end)
{
int start_frame = 0;
int end_frame = evas_object_vg_animated_frame_count_get(pd->vg) - 1;
@ -964,190 +957,67 @@ Eina_Bool _efl_ui_animation_view_play_sector(Eo *obj, Efl_Ui_Animation_View_Data
}
}
efl_ui_animation_view_min_frame_set(obj, start_frame);
efl_ui_vg_animation_min_frame_set(obj, start_frame);
if (start_frame < end_frame)
efl_ui_animation_view_max_frame_set(obj, end_frame);
efl_ui_vg_animation_max_frame_set(obj, end_frame);
if (!efl_ui_animation_view_play(obj))
if (!efl_player_playing_set(obj, EINA_TRUE))
return EINA_FALSE;
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_stop(Eo *obj, Efl_Ui_Animation_View_Data *pd)
Eina_Bool
_playing_stop(Eo* obj, Efl_Ui_Vg_Animation_Data *pd)
{
if (!pd->transit) return EINA_FALSE;
if ((pd->state == EFL_UI_ANIMATION_VIEW_STATE_NOT_READY) ||
(pd->state == EFL_UI_ANIMATION_VIEW_STATE_STOP))
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_NOT_READY) ||
(pd->state == EFL_UI_VG_ANIMATION_STATE_STOPPED))
return EINA_FALSE;
_frame_set_facade(obj, pd, 0);
pd->progress = 0;
pd->state = EFL_UI_ANIMATION_VIEW_STATE_STOP;
pd->state = EFL_UI_VG_ANIMATION_STATE_STOPPED;
evas_object_smart_callback_call(obj, SIG_PLAY_STOP, NULL);
elm_transit_del(pd->transit);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_pause(Eo *obj, Efl_Ui_Animation_View_Data *pd)
{
if (!pd->transit) return EINA_FALSE;
if ((pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY) ||
(pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK))
{
elm_transit_paused_set(pd->transit, EINA_TRUE);
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PAUSE;
pd->auto_play_pause = EINA_FALSE;
evas_object_smart_callback_call(obj, SIG_PLAY_PAUSE, NULL);
return EINA_TRUE;
}
return EINA_FALSE;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_resume(Eo *obj, Efl_Ui_Animation_View_Data *pd)
{
if (!pd->transit) return EINA_FALSE;
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_PAUSE)
{
elm_transit_paused_set(pd->transit, EINA_FALSE);
if (pd->play_back)
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK;
else
pd->state = EFL_UI_ANIMATION_VIEW_STATE_PLAY;
pd->auto_play_pause = EINA_FALSE;
evas_object_smart_callback_call(obj, SIG_PLAY_RESUME, NULL);
return EINA_TRUE;
}
return EINA_FALSE;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_play_back(Eo *obj, Efl_Ui_Animation_View_Data *pd)
{
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK) return EINA_FALSE;
Eina_Bool rewind = EINA_FALSE;
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_PLAY) rewind = EINA_TRUE;
pd->play_back = EINA_TRUE;
pd->auto_play_pause = EINA_FALSE;
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
if (!pd->transit && !_ready_play(obj, pd)) return EINA_FALSE;
if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_STOP)
{
if (pd->progress == 0) pd->progress = 1.0;
_transit_go_facade(obj, pd);
}
else if (rewind)
elm_transit_progress_value_set(pd->transit, 1 - pd->progress);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_speed_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, double speed)
{
if (speed <= 0) return EINA_FALSE;
pd->speed = speed;
if (pd->transit)
elm_transit_duration_set(pd->transit, pd->frame_duration * (1/pd->speed));
return EINA_TRUE;
}
EOLIAN static void
_efl_ui_animation_view_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, double progress)
_efl_ui_vg_animation_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, int frame_num)
{
if (progress < 0) progress = 0;
else if (progress > 1) progress = 1;
if (pd->progress == progress) return;
pd->progress = progress;
if (pd->frame_cnt > 0)
_frame_set_facade(obj, pd, (int) ((pd->frame_cnt - 1) * progress));
if (pd->transit)
{
if (pd->play_back)
elm_transit_progress_value_set(pd->transit, 1 - progress);
else
elm_transit_progress_value_set(pd->transit, progress);
}
}
EOLIAN static double
_efl_ui_animation_view_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
{
return pd->progress;
}
EOLIAN static void
_efl_ui_animation_view_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, int frame_num)
{
efl_ui_animation_view_progress_set(obj, (double) frame_num / (double) (evas_object_vg_animated_frame_count_get(pd->vg) - 1));
efl_player_playback_progress_set(obj, (double) frame_num / (double) (evas_object_vg_animated_frame_count_get(pd->vg) - 1));
}
EOLIAN static int
_efl_ui_animation_view_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
double progress = (pd->progress * (pd->max_progress - pd->min_progress)) + pd->min_progress;
return (int) ((double) (evas_object_vg_animated_frame_count_get(pd->vg) - 1) * progress);
}
EOLIAN static double
_efl_ui_animation_view_speed_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
{
return pd->speed;
}
EOLIAN static double
_efl_ui_animation_view_duration_time_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
{
return pd->frame_duration;
}
EOLIAN static Eina_Size2D
_efl_ui_animation_view_default_view_size_get(const Eo *obj EINA_UNUSED,
Efl_Ui_Animation_View_Data *pd EINA_UNUSED)
_efl_ui_vg_animation_default_view_size_get(const Eo *obj EINA_UNUSED,
Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
{
return efl_canvas_vg_object_default_size_get(pd->vg);
}
EOLIAN static Efl_Ui_Animation_View_State
_efl_ui_animation_view_state_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
EOLIAN static Efl_Ui_Vg_Animation_State
_efl_ui_vg_animation_state_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->state;
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_is_playing_back(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
{
return pd->play_back;
}
EOLIAN static int
_efl_ui_animation_view_frame_count_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_frame_count_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return efl_gfx_frame_controller_frame_count_get(pd->vg);
}
EOLIAN static void
_efl_ui_animation_view_min_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, double min_progress)
_efl_ui_vg_animation_min_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, double min_progress)
{
if (min_progress < 0.0 || min_progress > 1.0 || min_progress > pd->max_progress) return;
@ -1156,13 +1026,13 @@ _efl_ui_animation_view_min_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_Vi
}
EOLIAN static double
_efl_ui_animation_view_min_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_min_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->min_progress;
}
EOLIAN static void
_efl_ui_animation_view_max_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, double max_progress)
_efl_ui_vg_animation_max_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, double max_progress)
{
if (max_progress < 0.0 || max_progress > 1.0 || max_progress < pd->min_progress) return;
@ -1171,13 +1041,13 @@ _efl_ui_animation_view_max_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_Vi
}
EOLIAN static double
_efl_ui_animation_view_max_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_max_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->max_progress;
}
EOLIAN static void
_efl_ui_animation_view_min_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, int min_frame)
_efl_ui_vg_animation_min_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, int min_frame)
{
int frame_count = evas_object_vg_animated_frame_count_get(pd->vg);
if (min_frame < 0) min_frame = 0;
@ -1192,13 +1062,13 @@ _efl_ui_animation_view_min_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_
}
EOLIAN static int
_efl_ui_animation_view_min_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_min_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->min_progress * (evas_object_vg_animated_frame_count_get(pd->vg) - 1);
}
EOLIAN static void
_efl_ui_animation_view_max_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, int max_frame)
_efl_ui_vg_animation_max_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, int max_frame)
{
int frame_count = evas_object_vg_animated_frame_count_get(pd->vg);
if (max_frame > frame_count - 1) max_frame = frame_count - 1;
@ -1213,19 +1083,19 @@ _efl_ui_animation_view_max_frame_set(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_
}
EOLIAN static int
_efl_ui_animation_view_max_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd)
_efl_ui_vg_animation_max_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->max_progress * (evas_object_vg_animated_frame_count_get(pd->vg) - 1);
}
EOLIAN static Efl_Object *
_efl_ui_animation_view_efl_part_part_get(const Eo* obj, Efl_Ui_Animation_View_Data *pd EINA_UNUSED, const char *part)
_efl_ui_vg_animation_efl_part_part_get(const Eo* obj, Efl_Ui_Animation_View_Data *pd EINA_UNUSED, const char *part)
{
return ELM_PART_IMPLEMENT(EFL_UI_ANIMATION_VIEW_PART_CLASS, obj, part);
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_efl_ui_widget_widget_sub_object_add(Eo *obj, Efl_Ui_Animation_View_Data *pd EINA_UNUSED, Evas_Object *sobj)
_efl_ui_vg_animation_efl_ui_widget_widget_sub_object_add(Eo *obj, Efl_Ui_Animation_View_Data *pd EINA_UNUSED, Evas_Object *sobj)
{
Eina_Bool int_ret = EINA_FALSE;
@ -1242,7 +1112,7 @@ _efl_ui_animation_view_efl_ui_widget_widget_sub_object_add(Eo *obj, Efl_Ui_Anima
}
EOLIAN static Eina_Bool
_efl_ui_animation_view_efl_ui_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Animation_View_Data *pd, Evas_Object *sobj)
_efl_ui_vg_animation_efl_ui_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Animation_View_Data *pd, Evas_Object *sobj)
{
Eina_List *l;
Efl_Ui_Animation_View_Sub_Obj_Data *sub_d;
@ -1276,7 +1146,7 @@ _efl_ui_animation_view_efl_ui_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Anima
}
EOLIAN static void
_efl_ui_animation_view_value_provider_override(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, Efl_Gfx_Vg_Value_Provider *value_provider)
_efl_ui_vg_animation_value_provider_override(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, Efl_Gfx_Vg_Value_Provider *value_provider)
{
if (!value_provider) return;
@ -1307,6 +1177,180 @@ _efl_ui_animation_view_value_provider_override(Eo *obj EINA_UNUSED, Efl_Ui_Anima
efl_key_data_set(pd->vg, "_vg_value_providers", pd->vp_list);
}
EOLIAN static Eina_Bool
_efl_ui_vg_animation_efl_player_playing_set(Eo *obj, Efl_Ui_Vg_Animation_Data *pd, Eina_Bool playing)
{
if (playing)
{
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING && pd->playback_speed > 0)
|| (pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS && pd->playback_speed <= 0))
return EINA_FALSE;
Eina_Bool rewind = EINA_FALSE;
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING && pd->playback_speed <= 0)
|| (pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS && pd->playback_speed > 0))
rewind = EINA_TRUE;
if (pd->playback_speed <= 0)
pd->playing_reverse = EINA_TRUE;
else
pd->playing_reverse = EINA_FALSE;
pd->autoplay_pause = EINA_FALSE;
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
if (!pd->transit && !_ready_play(obj, pd)) return EINA_FALSE;
if (pd->state == EFL_UI_VG_ANIMATION_STATE_STOPPED)
{
if (pd->playing_reverse && pd->progress == 0) pd->progress = 1.0;
_transit_go_facade(obj, pd);
}
else if (rewind)
{
elm_transit_progress_value_set(pd->transit, pd->playing_reverse ? 1 - pd->progress : pd->progress);
pd->playback_direction_changed = EINA_FALSE;
}
}
else
{
return _playing_stop(obj, pd);
}
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_vg_animation_efl_player_playing_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
if (pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING)
return EINA_TRUE;
return EINA_FALSE;
}
EOLIAN static Eina_Bool
_efl_ui_vg_animation_efl_player_paused_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, Eina_Bool paused)
{
if (paused)
{
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING) ||
(pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS))
{
elm_transit_paused_set(pd->transit, paused);
pd->state = EFL_UI_VG_ANIMATION_STATE_PAUSED;
pd->autoplay_pause = EINA_FALSE;
evas_object_smart_callback_call(obj, SIG_PLAY_PAUSE, NULL);
}
}
else
{
if (pd->transit && pd->state == EFL_UI_VG_ANIMATION_STATE_PAUSED)
{
elm_transit_paused_set(pd->transit, paused);
if (pd->playing_reverse)
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS;
else
pd->state = EFL_UI_VG_ANIMATION_STATE_PLAYING;
pd->autoplay_pause = EINA_FALSE;
evas_object_smart_callback_call(obj, SIG_PLAY_RESUME, NULL);
}
}
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_vg_animation_efl_player_paused_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
if (pd->state == EFL_UI_VG_ANIMATION_STATE_PAUSED)
return EINA_TRUE;
return EINA_FALSE;
}
EOLIAN static void
_efl_ui_vg_animation_efl_player_playback_position_set(Eo *obj, Efl_Ui_Vg_Animation_Data *pd, double sec)
{
EINA_SAFETY_ON_TRUE_RETURN(sec < 0);
EINA_SAFETY_ON_TRUE_RETURN(sec > pd->frame_duration);
efl_player_playback_progress_set(obj, pd->frame_duration != 0 ? sec / pd->frame_duration : 0);
}
EOLIAN static double
_efl_ui_vg_animation_efl_player_playback_position_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->frame_duration * pd->progress;
}
EOLIAN static double
_efl_ui_vg_animation_efl_player_playback_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->progress;
}
EOLIAN static void
_efl_ui_vg_animation_efl_player_playback_progress_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, double progress)
{
if (progress < 0) progress = 0;
else if (progress > 1) progress = 1;
if (pd->progress == progress) return;
pd->progress = progress;
if (pd->frame_cnt > 0)
evas_object_vg_animated_frame_set(pd->vg, (int) ((pd->frame_cnt - 1) * progress));
if (pd->transit)
{
if (pd->playing_reverse)
elm_transit_progress_value_set(pd->transit, 1 - progress);
else
elm_transit_progress_value_set(pd->transit, progress);
}
}
EOLIAN static void
_efl_ui_vg_animation_efl_player_playback_speed_set(Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd, double speed)
{
// pd->playback_direction_changed is used only during playback.
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING ||
pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS)
&& ((pd->playback_speed > 0 && speed < 0) || (pd->playback_speed < 0 && speed > 0)))
pd->playback_direction_changed = EINA_TRUE;
pd->playback_speed = speed;
speed = speed < 0 ? speed * -1 : speed;
if (pd->transit)
elm_transit_duration_set(pd->transit, pd->playback_speed != 0 ? pd->frame_duration * (1 / speed) : 0);
}
EOLIAN static double
_efl_ui_vg_animation_efl_player_playback_speed_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->playback_speed;
}
EOLIAN static double
_efl_ui_vg_animation_efl_playable_length_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
{
return pd->frame_duration;
}
EOLIAN static Eina_Bool
_efl_ui_vg_animation_efl_playable_playable_get(const Eo *obj, Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
{
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_vg_animation_efl_playable_seekable_get(const Eo *obj, Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
{
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
return EINA_TRUE;
}
EAPI Elm_Animation_View*
elm_animation_view_add(Evas_Object *parent)
{
@ -1323,11 +1367,31 @@ elm_animation_view_file_set(Elm_Animation_View *obj, const char *file, const cha
EAPI Elm_Animation_View_State
elm_animation_view_state_get(Elm_Animation_View *obj)
{
return efl_ui_animation_view_state_get(obj);
Elm_Animation_View_State state = ELM_ANIMATION_VIEW_STATE_NOT_READY;
switch (efl_ui_vg_animation_state_get(obj))
{
case EFL_UI_VG_ANIMATION_STATE_PLAYING:
state = ELM_ANIMATION_VIEW_STATE_PLAY;
break;
case EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS:
state = ELM_ANIMATION_VIEW_STATE_PLAY_BACK;
break;
case EFL_UI_VG_ANIMATION_STATE_PAUSED:
state = ELM_ANIMATION_VIEW_STATE_PAUSE;
break;
case EFL_UI_VG_ANIMATION_STATE_STOPPED:
state = ELM_ANIMATION_VIEW_STATE_STOP;
break;
case EFL_UI_VG_ANIMATION_STATE_NOT_READY:
default:
break;
}
return state;
}
static Eina_Bool
_efl_ui_animation_view_content_set(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *part, Efl_Gfx_Entity *content)
_efl_ui_vg_animation_content_set(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *part, Efl_Gfx_Entity *content)
{
Efl_Ui_Animation_View_Sub_Obj_Data *sub_d;
Eina_List *l;
@ -1385,7 +1449,7 @@ end:
}
static Efl_Gfx_Entity *
_efl_ui_animation_view_content_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, const char *part)
_efl_ui_vg_animation_content_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data *pd, const char *part)
{
const Eina_List *l;
Efl_Ui_Animation_View_Sub_Obj_Data *sub_d;
@ -1400,7 +1464,7 @@ _efl_ui_animation_view_content_get(const Eo *obj EINA_UNUSED, Efl_Ui_Animation_V
}
static Efl_Gfx_Entity *
_efl_ui_animation_view_content_unset(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *part)
_efl_ui_vg_animation_content_unset(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *part)
{
Efl_Ui_Animation_View_Sub_Obj_Data *sub_d;
Eina_List *l;
@ -1442,16 +1506,16 @@ _efl_ui_animation_view_content_unset(Eo *obj, Efl_Ui_Animation_View_Data *pd, co
/* Efl.Part begin */
ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_animation_view, EFL_UI_ANIMATION_VIEW, Efl_Ui_Animation_View_Data)
ELM_PART_OVERRIDE_CONTENT_GET(efl_ui_animation_view, EFL_UI_ANIMATION_VIEW, Efl_Ui_Animation_View_Data)
ELM_PART_OVERRIDE_CONTENT_UNSET(efl_ui_animation_view, EFL_UI_ANIMATION_VIEW, Efl_Ui_Animation_View_Data)
#include "efl_ui_animation_view_part.eo.c"
ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_vg_animation, EFL_UI_ANIMATION_VIEW, Efl_Ui_Animation_View_Data)
ELM_PART_OVERRIDE_CONTENT_GET(efl_ui_vg_animation, EFL_UI_ANIMATION_VIEW, Efl_Ui_Animation_View_Data)
ELM_PART_OVERRIDE_CONTENT_UNSET(efl_ui_vg_animation, EFL_UI_ANIMATION_VIEW, Efl_Ui_Animation_View_Data)
#include "efl_ui_vg_animation_part.eo.c"
/* Efl.Part end */
/* Internal EO APIs and hidden overrides */
#define EFL_UI_ANIMATION_VIEW_EXTRA_OPS \
EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_animation_view)
#define EFL_UI_VG_ANIMATION_EXTRA_OPS \
EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_vg_animation)
#include "efl_ui_animation_view_eo.legacy.c"
#include "efl_ui_animation_view.eo.c"
#include "efl_ui_vg_animation_eo.legacy.c"
#include "efl_ui_vg_animation.eo.c"

View File

@ -1,38 +1,37 @@
enum @beta Efl.Ui.Animation_View_State
enum @beta Efl.Ui.Vg_Animation_State
{
[[State of animation view]]
[[State of vg_animation]]
not_ready, [[Animation is not ready to play. (Probably, it didn't file set yet or failed to read file.]]
play, [[Animation is playing. See @Efl.Ui.Animation_View.play.]]
play_back, [[Animation is playing back (rewinding). See @Efl.Ui.Animation_View.play_back.]]
pause, [[Animation has been paused. To continue animation call @Efl.Ui.Animation_View.resume.
See @Efl.Ui.Animation_View.pause.]]
stop [[Animation view successfully loaded a file then readied for playing.
Otherwise after finished animation or stopped forcibly by request. See @Efl.Ui.Animation_View.stop.]]
playing, [[Animation is playing.]]
playing_backwards, [[Animation is playing backwards (rewinding).]]
paused, [[Animation has been paused.]]
stopped [[Vg Animation successfully loaded a file then readied for playing.
Otherwise after finished animation or stopped forcibly by request.]]
}
class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.File, Efl.Part
class @beta Efl.Ui.Vg_Animation extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.File, Efl.Player, Efl.Playable, Efl.Part
{
[[Elementary Animation view class.
Animation view is designed to show and play animation of
[[Elementary Vector Graphcis Animation class.
Vg Animation is designed to show and play animation of
vector graphics based content. It hides all @Efl.Canvas.Vg.Object details
but just open an API to read vector data from file. Also, it implements
details of animation control methods of Vector.
Vector data could contain static or animatable vector elements including
animation information. Available vector data file formats are SVG, JSON and EET.
@Efl.Ui.Animation_View currently only supports the animation information contained in
@Efl.Ui.Vg_Animation currently only supports the animation information contained in
JSON (known as Lottie file as well) and EET files.
]]
event_c_prefix: efl_ui_animation_view;
event_c_prefix: efl_ui_vg_animation;
methods {
@property auto_play {
@property autoplay {
[[Animation will be started automatically when it's possible.
If @.auto_play is $true, animation will be started when it's readied.
The condition of $auto play is when animation view opened file successfully,
If @.autoplay is $true, animation will be started when it's readied.
The condition of $auto play is when vg animation opened file successfully,
yet to play it plus when the object is visible.
If animation view is disabled, invisible,
If vg animation is disabled, invisible,
it turns to pause state then resume animation when it's visible again.
$true Enable auto play mode, disable otherwise.
@ -45,14 +44,14 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
get {
}
values {
auto_play: bool(false); [[Auto play mode.]]
autoplay: bool(false); [[Auto play mode.]]
}
}
@property auto_repeat {
@property autorepeat {
[[Turn on/off animation looping.
If @.auto_repeat is $true, it repeats animation when animation frame is reached to
end. This auto repeat mode is valid to both play and play_back cases.
If @.autorepeat is $true, it repeats animation when animation frame is reached to
end. This auto repeat mode is valid to both playing and playing_backwards cases.
$true Enable auto play mode, disable otherwise.
]]
@ -61,53 +60,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
get {
}
values {
auto_repeat: bool; [[Loop mode, Default is $false.]]
}
}
@property speed {
[[Control animation speed.
Control animation speed by multiplying $speed value. If you want to play
animation double-time faster, you can give $speed 2. If you want to play
animation double-time slower, you can give $speed 0.5.
Warning: speed must be greater than zero.
]]
set {
return: bool; [[$true when it's successful. $false otherwise.]]
}
get {
}
values {
speed: double(1.0); [[Speed factor.]]
}
}
@property duration_time {
[[Get the duration of animation in seconds.
This API returns total duration time of current animation in the seconds.
If current animation source isn't animatable, it returns zero.
]]
get {
}
values {
frame_duration: double; [[duration time in the seconds]]
}
}
@property progress {
[[Set current progress position of animation view object.
When you required to jump on a certain frame instantly,
you can change current position by using this API.
Warning: The range of progress is 0 ~ 1.
]]
set {
}
get {
}
values {
progress: double; [[Progress position. Value must be 0 ~ 1.]]
autorepeat: bool; [[Loop mode, Default is $false.]]
}
}
@property frame {
@ -123,19 +76,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
frame_num: int; [[Current frame number.]]
}
}
play {
[[Play animation one time instantly when it's available.
If current keyframe is on a certain position by playing back, this will
play forward from there.
Warning: Play request will be ignored if animation source is not set yet or
animation is paused state or it's already on playing.
]]
return: bool; [[$true when it's successful. $false otherwise.]]
}
play_sector {
playing_sector {
[[Play animation of sector one time instantly when it's available.
If end sector is NULL, only start sector is referenced.
@ -143,7 +84,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
Play is played and stoped at starting point of each sector.
If start is null and end is valid, playback starts from 0 frame to the start frame of the end sector.
If both sectors start and end are invalid. Play from 0 frame to the last frame of animation view object.
If both sectors start and end are invalid. Play from 0 frame to the last frame of vg animation object.
Note: This method use to @.min_frame, @.max_frame (@.min_progress, @.max_progress) internally.
So if you have changed the min or max frame(progress) it can be changed to the sector frame.
@ -154,46 +95,6 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
}
return: bool; [[$true when it's successful. $false otherwise.]]
}
play_back {
[[Play back animation one time instantly when it's available.
If current keyframe is on a certain position by playing, this will
play backward from there.
Warning: Play back request will be ignored if animation source is not set yet or
animation is paused state or it's already on playing back.
]]
return: bool; [[$true when it's successful. $false otherwise.]]
}
pause {
[[Pause current animation instantly.
Once animation is paused, animation view must get resume to play continue again.
Warning: Animation must be on playing or playing back status.
]]
return: bool; [[$true when it's successful. $false otherwise.]]
}
resume {
[[Resume paused animation to continue animation.
Warning: This resume must be called on animation paused status.
]]
return: bool; [[$true when it's successful. $false otherwise.]]
}
stop {
[[Stop playing animation.
Stop animation instantly regardless of its status and reset to
show first frame of animation. Even though current animation is paused,
the animation status will be stopped.
]]
return: bool; [[$true when it's successful. $false otherwise.]]
}
@property default_view_size {
[[The default view size that specified from vector resource.
]]
@ -204,23 +105,17 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
}
}
@property state {
[[Current animation view state.
See @Efl.Ui.Animation_View_State
[[Current vg animation state.
See @Efl.Ui.Vg_Animation_State
]]
get{
}
values {
state: Efl.Ui.Animation_View_State; [[Current animation view state]]
state: Efl.Ui.Vg_Animation_State; [[Current vg animation state]]
}
}
is_playing_back {
[[Returns the status whether current animation is on playing forward or backward.
Note: If animation view is not on playing, it will return $false.
]]
return: bool; [[$true, if animation on playing back, $false otherwise.]]
}
@property frame_count {
[[The index of end frame of the animation view, if it's animated.
[[The index of end frame of the vg animation, if it's animated.
Note : frame number starts with 0.
]]
get {
@ -283,7 +178,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
Eo *vp = efl_add(EFL_GFX_VG_VALUE_PROVIDER_CLASS, NULL);
@Efl.Gfx.Vg.Value_Provider.keypath.set(vp, "SomeLayer:SomeObject:SomeContents");
// Set vp property
@.value_provider_override(target_animation_view, vg);
@.value_provider_override(target_vg_animation, vg);
See @Efl.Gfx.Vg.Value_Provider
]]
params {
@ -303,6 +198,14 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
Efl.Part.part_get;
Efl.Ui.Widget.widget_sub_object_add;
Efl.Ui.Widget.widget_sub_object_del;
Efl.Player.playing { set; get; }
Efl.Player.paused { set; get; }
Efl.Player.playback_position { set; get; }
Efl.Player.playback_progress { get; set; }
Efl.Player.playback_speed { set; get; }
Efl.Playable.length { get; }
Efl.Playable.playable { get; }
Efl.Playable.seekable { get; }
}
events {
play,start: void; [[Called when animation is just started]]

View File

@ -26,7 +26,7 @@
* @ingroup Elm_Animation_View
*/
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "efl_ui_animation_view_legacy.h"
#include "efl_ui_vg_animation_legacy.h"
#endif
/**
* @}

View File

@ -0,0 +1,166 @@
EAPI void
elm_animation_view_auto_play_set(Efl_Ui_Vg_Animation *obj, Eina_Bool auto_play)
{
efl_ui_vg_animation_autoplay_set(obj, auto_play);
}
EAPI Eina_Bool
elm_animation_view_auto_play_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_autoplay_get(obj);
}
EAPI void
elm_animation_view_auto_repeat_set(Efl_Ui_Vg_Animation *obj, Eina_Bool autorepeat)
{
efl_ui_vg_animation_autorepeat_set(obj, autorepeat);
}
EAPI Eina_Bool
elm_animation_view_auto_repeat_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_autorepeat_get(obj);
}
EAPI Eina_Bool
elm_animation_view_speed_set(Efl_Ui_Vg_Animation *obj, double speed)
{
if (!obj) return EINA_FALSE;
efl_player_playback_speed_set(obj, speed);
return EINA_TRUE;
}
EAPI double
elm_animation_view_speed_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_player_playback_speed_get(obj);
}
EAPI double
elm_animation_view_duration_time_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_playable_length_get(obj);
}
EAPI void
elm_animation_view_progress_set(Efl_Ui_Vg_Animation *obj, double progress)
{
efl_player_playback_progress_set(obj, progress);
}
EAPI double
elm_animation_view_progress_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_player_playback_progress_get(obj);
}
EAPI void
elm_animation_view_frame_set(Efl_Ui_Vg_Animation *obj, int frame_num)
{
efl_ui_vg_animation_frame_set(obj, frame_num);
}
EAPI int
elm_animation_view_frame_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_frame_get(obj);
}
EAPI Eina_Bool
elm_animation_view_play(Efl_Ui_Vg_Animation *obj)
{
return efl_player_playing_set(obj, EINA_TRUE);
}
EAPI Eina_Bool
elm_animation_view_play_back(Efl_Ui_Vg_Animation *obj)
{
double speed = efl_player_playback_speed_get(obj);
efl_player_playback_speed_set(obj, speed < 0 ? speed * -1 : speed);
return efl_player_playing_set(obj, EINA_TRUE);
}
EAPI Eina_Bool
elm_animation_view_pause(Efl_Ui_Vg_Animation *obj)
{
return efl_player_paused_set(obj, EINA_TRUE);
}
EAPI Eina_Bool
elm_animation_view_resume(Efl_Ui_Vg_Animation *obj)
{
return efl_player_paused_set(obj, EINA_FALSE);
}
EAPI Eina_Bool
elm_animation_view_stop(Efl_Ui_Vg_Animation *obj)
{
return efl_player_playing_set(obj, EINA_FALSE);
}
EAPI Eina_Size2D
elm_animation_view_default_size_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_default_view_size_get(obj);
}
EAPI Eina_Bool
elm_animation_view_is_playing_back(Efl_Ui_Vg_Animation *obj)
{
return (efl_ui_vg_animation_state_get(obj) == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS);
}
EAPI int
elm_animation_view_frame_count_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_frame_count_get(obj);
}
EAPI void
elm_animation_view_min_progress_set(Efl_Ui_Vg_Animation *obj, double min_progress)
{
efl_ui_vg_animation_min_progress_set(obj, min_progress);
}
EAPI double
elm_animation_view_min_progress_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_min_progress_get(obj);
}
EAPI void
elm_animation_view_max_progress_set(Efl_Ui_Vg_Animation *obj, double max_progress)
{
efl_ui_vg_animation_max_progress_set(obj, max_progress);
}
EAPI double
elm_animation_view_max_progress_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_max_progress_get(obj);
}
EAPI void
elm_animation_view_min_frame_set(Efl_Ui_Vg_Animation *obj, int min_frame)
{
efl_ui_vg_animation_min_frame_set(obj, min_frame);
}
EAPI int
elm_animation_view_min_frame_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_min_frame_get(obj);
}
EAPI void
elm_animation_view_max_frame_set(Efl_Ui_Vg_Animation *obj, int max_frame)
{
efl_ui_vg_animation_max_frame_set(obj, max_frame);
}
EAPI int
elm_animation_view_max_frame_get(const Efl_Ui_Vg_Animation *obj)
{
return efl_ui_vg_animation_max_frame_get(obj);
}

View File

@ -1,5 +1,5 @@
#include "efl_ui_animation_view_eo.legacy.h"
#include "efl_ui_vg_animation_eo.legacy.h"
/**
* Add a new animation view widget to the parent's canvas

View File

@ -0,0 +1,9 @@
class @beta Efl.Ui.Vg_Animation_Part extends Efl.Ui.Widget_Part implements Efl.Content
{
[[Efl UI Vg_Animation internal part class]]
data: null;
implements {
Efl.Content.content { set; get; }
Efl.Content.content_unset;
}
}

View File

@ -0,0 +1,44 @@
#ifndef EFL_UI_VG_ANIMATION_PRIVATE_H
#define EFL_UI_VG_ANIMATION_PRIVATE_H
#include "Elementary.h"
#include "efl_ui_vg_animation.eo.h"
typedef struct _Efl_Ui_Vg_Animation_Data Efl_Ui_Vg_Animation_Data;
struct _Efl_Ui_Vg_Animation_Data
{
Eo* vg; //Evas_Object_Vg
Efl_Ui_Vg_Animation_State state;
Elm_Transit *transit;
Eina_Stringshare *file;
double playback_speed;
double progress;
double frame_cnt;
int repeat_times;
double frame_duration;
double min_progress;
double max_progress;
Eina_List *subs;
Eina_List *vp_list;
Eina_Bool playing_reverse : 1;
Eina_Bool autoplay : 1;
Eina_Bool autoplay_pause: 1;
Eina_Bool autorepeat : 1;
Eina_Bool playback_direction_changed : 1;
};
#define EFL_UI_VG_ANIMATION_DATA_GET(o, sd) \
Efl_Ui_Vg_Animation_Data * sd = efl_data_scope_safe_get(o, EFL_UI_VG_ANIMATION_CLASS)
#define EFL_UI_VG_ANIMATION_DATA_GET_OR_RETURN(o, ptr) \
EFL_UI_VG_ANIMATION_DATA_GET(o, ptr); \
if (EINA_UNLIKELY(!ptr)) \
{ \
ERR("No widget data for object %p (%s)", \
o, evas_object_type_get(o)); \
return; \
}
#endif

View File

@ -245,7 +245,7 @@ _elm_code_widget_fill_line_gutter(Elm_Code_Widget *widget, Evas_Textgrid_Cell *c
cursor_line = elm_code_file_line_get(line->file, pd->cursor_line);
if (_elm_code_widget_line_in_scope(line, cursor_line))
cells[gutter-1].bg = ELM_CODE_WIDGET_COLOR_GUTTER_SCOPE_BG;
else
else if (pd->show_line_numbers)
cells[gutter-1].bg = ELM_CODE_WIDGET_COLOR_GUTTER_BG;
}
else
@ -800,6 +800,7 @@ _elm_code_widget_geometry_for_position_get(Elm_Code_Widget *widget, Elm_Code_Wid
gutter = efl_ui_code_widget_text_left_gutter_width_get(widget);
grid = eina_list_nth(pd->grids, row - 1);
evas_object_smart_calculate(pd->scroller);
evas_object_smart_calculate(pd->gridbox);
evas_object_geometry_get(grid, x, y, NULL, NULL);

View File

@ -39,8 +39,8 @@ endforeach
pub_eo_files = [
'efl_ui_widget.eo',
'efl_ui_widget_scrollable_content.eo',
'efl_ui_animation_view.eo',
'efl_ui_animation_view_part.eo',
'efl_ui_vg_animation.eo',
'efl_ui_vg_animation_part.eo',
'efl_ui_bg.eo',
'efl_ui_button.eo',
'efl_ui_calendar.eo',
@ -302,7 +302,7 @@ elementary_headers_unstable = [
'efl_ui_widget_flip.h',
'elm_widget_flipselector.h',
'efl_ui_widget_frame.h',
'efl_ui_animation_view_private.h',
'efl_ui_vg_animation_private.h',
'elm_widget_gengrid.h',
'elm_widget_genlist.h',
'elm_widget_glview.h',
@ -402,8 +402,8 @@ elementary_pub_headers = [
'elc_naviframe_common.h',
'elc_popup.h',
'elc_popup_legacy.h',
'efl_ui_animation_view.h',
'efl_ui_animation_view_legacy.h',
'efl_ui_vg_animation.h',
'efl_ui_vg_animation_legacy.h',
'elm_access.h',
'elm_actionslider.h',
'elm_actionslider_legacy.h',
@ -593,7 +593,7 @@ elementary_pub_headers = [
'elm_win_legacy.h',
'elm_helper.h',
'elm_part_helper.h',
'efl_ui_animation_view_eo.legacy.h',
'efl_ui_vg_animation_eo.legacy.h',
'efl_ui_bg_eo.legacy.h',
'efl_ui_bg_legacy_eo.legacy.h',
'efl_ui_button_eo.legacy.h',
@ -732,7 +732,7 @@ elementary_src = [
'elc_popup.c',
'elc_scrolled_entry.c',
'elm_access.c',
'efl_ui_animation_view.c',
'efl_ui_vg_animation.c',
'elm_actionslider.c',
'elm_atspi_app_object.c',
'elm_atspi_bridge.c',

View File

@ -60,7 +60,7 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group
Efl.Player.playing { get; set; }
Efl.Player.paused { get; set; }
Efl.Player.playback_position { get; set; }
Efl.Player.playback_progress { get; }
Efl.Player.playback_progress { get; set; }
Efl.Audio_Control.volume { get; set; }
Efl.Audio_Control.mute { get; set; }
Efl.Playable.length { get; }

View File

@ -1217,6 +1217,13 @@ _efl_canvas_video_efl_player_playback_progress_get(const Eo *obj EINA_UNUSED, Ef
return sd->progress.stat;
}
EOLIAN static void
_efl_canvas_video_efl_player_playback_progress_set(Eo *obj, Efl_Canvas_Video_Data *sd EINA_UNUSED, double progress)
{
const char *info = emotion_object_progress_info_get((const Evas_Object*)obj);
_emotion_progress_set(obj, (char*)info, progress);
}
EOLIAN static double
_efl_canvas_video_efl_playable_length_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{

View File

@ -461,9 +461,7 @@ _clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj)
EAPI void
evas_object_clip_unset(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
_clip_unset(eo_obj, obj);
efl_canvas_object_clipper_set(eo_obj, NULL);
}
static void

View File

@ -19,6 +19,9 @@
<ItemGroup>
<ProjectReference Include="../../bindings/mono/efl_sharp.csproj" />
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>@CA_RULESET@</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="@BINDING_TEST_SRC@/*.cs" />

View File

@ -94,6 +94,7 @@ if get_option('dotnet')
dotnet_test_conf_data.set('BINDING_BUILD', join_paths(meson.current_build_dir(),
'..', '..', 'bindings', 'mono'))
dotnet_test_conf_data.set('BINDING_TEST_SRC', meson.current_source_dir())
dotnet_test_conf_data.set('CA_RULESET', join_paths(meson.build_root(), '@0@'.format(ca_ruleset)))
dotnet_test_conf_data.set('NETCOREAPP_VERSION', dotnet_core_app_version)

View File

@ -45,7 +45,7 @@
"Efl.Ui.Timepicker",
"Efl.Ui.Navigation_Bar",
"Efl.Ui.Relative_Container",
"Efl.Ui.Animation_View",
"Efl.Ui.Vg_Animation",
"Efl.Ui.Table",
"Efl.Ui.Flip",
"Efl.Ui.Stack",

View File

@ -8,7 +8,7 @@
/* spec-meta-start
{"test-interface":"Efl.Gfx.View",
"test-widgets": ["Efl.Ui.Animation_View"]}
"test-widgets": ["Efl.Ui.Vg_Animation"]}
spec-meta-end */
EFL_START_TEST(view_size)