forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
fca14bfdea
|
@ -5,9 +5,10 @@
|
|||
#include <Elementary.h>
|
||||
|
||||
static void
|
||||
_clicked(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
||||
_clicked(void *data EINA_UNUSED, const Efl_Event *ev)
|
||||
{
|
||||
printf("Button is clicked!!!\n");
|
||||
Efl_Input_Clickable_Clicked *clicked = ev->info;
|
||||
printf("Button is clicked!!! repeated(%d) button(%d)\n", clicked->repeated, clicked->button);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <Efl_Ui.h>
|
||||
#include <Elementary.h>
|
||||
|
||||
#define STEP_SIZE 2
|
||||
|
||||
static void
|
||||
_spin_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
|
||||
{
|
||||
|
@ -23,13 +25,13 @@ _spin_max_reached_cb(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
static void
|
||||
_inc_clicked(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
efl_ui_range_value_set(data, (efl_ui_range_value_get(data) + efl_ui_range_step_get(data)));
|
||||
efl_ui_range_value_set(data, (efl_ui_range_value_get(data) + STEP_SIZE));
|
||||
}
|
||||
|
||||
static void
|
||||
_dec_clicked(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
efl_ui_range_value_set(data, (efl_ui_range_value_get(data) - efl_ui_range_step_get(data)));
|
||||
efl_ui_range_value_set(data, (efl_ui_range_value_get(data) - STEP_SIZE));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -49,7 +51,6 @@ test_ui_spin(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
|
|||
sp = efl_add(EFL_UI_SPIN_CLASS, bx,
|
||||
efl_ui_range_limits_set(efl_added, 0, 10),
|
||||
efl_ui_range_value_set(efl_added, 6),
|
||||
efl_ui_range_step_set(efl_added, 2),
|
||||
efl_ui_format_string_set(efl_added, "test %d", EFL_UI_FORMAT_STRING_TYPE_SIMPLE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_spin_changed_cb, NULL),
|
||||
efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_MIN_REACHED,_spin_min_reached_cb, NULL),
|
||||
|
|
|
@ -253,9 +253,10 @@ struct event_argument_wrapper_generator
|
|||
<< "[Efl.Eo.BindingEntity]\n"
|
||||
<< "public class " << name_helpers::managed_event_args_short_name(evt) << " : EventArgs {\n"
|
||||
<< scope_tab << "/// <summary>Actual event payload.</summary>\n"
|
||||
<< scope_tab << "/// <value>" << documentation_string << "</value>\n"
|
||||
<< scope_tab << "public " << type << " arg { get; set; }\n"
|
||||
<< "}\n"
|
||||
).generate(sink, *etype, context);
|
||||
).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context);
|
||||
}
|
||||
} const event_argument_wrapper {};
|
||||
|
||||
|
@ -279,9 +280,15 @@ struct event_declaration_generator
|
|||
wrapper_args_type = "<" + name_helpers::managed_event_args_name(evt) + ">";
|
||||
|
||||
if (!as_generator(
|
||||
documentation(1)
|
||||
<< scope_tab << "event EventHandler" << wrapper_args_type << " " << evt_name << ";\n"
|
||||
).generate(sink, evt, context))
|
||||
documentation(1)
|
||||
).generate(sink, evt, context)) return false;
|
||||
if (evt.type.is_engaged())
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <value><see cref=\"" << name_helpers::managed_event_args_name(evt) << "\"/></value>\n"
|
||||
).generate(sink, evt, context)) return false;
|
||||
if (!as_generator(
|
||||
scope_tab << "event EventHandler" << wrapper_args_type << " " << evt_name << ";\n"
|
||||
).generate(sink, evt, context))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -360,6 +367,10 @@ struct event_definition_generator
|
|||
|
||||
if(!as_generator(documentation(1)).generate(sink, evt, context))
|
||||
return false;
|
||||
if (etype.is_engaged())
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <value><see cref=\"" << wrapper_args_type << "\"/></value>\n"
|
||||
).generate(sink, evt, context)) return false;
|
||||
|
||||
// Visible event declaration. Either a regular class member or an explicit interface implementation.
|
||||
if (klass.type == attributes::class_type::interface_ || klass.type == attributes::class_type::mixin)
|
||||
|
|
|
@ -359,28 +359,15 @@ struct _Ecore_Evas
|
|||
double async_render_start;
|
||||
#endif
|
||||
|
||||
/* A flag to show if sync_draw_done is sent by gl or by ecore_evas.
|
||||
Some GL drivers do buffer copy in a separate thread. We need to check
|
||||
whether GL driver sends SYNC_DRAW_DONE message after buffer copy.
|
||||
This is required to synchronize rendering and sync_draw_done message
|
||||
sending.
|
||||
|
||||
-1 : uninitialized
|
||||
0 : sync_draw_done is sent by ecore_evas
|
||||
1 : sync_draw_done is sent by gl
|
||||
*/
|
||||
signed char gl_sync_draw_done;
|
||||
|
||||
unsigned char ignore_events : 1;
|
||||
unsigned char manual_render : 1;
|
||||
unsigned char registered : 1;
|
||||
unsigned char no_comp_sync : 1;
|
||||
unsigned char semi_sync : 1;
|
||||
unsigned char deleted : 1;
|
||||
unsigned char profile_supported : 1;
|
||||
|
||||
unsigned char in_async_render : 1;
|
||||
unsigned char can_async_render : 1;
|
||||
|
||||
unsigned char animator_registered : 1;
|
||||
unsigned char animator_ticked : 1;
|
||||
unsigned char animator_ran : 1;
|
||||
|
|
|
@ -39,7 +39,6 @@ _efl_ui_spin_efl_object_constructor(Eo *obj, Efl_Ui_Spin_Data *sd)
|
|||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||
|
||||
sd->val_max = 100.0;
|
||||
sd->step = 1.0;
|
||||
|
||||
if (elm_widget_theme_object_set(obj, wd->resize_obj,
|
||||
elm_widget_theme_klass_get(obj),
|
||||
|
@ -97,24 +96,6 @@ _efl_ui_spin_efl_ui_range_display_range_limits_get(const Eo *obj EINA_UNUSED, Ef
|
|||
if (max) *max = sd->val_max;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_spin_efl_ui_range_interactive_range_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Data *sd, double step)
|
||||
{
|
||||
if (step <= 0)
|
||||
{
|
||||
ERR("Wrong param. The step(%lf) should be bigger than 0.0", step);
|
||||
return;
|
||||
}
|
||||
|
||||
sd->step = step;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_ui_spin_efl_ui_range_interactive_range_step_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Data *sd)
|
||||
{
|
||||
return sd->step;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_spin_efl_ui_range_display_range_value_set(Eo *obj, Efl_Ui_Spin_Data *sd, double val)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class @beta Efl.Ui.Spin extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Interactive, Efl.Ui.Format,
|
||||
Efl.Access.Value, Efl.Access.Widget.Action
|
||||
class @beta Efl.Ui.Spin extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Display,
|
||||
Efl.Ui.Format, Efl.Access.Value, Efl.Access.Widget.Action
|
||||
{
|
||||
[[A Spin.
|
||||
|
||||
|
@ -10,7 +10,6 @@ class @beta Efl.Ui.Spin extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Inter
|
|||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
Efl.Ui.Range_Display.range_limits { get; set; }
|
||||
Efl.Ui.Range_Interactive.range_step { get; set; }
|
||||
Efl.Ui.Range_Display.range_value { get; set; }
|
||||
Efl.Ui.Format.apply_formatted_value;
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ _entry_toggle_cb(void *data EINA_UNUSED,
|
|||
static void
|
||||
_spin_value(Efl_Ui_Spin *obj, Eina_Bool inc)
|
||||
{
|
||||
Efl_Ui_Spin_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_CLASS);
|
||||
Efl_Ui_Spin_Button_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_BUTTON_CLASS);
|
||||
|
||||
int absolut_value = efl_ui_range_value_get(obj) + (inc ? pd->step : -pd->step);
|
||||
|
||||
|
@ -643,6 +643,7 @@ _efl_ui_spin_button_efl_object_constructor(Eo *obj, Efl_Ui_Spin_Button_Data *sd)
|
|||
|
||||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||
_sync_widget_theme_klass(obj, sd);
|
||||
sd->step = 1.0;
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
||||
|
||||
|
@ -772,8 +773,7 @@ _efl_ui_spin_button_efl_access_value_value_and_text_set(Eo *obj, Efl_Ui_Spin_But
|
|||
if (pd->val_min > value) return EINA_FALSE;
|
||||
if (pd->val_max < value) return EINA_FALSE;
|
||||
|
||||
pd->val = value;
|
||||
efl_ui_range_value_set(efl_super(obj, MY_CLASS), value);
|
||||
efl_ui_range_value_set(obj, value);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -789,10 +789,8 @@ _efl_ui_spin_button_efl_access_value_range_get(const Eo *obj EINA_UNUSED, Efl_Ui
|
|||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_ui_spin_button_efl_access_value_increment_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd EINA_UNUSED)
|
||||
_efl_ui_spin_button_efl_access_value_increment_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *pd)
|
||||
{
|
||||
Efl_Ui_Spin_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_CLASS);
|
||||
|
||||
return pd->step;
|
||||
}
|
||||
|
||||
|
@ -806,6 +804,31 @@ _efl_ui_spin_button_efl_access_object_i18n_name_get(const Eo *obj, Efl_Ui_Spin_B
|
|||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_spin_button_efl_ui_format_apply_formatted_value(Eo *obj, Efl_Ui_Spin_Button_Data *sd EINA_UNUSED)
|
||||
{
|
||||
_label_write(obj);
|
||||
efl_canvas_group_change(obj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_spin_button_efl_ui_range_interactive_range_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd, double step)
|
||||
{
|
||||
if (step <= 0)
|
||||
{
|
||||
ERR("Wrong param. The step(%lf) should be bigger than 0.0", step);
|
||||
return;
|
||||
}
|
||||
|
||||
sd->step = step;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_ui_spin_button_efl_ui_range_interactive_range_step_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd)
|
||||
{
|
||||
return sd->step;
|
||||
}
|
||||
|
||||
// A11Y Accessibility - END
|
||||
|
||||
#include "efl_ui_spin_button.eo.c"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Composition, Efl.Ui.Layout_Orientable,
|
||||
Efl.Access.Widget.Action
|
||||
class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Composition, Efl.Ui.Layout_Orientable, Efl.Ui.Range_Interactive, Efl.Access.Widget.Action
|
||||
{
|
||||
[[A Button Spin.
|
||||
|
||||
|
@ -72,5 +71,7 @@ class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Compo
|
|||
Efl.Access.Value.range { get; }
|
||||
Efl.Access.Value.increment { get; }
|
||||
Efl.Access.Widget.Action.elm_actions { get; }
|
||||
Efl.Ui.Format.apply_formatted_value;
|
||||
Efl.Ui.Range_Interactive.range_step { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ struct _Efl_Ui_Spin_Button_Data
|
|||
Eina_Future *delay_change_timer; /**< a timer for a delay,changed smart callback */
|
||||
|
||||
Efl_Ui_Layout_Orientation dir;
|
||||
|
||||
double step;
|
||||
Eina_Bool entry_visible : 1;
|
||||
Eina_Bool entry_reactivate : 1;
|
||||
Eina_Bool editable : 1;
|
||||
|
|
|
@ -7,7 +7,6 @@ typedef struct _Efl_Ui_Spin_Data Efl_Ui_Spin_Data;
|
|||
struct _Efl_Ui_Spin_Data
|
||||
{
|
||||
double val, val_min, val_max;
|
||||
double step; /**< step for the value change. 1 by default. */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -595,8 +595,8 @@ _resize_job(void *data)
|
|||
(VIEW(it) == eina_list_nth(list, eina_list_count(list) - 1))))
|
||||
{
|
||||
evas_object_box_remove(sd->bx_more, VIEW(it));
|
||||
evas_object_move(VIEW(it), -9999, -9999);
|
||||
evas_object_hide(VIEW(it));
|
||||
evas_object_move(VIEW(it), -9999, -9999);
|
||||
}
|
||||
}
|
||||
eina_list_free(list);
|
||||
|
@ -608,8 +608,8 @@ _resize_job(void *data)
|
|||
(VIEW(it) == eina_list_nth(list, eina_list_count(list) - 1))))
|
||||
{
|
||||
evas_object_box_remove(sd->bx_more2, VIEW(it));
|
||||
evas_object_move(VIEW(it), -9999, -9999);
|
||||
evas_object_hide(VIEW(it));
|
||||
evas_object_move(VIEW(it), -9999, -9999);
|
||||
}
|
||||
}
|
||||
eina_list_free(list);
|
||||
|
@ -1255,6 +1255,41 @@ _item_shrink_signal_emit(Evas_Object *view, Elm_Toolbar_Shrink_Mode shrink_mode)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_item_fill_align_set(Elm_Toolbar_Data *sd, Elm_Toolbar_Item_Data *it)
|
||||
{
|
||||
if (sd->shrink_mode != ELM_TOOLBAR_SHRINK_EXPAND)
|
||||
{
|
||||
if (it->separator)
|
||||
{
|
||||
if (!efl_ui_layout_orientation_is_horizontal(sd->dir, EINA_TRUE))
|
||||
evas_object_size_hint_weight_set(VIEW(it), -1.0, 0.0);
|
||||
else
|
||||
evas_object_size_hint_weight_set(VIEW(it), 0.0, -1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!efl_ui_layout_orientation_is_horizontal(sd->dir, EINA_TRUE))
|
||||
evas_object_size_hint_weight_set(VIEW(it), EVAS_HINT_EXPAND, 0.0);
|
||||
else
|
||||
evas_object_size_hint_weight_set(VIEW(it), 0.0, EVAS_HINT_EXPAND);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (it->separator)
|
||||
{
|
||||
if (!efl_ui_layout_orientation_is_horizontal(sd->dir, EINA_TRUE))
|
||||
evas_object_size_hint_weight_set(VIEW(it), -1.0, 0.0);
|
||||
else
|
||||
evas_object_size_hint_weight_set(VIEW(it), 0.0, -1.0);
|
||||
}
|
||||
else
|
||||
evas_object_size_hint_weight_set(VIEW(it), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
}
|
||||
evas_object_size_hint_align_set(VIEW(it), EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
}
|
||||
|
||||
static void
|
||||
_item_theme_hook(Evas_Object *obj,
|
||||
Elm_Toolbar_Item_Data *it,
|
||||
|
@ -1324,33 +1359,12 @@ _item_theme_hook(Evas_Object *obj,
|
|||
else
|
||||
elm_layout_signal_emit(view, "elm,orient,horizontal", "elm");
|
||||
|
||||
edje_object_message_signal_process(elm_layout_edje_get(view));
|
||||
if (!it->separator && !it->object)
|
||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||
if (sd->shrink_mode != ELM_TOOLBAR_SHRINK_EXPAND)
|
||||
{
|
||||
if (!efl_ui_layout_orientation_is_horizontal(sd->dir, EINA_TRUE))
|
||||
{
|
||||
evas_object_size_hint_weight_set(view, EVAS_HINT_EXPAND, -1.0);
|
||||
evas_object_size_hint_align_set
|
||||
(view, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_size_hint_weight_set(VIEW(it), -1.0, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set
|
||||
(view, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_size_hint_weight_set
|
||||
(VIEW(it), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set
|
||||
(VIEW(it), EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
}
|
||||
_resizing_eval_item(it);
|
||||
evas_object_smart_need_recalculate_set(obj, EINA_TRUE);
|
||||
edje_object_message_signal_process(elm_layout_edje_get(view));
|
||||
if (!it->separator && !it->object)
|
||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||
_item_fill_align_set(sd, it);
|
||||
_resizing_eval_item(it);
|
||||
evas_object_smart_need_recalculate_set(obj, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2485,6 +2499,8 @@ _item_new(Evas_Object *obj,
|
|||
|
||||
edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
|
||||
|
||||
_item_fill_align_set(sd, it);
|
||||
|
||||
efl_ui_focus_composition_dirty(obj);
|
||||
|
||||
evas_object_event_callback_add
|
||||
|
@ -3080,6 +3096,7 @@ _elm_toolbar_item_insert_before(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *
|
|||
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(_before));
|
||||
evas_object_box_insert_before(sd->bx, VIEW(it), VIEW(_before));
|
||||
_item_theme_hook(obj, it, scale, sd->icon_size);
|
||||
evas_object_show(VIEW(it));
|
||||
sd->item_count++;
|
||||
|
||||
_elm_toolbar_item_order_signal_emit(sd, it, prev_list, EINA_FALSE);
|
||||
|
@ -3109,6 +3126,7 @@ _elm_toolbar_item_insert_after(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *e
|
|||
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(_after));
|
||||
evas_object_box_insert_after(sd->bx, VIEW(it), VIEW(_after));
|
||||
_item_theme_hook(obj, it, scale, sd->icon_size);
|
||||
evas_object_show(VIEW(it));
|
||||
sd->item_count++;
|
||||
|
||||
_elm_toolbar_item_order_signal_emit(sd, it, prev_list, EINA_FALSE);
|
||||
|
@ -3349,7 +3367,7 @@ _elm_toolbar_item_separator_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *
|
|||
item->separator = separator;
|
||||
scale = (efl_gfx_entity_scale_get(obj) * elm_config_scale_get());
|
||||
_item_theme_hook(obj, item, scale, sd->icon_size);
|
||||
evas_object_size_hint_min_set(VIEW(item), -1, -1);
|
||||
_item_fill_align_set(sd, item);
|
||||
if (separator) sd->separator_count++;
|
||||
else sd->separator_count--;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ typedef struct {
|
|||
|
||||
#define MY_CLASS EFL_INPUT_CLICKABLE_MIXIN
|
||||
|
||||
#define DOUBLE_CLICK_TIME ((double)0.1) //in seconds
|
||||
#define DOUBLE_CLICK_TIME ((double)0.25) //in seconds
|
||||
#define LONGPRESS_TIMEOUT ((double)1.0) //in seconds
|
||||
|
||||
static void
|
||||
|
|
|
@ -80,20 +80,16 @@ struct _Ecore_Evas_Engine_Data_X11 {
|
|||
Ecore_X_XRegion *damages;
|
||||
Ecore_Timer *outdelay;
|
||||
Ecore_X_Event_Mouse_Out out_ev;
|
||||
Ecore_X_Sync_Counter sync_counter;
|
||||
Ecore_X_Window leader;
|
||||
Ecore_X_Sync_Counter netwm_sync_counter;
|
||||
int configure_reqs;
|
||||
int netwm_sync_val_hi;
|
||||
unsigned int netwm_sync_val_lo;
|
||||
int sync_val; // bigger! this will screw up at 2 billion fram~
|
||||
int screen_num;
|
||||
int px, py, pw, ph;
|
||||
unsigned char direct_resize : 1;
|
||||
unsigned char using_bg_pixmap : 1;
|
||||
unsigned char managed : 1;
|
||||
unsigned char sync_began : 1;
|
||||
unsigned char sync_cancel : 1;
|
||||
unsigned char netwm_sync_set : 1;
|
||||
unsigned char configure_coming : 1;
|
||||
struct {
|
||||
|
@ -251,44 +247,6 @@ _ecore_evas_x_protocols_set(Ecore_Evas *ee)
|
|||
&tmp, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_x_sync_set(Ecore_Evas *ee)
|
||||
{
|
||||
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
|
||||
Ecore_X_Sync_Counter sync_counter = edata->sync_counter;
|
||||
|
||||
if (ee->deleted) return;
|
||||
if (((ee->should_be_visible) || (ee->visible)) &&
|
||||
((ecore_x_e_comp_sync_supported_get(edata->win_root)) &&
|
||||
(!ee->no_comp_sync) && (_ecore_evas_app_comp_sync)))
|
||||
{
|
||||
if (!edata->sync_counter)
|
||||
edata->sync_counter = ecore_x_sync_counter_new(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (edata->sync_counter)
|
||||
{
|
||||
ecore_x_sync_counter_free(edata->sync_counter);
|
||||
edata->sync_val = 0;
|
||||
}
|
||||
edata->sync_counter = 0;
|
||||
}
|
||||
if ((!edata->destroyed) && (sync_counter != edata->sync_counter))
|
||||
ecore_x_e_comp_sync_counter_set(ee->prop.window, edata->sync_counter);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_x_sync_clear(Ecore_Evas *ee)
|
||||
{
|
||||
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
|
||||
|
||||
if (!edata->sync_counter) return;
|
||||
ecore_x_sync_counter_free(edata->sync_counter);
|
||||
edata->sync_val = 0;
|
||||
edata->sync_counter = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_x_wm_rotation_protocol_set(Ecore_Evas *ee)
|
||||
{
|
||||
|
@ -766,12 +724,6 @@ static int
|
|||
_ecore_evas_x_render(Ecore_Evas *ee)
|
||||
{
|
||||
int rend = 0;
|
||||
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
|
||||
|
||||
if ((!ee->no_comp_sync) && (_ecore_evas_app_comp_sync) &&
|
||||
(edata->sync_counter) && (!edata->sync_began) &&
|
||||
(!edata->sync_cancel))
|
||||
return 0;
|
||||
|
||||
if (ee->in_async_render)
|
||||
{
|
||||
|
@ -1090,43 +1042,8 @@ _ecore_evas_x_event_client_message(void *data EINA_UNUSED, int type EINA_UNUSED,
|
|||
|
||||
e = event;
|
||||
if (e->format != 32) return ECORE_CALLBACK_PASS_ON;
|
||||
if (e->message_type == ECORE_X_ATOM_E_COMP_SYNC_BEGIN)
|
||||
{
|
||||
ee = ecore_event_window_match(e->data.l[0]);
|
||||
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
|
||||
edata = ee->engine.data;
|
||||
if (e->data.l[0] != (long)ee->prop.window)
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
if (!edata->sync_began)
|
||||
{
|
||||
// qeue a damage + draw. work around an event re-ordering thing.
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
||||
}
|
||||
edata->sync_began = 1;
|
||||
edata->sync_cancel = 0;
|
||||
}
|
||||
else if (e->message_type == ECORE_X_ATOM_E_COMP_SYNC_END)
|
||||
{
|
||||
ee = ecore_event_window_match(e->data.l[0]);
|
||||
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
|
||||
edata = ee->engine.data;
|
||||
if (e->data.l[0] != (long)ee->prop.window)
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
edata->sync_began = 0;
|
||||
edata->sync_cancel = 0;
|
||||
}
|
||||
else if (e->message_type == ECORE_X_ATOM_E_COMP_SYNC_CANCEL)
|
||||
{
|
||||
ee = ecore_event_window_match(e->data.l[0]);
|
||||
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
|
||||
edata = ee->engine.data;
|
||||
if (e->data.l[0] != (long)ee->prop.window)
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
edata->sync_began = 0;
|
||||
edata->sync_cancel = 1;
|
||||
}
|
||||
else if ((e->message_type == ECORE_X_ATOM_WM_PROTOCOLS) &&
|
||||
(e->data.l[0] == (int)ECORE_X_ATOM_NET_WM_SYNC_REQUEST))
|
||||
if ((e->message_type == ECORE_X_ATOM_WM_PROTOCOLS) &&
|
||||
(e->data.l[0] == (int)ECORE_X_ATOM_NET_WM_SYNC_REQUEST))
|
||||
{
|
||||
ee = ecore_event_window_match(e->win);
|
||||
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
|
||||
|
@ -1594,7 +1511,6 @@ _ecore_evas_x_event_window_destroy(void *data EINA_UNUSED, int type EINA_UNUSED,
|
|||
edata = ee->engine.data;
|
||||
if (ee->func.fn_destroy) ee->func.fn_destroy(ee);
|
||||
edata->destroyed = 1;
|
||||
_ecore_evas_x_sync_clear(ee);
|
||||
ecore_evas_free(ee);
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
@ -1779,15 +1695,6 @@ _ecore_evas_x_event_window_show(void *data EINA_UNUSED, int type EINA_UNUSED, vo
|
|||
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
|
||||
if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
|
||||
|
||||
if (ee->gl_sync_draw_done < 0)
|
||||
{
|
||||
char *sync = getenv("ECORE_EVAS_GL_SYNC_DRAW_DONE");
|
||||
if (sync && (atoi(sync) == 1))
|
||||
ee->gl_sync_draw_done = 1;
|
||||
else
|
||||
ee->gl_sync_draw_done = 0;
|
||||
}
|
||||
|
||||
if (first_map_bug < 0)
|
||||
{
|
||||
char *bug = NULL;
|
||||
|
@ -2081,8 +1988,6 @@ _ecore_evas_x_free(Ecore_Evas *ee)
|
|||
}
|
||||
|
||||
_ecore_evas_x_group_leader_unset(ee);
|
||||
if (edata->sync_counter)
|
||||
ecore_x_sync_counter_free(edata->sync_counter);
|
||||
if (edata->netwm_sync_counter)
|
||||
ecore_x_sync_counter_free(edata->netwm_sync_counter);
|
||||
if (edata->win_shaped_input)
|
||||
|
@ -2123,7 +2028,6 @@ _ecore_evas_x_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb fu
|
|||
{
|
||||
ee->func.fn_delete_request = func;
|
||||
_ecore_evas_x_protocols_set(ee);
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2702,7 +2606,6 @@ _alpha_do(Ecore_Evas *ee, int alpha)
|
|||
|
||||
ee->shaped = 0;
|
||||
ee->alpha = alpha;
|
||||
_ecore_evas_x_sync_clear(ee);
|
||||
ecore_x_window_free(ee->prop.window);
|
||||
ecore_event_window_unregister(ee->prop.window);
|
||||
if (ee->alpha)
|
||||
|
@ -2772,7 +2675,6 @@ _alpha_do(Ecore_Evas *ee, int alpha)
|
|||
_ecore_evas_x_wm_rotation_protocol_set(ee);
|
||||
_ecore_evas_x_aux_hints_supported_update(ee);
|
||||
_ecore_evas_x_aux_hints_update(ee);
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
_ecore_evas_x_size_pos_hints_update(ee);
|
||||
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
|
||||
if ((id = getenv("DESKTOP_STARTUP_ID")))
|
||||
|
@ -2822,7 +2724,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
|||
|
||||
ee->shaped = 0;
|
||||
ee->alpha = alpha;
|
||||
_ecore_evas_x_sync_clear(ee);
|
||||
prev_win = ee->prop.window;
|
||||
ee->prop.window = 0;
|
||||
|
||||
|
@ -2928,7 +2829,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
|||
_ecore_evas_x_wm_rotation_protocol_set(ee);
|
||||
_ecore_evas_x_aux_hints_supported_update(ee);
|
||||
_ecore_evas_x_aux_hints_update(ee);
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
_ecore_evas_x_size_pos_hints_update(ee);
|
||||
#endif /* BUILD_ECORE_EVAS_OPENGL_X11 */
|
||||
if ((id = getenv("DESKTOP_STARTUP_ID")))
|
||||
|
@ -3074,7 +2974,6 @@ _ecore_evas_x_show(Ecore_Evas *ee)
|
|||
ee->should_be_visible = 1;
|
||||
if (ee->prop.avoid_damage)
|
||||
_ecore_evas_x_render(ee);
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
_ecore_evas_x_window_profile_set(ee);
|
||||
if (!ee->prop.withdrawn) _ecore_evas_x_hints_update(ee);
|
||||
else
|
||||
|
@ -3092,7 +2991,6 @@ _ecore_evas_x_hide(Ecore_Evas *ee)
|
|||
{
|
||||
ecore_x_window_hide(ee->prop.window);
|
||||
ee->should_be_visible = 0;
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3912,26 +3810,6 @@ _ecore_evas_x_render_pre(void *data, Evas *e EINA_UNUSED, void *event_info EINA_
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_x_flush_pre(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Ecore_Evas *ee = data;
|
||||
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
|
||||
|
||||
if (ee->no_comp_sync) return;
|
||||
if (!_ecore_evas_app_comp_sync) return;
|
||||
if (!edata->sync_counter) return;
|
||||
if (!edata->sync_began) return;
|
||||
|
||||
edata->sync_val++;
|
||||
if (!edata->sync_cancel)
|
||||
{
|
||||
if (!ee->semi_sync)
|
||||
ecore_x_sync_counter_val_wait(edata->sync_counter,
|
||||
edata->sync_val);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_x_flush_post(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
|
@ -3998,24 +3876,6 @@ _ecore_evas_x_flush_post(void *data, Evas *e EINA_UNUSED, void *event_info EINA_
|
|||
}
|
||||
}
|
||||
|
||||
if ((!ee->no_comp_sync) && (_ecore_evas_app_comp_sync) &&
|
||||
(ee->gl_sync_draw_done != 1))
|
||||
{
|
||||
if (edata->sync_counter)
|
||||
{
|
||||
if (edata->sync_began)
|
||||
{
|
||||
if (!edata->sync_cancel)
|
||||
{
|
||||
if (ee->prop.window)
|
||||
{
|
||||
ecore_x_e_comp_sync_draw_size_done_send
|
||||
(edata->win_root, ee->prop.window, ee->w, ee->h);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (edata->netwm_sync_set)
|
||||
{
|
||||
ecore_x_sync_counter_2_set(edata->netwm_sync_counter,
|
||||
|
@ -4119,8 +3979,6 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
|
|||
return NULL;
|
||||
}
|
||||
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
|
||||
_ecore_evas_x_flush_pre, ee);
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST,
|
||||
_ecore_evas_x_flush_post, ee);
|
||||
if (ee->can_async_render)
|
||||
|
@ -4239,7 +4097,6 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
|
|||
_ecore_evas_x_wm_rotation_protocol_set(ee);
|
||||
_ecore_evas_x_aux_hints_supported_update(ee);
|
||||
_ecore_evas_x_aux_hints_update(ee);
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
|
||||
ee->engine.func->fn_render = _ecore_evas_x_render;
|
||||
ee->draw_block = EINA_TRUE;
|
||||
|
@ -4321,8 +4178,6 @@ ecore_evas_software_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Windo
|
|||
return NULL;
|
||||
}
|
||||
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
|
||||
_ecore_evas_x_flush_pre, ee);
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST,
|
||||
_ecore_evas_x_flush_post, ee);
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE,
|
||||
|
@ -4454,7 +4309,6 @@ ecore_evas_software_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Windo
|
|||
/* ecore_x_window_defaults_set(ee->prop.window); */
|
||||
/* _ecore_evas_x_protocols_set(ee); */
|
||||
/* _ecore_evas_x_window_profile_protocol_set(ee); */
|
||||
/* _ecore_evas_x_sync_set(ee); */
|
||||
|
||||
ee->engine.func->fn_render = _ecore_evas_x_render;
|
||||
_ecore_evas_register(ee);
|
||||
|
@ -4599,20 +4453,11 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
|
|||
|
||||
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
|
||||
|
||||
ee->gl_sync_draw_done = -1;
|
||||
|
||||
_ecore_evas_x_init();
|
||||
|
||||
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
|
||||
|
||||
ee->driver = "opengl_x11";
|
||||
#if 1
|
||||
ee->semi_sync = 0; // gl engine doesn't need to sync - its whole swaps
|
||||
#else
|
||||
if (!getenv("ECORE_EVAS_COMP_NOSEMISYNC"))
|
||||
ee->semi_sync = 1; // gl engine doesn't need to sync - its whole swaps
|
||||
// ee->no_comp_sync = 1; // gl engine doesn't need to sync - its whole swaps
|
||||
#endif
|
||||
if (disp_name) ee->name = strdup(disp_name);
|
||||
|
||||
if (w < 1) w = 1;
|
||||
|
@ -4641,7 +4486,6 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
|
|||
ecore_evas_free(ee);
|
||||
return NULL;
|
||||
}
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, _ecore_evas_x_flush_pre, ee);
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, _ecore_evas_x_flush_post, ee);
|
||||
evas_output_method_set(ee->evas, rmethod);
|
||||
|
||||
|
@ -4687,7 +4531,6 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
|
|||
_ecore_evas_x_wm_rotation_protocol_set(ee);
|
||||
_ecore_evas_x_aux_hints_supported_update(ee);
|
||||
_ecore_evas_x_aux_hints_update(ee);
|
||||
_ecore_evas_x_sync_set(ee);
|
||||
|
||||
ee->draw_block = 1;
|
||||
|
||||
|
@ -4740,20 +4583,11 @@ ecore_evas_gl_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window pare
|
|||
|
||||
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
|
||||
|
||||
ee->gl_sync_draw_done = -1;
|
||||
|
||||
_ecore_evas_x_init();
|
||||
|
||||
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
|
||||
|
||||
ee->driver = "opengl_x11";
|
||||
#if 1
|
||||
ee->semi_sync = 0; // gl engine doesn't need to sync - its whole swaps
|
||||
#else
|
||||
if (!getenv("ECORE_EVAS_COMP_NOSEMISYNC"))
|
||||
ee->semi_sync = 1; // gl engine doesn't need to sync - its whole swaps
|
||||
// ee->no_comp_sync = 1; // gl engine doesn't need to sync - its whole swaps
|
||||
#endif
|
||||
if (disp_name) ee->name = strdup(disp_name);
|
||||
|
||||
if (w < 1) w = 1;
|
||||
|
@ -4781,8 +4615,6 @@ ecore_evas_gl_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window pare
|
|||
ecore_evas_free(ee);
|
||||
return NULL;
|
||||
}
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
|
||||
_ecore_evas_x_flush_pre, ee);
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST,
|
||||
_ecore_evas_x_flush_post, ee);
|
||||
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE,
|
||||
|
@ -4884,7 +4716,6 @@ ecore_evas_gl_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window pare
|
|||
/* ecore_x_window_defaults_set(ee->prop.window); */
|
||||
/* _ecore_evas_x_protocols_set(ee); */
|
||||
/* _ecore_evas_x_window_profile_protocol_set(ee); */
|
||||
/* _ecore_evas_x_sync_set(ee); */
|
||||
|
||||
ee->engine.func->fn_render = _ecore_evas_x_render;
|
||||
_ecore_evas_register(ee);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
/* spec-meta-start
|
||||
{"test-interface":"Efl.Ui.Range_Display_Interactive",
|
||||
"test-widgets": ["Efl.Ui.Spin", "Efl.Ui.Slider", "Efl.Ui.Spin_Button"]}
|
||||
"test-widgets": ["Efl.Ui.Slider", "Efl.Ui.Spin_Button"]}
|
||||
spec-meta-end */
|
||||
|
||||
EFL_START_TEST(step_setting)
|
||||
|
@ -52,8 +52,6 @@ EFL_START_TEST(steady_event)
|
|||
Evas *e;
|
||||
int count = 0;
|
||||
|
||||
if (efl_isa(widget, EFL_UI_SPIN_CLASS)) return;
|
||||
|
||||
efl_event_callback_add(widget, EFL_UI_RANGE_EVENT_STEADY, _steady_cb, &count),
|
||||
efl_ui_range_limits_set(widget, 0, 100);
|
||||
efl_ui_range_step_set(widget, 10);
|
||||
|
|
Loading…
Reference in New Issue