Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2020-01-14 11:03:53 +09:00
commit cd10c27cfa
29 changed files with 276 additions and 176 deletions

View File

@ -279,10 +279,6 @@ group { "efl/spin_button/horizontal/inc_button";
images.image: "sym_right_light_normal.png" COMP;
images.image: "sym_right_glow_normal.png" COMP;
images.image: "sym_right_dark_normal.png" COMP;
script {
public mouse_down = 0;
public multi_down = 0;
}
parts {
part { name: "arrow.image";
scale: 1;
@ -321,64 +317,31 @@ group { "efl/spin_button/horizontal/inc_button";
}
}
programs {
EFL_UI_CLICKABLE_PART_BIND(over)
program { name: "button_press";
signal: "mouse,down,1";
source: "over";
script {
if ((get_int(multi_down) == 0) &&
(get_int(mouse_down) == 0)) {
set_int(mouse_down, 1);
run_program(PROGRAM:"button_press2");
}
}
}
program { name: "button_press2";
action: SIGNAL_EMIT "efl,action,press" "";
after: "button_press_anim";
}
program { name: "button_press_anim";
action: STATE_SET "pressed" 0.0;
target: "arrow.image";
}
program { name: "button_unpress";
signal: "mouse,up,1";
source: "over";
script {
if (get_int(mouse_down) == 1) {
set_int(mouse_down, 0);
run_program(PROGRAM:"button_unpress2");
run_program(PROGRAM:"button_unpress_anim");
}
}
}
program { name: "button_unpress2";
action: SIGNAL_EMIT "efl,action,unpress" "";
}
program { name: "button_unpress_anim";
action: STATE_SET "default" 0.0;
target: "arrow.image";
}
program { name: "button_click";
signal: "mouse,clicked,1";
source: "over";
script {
if (get_int(multi_down) == 0) {
run_program(PROGRAM:"button_click2");
}
}
}
program { name: "action_unpressed";
signal: "efl,action,unpressed";
source: "efl";
after: "button_unpress_anim";
action: STATE_SET "default" 0.0;
target: "arrow.image";
}
program { name: "action_pressed";
signal: "efl,action,pressed";
source: "efl";
after: "button_press_anim";
}
program { name: "button_click2";
action: SIGNAL_EMIT "efl,action,click" "";
action: STATE_SET "pressed" 0.0;
target: "arrow.image";
}
program { name: "access_pressed";
signal: "efl,state,animation,activated";
@ -406,22 +369,6 @@ group { "efl/spin_button/horizontal/inc_button";
target: "arrow.image";
target: "disabler";
}
program {
name: "multi_down";
signal: "efl,action,multi,down";
source: "efl";
script {
set_int(multi_down, 1);
}
}
program {
name: "multi_up";
signal: "efl,action,multi,up";
source: "efl";
script {
set_int(multi_down, 0);
}
}
}
}

View File

@ -32,5 +32,11 @@ test_ui_timepicker(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
efl_event_callback_add(efl_added, EFL_UI_TIMEPICKER_EVENT_TIME_CHANGED,_time_changed_cb, NULL),
efl_pack(bx, efl_added));
efl_add(EFL_UI_TIMEPICKER_CLASS, bx,
efl_ui_timepicker_time_set(efl_added, 11, 35),
efl_ui_timepicker_is_24hour_set(efl_added, EINA_TRUE),
efl_event_callback_add(efl_added, EFL_UI_TIMEPICKER_EVENT_TIME_CHANGED,_time_changed_cb, NULL),
efl_pack(bx, efl_added));
efl_gfx_entity_size_set(win, EINA_SIZE2D(150, 170));
}

View File

@ -229,7 +229,7 @@ struct pack_event_info_and_call_visitor
return as_generator(
indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
<< indent.inc() << "IntPtr info = e.arg.NativeHandle;\n"
<< "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
<< indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
).generate(sink, attributes::unused, *context);
}
bool operator()(attributes::complex_type_def const& type) const
@ -241,7 +241,7 @@ struct pack_event_info_and_call_visitor
return as_generator(
indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
<< indent.inc() << "IntPtr info = e.arg.Handle;\n"
<< "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
<< indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
).generate(sink, attributes::unused, *context);
}
};

View File

@ -15,15 +15,9 @@ enum @beta Efl.Input_Text.Panel_Layout_Type
hex, [[Hexadecimal layout.]]
terminal, [[Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization).]]
password, [[Like normal, but no auto-correct, no auto-capitalization etc.]]
datetime, [[Date and time layout
@since 1.8]]
emoticon, [[Emoticon layout
@since 1.10]]
voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.
@since 1.19]]
datetime, [[Date and time layout.]]
emoticon, [[Emoticon layout.]]
voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.]]
}
enum @beta Efl.Input_Text.Panel_Language_Type
@ -57,9 +51,7 @@ enum @beta Efl.Input_Text.Panel_Return_Key_Type
next, [[Next.]]
search, [[Search string or magnifier icon.]]
send, [[Send.]]
signin [[Sign-in
@since 1.8]]
signin [[Sign-in.]]
}
enum @beta Efl.Input_Text.Panel_Return_Key_State
@ -75,54 +67,49 @@ enum @beta Efl.Input_Text.Panel_Return_Key_State
enum @beta Efl.Input_Text.Hints_Type
{
[[Enumeration that defines the types of Input Hints.
@since 1.12
]]
none = 0, [[No active hints
@since 1.12]]
auto_complete = 1 << 0, [[Suggest word auto completion
@since 1.12]]
sensitive_data = 1 << 1, [[Typed text should not be stored.
@since 1.12]]
autofill_credit_card_expiration_date = 0x100, [[ Autofill hint for a credit card expiration date
@since 1.21]]
autofill_credit_card_expiration_day = 0x200, [[Autofill hint for a credit card expiration day
@since 1.21]]
autofill_credit_card_expiration_month = 0x300, [[ Autofill hint for a credit card expiration month
@since 1.21]]
autofill_credit_card_expiration_year = 0x400, [[ Autofill hint for a credit card expiration year
@since 1.21]]
autofill_credit_card_number = 0x500, [[ Autofill hint for a credit card number
@since 1.21]]
autofill_email_address = 0x600, [[ Autofill hint for an email address
@since 1.21]]
autofill_name = 0x700, [[ Autofill hint for a user's real name
@since 1.21]]
autofill_phone = 0x800, [[ Autofill hint for a phone number
@since 1.21]]
autofill_postal_address = 0x900, [[ Autofill hint for a postal address
@since 1.21]]
autofill_postal_code = 0xA00, [[ Autofill hint for a postal code
@since 1.21]]
autofill_id = 0xB00 [[ Autofill hint for a user's ID
@since 1.21]]
[[Enumeration that defines the types of Input Hints.]]
none = 0, [[No active hints.]]
auto_complete = 1 << 0, [[Suggest word auto completion.]]
sensitive_data = 1 << 1, [[Typed text should not be stored.]]
autofill_credit_card_expiration_date = 0x100, [[ Autofill hint for a credit card expiration date.]]
autofill_credit_card_expiration_day = 0x200, [[Autofill hint for a credit card expiration day.]]
autofill_credit_card_expiration_month = 0x300, [[ Autofill hint for a credit card expiration month.]]
autofill_credit_card_expiration_year = 0x400, [[ Autofill hint for a credit card expiration year.]]
autofill_credit_card_number = 0x500, [[ Autofill hint for a credit card number.]]
autofill_email_address = 0x600, [[ Autofill hint for an email address.]]
autofill_name = 0x700, [[ Autofill hint for a user's real name.]]
autofill_phone = 0x800, [[ Autofill hint for a phone number.]]
autofill_postal_address = 0x900, [[ Autofill hint for a postal address.]]
autofill_postal_code = 0xA00, [[ Autofill hint for a postal code.]]
autofill_id = 0xB00 [[ Autofill hint for a user's ID.]]
}
enum @beta Efl.Input_Text.Panel_Layout_Normal_Variation_Type
{
[[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]]
normal , [[The plain normal layout.]]
filename , [[Filename layout. Symbols such as '/' should be disabled.]]
person_name , [[The name of a person, @Efl.Input_Text.autocapitalization will be set to @Efl.Input_Text.Capitalize_Type.word.]]
}
enum @beta Efl.Input_Text.Panel_Layout_Numberonly_Variation_Type
{
[[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]]
normal , [[The plain normal number layout.]]
signed , [[The number layout to allow a positive or negative sign at the start.]]
decimal , [[The number layout to allow decimal point to provide fractional value.]]
signed_and_decimal , [[The number layout to allow decimal point and negative sign.]]
}
enum @beta Efl.Input_Text.Panel_Layout_Password_Variation_Type
{
[[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]]
normal , [[The normal password layout.]]
numberonly , [[The password layout to allow only number.]]
}
interface @beta Efl.Input_Text {
[[All the functionality relating to input hints
]]
@ -154,9 +141,10 @@ interface @beta Efl.Input_Text {
}
}
// FIXME: What is this?
@property input_panel_layout_variation {
[[The input panel layout variation of the entry.]]
[[The input panel layout variation of the entry, this can be
@Efl.Input_Text.Panel_Layout_Normal_Variation_Type , @Efl.Input_Text.Panel_Layout_Numberonly_Variation_Type
or @Efl.Input_Text.Panel_Layout_Password_Variation_Type.]]
set {
}
get {

View File

@ -927,7 +927,7 @@ _delete_emit(Eo *obj, Efl_Text_Cursor *c, Efl_Ui_Internal_Text_Interactive_Data
}
efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV);
}
efl_unref(cur);
efl_del(cur);
cur = NULL;
Efl_Text_Change_Info info = { NULL, 0, 0, 0, 0 };
@ -2067,6 +2067,10 @@ _efl_ui_internal_text_interactive_efl_input_text_input_panel_layout_variation_se
#else
(void)variation;
#endif
if (sd->input_panel_layout == EFL_INPUT_TEXT_PANEL_LAYOUT_TYPE_NORMAL &&
variation == EFL_INPUT_TEXT_PANEL_LAYOUT_NORMAL_VARIATION_TYPE_PERSON_NAME)
efl_input_text_autocapitalization_set(obj, EFL_INPUT_TEXT_CAPITALIZE_TYPE_WORD);
}
EOLIAN static int

View File

@ -405,10 +405,11 @@ static void
_spin_value(Efl_Ui_Spin *obj, Eina_Bool inc)
{
Efl_Ui_Spin_Button_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_BUTTON_CLASS);
double val = efl_ui_range_value_get(obj);
double step = inc ? pd->step : -pd->step;
double absolut_value = efl_ui_range_value_get(obj) + (inc ? pd->step : -pd->step);
_value_set(obj, absolut_value);
/* clamp to step before setting new value */
_value_set(obj, round((val + step) / step) * step);
}
static void

View File

@ -635,7 +635,7 @@ _efl_ui_textbox_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Ein
efl_layout_signal_emit(sd->entry_edje, emission, "efl");
if (sd->scroll)
{
elm_interface_scrollable_freeze_set(obj, efl_ui_widget_disabled_get(obj));
efl_ui_scrollable_scroll_freeze_set(obj, efl_ui_widget_disabled_get(obj));
}
if (!efl_ui_widget_disabled_get(obj))
@ -681,7 +681,7 @@ _efl_ui_textbox_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textbox_Data *sd)
// elm_entry_cursor_pos_set -> cursor,changed -> widget_show_region_set
// -> smart_objects_calculate will call all smart calculate functions,
// and one of them can delete elm_entry.
evas_object_ref(obj);
efl_ref(obj);
if (efl_ui_focus_object_focus_get(obj))
{
@ -705,7 +705,7 @@ _efl_ui_textbox_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textbox_Data *sd)
efl_event_callback_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL);
evas_object_unref(obj);
efl_unref(obj);
return theme_apply;
}
@ -1669,9 +1669,6 @@ _create_selection_handlers(Evas_Object *obj, Efl_Ui_Textbox_Data *sd)
EOLIAN static void
_efl_ui_textbox_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Eina_Position2D pos)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos);
efl_gfx_entity_position_set(sd->hit_rect, pos);
@ -1681,9 +1678,6 @@ _efl_ui_textbox_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Ei
EOLIAN static void
_efl_ui_textbox_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Eina_Size2D sz)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
efl_gfx_entity_size_set(sd->hit_rect, sz);
_update_selection_handler(obj);
@ -1693,9 +1687,6 @@ _efl_ui_textbox_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Eina_S
EOLIAN static void
_efl_ui_textbox_efl_gfx_entity_visible_set(Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED, Eina_Bool vis)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis))
return;
efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), vis);
if (vis) _update_selection_handler(obj);
}

View File

@ -71,6 +71,10 @@ _field_value_update(Eo *obj)
efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR]);
}
}
else
{
efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR]);
}
efl_ui_range_value_set(pd->min, pd->cur_time[TIMEPICKER_MIN]);
@ -112,12 +116,6 @@ _field_changed_cb(void *data, const Efl_Event *ev)
static void
_fields_init(Eo *obj)
{
const char *fmt;
char ch;
int i;
int field = 0;
char buf[FMT_LEN_MAX];
Efl_Ui_Timepicker_Data *pd = efl_data_scope_get(obj, MY_CLASS);
//Field create.
@ -147,6 +145,25 @@ _fields_init(Eo *obj)
_field_value_update(obj);
}
EOLIAN static Eina_Error
_efl_ui_timepicker_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Timepicker_Data *pd)
{
const char *fmt;
char ch;
int i;
char buf[FMT_LEN_MAX];
int field = 0;
Eina_Error ret = EFL_UI_THEME_APPLY_ERROR_NONE;
ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
if (ret != EFL_UI_THEME_APPLY_ERROR_NONE)
goto end;
fmt = efl_datetime_manager_format_get(pd->dt_manager);
if (!fmt)
{
@ -171,7 +188,8 @@ _fields_init(Eo *obj)
else
{
//TODO: monitoring locale change and update field location.
if (field == 0)
//FIXME: disabled this code, as it caused issues, see T8546
/*if (field == 0)
{
elm_object_signal_emit(obj, "efl,colon_field1,visible,on", "efl");
elm_object_signal_emit(obj, "efl,colon_field0,visible,off", "efl");
@ -182,8 +200,11 @@ _fields_init(Eo *obj)
elm_object_signal_emit(obj, "efl,colon_field1,visible,off", "efl");
}
elm_layout_signal_emit(obj, "efl,ampm,visible,on", "efl");
edje_object_message_signal_process(elm_layout_edje_get(obj));
if (pd->is_24hour)
elm_layout_signal_emit(obj, "efl,ampm,visible,off", "efl");
else
elm_layout_signal_emit(obj, "efl,ampm,visible,on", "efl");
edje_object_message_signal_process(elm_layout_edje_get(obj));*/
efl_content_set(efl_part(obj, buf), pd->ampm);
}
@ -193,8 +214,12 @@ _fields_init(Eo *obj)
}
fmt++;
}
end:
return ret;
}
EOLIAN static Eo *
_efl_ui_timepicker_efl_object_constructor(Eo *obj, Efl_Ui_Timepicker_Data *pd EINA_UNUSED)
{
@ -204,12 +229,6 @@ _efl_ui_timepicker_efl_object_constructor(Eo *obj, Efl_Ui_Timepicker_Data *pd EI
elm_widget_theme_klass_set(obj, "timepicker");
obj = efl_constructor(efl_super(obj, MY_CLASS));
if (elm_widget_theme_object_set(obj, wd->resize_obj,
elm_widget_theme_klass_get(obj),
elm_widget_theme_element_get(obj),
elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
CRI("Failed to set layout!");
_fields_init(obj);
elm_widget_can_focus_set(obj, EINA_TRUE);
@ -250,10 +269,17 @@ _efl_ui_timepicker_is_24hour_set(Eo *obj, Efl_Ui_Timepicker_Data *pd, Eina_Bool
if (pd->is_24hour == is_24hour) return;
pd->is_24hour = is_24hour;
if (pd->is_24hour == EINA_TRUE)
elm_layout_signal_emit(obj, "efl,ampm,visible,off", "efl");
if (!pd->is_24hour)
{
efl_ui_widget_disabled_set(pd->ampm, EINA_FALSE);
efl_ui_range_limits_set(pd->hour, 1, 12);
}
else
elm_layout_signal_emit(obj, "efl,ampm,visible,on", "efl");
{
efl_ui_widget_disabled_set(pd->ampm, EINA_TRUE);
efl_ui_range_limits_set(pd->hour, 0, 23);
}
_field_value_update(obj);
}

View File

@ -40,6 +40,7 @@ class Efl.Ui.Timepicker extends Efl.Ui.Layout_Base
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Ui.Widget.theme_apply;
}
events {
time,changed: void; [[Called when time is changed]]

View File

@ -60,7 +60,7 @@ struct @extern Eina.Matrix3 {
zz: double; [[ZZ matrix value]]
}
type @extern @beta Eina.Unicode: uint32; [[Eina unicode type]]
type @extern Eina.Unicode: uint32; [[Eina unicode type. @since 1.24]]
struct @extern @beta Eina.File_Direct_Info; [[Eina file direct information data structure]]
/*{

View File

@ -121,7 +121,7 @@ extern "C" {
#include <gesture/efl_canvas_gesture_tap.eo.h>
#include <gesture/efl_canvas_gesture_triple_tap.eo.h>
#include <gesture/efl_canvas_gesture_zoom.eo.h>
#include <gesture/efl_gesture_events.eo.h>
#include <gesture/efl_canvas_gesture_events.eo.h>
#ifdef __cplusplus

View File

@ -214,7 +214,7 @@ struct _Efl_Canvas_Object_Animation_Event
#include "gesture/efl_canvas_gesture_recognizer_flick.eo.h"
#include "gesture/efl_canvas_gesture_recognizer_zoom.eo.h"
#include "gesture/efl_canvas_gesture_manager.eo.h"
#include "gesture/efl_gesture_events.eo.h"
#include "gesture/efl_canvas_gesture_events.eo.h"
#include "canvas/efl_canvas_object.eo.h"
#include "canvas/efl_canvas_object_animation.eo.h"

View File

@ -11,7 +11,7 @@ struct Efl.Event_Animator_Tick {
abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack,
Efl.Input.Interface, Efl.Gfx.Hint,
Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Gesture.Events, Efl.Canvas.Object_Animation
Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Canvas.Gesture_Events, Efl.Canvas.Object_Animation
{
[[Efl canvas object abstract class

View File

@ -8503,6 +8503,15 @@ _evas_object_textblock_text_markup_set(Eo *eo_obj, Efl_Canvas_Textblock_Data *o,
evas_textblock_cursor_paragraph_first(o->cursor);
evas_object_textblock_text_markup_prepend(o->cursor, text);
/*If there was no text markup_prepend will not call change function
So we will call it inside markup_set*/
if (!text || !*text)
{
efl_event_callback_call(eo_obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL);
_evas_textblock_changed(o, eo_obj);
}
efl_event_freeze(eo_obj);
/* Point all the cursors to the starrt */
{

View File

@ -49,4 +49,4 @@ _efl_canvas_gesture_timestamp_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_
}
#include "efl_canvas_gesture.eo.c"
#include "efl_gesture_events.eo.c"
#include "efl_canvas_gesture_events.eo.c"

View File

@ -1,5 +1,5 @@
import efl_canvas_gesture_types;
parse efl_gesture_events;
parse efl_canvas_gesture_events;
abstract @beta Efl.Canvas.Gesture extends Efl.Object
{
@ -11,7 +11,7 @@ abstract @beta Efl.Canvas.Gesture extends Efl.Object
Typically this class is not used directly, instead, some sub-class of it (like
@Efl.Canvas.Gesture_Tap or @Efl.Canvas.Gesture_Zoom) is retrieved from gesture events
(like @[Efl.Gesture.Events.gesture,tap] or @[Efl.Gesture.Events.gesture,zoom]).
(like @[Efl.Canvas.Gesture_Events.gesture,tap] or @[Efl.Canvas.Gesture_Events.gesture,zoom]).
]]
c_prefix: efl_gesture;
methods {

View File

@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Double_Tap extends Efl.Canvas.Gesture
{
[[Double-tap gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,double_tap] for a description of the Double-tap gesture.
@[Efl.Canvas.Gesture_Events.gesture,double_tap] for a description of the Double-tap gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -1,4 +1,4 @@
interface @beta Efl.Gesture.Events
interface @beta Efl.Canvas.Gesture_Events
{
[[Interface for objects capable of emitting gesture events, like @Efl.Canvas.Object.
]]
@ -6,25 +6,25 @@ interface @beta Efl.Gesture.Events
events {
gesture,tap: Efl.Canvas.Gesture_Tap; [[Emitted when a Tap gesture has been detected.
A Tap gesture consists of a touch of the screen (or click of the mouse) quickly followed by
a release. If the release happens too late a @[Efl.Gesture.Events.gesture,long_tap] event will be
a release. If the release happens too late a @[Efl.Canvas.Gesture_Events.gesture,long_tap] event will be
emitted instead.
]]
gesture,double_tap: Efl.Canvas.Gesture_Double_Tap; [[Emitted when a Double-tap gesture has been detected.
A Double-tap gesture consists of two taps on the screen (or clicks of the mouse) in quick
succession. If the second one is delayed for too long they will be detected as two independent
@[Efl.Gesture.Events.gesture,tap] events.
@[Efl.Canvas.Gesture_Events.gesture,tap] events.
]]
gesture,triple_tap: Efl.Canvas.Gesture_Triple_Tap; [[Emitted when a Triple-tap gesture has been detected.
A Triple-tap gesture consists of three taps on the screen (or clicks of the mouse) in quick
succession. If any of them is delayed for too long they will be detected as independent
@[Efl.Gesture.Events.gesture,tap] or @[Efl.Gesture.Events.gesture,double_tap] events.
@[Efl.Canvas.Gesture_Events.gesture,tap] or @[Efl.Canvas.Gesture_Events.gesture,double_tap] events.
]]
gesture,long_tap: Efl.Canvas.Gesture_Long_Tap; [[Emitted when a Long-tap gesture has been detected.
A Long-tap gesture consists of a touch of the screen (or click of the mouse) followed by a release
after some time. If the release happens too quickly a @[Efl.Gesture.Events.gesture,tap] event will be
after some time. If the release happens too quickly a @[Efl.Canvas.Gesture_Events.gesture,tap] event will be
emitted instead.
]]

View File

@ -4,7 +4,7 @@ class @beta Efl.Canvas.Gesture_Flick extends Efl.Canvas.Gesture
{
[[Flick gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,flick] for a description of the Flick gesture.
@[Efl.Canvas.Gesture_Events.gesture,flick] for a description of the Flick gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Long_Tap extends Efl.Canvas.Gesture
{
[[Long-tap gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,long_tap] for a description of the Long-tap gesture.
@[Efl.Canvas.Gesture_Events.gesture,long_tap] for a description of the Long-tap gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -4,7 +4,7 @@ class @beta Efl.Canvas.Gesture_Momentum extends Efl.Canvas.Gesture
{
[[Momentum gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,momentum] for a description of the Momentum gesture.
@[Efl.Canvas.Gesture_Events.gesture,momentum] for a description of the Momentum gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -4,7 +4,7 @@
#include "evas_common_private.h"
#include "evas_private.h"
#include "efl_gesture_events.eo.h"
#include "efl_canvas_gesture_events.eo.h"
#include <Ecore.h>

View File

@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Tap extends Efl.Canvas.Gesture
{
[[Tap gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,tap] for a description of the Tap gesture.
@[Efl.Canvas.Gesture_Events.gesture,tap] for a description of the Tap gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Triple_Tap extends Efl.Canvas.Gesture
{
[[Triple-tap gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,triple_tap] for a description of the Triple-tap gesture.
@[Efl.Canvas.Gesture_Events.gesture,triple_tap] for a description of the Triple-tap gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Zoom extends Efl.Canvas.Gesture
{
[[Zoom gesture class holding state information.
See @Efl.Canvas.Gesture to see what this state is and
@[Efl.Gesture.Events.gesture,zoom] for a description of the Zoom gesture.
@[Efl.Canvas.Gesture_Events.gesture,zoom] for a description of the Zoom gesture.
Application developers receive these objects inside a gesture event and do not typically need to create their own.
]]

View File

@ -17,7 +17,7 @@ pub_eo_files = [
'efl_canvas_gesture_recognizer_flick.eo',
'efl_canvas_gesture_recognizer_zoom.eo',
'efl_canvas_gesture_manager.eo',
'efl_gesture_events.eo'
'efl_canvas_gesture_events.eo'
]
evas_gesture_eo_files = pub_eo_files

View File

@ -156,6 +156,59 @@ EFL_START_TEST (spin_value_dec_min)
}
EFL_END_TEST
EFL_START_TEST (spin_wraparound)
{
efl_ui_spin_button_wraparound_set(spin, EINA_TRUE);
efl_ui_range_limits_set(spin, 10, 30);
efl_ui_range_step_set(spin, 20);
efl_ui_range_value_set(spin, 20);
click_spin_part(spin, "efl.inc_button");
ck_assert_int_eq(efl_ui_range_value_get(spin), 10);
efl_ui_range_value_set(spin, 20);
click_spin_part(spin, "efl.dec_button");
ck_assert_int_eq(efl_ui_range_value_get(spin), 30);
}
EFL_END_TEST
EFL_START_TEST (spin_double_values)
{
double step = 0.1;
efl_ui_range_limits_set(spin, 10, 30);
efl_ui_range_value_set(spin, 20);
efl_ui_range_step_set(spin, step);
ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(spin), step));
get_me_to_those_events(spin);
ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.0));
for (int i = 0; i < 5; ++i)
{
click_part(spin, "efl.inc_button");
get_me_to_those_events(spin);
}
ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.5), 1);
}
EFL_END_TEST
EFL_START_TEST (spin_double_values_hitting_max_with_step)
{
//idea is to check that spin button can hit max with inc, even if value is not multiple is 2.7
efl_ui_range_limits_set(spin, 10, 30);
efl_ui_range_value_set(spin, 27);
efl_ui_range_step_set(spin, 2.7);
get_me_to_those_events(spin);
for (int i = 0; i < 2; ++i)
{
click_part(spin, "efl.inc_button");
get_me_to_those_events(spin);
}
ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 30), 1);
}
EFL_END_TEST
void efl_ui_test_spin_button(TCase *tc)
{
tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
@ -164,4 +217,7 @@ void efl_ui_test_spin_button(TCase *tc)
tcase_add_test(tc, spin_value_inc);
tcase_add_test(tc, spin_value_inc_max);
tcase_add_test(tc, spin_value_dec_min);
tcase_add_test(tc, spin_wraparound);
tcase_add_test(tc, spin_double_values);
tcase_add_test(tc, spin_double_values_hitting_max_with_step);
}

View File

@ -0,0 +1,45 @@
#define EFL_NOLEGACY_API_SUPPORT
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#define EFL_LAYOUT_CALC_PROTECTED
#include <Efl_Ui.h>
#include "efl_ui_suite.h"
EFL_START_TEST(check_all_times)
{
Eo *win = win_add();
Eo *timepicker = efl_add(EFL_UI_TIMEPICKER_CLASS, win);
for (int min = 0; min < 60; ++min)
{
for (int hour = 0; hour < 24; ++hour)
{
efl_ui_timepicker_time_set(timepicker, hour, min);
}
}
}
EFL_END_TEST
EFL_START_TEST(check_all_times_24_mode)
{
Eo *win = win_add();
Eo *timepicker = efl_add(EFL_UI_TIMEPICKER_CLASS, win,
efl_ui_timepicker_is_24hour_set(efl_added, EINA_TRUE));
for (int min = 0; min < 60; ++min)
{
for (int hour = 0; hour < 24; ++hour)
{
efl_ui_timepicker_time_set(timepicker, hour, min);
}
}
}
EFL_END_TEST
void efl_ui_test_timepicker(TCase *tc)
{
tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
tcase_add_test(tc, check_all_times);
tcase_add_test(tc, check_all_times_24_mode);
}

View File

@ -4942,6 +4942,31 @@ EFL_START_TEST(efl_text_style)
{
START_EFL_CANVAS_TEXTBLOCK_TEST();
int changed_emit = 0;
efl_event_callback_add(txt, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, _increment_int_changed, &changed_emit);
efl_text_set(txt, "Hello");
ck_assert_int_eq(changed_emit, 1);
efl_text_set(txt, "");
ck_assert_int_eq(changed_emit, 2);
efl_text_set(txt, "");
ck_assert_int_eq(changed_emit, 2);
changed_emit = 0;
efl_text_markup_set(txt, "&quot;Hello&quot;");
ck_assert_int_eq(changed_emit, 1);
efl_text_markup_set(txt, "");
ck_assert_int_eq(changed_emit, 2);
efl_text_markup_set(txt, "");
ck_assert_int_eq(changed_emit, 2);
END_EFL_CANVAS_TEXTBLOCK_TEST();
}
EFL_END_TEST
EFL_START_TEST(efl_text_markup)
{
START_EFL_CANVAS_TEXTBLOCK_TEST();
efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE);
@ -4992,5 +5017,6 @@ void evas_test_textblock(TCase *tc)
tcase_add_test(tc, efl_text_font);
tcase_add_test(tc, efl_canvas_textblock_style);
tcase_add_test(tc, efl_text_style);
tcase_add_test(tc, efl_text_markup);
}