forked from enlightenment/efl
Merge branch 'master' into devs/hermet/lottie
This commit is contained in:
commit
efe0887552
62
po/es.po
62
po/es.po
|
@ -3,21 +3,20 @@
|
|||
# This file is put in the public domain.
|
||||
# Aníbal Garrido <khany@member.trisquel.info>, 2012.
|
||||
# Adrián Arévalo <adri58@gmail.com>, 2015.
|
||||
# Roy W. Reese <waterbearer54@gmx.com> 2015.
|
||||
#: src/lib/elementary/elm_config.c:4135
|
||||
# Roy W. Reese <waterbearer54@gmx.com>, 2019.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: elementary\n"
|
||||
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2019-04-15 12:03+0100\n"
|
||||
"PO-Revision-Date: 2015-05-03 18:19+0100\n"
|
||||
"Last-Translator: Adrián Arévalo <adri58@gmail.com>\n"
|
||||
"PO-Revision-Date: 2019-07-09 10:28+0200\n"
|
||||
"Last-Translator: Roy W. Reese <waterbearer54@gmx.com>\n"
|
||||
"Language-Team: Enlightenment Team\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.7.5\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
|
||||
#: src/lib/ecore/ecore_getopt.c:89
|
||||
msgid "Version:"
|
||||
|
@ -92,7 +91,7 @@ msgstr "ERROR: "
|
|||
#: src/lib/ecore/ecore_getopt.c:1300 src/lib/ecore/ecore_getopt.c:1347
|
||||
#: src/lib/ecore/ecore_getopt.c:1467 src/lib/ecore/ecore_getopt.c:1508
|
||||
msgid "value has no pointer set.\n"
|
||||
msgstr "no se definió el valor.\n"
|
||||
msgstr "valor sin puntero establecido.\n"
|
||||
|
||||
#: src/lib/ecore/ecore_getopt.c:1144 src/lib/ecore/ecore_getopt.c:1367
|
||||
#, c-format
|
||||
|
@ -107,15 +106,15 @@ msgstr "formato numérico inválido %s\n"
|
|||
#: src/lib/ecore/ecore_getopt.c:1313
|
||||
#, c-format
|
||||
msgid "invalid choice \"%s\". Valid values are: "
|
||||
msgstr "Elección inválida \"%s\". Los valores válidos son:"
|
||||
msgstr "elección inválida \"%s\". Los valores válidos son:"
|
||||
|
||||
#: src/lib/ecore/ecore_getopt.c:1341
|
||||
msgid "missing parameter to append.\n"
|
||||
msgstr "falta parámetro a añadir.\n"
|
||||
msgstr "falta parámetro a anexionar.\n"
|
||||
|
||||
#: src/lib/ecore/ecore_getopt.c:1445
|
||||
msgid "could not parse value.\n"
|
||||
msgstr "incapaz de procesar el valor.\n"
|
||||
msgstr "incapaz de analizar el valor.\n"
|
||||
|
||||
#: src/lib/ecore/ecore_getopt.c:1502
|
||||
msgid "missing parameter.\n"
|
||||
|
@ -270,8 +269,9 @@ msgid "State: Disabled"
|
|||
msgstr "Estado: Desactivado"
|
||||
|
||||
#: src/lib/elementary/elc_hoversel.c:652
|
||||
#, fuzzy
|
||||
msgid "Hoversel"
|
||||
msgstr ""
|
||||
msgstr "Hoversel"
|
||||
|
||||
#: src/lib/elementary/elc_multibuttonentry.c:682
|
||||
msgid "multi button entry label"
|
||||
|
@ -291,9 +291,8 @@ msgid "Title"
|
|||
msgstr "Título"
|
||||
|
||||
#: src/lib/elementary/elc_naviframe.c:415
|
||||
#, fuzzy
|
||||
msgid "Subtitle"
|
||||
msgstr "Título"
|
||||
msgstr "Subtítulo"
|
||||
|
||||
#: src/lib/elementary/elc_naviframe.c:968
|
||||
#: src/lib/elementary/elc_naviframe.c:1186
|
||||
|
@ -305,18 +304,16 @@ msgid "Next"
|
|||
msgstr "Siguiente"
|
||||
|
||||
#: src/lib/elementary/elc_popup.c:320 src/lib/elementary/elc_popup.c:984
|
||||
#, fuzzy
|
||||
msgid "Popup Title"
|
||||
msgstr "Nombre emergente"
|
||||
msgstr "Título del cuadro emergente"
|
||||
|
||||
#: src/lib/elementary/elc_popup.c:330 src/lib/elementary/elc_popup.c:1060
|
||||
#, fuzzy
|
||||
msgid "Popup Body Text"
|
||||
msgstr "Texto emergente"
|
||||
msgstr "Texto del cuadro emergente"
|
||||
|
||||
#: src/lib/elementary/elc_popup.c:1836
|
||||
msgid "Alert"
|
||||
msgstr ""
|
||||
msgstr "Alerta"
|
||||
|
||||
#: src/lib/elementary/elm_bubble.c:163
|
||||
msgid "Bubble"
|
||||
|
@ -376,16 +373,17 @@ msgstr "mes del calendario"
|
|||
msgid "calendar year"
|
||||
msgstr "año del calendario"
|
||||
|
||||
# RR: Traducción italiana usa ativado/desactivado. No sé a que refiere la cadena.
|
||||
# RR: antiguamente "conectado"
|
||||
#: src/lib/elementary/efl_ui_check.c:76 src/lib/elementary/efl_ui_check.c:200
|
||||
#: src/lib/elementary/efl_ui_radio.c:136 src/lib/elementary/efl_ui_radio.c:202
|
||||
msgid "State: On"
|
||||
msgstr "Estado: Conectado"
|
||||
msgstr "Estado: Habilitado"
|
||||
|
||||
# RR: antinguamente "desconectado"
|
||||
#: src/lib/elementary/efl_ui_check.c:96 src/lib/elementary/efl_ui_check.c:212
|
||||
#: src/lib/elementary/efl_ui_radio.c:204
|
||||
msgid "State: Off"
|
||||
msgstr "Estado: Desconectado"
|
||||
msgstr "Estado: Deshabilitado"
|
||||
|
||||
#: src/lib/elementary/efl_ui_check.c:196 src/lib/elementary/efl_ui_check.c:209
|
||||
msgid "State"
|
||||
|
@ -411,30 +409,31 @@ msgstr "Estado: Editable"
|
|||
msgid "Clock"
|
||||
msgstr "Reloj"
|
||||
|
||||
# RR: Siguentes colores usan las letras initiales del inglés
|
||||
#: src/lib/elementary/elm_colorselector.c:939
|
||||
msgid "Pick a color"
|
||||
msgstr ""
|
||||
msgstr "Elija un color"
|
||||
|
||||
#: src/lib/elementary/elm_colorselector.c:977
|
||||
msgid "R:"
|
||||
msgstr ""
|
||||
msgstr "R:"
|
||||
|
||||
#: src/lib/elementary/elm_colorselector.c:979
|
||||
msgid "G:"
|
||||
msgstr ""
|
||||
msgstr "G:"
|
||||
|
||||
#: src/lib/elementary/elm_colorselector.c:981
|
||||
msgid "B:"
|
||||
msgstr ""
|
||||
msgstr "B:"
|
||||
|
||||
#: src/lib/elementary/elm_colorselector.c:983
|
||||
msgid "A:"
|
||||
msgstr ""
|
||||
msgstr "A:"
|
||||
|
||||
# RR: Antiguamente - "Paleta de selección de color", pero creo que refiere a un selector como en las cadenas más abajo.
|
||||
#: src/lib/elementary/elm_colorselector.c:1707
|
||||
msgid "color selector palette item"
|
||||
msgstr "Selector de color de paleta"
|
||||
msgstr "selector de color de paleta"
|
||||
|
||||
#. TRANSLATORS: This string is special and defines if the language
|
||||
#. by default is a Left To Right or Right To Left language. Most
|
||||
|
@ -448,11 +447,11 @@ msgstr "default:LTR"
|
|||
|
||||
#: src/lib/elementary/elm_dayselector.c:437
|
||||
msgid "day selector item"
|
||||
msgstr "Selector de día"
|
||||
msgstr "selector de día"
|
||||
|
||||
#: src/lib/elementary/elm_diskselector.c:701
|
||||
msgid "diskselector item"
|
||||
msgstr "Selector de disco"
|
||||
msgstr "selector de disco"
|
||||
|
||||
#: src/lib/elementary/elm_entry.c:1749
|
||||
msgid "Cut"
|
||||
|
@ -533,11 +532,11 @@ msgstr "deslizador"
|
|||
|
||||
#: src/lib/elementary/elm_spinner.c:1071
|
||||
msgid "incremented"
|
||||
msgstr ""
|
||||
msgstr "incrementado"
|
||||
|
||||
#: src/lib/elementary/elm_spinner.c:1077
|
||||
msgid "decremented"
|
||||
msgstr ""
|
||||
msgstr "decrementado"
|
||||
|
||||
#: src/lib/elementary/elm_spinner.c:1110 src/lib/elementary/elm_spinner.c:1177
|
||||
msgid "spinner"
|
||||
|
@ -552,9 +551,8 @@ msgid "spinner decrement button"
|
|||
msgstr "botón de decremento del spinner"
|
||||
|
||||
#: src/lib/elementary/elm_spinner.c:1124
|
||||
#, fuzzy
|
||||
msgid "spinner text"
|
||||
msgstr "spinner"
|
||||
msgstr "text del spinner"
|
||||
|
||||
#: src/lib/elementary/elm_toolbar.c:1753 src/lib/elementary/elm_toolbar.c:2355
|
||||
msgid "Selected"
|
||||
|
|
|
@ -147,7 +147,7 @@ _ecore_event_message_handler_handler_add(Eo *obj EINA_UNUSED, Ecore_Event_Messag
|
|||
{
|
||||
Handler *h;
|
||||
|
||||
if ((type < 0) || (type > pd->event_type_count) || (!func)) return NULL;
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL((type <= 0) || (type > pd->event_type_count) || (!func), NULL);
|
||||
h = calloc(1, sizeof(Handler));
|
||||
if (!h) return NULL;
|
||||
h->func = func;
|
||||
|
|
|
@ -197,7 +197,7 @@ _efl_composite_model_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Composite_Mo
|
|||
properties = efl_model_properties_get(pd->source);
|
||||
EINA_ITERATOR_FOREACH(properties, property)
|
||||
{
|
||||
if (!strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
if (eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
{
|
||||
pd->need_index = EINA_FALSE;
|
||||
break;
|
||||
|
@ -216,7 +216,7 @@ static Eina_Future *
|
|||
_efl_composite_model_efl_model_property_set(Eo *obj, Efl_Composite_Model_Data *pd,
|
||||
const char *property, Eina_Value *value)
|
||||
{
|
||||
if (pd->need_index && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
if (pd->need_index && eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
{
|
||||
if (pd->set_index || !pd->source)
|
||||
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
|
||||
|
@ -233,7 +233,7 @@ _efl_composite_model_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Compo
|
|||
const char *property)
|
||||
{
|
||||
Eina_Value *try;
|
||||
if (pd->need_index && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
if (pd->need_index && eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
{
|
||||
if (pd->set_index)
|
||||
return eina_value_uint_new(pd->index);
|
||||
|
|
|
@ -551,7 +551,7 @@ static Eina_Value *
|
|||
_efl_filter_model_efl_model_property_get(const Eo *obj, Efl_Filter_Model_Data *pd,
|
||||
const char *property)
|
||||
{
|
||||
if (pd->self && !strcmp(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
if (pd->self && eina_streq(property, EFL_COMPOSITE_MODEL_CHILD_INDEX))
|
||||
{
|
||||
return eina_value_uint64_new(pd->self->mapped);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ _propagate_future(void *data, const Efl_Event *event)
|
|||
Efl_Loop_Model_Watcher_Data *wd = data;
|
||||
|
||||
EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, it)
|
||||
if (property == wd->property || !strcmp(property, wd->property))
|
||||
if (property == wd->property || eina_streq(property, wd->property))
|
||||
{
|
||||
Eina_Value *v = efl_model_property_get(wd->obj, wd->property);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ struct _Efl_Select_Model_Data
|
|||
Efl_Select_Model_Data *parent;
|
||||
unsigned long last;
|
||||
|
||||
Eina_Bool exclusive : 1;
|
||||
Eina_Bool single_selection : 1;
|
||||
Eina_Bool none : 1;
|
||||
};
|
||||
|
||||
|
@ -247,7 +247,7 @@ _efl_select_model_efl_model_properties_get(const Eo *obj,
|
|||
EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
|
||||
obj, EFL_SELECT_MODEL_CLASS,
|
||||
NULL,
|
||||
"self.selected", "child.selected", "exclusive");
|
||||
"self.selected", "child.selected", "single_selection");
|
||||
return props;
|
||||
}
|
||||
|
||||
|
@ -258,24 +258,24 @@ _efl_select_model_efl_model_property_set(Eo *obj,
|
|||
{
|
||||
Eina_Value vf = EINA_VALUE_EMPTY;
|
||||
|
||||
if (!strcmp("exclusive", property))
|
||||
if (eina_streq("single_selection", property))
|
||||
{
|
||||
Eina_Bool exclusive = pd->exclusive;
|
||||
Eina_Bool single_selection = pd->single_selection;
|
||||
Eina_Bool changed;
|
||||
|
||||
vf = eina_value_bool_init(exclusive);
|
||||
vf = eina_value_bool_init(single_selection);
|
||||
eina_value_convert(value, &vf);
|
||||
eina_value_bool_get(&vf, &exclusive);
|
||||
eina_value_bool_get(&vf, &single_selection);
|
||||
|
||||
changed = (!pd->exclusive != !exclusive);
|
||||
pd->exclusive = !!exclusive;
|
||||
changed = (!pd->single_selection != !single_selection);
|
||||
pd->single_selection = !!single_selection;
|
||||
|
||||
if (changed) efl_model_properties_changed(obj, "exclusive");
|
||||
if (changed) efl_model_properties_changed(obj, "single_selection");
|
||||
|
||||
return efl_loop_future_resolved(obj, vf);
|
||||
}
|
||||
|
||||
if (!strcmp("child.selected", property))
|
||||
if (eina_streq("child.selected", property))
|
||||
{
|
||||
unsigned long l = 0;
|
||||
|
||||
|
@ -288,10 +288,10 @@ _efl_select_model_efl_model_property_set(Eo *obj,
|
|||
.free = _clear_child);
|
||||
}
|
||||
|
||||
if (pd->parent && !strcmp("self.selected", property))
|
||||
if (pd->parent && eina_streq("self.selected", property))
|
||||
{
|
||||
Eina_Bool prevflag = EINA_FALSE, newflag = EINA_FALSE;
|
||||
Eina_Bool exclusive = EINA_FALSE;
|
||||
Eina_Bool single_selection = EINA_FALSE;
|
||||
Eina_Bool success;
|
||||
Eina_Value *prev;
|
||||
Eina_Future *chain;
|
||||
|
@ -306,14 +306,14 @@ _efl_select_model_efl_model_property_set(Eo *obj,
|
|||
if (newflag == prevflag)
|
||||
return efl_loop_future_resolved(obj, eina_value_bool_init(newflag));
|
||||
|
||||
exclusive = pd->parent->exclusive;
|
||||
single_selection = pd->parent->single_selection;
|
||||
|
||||
// First store the new value in the boolean model we inherit from
|
||||
chain = efl_model_property_set(efl_super(obj, EFL_SELECT_MODEL_CLASS),
|
||||
"selected", value);
|
||||
|
||||
// Now act !
|
||||
if (exclusive)
|
||||
if (single_selection)
|
||||
{
|
||||
// We are here either, because we weren't and are after this call
|
||||
// or because we were selected and are not anymore. In the later case,
|
||||
|
@ -364,10 +364,10 @@ _efl_select_model_efl_model_property_set(Eo *obj,
|
|||
static Eina_Value *
|
||||
_efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *pd, const char *property)
|
||||
{
|
||||
if (!strcmp("exclusive", property))
|
||||
return eina_value_bool_new(pd->exclusive);
|
||||
if (eina_streq("single_selection", property))
|
||||
return eina_value_bool_new(pd->single_selection);
|
||||
// Last selected child
|
||||
if (!strcmp("child.selected", property))
|
||||
if (eina_streq("child.selected", property))
|
||||
{
|
||||
if (pd->none)
|
||||
return eina_value_error_new(EFL_MODEL_ERROR_INCORRECT_VALUE);
|
||||
|
@ -375,7 +375,7 @@ _efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *p
|
|||
return eina_value_ulong_new(pd->last);
|
||||
}
|
||||
// Redirect to are we ourself selected
|
||||
if (pd->parent && !strcmp("self.selected", property))
|
||||
if (pd->parent && eina_streq("self.selected", property))
|
||||
{
|
||||
return efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), "selected");
|
||||
}
|
||||
|
@ -383,4 +383,28 @@ _efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *p
|
|||
return efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), property);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_select_model_single_selection_set(Eo *obj EINA_UNUSED, Efl_Select_Model_Data *pd, Eina_Bool enable)
|
||||
{
|
||||
pd->single_selection = enable;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_efl_select_model_single_selection_get(const Eo *obj EINA_UNUSED, Efl_Select_Model_Data *pd)
|
||||
{
|
||||
return pd->single_selection;
|
||||
}
|
||||
|
||||
static Eina_Iterator *
|
||||
_efl_select_model_selected_get(Eo *obj, Efl_Select_Model_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return efl_boolean_model_boolean_iterator_get(obj, "selected", EINA_TRUE);
|
||||
}
|
||||
|
||||
static Eina_Iterator *
|
||||
_efl_select_model_unselected_get(Eo *obj, Efl_Select_Model_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return efl_boolean_model_boolean_iterator_get(obj, "selected", EINA_FALSE);
|
||||
}
|
||||
|
||||
#include "efl_select_model.eo.c"
|
||||
|
|
|
@ -1,6 +1,27 @@
|
|||
class @beta Efl.Select_Model extends Efl.Boolean_Model
|
||||
{
|
||||
[[Efl select model class]]
|
||||
methods {
|
||||
selected_get {
|
||||
[[Get an iterator of all the selected child of this model.
|
||||
]]
|
||||
return: iterator<uint64>; [[The iterator give indexes of selected child. It is valid until any change is made on the model.]]
|
||||
}
|
||||
unselected_get {
|
||||
[[Get an iterator of all the child of this model that are not selected.
|
||||
]]
|
||||
return: iterator<uint64>; [[The iterator give indexes of unselected child. It is valid until any change is made on the model.]]
|
||||
}
|
||||
@property single_selection {
|
||||
[[Define if we support only one exclusive selection at a time when set to $true.
|
||||
|
||||
If disable with $false, it will have the behavior of a multi select mode.
|
||||
]]
|
||||
values {
|
||||
enable: bool; [[$true will enable the exclusive mode.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
Efl.Model.property { get; set; }
|
||||
|
|
|
@ -1035,16 +1035,20 @@ EAPI void *ecore_imf_context_client_canvas_get(Ecore_IMF
|
|||
* @brief Asks the Input Method Context to show itself.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_input_panel_show() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
* @brief Asks the Input Method Context to hide itself.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_input_panel_hide() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
|
@ -1426,8 +1430,10 @@ EAPI Eina_Bool ecore_imf_context_selection_get(Ecore_IMF_Con
|
|||
* ecore_imf_context_event_callback_call() can be used as synchronous method.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_event_callback_call() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Module_Group
|
||||
|
@ -1438,8 +1444,10 @@ EAPI void ecore_imf_context_preedit_start_event_add(Eco
|
|||
* ecore_imf_context_event_callback_call() can be used as synchronous method.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_event_callback_call() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Module_Group
|
||||
|
@ -1449,8 +1457,10 @@ EAPI void ecore_imf_context_preedit_end_event_add(Ecore
|
|||
* ecore_imf_context_event_callback_call() can be used as synchronous method.
|
||||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_event_callback_call() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Module_Group
|
||||
|
@ -1461,8 +1471,10 @@ EAPI void ecore_imf_context_preedit_changed_event_add(E
|
|||
*
|
||||
* @param ctx An #Ecore_IMF_Context.
|
||||
* @param str The committed string.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_event_callback_call() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Module_Group
|
||||
|
@ -1478,8 +1490,10 @@ EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_
|
|||
* @param ctx An #Ecore_IMF_Context.
|
||||
* @param offset The start offset of surrounding to be deleted.
|
||||
* @param n_chars The number of characters to be deleted.
|
||||
*
|
||||
* @deprecated use ecore_imf_context_event_callback_call() instead.
|
||||
*/
|
||||
EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
|
@ -1653,7 +1667,7 @@ EAPI Ecore_IMF_Input_Hints ecore_imf_context_input_hint_get(Ecore_IMF_Co
|
|||
* @param ctx An #Ecore_IMF_Context.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
|
@ -1662,7 +1676,7 @@ EAPI void ecore_imf_context_control_panel_show(Ecore_IM
|
|||
* @param ctx An #Ecore_IMF_Context.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
|
||||
EINA_DEPRECATED EAPI void ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx);
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_IMF_Context_Group
|
||||
|
|
|
@ -28,8 +28,7 @@ _ecore_x_fixes_init(void)
|
|||
{
|
||||
_fixes_available = 1;
|
||||
|
||||
if (ECORE_X_EVENT_FIXES_SELECTION_NOTIFY == 0)
|
||||
ECORE_X_EVENT_FIXES_SELECTION_NOTIFY = ecore_event_type_new();
|
||||
ECORE_X_EVENT_FIXES_SELECTION_NOTIFY = ecore_event_type_new();
|
||||
}
|
||||
else
|
||||
_fixes_available = 0;
|
||||
|
|
|
@ -13,12 +13,9 @@ static Eina_Bool _ecore_x_present_exists = EINA_FALSE;
|
|||
void
|
||||
_ecore_x_present_init(void)
|
||||
{
|
||||
if (ECORE_X_EVENT_PRESENT_CONFIGURE == 0)
|
||||
{
|
||||
ECORE_X_EVENT_PRESENT_CONFIGURE = ecore_event_type_new();
|
||||
ECORE_X_EVENT_PRESENT_COMPLETE = ecore_event_type_new();
|
||||
ECORE_X_EVENT_PRESENT_IDLE = ecore_event_type_new();
|
||||
}
|
||||
ECORE_X_EVENT_PRESENT_CONFIGURE = ecore_event_type_new();
|
||||
ECORE_X_EVENT_PRESENT_COMPLETE = ecore_event_type_new();
|
||||
ECORE_X_EVENT_PRESENT_IDLE = ecore_event_type_new();
|
||||
#ifdef ECORE_XPRESENT
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_present_exists = XPresentQueryExtension(_ecore_x_disp, &_ecore_x_present_major, NULL, NULL);
|
||||
|
|
|
@ -153,7 +153,7 @@ static Eina_Bool _edje_collection_free_prog_cache_matches_free_cb(const Eina_Ha
|
|||
static void _edje_object_pack_item_hints_set(Evas_Object *obj, Edje_Pack_Element *it);
|
||||
static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source);
|
||||
|
||||
static Eina_List *_edje_object_collect(Edje *ed);
|
||||
static Eina_Hash *_edje_object_collect(Edje *ed);
|
||||
|
||||
static int _sort_defined_boxes(const void *a, const void *b);
|
||||
|
||||
|
@ -773,12 +773,13 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
Eina_List *textblocks = NULL;
|
||||
Eina_List *sources = NULL;
|
||||
Eina_List *externals = NULL;
|
||||
Eina_List *collect = NULL;
|
||||
Eina_Hash *collect = NULL;
|
||||
unsigned int n;
|
||||
Eina_Array parts;
|
||||
int group_path_started = 0;
|
||||
Evas_Object *nested_smart = NULL;
|
||||
char lang[PATH_MAX];
|
||||
Eina_Bool had_file;
|
||||
Eina_Hash *part_match = NULL;
|
||||
|
||||
/* Get data pointer of top-of-stack */
|
||||
|
@ -793,6 +794,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
had_file = !!ed->file;
|
||||
|
||||
tev = evas_object_evas_get(obj);
|
||||
evas_event_freeze(tev);
|
||||
|
@ -1599,132 +1601,156 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *boxes = NULL;
|
||||
Eina_Iterator *it;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
EINA_LIST_FREE(collect, eud)
|
||||
it = eina_hash_iterator_data_new(collect);
|
||||
/* the eud structs get manually freed below */
|
||||
eina_hash_free_cb_set(collect, (void*)eina_list_free);
|
||||
EINA_ITERATOR_FOREACH(it, l)
|
||||
{
|
||||
Evas_Object *child = NULL;
|
||||
|
||||
if (!eina_hash_find(part_match, eud->part))
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
{
|
||||
/* part no longer exists */
|
||||
switch (eud->type)
|
||||
Evas_Object *child = NULL;
|
||||
|
||||
if (!eina_hash_find(part_match, eud->part))
|
||||
{
|
||||
case EDJE_USER_SWALLOW:
|
||||
child = eud->u.swallow.child;
|
||||
break;
|
||||
case EDJE_USER_BOX_PACK:
|
||||
child = eud->u.box.child;
|
||||
break;
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
child = eud->u.table.child;
|
||||
break;
|
||||
case EDJE_USER_STRING:
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
case EDJE_USER_TEXT_EXPAND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (child)
|
||||
{
|
||||
WRN("Container part '%s' no longer exists, hiding previously-contained child object", eud->part);
|
||||
evas_object_hide(child);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (eud->type)
|
||||
{
|
||||
case EDJE_USER_SWALLOW:
|
||||
edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
|
||||
child = eud->u.swallow.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
boxes = eina_list_append(boxes, eud);
|
||||
eud = NULL;
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
|
||||
eud->u.table.col, eud->u.table.row,
|
||||
eud->u.table.colspan, eud->u.table.rowspan);
|
||||
child = eud->u.table.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
edje_object_part_drag_step_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
edje_object_part_drag_page_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
edje_object_part_drag_value_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
edje_object_part_drag_size_set(obj, eud->part,
|
||||
eud->u.drag_size.w,
|
||||
eud->u.drag_size.h);
|
||||
break;
|
||||
|
||||
case EDJE_USER_STRING:
|
||||
switch (eud->u.string.type)
|
||||
/* part no longer exists */
|
||||
switch (eud->type)
|
||||
{
|
||||
case EDJE_TEXT_TYPE_NORMAL:
|
||||
edje_object_part_text_set(obj, eud->part, eud->u.string.text);
|
||||
case EDJE_USER_SWALLOW:
|
||||
child = eud->u.swallow.child;
|
||||
break;
|
||||
case EDJE_TEXT_TYPE_ESCAPED:
|
||||
edje_object_part_text_escaped_set(obj, eud->part, eud->u.string.text);
|
||||
case EDJE_USER_BOX_PACK:
|
||||
child = eud->u.box.child;
|
||||
break;
|
||||
case EDJE_TEXT_TYPE_UNESCAPED:
|
||||
edje_object_part_text_unescaped_set(obj, eud->part, eud->u.string.text);
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
child = eud->u.table.child;
|
||||
break;
|
||||
}
|
||||
eina_stringshare_del(eud->u.string.text);
|
||||
break;
|
||||
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
{
|
||||
Edje_Part_Text_Prop *prop;
|
||||
EINA_LIST_FREE(eud->u.text_style.props, prop)
|
||||
{
|
||||
_canvas_layout_user_text_apply(eud, obj,
|
||||
prop);
|
||||
case EDJE_USER_STRING:
|
||||
eina_stringshare_del(eud->u.string.text);
|
||||
/* string has extra ref in this case */
|
||||
if (!had_file)
|
||||
eina_stringshare_del(eud->u.string.text);
|
||||
break;
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
break;
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
{
|
||||
Edje_Part_Text_Prop *prop;
|
||||
EINA_LIST_FREE(eud->u.text_style.props, prop)
|
||||
free(prop);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EDJE_USER_TEXT_EXPAND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case EDJE_USER_TEXT_EXPAND:
|
||||
if (child)
|
||||
{
|
||||
efl_canvas_layout_part_text_expand_set(
|
||||
efl_part(obj, eud->part),
|
||||
eud->u.text_expand.expand);
|
||||
WRN("Container part '%s' no longer exists, hiding previously-contained child object", eud->part);
|
||||
evas_object_hide(child);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (eud->type)
|
||||
{
|
||||
case EDJE_USER_SWALLOW:
|
||||
edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
|
||||
child = eud->u.swallow.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
boxes = eina_list_append(boxes, eud);
|
||||
eud = NULL;
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
|
||||
eud->u.table.col, eud->u.table.row,
|
||||
eud->u.table.colspan, eud->u.table.rowspan);
|
||||
child = eud->u.table.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
edje_object_part_drag_step_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
edje_object_part_drag_page_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
edje_object_part_drag_value_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
edje_object_part_drag_size_set(obj, eud->part,
|
||||
eud->u.drag_size.w,
|
||||
eud->u.drag_size.h);
|
||||
break;
|
||||
|
||||
case EDJE_USER_STRING:
|
||||
switch (eud->u.string.type)
|
||||
{
|
||||
case EDJE_TEXT_TYPE_NORMAL:
|
||||
efl_text_set(efl_part(obj, eud->part), eud->u.string.text);
|
||||
break;
|
||||
case EDJE_TEXT_TYPE_MARKUP:
|
||||
efl_text_markup_set(efl_part(obj, eud->part), eud->u.string.text);
|
||||
break;
|
||||
case EDJE_TEXT_TYPE_ESCAPED:
|
||||
edje_object_part_text_escaped_set(obj, eud->part, eud->u.string.text);
|
||||
break;
|
||||
case EDJE_TEXT_TYPE_UNESCAPED:
|
||||
edje_object_part_text_unescaped_set(obj, eud->part, eud->u.string.text);
|
||||
break;
|
||||
}
|
||||
eina_stringshare_del(eud->u.string.text);
|
||||
/* string has extra ref in this case */
|
||||
if (!had_file)
|
||||
eina_stringshare_del(eud->u.string.text);
|
||||
break;
|
||||
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
{
|
||||
Edje_Part_Text_Prop *prop;
|
||||
EINA_LIST_FREE(eud->u.text_style.props, prop)
|
||||
{
|
||||
_canvas_layout_user_text_apply(eud, obj,
|
||||
prop);
|
||||
free(prop);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EDJE_USER_TEXT_EXPAND:
|
||||
{
|
||||
efl_canvas_layout_part_text_expand_set(
|
||||
efl_part(obj, eud->part),
|
||||
eud->u.text_expand.expand);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (eud) _edje_user_definition_remove(eud, child);
|
||||
}
|
||||
eina_iterator_free(it);
|
||||
|
||||
boxes = eina_list_sort(boxes, -1, _sort_defined_boxes);
|
||||
EINA_LIST_FREE(boxes, eud)
|
||||
{
|
||||
edje_object_part_box_append(obj, eud->part, eud->u.box.child);
|
||||
_edje_user_definition_remove(eud, eud->u.box.child);
|
||||
}
|
||||
edje_object_part_box_append(obj, eud->part, eud->u.box.child);
|
||||
eina_hash_free(part_match);
|
||||
eina_hash_free(collect);
|
||||
}
|
||||
if (_edje_language)
|
||||
snprintf(lang, sizeof(lang), "edje,language,%s", _edje_language);
|
||||
|
@ -1840,88 +1866,94 @@ _sort_defined_boxes(const void *a, const void *b)
|
|||
return euda->u.box.index - eudb->u.box.index;
|
||||
}
|
||||
|
||||
static Eina_List *
|
||||
static Eina_Hash *
|
||||
_edje_object_collect(Edje *ed)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *collect;
|
||||
Eina_List *l;
|
||||
Eina_Hash *collect;
|
||||
Eina_List *l, *ll;
|
||||
Eina_Iterator *it;
|
||||
|
||||
collect = ed->user_defined;
|
||||
ed->user_defined = NULL;
|
||||
|
||||
EINA_LIST_FOREACH(collect, l, eud)
|
||||
it = eina_hash_iterator_data_new(collect);
|
||||
EINA_ITERATOR_FOREACH(it, l)
|
||||
{
|
||||
switch (eud->type)
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
{
|
||||
case EDJE_USER_STRING:
|
||||
eud->u.string.text = eina_stringshare_ref(eud->u.string.text);
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
if (eud->u.box.index == -1)
|
||||
switch (eud->type)
|
||||
{
|
||||
Edje_User_Defined *search;
|
||||
Edje_Real_Part *rp;
|
||||
Eina_List *children;
|
||||
Eina_List *ls;
|
||||
Evas_Object *child;
|
||||
int idx = 0;
|
||||
case EDJE_USER_STRING:
|
||||
eud->u.string.text = eina_stringshare_ref(eud->u.string.text);
|
||||
break;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, eud->part);
|
||||
if (rp)
|
||||
case EDJE_USER_BOX_PACK:
|
||||
if (eud->u.box.index == -1)
|
||||
{
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) continue;
|
||||
Edje_User_Defined *search;
|
||||
Edje_Real_Part *rp;
|
||||
Eina_List *children;
|
||||
Eina_List *ls;
|
||||
Evas_Object *child;
|
||||
int idx = 0;
|
||||
|
||||
children = evas_object_box_children_get(rp->object);
|
||||
EINA_LIST_FREE(children, child)
|
||||
if (!evas_object_data_get(child, "\377 edje.box_item"))
|
||||
{
|
||||
EINA_LIST_FOREACH(l, ls, search)
|
||||
rp = _edje_real_part_recursive_get(&ed, eud->part);
|
||||
if (rp)
|
||||
{
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) continue;
|
||||
|
||||
children = evas_object_box_children_get(rp->object);
|
||||
EINA_LIST_FREE(children, child)
|
||||
if (!evas_object_data_get(child, "\377 edje.box_item"))
|
||||
{
|
||||
if (search->type == EDJE_USER_BOX_PACK &&
|
||||
search->u.box.child == child &&
|
||||
search->part == eud->part /* beauty of stringshare ! */)
|
||||
EINA_LIST_FOREACH(l, ls, search)
|
||||
{
|
||||
search->u.box.index = idx++;
|
||||
break;
|
||||
if (search->type == EDJE_USER_BOX_PACK &&
|
||||
search->u.box.child == child &&
|
||||
search->part == eud->part /* beauty of stringshare ! */)
|
||||
{
|
||||
search->u.box.index = idx++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_edje_real_part_box_remove(eud->ed, rp, child);
|
||||
}
|
||||
_edje_real_part_box_remove(eud->ed, rp, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, eud->part);
|
||||
if (rp)
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
{
|
||||
if (rp->part->type != EDJE_PART_TYPE_TABLE) continue;
|
||||
_edje_real_part_table_unpack(eud->ed, rp, eud->u.table.child);
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, eud->part);
|
||||
if (rp)
|
||||
{
|
||||
if (rp->part->type != EDJE_PART_TYPE_TABLE) continue;
|
||||
_edje_real_part_table_unpack(eud->ed, rp, eud->u.table.child);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_USER_SWALLOW:
|
||||
edje_object_part_unswallow(NULL, eud->u.swallow.child);
|
||||
break;
|
||||
case EDJE_USER_SWALLOW:
|
||||
edje_object_part_unswallow(NULL, eud->u.swallow.child);
|
||||
break;
|
||||
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
_canvas_layout_user_text_collect(ed, eud);
|
||||
break;
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
_canvas_layout_user_text_collect(ed, eud);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
case EDJE_USER_TEXT_EXPAND:
|
||||
break;
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
case EDJE_USER_TEXT_EXPAND:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
eina_iterator_free(it);
|
||||
|
||||
return collect;
|
||||
}
|
||||
|
@ -1945,7 +1977,6 @@ _edje_file_callbacks_del(Edje *ed, Evas *e)
|
|||
void
|
||||
_edje_file_del(Edje *ed)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Evas *tev = NULL;
|
||||
|
||||
if (ed->obj && (!efl_invalidated_get(ed->obj)))
|
||||
|
@ -1979,11 +2010,8 @@ _edje_file_del(Edje *ed)
|
|||
return;
|
||||
}
|
||||
|
||||
while (ed->user_defined)
|
||||
{
|
||||
eud = eina_list_data_get(ed->user_defined);
|
||||
_edje_user_definition_free(eud);
|
||||
}
|
||||
eina_hash_free(ed->user_defined);
|
||||
ed->user_defined = NULL;
|
||||
|
||||
if (ed->table_parts)
|
||||
{
|
||||
|
|
|
@ -354,13 +354,14 @@ _edje_message_new(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id)
|
|||
Edje_Message *em;
|
||||
|
||||
em = _edje_msg_trash_pop();
|
||||
if (!em) em = calloc(1, sizeof(Edje_Message));
|
||||
if (em) memset(em, 0, sizeof(Edje_Message));
|
||||
else em = calloc(1, sizeof(Edje_Message));
|
||||
if (!em) return NULL;
|
||||
em->edje = ed;
|
||||
em->edje->message.num++;
|
||||
em->queue = queue;
|
||||
em->type = type;
|
||||
em->id = id;
|
||||
em->edje->message.num++;
|
||||
return em;
|
||||
}
|
||||
|
||||
|
|
|
@ -1748,7 +1748,7 @@ struct _Edje
|
|||
#endif
|
||||
double duration_scale;
|
||||
double paused_at;
|
||||
Eina_List *user_defined;
|
||||
Eina_Hash *user_defined;
|
||||
lua_State *L;
|
||||
Eina_Inlist *lua_objs;
|
||||
|
||||
|
@ -2110,6 +2110,7 @@ struct _Edje_Signal_Callback
|
|||
typedef enum
|
||||
{
|
||||
EDJE_TEXT_TYPE_NORMAL,
|
||||
EDJE_TEXT_TYPE_MARKUP,
|
||||
EDJE_TEXT_TYPE_ESCAPED,
|
||||
EDJE_TEXT_TYPE_UNESCAPED
|
||||
} Edje_Text_Type;
|
||||
|
@ -3071,7 +3072,6 @@ Eina_Bool _edje_multisense_internal_vibration_sample_play(Edje *ed, const char *
|
|||
|
||||
void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state);
|
||||
|
||||
Edje_User_Defined * _edje_user_definition_fetch(Edje *ed, const char *part, Edje_User_Defined_Type type);
|
||||
Edje_User_Defined * _edje_user_text_style_definition_fetch(Edje *ed, const char *part);
|
||||
Edje_User_Defined * _edje_user_text_expand_definition_fetch(Edje *ed, const char *part);
|
||||
void _edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child);
|
||||
|
|
|
@ -61,44 +61,67 @@ static void _edje_child_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *c
|
|||
|
||||
Edje_Real_Part *_edje_real_part_recursive_get_helper(Edje **ed, char **path);
|
||||
|
||||
static void
|
||||
_edje_user_definition_free_internal(Edje_User_Defined *eud)
|
||||
{
|
||||
Evas_Object *child = NULL;
|
||||
switch (eud->type)
|
||||
{
|
||||
case EDJE_USER_SWALLOW:
|
||||
child = eud->u.swallow.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
child = eud->u.box.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
child = eud->u.table.child;
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
if (child) evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, _edje_user_def_del_cb, eud);
|
||||
eina_stringshare_del(eud->part);
|
||||
free(eud);
|
||||
}
|
||||
|
||||
static void
|
||||
_edje_user_definition_list_free_internal(Eina_List *l)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
EINA_LIST_FREE(l, eud)
|
||||
_edje_user_definition_free_internal(eud);
|
||||
}
|
||||
|
||||
static Edje_User_Defined *
|
||||
_edje_user_definition_new(Edje_User_Defined_Type type, const char *part, Edje *ed)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
|
||||
if (!ed->user_defined)
|
||||
ed->user_defined = eina_hash_string_superfast_new((Eina_Free_Cb)_edje_user_definition_list_free_internal);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ed->user_defined, NULL);
|
||||
|
||||
eud = malloc(sizeof (Edje_User_Defined));
|
||||
if (!eud) return NULL;
|
||||
|
||||
eud->type = type;
|
||||
eud->part = eina_stringshare_add(part);
|
||||
eud->ed = ed;
|
||||
ed->user_defined = eina_list_append(ed->user_defined, eud);
|
||||
eina_hash_list_direct_append(ed->user_defined, eud->part, eud);
|
||||
|
||||
return eud;
|
||||
}
|
||||
|
||||
void
|
||||
_edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child)
|
||||
{
|
||||
eud->ed->user_defined = eina_list_remove(eud->ed->user_defined, eud);
|
||||
|
||||
if (child) evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, _edje_user_def_del_cb, eud);
|
||||
eina_stringshare_del(eud->part);
|
||||
free(eud);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_user_definition_free(Edje_User_Defined *eud)
|
||||
{
|
||||
Evas_Object *child = NULL;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
eud->ed->user_defined = eina_list_remove(eud->ed->user_defined, eud);
|
||||
|
||||
switch (eud->type)
|
||||
{
|
||||
case EDJE_USER_SWALLOW:
|
||||
child = eud->u.swallow.child;
|
||||
rp = _edje_real_part_recursive_get(&eud->ed, eud->part);
|
||||
if (rp)
|
||||
{
|
||||
|
@ -125,15 +148,13 @@ _edje_user_definition_free(Edje_User_Defined *eud)
|
|||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
child = eud->u.box.child;
|
||||
rp = _edje_real_part_recursive_get(&eud->ed, eud->part);
|
||||
if (rp) _edje_child_remove(eud->ed, rp, child);
|
||||
if (rp) _edje_child_remove(eud->ed, rp, eud->u.box.child);
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
child = eud->u.table.child;
|
||||
rp = _edje_real_part_recursive_get(&eud->ed, eud->part);
|
||||
if (rp) _edje_child_remove(eud->ed, rp, child);
|
||||
if (rp) _edje_child_remove(eud->ed, rp, eud->u.table.child);
|
||||
break;
|
||||
|
||||
case EDJE_USER_TEXT_STYLE:
|
||||
|
@ -155,7 +176,9 @@ _edje_user_definition_free(Edje_User_Defined *eud)
|
|||
break;
|
||||
}
|
||||
|
||||
_edje_user_definition_remove(eud, child);
|
||||
/* edje may be destructing */
|
||||
if (eud->ed->user_defined) eina_hash_list_remove(eud->ed->user_defined, eud->part, eud);
|
||||
_edje_user_definition_free_internal(eud);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2003,37 +2026,15 @@ _edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, c
|
|||
EINA_FALSE, EINA_TRUE);
|
||||
}
|
||||
|
||||
Edje_User_Defined *
|
||||
_edje_user_definition_fetch(Edje *ed,
|
||||
const char *part, Edje_User_Defined_Type type)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
{
|
||||
if (eud->type == type && !strcmp(eud->part, part))
|
||||
{
|
||||
return eud;
|
||||
}
|
||||
}
|
||||
eud = _edje_user_definition_new(type, part, ed);
|
||||
return eud;
|
||||
}
|
||||
|
||||
Edje_User_Defined *
|
||||
_edje_user_text_style_definition_fetch(Edje *ed, const char *part)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
{
|
||||
if (eud->type == EDJE_USER_TEXT_STYLE && !strcmp(eud->part, part))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_TEXT_STYLE) break;
|
||||
|
||||
if (!eud)
|
||||
{
|
||||
|
@ -2050,15 +2051,11 @@ Edje_User_Defined *
|
|||
_edje_user_text_expand_definition_fetch(Edje *ed, const char *part)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
{
|
||||
if (eud->type == EDJE_USER_TEXT_EXPAND && !strcmp(eud->part, part))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_TEXT_EXPAND) break;
|
||||
|
||||
if (!eud)
|
||||
{
|
||||
|
@ -2077,10 +2074,11 @@ _edje_user_define_string(Edje *ed, const char *part, const char *raw_text, Edje_
|
|||
rp. So on edje_object_file_set, we should first ref it, before destroying the old
|
||||
layout. */
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_STRING && !strcmp(eud->part, part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_STRING)
|
||||
{
|
||||
if (!raw_text)
|
||||
{
|
||||
|
@ -2106,6 +2104,12 @@ _edje_efl_text_text_set(Eo *obj, Edje *ed, const char *part, const char *text,
|
|||
Eina_Bool int_ret;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
if ((!ed->file) && (!legacy))
|
||||
{
|
||||
_edje_user_define_string(ed, part, eina_stringshare_add(text),
|
||||
set_markup ? EDJE_TEXT_TYPE_MARKUP : EDJE_TEXT_TYPE_NORMAL);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
|
||||
|
@ -2117,7 +2121,8 @@ _edje_efl_text_text_set(Eo *obj, Edje *ed, const char *part, const char *text,
|
|||
}
|
||||
int_ret = _edje_object_part_text_raw_generic_set(ed, obj, rp, part, text,
|
||||
set_markup, legacy);
|
||||
_edje_user_define_string(ed, part, rp->typedata.text->text, EDJE_TEXT_TYPE_NORMAL);
|
||||
_edje_user_define_string(ed, part, rp->typedata.text->text,
|
||||
set_markup ? EDJE_TEXT_TYPE_MARKUP : EDJE_TEXT_TYPE_NORMAL);
|
||||
return int_ret;
|
||||
}
|
||||
|
||||
|
@ -3037,6 +3042,16 @@ _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx_Entity *obj_sw
|
|||
}
|
||||
}
|
||||
|
||||
if (!ed->file)
|
||||
{
|
||||
eud = _edje_user_definition_new(EDJE_USER_SWALLOW, part, ed);
|
||||
if (eud)
|
||||
{
|
||||
evas_object_event_callback_add(obj_swallow, EVAS_CALLBACK_DEL, _edje_user_def_del_cb, eud);
|
||||
eud->u.swallow.child = obj_swallow;
|
||||
}
|
||||
return EINA_TRUE;
|
||||
}
|
||||
if (!rp)
|
||||
{
|
||||
DBG("cannot swallow part %s: part not exist!", part);
|
||||
|
@ -3367,18 +3382,24 @@ _efl_canvas_layout_content_remove(Eo *obj EINA_UNUSED, Edje *ed, Evas_Object *ob
|
|||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_Iterator *it;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
rp = _swallow_real_part_get(obj_swallow);
|
||||
if (!rp) return EINA_FALSE;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if ((eud->type == EDJE_USER_SWALLOW) && (eud->u.swallow.child == obj_swallow))
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
it = eina_hash_iterator_data_new(ed->user_defined);
|
||||
EINA_ITERATOR_FOREACH(it, l)
|
||||
{
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if ((eud->type == EDJE_USER_SWALLOW) && (eud->u.swallow.child == obj_swallow))
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
eina_iterator_free(it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
eina_iterator_free(it);
|
||||
_edje_real_part_swallow_clear(ed, rp);
|
||||
rp->typedata.swallow->swallowed_object = NULL;
|
||||
rp->typedata.swallow->swallow_params.min.w = 0;
|
||||
|
@ -3915,17 +3936,21 @@ _edje_object_part_drag_dir_get(Edje *ed, const char *part)
|
|||
Eina_Bool
|
||||
_edje_object_part_drag_value_set(Edje *ed, const char *part, double dx, double dy)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_VALUE && !strcmp(part, eud->part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_VALUE)
|
||||
{
|
||||
eud->u.drag_position.x = dx;
|
||||
eud->u.drag_position.y = dy;
|
||||
|
@ -3940,6 +3965,7 @@ _edje_object_part_drag_value_set(Edje *ed, const char *part, double dx, double d
|
|||
eud->u.drag_position.y = dy;
|
||||
}
|
||||
}
|
||||
if (!ed->file) return EINA_TRUE;
|
||||
|
||||
if (rp->part->dragable.confine_id != -1)
|
||||
{
|
||||
|
@ -4000,17 +4026,21 @@ _edje_object_part_drag_value_get(Edje *ed, const char *part, double *dx, double
|
|||
Eina_Bool
|
||||
_edje_object_part_drag_size_set(Edje *ed, const char *part, double dw, double dh)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
if (ed->file)
|
||||
{
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_SIZE && !strcmp(part, eud->part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_SIZE)
|
||||
{
|
||||
eud->u.drag_size.w = dw;
|
||||
eud->u.drag_size.h = dh;
|
||||
|
@ -4025,6 +4055,7 @@ _edje_object_part_drag_size_set(Edje *ed, const char *part, double dw, double dh
|
|||
eud->u.drag_size.h = dh;
|
||||
}
|
||||
}
|
||||
if (!ed->file) return EINA_TRUE;
|
||||
|
||||
if (dw < 0.0) dw = 0.0;
|
||||
else if (dw > 1.0)
|
||||
|
@ -4079,17 +4110,21 @@ _edje_object_part_drag_size_get(Edje *ed, const char *part, double *dw, double *
|
|||
Eina_Bool
|
||||
_edje_object_part_drag_step_set(Edje *ed, const char *part, double dx, double dy)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
if (ed->file)
|
||||
{
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_STEP && !strcmp(part, eud->part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_STEP)
|
||||
{
|
||||
eud->u.drag_position.x = dx;
|
||||
eud->u.drag_position.y = dy;
|
||||
|
@ -4104,6 +4139,7 @@ _edje_object_part_drag_step_set(Edje *ed, const char *part, double dx, double dy
|
|||
eud->u.drag_position.y = dy;
|
||||
}
|
||||
}
|
||||
if (!ed->file) return EINA_TRUE;
|
||||
|
||||
if (dx < 0.0) dx = 0.0;
|
||||
else if (dx > 1.0)
|
||||
|
@ -4151,17 +4187,21 @@ _edje_object_part_drag_step_get(Edje *ed, const char *part, double *dx, double *
|
|||
Eina_Bool
|
||||
_edje_object_part_drag_page_set(Edje *ed, const char *part, double dx, double dy)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_PAGE && !strcmp(part, eud->part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_PAGE)
|
||||
{
|
||||
eud->u.drag_position.x = dx;
|
||||
eud->u.drag_position.y = dy;
|
||||
|
@ -4176,6 +4216,7 @@ _edje_object_part_drag_page_set(Edje *ed, const char *part, double dx, double dy
|
|||
eud->u.drag_position.y = dy;
|
||||
}
|
||||
}
|
||||
if (!ed->file) return EINA_TRUE;
|
||||
|
||||
if (dx < 0.0) dx = 0.0;
|
||||
else if (dx > 1.0)
|
||||
|
@ -4223,18 +4264,22 @@ _edje_object_part_drag_page_get(Edje *ed, const char *part, double *dx, double *
|
|||
Eina_Bool
|
||||
_edje_object_part_drag_step(Edje *ed, const char *part, double dx, double dy)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
FLOAT_T px, py;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_STEP && !strcmp(part, eud->part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_STEP)
|
||||
{
|
||||
eud->u.drag_position.x = dx;
|
||||
eud->u.drag_position.y = dy;
|
||||
|
@ -4249,6 +4294,7 @@ _edje_object_part_drag_step(Edje *ed, const char *part, double dx, double dy)
|
|||
eud->u.drag_position.y = dy;
|
||||
}
|
||||
}
|
||||
if (!ed->file) return EINA_TRUE;
|
||||
|
||||
px = rp->drag->val.x;
|
||||
py = rp->drag->val.y;
|
||||
|
@ -4274,18 +4320,22 @@ _edje_object_part_drag_step(Edje *ed, const char *part, double dx, double dy)
|
|||
Eina_Bool
|
||||
_edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
FLOAT_T px, py;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
if ((!ed) || (!part)) return EINA_FALSE;
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return EINA_FALSE;
|
||||
if (!rp->drag) return EINA_FALSE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_PAGE && !strcmp(part, eud->part))
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_DRAG_PAGE)
|
||||
{
|
||||
eud->u.drag_position.x = dx;
|
||||
eud->u.drag_position.y = dy;
|
||||
|
@ -4300,6 +4350,7 @@ _edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy)
|
|||
eud->u.drag_position.y = dy;
|
||||
}
|
||||
}
|
||||
if (!ed->file) return EINA_TRUE;
|
||||
|
||||
px = rp->drag->val.x;
|
||||
py = rp->drag->val.y;
|
||||
|
@ -4340,16 +4391,19 @@ Eina_Bool
|
|||
_edje_part_box_append(Edje *ed, const char *part, Evas_Object *child)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
ret = EINA_FALSE;
|
||||
|
||||
if ((!ed) || (!part) || (!child)) return ret;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
}
|
||||
|
||||
if (_edje_real_part_box_append(ed, rp, child))
|
||||
if ((!ed->file) || _edje_real_part_box_append(ed, rp, child))
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
|
||||
|
@ -4369,16 +4423,19 @@ Eina_Bool
|
|||
_edje_part_box_prepend(Edje *ed, const char *part, Evas_Object *child)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
ret = EINA_FALSE;
|
||||
|
||||
if ((!ed) || (!part)) return ret;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
}
|
||||
|
||||
if (_edje_real_part_box_prepend(ed, rp, child))
|
||||
if ((!ed->file) || _edje_real_part_box_prepend(ed, rp, child))
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
|
||||
|
@ -4397,16 +4454,19 @@ Eina_Bool
|
|||
_edje_part_box_insert_before(Edje *ed, const char *part, Evas_Object *child, const Evas_Object *reference)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
ret = EINA_FALSE;
|
||||
|
||||
if ((!ed) || (!part)) return ret;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
}
|
||||
|
||||
if (_edje_real_part_box_insert_before(ed, rp, child, reference))
|
||||
if ((!ed->file) || _edje_real_part_box_insert_before(ed, rp, child, reference))
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
|
||||
|
@ -4425,16 +4485,19 @@ Eina_Bool
|
|||
_edje_part_box_insert_after(Edje *ed, const char *part, Evas_Object *child, const Evas_Object *reference)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
ret = EINA_FALSE;
|
||||
|
||||
if ((!ed) || (!part)) return ret;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
}
|
||||
|
||||
if (_edje_real_part_box_insert_after(ed, rp, child, reference))
|
||||
if ((!ed->file) || _edje_real_part_box_insert_after(ed, rp, child, reference))
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
|
||||
|
@ -4453,16 +4516,19 @@ Eina_Bool
|
|||
_edje_part_box_insert_at(Edje *ed, const char *part, Evas_Object *child, unsigned int pos)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
ret = EINA_FALSE;
|
||||
|
||||
if ((!ed) || (!part)) return ret;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_BOX) return ret;
|
||||
}
|
||||
|
||||
if (_edje_real_part_box_insert_at(ed, rp, child, pos))
|
||||
if ((!ed->file) || _edje_real_part_box_insert_at(ed, rp, child, pos))
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
|
||||
|
@ -4477,6 +4543,21 @@ _edje_part_box_insert_at(Edje *ed, const char *part, Evas_Object *child, unsigne
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_edje_part_box_remove_user_definition(Edje *ed, Eina_Stringshare *part, Evas_Object *child)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_BOX_PACK && eud->u.box.child == child)
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object *
|
||||
_edje_part_box_remove(Edje *ed, const char *part, Evas_Object *child)
|
||||
{
|
||||
|
@ -4491,18 +4572,7 @@ _edje_part_box_remove(Edje *ed, const char *part, Evas_Object *child)
|
|||
|
||||
r = _edje_real_part_box_remove(ed, rp, child);
|
||||
|
||||
if (r)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_BOX_PACK && eud->u.box.child == child && !strcmp(eud->part, part))
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
if (r) _edje_part_box_remove_user_definition(ed, part, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -4520,18 +4590,7 @@ _edje_part_box_remove_at(Edje *ed, const char *part, unsigned int pos)
|
|||
|
||||
r = _edje_real_part_box_remove_at(ed, rp, pos);
|
||||
|
||||
if (r)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_BOX_PACK && eud->u.box.child == r && !strcmp(eud->part, part))
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
if (r) _edje_part_box_remove_user_definition(ed, part, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -4567,15 +4626,7 @@ _edje_part_box_remove_all(Edje *ed, const char *part, Eina_Bool clear)
|
|||
if (_edje_real_part_box_remove_all(ed, rp, clear))
|
||||
{
|
||||
ret = EINA_TRUE;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *ll, *l;
|
||||
|
||||
EINA_LIST_FOREACH_SAFE(ed->user_defined, l, ll, eud)
|
||||
if (eud->type == EDJE_USER_BOX_PACK && !strcmp(eud->part, part))
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
return ret;
|
||||
}
|
||||
eina_hash_del_by_key(ed->user_defined, part);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -4660,16 +4711,16 @@ _edje_child_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *child, void *ei
|
|||
{
|
||||
Edje_Real_Part *rp = data;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
Edje *ed = evas_object_data_get(child, ".edje");
|
||||
|
||||
if (!ed) return;
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
l = eina_hash_find(ed->user_defined, rp->part->name);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (rp->part->type == EDJE_PART_TYPE_BOX)
|
||||
{
|
||||
if (eud->type == EDJE_USER_BOX_PACK &&
|
||||
eud->u.box.child == child &&
|
||||
!strcmp(rp->part->name, eud->part))
|
||||
eud->u.box.child == child)
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
break;
|
||||
|
@ -4678,8 +4729,7 @@ _edje_child_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *child, void *ei
|
|||
else if (rp->part->type == EDJE_PART_TYPE_TABLE)
|
||||
{
|
||||
if (eud->type == EDJE_USER_TABLE_PACK &&
|
||||
eud->u.table.child == child &&
|
||||
!strcmp(rp->part->name, eud->part))
|
||||
eud->u.table.child == child)
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
break;
|
||||
|
@ -4925,17 +4975,20 @@ Eina_Bool
|
|||
_edje_part_table_pack(Edje *ed, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
Edje_User_Defined *eud;
|
||||
ret = EINA_FALSE;
|
||||
|
||||
if ((!ed) || (!part)) return ret;
|
||||
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_TABLE) return ret;
|
||||
if (ed->file)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if (rp->part->type != EDJE_PART_TYPE_TABLE) return ret;
|
||||
}
|
||||
|
||||
if (_edje_real_part_table_pack(ed, rp, child_obj, col, row, colspan, rowspan))
|
||||
if ((!ed->file) || _edje_real_part_table_pack(ed, rp, child_obj, col, row, colspan, rowspan))
|
||||
{
|
||||
ret = EINA_TRUE;
|
||||
eud = _edje_user_definition_new(EDJE_USER_TABLE_PACK, part, ed);
|
||||
|
@ -4970,12 +5023,12 @@ _edje_part_table_unpack(Edje *ed, const char *part, Evas_Object *child_obj)
|
|||
{
|
||||
ret = EINA_TRUE;
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
l = eina_hash_find(ed->user_defined, part);
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_TABLE_PACK &&
|
||||
eud->u.table.child == child_obj &&
|
||||
!strcmp(part, eud->part))
|
||||
eud->u.table.child == child_obj)
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
break;
|
||||
|
@ -5899,18 +5952,24 @@ void
|
|||
_edje_object_part_swallow_free_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Edje_User_Defined *eud;
|
||||
Eina_List *l;
|
||||
Eina_List *l, *ll;
|
||||
Eina_Iterator *it;
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = evas_object_data_get(obj, ".edje");
|
||||
if (!ed) return;
|
||||
EINA_LIST_FOREACH(ed->user_defined, l, eud)
|
||||
if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj)
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
break;
|
||||
}
|
||||
it = eina_hash_iterator_data_new(ed->user_defined);
|
||||
EINA_ITERATOR_FOREACH(it, l)
|
||||
{
|
||||
EINA_LIST_FOREACH(l, ll, eud)
|
||||
if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj)
|
||||
{
|
||||
_edje_user_definition_free(eud);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
out:
|
||||
rp = evas_object_data_get(obj, "\377 edje.swallowing_part");
|
||||
if (rp && (rp->part->type == EDJE_PART_TYPE_SWALLOW))
|
||||
edje_object_part_unswallow(ed->obj, obj);
|
||||
|
|
|
@ -1407,6 +1407,39 @@ eina_hash_list_append(Eina_Hash *hash, const void *key, const void *data)
|
|||
eina_list_append(NULL, data));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
eina_hash_list_direct_append(Eina_Hash *hash, const void *key, const void *data)
|
||||
{
|
||||
Eina_Hash_Tuple tuple;
|
||||
Eina_Hash_Head *hash_head;
|
||||
Eina_Hash_Element *hash_element;
|
||||
int key_length;
|
||||
int key_hash;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(hash);
|
||||
EINA_SAFETY_ON_NULL_RETURN(hash->key_hash_cb);
|
||||
EINA_SAFETY_ON_NULL_RETURN(key);
|
||||
EINA_SAFETY_ON_NULL_RETURN(data);
|
||||
EINA_MAGIC_CHECK_HASH(hash);
|
||||
|
||||
_eina_hash_compute(hash, key, &key_length, &key_hash);
|
||||
|
||||
tuple.key = key;
|
||||
tuple.key_length = key_length;
|
||||
tuple.data = NULL;
|
||||
|
||||
hash_element = _eina_hash_find_by_hash(hash, &tuple, key_hash, &hash_head);
|
||||
if (hash_element)
|
||||
hash_element->tuple.data = eina_list_append(hash_element->tuple.data, data);
|
||||
else
|
||||
eina_hash_add_alloc_by_hash(hash,
|
||||
key,
|
||||
key_length,
|
||||
0,
|
||||
key_hash,
|
||||
eina_list_append(NULL, data));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
eina_hash_list_prepend(Eina_Hash *hash, const void *key, const void *data)
|
||||
{
|
||||
|
@ -1440,6 +1473,39 @@ eina_hash_list_prepend(Eina_Hash *hash, const void *key, const void *data)
|
|||
eina_list_append(NULL, data));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
eina_hash_list_direct_prepend(Eina_Hash *hash, const void *key, const void *data)
|
||||
{
|
||||
Eina_Hash_Tuple tuple;
|
||||
Eina_Hash_Head *hash_head;
|
||||
Eina_Hash_Element *hash_element;
|
||||
int key_length;
|
||||
int key_hash;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(hash);
|
||||
EINA_SAFETY_ON_NULL_RETURN(hash->key_hash_cb);
|
||||
EINA_SAFETY_ON_NULL_RETURN(key);
|
||||
EINA_SAFETY_ON_NULL_RETURN(data);
|
||||
EINA_MAGIC_CHECK_HASH(hash);
|
||||
|
||||
_eina_hash_compute(hash, key, &key_length, &key_hash);
|
||||
|
||||
tuple.key = key;
|
||||
tuple.key_length = key_length;
|
||||
tuple.data = NULL;
|
||||
|
||||
hash_element = _eina_hash_find_by_hash(hash, &tuple, key_hash, &hash_head);
|
||||
if (hash_element)
|
||||
hash_element->tuple.data = eina_list_prepend(hash_element->tuple.data, data);
|
||||
else
|
||||
eina_hash_add_alloc_by_hash(hash,
|
||||
key,
|
||||
key_length,
|
||||
0,
|
||||
key_hash,
|
||||
eina_list_append(NULL, data));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
eina_hash_list_remove(Eina_Hash *hash, const void *key, const void *data)
|
||||
{
|
||||
|
|
|
@ -1035,6 +1035,21 @@ EAPI void eina_hash_foreach(const Eina_Hash *hash,
|
|||
*/
|
||||
EAPI void eina_hash_list_append(Eina_Hash *hash, const void *key, const void *data) EINA_ARG_NONNULL(1, 2, 3);
|
||||
|
||||
/**
|
||||
* @brief Appends data to an #Eina_List inside a hash using eina_hash_direct_add().
|
||||
*
|
||||
* This function is identical to the sequence of calling
|
||||
* eina_hash_find(), eina_list_append(), eina_hash_set(),
|
||||
* but with one fewer required hash lookup.
|
||||
*
|
||||
* @param[in,out] hash The hash table.
|
||||
* @param[in] key The key associated with the data.
|
||||
* @param[in] data The data to append to the list.
|
||||
*
|
||||
* @since 1.23
|
||||
*/
|
||||
EAPI void eina_hash_list_direct_append(Eina_Hash *hash, const void *key, const void *data) EINA_ARG_NONNULL(1, 2, 3);
|
||||
|
||||
/**
|
||||
* @brief Prepends data to an #Eina_List inside a hash.
|
||||
*
|
||||
|
@ -1050,6 +1065,21 @@ EAPI void eina_hash_list_append(Eina_Hash *hash, const void *key, const void *da
|
|||
*/
|
||||
EAPI void eina_hash_list_prepend(Eina_Hash *hash, const void *key, const void *data) EINA_ARG_NONNULL(1, 2, 3);
|
||||
|
||||
/**
|
||||
* @brief Prepends data to an #Eina_List inside a hash using eina_hash_direct_add().
|
||||
*
|
||||
* This function is identical to the sequence of calling
|
||||
* eina_hash_find(), eina_list_prepend(), eina_hash_set(),
|
||||
* but with one fewer required hash lookup.
|
||||
*
|
||||
* @param[in,out] hash The hash table.
|
||||
* @param[in] key The key associated with the data.
|
||||
* @param[in] data The data to prepend to the list.
|
||||
*
|
||||
* @since 1.23
|
||||
*/
|
||||
EAPI void eina_hash_list_direct_prepend(Eina_Hash *hash, const void *key, const void *data) EINA_ARG_NONNULL(1, 2, 3);
|
||||
|
||||
/**
|
||||
* @brief Removes data from an #Eina_List inside a hash.
|
||||
*
|
||||
|
|
|
@ -66,7 +66,7 @@ _already_added(Efl_Io_Model_Data *pd, const char *path)
|
|||
|
||||
EINA_LIST_FOREACH(pd->files, node, mi)
|
||||
{
|
||||
if (!strcmp(mi->path, path))
|
||||
if (eina_streq(mi->path, path))
|
||||
return EINA_TRUE;
|
||||
}
|
||||
return EINA_FALSE;
|
||||
|
@ -99,7 +99,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
|
|||
obj = pd->self;
|
||||
|
||||
path = ecore_file_dir_get(ev->filename);
|
||||
if (strcmp(pd->path, path) != 0)
|
||||
if (!eina_streq(pd->path, path))
|
||||
goto end;
|
||||
|
||||
spath = eina_stringshare_add(ev->filename);
|
||||
|
@ -698,7 +698,7 @@ _efl_io_model_efl_model_property_get(const Eo *obj, Efl_Io_Model_Data *pd, const
|
|||
|
||||
for (i = 0; i < EINA_C_ARRAY_LENGTH(properties); ++i)
|
||||
if (property == properties[i].name ||
|
||||
!strcmp(property, properties[i].name))
|
||||
eina_streq(property, properties[i].name))
|
||||
return properties[i].cb(obj, pd);
|
||||
|
||||
return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property);
|
||||
|
@ -718,7 +718,7 @@ _efl_io_model_efl_model_property_set(Eo *obj,
|
|||
if (!property) goto on_error;
|
||||
|
||||
err = EFL_MODEL_ERROR_NOT_SUPPORTED;
|
||||
if (strcmp(property, "path") != 0) goto on_error;
|
||||
if (!eina_streq(property, "path")) goto on_error;
|
||||
|
||||
if (finalized && pd->request.move) goto on_error;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ _eldbus_model_efl_model_property_set(Eo *obj,
|
|||
{
|
||||
Eina_Error err = EFL_MODEL_ERROR_READ_ONLY;
|
||||
|
||||
if (strcmp(property, UNIQUE_NAME_PROPERTY))
|
||||
if (!eina_streq(property, UNIQUE_NAME_PROPERTY))
|
||||
err = EFL_MODEL_ERROR_NOT_FOUND;
|
||||
return efl_loop_future_rejected(obj, err);
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ _eldbus_model_efl_model_property_get(const Eo *obj,
|
|||
{
|
||||
DBG("(%p): property=%s", obj, property);
|
||||
|
||||
if (strcmp(property, UNIQUE_NAME_PROPERTY) != 0) goto on_error;
|
||||
if (!eina_streq(property, UNIQUE_NAME_PROPERTY)) goto on_error;
|
||||
|
||||
if (!pd->connection) eldbus_model_connect_do(pd);
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ _eldbus_model_object_concatenate_path(const char *root_path,
|
|||
const char *relative_path)
|
||||
{
|
||||
Eina_Strbuf *buffer;
|
||||
const char *format = (strcmp(root_path, "/") != 0) ? "%s/%s" : "%s%s";
|
||||
const char *format = (!eina_streq(root_path, "/")) ? "%s/%s" : "%s%s";
|
||||
char *absolute_path = NULL;
|
||||
|
||||
buffer = eina_strbuf_new();
|
||||
|
|
|
@ -115,14 +115,14 @@ _efl_ui_average_model_efl_model_property_set(Eo *obj, Efl_Ui_Average_Model_Data
|
|||
if (!pd->parent) goto end;
|
||||
|
||||
// In vertical list mode we do not need to compute the average width size
|
||||
/* if (!strcmp(property, _efl_model_property_selfw)) */
|
||||
/* if (eina_streq(property, _efl_model_property_selfw)) */
|
||||
/* { */
|
||||
/* f = _efl_ui_average_model_prepare(obj, &pd->parent->total.width, */
|
||||
/* pd->wseen ? NULL : &pd->parent->total.wseen, */
|
||||
/* property, value, EINA_TRUE); */
|
||||
/* pd->wseen = EINA_TRUE; */
|
||||
/* } */
|
||||
if (!strcmp(property, _efl_model_property_selfh))
|
||||
if (eina_streq(property, _efl_model_property_selfh))
|
||||
{
|
||||
f = _efl_ui_average_model_prepare(obj, &pd->parent->total.height,
|
||||
pd->hseen ? NULL : &pd->parent->total.hseen,
|
||||
|
@ -167,10 +167,10 @@ _efl_ui_average_model_efl_model_property_get(const Eo *obj, Efl_Ui_Average_Model
|
|||
t = eina_value_type_get(r);
|
||||
if (t == EINA_VALUE_TYPE_UINT)
|
||||
{
|
||||
if (!strcmp(property, _efl_model_property_totalh))
|
||||
if (eina_streq(property, _efl_model_property_totalh))
|
||||
r = _efl_ui_average_model_compute(obj, r, pd->total.height, pd->total.hseen);
|
||||
// We do not need to average the width in vertical list mode as this is done by the parent class
|
||||
/* if (!strcmp(property, _efl_model_property_totalw)) */
|
||||
/* if (eina_streq(property, _efl_model_property_totalw)) */
|
||||
/* r = _efl_ui_average_model_compute(obj, r, pd->total.width, pd->total.wseen); */
|
||||
}
|
||||
|
||||
|
|
|
@ -1,29 +1,37 @@
|
|||
class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout,
|
||||
Efl.Ui.Layout_Orientable, Efl.Gfx.Arrangement
|
||||
{
|
||||
[[The box widget.
|
||||
[[A container that arranges children widgets in a vertical or horizontal fashion.
|
||||
|
||||
A box arranges objects in a linear fashion, governed by a layout function
|
||||
that defines the details of this arrangement.
|
||||
The Box widget is the most basic (and the most used) of the container widgets.
|
||||
Other widgets are added to the Box through the @Efl.Pack_Linear interface, and the
|
||||
layout direction (either vertical or horizontal) is controlled through the
|
||||
@Efl.Ui.Layout_Orientable.orientation property.
|
||||
|
||||
By default, the box will use an internal function to set the layout to
|
||||
a single row, either vertical or horizontal. This layout is affected
|
||||
by a number of parameters. The values given by @Efl.Gfx.Arrangement.content_padding.set
|
||||
and @Efl.Gfx.Arrangement.content_align.set and the hints set to each object in the box.
|
||||
The Box widget itself is invisible, as are most container widgets: Their purpose is
|
||||
to handle the position and size of all their children so you don't have to.
|
||||
|
||||
FIXME:
|
||||
THIS CLASS NEEDS GOOD UP TO DATE DOCUMENTATION. LEGACY BOX AND UI BOX
|
||||
BEHAVE SLIGHTLY DIFFERENTLY AND USE VASTLY DIFFERENT APIS.
|
||||
All widgets inside a vertical Box container will have the same width as the container,
|
||||
and their heights will be automatically chosen so that they cover the whole surface of
|
||||
the container from top to bottom (Imagine a stack of pizza boxes neatly fitting inside
|
||||
your oven). The @Efl.Ui.Box.homogeneous property then controls whether all widgets have
|
||||
the same height (homogeneous) or not.
|
||||
|
||||
A horizontal Box container example would be the button toolbar at the top of most word
|
||||
processing programs.
|
||||
|
||||
Precise layout can be further customized through the @Efl.Gfx.Arrangement interface on
|
||||
the Box itself, or through the @Efl.Gfx.Hint interface on each of the children widgets.
|
||||
]]
|
||||
methods {
|
||||
@property homogeneous {
|
||||
[[Control homogeneous mode.
|
||||
|
||||
This will enable the homogeneous mode where children are of the same
|
||||
weight and of the same min size which is determined by maximum min
|
||||
size of children.]]
|
||||
[[In homogeneous mode all children of a vertical Box have the same height, equal to
|
||||
the height of the tallest widget. Children of a horizontal Box have the same width,
|
||||
equal to the width of the widest widget. Otherwise, individual widget sizes are not
|
||||
modified.
|
||||
]]
|
||||
values {
|
||||
homogeneous: bool; [[$true if the box is homogeneous, $false otherwise]]
|
||||
homogeneous: bool; [[$true if the Box is homogeneous, $false otherwise.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@ _efl_ui_exact_model_efl_model_property_set(Eo *obj, Efl_Ui_Exact_Model_Data *pd,
|
|||
{
|
||||
if (pd->parent)
|
||||
{
|
||||
if (!strcmp(property, _efl_model_property_selfw))
|
||||
if (eina_streq(property, _efl_model_property_selfw))
|
||||
{
|
||||
unsigned int index;
|
||||
unsigned char found;
|
||||
|
@ -251,7 +251,7 @@ _efl_ui_exact_model_efl_model_property_set(Eo *obj, Efl_Ui_Exact_Model_Data *pd,
|
|||
pd->parent->total_size.width = pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT];
|
||||
return efl_loop_future_resolved(obj, eina_value_uint_init(pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT]));
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_selfh))
|
||||
if (eina_streq(property, _efl_model_property_selfh))
|
||||
{
|
||||
unsigned int old_value;
|
||||
unsigned int index;
|
||||
|
@ -267,23 +267,23 @@ _efl_ui_exact_model_efl_model_property_set(Eo *obj, Efl_Ui_Exact_Model_Data *pd,
|
|||
return efl_loop_future_resolved(obj, eina_value_uint_init(pd->parent->slot[found].height[index % EFL_UI_EXACT_MODEL_CONTENT]));
|
||||
}
|
||||
// The following property are calculated by the model and so READ_ONLY
|
||||
if (!strcmp(property, _efl_model_property_totalh))
|
||||
if (eina_streq(property, _efl_model_property_totalh))
|
||||
{
|
||||
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_totalw))
|
||||
if (eina_streq(property, _efl_model_property_totalw))
|
||||
{
|
||||
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(property, _efl_model_property_itemw))
|
||||
if (eina_streq(property, _efl_model_property_itemw))
|
||||
{
|
||||
// The exact model can not guess a general item size if asked
|
||||
// and should refuse to remember anything like that.
|
||||
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemh))
|
||||
if (eina_streq(property, _efl_model_property_itemh))
|
||||
{
|
||||
// The exact model can not guess a general item size if asked
|
||||
// and should refuse to remember anything like that.
|
||||
|
@ -299,7 +299,7 @@ _efl_ui_exact_model_efl_model_property_get(const Eo *obj, Efl_Ui_Exact_Model_Dat
|
|||
{
|
||||
if (pd->parent)
|
||||
{
|
||||
if (!strcmp(property, _efl_model_property_selfw))
|
||||
if (eina_streq(property, _efl_model_property_selfw))
|
||||
{
|
||||
unsigned int index;
|
||||
unsigned char found;
|
||||
|
@ -308,7 +308,7 @@ _efl_ui_exact_model_efl_model_property_get(const Eo *obj, Efl_Ui_Exact_Model_Dat
|
|||
found = _efl_ui_exact_model_slot_find(pd, index, EINA_TRUE, EINA_FALSE);
|
||||
return eina_value_uint_new(pd->parent->slot[found].width[index % EFL_UI_EXACT_MODEL_CONTENT]);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_selfh))
|
||||
if (eina_streq(property, _efl_model_property_selfh))
|
||||
{
|
||||
unsigned int index;
|
||||
unsigned char found;
|
||||
|
@ -318,20 +318,20 @@ _efl_ui_exact_model_efl_model_property_get(const Eo *obj, Efl_Ui_Exact_Model_Dat
|
|||
return eina_value_uint_new(pd->parent->slot[found].height[index % EFL_UI_EXACT_MODEL_CONTENT]);
|
||||
}
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_totalh))
|
||||
if (eina_streq(property, _efl_model_property_totalh))
|
||||
{
|
||||
return eina_value_uint_new(pd->total_size.height);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_totalw))
|
||||
if (eina_streq(property, _efl_model_property_totalw))
|
||||
{
|
||||
return eina_value_uint_new(pd->total_size.width);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemw))
|
||||
if (eina_streq(property, _efl_model_property_itemw))
|
||||
{
|
||||
// The exact model can not guess a general item size if asked.
|
||||
return eina_value_error_new(EAGAIN);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemh))
|
||||
if (eina_streq(property, _efl_model_property_itemh))
|
||||
{
|
||||
// The exact model can not guess a general item size if asked.
|
||||
return eina_value_error_new(EAGAIN);
|
||||
|
|
|
@ -263,138 +263,6 @@ _item_scroll_internal(Eo *obj,
|
|||
efl_ui_scrollable_scroll(pd->smanager, ipos, anim);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_bar_read_and_update(Eo *obj)
|
||||
{
|
||||
EFL_UI_GRID_DATA_GET_OR_RETURN(obj, pd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
double vx = 0.0, vy = 0.0;
|
||||
|
||||
edje_object_part_drag_value_get
|
||||
(wd->resize_obj, "efl.dragable.vbar", NULL, &vy);
|
||||
|
||||
edje_object_part_drag_value_get
|
||||
(wd->resize_obj, "efl.dragable.hbar", &vx, NULL);
|
||||
|
||||
efl_ui_scrollbar_bar_position_set(pd->smanager, vx, vy);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_reload_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Eo *list = data;
|
||||
EFL_UI_GRID_DATA_GET_OR_RETURN(list, pd);
|
||||
|
||||
efl_ui_scrollbar_bar_visibility_update(pd->smanager);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_vbar_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
_efl_ui_grid_bar_read_and_update(data);
|
||||
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_vbar_press_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_vbar_unpress_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_edje_drag_start_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Eo *list = data;
|
||||
EFL_UI_GRID_DATA_GET_OR_RETURN(list, pd);
|
||||
|
||||
_efl_ui_grid_bar_read_and_update(list);
|
||||
|
||||
pd->freeze_want = efl_ui_scrollable_scroll_freeze_get(pd->smanager);
|
||||
efl_ui_scrollable_scroll_freeze_set(pd->smanager, EINA_TRUE);
|
||||
efl_event_callback_call(list, EFL_UI_EVENT_SCROLL_DRAG_START, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_edje_drag_stop_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Eo *list = data;
|
||||
EFL_UI_GRID_DATA_GET_OR_RETURN(list, pd);
|
||||
|
||||
_efl_ui_grid_bar_read_and_update(list);
|
||||
|
||||
efl_ui_scrollable_scroll_freeze_set(pd->smanager, pd->freeze_want);
|
||||
efl_event_callback_call(list, EFL_UI_EVENT_SCROLL_DRAG_STOP, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_edje_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
_efl_ui_grid_bar_read_and_update(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_hbar_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
_efl_ui_grid_bar_read_and_update(data);
|
||||
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_hbar_press_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_hbar_unpress_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_bar_size_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
|
@ -452,90 +320,6 @@ _efl_ui_grid_bar_hide_cb(void *data, const Efl_Event *event)
|
|||
edje_object_signal_emit(wd->resize_obj, "efl,action,hide,vbar", "efl");
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_edje_object_attach(Eo *obj)
|
||||
{
|
||||
EFL_UI_GRID_DATA_GET_OR_RETURN(obj, pd);
|
||||
|
||||
efl_layout_signal_callback_add(obj, "reload", "efl",
|
||||
obj, _efl_ui_grid_reload_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_vbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,set", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,start", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,stop", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,step", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,page", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,vbar,press", "efl",
|
||||
obj, _efl_ui_grid_vbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,vbar,unpress", "efl",
|
||||
obj, _efl_ui_grid_vbar_unpress_cb, NULL);
|
||||
|
||||
efl_layout_signal_callback_add(obj, "drag", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_hbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,set", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,start", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,stop", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,step", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,page", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,hbar,press", "efl",
|
||||
obj, _efl_ui_grid_hbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,hbar,unpress", "efl",
|
||||
obj, _efl_ui_grid_hbar_unpress_cb, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_edje_object_detach(Eo *obj)
|
||||
{
|
||||
EFL_UI_GRID_DATA_GET_OR_RETURN(obj, pd);
|
||||
|
||||
efl_layout_signal_callback_del(obj, "reload", "efl",
|
||||
obj, _efl_ui_grid_reload_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_vbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,set", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,start", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,stop", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,step", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,page", "efl.dragable.vbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,vbar,press", "efl",
|
||||
obj, _efl_ui_grid_vbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,vbar,unpress", "efl",
|
||||
obj, _efl_ui_grid_vbar_unpress_cb, NULL);
|
||||
|
||||
efl_layout_signal_callback_del(obj, "drag", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_hbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,set", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,start", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,stop", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,step", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,page", "efl.dragable.hbar",
|
||||
obj, _efl_ui_grid_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,hbar,press", "efl",
|
||||
obj, _efl_ui_grid_hbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,hbar,unpress", "efl",
|
||||
obj, _efl_ui_grid_hbar_unpress_cb, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_grid_content_moved_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
|
@ -608,7 +392,7 @@ _efl_ui_grid_efl_object_finalize(Eo *obj,
|
|||
pd->item.size.h = 1;
|
||||
}
|
||||
|
||||
_scroll_edje_object_attach(obj);
|
||||
efl_ui_scroll_connector_bind(obj, pd->smanager);
|
||||
|
||||
//FIXME: Workaround code! fake Content for pan resize.
|
||||
// to remove this code, we need to customize pan class.
|
||||
|
@ -642,7 +426,7 @@ _efl_ui_grid_efl_object_finalize(Eo *obj,
|
|||
EOLIAN static void
|
||||
_efl_ui_grid_efl_object_invalidate(Eo *obj, Efl_Ui_Grid_Data *pd)
|
||||
{
|
||||
_scroll_edje_object_detach(obj);
|
||||
efl_ui_scroll_connector_unbind(obj);
|
||||
|
||||
efl_event_callback_del(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED,
|
||||
_efl_ui_grid_bar_size_changed_cb, obj);
|
||||
|
|
|
@ -46,25 +46,25 @@ _efl_ui_homogeneous_model_efl_model_property_set(Eo *obj,
|
|||
{
|
||||
if (pd->parent)
|
||||
{
|
||||
if (!strcmp(property, _efl_model_property_selfw))
|
||||
if (eina_streq(property, _efl_model_property_selfw))
|
||||
return _efl_ui_homogeneous_model_property_set(obj, value,
|
||||
&pd->parent->item.defined.width,
|
||||
&pd->parent->item.width);
|
||||
if (!strcmp(property, _efl_model_property_selfh))
|
||||
if (eina_streq(property, _efl_model_property_selfh))
|
||||
return _efl_ui_homogeneous_model_property_set(obj, value,
|
||||
&pd->parent->item.defined.height,
|
||||
&pd->parent->item.height);
|
||||
if (!strcmp(property, _efl_model_property_totalw) ||
|
||||
!strcmp(property, _efl_model_property_totalh))
|
||||
if (eina_streq(property, _efl_model_property_totalw) ||
|
||||
eina_streq(property, _efl_model_property_totalh))
|
||||
return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_READ_ONLY);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemw))
|
||||
if (eina_streq(property, _efl_model_property_itemw))
|
||||
{
|
||||
return _efl_ui_homogeneous_model_property_set(obj, value,
|
||||
&pd->item.defined.width,
|
||||
&pd->item.width);
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemh))
|
||||
if (eina_streq(property, _efl_model_property_itemh))
|
||||
{
|
||||
return _efl_ui_homogeneous_model_property_set(obj, value,
|
||||
&pd->item.defined.height,
|
||||
|
@ -82,39 +82,39 @@ _efl_ui_homogeneous_model_efl_model_property_get(const Eo *obj,
|
|||
{
|
||||
if (pd->parent)
|
||||
{
|
||||
if (!strcmp(property, _efl_model_property_selfw))
|
||||
if (eina_streq(property, _efl_model_property_selfw))
|
||||
{
|
||||
if (pd->parent->item.defined.width)
|
||||
return eina_value_uint_new(pd->parent->item.width);
|
||||
goto not_ready;
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_selfh))
|
||||
if (eina_streq(property, _efl_model_property_selfh))
|
||||
{
|
||||
if (pd->parent->item.defined.height)
|
||||
return eina_value_uint_new(pd->parent->item.height);
|
||||
goto not_ready;
|
||||
}
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemw))
|
||||
if (eina_streq(property, _efl_model_property_itemw))
|
||||
{
|
||||
if (pd->item.defined.width)
|
||||
return eina_value_uint_new(pd->item.width);
|
||||
goto not_ready;
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_itemh))
|
||||
if (eina_streq(property, _efl_model_property_itemh))
|
||||
{
|
||||
if (pd->item.defined.height)
|
||||
return eina_value_uint_new(pd->item.height);
|
||||
goto not_ready;
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_totalh))
|
||||
if (eina_streq(property, _efl_model_property_totalh))
|
||||
{
|
||||
if (pd->item.defined.height)
|
||||
return eina_value_uint_new(pd->item.height *
|
||||
efl_model_children_count_get(obj));
|
||||
goto not_ready;
|
||||
}
|
||||
if (!strcmp(property, _efl_model_property_totalw))
|
||||
if (eina_streq(property, _efl_model_property_totalw))
|
||||
{
|
||||
if (pd->item.defined.width)
|
||||
// We only handle vertical list at this point, so total width is the width of one item.
|
||||
|
|
|
@ -33,6 +33,7 @@ _efl_ui_pan_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Pan_Data *psd, Eina_Posi
|
|||
psd->y = pos.y;
|
||||
|
||||
evas_object_smart_changed(obj);
|
||||
efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_VIEWPORT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -0,0 +1,329 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "elementary_config.h"
|
||||
#endif
|
||||
#define EFL_UI_SCROLL_MANAGER_PROTECTED
|
||||
#define EFL_UI_SCROLLBAR_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
#include <Efl_Ui.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
typedef struct {
|
||||
Eo *obj;
|
||||
Eo *smanager;
|
||||
int freeze_want;
|
||||
} Scroll_Connector_Context;
|
||||
|
||||
static void
|
||||
_scroll_connector_bar_read_and_update(Scroll_Connector_Context *ctx)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
|
||||
double vx = 0.0, vy = 0.0;
|
||||
|
||||
edje_object_part_drag_value_get
|
||||
(wd->resize_obj, "efl.dragable.vbar", NULL, &vy);
|
||||
|
||||
edje_object_part_drag_value_get
|
||||
(wd->resize_obj, "efl.dragable.hbar", &vx, NULL);
|
||||
|
||||
efl_ui_scrollbar_bar_position_set(ctx->smanager, vx, vy);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_reload_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
|
||||
efl_ui_scrollbar_bar_visibility_update(ctx->smanager);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_scroll_connector_edje_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
|
||||
_scroll_connector_bar_read_and_update(ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_edje_drag_start_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
|
||||
_scroll_connector_bar_read_and_update(ctx);
|
||||
|
||||
ctx->freeze_want = efl_ui_scrollable_scroll_freeze_get(ctx->smanager);
|
||||
efl_ui_scrollable_scroll_freeze_set(ctx->smanager, EINA_TRUE);
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_EVENT_SCROLL_DRAG_START, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_edje_drag_stop_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
|
||||
_scroll_connector_bar_read_and_update(ctx);
|
||||
EINA_SAFETY_ON_TRUE_RETURN(ctx->freeze_want == -1);
|
||||
efl_ui_scrollable_scroll_freeze_set(ctx->smanager, ctx->freeze_want);
|
||||
ctx->freeze_want = -1;
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_EVENT_SCROLL_DRAG_STOP, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_vbar_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
Efl_Ui_Scrollbar_Direction type;
|
||||
|
||||
_scroll_connector_bar_read_and_update(ctx);
|
||||
|
||||
type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_vbar_press_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_vbar_unpress_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_hbar_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
|
||||
_scroll_connector_bar_read_and_update(ctx);
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_hbar_press_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_hbar_unpress_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
|
||||
efl_event_callback_call(ctx->obj, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_bar_size_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
|
||||
|
||||
double width = 0.0, height = 0.0;
|
||||
|
||||
edje_object_calc_force(wd->resize_obj);
|
||||
efl_ui_scrollbar_bar_size_get(ctx->smanager, &width, &height);
|
||||
edje_object_part_drag_size_set(wd->resize_obj, "efl.dragable.hbar", width, 1.0);
|
||||
edje_object_part_drag_size_set(wd->resize_obj, "efl.dragable.vbar", 1.0, height);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_bar_pos_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
|
||||
|
||||
double posx = 0.0, posy = 0.0;
|
||||
|
||||
efl_ui_scrollbar_bar_position_get(ctx->smanager, &posx, &posy);
|
||||
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.hbar", posx, 0.0);
|
||||
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.vbar", 0.0, posy);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_bar_show_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
|
||||
Efl_Ui_Scrollbar_Direction type = *(Efl_Ui_Scrollbar_Direction *)(event->info);
|
||||
|
||||
if (type == EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL)
|
||||
efl_layout_signal_emit(wd->resize_obj, "efl,action,show,hbar", "efl");
|
||||
else if (type == EFL_UI_SCROLLBAR_DIRECTION_VERTICAL)
|
||||
efl_layout_signal_emit(wd->resize_obj, "efl,action,show,vbar", "efl");
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_bar_hide_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
|
||||
Efl_Ui_Scrollbar_Direction type = *(Efl_Ui_Scrollbar_Direction *)(event->info);
|
||||
|
||||
if (type == EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL)
|
||||
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,hbar", "efl");
|
||||
else if (type == EFL_UI_SCROLLBAR_DIRECTION_VERTICAL)
|
||||
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,vbar", "efl");
|
||||
}
|
||||
static void
|
||||
_scroll_connector_resized_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
elm_layout_sizing_eval(ctx->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_connector_size_hint_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = data;
|
||||
elm_layout_sizing_eval(ctx->obj);
|
||||
}
|
||||
|
||||
void
|
||||
efl_ui_scroll_connector_bind(Eo *obj, Eo *manager)
|
||||
{
|
||||
Scroll_Connector_Context *ctx = calloc(1, sizeof(Scroll_Connector_Context));
|
||||
ctx->obj = obj;
|
||||
ctx->smanager = manager;
|
||||
efl_key_data_set(obj, "__context", ctx);
|
||||
|
||||
//from the theme to the object
|
||||
efl_layout_signal_callback_add(obj, "reload", "efl",
|
||||
ctx, _scroll_connector_reload_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_vbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,set", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,start", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,stop", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,step", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,page", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,vbar,press", "efl",
|
||||
ctx, _scroll_connector_vbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,vbar,unpress", "efl",
|
||||
ctx, _scroll_connector_vbar_unpress_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_hbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,set", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,start", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,stop", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,step", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "drag,page", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,hbar,press", "efl",
|
||||
ctx, _scroll_connector_hbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_add(obj, "efl,hbar,unpress", "efl",
|
||||
ctx, _scroll_connector_hbar_unpress_cb, NULL);
|
||||
//from the object to the theme
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED,
|
||||
_scroll_connector_bar_size_changed_cb, ctx);
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED,
|
||||
_scroll_connector_bar_pos_changed_cb, ctx);
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SHOW,
|
||||
_scroll_connector_bar_show_cb, ctx);
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_HIDE,
|
||||
_scroll_connector_bar_hide_cb, ctx);
|
||||
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
||||
_scroll_connector_resized_cb, ctx);
|
||||
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
|
||||
_scroll_connector_size_hint_changed_cb, ctx);
|
||||
}
|
||||
|
||||
void
|
||||
efl_ui_scroll_connector_unbind(Eo *obj)
|
||||
{
|
||||
Scroll_Connector_Context *ctx;
|
||||
|
||||
ctx = efl_key_data_get(obj, "__context");
|
||||
EINA_SAFETY_ON_NULL_RETURN(ctx);
|
||||
|
||||
efl_layout_signal_callback_del(obj, "reload", "efl",
|
||||
ctx, _scroll_connector_reload_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_vbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,set", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,start", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,stop", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,step", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,page", "efl.dragable.vbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,vbar,press", "efl",
|
||||
ctx, _scroll_connector_vbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,vbar,unpress", "efl",
|
||||
ctx, _scroll_connector_vbar_unpress_cb, NULL);
|
||||
|
||||
efl_layout_signal_callback_del(obj, "drag", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_hbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,set", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,start", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,stop", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,step", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "drag,page", "efl.dragable.hbar",
|
||||
ctx, _scroll_connector_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,hbar,press", "efl",
|
||||
ctx, _scroll_connector_hbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_del(obj, "efl,hbar,unpress", "efl",
|
||||
ctx, _scroll_connector_hbar_unpress_cb, NULL);
|
||||
free(ctx);
|
||||
}
|
|
@ -211,329 +211,12 @@ _efl_ui_scroller_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Scroller_
|
|||
return old_content;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_bar_read_and_update(Eo *obj)
|
||||
{
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
double vx, vy;
|
||||
|
||||
edje_object_part_drag_value_get
|
||||
(wd->resize_obj, "efl.dragable.vbar", NULL, &vy);
|
||||
edje_object_part_drag_value_get
|
||||
(wd->resize_obj, "efl.dragable.hbar", &vx, NULL);
|
||||
|
||||
efl_ui_scrollbar_bar_position_set(sd->smanager, vx, vy);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_reload_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Eo *scroller = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(scroller, sd);
|
||||
|
||||
efl_ui_scrollbar_bar_visibility_update(sd->smanager);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_vbar_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
_efl_ui_scroller_bar_read_and_update(data);
|
||||
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_vbar_press_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_vbar_unpress_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_VERTICAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_edje_drag_start_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Eo *scroller = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(scroller, sd);
|
||||
|
||||
_efl_ui_scroller_bar_read_and_update(scroller);
|
||||
|
||||
sd->freeze_want = efl_ui_scrollable_scroll_freeze_get(sd->smanager);
|
||||
efl_ui_scrollable_scroll_freeze_set(sd->smanager, EINA_TRUE);
|
||||
efl_event_callback_call(scroller, EFL_UI_EVENT_SCROLL_DRAG_START, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_edje_drag_stop_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Eo *scroller = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(scroller, sd);
|
||||
|
||||
_efl_ui_scroller_bar_read_and_update(scroller);
|
||||
|
||||
efl_ui_scrollable_scroll_freeze_set(sd->smanager, sd->freeze_want);
|
||||
efl_event_callback_call(scroller, EFL_UI_EVENT_SCROLL_DRAG_STOP, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_edje_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
_efl_ui_scroller_bar_read_and_update(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_hbar_drag_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
_efl_ui_scroller_bar_read_and_update(data);
|
||||
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_DRAG, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_hbar_press_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_PRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_hbar_unpress_cb(void *data,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Scrollbar_Direction type = EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL;
|
||||
efl_event_callback_call(data, EFL_UI_SCROLLBAR_EVENT_BAR_UNPRESS, &type);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_bar_size_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Eo *obj = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
|
||||
double width = 0.0, height = 0.0;
|
||||
|
||||
edje_object_calc_force(wd->resize_obj);
|
||||
efl_ui_scrollbar_bar_size_get(sd->smanager, &width, &height);
|
||||
edje_object_part_drag_size_set(wd->resize_obj, "efl.dragable.hbar", width, 1.0);
|
||||
edje_object_part_drag_size_set(wd->resize_obj, "efl.dragable.vbar", 1.0, height);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_bar_pos_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Eo *obj = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
|
||||
double posx = 0.0, posy = 0.0;
|
||||
|
||||
efl_ui_scrollbar_bar_position_get(sd->smanager, &posx, &posy);
|
||||
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.hbar", posx, 0.0);
|
||||
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.vbar", 0.0, posy);
|
||||
edje_object_signal_emit(wd->resize_obj, "efl,action,scroll", "efl");
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_bar_show_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
Eo *obj = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
Efl_Ui_Scrollbar_Direction type = *(Efl_Ui_Scrollbar_Direction *)(event->info);
|
||||
|
||||
if (type == EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL)
|
||||
edje_object_signal_emit(wd->resize_obj, "efl,action,show,hbar", "efl");
|
||||
else if (type == EFL_UI_SCROLLBAR_DIRECTION_VERTICAL)
|
||||
edje_object_signal_emit(wd->resize_obj, "efl,action,show,vbar", "efl");
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_bar_hide_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
Eo *obj = data;
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
Efl_Ui_Scrollbar_Direction type = *(Efl_Ui_Scrollbar_Direction *)(event->info);
|
||||
|
||||
if (type == EFL_UI_SCROLLBAR_DIRECTION_HORIZONTAL)
|
||||
edje_object_signal_emit(wd->resize_obj, "efl,action,hide,hbar", "efl");
|
||||
else if (type == EFL_UI_SCROLLBAR_DIRECTION_VERTICAL)
|
||||
edje_object_signal_emit(wd->resize_obj, "efl,action,hide,vbar", "efl");
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_edje_object_attach(Eo *obj)
|
||||
{
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "reload", "efl",
|
||||
obj, _efl_ui_scroller_reload_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_vbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,set", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,start", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,stop", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,step", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,page", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "efl,vbar,press", "efl",
|
||||
obj, _efl_ui_scroller_vbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "efl,vbar,unpress", "efl",
|
||||
obj, _efl_ui_scroller_vbar_unpress_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_hbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,set", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,start", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,stop", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,step", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "drag,page", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "efl,hbar,press", "efl",
|
||||
obj, _efl_ui_scroller_hbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(obj, "efl,hbar,unpress", "efl",
|
||||
obj, _efl_ui_scroller_hbar_unpress_cb, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_scroll_edje_object_detach(Evas_Object *obj)
|
||||
{
|
||||
EFL_UI_SCROLLER_DATA_GET_OR_RETURN(obj, sd);
|
||||
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "reload", "efl",
|
||||
obj, _efl_ui_scroller_reload_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_vbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,set", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,start", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,stop", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,step", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,page", "efl.dragable.vbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "efl,vbar,press", "efl",
|
||||
obj, _efl_ui_scroller_vbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "efl,vbar,unpress", "efl",
|
||||
obj, _efl_ui_scroller_vbar_unpress_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_hbar_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,set", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,start", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_start_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,stop", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_stop_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,step", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "drag,page", "efl.dragable.hbar",
|
||||
obj, _efl_ui_scroller_edje_drag_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "efl,hbar,press", "efl",
|
||||
obj, _efl_ui_scroller_hbar_press_cb, NULL);
|
||||
efl_layout_signal_callback_del
|
||||
(obj, "efl,hbar,unpress", "efl",
|
||||
obj, _efl_ui_scroller_hbar_unpress_cb, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_pan_resized_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
elm_layout_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_resized_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
elm_layout_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_scroller_size_hint_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
elm_layout_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_focused_element(void *data, const Efl_Event *event)
|
||||
{
|
||||
|
@ -566,7 +249,7 @@ _efl_ui_scroller_efl_object_constructor(Eo *obj,
|
|||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_scroller_efl_object_finalize(Eo *obj,
|
||||
Efl_Ui_Scroller_Data *sd EINA_UNUSED)
|
||||
Efl_Ui_Scroller_Data *sd)
|
||||
{
|
||||
obj = efl_finalize(efl_super(obj, MY_CLASS));
|
||||
|
||||
|
@ -583,20 +266,7 @@ _efl_ui_scroller_efl_object_finalize(Eo *obj,
|
|||
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
||||
_scroll_edje_object_attach(obj);
|
||||
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED,
|
||||
_efl_ui_scroller_bar_size_changed_cb, obj);
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED,
|
||||
_efl_ui_scroller_bar_pos_changed_cb, obj);
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SHOW,
|
||||
_efl_ui_scroller_bar_show_cb, obj);
|
||||
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_HIDE,
|
||||
_efl_ui_scroller_bar_hide_cb, obj);
|
||||
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
||||
_efl_ui_scroller_resized_cb, obj);
|
||||
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
|
||||
_efl_ui_scroller_size_hint_changed_cb, obj);
|
||||
efl_ui_scroll_connector_bind(obj, sd->smanager);
|
||||
efl_event_callback_add(sd->pan_obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
||||
_efl_ui_scroller_pan_resized_cb, obj);
|
||||
|
||||
|
@ -606,22 +276,9 @@ _efl_ui_scroller_efl_object_finalize(Eo *obj,
|
|||
|
||||
EOLIAN static void
|
||||
_efl_ui_scroller_efl_object_destructor(Eo *obj,
|
||||
Efl_Ui_Scroller_Data *sd EINA_UNUSED)
|
||||
Efl_Ui_Scroller_Data *sd)
|
||||
{
|
||||
_scroll_edje_object_detach(obj);
|
||||
|
||||
efl_event_callback_del(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED,
|
||||
_efl_ui_scroller_bar_size_changed_cb, obj);
|
||||
efl_event_callback_del(obj, EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED,
|
||||
_efl_ui_scroller_bar_pos_changed_cb, obj);
|
||||
efl_event_callback_del(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SHOW,
|
||||
_efl_ui_scroller_bar_show_cb, obj);
|
||||
efl_event_callback_del(obj, EFL_UI_SCROLLBAR_EVENT_BAR_HIDE,
|
||||
_efl_ui_scroller_bar_hide_cb, obj);
|
||||
efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
||||
_efl_ui_scroller_resized_cb, obj);
|
||||
efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
|
||||
_efl_ui_scroller_size_hint_changed_cb, obj);
|
||||
efl_ui_scroll_connector_unbind(obj);
|
||||
efl_event_callback_del(sd->pan_obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
||||
_efl_ui_scroller_pan_resized_cb, obj);
|
||||
efl_del(sd->pan_obj);
|
||||
|
|
|
@ -5475,12 +5475,15 @@ _efl_ui_selection_manager_efl_object_constructor(Eo *obj, Efl_Ui_Selection_Manag
|
|||
pd->text_uri = eina_stringshare_add("text/uri-list");
|
||||
|
||||
#ifdef HAVE_ELEMENTARY_WL2
|
||||
pd->send_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
|
||||
_wl_selection_send, pd);
|
||||
pd->changed_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_SELECTION,
|
||||
_wl_selection_changed, pd);
|
||||
pd->end_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_END,
|
||||
_wl_dnd_end, pd);
|
||||
if (_elm_wl_display)
|
||||
{
|
||||
pd->send_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
|
||||
_wl_selection_send, pd);
|
||||
pd->changed_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_SELECTION,
|
||||
_wl_selection_changed, pd);
|
||||
pd->end_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_END,
|
||||
_wl_dnd_end, pd);
|
||||
}
|
||||
#endif
|
||||
managers = eina_list_append(managers, obj);
|
||||
return obj;
|
||||
|
|
|
@ -351,7 +351,6 @@ _text_draw(void *data)
|
|||
return;
|
||||
}
|
||||
map = evas_map_new(map_point_no);
|
||||
evas_map_util_object_move_sync_set(map, EINA_TRUE);
|
||||
|
||||
#ifdef EFL_UI_TEXTPATH_LINE_DEBUG
|
||||
Evas_Object *line;
|
||||
|
@ -645,7 +644,11 @@ _textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part,
|
|||
if (!text) text = "";
|
||||
ret = edje_object_part_text_set(pd->text_obj, part, text);
|
||||
_ellipsis_set(pd, obj);
|
||||
_path_start_angle_adjust(obj, pd);
|
||||
|
||||
//Only if circlular textpath
|
||||
if (pd->circle.radius > 0)
|
||||
_path_start_angle_adjust(obj, pd);
|
||||
|
||||
_sizing_eval(pd);
|
||||
|
||||
return ret;
|
||||
|
@ -792,6 +795,8 @@ _efl_ui_textpath_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textpath_Data *pd EINA_
|
|||
EOLIAN static void
|
||||
_efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction)
|
||||
{
|
||||
double sweep_length;
|
||||
|
||||
if (pd->circle.x == x && pd->circle.y == y &&
|
||||
pd->circle.radius == radius &&
|
||||
pd->circle.start_angle == start_angle &&
|
||||
|
@ -805,17 +810,15 @@ _efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double
|
|||
pd->direction = direction;
|
||||
|
||||
efl_gfx_path_reset(obj);
|
||||
|
||||
if (direction == EFL_UI_TEXTPATH_DIRECTION_CW ||
|
||||
direction == EFL_UI_TEXTPATH_DIRECTION_CW_CENTER)
|
||||
{
|
||||
efl_gfx_path_append_arc(obj, x - radius, y - radius, radius * 2,
|
||||
radius * 2, start_angle, -360);
|
||||
}
|
||||
sweep_length = -360;
|
||||
else
|
||||
{
|
||||
efl_gfx_path_append_arc(obj, x - radius, y - radius, radius * 2,
|
||||
radius * 2, start_angle, 360);
|
||||
}
|
||||
sweep_length = 360;
|
||||
|
||||
efl_gfx_path_append_arc(obj, x - radius, y - radius, radius * 2,
|
||||
radius * 2, start_angle, sweep_length);
|
||||
|
||||
_path_data_get(obj, pd);
|
||||
_path_start_angle_adjust(obj, pd);
|
||||
|
|
|
@ -617,7 +617,6 @@ _elm_player_efl_canvas_group_group_add(Eo *obj, Elm_Player_Data *priv)
|
|||
(priv->slider, _double_to_time, _str_free);
|
||||
elm_slider_units_format_function_set
|
||||
(priv->slider, _double_to_time, _str_free);
|
||||
elm_slider_min_max_set(priv->slider, 0, 0);
|
||||
elm_slider_value_set(priv->slider, 0);
|
||||
elm_object_disabled_set(priv->slider, EINA_TRUE);
|
||||
evas_object_size_hint_align_set(priv->slider, EVAS_HINT_FILL, 0.5);
|
||||
|
|
|
@ -1025,5 +1025,19 @@ void _efl_ui_focus_event_redirector(Efl_Ui_Focus_Object *obj, Efl_Ui_Focus_Objec
|
|||
void efl_ui_widget_internal_set(Eo *obj, Eina_Bool internal);
|
||||
Eina_Bool efl_ui_widget_internal_get(Eo *obj);
|
||||
|
||||
/**
|
||||
* Connect the default scrollable theme signals with the object events and vice versa
|
||||
*
|
||||
* @param obj The object where to listen for theme signals
|
||||
* @param manager The scroll manager object where to listen for events
|
||||
*/
|
||||
void efl_ui_scroll_connector_bind(Eo *obj, Eo *manager);
|
||||
|
||||
/**
|
||||
* Connect the default scrollable theme signals with the object events and vice versa
|
||||
*
|
||||
* @param obj The object where we are listening for events
|
||||
*/
|
||||
void efl_ui_scroll_connector_unbind(Eo *obj);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -209,11 +209,8 @@ _elm_sys_notify_singleton_get(void)
|
|||
EOLIAN static void
|
||||
_elm_sys_notify_class_constructor(Efl_Class *klass EINA_UNUSED)
|
||||
{
|
||||
if (ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED == 0)
|
||||
{
|
||||
ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED = ecore_event_type_new();
|
||||
ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED = ecore_event_type_new();
|
||||
}
|
||||
ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED = ecore_event_type_new();
|
||||
ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED = ecore_event_type_new();
|
||||
}
|
||||
|
||||
/*============================================================================*
|
||||
|
|
|
@ -943,6 +943,7 @@ elementary_src = [
|
|||
'efl_ui_clickable.c',
|
||||
'efl_ui_clickable_util.c',
|
||||
'efl_ui_format.c',
|
||||
'efl_ui_scroll_util.c',
|
||||
]
|
||||
|
||||
elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, efreet_mime, efreet_trash, eio, atspi, dl, intl]
|
||||
|
|
|
@ -844,7 +844,6 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
Evas_Object_Pointer_Data *obj_pdata;
|
||||
Evas_Object_Pointer_Mode pointer_mode;
|
||||
|
||||
if (src->delete_me) break;
|
||||
child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS);
|
||||
obj_pdata = _evas_object_pointer_data_get(pdata, child);
|
||||
if (!obj_pdata)
|
||||
|
|
|
@ -1952,6 +1952,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* color=<color>
|
||||
* @endcode
|
||||
|
@ -1970,6 +1971,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* underline_color=<color>
|
||||
* @endcode
|
||||
|
@ -1989,6 +1991,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* underline2_color=<color>
|
||||
* @endcode
|
||||
|
@ -2007,6 +2010,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* underline_dash_color=<color>
|
||||
* @endcode
|
||||
|
@ -2026,6 +2030,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* outline_color=<color>
|
||||
* @endcode
|
||||
|
@ -2045,6 +2050,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* shadow_color=<color>
|
||||
* @endcode
|
||||
|
@ -2064,6 +2070,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* glow_color=<color>
|
||||
* @endcode
|
||||
|
@ -2083,6 +2090,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* glow2_color=<color>
|
||||
* @endcode
|
||||
|
@ -2102,6 +2110,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* backing_color=<color>
|
||||
* @endcode
|
||||
|
@ -2121,6 +2130,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
|
|||
* @li "#RRGGBBAA"
|
||||
* @li "#RGB"
|
||||
* @li "#RGBA"
|
||||
* @li "color_name" like "red"
|
||||
* @code
|
||||
* strikethrough_color=<color>
|
||||
* @endcode
|
||||
|
|
|
@ -729,7 +729,6 @@ _ecore_imf_context_ibus_commit_text_cb(IBusInputContext *ibuscontext EINA_UNUSED
|
|||
|
||||
if (ibusimcontext->ctx)
|
||||
{
|
||||
ecore_imf_context_commit_event_add(ibusimcontext->ctx, text->text);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_COMMIT,
|
||||
(void *)commit_str);
|
||||
|
@ -803,7 +802,6 @@ _ecore_imf_context_ibus_delete_surrounding_text_cb(IBusInputContext *ibuscontext
|
|||
ev.ctx = _focus_im_context;
|
||||
ev.n_chars = nchars;
|
||||
ev.offset = offset_from_cursor;
|
||||
ecore_imf_context_delete_surrounding_event_add(_focus_im_context, offset_from_cursor, nchars);
|
||||
ecore_imf_context_event_callback_call(_focus_im_context,
|
||||
ECORE_IMF_CALLBACK_DELETE_SURROUNDING,
|
||||
&ev);
|
||||
|
@ -928,13 +926,11 @@ _ecore_imf_context_ibus_update_preedit_text_cb(IBusInputContext *ibuscontext EI
|
|||
{
|
||||
if (flag)
|
||||
{
|
||||
ecore_imf_context_preedit_start_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_START,
|
||||
NULL);
|
||||
}
|
||||
|
||||
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
|
||||
NULL);
|
||||
|
@ -943,13 +939,11 @@ _ecore_imf_context_ibus_update_preedit_text_cb(IBusInputContext *ibuscontext EI
|
|||
{
|
||||
if (flag)
|
||||
{
|
||||
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
|
||||
NULL);
|
||||
}
|
||||
|
||||
ecore_imf_context_preedit_end_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_END,
|
||||
NULL);
|
||||
|
@ -969,13 +963,11 @@ _ecore_imf_context_ibus_show_preedit_text_cb(IBusInputContext *ibuscontext EINA_
|
|||
ibusimcontext->preedit_visible = EINA_TRUE;
|
||||
|
||||
// call preedit start
|
||||
ecore_imf_context_preedit_start_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_START,
|
||||
NULL);
|
||||
|
||||
// call preedit changed
|
||||
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
|
||||
NULL);
|
||||
|
@ -996,13 +988,11 @@ _ecore_imf_context_ibus_hide_preedit_text_cb(IBusInputContext *ibuscontext EINA_
|
|||
ibusimcontext->preedit_visible = EINA_FALSE;
|
||||
|
||||
// call preedit changed
|
||||
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
|
||||
NULL);
|
||||
|
||||
// call preedit end
|
||||
ecore_imf_context_preedit_end_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_END,
|
||||
NULL);
|
||||
|
@ -1025,13 +1015,11 @@ _ecore_imf_context_ibus_destroy_cb(IBusInputContext *ibuscontext EINA_UNUSED,
|
|||
ibusimcontext->preedit_string = NULL;
|
||||
|
||||
// call preedit changed
|
||||
ecore_imf_context_preedit_changed_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
|
||||
NULL);
|
||||
|
||||
// call preedit end
|
||||
ecore_imf_context_preedit_end_event_add(ibusimcontext->ctx);
|
||||
ecore_imf_context_event_callback_call(ibusimcontext->ctx,
|
||||
ECORE_IMF_CALLBACK_PREEDIT_END,
|
||||
NULL);
|
||||
|
|
|
@ -1491,7 +1491,6 @@ panel_slot_commit_string(int context, const WideString &wstr)
|
|||
if (_focused_ic != ic)
|
||||
return;
|
||||
|
||||
ecore_imf_context_commit_event_add(ic->ctx, utf8_wcstombs(wstr).c_str());
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str());
|
||||
}
|
||||
|
||||
|
@ -1796,9 +1795,7 @@ turn_on_ic(EcoreIMFContextISF *ic)
|
|||
|
||||
if (ic->impl->use_preedit && ic->impl->preedit_string.length())
|
||||
{
|
||||
ecore_imf_context_preedit_start_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
|
||||
ecore_imf_context_preedit_changed_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
ic->impl->preedit_started = true;
|
||||
}
|
||||
|
@ -1831,9 +1828,7 @@ turn_off_ic(EcoreIMFContextISF *ic)
|
|||
|
||||
if (ic->impl->use_preedit && ic->impl->preedit_string.length())
|
||||
{
|
||||
ecore_imf_context_preedit_changed_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
ecore_imf_context_preedit_end_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
|
||||
ic->impl->preedit_started = false;
|
||||
}
|
||||
|
@ -2166,9 +2161,7 @@ open_specific_factory(EcoreIMFContextISF *ic,
|
|||
|
||||
if (ic->impl->use_preedit && ic->impl->preedit_string.length())
|
||||
{
|
||||
ecore_imf_context_preedit_changed_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
ecore_imf_context_preedit_end_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
|
||||
ic->impl->preedit_started = false;
|
||||
}
|
||||
|
@ -2430,7 +2423,6 @@ slot_show_preedit_string(IMEngineInstanceBase *si)
|
|||
{
|
||||
if (!ic->impl->preedit_started)
|
||||
{
|
||||
ecore_imf_context_preedit_start_event_add(_focused_ic->ctx);
|
||||
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
|
||||
ic->impl->preedit_started = true;
|
||||
}
|
||||
|
@ -2487,12 +2479,10 @@ slot_hide_preedit_string(IMEngineInstanceBase *si)
|
|||
{
|
||||
if (emit)
|
||||
{
|
||||
ecore_imf_context_preedit_changed_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
if (ic->impl->preedit_started)
|
||||
{
|
||||
ecore_imf_context_preedit_end_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
|
||||
ic->impl->preedit_started = false;
|
||||
}
|
||||
|
@ -2541,11 +2531,9 @@ slot_update_preedit_caret(IMEngineInstanceBase *si, int caret)
|
|||
{
|
||||
if (!ic->impl->preedit_started)
|
||||
{
|
||||
ecore_imf_context_preedit_start_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
|
||||
ic->impl->preedit_started = true;
|
||||
}
|
||||
ecore_imf_context_preedit_changed_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
else
|
||||
|
@ -2572,13 +2560,11 @@ slot_update_preedit_string(IMEngineInstanceBase *si,
|
|||
{
|
||||
if (!ic->impl->preedit_started)
|
||||
{
|
||||
ecore_imf_context_preedit_start_event_add(_focused_ic->ctx);
|
||||
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
|
||||
ic->impl->preedit_started = true;
|
||||
}
|
||||
ic->impl->preedit_caret = str.length();
|
||||
ic->impl->preedit_updating = true;
|
||||
ecore_imf_context_preedit_changed_event_add(ic->ctx);
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
ic->impl->preedit_updating = false;
|
||||
}
|
||||
|
@ -2613,7 +2599,6 @@ slot_commit_string(IMEngineInstanceBase *si,
|
|||
EINA_SAFETY_ON_NULL_RETURN(ic);
|
||||
EINA_SAFETY_ON_NULL_RETURN(ic->ctx);
|
||||
|
||||
ecore_imf_context_commit_event_add(ic->ctx, utf8_wcstombs(str).c_str());
|
||||
ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str());
|
||||
}
|
||||
|
||||
|
@ -2797,7 +2782,6 @@ slot_delete_surrounding_text(IMEngineInstanceBase *si,
|
|||
ev.ctx = _focused_ic->ctx;
|
||||
ev.n_chars = len;
|
||||
ev.offset = offset;
|
||||
ecore_imf_context_delete_surrounding_event_add(_focused_ic->ctx, offset, len);
|
||||
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, &ev);
|
||||
|
||||
return true;
|
||||
|
@ -2840,7 +2824,6 @@ fallback_commit_string_cb(IMEngineInstanceBase *si EINA_UNUSED,
|
|||
|
||||
if (_focused_ic)
|
||||
{
|
||||
ecore_imf_context_commit_event_add(_focused_ic->ctx, utf8_wcstombs(str).c_str());
|
||||
ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -383,7 +383,6 @@ _ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx)
|
|||
free(imf_context_data->preedit_chars);
|
||||
imf_context_data->preedit_chars = NULL;
|
||||
|
||||
ecore_imf_context_preedit_changed_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
|
@ -392,7 +391,6 @@ _ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx)
|
|||
char *result_utf8 = strdup(result);
|
||||
if (result_utf8)
|
||||
{
|
||||
ecore_imf_context_commit_event_add(ctx, result_utf8);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_COMMIT, result_utf8);
|
||||
free(result_utf8);
|
||||
}
|
||||
|
@ -695,7 +693,6 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx,
|
|||
if (!unicode) abort();
|
||||
if (unicode[0] >= 0x20 && unicode[0] != 0x7f)
|
||||
{
|
||||
ecore_imf_context_commit_event_add(ctx, compose);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_COMMIT, compose);
|
||||
result = EINA_TRUE;
|
||||
}
|
||||
|
@ -882,10 +879,7 @@ _ecore_imf_xim_preedit_start_call(XIC xic EINA_UNUSED,
|
|||
EINA_SAFETY_ON_NULL_RETURN(imf_context_data);
|
||||
|
||||
if (imf_context_data->finalizing == EINA_FALSE)
|
||||
{
|
||||
ecore_imf_context_preedit_start_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
|
||||
}
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -904,15 +898,11 @@ _ecore_imf_xim_preedit_done_call(XIC xic EINA_UNUSED,
|
|||
imf_context_data->preedit_length = 0;
|
||||
free(imf_context_data->preedit_chars);
|
||||
imf_context_data->preedit_chars = NULL;
|
||||
ecore_imf_context_preedit_changed_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
if (imf_context_data->finalizing == EINA_FALSE)
|
||||
{
|
||||
ecore_imf_context_preedit_end_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
|
||||
}
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
|
||||
}
|
||||
|
||||
/* FIXME */
|
||||
|
@ -1049,7 +1039,6 @@ done:
|
|||
}
|
||||
}
|
||||
|
||||
ecore_imf_context_preedit_changed_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
|
@ -1072,10 +1061,7 @@ _ecore_imf_xim_preedit_caret_call(XIC xic EINA_UNUSED,
|
|||
{
|
||||
imf_context_data->preedit_cursor = call_data->position;
|
||||
if (imf_context_data->finalizing == EINA_FALSE)
|
||||
{
|
||||
ecore_imf_context_preedit_changed_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1257,7 +1243,6 @@ _ecore_imf_xim_ic_reinitialize(Ecore_IMF_Context *ctx)
|
|||
imf_context_data->preedit_length = 0;
|
||||
free(imf_context_data->preedit_chars);
|
||||
imf_context_data->preedit_chars = NULL;
|
||||
ecore_imf_context_preedit_changed_event_add(ctx);
|
||||
ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,6 +161,8 @@ EFL_START_TEST(efl_test_select_model)
|
|||
Eina_Value v = { 0 };
|
||||
Efl_Select_Model *model;
|
||||
Eina_Future *future;
|
||||
Eina_Iterator *it;
|
||||
uint64_t *index;
|
||||
|
||||
eina_value_setup(&v, EINA_VALUE_TYPE_INT);
|
||||
|
||||
|
@ -186,6 +188,16 @@ EFL_START_TEST(efl_test_select_model)
|
|||
eina_future_then(future, _selection_children_slice_get_then, NULL, NULL);
|
||||
|
||||
ecore_main_loop_begin();
|
||||
|
||||
it = efl_select_model_selected_get(model);
|
||||
EINA_ITERATOR_FOREACH(it, index)
|
||||
fail_if(*index != 2);
|
||||
eina_iterator_free(it);
|
||||
|
||||
it = efl_select_model_unselected_get(model);
|
||||
EINA_ITERATOR_FOREACH(it, index)
|
||||
fail_if(*index == 2);
|
||||
eina_iterator_free(it);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ static const Efl_Test_Case etc[] = {
|
|||
{ "efl_ui_check", efl_ui_test_check },
|
||||
{ "efl_ui_progressbar", efl_ui_test_progressbar },
|
||||
{ "efl_ui_radio_group", efl_ui_test_radio_group },
|
||||
{ "efl_ui_slider", efl_ui_test_slider },
|
||||
{ "efl_ui_win", efl_ui_test_win },
|
||||
{ "efl_ui_spin", efl_ui_test_spin },
|
||||
{ "efl_ui_spin_button", efl_ui_test_spin_button },
|
||||
|
|
|
@ -39,6 +39,7 @@ void efl_ui_test_spotlight(TCase *tc);
|
|||
void efl_ui_test_check(TCase *tc);
|
||||
void efl_ui_test_progressbar(TCase *tc);
|
||||
void efl_ui_test_radio_group(TCase *tc);
|
||||
void efl_ui_test_slider(TCase *tc);
|
||||
void efl_ui_test_win(TCase *tc);
|
||||
void efl_ui_test_spin(TCase *tc);
|
||||
void efl_ui_test_spin_button(TCase *tc);
|
||||
|
|
|
@ -106,6 +106,22 @@ EFL_START_TEST(efl_ui_layout_test_layout_theme)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(efl_ui_layout_test_api_ordering)
|
||||
{
|
||||
Evas_Object *win, *box;
|
||||
const char text_text[] = "test text";
|
||||
|
||||
win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
|
||||
box = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
Eo *layout = efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_content_set(efl_added, box),
|
||||
efl_text_set(efl_added, text_text)
|
||||
);
|
||||
ck_assert_ptr_eq(efl_content_get(layout), box);
|
||||
ck_assert_str_eq(efl_text_get(layout), text_text);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void efl_ui_test_layout(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, efl_ui_layout_test_property_bind);
|
||||
|
@ -113,4 +129,5 @@ void efl_ui_test_layout(TCase *tc)
|
|||
tcase_add_test(tc, efl_ui_layout_test_layout_api_update_hints);
|
||||
tcase_add_test(tc, efl_ui_layout_test_layout_force);
|
||||
tcase_add_test(tc, efl_ui_layout_test_layout_theme);
|
||||
tcase_add_test(tc, efl_ui_layout_test_api_ordering);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <Efl_Ui.h>
|
||||
#include <Elementary.h>
|
||||
#include "efl_ui_suite.h"
|
||||
|
||||
static unsigned int event_counter;
|
||||
|
||||
static void
|
||||
slider_changed(void *data EINA_UNUSED, const Efl_Event *ev)
|
||||
{
|
||||
event_counter++;
|
||||
if (event_counter == 1)
|
||||
efl_event_callback_del(ev->object, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL);
|
||||
else if (event_counter == 2)
|
||||
ecore_main_loop_quit();
|
||||
}
|
||||
|
||||
EFL_START_TEST(efl_ui_test_slider_events)
|
||||
{
|
||||
Eo *slider;
|
||||
Evas *e;
|
||||
Eo *win = win_add();
|
||||
|
||||
efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100));
|
||||
slider = efl_add(EFL_UI_SLIDER_CLASS, win,
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL),
|
||||
efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100))
|
||||
);
|
||||
|
||||
e = evas_object_evas_get(win);
|
||||
|
||||
efl_layout_signal_process(slider, EINA_TRUE);
|
||||
get_me_to_those_events(slider);
|
||||
|
||||
|
||||
int x, y, w, h;
|
||||
int sx, sy, sw, sh;
|
||||
|
||||
evas_object_geometry_get(elm_object_part_content_get(slider, "efl.bar"), &x, &y, &w, &h);
|
||||
evas_object_geometry_get(slider, &sx, &sy, &sw, &sh);
|
||||
evas_event_feed_mouse_in(e, 0, NULL);
|
||||
evas_event_feed_mouse_move(e, x + (w / 2), y + (h / 2), 0, NULL);
|
||||
evas_event_feed_mouse_down(e, 1, 0, 0, NULL);
|
||||
evas_event_feed_mouse_move(e, sx + (sw / 2), sy + (sh / 2), 0, NULL);
|
||||
evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
|
||||
ecore_main_loop_begin();
|
||||
ck_assert_int_eq(event_counter, 2);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void efl_ui_test_slider(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, efl_ui_test_slider_events);
|
||||
}
|
|
@ -7,6 +7,8 @@
|
|||
#include "../efl_check.h"
|
||||
#include "suite_helpers.h"
|
||||
|
||||
extern Eina_Bool abort_on_warnings;
|
||||
|
||||
static const Efl_Test_Case etc[] = {
|
||||
{ "elm_config", elm_test_config },
|
||||
{ "elm_check", elm_test_check },
|
||||
|
@ -96,6 +98,7 @@ main(int argc, char **argv)
|
|||
return 0;
|
||||
|
||||
failed_count = suite_setup(EINA_TRUE);
|
||||
abort_on_warnings = EINA_TRUE;
|
||||
|
||||
failed_count += _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
|
||||
"Elementary", etc, SUITE_INIT_FN(elm2), SUITE_SHUTDOWN_FN(elm));
|
||||
|
|
|
@ -454,7 +454,6 @@ static void
|
|||
_do_quit()
|
||||
{
|
||||
itc.func.content_get = NULL;
|
||||
fail_on_errors_teardown();
|
||||
ecore_main_loop_quit();
|
||||
}
|
||||
|
||||
|
@ -514,7 +513,6 @@ EFL_START_TEST(elm_genlist_test_tree_expand)
|
|||
evas_object_resize(genlist, 100, 10 + 10 * NUM_TREE_ITEMS);
|
||||
evas_object_show(win);
|
||||
evas_object_resize(win, 100, 10 + 10 * NUM_TREE_ITEMS);
|
||||
fail_on_errors_setup();
|
||||
ecore_main_loop_begin();
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
#include <Elementary.h>
|
||||
#include "elm_suite.h"
|
||||
|
||||
static int prev_abort;
|
||||
static int prev_abort_level;
|
||||
|
||||
EFL_START_TEST(elm_naviframe_test_legacy_type_check)
|
||||
{
|
||||
Evas_Object *win, *naviframe;
|
||||
|
@ -84,11 +81,6 @@ EFL_START_TEST(elm_naviframe_test_content_preserve_on_pop)
|
|||
|
||||
win = win_add(NULL, "naviframe", ELM_WIN_BASIC);
|
||||
|
||||
prev_abort = eina_log_abort_on_critical_get();
|
||||
prev_abort_level = eina_log_abort_on_critical_level_get();
|
||||
eina_log_abort_on_critical_set(1);
|
||||
eina_log_abort_on_critical_level_set(1);
|
||||
|
||||
naviframe = elm_naviframe_add(win);
|
||||
elm_naviframe_content_preserve_on_pop_set(naviframe, EINA_TRUE);
|
||||
|
||||
|
@ -115,8 +107,6 @@ EFL_START_TEST(elm_naviframe_test_content_preserve_on_pop)
|
|||
elm_object_signal_emit(button, "elm,action,click", "elm");
|
||||
|
||||
ecore_main_loop_begin();
|
||||
eina_log_abort_on_critical_set(prev_abort);
|
||||
eina_log_abort_on_critical_level_set(prev_abort_level);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
|
|
|
@ -145,6 +145,7 @@ efl_ui_suite_src = [
|
|||
'efl_ui_test_progressbar.c',
|
||||
'efl_ui_test_spin.c',
|
||||
'efl_ui_test_spin_button.c',
|
||||
'efl_ui_test_slider.c',
|
||||
]
|
||||
|
||||
efl_ui_suite = executable('efl_ui_suite',
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "elm_widget.h"
|
||||
#include "ecore_private.h"
|
||||
#include "ecore_evas_private.h"
|
||||
#include "suite_helpers.h"
|
||||
|
||||
|
||||
static int main_pid = -1;
|
||||
|
@ -19,6 +20,8 @@ static Eina_Bool legacy_mode = EINA_FALSE;
|
|||
static int log_abort;
|
||||
static int log_abort_level;
|
||||
|
||||
Eina_Bool abort_on_warnings = EINA_FALSE;
|
||||
|
||||
void elm_test_init(TCase *tc);
|
||||
|
||||
SUITE_INIT(elm)
|
||||
|
@ -34,6 +37,8 @@ _elm2_suite_init(void)
|
|||
|
||||
if (getpid() != main_pid)
|
||||
{
|
||||
if (abort_on_warnings)
|
||||
fail_on_errors_setup();
|
||||
ecore_fork_reset();
|
||||
return;
|
||||
}
|
||||
|
@ -44,6 +49,8 @@ _elm2_suite_init(void)
|
|||
did_shutdown = 1;
|
||||
}
|
||||
ck_assert_int_eq(elm_init(1, args), 1);
|
||||
if (abort_on_warnings)
|
||||
fail_on_errors_setup();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -28,6 +28,7 @@ static const Efl_Test_Case etc[] = {
|
|||
{ "Evas GL", evas_test_evasgl },
|
||||
{ "Object Smart", evas_test_object_smart },
|
||||
{ "Matrix", evas_test_matrix },
|
||||
{ "Events", evas_test_events },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -22,5 +22,6 @@ void evas_test_mask(TCase *tc);
|
|||
void evas_test_evasgl(TCase *tc);
|
||||
void evas_test_object_smart(TCase *tc);
|
||||
void evas_test_matrix(TCase *tc);
|
||||
void evas_test_events(TCase *tc);
|
||||
|
||||
#endif /* _EVAS_SUITE_H */
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Evas.h>
|
||||
#include <Ecore_Evas.h>
|
||||
|
||||
#include "evas_suite.h"
|
||||
#include "evas_tests_helpers.h"
|
||||
|
||||
static void
|
||||
_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
intptr_t *val = data;
|
||||
ck_assert_int_eq(*val, 0);
|
||||
*val = 1;
|
||||
}
|
||||
|
||||
EFL_START_TEST(evas_test_events_frozen_mouse_up)
|
||||
{
|
||||
Evas *evas;
|
||||
Evas_Object *rect;
|
||||
static int callback_called = 0;
|
||||
evas = EVAS_TEST_INIT_EVAS();
|
||||
rect = evas_object_rectangle_add(evas);
|
||||
evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, &callback_called);
|
||||
evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_UP, _mouse_down_cb, &callback_called);
|
||||
evas_object_resize(rect, 500, 500);
|
||||
evas_object_show(rect);
|
||||
|
||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
||||
evas_event_feed_mouse_move(evas, 100, 100, 0, NULL);
|
||||
evas_event_feed_mouse_down(evas, 1, 0, 0, NULL);
|
||||
ck_assert_int_eq(callback_called, 1);
|
||||
callback_called = 0;
|
||||
evas_object_freeze_events_set(rect, 1);
|
||||
evas_event_feed_mouse_up(evas, 1, 0, 0, NULL);
|
||||
ck_assert_int_eq(callback_called, 0);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void evas_test_events(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, evas_test_events_frozen_mouse_up);
|
||||
}
|
|
@ -15,6 +15,7 @@ evas_suite_src = [
|
|||
'evas_test_evasgl.c',
|
||||
'evas_test_matrix.c',
|
||||
'evas_test_focus.c',
|
||||
'evas_test_events.c',
|
||||
'evas_tests_helpers.h',
|
||||
'evas_suite.h'
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue