From 22081ada26b26e6a976b54f4e63f1ee23d46a4dd Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 9 May 2019 12:29:17 +0100 Subject: [PATCH 01/25] much better fix to invalid uv coords with new map render code this fixes the d81d1337b087fbc23fb7439c269c1f7e34aa5fa2 fix to do it in the inner loop so uu and vv stay valid. still not a great fix but better than chashes. --- src/lib/evas/common/evas_map_image_internal_high.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/common/evas_map_image_internal_high.c b/src/lib/evas/common/evas_map_image_internal_high.c index bce8ce7f4d..30748023d9 100644 --- a/src/lib/evas/common/evas_map_image_internal_high.c +++ b/src/lib/evas/common/evas_map_image_internal_high.c @@ -396,9 +396,6 @@ _map_triangle_draw_linear(RGBA_Image *src, RGBA_Image *dst, dx = 1 - (_xa - x1); u = _ua + dx * _dudx; v = _va + dx * _dvdx; - // FIXME: sometimes u and v are < 0 - don'tc crash - if (u < 0) u = 0; - if (v < 0) v = 0; if (col_blend) { @@ -419,6 +416,9 @@ _map_triangle_draw_linear(RGBA_Image *src, RGBA_Image *dst, { uu = (int) u; vv = (int) v; + // FIXME: sometimes u and v are < 0 - don'tc crash + if (uu < 0) uu = 0; + if (vv < 0) vv = 0; //Range exception handling //OPTIMIZE ME, handle in advance? From e027ad2626d9178c0c96789e07c97fb20bc126d6 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 9 May 2019 14:55:17 +0200 Subject: [PATCH 02/25] elm: (re)move some legacy types/enums back to header These are legacy-only and not used anywhere in .eo files, so move them where they belong. They are still used within impls around the place. The others can't be moved as they are still used in .eo files in places, that has to be dealt with separately. --- src/lib/elementary/elm_general.eot | 218 ------------------------- src/lib/elementary/elm_general.h | 248 +++++++++++++++++++++++++++++ 2 files changed, 248 insertions(+), 218 deletions(-) diff --git a/src/lib/elementary/elm_general.eot b/src/lib/elementary/elm_general.eot index 73739538fd..12d800b11a 100644 --- a/src/lib/elementary/elm_general.eot +++ b/src/lib/elementary/elm_general.eot @@ -4,69 +4,6 @@ /* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */ type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]] -type Eina_Compare_Cb: __undefined_type; [[Eina compare callback type]] -type @extern Elm.Glob.Match_Flags: __undefined_type; [[Elementary glob matching flags]] - -/* FIXME: elm_policy API is not bound to EO */ -struct Elm.Event.Policy_Changed -{ - [[Data on the event when an Elementary policy has changed]] - policy: uint; [[the policy identifier]] - new_value: int; [[value the policy had before the change]] - old_value: int; [[new value the policy got]] -} - -/* FIXME: elm_policy API is not bound to EO */ -enum Elm.Policy -{ - [[Policy identifiers.]] - quit, [[under which circumstances the application should quit automatically. - See also @Elm.Policy.quit.]] - exit, [[defines elm_exit() behaviour. See also @Elm.Policy.exit. - - @since 1.8 - ]] - throttle, [[defines how throttling should work. See also @Elm.Policy.throttle - - @since 1.8 - ]] - last [[Sentinel value to indicate last enum field during iteration]] -} - -/* FIXME: elm_policy API is not bound to EO */ -enum Elm.Policy_Quit -{ - [[Possible values for the @Elm.Policy.quit policy]] - none = 0, [[never quit the application automatically]] - last_window_closed, [[quit when the application's last window is closed]] - last_window_hidden [[quit when the application's last window is hidden - - @since 1.14]] -} - -/* FIXME: elm_policy API is not bound to EO */ -enum Elm.Policy_Exit -{ - [[Possible values for the @Elm.Policy.exit policy. - - @since 1.8 - ]] - none = 0, [[just quit the main loop on elm_exit()]] - windows_del [[delete all the windows after quitting the main loop]] -} - -/* FIXME: elm_policy API is not bound to EO */ -enum Elm.Policy_Throttle -{ - [[Possible values for the @Elm.Policy.throttle policy. - - @since 1.8 - ]] - config = 0, [[do whatever elementary config is configured to do]] - hidden_always, [[always throttle when all windows are no longer visible]] - never [[never throttle when windows are all hidden, regardless of config - settings]] -} /* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */ enum Elm.Object.Select_Mode @@ -92,38 +29,6 @@ enum Elm.Object.Select_Mode is forbidden.]] } -/* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */ -enum Elm.Object.Multi_Select_Mode -{ - [[Possible values for the #ELM_OBJECT_MULTI_SELECT_MODE policy. - - @since 1.8 - ]] - default = 0, [[default multiple select mode]] - with_control, [[disallow mutiple selection when clicked without control key - pressed]] - max [[canary value: any value greater or equal to - ELM_OBJECT_MULTI_SELECT_MODE_MAX is forbidden.]] -} - -/* Legacy only: elm_entry, elm_label, elm_popup */ -enum Elm.Wrap.Type -{ - [[Line wrapping types. - Type of word or character wrapping to use. - - See also \@ref elm_entry_line_wrap_set, \@ref - elm_popup_content_text_wrap_type_set, \@ref elm_label_line_wrap_set. - ]] - - legacy: elm_wrap; - none = 0, [[No wrap - value is zero.]] - char, [[Char wrap - wrap between characters.]] - word, [[Word wrap - wrap in allowed wrapping points (as defined in the unicode standard).]] - mixed, [[Mixed wrap - Word wrap, and if that fails, char wrap.]] - last [[Sentinel value to indicate last enum field during iteration]] -} - enum Elm.Icon.Type { [[Elementary icon types]] @@ -134,24 +39,11 @@ enum Elm.Icon.Type } /* FIXME: shouldn't exist, they are unusable by the bindings */ -struct @extern Elm_Gen_Item; [[Elementary gen item]] -struct @extern Efl_Access_Action_Data; [[Efl access action data]] struct @extern Elm.Validate_Content; [[Data for the elm_validator_regexp_helper()]] struct @extern Elm.Entry_Anchor_Info; [[The info sent in the callback for the "anchor,clicked" signals emitted by entries.]] struct @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the callback for "anchor,hover" signals emitted by the Anchor_Hover widget]] -struct @extern Elm.Entry_Change_Info; [[This corresponds to Edje_Entry_Change_Info. Includes information about - a change in the entry]] - -/* Enums from elm_entry.eo, also used by efl_ui_text */ -enum Elm.Text_Format -{ - [[Text Format types. - ]] - plain_utf8, [[ Plain UTF8 type ]] - markup_utf8 [[ Markup UTF8 type ]] -} enum Elm.Input.Panel.Layout { @@ -267,113 +159,3 @@ enum Elm.Input.Hints @since 1.21]] } - -enum Elm.Cnp_Mode -{ - [[ - Enum of entry's copy & paste policy. - ]] - markup, [[ copy & paste text with markup tag ]] - no_image, [[ copy & paste text without item(image) tag ]] - plaintext, [[ copy & paste text without markup tag ]] -} - -/* Elm_Genlist-related types */ -type @extern Elm.Genlist.Item.Class: __undefined_type; [[External elm genlist item class]] - -enum Elm.Genlist.Item.Type -{ - [[Defines if the item is of any special type (has subitems or it's the - index of a group), or is just a simple item. - ]] - legacy: elm_genlist_item; - none = 0, [[Simple item.]] - tree = (1 << 0), [[This may be expanded and have child items.]] - group = (1 << 1), [[An index item of a group of items. this item can have child items.]] - max = (1 << 2) [[Sentinel value to indicate last enum field during iteration]] -} - -enum Elm.Genlist.Item.Field_Type -{ - [[Defines the type of the item part - Used while updating item's parts - It can be used at updating multi fields. - ]] - legacy: elm_genlist_item_field; - all = 0, [[Type all]] - text = (1 << 0), [[Type text]] - content = (1 << 1), [[Type content]] - state = (1 << 2) [[Type state]] -} - -enum Elm.Genlist.Item.Scrollto_Type -{ - [[Defines where to position the item in the genlist.]] - legacy: elm_genlist_item_scrollto; - none = 0, [[Nothing will happen, Don't use this value.]] - in = (1 << 0), [[To the nearest viewport.]] - top = (1 << 1), [[To the top of viewport.]] - middle = (1 << 2), [[To the middle of viewport.]] - bottom = (1 << 3) [[To the bottom of viewport.]] -} - -/* Elm_Gengrid-related types */ - -type @extern Elm.Gengrid.Item.Class: __undefined_type; [[External elm gengrid item class]] - -enum Elm.Gengrid.Item.Scrollto_Type -{ - [[Defines where to position the item in the genlist.]] - legacy: elm_gengrid_item_scrollto; - none = 0, [[No scrollto.]] - in = (1 << 0), [[To the nearest viewport.]] - top = (1 << 1), [[To the top of viewport.]] - middle = (1 << 2), [[To the middle of viewport.]] - bottom = (1 << 3) [[To the bottom of viewport.]] -} - -enum Elm.Gengrid.Item.Field_Type -{ - [[Defines the type of the item part Used while updating item's parts. - It can be used at updating multi fields.]] - legacy: elm_gengrid_item_field; - all = 0, [[Type all]] - text = (1 << 0), [[Type text]] - content = (1 << 1), [[Type content]] - state = (1 << 2) [[Type state]] -} - -/* Elm_List types */ -enum Elm.List.Mode -{ - [[Set list's resizing behavior, transverse axis scrolling and items - cropping. See each mode's description for more details. - - Note: Default value is @Elm.List.Mode.scroll. - - Values here don't work as bitmasks -- only one can be chosen at - a time. - ]] - legacy: elm_list; - compress = 0, [[The list won't set any of its size hints to inform how a - possible container should resize it. Then, if it's not - created as a "resize object", it might end with zeroed - dimensions. The list will respect the container's geometry - and, if any of its items won't fit into its transverse axis, - one won't be able to scroll it in that direction.]] - scroll, [[Default value. This is the same as #ELM_LIST_COMPRESS, with the - exception that if any of its items won't fit into its transverse - axis, one will be able to scroll it in that direction.]] - limit, [[Sets a minimum size hint on the list object, so that containers may - respect it (and resize itself to fit the child properly). More - specifically, a minimum size hint will be set for its transverse - axis, so that the largest item in that direction fits well. This - is naturally bound by the list object's maximum size hints, set - externally.]] - expand, [[Besides setting a minimum size on the transverse axis, just like - on @Elm.List.Mode.limit, the list will set a minimum size on the - longitudinal axis, trying to reserve space to all its children to - be visible at a time. . This is naturally bound by the list - object's maximum size hints, set externally.]] - last [[Indicates error if returned by elm_list_mode_get().]] -} diff --git a/src/lib/elementary/elm_general.h b/src/lib/elementary/elm_general.h index 94f0007d66..4ee178b4df 100644 --- a/src/lib/elementary/elm_general.h +++ b/src/lib/elementary/elm_general.h @@ -21,6 +21,254 @@ // Legacy types #include "elm_general.eot.h" +/** Data on the event when an Elementary policy has changed + * + * @ingroup Elm_Event + */ +typedef struct _Elm_Event_Policy_Changed +{ + unsigned int policy; /**< the policy identifier */ + int new_value; /**< value the policy had before the change */ + int old_value; /**< new value the policy got */ +} Elm_Event_Policy_Changed; + +/** Policy identifiers. + * + * @ingroup Elm + */ +typedef enum +{ + ELM_POLICY_QUIT = 0, /**< under which circumstances the application should + * quit automatically. See also @ref ELM_POLICY_QUIT. */ + ELM_POLICY_EXIT, /**< defines elm_exit() behaviour. See also + * @ref ELM_POLICY_EXIT. + * + * @since 1.8 */ + ELM_POLICY_THROTTLE, /**< defines how throttling should work. See also + * @ref ELM_POLICY_THROTTLE + * + * @since 1.8 */ + ELM_POLICY_LAST /**< Sentinel value to indicate last enum field during + * iteration */ +} Elm_Policy; + +/** Possible values for the @ref ELM_POLICY_QUIT policy + * + * @ingroup Elm + */ +typedef enum +{ + ELM_POLICY_QUIT_NONE = 0, /**< never quit the application automatically */ + ELM_POLICY_QUIT_LAST_WINDOW_CLOSED, /**< quit when the application's last + * window is closed */ + ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN /**< quit when the application's last + * window is hidden + * + * @since 1.14 */ +} Elm_Policy_Quit; + +/** Possible values for the @ref ELM_POLICY_EXIT policy. + * + * @since 1.8 + * + * @ingroup Elm + */ +typedef enum +{ + ELM_POLICY_EXIT_NONE = 0, /**< just quit the main loop on elm_exit() */ + ELM_POLICY_EXIT_WINDOWS_DEL /**< delete all the windows after quitting the + * main loop */ +} Elm_Policy_Exit; + +/** Possible values for the @ref ELM_POLICY_THROTTLE policy. + * + * @since 1.8 + * + * @ingroup Elm + */ +typedef enum +{ + ELM_POLICY_THROTTLE_CONFIG = 0, /**< do whatever elementary config is + * configured to do */ + ELM_POLICY_THROTTLE_HIDDEN_ALWAYS, /**< always throttle when all windows are + * no longer visible */ + ELM_POLICY_THROTTLE_NEVER /**< never throttle when windows are all hidden, + * regardless of config settings */ +} Elm_Policy_Throttle; + +/** Possible values for the #ELM_OBJECT_MULTI_SELECT_MODE policy. + * + * @since 1.8 + * + * @ingroup Elm_Object + */ +typedef enum +{ + ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT = 0, /**< default multiple select mode */ + ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL, /**< disallow mutiple selection + * when clicked without control + * key pressed */ + ELM_OBJECT_MULTI_SELECT_MODE_MAX /**< canary value: any value greater or equal + * to ELM_OBJECT_MULTI_SELECT_MODE_MAX is + * forbidden. */ +} Elm_Object_Multi_Select_Mode; + +/** + * @brief Line wrapping types. Type of word or character wrapping to use. + * + * See also @ref elm_entry_line_wrap_set, @ref + * elm_popup_content_text_wrap_type_set, @ref elm_label_line_wrap_set. + * + * @ingroup Elm_Wrap + */ +typedef enum +{ + ELM_WRAP_NONE = 0, /**< No wrap - value is zero. */ + ELM_WRAP_CHAR, /**< Char wrap - wrap between characters. */ + ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in + * the unicode standard). */ + ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */ + ELM_WRAP_LAST /**< Sentinel value to indicate last enum field during iteration + */ +} Elm_Wrap_Type; + +/** Text Format types. + * + * @ingroup Elm + */ +typedef enum +{ + ELM_TEXT_FORMAT_PLAIN_UTF8 = 0, /**< Plain UTF8 type */ + ELM_TEXT_FORMAT_MARKUP_UTF8 /**< Markup UTF8 type */ +} Elm_Text_Format; + +/** Enum of entry's copy & paste policy. + * + * @ingroup Elm + */ +typedef enum +{ + ELM_CNP_MODE_MARKUP = 0, /**< copy & paste text with markup tag */ + ELM_CNP_MODE_NO_IMAGE, /**< copy & paste text without item(image) tag */ + ELM_CNP_MODE_PLAINTEXT /**< copy & paste text without markup tag */ +} Elm_Cnp_Mode; + +/** Defines if the item is of any special type (has subitems or it's the index + * of a group), or is just a simple item. + * + * @ingroup Elm_Genlist_Item + */ +typedef enum +{ + ELM_GENLIST_ITEM_NONE = 0, /**< Simple item. */ + ELM_GENLIST_ITEM_TREE = 1 /* 1 >> 0 */, /**< This may be expanded and have + * child items. */ + ELM_GENLIST_ITEM_GROUP = 2 /* 1 >> 1 */, /**< An index item of a group of + * items. this item can have child + * items. */ + ELM_GENLIST_ITEM_MAX = 4 /* 1 >> 2 */ /**< Sentinel value to indicate last + * enum field during iteration */ +} Elm_Genlist_Item_Type; + +/** Defines the type of the item part Used while updating item's parts It can + * be used at updating multi fields. + * + * @ingroup Elm_Genlist_Item + */ +typedef enum +{ + ELM_GENLIST_ITEM_FIELD_ALL = 0, /**< Type all */ + ELM_GENLIST_ITEM_FIELD_TEXT = 1 /* 1 >> 0 */, /**< Type text */ + ELM_GENLIST_ITEM_FIELD_CONTENT = 2 /* 1 >> 1 */, /**< Type content */ + ELM_GENLIST_ITEM_FIELD_STATE = 4 /* 1 >> 2 */ /**< Type state */ +} Elm_Genlist_Item_Field_Type; + +/** Defines where to position the item in the genlist. + * + * @ingroup Elm_Genlist_Item + */ +typedef enum +{ + ELM_GENLIST_ITEM_SCROLLTO_NONE = 0, /**< Nothing will happen, Don't use this + * value. */ + ELM_GENLIST_ITEM_SCROLLTO_IN = 1 /* 1 >> 0 */, /**< To the nearest viewport. + */ + ELM_GENLIST_ITEM_SCROLLTO_TOP = 2 /* 1 >> 1 */, /**< To the top of viewport. + */ + ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = 4 /* 1 >> 2 */, /**< To the middle of + * viewport. */ + ELM_GENLIST_ITEM_SCROLLTO_BOTTOM = 8 /* 1 >> 3 */ /**< To the bottom of + * viewport. */ +} Elm_Genlist_Item_Scrollto_Type; + +/** Defines where to position the item in the genlist. + * + * @ingroup Elm_Gengrid_Item + */ +typedef enum +{ + ELM_GENGRID_ITEM_SCROLLTO_NONE = 0, /**< No scrollto. */ + ELM_GENGRID_ITEM_SCROLLTO_IN = 1 /* 1 >> 0 */, /**< To the nearest viewport. + */ + ELM_GENGRID_ITEM_SCROLLTO_TOP = 2 /* 1 >> 1 */, /**< To the top of viewport. + */ + ELM_GENGRID_ITEM_SCROLLTO_MIDDLE = 4 /* 1 >> 2 */, /**< To the middle of + * viewport. */ + ELM_GENGRID_ITEM_SCROLLTO_BOTTOM = 8 /* 1 >> 3 */ /**< To the bottom of + * viewport. */ +} Elm_Gengrid_Item_Scrollto_Type; + +/** Defines the type of the item part Used while updating item's parts. It can + * be used at updating multi fields. + * + * @ingroup Elm_Gengrid_Item + */ +typedef enum +{ + ELM_GENGRID_ITEM_FIELD_ALL = 0, /**< Type all */ + ELM_GENGRID_ITEM_FIELD_TEXT = 1 /* 1 >> 0 */, /**< Type text */ + ELM_GENGRID_ITEM_FIELD_CONTENT = 2 /* 1 >> 1 */, /**< Type content */ + ELM_GENGRID_ITEM_FIELD_STATE = 4 /* 1 >> 2 */ /**< Type state */ +} Elm_Gengrid_Item_Field_Type; + +/** + * @brief Set list's resizing behavior, transverse axis scrolling and items + * cropping. See each mode's description for more details. + * + * @note Default value is @ref ELM_LIST_SCROLL. + * + * Values here don't work as bitmasks -- only one can be chosen at a time. + * + * @ingroup Elm_List + */ +typedef enum +{ + ELM_LIST_COMPRESS = 0, /**< The list won't set any of its size hints to inform + * how a possible container should resize it. Then, if + * it's not created as a "resize object", it might end + * with zeroed dimensions. The list will respect the + * container's geometry and, if any of its items won't + * fit into its transverse axis, one won't be able to + * scroll it in that direction. */ + ELM_LIST_SCROLL, /**< Default value. This is the same as #ELM_LIST_COMPRESS, + * with the exception that if any of its items won't fit + * into its transverse axis, one will be able to scroll it + * in that direction. */ + ELM_LIST_LIMIT, /**< Sets a minimum size hint on the list object, so that + * containers may respect it (and resize itself to fit the + * child properly). More specifically, a minimum size hint + * will be set for its transverse axis, so that the largest + * item in that direction fits well. This is naturally bound + * by the list object's maximum size hints, set externally. + */ + ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, + * just like on @ref ELM_LIST_LIMIT, the list will set a + * minimum size on the longitudinal axis, trying to reserve + * space to all its children to be visible at a time. . This + * is naturally bound by the list object's maximum size + * hints, set externally. */ + ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get(). */ +} Elm_List_Mode; typedef enum { From 49209553f6e0f5b82cda3cbf846d4d79c6b58249 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 9 May 2019 15:19:13 +0200 Subject: [PATCH 03/25] edje_types: (re)move legacy types to header These are not used anywhere in eo files, so no point in keeping them around in their legacy form. --- src/lib/edje/Edje_Common.h | 141 ++++++++++++++++++++++++++++++++++++ src/lib/edje/edje_types.eot | 120 ------------------------------ 2 files changed, 141 insertions(+), 120 deletions(-) diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index aa6b66267f..27bc080984 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -1,5 +1,146 @@ #include "edje_types.eot.h" +/** All available cursor states + * + * @ingroup Edje + */ +typedef enum +{ + EDJE_CURSOR_MAIN = 0, /**< Main cursor state */ + EDJE_CURSOR_SELECTION_BEGIN, /**< Selection begin cursor state */ + EDJE_CURSOR_SELECTION_END, /**< Selection end cursor state */ + EDJE_CURSOR_PREEDIT_START, /**< Pre-edit start cursor state */ + EDJE_CURSOR_PREEDIT_END, /**< Pre-edit end cursor state */ + EDJE_CURSOR_USER, /**< User cursor state */ + EDJE_CURSOR_USER_EXTRA /**< User extra cursor state */ +} Edje_Cursor; + +/** All Text auto capital mode type values + * + * @ingroup Edje_Text + */ +typedef enum +{ + EDJE_TEXT_AUTOCAPITAL_TYPE_NONE = 0, /**< None mode value */ + EDJE_TEXT_AUTOCAPITAL_TYPE_WORD, /**< Word mode value */ + EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE, /**< Sentence mode value */ + EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER /**< All characters mode value */ +} Edje_Text_Autocapital_Type; + +/** Input hints + * + * @ingroup Edje + */ +typedef enum +{ + EDJE_INPUT_HINT_NONE = 0, /**< No active hints + * + * @since 1.12 */ + EDJE_INPUT_HINT_AUTO_COMPLETE = 1 /* 1 >> 0 */, /**< Suggest word auto + * completion + * + * @since 1.12 */ + EDJE_INPUT_HINT_SENSITIVE_DATA = 2 /* 1 >> 1 */ /**< Typed text should not be + * stored. + * + * @since 1.12 */ +} Edje_Input_Hints; + +/** Input panel language + * + * @ingroup Edje_Input_Panel + */ +typedef enum +{ + EDJE_INPUT_PANEL_LANG_AUTOMATIC = 0, /**< Automatic + * + * @since 1.2 */ + EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet + * + * @since 1.2 */ +} Edje_Input_Panel_Lang; + +/** Input panel return key types + * + * @ingroup Edje_Input_Panel + */ +typedef enum +{ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT = 0, /**< Default + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send + * + * @since 1.2 */ + EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in + * + * @since 1.8 */ +} Edje_Input_Panel_Return_Key_Type; + +/** Input panel layout + * + * @ingroup Edje_Input_Panel + */ +typedef enum +{ + EDJE_INPUT_PANEL_LAYOUT_NORMAL = 0, /**< Default layout */ + EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ + EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */ + EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */ + EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */ + EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ + EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ + EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ + EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ + EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout + * + * @since 1.2 */ + EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout including + * esc, alt, ctrl key, so on (no + * auto-correct, no auto-capitalization) + * + * @since 1.2 */ + EDJE_INPUT_PANEL_LAYOUT_PASSWORD, /**< Like normal, but no auto-correct, no + * auto-capitalization etc. + * + * @since 1.2 */ + EDJE_INPUT_PANEL_LAYOUT_DATETIME, /**< Date and time layout + * + * @since 1.8 */ + EDJE_INPUT_PANEL_LAYOUT_EMOTICON, /**< Emoticon layout + * + * @since 1.10 */ + EDJE_INPUT_PANEL_LAYOUT_VOICE /**< Voice layout, but if the IME does not + * support voice layout, then normal layout + * will be shown. + * + * @since 1.19 */ +} Edje_Input_Panel_Layout; + +/** Perspective info for maps inside edje objects + * + * @ingroup Edje + */ +typedef struct _Edje_Perspective Edje_Perspective; + /** * @internal * @ingroup Edje_General_Group diff --git a/src/lib/edje/edje_types.eot b/src/lib/edje/edje_types.eot index 87a5cc3b1d..b3eee20d18 100644 --- a/src/lib/edje/edje_types.eot +++ b/src/lib/edje/edje_types.eot @@ -21,123 +21,3 @@ enum @beta Efl.Canvas.Layout_Part_Type vector = 17, [[Vector @since 1.18.]] last = 18 [[Last type value.]] } - - -/* TODO: Rename to Efl.Canvas.Layout.Blah */ - -enum Edje.Cursor { - [[All available cursor states]] - main, [[Main cursor state]] - selection_begin, [[Selection begin cursor state]] - selection_end, [[Selection end cursor state]] - preedit_start, [[Pre-edit start cursor state]] - preedit_end, [[Pre-edit end cursor state]] - user, [[User cursor state]] - user_extra [[User extra cursor state]] -} - -enum Edje.Text.Autocapital_Type { - [[All Text auto capital mode type values]] - none, [[None mode value]] - word, [[Word mode value]] - sentence, [[Sentence mode value]] - allcharacter [[All characters mode value]] -} - -enum Edje.Input_Hints { - [[Input hints]] - legacy: Edje_Input_Hint; - - none = 0, [[No active hints - - @since 1.12]] - auto_complete = 1 << 0, [[Suggest word auto completion - - @since 1.12]] - sensitive_data = 1 << 1 [[Typed text should not be stored. - - @since 1.12]] -} - -enum Edje.Input_Panel.Lang { - [[Input panel language]] - automatic, [[Automatic - - @since 1.2]] - alphabet [[Alphabet - - @since 1.2]] -} - -enum Edje.Input_Panel.Return_Key_Type { - [[Input panel return key types]] - default, [[Default - - @since 1.2]] - done, [[Done - - @since 1.2]] - go, [[Go - - @since 1.2]] - join, [[Join - - @since 1.2]] - login, [[Login - - @since 1.2]] - next, [[Next - - @since 1.2]] - search, [[Search or magnifier icon - - @since 1.2]] - send, [[Send - - @since 1.2]] - signin [[Sign-in - - @since 1.8]] -} - -enum Edje.Input_Panel.Layout { - [[Input panel layout]] - normal, [[Default layout]] - number, [[Number layout]] - email, [[Email layout]] - url, [[URL layout]] - phonenumber, [[Phone Number layout]] - ip, [[IP layout]] - month, [[Month layout]] - numberonly, [[Number Only layout]] - invalid, [[Never use this]] - hex, [[Hexadecimal layout - - @since 1.2]] - terminal, [[Command-line terminal layout including esc, alt, ctrl key, - so on (no auto-correct, no auto-capitalization) - - @since 1.2]] - password, [[Like normal, but no auto-correct, no auto-capitalization etc. - - @since 1.2]] - datetime, [[Date and time layout - - @since 1.8]] - emoticon, [[Emoticon layout - - @since 1.10]] - voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown. - - @since 1.19]] -} - -struct Edje.Perspective; [[Perspective info for maps inside edje objects]] - -/* FIXME-cb: Ignore cb types that should be fixed. */ -type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]] -type Edje.Markup_Filter_Cb: __undefined_type; [[Edje markup filter callback type]] -type Edje.Text.Filter_Cb: __undefined_type; [[Edje text filter callback type]] -type Edje.Text.Change_Cb: __undefined_type; [[Edje text change callback type]] -type Edje.Item_Provider_Cb: __undefined_type; [[Edje item provider callback type]] -type Edje.Message_Handler_Cb: __undefined_type; [[Edje message handler callback type]] From 6312cafe204d32ab7b374bbdecd407846e8a50fb Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 9 May 2019 16:16:42 +0200 Subject: [PATCH 04/25] eolian: move from eo_prefix to c_prefix --- src/lib/ecore/efl_core_proc_env.eo | 2 +- src/lib/ecore/efl_loop_consumer.eo | 2 +- src/lib/ecore_audio/ecore_audio.eo | 2 +- src/lib/ecore_audio/ecore_audio_in.eo | 2 +- src/lib/ecore_audio/ecore_audio_in_sndfile.eo | 2 +- src/lib/ecore_audio/ecore_audio_in_tone.eo | 2 +- src/lib/ecore_audio/ecore_audio_out.eo | 2 +- src/lib/ecore_audio/ecore_audio_out_pulse.eo | 2 +- src/lib/ecore_audio/ecore_audio_out_sndfile.eo | 2 +- src/lib/ecore_audio/ecore_audio_out_wasapi.eo | 2 +- src/lib/ector/cairo/ector_cairo_software_surface.eo | 2 +- src/lib/ector/cairo/ector_cairo_surface.eo | 2 +- .../ector/cairo/ector_renderer_cairo_gradient_linear.eo | 2 +- .../ector/cairo/ector_renderer_cairo_gradient_radial.eo | 2 +- src/lib/ector/cairo/ector_renderer_cairo_shape.eo | 2 +- src/lib/ector/ector_buffer.eo | 2 +- src/lib/ector/ector_renderer.eo | 2 +- src/lib/ector/ector_renderer_gradient.eo | 2 +- src/lib/ector/ector_renderer_gradient_linear.eo | 2 +- src/lib/ector/ector_renderer_gradient_radial.eo | 2 +- src/lib/ector/ector_renderer_shape.eo | 2 +- src/lib/ector/ector_surface.eo | 2 +- src/lib/ector/gl/ector_gl_surface.eo | 2 +- src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo | 2 +- src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo | 2 +- src/lib/ector/gl/ector_renderer_gl_shape.eo | 2 +- .../software/ector_renderer_software_gradient_linear.eo | 2 +- .../software/ector_renderer_software_gradient_radial.eo | 2 +- src/lib/ector/software/ector_renderer_software_shape.eo | 2 +- src/lib/ector/software/ector_software_buffer_base.eo | 2 +- src/lib/ector/software/ector_software_surface.eo | 2 +- src/lib/efl/interfaces/efl_container.eo | 2 +- src/lib/efl/interfaces/efl_gfx_entity.eo | 2 +- src/lib/efl/interfaces/efl_gfx_filter.eo | 2 +- src/lib/efl/interfaces/efl_gfx_gradient.eo | 2 +- src/lib/efl/interfaces/efl_gfx_view.eo | 2 +- src/lib/efl/interfaces/efl_model.eo | 2 +- src/lib/efl/interfaces/efl_pack_layout.eo | 2 +- src/lib/efl/interfaces/efl_pack_linear.eo | 2 +- src/lib/efl/interfaces/efl_pack_table.eo | 2 +- src/lib/efl/interfaces/efl_text_annotate.eo | 2 +- src/lib/efl/interfaces/efl_text_font.eo | 2 +- src/lib/efl/interfaces/efl_text_format.eo | 2 +- src/lib/efl/interfaces/efl_text_style.eo | 2 +- src/lib/efl/interfaces/efl_ui_i18n.eo | 2 +- src/lib/efl/interfaces/efl_ui_multi_selectable.eo | 2 +- src/lib/efl/interfaces/efl_ui_range_display.eo | 2 +- src/lib/efl/interfaces/efl_ui_range_interactive.eo | 2 +- src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo | 2 +- src/lib/efl/interfaces/efl_ui_zoom.eo | 2 +- src/lib/elementary/efl_access_object.eo | 2 +- src/lib/elementary/efl_config_global.eo | 2 +- src/lib/elementary/efl_ui_layout_base.eo | 2 +- src/lib/elementary/efl_ui_scroll_manager.eo | 2 +- src/lib/elementary/efl_ui_theme.eo | 2 +- src/lib/elementary/efl_ui_widget.eo | 2 +- src/lib/elementary/elm_code_widget.eo | 2 +- src/lib/elementary/elm_interface_scrollable.eo | 2 +- src/lib/eo/efl_object.eo | 2 +- src/lib/eolian/database_class.c | 2 +- src/lib/eolian/database_class_api.c | 2 +- src/lib/eolian/database_event_api.c | 2 +- src/lib/eolian/database_function_api.c | 8 ++++---- src/lib/eolian/eo_lexer.h | 6 +++--- src/lib/eolian/eo_parser.c | 8 ++++---- src/lib/eolian/eolian_database.h | 2 +- src/lib/evas/canvas/efl_canvas_animation.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_alpha.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_group.eo | 2 +- .../evas/canvas/efl_canvas_animation_group_parallel.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_player.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_rotate.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_scale.eo | 2 +- src/lib/evas/canvas/efl_canvas_animation_translate.eo | 2 +- src/lib/evas/canvas/efl_canvas_filter_internal.eo | 2 +- src/lib/evas/canvas/efl_input_event.eo | 2 +- src/lib/evas/canvas/efl_input_interface.eo | 2 +- src/lib/evas/canvas/efl_input_state.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_manager.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo | 2 +- .../gesture/efl_canvas_gesture_recognizer_long_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_tap.eo | 2 +- src/lib/evas/gesture/efl_canvas_gesture_touch.eo | 2 +- src/tests/eolian/data/class_simple.eo | 2 +- 87 files changed, 95 insertions(+), 95 deletions(-) diff --git a/src/lib/ecore/efl_core_proc_env.eo b/src/lib/ecore/efl_core_proc_env.eo index 07840548dd..2641105338 100644 --- a/src/lib/ecore/efl_core_proc_env.eo +++ b/src/lib/ecore/efl_core_proc_env.eo @@ -1,6 +1,6 @@ class @beta Efl.Core.Proc_Env extends Efl.Core.Env { - eo_prefix : efl_env; + c_prefix: efl_env; methods { self @class { [[Get a instance of this object diff --git a/src/lib/ecore/efl_loop_consumer.eo b/src/lib/ecore/efl_loop_consumer.eo index c5828648b6..c391d29f03 100644 --- a/src/lib/ecore/efl_loop_consumer.eo +++ b/src/lib/ecore/efl_loop_consumer.eo @@ -6,7 +6,7 @@ abstract Efl.Loop_Consumer extends Efl.Object @since 1.22 ]] - eo_prefix: efl_loop; + c_prefix: efl_loop; methods { @property loop { [[The loop to which this object belongs to.]] diff --git a/src/lib/ecore_audio/ecore_audio.eo b/src/lib/ecore_audio/ecore_audio.eo index 93409d21cb..df76e70bbd 100644 --- a/src/lib/ecore_audio/ecore_audio.eo +++ b/src/lib/ecore_audio/ecore_audio.eo @@ -16,7 +16,7 @@ abstract @beta Ecore.Audio extends Efl.Object { [[Convenience audio class.]] - eo_prefix: ecore_audio_obj; + c_prefix: ecore_audio_obj; data: Ecore_Audio_Object; methods { @property paused { diff --git a/src/lib/ecore_audio/ecore_audio_in.eo b/src/lib/ecore_audio/ecore_audio_in.eo index bbee8e1910..4411cc8c45 100644 --- a/src/lib/ecore_audio/ecore_audio_in.eo +++ b/src/lib/ecore_audio/ecore_audio_in.eo @@ -1,7 +1,7 @@ class @beta Ecore.Audio.In extends Ecore.Audio { [[Ecore Audio input object.]] - eo_prefix: ecore_audio_obj_in; + c_prefix: ecore_audio_obj_in; event_prefix: ecore_audio_in; data: Ecore_Audio_Input; methods { diff --git a/src/lib/ecore_audio/ecore_audio_in_sndfile.eo b/src/lib/ecore_audio/ecore_audio_in_sndfile.eo index cb1476029c..10113a4235 100644 --- a/src/lib/ecore_audio/ecore_audio_in_sndfile.eo +++ b/src/lib/ecore_audio/ecore_audio_in_sndfile.eo @@ -1,7 +1,7 @@ class @beta Ecore.Audio.In.Sndfile extends Ecore.Audio.In { [[Ecore Audio sndfile input.]] - eo_prefix: ecore_audio_obj_in_sndfile; + c_prefix: ecore_audio_obj_in_sndfile; implements { Efl.Object.destructor; Ecore.Audio.source { get; set; } diff --git a/src/lib/ecore_audio/ecore_audio_in_tone.eo b/src/lib/ecore_audio/ecore_audio_in_tone.eo index 0fc51c13c5..7844065e6a 100644 --- a/src/lib/ecore_audio/ecore_audio_in_tone.eo +++ b/src/lib/ecore_audio/ecore_audio_in_tone.eo @@ -1,7 +1,7 @@ class @beta Ecore.Audio.In.Tone extends Ecore.Audio.In { [[Ecore Audio tone input.]] - eo_prefix: ecore_audio_obj_in_tone; + c_prefix: ecore_audio_obj_in_tone; implements { Efl.Object.constructor; Ecore.Audio.In.length { set; } diff --git a/src/lib/ecore_audio/ecore_audio_out.eo b/src/lib/ecore_audio/ecore_audio_out.eo index f18dd8dc0e..07fb7b181f 100644 --- a/src/lib/ecore_audio/ecore_audio_out.eo +++ b/src/lib/ecore_audio/ecore_audio_out.eo @@ -2,7 +2,7 @@ abstract @beta Ecore.Audio.Out extends Ecore.Audio { [[Ecore Audio output object.]] - eo_prefix: ecore_audio_obj_out; + c_prefix: ecore_audio_obj_out; data: Ecore_Audio_Output; methods { input_attach { diff --git a/src/lib/ecore_audio/ecore_audio_out_pulse.eo b/src/lib/ecore_audio/ecore_audio_out_pulse.eo index 0729a752e8..d065d2d776 100644 --- a/src/lib/ecore_audio/ecore_audio_out_pulse.eo +++ b/src/lib/ecore_audio/ecore_audio_out_pulse.eo @@ -1,7 +1,7 @@ class @beta Ecore.Audio.Out.Pulse extends Ecore.Audio.Out { [[Ecore audio ouput for PulseAudio.]] - eo_prefix: ecore_audio_obj_out_pulse; + c_prefix: ecore_audio_obj_out_pulse; event_prefix: ecore_audio_out_pulse; implements { Efl.Object.constructor; diff --git a/src/lib/ecore_audio/ecore_audio_out_sndfile.eo b/src/lib/ecore_audio/ecore_audio_out_sndfile.eo index 9b57d83fa4..46e67dc493 100644 --- a/src/lib/ecore_audio/ecore_audio_out_sndfile.eo +++ b/src/lib/ecore_audio/ecore_audio_out_sndfile.eo @@ -1,7 +1,7 @@ class @beta Ecore.Audio.Out.Sndfile extends Ecore.Audio.Out { [[Ecore audio output to the sndfile library.]] - eo_prefix: ecore_audio_obj_out_sndfile; + c_prefix: ecore_audio_obj_out_sndfile; implements { Efl.Object.constructor; Efl.Object.destructor; diff --git a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo index ab50a980b8..2f19880b20 100644 --- a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo +++ b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo @@ -1,7 +1,7 @@ class @beta Ecore.Audio.Out.Wasapi extends Ecore.Audio.Out { [[Ecore audio ouput for WasapiAudio.]] - eo_prefix: ecore_audio_obj_out_wasapi; + c_prefix: ecore_audio_obj_out_wasapi; event_prefix: ecore_audio_out_wasapi; implements { Efl.Object.constructor; diff --git a/src/lib/ector/cairo/ector_cairo_software_surface.eo b/src/lib/ector/cairo/ector_cairo_software_surface.eo index 05ad18e37d..9cd23e5cf5 100644 --- a/src/lib/ector/cairo/ector_cairo_software_surface.eo +++ b/src/lib/ector/cairo/ector_cairo_software_surface.eo @@ -4,7 +4,7 @@ class @beta Ector.Cairo.Software.Surface extends Ector.Cairo.Surface implements Used to render ector content into a cairo software backend. ]] - eo_prefix: ector_cairo_software_surface; + c_prefix: ector_cairo_software_surface; methods {} implements { Ector.Buffer.pixels_set; diff --git a/src/lib/ector/cairo/ector_cairo_surface.eo b/src/lib/ector/cairo/ector_cairo_surface.eo index 981d2404d2..96abd0f082 100644 --- a/src/lib/ector/cairo/ector_cairo_surface.eo +++ b/src/lib/ector/cairo/ector_cairo_surface.eo @@ -6,7 +6,7 @@ class @beta Ector.Cairo.Surface extends Efl.Object implements Ector.Surface Used to render ector content into a cairo backend. ]] - eo_prefix: ector_cairo_surface; + c_prefix: ector_cairo_surface; methods { @property context { [[Cairo context]] diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo index 9c5c4ff563..c6f2c4fe8d 100644 --- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo +++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.Cairo.Gradient.Linear extends Ector.Renderer.Cairo implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Linear, Efl.Gfx.Path { [[Ector cairo renderer gradient linear]] - eo_prefix: ector_renderer_cairo_gradient_linear; + c_prefix: ector_renderer_cairo_gradient_linear; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo index 7c3a60caf8..bdf0059b3c 100644 --- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo +++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.Cairo.Gradient.Radial extends Ector.Renderer.Cairo implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Radial, Efl.Gfx.Path { [[Ector cairo renderer gradient radial]] - eo_prefix: ector_renderer_cairo_gradient_radial; + c_prefix: ector_renderer_cairo_gradient_radial; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo index 6f08776591..b2d41c6842 100644 --- a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo +++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.Cairo.Shape extends Ector.Renderer.Cairo implements Ector.Renderer.Shape, Efl.Gfx.Path { [[Ector cairo renderer shape class]] - eo_prefix: ector_renderer_cairo_shape; + c_prefix: ector_renderer_cairo_shape; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/ector_buffer.eo b/src/lib/ector/ector_buffer.eo index c53ecc8962..baa107159b 100644 --- a/src/lib/ector/ector_buffer.eo +++ b/src/lib/ector/ector_buffer.eo @@ -25,7 +25,7 @@ mixin @beta Ector.Buffer { [[2D pixel buffer interface for Ector ]] - eo_prefix: ector_buffer; + c_prefix: ector_buffer; methods { @property size { [[The (rectangular) size of the pixel buffer.]] diff --git a/src/lib/ector/ector_renderer.eo b/src/lib/ector/ector_renderer.eo index 53560d17d5..57726f3df1 100644 --- a/src/lib/ector/ector_renderer.eo +++ b/src/lib/ector/ector_renderer.eo @@ -4,7 +4,7 @@ abstract @beta Ector.Renderer extends Efl.Object { [[Ector renderer abstract interface]] - eo_prefix: ector_renderer; + c_prefix: ector_renderer; methods { @property surface { [[Surface associated with this renderer]] diff --git a/src/lib/ector/ector_renderer_gradient.eo b/src/lib/ector/ector_renderer_gradient.eo index 70be8823a6..fda0e33261 100644 --- a/src/lib/ector/ector_renderer_gradient.eo +++ b/src/lib/ector/ector_renderer_gradient.eo @@ -1,7 +1,7 @@ mixin @beta Ector.Renderer.Gradient requires Efl.Object extends Efl.Gfx.Gradient { [[Ector gradient renderer mixin]] - eo_prefix: ector_renderer_gradient; + c_prefix: ector_renderer_gradient; implements { Efl.Gfx.Gradient.stop { get; set; } Efl.Gfx.Gradient.spread { get; set; } diff --git a/src/lib/ector/ector_renderer_gradient_linear.eo b/src/lib/ector/ector_renderer_gradient_linear.eo index db2cde4cbb..2cd05a1101 100644 --- a/src/lib/ector/ector_renderer_gradient_linear.eo +++ b/src/lib/ector/ector_renderer_gradient_linear.eo @@ -1,7 +1,7 @@ mixin @beta Ector.Renderer.Gradient.Linear extends Efl.Gfx.Gradient_Linear { [[Ector gradient linear renderer mixin]] - eo_prefix: ector_renderer_gradient_linear; + c_prefix: ector_renderer_gradient_linear; implements { Efl.Gfx.Gradient_Linear.start { get; set; } Efl.Gfx.Gradient_Linear.end { get; set; } diff --git a/src/lib/ector/ector_renderer_gradient_radial.eo b/src/lib/ector/ector_renderer_gradient_radial.eo index 369db43480..3b05e4ed03 100644 --- a/src/lib/ector/ector_renderer_gradient_radial.eo +++ b/src/lib/ector/ector_renderer_gradient_radial.eo @@ -1,7 +1,7 @@ mixin @beta Ector.Renderer.Gradient.Radial extends Efl.Gfx.Gradient_Radial { [[Ector gradient radial renderer mixin]] - eo_prefix: ector_renderer_gradient_radial; + c_prefix: ector_renderer_gradient_radial; implements { Efl.Gfx.Gradient_Radial.center { get; set; } Efl.Gfx.Gradient_Radial.radius { get; set; } diff --git a/src/lib/ector/ector_renderer_shape.eo b/src/lib/ector/ector_renderer_shape.eo index 67876ca108..c6038ad859 100644 --- a/src/lib/ector/ector_renderer_shape.eo +++ b/src/lib/ector/ector_renderer_shape.eo @@ -3,7 +3,7 @@ import ector_renderer; mixin @beta Ector.Renderer.Shape requires Efl.Object extends Efl.Gfx.Shape { [[Ector shape renderer mixin]] - eo_prefix: ector_renderer_shape; + c_prefix: ector_renderer_shape; methods { @property fill { [[Fill property]] diff --git a/src/lib/ector/ector_surface.eo b/src/lib/ector/ector_surface.eo index 159033995d..f29cf070fa 100644 --- a/src/lib/ector/ector_surface.eo +++ b/src/lib/ector/ector_surface.eo @@ -2,7 +2,7 @@ mixin @beta Ector.Surface extends Ector.Buffer { [[Surface interface for Ector]] - eo_prefix: ector_surface; + c_prefix: ector_surface; data: null; methods { @property reference_point { diff --git a/src/lib/ector/gl/ector_gl_surface.eo b/src/lib/ector/gl/ector_gl_surface.eo index 19e919c0b8..62aefb4291 100644 --- a/src/lib/ector/gl/ector_gl_surface.eo +++ b/src/lib/ector/gl/ector_gl_surface.eo @@ -3,7 +3,7 @@ import ector_types; class @beta Ector.GL.Surface extends Ector.GL.Buffer implements Ector.Surface { [[Ector GL surface class]] - eo_prefix: ector_gl_surface; + c_prefix: ector_gl_surface; methods { shader_get { [[Get shader]] diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo index 2e7621d905..bbb3152b9b 100644 --- a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo +++ b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.GL.Gradient.Linear extends Ector.Renderer.GL implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Linear, Efl.Gfx.Path { [[Ector GL renderer gradient linear]] - eo_prefix: ector_renderer_gl_gradient_linear; + c_prefix: ector_renderer_gl_gradient_linear; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo index 3f3cbdd72c..a4c42b490a 100644 --- a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo +++ b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.GL.Gradient.Radial extends Ector.Renderer.GL implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Radial, Efl.Gfx.Path { [[Ector GL renderer gradient radial]] - eo_prefix: ector_renderer_gl_gradient_radial; + c_prefix: ector_renderer_gl_gradient_radial; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.eo b/src/lib/ector/gl/ector_renderer_gl_shape.eo index ba9043625e..0a938e9974 100644 --- a/src/lib/ector/gl/ector_renderer_gl_shape.eo +++ b/src/lib/ector/gl/ector_renderer_gl_shape.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.GL.Shape extends Ector.Renderer.GL implements Ector.Renderer.Shape, Efl.Gfx.Path { [[Ector GL renderer shape class]] - eo_prefix: ector_renderer_gl_shape; + c_prefix: ector_renderer_gl_shape; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.eo b/src/lib/ector/software/ector_renderer_software_gradient_linear.eo index 132a4dfdb1..5f4f53944e 100644 --- a/src/lib/ector/software/ector_renderer_software_gradient_linear.eo +++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.Software.Gradient.Linear extends Ector.Renderer.Software implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Linear { [[Ector software renderer gradient linear class]] - eo_prefix: ector_renderer_software_gradient_linear; + c_prefix: ector_renderer_software_gradient_linear; data: Ector_Renderer_Software_Gradient_Data; implements { Ector.Renderer.prepare; diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.eo b/src/lib/ector/software/ector_renderer_software_gradient_radial.eo index 31bf1d568c..b0a36d3c32 100644 --- a/src/lib/ector/software/ector_renderer_software_gradient_radial.eo +++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.Software.Gradient.Radial extends Ector.Renderer.Software implements Ector.Renderer.Gradient, Ector.Renderer.Gradient.Radial { [[Ector software renderer gradient radial]] - eo_prefix: ector_renderer_software_gradient_radial; + c_prefix: ector_renderer_software_gradient_radial; data: Ector_Renderer_Software_Gradient_Data; implements { Ector.Renderer.prepare; diff --git a/src/lib/ector/software/ector_renderer_software_shape.eo b/src/lib/ector/software/ector_renderer_software_shape.eo index 41f2b7e658..4ea56f9260 100644 --- a/src/lib/ector/software/ector_renderer_software_shape.eo +++ b/src/lib/ector/software/ector_renderer_software_shape.eo @@ -1,7 +1,7 @@ class @beta Ector.Renderer.Software.Shape extends Ector.Renderer.Software implements Ector.Renderer.Shape { [[Ector software renderer shape class]] - eo_prefix: ector_renderer_software_shape; + c_prefix: ector_renderer_software_shape; implements { Ector.Renderer.prepare; Ector.Renderer.draw; diff --git a/src/lib/ector/software/ector_software_buffer_base.eo b/src/lib/ector/software/ector_software_buffer_base.eo index be6539973f..8cb576ef0a 100644 --- a/src/lib/ector/software/ector_software_buffer_base.eo +++ b/src/lib/ector/software/ector_software_buffer_base.eo @@ -1,7 +1,7 @@ mixin @beta Ector.Software.Buffer.Base extends Ector.Buffer { [[A buffer in Ector Software is a readable & optionally writable image]] - eo_prefix: ector_software_buffer; + c_prefix: ector_software_buffer; methods { pixels_clear @protected { [[Clear internal pixel buffer]] diff --git a/src/lib/ector/software/ector_software_surface.eo b/src/lib/ector/software/ector_software_surface.eo index c0f851f0e2..77d6db28a3 100644 --- a/src/lib/ector/software/ector_software_surface.eo +++ b/src/lib/ector/software/ector_software_surface.eo @@ -1,7 +1,7 @@ class @beta Ector.Software.Surface extends Ector.Software.Buffer implements Ector.Surface { [[Ector surface software class]] - eo_prefix: ector_software_surface; + c_prefix: ector_software_surface; methods {} implements { Ector.Surface.renderer_factory_new; diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo index e308e2e51f..26883129cb 100644 --- a/src/lib/efl/interfaces/efl_container.eo +++ b/src/lib/efl/interfaces/efl_container.eo @@ -7,7 +7,7 @@ interface Efl.Container @since 1.22 ]] - eo_prefix: efl_content; + c_prefix: efl_content; event_prefix: efl_container; methods { content_iterate { diff --git a/src/lib/efl/interfaces/efl_gfx_entity.eo b/src/lib/efl/interfaces/efl_gfx_entity.eo index 358228c5ce..115fb2a782 100644 --- a/src/lib/efl/interfaces/efl_gfx_entity.eo +++ b/src/lib/efl/interfaces/efl_gfx_entity.eo @@ -5,7 +5,7 @@ interface Efl.Gfx.Entity { @since 1.22 ]] - eo_prefix: efl_gfx_entity; + c_prefix: efl_gfx_entity; methods { @property position { [[The 2D position of a canvas object. diff --git a/src/lib/efl/interfaces/efl_gfx_filter.eo b/src/lib/efl/interfaces/efl_gfx_filter.eo index 5e8e0e982b..0ebd1e5294 100644 --- a/src/lib/efl/interfaces/efl_gfx_filter.eo +++ b/src/lib/efl/interfaces/efl_gfx_filter.eo @@ -8,7 +8,7 @@ interface @beta Efl.Gfx.Filter This was a beta feature since 1.15. ]] - eo_prefix: efl_gfx; + c_prefix: efl_gfx; methods { @property filter_program { set { diff --git a/src/lib/efl/interfaces/efl_gfx_gradient.eo b/src/lib/efl/interfaces/efl_gfx_gradient.eo index 3622034a45..81f18a15e1 100644 --- a/src/lib/efl/interfaces/efl_gfx_gradient.eo +++ b/src/lib/efl/interfaces/efl_gfx_gradient.eo @@ -3,7 +3,7 @@ import efl_gfx_types; interface @beta Efl.Gfx.Gradient { [[Efl graphics gradient interface]] - eo_prefix: efl_gfx_gradient; + c_prefix: efl_gfx_gradient; methods { @property stop { set { diff --git a/src/lib/efl/interfaces/efl_gfx_view.eo b/src/lib/efl/interfaces/efl_gfx_view.eo index f18d0dc52a..bf29419c60 100644 --- a/src/lib/efl/interfaces/efl_gfx_view.eo +++ b/src/lib/efl/interfaces/efl_gfx_view.eo @@ -3,7 +3,7 @@ import eina_types; interface @beta Efl.Gfx.View { [[Efl graphics view interface]] - eo_prefix: efl_gfx; + c_prefix: efl_gfx; methods { @property view_size { [[The dimensions of this object's viewport. diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index d9d789d556..40790a5153 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -16,7 +16,7 @@ struct @beta Efl.Model_Children_Event { interface @beta Efl.Model { [[Efl model interface]] - eo_prefix: efl_model; + c_prefix: efl_model; methods { @property properties { get { diff --git a/src/lib/efl/interfaces/efl_pack_layout.eo b/src/lib/efl/interfaces/efl_pack_layout.eo index 19bda9a6b8..49b7982269 100644 --- a/src/lib/efl/interfaces/efl_pack_layout.eo +++ b/src/lib/efl/interfaces/efl_pack_layout.eo @@ -4,7 +4,7 @@ interface @beta Efl.Pack_Layout Used for containers (box, grid). ]] - eo_prefix: efl_pack; + c_prefix: efl_pack; methods { // Note: Do we need a layout_force or a sync flag in layout_request? layout_request { diff --git a/src/lib/efl/interfaces/efl_pack_linear.eo b/src/lib/efl/interfaces/efl_pack_linear.eo index b98d3ec08a..79ea27c5d9 100644 --- a/src/lib/efl/interfaces/efl_pack_linear.eo +++ b/src/lib/efl/interfaces/efl_pack_linear.eo @@ -5,7 +5,7 @@ interface @beta Efl.Pack_Linear extends Efl.Pack This means the sub-objects are internally organized in an ordered list. ]] - eo_prefix: efl_pack; + c_prefix: efl_pack; methods { pack_begin { [[Prepend an object at the beginning of this container. diff --git a/src/lib/efl/interfaces/efl_pack_table.eo b/src/lib/efl/interfaces/efl_pack_table.eo index 9472b52ed4..c94bd334d3 100644 --- a/src/lib/efl/interfaces/efl_pack_table.eo +++ b/src/lib/efl/interfaces/efl_pack_table.eo @@ -3,7 +3,7 @@ import efl_ui_direction; interface @beta Efl.Pack_Table extends Efl.Pack { [[2D containers aligned on a table with rows and columns]] - eo_prefix: efl_pack; + c_prefix: efl_pack; methods { pack_table { [[Pack object at a given location in the table. diff --git a/src/lib/efl/interfaces/efl_text_annotate.eo b/src/lib/efl/interfaces/efl_text_annotate.eo index f9f52a4bb0..724faeb0a3 100644 --- a/src/lib/efl/interfaces/efl_text_annotate.eo +++ b/src/lib/efl/interfaces/efl_text_annotate.eo @@ -3,7 +3,7 @@ import efl_text_types; interface @beta Efl.Text_Annotate { [[Cursor API ]] - eo_prefix: efl_text; + c_prefix: efl_text; methods { // Annotation @property annotation { diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo index 32f15c2a55..27d32d6433 100644 --- a/src/lib/efl/interfaces/efl_text_font.eo +++ b/src/lib/efl/interfaces/efl_text_font.eo @@ -50,7 +50,7 @@ enum @beta Efl.Text_Font_Bitmap_Scalable { interface @beta Efl.Text_Font { [[Font settings of the text ]] - eo_prefix: efl_text; + c_prefix: efl_text; methods { @property font { set { diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo index 6d0125c55d..25c17f19a3 100644 --- a/src/lib/efl/interfaces/efl_text_format.eo +++ b/src/lib/efl/interfaces/efl_text_format.eo @@ -21,7 +21,7 @@ interface @beta Efl.Text_Format { The text format can affect the geometry of the text object, as well as how characters are presented. ]] - eo_prefix: efl_text; + c_prefix: efl_text; methods { @property ellipsis { [[Ellipsis value (number from -1.0 to 1.0)]] diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index 362a56f223..c42433b317 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo @@ -60,7 +60,7 @@ interface @beta Efl.Text_Style { A style can be coloring, effects, underline, strikethrough etc. ]] - eo_prefix: efl_text; + c_prefix: efl_text; methods { @property normal_color { [[Color of text, excluding style]] diff --git a/src/lib/efl/interfaces/efl_ui_i18n.eo b/src/lib/efl/interfaces/efl_ui_i18n.eo index ece81f6314..af37b13f8f 100644 --- a/src/lib/efl/interfaces/efl_ui_i18n.eo +++ b/src/lib/efl/interfaces/efl_ui_i18n.eo @@ -1,7 +1,7 @@ interface @beta Efl.Ui.I18n { [[A common Internationalization interface for UI objects.]] - eo_prefix: efl_ui; + c_prefix: efl_ui; methods { @property mirrored { [[Whether this object should be mirrored. diff --git a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo index a99ff458f4..2f7eac4788 100644 --- a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo @@ -12,7 +12,7 @@ interface @beta Efl.Ui.Multi_Selectable { [[Efl UI Multi selectable interface. The container have to control select property of multiple chidren.]] - eo_prefix: efl_ui; + c_prefix: efl_ui; methods { @property select_mode { diff --git a/src/lib/efl/interfaces/efl_ui_range_display.eo b/src/lib/efl/interfaces/efl_ui_range_display.eo index ca9d2c1e1b..c71f6d01de 100644 --- a/src/lib/efl/interfaces/efl_ui_range_display.eo +++ b/src/lib/efl/interfaces/efl_ui_range_display.eo @@ -1,7 +1,7 @@ interface @beta Efl.Ui.Range_Display { [[Interface that contains properties regarding the displaying of a range.]] - eo_prefix: efl_ui_range; + c_prefix: efl_ui_range; methods { @property range_value { [[Control the range value (in percentage) on a given range widget diff --git a/src/lib/efl/interfaces/efl_ui_range_interactive.eo b/src/lib/efl/interfaces/efl_ui_range_interactive.eo index a7af8c8c8f..817178c7b2 100644 --- a/src/lib/efl/interfaces/efl_ui_range_interactive.eo +++ b/src/lib/efl/interfaces/efl_ui_range_interactive.eo @@ -4,7 +4,7 @@ interface @beta Efl.Ui.Range_Interactive extends Efl.Ui.Range_Display The properties defined here are used to manipulate the way a user interacts with a displayed range. ]] - eo_prefix: efl_ui_range; + c_prefix: efl_ui_range; methods { @property range_step { [[Control the step used to increment or decrement values for given widget. diff --git a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo index 906c43982e..98423c7349 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo @@ -2,7 +2,7 @@ import eina_types; interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable { - eo_prefix: efl_ui_scrollable; + c_prefix: efl_ui_scrollable; methods { @property content_pos { [[The content position]] diff --git a/src/lib/efl/interfaces/efl_ui_zoom.eo b/src/lib/efl/interfaces/efl_ui_zoom.eo index b3d949aa5f..9cf90d6ea5 100644 --- a/src/lib/efl/interfaces/efl_ui_zoom.eo +++ b/src/lib/efl/interfaces/efl_ui_zoom.eo @@ -12,7 +12,7 @@ interface @beta Efl.Ui.Zoom { [[Efl UI zoom interface]] event_prefix: efl_ui; - eo_prefix: efl_ui; + c_prefix: efl_ui; methods { @property zoom_animation { diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo index 37b021e0ca..9e7dc5da0f 100644 --- a/src/lib/elementary/efl_access_object.eo +++ b/src/lib/elementary/efl_access_object.eo @@ -240,7 +240,7 @@ struct @beta Efl.Access.Relation mixin @beta Efl.Access.Object requires Efl.Object { [[Accessibility accessible mixin]] - eo_prefix: efl_access_object; + c_prefix: efl_access_object; data: Efl_Access_Object_Data; methods { @property localized_role_name @protected @beta { diff --git a/src/lib/elementary/efl_config_global.eo b/src/lib/elementary/efl_config_global.eo index 77a04ae928..db437901e7 100644 --- a/src/lib/elementary/efl_config_global.eo +++ b/src/lib/elementary/efl_config_global.eo @@ -4,7 +4,7 @@ class @beta Efl.Config_Global extends Efl.Object implements Efl.Config running application. ]] data: null; - eo_prefix: efl_config; + c_prefix: efl_config; methods { save @protected { [[Saves Elementary configuration to disk. diff --git a/src/lib/elementary/efl_ui_layout_base.eo b/src/lib/elementary/efl_ui_layout_base.eo index a3401c865e..1923bddefa 100644 --- a/src/lib/elementary/efl_ui_layout_base.eo +++ b/src/lib/elementary/efl_ui_layout_base.eo @@ -10,7 +10,7 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container, @since 1.22 ]] - eo_prefix: efl_ui_layout; + c_prefix: efl_ui_layout; data: Efl_Ui_Layout_Data; methods { @property theme { diff --git a/src/lib/elementary/efl_ui_scroll_manager.eo b/src/lib/elementary/efl_ui_scroll_manager.eo index 93cd7e99bc..e948fe6bc9 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.eo +++ b/src/lib/elementary/efl_ui_scroll_manager.eo @@ -5,7 +5,7 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements { [[Efl ui scroll manager class]] event_prefix: efl_ui; - eo_prefix: efl_ui_scroll_manager; + c_prefix: efl_ui_scroll_manager; methods { @property pan @protected { [[This is the internal pan object managed by scroll manager. diff --git a/src/lib/elementary/efl_ui_theme.eo b/src/lib/elementary/efl_ui_theme.eo index 73805a90a5..f167a23b47 100644 --- a/src/lib/elementary/efl_ui_theme.eo +++ b/src/lib/elementary/efl_ui_theme.eo @@ -1,7 +1,7 @@ class @beta Efl.Ui.Theme extends Efl.Object { [[Efl Ui Theme class]] - eo_prefix: efl_ui_theme; + c_prefix: efl_ui_theme; data: Efl_Ui_Theme_Data; methods { @property default @class { diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index 40e51aed92..ece49ef4f6 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -25,7 +25,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, @since 1.22 ]] - //eo_prefix: efl_ui_widget; + //c_prefix: efl_ui_widget; event_prefix: efl_ui_widget; data: Efl_Ui_Widget_Data; methods { diff --git a/src/lib/elementary/elm_code_widget.eo b/src/lib/elementary/elm_code_widget.eo index 0764506604..a9d561423d 100644 --- a/src/lib/elementary/elm_code_widget.eo +++ b/src/lib/elementary/elm_code_widget.eo @@ -18,7 +18,7 @@ struct @extern Elm.Code_Line; [[Elementary code line data structure]] /* Parts o class @beta Elm.Code_Widget extends Efl.Ui.Layout_Base { [[Elementary code widget]] - eo_prefix: efl_ui_code_widget; + c_prefix: efl_ui_code_widget; methods { @property code { set { diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 6fc578882d..f8c2a2dbfd 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -30,7 +30,7 @@ enum Elm.Scroller.Single_Direction mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrollable, Efl.Ui.Focus.Manager_Sub, Efl.Ui.Widget_Focus_Manager { [[Elm scrollable mixin]] - eo_prefix: elm_interface_scrollable; + c_prefix: elm_interface_scrollable; data: Elm_Scrollable_Smart_Interface_Data; methods { @property gravity { diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index cb0a92e70c..a63343ac9a 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -63,7 +63,7 @@ abstract Efl.Object @since 1.22 ]] - eo_prefix: efl; + c_prefix: efl; methods { @property parent { diff --git a/src/lib/eolian/database_class.c b/src/lib/eolian/database_class.c index 34551d3c80..4c8c45d400 100644 --- a/src/lib/eolian/database_class.c +++ b/src/lib/eolian/database_class.c @@ -33,7 +33,7 @@ database_class_del(Eolian_Class *cl) eina_list_free(cl->callables); eina_list_free(cl->composite); - if (cl->eo_prefix) eina_stringshare_del(cl->eo_prefix); + if (cl->c_prefix) eina_stringshare_del(cl->c_prefix); if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix); if (cl->data_type) eina_stringshare_del(cl->data_type); diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c index fa7d36b541..3e3b0d78d5 100644 --- a/src/lib/eolian/database_class_api.c +++ b/src/lib/eolian/database_class_api.c @@ -24,7 +24,7 @@ EAPI Eina_Stringshare* eolian_class_eo_prefix_get(const Eolian_Class *cl) { EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL); - return cl->eo_prefix; + return cl->c_prefix; } EAPI Eina_Stringshare* diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c index 74f69cd411..4142c5048d 100644 --- a/src/lib/eolian/database_event_api.c +++ b/src/lib/eolian/database_event_api.c @@ -55,7 +55,7 @@ eolian_event_c_name_get(const Eolian_Event *event) char buf[512]; char *tmp = buf; const char *pfx = event->klass->ev_prefix; - if (!pfx) pfx = event->klass->eo_prefix; + if (!pfx) pfx = event->klass->c_prefix; if (!pfx) pfx = event->klass->base.name; snprintf(buf, sizeof(buf), "%s_EVENT_%s", pfx, event->base.name); eina_str_toupper(&tmp); diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c index 8a38443359..60c4f6b8f5 100644 --- a/src/lib/eolian/database_function_api.c +++ b/src/lib/eolian/database_function_api.c @@ -38,11 +38,11 @@ eolian_function_type_get(const Eolian_Function *fid) } static const char * -_get_eo_prefix(const Eolian_Function *foo_id, char *buf) +_get_c_prefix(const Eolian_Function *foo_id, char *buf) { char *tmp = buf; - if (foo_id->klass->eo_prefix) - return foo_id->klass->eo_prefix; + if (foo_id->klass->c_prefix) + return foo_id->klass->c_prefix; strcpy(buf, foo_id->klass->base.name); eina_str_tolower(&buf); while ((tmp = strchr(tmp, '.'))) *tmp = '_'; @@ -88,7 +88,7 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id, { char tbuf[512]; tbuf[0] = '\0'; - const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf): tbuf; + const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_c_prefix(foo_id, tbuf): tbuf; if (!prefix) return NULL; diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index 9a510e1894..4fec039de2 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -24,9 +24,9 @@ enum Tokens * they just fill in the "kw" field of the token */ #define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \ \ - KW(abstract), KW(composite), KW(constructor), KW(constructors), KW(data), \ - KW(destructor), KW(eo_prefix), KW(event_prefix), KW(events), \ - KW(extends), KW(free), KW(get), KW(implements), KW(import), KW(interface), \ + KW(abstract), KW(c_prefix), KW(composite), KW(constructor), KW(constructors), \ + KW(data), KW(destructor), KW(event_prefix), KW(events), KW(extends), \ + KW(free), KW(get), KW(implements), KW(import), KW(interface), \ KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \ KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \ \ diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index ebf3b1c038..65a28dfd58 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -1864,7 +1864,7 @@ error: static void parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) { - Eina_Bool has_eo_prefix = EINA_FALSE, + Eina_Bool has_c_prefix = EINA_FALSE, has_event_prefix = EINA_FALSE, has_data = EINA_FALSE, has_methods = EINA_FALSE, @@ -1880,12 +1880,12 @@ parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) } for (;;) switch (ls->t.kw) { - case KW_eo_prefix: - CASE_LOCK(ls, eo_prefix, "eo prefix definition") + case KW_c_prefix: + CASE_LOCK(ls, c_prefix, "c prefix definition") eo_lexer_get(ls); check_next(ls, ':'); _validate_pfx(ls); - ls->klass->eo_prefix = eina_stringshare_ref(ls->t.value.s); + ls->klass->c_prefix = eina_stringshare_ref(ls->t.value.s); eo_lexer_get(ls); check_next(ls, ';'); break; diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 8c1b02bd2a..baf2fde640 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -177,7 +177,7 @@ struct _Eolian_Class Eolian_Object base; Eolian_Class_Type type; Eolian_Documentation *doc; - Eina_Stringshare *eo_prefix; + Eina_Stringshare *c_prefix; Eina_Stringshare *ev_prefix; Eina_Stringshare *data_type; union { diff --git a/src/lib/evas/canvas/efl_canvas_animation.eo b/src/lib/evas/canvas/efl_canvas_animation.eo index 4198ccf592..a118d89661 100644 --- a/src/lib/evas/canvas/efl_canvas_animation.eo +++ b/src/lib/evas/canvas/efl_canvas_animation.eo @@ -3,7 +3,7 @@ import efl_canvas_animation_types; class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable { [[Efl animation class]] - eo_prefix: efl_animation; + c_prefix: efl_animation; methods { @property final_state_keep { [[Keep final state property]] diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha.eo b/src/lib/evas/canvas/efl_canvas_animation_alpha.eo index 667e3c3f55..1ff9720c3e 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_alpha.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_alpha.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation { [[Efl alpha animation class]] - eo_prefix: efl_animation_alpha; + c_prefix: efl_animation_alpha; data: Efl_Canvas_Animation_Alpha_Data; methods { @property alpha { diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.eo b/src/lib/evas/canvas/efl_canvas_animation_group.eo index 6f8f77613b..fdf42e2d88 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_group.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_group.eo @@ -1,7 +1,7 @@ abstract @beta Efl.Canvas.Animation_Group extends Efl.Canvas.Animation { [[Efl group animation abstract class]] - eo_prefix: efl_animation_group; + c_prefix: efl_animation_group; data: Efl_Canvas_Animation_Group_Data; methods { animation_add { diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo index c404323c18..63773ddac3 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group { [[Efl group parallel animation class]] - eo_prefix: efl_animation_group_parallel; + c_prefix: efl_animation_group_parallel; data: null; methods { } diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.eo b/src/lib/evas/canvas/efl_canvas_animation_player.eo index 7e1ce30fc2..53cdf59cb6 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_player.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player { [[Efl animation object class]] - eo_prefix: efl_animation_player; + c_prefix: efl_animation_player; methods { @property animation { set {} diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate.eo b/src/lib/evas/canvas/efl_canvas_animation_rotate.eo index 0dabb21b7b..818058aa4d 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_rotate.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation { [[Efl rotate animation class]] - eo_prefix: efl_animation_rotate; + c_prefix: efl_animation_rotate; data: Efl_Canvas_Animation_Rotate_Data; methods { @property rotate { diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.eo b/src/lib/evas/canvas/efl_canvas_animation_scale.eo index 5276371990..b4da878f9d 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_scale.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_scale.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation { [[Efl scale animation class]] - eo_prefix: efl_animation_scale; + c_prefix: efl_animation_scale; data: Efl_Canvas_Animation_Scale_Data; methods { @property scale { diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate.eo b/src/lib/evas/canvas/efl_canvas_animation_translate.eo index 09204a8c52..3d74cbd0cd 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_translate.eo +++ b/src/lib/evas/canvas/efl_canvas_animation_translate.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation { [[Efl translate animation class]] - eo_prefix: efl_animation_translate; + c_prefix: efl_animation_translate; data: Efl_Canvas_Animation_Translate_Data; methods { @property translate { diff --git a/src/lib/evas/canvas/efl_canvas_filter_internal.eo b/src/lib/evas/canvas/efl_canvas_filter_internal.eo index 052c327d9c..426cd44b09 100644 --- a/src/lib/evas/canvas/efl_canvas_filter_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_filter_internal.eo @@ -45,7 +45,7 @@ mixin @beta Efl.Canvas.Filter.Internal requires Efl.Object extends Efl.Gfx.Filte { [[Evas internal implementation of filters.]] - eo_prefix: evas; + c_prefix: evas; data: Evas_Filter_Data; methods { diff --git a/src/lib/evas/canvas/efl_input_event.eo b/src/lib/evas/canvas/efl_input_event.eo index 95f2db6575..04bc589a86 100644 --- a/src/lib/evas/canvas/efl_input_event.eo +++ b/src/lib/evas/canvas/efl_input_event.eo @@ -8,7 +8,7 @@ mixin @beta Efl.Input.Event requires Efl.Object extends Efl.Duplicate structures. This class is intended to carry more complex event data, such as pointer events. ]] - eo_prefix: efl_input; + c_prefix: efl_input; data: null; methods { @property timestamp @pure_virtual { diff --git a/src/lib/evas/canvas/efl_input_interface.eo b/src/lib/evas/canvas/efl_input_interface.eo index 8d64f406f7..e232ec169a 100644 --- a/src/lib/evas/canvas/efl_input_interface.eo +++ b/src/lib/evas/canvas/efl_input_interface.eo @@ -19,7 +19,7 @@ interface @beta Efl.Input.Interface Long, repeated, key presses will always happen like this: down...up,down...up,down...up (not down...up or down...down...down...up). ]] - eo_prefix: efl_input; + c_prefix: efl_input; event_prefix: efl; methods { @property seat_event_filter @beta { diff --git a/src/lib/evas/canvas/efl_input_state.eo b/src/lib/evas/canvas/efl_input_state.eo index 08f0623608..bc235158de 100644 --- a/src/lib/evas/canvas/efl_input_state.eo +++ b/src/lib/evas/canvas/efl_input_state.eo @@ -6,7 +6,7 @@ interface Efl.Input.State @since 1.22 ]] - eo_prefix: efl_input; + c_prefix: efl_input; methods { /* FIXME Efl.Input.Device is not stable yet*/ @property modifier_enabled @beta { diff --git a/src/lib/evas/gesture/efl_canvas_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo index 86fa775770..eafb1d983a 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture.eo @@ -3,7 +3,7 @@ import efl_canvas_gesture_types; abstract @beta Efl.Canvas.Gesture extends Efl.Object { [[EFL Gesture abstract class]] - eo_prefix: efl_gesture; + c_prefix: efl_gesture; methods { @property type { [[This property holds the type of the gesture.]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo index 12473d6761..1a690b0d65 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_long_tap.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Gesture_Long_Tap extends Efl.Canvas.Gesture { [[EFL Gesture Long Tap class]] - eo_prefix: efl_gesture_long_tap; + c_prefix: efl_gesture_long_tap; event_prefix: efl; events { gesture,long_tap: Efl.Canvas.Gesture; [[Event for tap gesture]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo index f42c2dccb3..a39318aea0 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Gesture_Manager extends Efl.Object { [[EFL Gesture Manager class]] - eo_prefix: efl_gesture_manager; + c_prefix: efl_gesture_manager; methods { recognizer_register { [[This function is called to register a new Efl.Canvas.Gesture_Recognizer]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo index a3a11c3a1c..857408913b 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo @@ -3,7 +3,7 @@ import efl_canvas_gesture_types; abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object { [[EFL Gesture Recognizer abstract class]] - eo_prefix: efl_gesture_recognizer; + c_prefix: efl_gesture_recognizer; methods { create @pure_virtual { [[This function is called to create a new Efl.Canvas.Gesture object for the given target]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo index 025cc4e19b..8094655f13 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Long_Tap extends Efl.Canvas.Gesture_Re { [[EFL Gesture Recognizer Long Tap class]] data: null; - eo_prefix: efl_gesture_recognizer_long_tap; + c_prefix: efl_gesture_recognizer_long_tap; implements { Efl.Canvas.Gesture_Recognizer.create; Efl.Canvas.Gesture_Recognizer.recognize; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo index 43fe77a654..65ae8c0c10 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo @@ -2,7 +2,7 @@ class @beta Efl.Canvas.Gesture_Recognizer_Tap extends Efl.Canvas.Gesture_Recogni { [[EFL Gesture Recognizer Tap class]] data: null; - eo_prefix: efl_gesture_recognizer_tap; + c_prefix: efl_gesture_recognizer_tap; implements { Efl.Canvas.Gesture_Recognizer.create; Efl.Canvas.Gesture_Recognizer.recognize; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_tap.eo b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo index 88e6e5c18e..a994b90abe 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_tap.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_tap.eo @@ -1,7 +1,7 @@ class @beta Efl.Canvas.Gesture_Tap extends Efl.Canvas.Gesture { [[EFL Gesture Tap class]] - eo_prefix: efl_gesture_tap; + c_prefix: efl_gesture_tap; event_prefix: efl; events { gesture,tap: Efl.Canvas.Gesture; [[Event for tap gesture]] diff --git a/src/lib/evas/gesture/efl_canvas_gesture_touch.eo b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo index 7d773b56c5..4109b47de4 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_touch.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo @@ -6,7 +6,7 @@ import efl_input_types; class @beta Efl.Canvas.Gesture_Touch extends Efl.Object { [[EFL Gesture Touch class]] - eo_prefix: efl_gesture_touch; + c_prefix: efl_gesture_touch; methods { point_record { [[Touch point record method]] diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo index 0a89c5eea7..c6aa05b00b 100644 --- a/src/tests/eolian/data/class_simple.eo +++ b/src/tests/eolian/data/class_simple.eo @@ -8,7 +8,7 @@ var @extern Bah: double; // not generated class Class_Simple { [[Class Desc Simple]] - eo_prefix: efl_canvas_object_simple; + c_prefix: efl_canvas_object_simple; data: Evas_Simple_Data; methods { @property a @beta { From c559bdf8094e268879c60824a07ad8eab8cba1b3 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 25 Apr 2019 15:38:20 -0700 Subject: [PATCH 05/25] eio: correctly set reference count of cached child object. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8793 --- src/lib/eio/efl_io_model.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c index f5d46649d0..87d219cfb0 100644 --- a/src/lib/eio/efl_io_model.c +++ b/src/lib/eio/efl_io_model.c @@ -948,6 +948,8 @@ _efl_io_model_efl_model_children_slice_get(Eo *obj, Efl_Io_Model_Data *pd, // NOTE: We are assuming here that the parent model will outlive all its children child_data->filter.cb = pd->filter.cb, child_data->filter.data = pd->filter.data); + else + efl_ref(info->object); eina_value_array_append(&array, info->object); efl_wref_add(info->object, &info->object); From eb1d47349bbefa9d224e4bea62e9cd0c3fb37fda Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 25 Apr 2019 15:40:31 -0700 Subject: [PATCH 06/25] eina: always initialize all the field of Eina_Value used by Eina_Promise. Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D8794 --- src/lib/eina/eina_promise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c index a5f5c40b5a..f32d835fe4 100644 --- a/src/lib/eina/eina_promise.c +++ b/src/lib/eina/eina_promise.c @@ -1343,7 +1343,7 @@ eina_promise_all_array(Eina_Future *array[]) for (i = 0; i < ctx->base.futures_len; i++) { - Eina_Value v; + Eina_Value v = { 0 }; //Stub values... r = eina_value_setup(&v, EINA_VALUE_TYPE_INT); From 7b7ad5380a2900bfabb03f2ac86c96caa66ededf Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 25 Apr 2019 15:44:17 -0700 Subject: [PATCH 07/25] ecore: property handle allocation error in Efl.CompositeModel. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8795 --- src/lib/ecore/efl_composite_model.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore/efl_composite_model.c b/src/lib/ecore/efl_composite_model.c index 4a7e11413e..913d2041af 100644 --- a/src/lib/ecore/efl_composite_model.c +++ b/src/lib/ecore/efl_composite_model.c @@ -163,7 +163,6 @@ _efl_composite_model_child_added(void *data, const Efl_Event *event) if (ev->child) cev.child = _efl_composite_lookup(efl_class_get(pd->self), pd->self, ev->child, ev->index); - efl_event_callback_call(pd->self, EFL_MODEL_EVENT_CHILD_ADDED, &cev); efl_unref(cev.child); @@ -302,6 +301,8 @@ _efl_composite_model_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v) // Fetch an existing composite model for this model or create a new one if none exist composite = _efl_composite_lookup(req->self, req->parent, target, req->start + i); + if (!composite) continue; + eina_value_array_append(&r, composite); // Dropping this scope reference efl_unref(composite); From dac867bb24dfe9c839cf734f2dc359f1a997d4a5 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 25 Apr 2019 15:46:59 -0700 Subject: [PATCH 08/25] ecore: refactor Efl.CompositeModel to provide child allocation to other internal Model. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8796 --- src/lib/ecore/efl_composite_model.c | 14 -------------- src/lib/ecore/efl_composite_model_private.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/lib/ecore/efl_composite_model.c b/src/lib/ecore/efl_composite_model.c index 913d2041af..630d08edf7 100644 --- a/src/lib/ecore/efl_composite_model.c +++ b/src/lib/ecore/efl_composite_model.c @@ -45,20 +45,6 @@ _children_indexed_key(const Efl_Composite_Model_Data *node, return node->index - *key; } -static Efl_Model * -_efl_composite_lookup(const Efl_Class *self, Eo *parent, Efl_Model *view, unsigned int index) -{ - EFL_COMPOSITE_LOOKUP_RETURN(remember, parent, view, "_efl.composite_model"); - - remember = efl_add_ref(self, parent, - efl_ui_view_model_set(efl_added, view), - efl_composite_model_index_set(efl_added, index), - efl_loop_model_volatile_make(efl_added)); - if (!remember) return NULL; - - EFL_COMPOSITE_REMEMBER_RETURN(remember, view); -} - static void _efl_composite_model_efl_object_invalidate(Eo *obj, Efl_Composite_Model_Data *pd) { diff --git a/src/lib/ecore/efl_composite_model_private.h b/src/lib/ecore/efl_composite_model_private.h index f4872416d3..67862f968c 100644 --- a/src/lib/ecore/efl_composite_model_private.h +++ b/src/lib/ecore/efl_composite_model_private.h @@ -56,4 +56,19 @@ _efl_composite_model_properties_mix(Eina_Iterator *super, Eina_Iterator *dyn, Ei efl_key_wref_set(View, buf, Remember); \ return Remember; + +static inline Efl_Model * +_efl_composite_lookup(const Efl_Class *self, Eo *parent, Efl_Model *view, unsigned int index) +{ + EFL_COMPOSITE_LOOKUP_RETURN(remember, parent, view, "_efl.composite_model"); + + remember = efl_add_ref(self, parent, + efl_ui_view_model_set(efl_added, view), + efl_composite_model_index_set(efl_added, index), + efl_loop_model_volatile_make(efl_added)); + if (!remember) return NULL; + + EFL_COMPOSITE_REMEMBER_RETURN(remember, view); +} + #endif From 524139a16ffe9d278e1d4b5cea2d61ed7a70955d Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 28 Mar 2019 17:09:14 -0700 Subject: [PATCH 09/25] ecore: make sure that ecore stay initialized during the full test. efl_app_test_promise.c is slightly special and corrective action have to be taken to make sure that ecore_init return the right value when the no fork mode of libcheck is used. Reviewed-by: Mike Blumenkrantz Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8566 --- src/tests/ecore/efl_app_test_promise.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/ecore/efl_app_test_promise.c b/src/tests/ecore/efl_app_test_promise.c index 91d3f802d7..1a9019368d 100644 --- a/src/tests/ecore/efl_app_test_promise.c +++ b/src/tests/ecore/efl_app_test_promise.c @@ -1407,6 +1407,7 @@ EFL_START_TEST(efl_test_future_then) Eina_Value *ret = NULL; Eina_Error err = 0; + ecore_init(); efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, efl_main_test, NULL); ecore_init_ex(1, argv); ret = efl_loop_begin(efl_main_loop_get()); @@ -1415,6 +1416,7 @@ EFL_START_TEST(efl_test_future_then) ck_assert_ptr_eq(eina_value_type_get(ret), EINA_VALUE_TYPE_ERROR); eina_value_get(ret, &err); ck_assert_int_eq(err, EAGAIN); + ecore_shutdown(); } EFL_END_TEST From 84e6fabbb3381c42d21eb224a77b86cdf335e89b Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 9 May 2019 14:09:08 -0400 Subject: [PATCH 10/25] Ecore_Exe: fix warning on Windows Summary: ExitProcess() has not the signature expected by CreateRemoteThread() Test Plan: compilation Reviewers: raster, zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8870 --- src/lib/ecore/ecore_exe_win32.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c index 7ca179a482..69e80dafbf 100644 --- a/src/lib/ecore/ecore_exe_win32.c +++ b/src/lib/ecore/ecore_exe_win32.c @@ -260,6 +260,15 @@ _ecore_exe_thread_procedure(LPVOID data EINA_UNUSED) return 1; } +static DWORD __stdcall +_ecore_exe_exit_process(void *data) +{ + UINT *code; + code = (UINT *)data; + ExitProcess(*code); + return 1; +} + static BOOL CALLBACK _ecore_exe_enum_windows_procedure(HWND window, LPARAM data) @@ -267,6 +276,7 @@ _ecore_exe_enum_windows_procedure(HWND window, Ecore_Exe *obj = (Ecore_Exe *) data; Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS); DWORD thread_id; + UINT code = 0; if (!exe) return EINA_FALSE; thread_id = GetWindowThreadProcessId(window, NULL); @@ -295,7 +305,8 @@ _ecore_exe_enum_windows_procedure(HWND window, /* Exit process */ if (CreateRemoteThread(exe->process, NULL, 0, - (LPTHREAD_START_ROUTINE)ExitProcess, NULL, + (LPTHREAD_START_ROUTINE)_ecore_exe_exit_process, + &code, 0, NULL)) return EINA_FALSE; From 7b44b02e1089689e429f420b4c1dce8ab0c25fea Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 10 May 2019 10:01:59 -0400 Subject: [PATCH 11/25] elementary genlist: fix potential uninitialized variable. Test Plan: compilation Reviewers: raster, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8874 --- src/lib/elementary/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 0a893b72d0..c82a023fd6 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -6768,7 +6768,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist { // Inlist is not sorted! Elm_Gen_Item *prev_rel = NULL; - int cmp; + int cmp = 0; EINA_INLIST_FOREACH(sd->items, rel) { From fd35f6c193a7da2ad600e723f16308a5499fd6f4 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 3 Apr 2019 17:25:06 -0700 Subject: [PATCH 12/25] ecore: add Efl.Filter_Model This model provide facility to filter the content of composited model. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8797 --- src/lib/ecore/Ecore_Eo.h | 1 + src/lib/ecore/efl_filter_model.c | 569 ++++++++++++++++++++++++++++++ src/lib/ecore/efl_filter_model.eo | 31 ++ src/lib/ecore/meson.build | 2 + 4 files changed, 603 insertions(+) create mode 100644 src/lib/ecore/efl_filter_model.c create mode 100644 src/lib/ecore/efl_filter_model.eo diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index 6e872d9d2c..363868c1a4 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -119,6 +119,7 @@ EAPI Eo *efl_main_loop_get(void); #include "efl_composite_model.eo.h" #include "efl_boolean_model.eo.h" #include "efl_select_model.eo.h" +#include "efl_filter_model.eo.h" #include "efl_view_model.eo.h" /** diff --git a/src/lib/ecore/efl_filter_model.c b/src/lib/ecore/efl_filter_model.c new file mode 100644 index 0000000000..9f2511cfa0 --- /dev/null +++ b/src/lib/ecore/efl_filter_model.c @@ -0,0 +1,569 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "efl_composite_model_private.h" + +typedef struct _Efl_Filter_Model_Mapping Efl_Filter_Model_Mapping; +struct _Efl_Filter_Model_Mapping +{ + EINA_RBTREE; + + uint64_t original; + uint64_t mapped; + + EINA_REFCOUNT; +}; + +typedef struct _Efl_Filter_Model_Data Efl_Filter_Model_Data; +struct _Efl_Filter_Model_Data +{ + Efl_Filter_Model_Mapping *self; + + Eina_Rbtree *mapping; + + struct { + void *data; + EflFilterModel cb; + Eina_Free_Cb free_cb; + uint64_t count; + } filter; + + uint64_t counted; + Eina_Bool counting_started : 1; + Eina_Bool processed : 1; +}; + +static Eina_Rbtree_Direction +_filter_mapping_cmp_cb(const Eina_Rbtree *left, const Eina_Rbtree *right, void *data EINA_UNUSED) +{ + const Efl_Filter_Model_Mapping *l, *r; + + l = (const Efl_Filter_Model_Mapping *) left; + r = (const Efl_Filter_Model_Mapping *) right; + + if (l->mapped < r->mapped) + return EINA_RBTREE_LEFT; + return EINA_RBTREE_RIGHT; +} + +static int +_filter_mapping_looking_cb(const Eina_Rbtree *node, const void *key, + int length EINA_UNUSED, void *data EINA_UNUSED) +{ + const Efl_Filter_Model_Mapping *n = (const Efl_Filter_Model_Mapping *) node; + const uint64_t *k = key; + + return n->mapped - *k; +} + +static void +_efl_filter_model_filter_set(Eo *obj EINA_UNUSED, Efl_Filter_Model_Data *pd, + void *filter_data, EflFilterModel filter, Eina_Free_Cb filter_free_cb) +{ + if (pd->filter.cb) + pd->filter.free_cb(pd->filter.data); + pd->filter.data = filter_data; + pd->filter.cb = filter; + pd->filter.free_cb = filter_free_cb; +} + +static void +_rbtree_free_cb(Eina_Rbtree *node, void *data EINA_UNUSED) +{ + Efl_Filter_Model_Mapping *m = (Efl_Filter_Model_Mapping*) node; + + EINA_REFCOUNT_UNREF(m) + free(m); +} + +typedef struct _Efl_Filter_Request Efl_Filter_Request; +struct _Efl_Filter_Request +{ + Efl_Filter_Model_Data *pd; + Efl_Model *parent; + Efl_Model *child; + uint64_t index; +}; + +static Efl_Filter_Model * +_efl_filter_lookup(const Efl_Class *klass, + Efl_Model *parent, Efl_Model *view, + Efl_Filter_Model_Mapping *mapping) +{ + Efl_Filter_Model *child; + Efl_Filter_Model_Data *cpd; + + child = _efl_composite_lookup(klass, parent, view, mapping->mapped); + if (!child) return NULL; + + cpd = efl_data_scope_get(child, EFL_FILTER_MODEL_CLASS); + cpd->processed = EINA_TRUE; + cpd->self = mapping; + EINA_REFCOUNT_REF(mapping); + + return child; +} + +static Eina_Value +_efl_filter_model_filter(Eo *o EINA_UNUSED, void *data, const Eina_Value v) +{ + Efl_Filter_Model_Mapping *mapping; + Efl_Filter_Model *child; + Efl_Model_Children_Event cevt = { 0 }; + Efl_Filter_Request *r = data; + Eina_Value ret = v; + Eina_Bool result = EINA_FALSE; + + if (!eina_value_bool_get(&v, &result)) goto end; + if (!result) goto end; + + mapping = calloc(1, sizeof (Efl_Filter_Model_Mapping)); + if (!mapping) + { + ret = eina_value_bool_init(EINA_FALSE); + goto end; + } + EINA_REFCOUNT_INIT(mapping); + + mapping->original = r->index; + mapping->mapped = r->pd->filter.count++; + + r->pd->mapping = eina_rbtree_inline_insert(r->pd->mapping, EINA_RBTREE_GET(mapping), + _filter_mapping_cmp_cb, NULL); + + child = _efl_filter_lookup(efl_class_get(r->parent), r->parent, r->child, mapping); + if (!child) goto end; + + cevt.index = mapping->mapped; + cevt.child = child; + + efl_event_callback_call(r->parent, EFL_MODEL_EVENT_CHILD_ADDED, &cevt); + efl_event_callback_call(r->parent, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL); + + efl_unref(cevt.child); + + ret = eina_value_bool_init(EINA_TRUE); + + end: + return ret; +} + +static void +_efl_filter_model_filter_clean(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED) +{ + Efl_Filter_Request *r = data; + + efl_unref(r->parent); + efl_unref(r->child); + free(r); +} + +static Eina_Value +_efl_filter_model_child_fetch(Eo *o EINA_UNUSED, void *data, const Eina_Value v) +{ + Efl_Filter_Request *r = data; + unsigned int i, len; + Eina_Future *f; + Eo *target = NULL; + + // Get the first and only child in the array + EINA_VALUE_ARRAY_FOREACH(&v, len, i, target) + break; + + r->child = efl_ref(target); + + f = r->pd->filter.cb(r->pd->filter.data, r->parent, r->child); + f = efl_future_then(r->parent, f, + .success = _efl_filter_model_filter, + .success_type = EINA_VALUE_TYPE_BOOL, + .free = _efl_filter_model_filter_clean, + .data = r); + return eina_future_as_value(f); +} + +static Eina_Value +_efl_filter_model_child_error(Eo *o, void *data, Eina_Error err) +{ + _efl_filter_model_filter_clean(o, data, NULL); + return eina_value_error_init(err); +} + +static void +_efl_filter_model_child_added(void *data, const Efl_Event *event) +{ + Efl_Filter_Model_Data *pd = data; + Efl_Model_Children_Event *ev = event->info; + Efl_Model *child = ev->child; + Efl_Filter_Request *r; + Eina_Future *f; + + if (child) + { + Efl_Filter_Model_Data *cpd = efl_data_scope_get(child, EFL_FILTER_MODEL_CLASS); + + if (cpd->processed) return ; + } + + r = calloc(1, sizeof (Efl_Filter_Request)); + if (!r) return ; + + r->pd = pd; + r->index = ev->index; + r->parent = efl_ref(event->object); + + if (!child) + { + f = efl_model_children_slice_get(efl_ui_view_model_get(r->parent), r->index, 1); + f = efl_future_then(event->object, f, + .success = _efl_filter_model_child_fetch, + .success_type = EINA_VALUE_TYPE_ARRAY, + .error = _efl_filter_model_child_error, + .data = r); + return ; + } + + r->child = efl_ref(child); + + f = pd->filter.cb(pd->filter.data, r->parent, r->child); + f = efl_future_then(event->object, f, + .success = _efl_filter_model_filter, + .success_type = EINA_VALUE_TYPE_BOOL, + .free = _efl_filter_model_filter_clean, + .data = r); + + efl_event_callback_stop(event->object); +} + +static void +_efl_filter_model_child_removed(void *data, const Efl_Event *event) +{ + Efl_Filter_Model_Mapping *mapping; + Efl_Filter_Model_Data *pd = data; + Efl_Model_Children_Event *ev = event->info; + uint64_t removed = ev->index; + + mapping = (void *)eina_rbtree_inline_lookup(pd->mapping, + &removed, sizeof (uint64_t), + _filter_mapping_looking_cb, NULL); + if (!mapping) return; + + pd->mapping = eina_rbtree_inline_remove(pd->mapping, EINA_RBTREE_GET(mapping), + _filter_mapping_cmp_cb, NULL); + + EINA_REFCOUNT_UNREF(mapping) + free(mapping); + + // Update the tree for the index to reflect the removed child + for (removed++; removed < pd->filter.count; removed++) + { + mapping = (void *)eina_rbtree_inline_lookup(pd->mapping, + &removed, sizeof (uint64_t), + _filter_mapping_looking_cb, NULL); + if (!mapping) continue; + + pd->mapping = eina_rbtree_inline_remove(pd->mapping, EINA_RBTREE_GET(mapping), + _filter_mapping_cmp_cb, NULL); + mapping->mapped--; + pd->mapping = eina_rbtree_inline_insert(pd->mapping, EINA_RBTREE_GET(mapping), + _filter_mapping_cmp_cb, NULL); + } + pd->filter.count--; + pd->counted--; +} + +EFL_CALLBACKS_ARRAY_DEFINE(filters_callbacks, + { EFL_MODEL_EVENT_CHILD_ADDED, _efl_filter_model_child_added }, + { EFL_MODEL_EVENT_CHILD_REMOVED, _efl_filter_model_child_removed }); + +static void +_efl_filter_model_efl_object_destructor(Eo *obj, Efl_Filter_Model_Data *pd) +{ + eina_rbtree_delete(pd->mapping, _rbtree_free_cb, NULL); + + if (pd->self) + { + EINA_REFCOUNT_UNREF(pd->self) + free(pd->self); + } + pd->self = NULL; + + efl_destructor(efl_super(obj, EFL_FILTER_MODEL_CLASS)); +} + +static Eina_Value +_filter_remove_array(Eo *o EINA_UNUSED, void *data, const Eina_Value v) +{ + Efl_Filter_Model_Mapping *mapping = data; + unsigned int i, len; + Eo *target = NULL; + + EINA_VALUE_ARRAY_FOREACH(&v, len, i, target) + break; + + if (efl_isa(target, EFL_FILTER_MODEL_CLASS)) + { + Efl_Filter_Model_Data *pd = efl_data_scope_get(target, EFL_FILTER_MODEL_CLASS); + + pd->self = mapping; + EINA_REFCOUNT_REF(pd->self); + } + + return eina_value_object_init(target); +} + +/* Result from eina_future_all_array is an EINA_VALUE_TYPE_ARRAY that contain Eina_Value of + Eo Model. It is expected that children slice get return an EINA_VALUE_TYPE_ARRAY that + contain Eo Model directly. +*/ +static Eina_Value +_filter_cleanup_array(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v) +{ + unsigned int i, len; + Eina_Value created = EINA_VALUE_EMPTY; + Eina_Value r = EINA_VALUE_EMPTY; + + eina_value_array_setup(&r, EINA_VALUE_TYPE_OBJECT, 4); + + EINA_VALUE_ARRAY_FOREACH(&v, len, i, created) + { + Eo *target = NULL; + + if (eina_value_type_get(&created) != EINA_VALUE_TYPE_OBJECT) + goto on_error; + + target = eina_value_object_get(&created); + if (!target) goto on_error; + + eina_value_array_append(&r, target); + } + + return r; + + on_error: + eina_value_flush(&r); + return eina_value_error_init(EFL_MODEL_ERROR_UNKNOWN); +} + +static Eina_Future * +_efl_filter_model_efl_model_children_slice_get(Eo *obj, Efl_Filter_Model_Data *pd, + unsigned int start, unsigned int count) +{ + Efl_Filter_Model_Mapping **mapping = NULL; + Eina_Future **r = NULL; + Eina_Future *f; + unsigned int i; + Eina_Error err = ENOMEM; + + if ((uint64_t) start + (uint64_t) count > pd->filter.count) + return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_INCORRECT_VALUE); + if (count == 0) + return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_INCORRECT_VALUE); + + r = malloc((count + 1) * sizeof (Eina_Future *)); + if (!r) return efl_loop_future_rejected(obj, ENOMEM); + + mapping = calloc(count, sizeof (Efl_Filter_Model_Mapping *)); + if (!mapping) goto on_error; + + for (i = 0; i < count; i++) + { + uint64_t lookup = start + i; + + mapping[i] = (void *)eina_rbtree_inline_lookup(pd->mapping, + &lookup, sizeof (uint64_t), + _filter_mapping_looking_cb, NULL); + if (!mapping[i]) goto on_error; + } + + for (i = 0; i < count; i++) + { + r[i] = efl_model_children_slice_get(efl_super(obj, EFL_FILTER_MODEL_CLASS), + mapping[i]->original, 1); + r[i] = efl_future_then(obj, r[i], .success_type = EINA_VALUE_TYPE_ARRAY, + .success = _filter_remove_array, + .data = mapping[i]); + if (!r) goto on_error; + } + r[i] = EINA_FUTURE_SENTINEL; + + f = efl_future_then(obj, eina_future_all_array(r), .success = _filter_cleanup_array); + free(r); + free(mapping); + + return f; + + on_error: + free(mapping); + + if (r) + for (i = 0; i < count; i ++) + if (r[i]) eina_future_cancel(r[i]); + free(r); + + return efl_loop_future_rejected(obj, err); +} + +typedef struct _Efl_Filter_Model_Result Efl_Filter_Model_Result; +struct _Efl_Filter_Model_Result +{ + Efl_Filter_Model_Data *pd; + uint64_t count; + Efl_Model *targets[1]; +}; + +// This future receive an array of boolean that indicate if a fetched object is to be kept +static Eina_Value +_efl_filter_model_array_result_request(Eo *o EINA_UNUSED, void *data, const Eina_Value v) +{ + Efl_Filter_Model_Result *req = data; + Efl_Filter_Model_Data *pd = req->pd; + unsigned int i, len; + Eina_Value request = EINA_VALUE_EMPTY; + uint64_t pcount = pd->filter.count; + + EINA_VALUE_ARRAY_FOREACH(&v, len, i, request) + { + Efl_Filter_Model_Mapping *mapping; + Efl_Model_Children_Event cevt = { 0 }; + Eina_Bool b; + + if (eina_value_type_get(&request) != EINA_VALUE_TYPE_BOOL) + continue ; + + if (!eina_value_bool_get(&request, &b)) continue; + if (!b) continue; + + mapping = calloc(1, sizeof (Efl_Filter_Model_Mapping)); + if (!mapping) continue; + + EINA_REFCOUNT_INIT(mapping); + mapping->original = i; + mapping->mapped = pd->filter.count++; + + // Insert in tree here + pd->mapping = eina_rbtree_inline_insert(pd->mapping, EINA_RBTREE_GET(mapping), + _filter_mapping_cmp_cb, NULL); + + cevt.index = mapping->mapped; + cevt.child = _efl_filter_lookup(efl_class_get(o), o, req->targets[i], mapping); + if (!cevt.child) continue; + + efl_event_callback_call(o, EFL_MODEL_EVENT_CHILD_ADDED, &cevt); + efl_unref(cevt.child); + } + + if (pcount != pd->filter.count) + efl_event_callback_call(o, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL); + + return v; +} + +static void +_efl_filter_model_array_result_free(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED) +{ + Efl_Filter_Model_Result *req = data; + uint64_t i; + + for (i = 0; i < req->count; i++) + efl_unref(req->targets[i]); + free(req); +} + +// This future receive an array of children object +static Eina_Value +_efl_filter_model_array_fetch(Eo *o, void *data, const Eina_Value v) +{ + Efl_Filter_Model_Result *req; + Efl_Filter_Model_Data *pd = data; + unsigned int i, len; + Eo *target = NULL; + Eina_Future **array = NULL; + Eina_Future *r; + Eina_Value res = v; + + if (!eina_value_array_count(&v)) return v; + + array = malloc((eina_value_array_count(&v) + 1) * sizeof (Eina_Future*)); + if (!array) return eina_value_error_init(ENOMEM); + + req = malloc(sizeof (Efl_Filter_Model_Result) + + sizeof (Eo*) * (eina_value_array_count(&v) - 1)); + if (!req) + { + res = eina_value_error_init(ENOMEM); + goto on_error; + } + + req->pd = pd; + req->count = eina_value_array_count(&v); + + EINA_VALUE_ARRAY_FOREACH(&v, len, i, target) + { + array[i] = pd->filter.cb(pd->filter.data, o, target); + req->targets[i] = efl_ref(target); + } + + array[i] = EINA_FUTURE_SENTINEL; + + r = eina_future_all_array(array); + r = efl_future_then(o, r, .success_type = EINA_VALUE_TYPE_ARRAY, + .success = _efl_filter_model_array_result_request, + .free = _efl_filter_model_array_result_free, + .data = req); + res = eina_future_as_value(r); + + on_error: + free(array); + + return res; +} + +static unsigned int +_efl_filter_model_efl_model_children_count_get(const Eo *obj, Efl_Filter_Model_Data *pd) +{ + if (!pd->counting_started && pd->filter.cb) + { + pd->counting_started = EINA_TRUE; + + // Start watching for children now + efl_event_callback_array_add((Eo *)obj, filters_callbacks(), pd); + + // Start counting (which may trigger filter being added asynchronously) + pd->counted = efl_model_children_count_get(efl_super(obj, EFL_FILTER_MODEL_CLASS)); + if (pd->counted > 0) + { + Eina_Future *f; + + f = efl_model_children_slice_get(efl_ui_view_model_get(obj), 0, pd->counted); + efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_ARRAY, + .success = _efl_filter_model_array_fetch, + .data = pd); + } + } + + return pd->filter.count; +} + +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)) + { + return eina_value_uint64_new(pd->self->mapped); + } + + return efl_model_property_get(efl_super(obj, EFL_FILTER_MODEL_CLASS), property); +} + +static unsigned int +_efl_filter_model_efl_composite_model_index_get(const Eo *obj, Efl_Filter_Model_Data *pd) +{ + if (pd->self) return pd->self->mapped; + return efl_composite_model_index_get(efl_super(obj, EFL_FILTER_MODEL_CLASS)); +} + +#include "efl_filter_model.eo.c" diff --git a/src/lib/ecore/efl_filter_model.eo b/src/lib/ecore/efl_filter_model.eo new file mode 100644 index 0000000000..8710707b06 --- /dev/null +++ b/src/lib/ecore/efl_filter_model.eo @@ -0,0 +1,31 @@ +function @beta EflFilterModel { + [[EflFilterModel function]] + params { + parent: Efl.Filter_Model; [[This object can be used to know when to cancel the future.]] + child: Efl.Model; [[You must reference this object for the duration of your use of it as the caller will not do that for you.]] + } + return: future; [[$true if the model should be kept.]] +}; + +class @beta Efl.Filter_Model extends Efl.Composite_Model +{ + [[Efl model designed to filter its children.]] + methods { + filter_set { + [[Set a filter function that will catch children from the composited model.]] + params { + filter: EflFilterModel; [[Filter callback]] + } + } + } + implements { + Efl.Object.destructor; + Efl.Model.children_slice_get; + Efl.Model.children_count { get; } + Efl.Model.property { get; } + Efl.Composite_Model.index { get; } + } + constructors { + .filter_set; + } +} \ No newline at end of file diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index 64d255fe73..b34276c3cc 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -66,6 +66,7 @@ pub_eo_files = [ 'efl_core_proc_env.eo', 'efl_core_command_line.eo', 'efl_loop_timer.eo', + 'efl_filter_model.eo', ] foreach eo_file : pub_eo_files @@ -145,6 +146,7 @@ ecore_src = [ 'efl_model_accessor_view.c', 'efl_model_accessor_view_private.h', 'efl_view_model.c', + 'efl_filter_model.c', 'efl_linear_interpolator.c', 'efl_accelerate_interpolator.c', 'efl_decelerate_interpolator.c', From c1204d88f60a1809565f2983f8fd58bb573bf07e Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 18 Apr 2019 10:53:07 -0700 Subject: [PATCH 13/25] ecore: add a test for the new Efl.FilterModel. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8798 --- src/tests/efl/efl_test_composite_model.c | 273 ++++++++++++++++++++++- 1 file changed, 271 insertions(+), 2 deletions(-) diff --git a/src/tests/efl/efl_test_composite_model.c b/src/tests/efl/efl_test_composite_model.c index cfe56c135f..48511a9054 100644 --- a/src/tests/efl/efl_test_composite_model.c +++ b/src/tests/efl/efl_test_composite_model.c @@ -59,6 +59,10 @@ _children_slice_get_then(void *data EINA_UNUSED, fail_if(v_int != base_ints[i]); fail_if(v_true != EINA_TRUE); fail_if(v_false != EINA_FALSE); + + eina_value_free(p_int); + eina_value_free(p_true); + eina_value_free(p_false); } ecore_main_loop_quit(); @@ -96,6 +100,10 @@ _selection_children_slice_get_then(void *data EINA_UNUSED, fail_if(v_bool != base_selections[i]); fail_if(v_int != base_ints[i]); ck_assert_int_eq(i, index); + + eina_value_free(p_bool); + eina_value_free(p_int); + eina_value_free(p_index); } ecore_main_loop_quit(); @@ -107,7 +115,7 @@ EFL_START_TEST(efl_test_boolean_model) { Efl_Generic_Model *base_model, *child; int i; - Eina_Value v; + Eina_Value v = { 0 }; Efl_Boolean_Model *model; Eina_Future *future; @@ -150,7 +158,7 @@ EFL_START_TEST(efl_test_select_model) { Efl_Generic_Model *base_model, *child; int i; - Eina_Value v; + Eina_Value v = { 0 }; Efl_Select_Model *model; Eina_Future *future; @@ -181,9 +189,270 @@ EFL_START_TEST(efl_test_select_model) } EFL_END_TEST +typedef struct _Efl_Filter_Model_Wait Efl_Filter_Model_Wait; +struct _Efl_Filter_Model_Wait +{ + Efl_Model *child; + Efl_Model *parent; + Eina_Promise *p; +}; + +static void _wait_for_it(void *data, const Efl_Event *event); + +static void +_wait_cleanup(Efl_Filter_Model_Wait *mw) +{ + efl_event_callback_del(mw->child, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _wait_for_it, mw); + efl_unref(mw->child); + efl_unref(mw->parent); + free(mw); +} + +static void +_wait_for_it(void *data, const Efl_Event *event) +{ + Efl_Model_Property_Event *ev = event->info; + Efl_Filter_Model_Wait *mw = data; + const char *property; + unsigned int i; + Eina_Array_Iterator it; + + EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, it) + { + if (!strcmp(property, "ready")) + { + Eina_Value *value = efl_model_property_get(event->object, "ready"); + Eina_Bool r; + Eina_Error err = 0; + + if (eina_value_type_get(value) == EINA_VALUE_TYPE_BOOL && + eina_value_bool_get(value, &r) && + r) + { + eina_value_free(value); + eina_promise_resolve(mw->p, eina_value_bool_init(EINA_TRUE)); + _wait_cleanup(mw); + return ; + } + if (eina_value_type_get(value) == EINA_VALUE_TYPE_ERROR && + eina_value_error_get(value, &err) && + err != EAGAIN) + { + eina_value_free(value); + eina_promise_reject(mw->p, err); + _wait_cleanup(mw); + return ; + } + eina_value_free(value); + break; + } + } +} + +static void +_wait_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED) +{ + _wait_cleanup(data); +} + +static Eina_Future * +_wait_ready_true(Efl_Model *parent, Efl_Model *child) +{ + Efl_Filter_Model_Wait *mw; + Eina_Value *value = efl_model_property_get(child, "ready"); + Eina_Bool r = EINA_FALSE; + Eina_Error err = 0; + + if (eina_value_type_get(value) == EINA_VALUE_TYPE_BOOL && + eina_value_bool_get(value, &r) && + r) + { + eina_value_free(value); + return efl_loop_future_resolved(parent, eina_value_bool_init(EINA_TRUE)); + } + if (eina_value_type_get(value) == EINA_VALUE_TYPE_ERROR && + eina_value_error_get(value, &err) && + err != EAGAIN) + { + eina_value_free(value); + return efl_loop_future_rejected(parent, err); + } + + eina_value_free(value); + + mw = calloc(1, sizeof (Efl_Filter_Model_Wait)); + if (!mw) return efl_loop_future_rejected(parent, ENOMEM); + + mw->p = eina_promise_new(efl_loop_future_scheduler_get(parent), _wait_cancel, mw); + mw->child = efl_ref(child); + mw->parent = efl_ref(parent); + + efl_event_callback_add(child, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _wait_for_it, mw); + + return efl_future_then(child, eina_future_new(mw->p)); +} + +static Eina_Future * +_filter_cb(void *data EINA_UNUSED, Efl_Filter_Model *parent, Efl_Model *child) +{ + return _wait_ready_true(parent, child); +} + +static Eina_Value +_fetch_and_switch(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v) +{ + unsigned int i, len; + Eo *target = NULL; + Eina_Future **all; + + all = calloc(1, sizeof (Eina_Future *) * (eina_value_array_count(&v) + 1)); + if (!all) return eina_value_error_init(ENOMEM); + + EINA_VALUE_ARRAY_FOREACH(&v, len, i, target) + { + all[i] = efl_model_property_set(target, "ready", eina_value_bool_new(EINA_TRUE)); + } + all[i] = EINA_FUTURE_SENTINEL; + + return eina_future_as_value(eina_future_all_array(all)); +} + +static void +_count_changed(void *data, const Efl_Event *ev) +{ + Eina_Promise *p = data; + + if (efl_model_children_count_get(ev->object) != child_number) return ; + + efl_event_callback_del(ev->object, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, + _count_changed, p); + eina_promise_resolve(p, eina_value_bool_init(EINA_TRUE)); +} + +static void +_wait_count_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED) +{ + Eo *filter = data; + + efl_unref(filter); +} + +static Eina_Value +_wait_count(Eo *filter, void *data EINA_UNUSED, const Eina_Value v EINA_UNUSED) +{ + Eina_Promise *p; + Eina_Future *racing[3]; + Eina_Future *race; + + p = eina_promise_new(efl_loop_future_scheduler_get(filter), + _wait_count_cancel, efl_ref(filter)); + efl_event_callback_add(filter, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, _count_changed, p); + + racing[0] = eina_future_new(p); + racing[1] = efl_loop_timeout(efl_loop_get(filter), 0.3); + racing[2] = EINA_FUTURE_SENTINEL; + + race = eina_future_race_array(racing); + + return eina_future_as_value(race); +} + +static Eina_Value +_count_and_fetch(Eo *filter, void *data EINA_UNUSED, const Eina_Value v EINA_UNUSED) +{ + ck_assert_int_eq(efl_model_children_count_get(filter), child_number); + + return eina_future_as_value(efl_model_children_slice_get(filter, 0, child_number)); +} + +static Eina_Value +_check_index(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v) +{ + unsigned int i, len; + Eo *target = NULL; + + EINA_VALUE_ARRAY_FOREACH(&v, len, i, target) + { + Eina_Value *p_original; + uint64_t idx, original; + + idx = efl_composite_model_index_get(target); + p_original = efl_model_property_get(target, "original"); + fail_if(!eina_value_uint64_convert(p_original, &original)); + ck_assert(original < child_number); + ck_assert(idx < child_number); + + eina_value_free(p_original); + } + + return v; +} + +static void +_cleanup(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Future *dead_future EINA_UNUSED) +{ + ecore_main_loop_quit(); +} + +EFL_START_TEST(efl_test_filter_model) +{ + Efl_Generic_Model *base_model, *child; + int i; + Eina_Value v = { 0 }; + Efl_Boolean_Model *model; + Efl_Boolean_Model *filter; + Eina_Future *future; + + eina_value_setup(&v, EINA_VALUE_TYPE_INT); + + base_model = efl_add_ref(EFL_GENERIC_MODEL_CLASS, efl_main_loop_get()); + ck_assert(!!base_model); + + for (i = 0; i < child_number; ++i) + { + child = efl_model_child_add(base_model); + ck_assert(!!child); + ck_assert(eina_value_set(&v, base_ints[i])); + efl_model_property_set(child, "test_p_int", &v); + efl_model_property_set(child, "original", eina_value_int_new(i)); + } + + model = efl_add_ref(EFL_BOOLEAN_MODEL_CLASS, efl_main_loop_get(), + efl_ui_view_model_set(efl_added, base_model), + efl_boolean_model_boolean_add(efl_added, "test_p_true", EINA_TRUE), + efl_boolean_model_boolean_add(efl_added, "test_p_false", EINA_FALSE), + efl_boolean_model_boolean_add(efl_added, "ready", EINA_FALSE)); + ck_assert(!!model); + + filter = efl_add_ref(EFL_FILTER_MODEL_CLASS, efl_main_loop_get(), + efl_ui_view_model_set(efl_added, model), + efl_filter_model_filter_set(efl_added, NULL, _filter_cb, NULL)); + ck_assert(!!filter); + ck_assert_int_eq(efl_model_children_count_get(filter), 0); + + future = efl_model_children_slice_get(model, 0, efl_model_children_count_get(model)); + future = efl_future_then(model, future, + .success = _fetch_and_switch); + future = efl_future_then(filter, future, + .success = _wait_count); + future = efl_future_then(filter, future, + .success = _count_and_fetch); + future = efl_future_then(filter, future, + .success = _check_index, + .free = _cleanup); + + ecore_main_loop_begin(); + + efl_unref(filter); + efl_del(filter); +} +EFL_END_TEST + void efl_test_case_boolean_model(TCase *tc) { tcase_add_test(tc, efl_test_boolean_model); tcase_add_test(tc, efl_test_select_model); + tcase_add_test(tc, efl_test_filter_model); } From 5fa78a44d883d539364221afc966d0c0e5efe515 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 25 Apr 2019 15:51:19 -0700 Subject: [PATCH 14/25] elementary: move Fileselector to rely on Efl.FilterModel for filtering instead of custom logic. This simply a bit the logic of things, but more refactoring would be nice for this widget. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8799 --- src/lib/elementary/elc_fileselector.c | 373 ++++++++++++++------------ 1 file changed, 208 insertions(+), 165 deletions(-) diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index 9283dc3190..4ebf9cc7e8 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -96,8 +96,6 @@ EFL_CALLBACKS_ARRAY_DEFINE(monitoring_callbacks, { EFL_MODEL_EVENT_CHILD_ADDED, _resource_created }, { EFL_MODEL_EVENT_CHILD_REMOVED, _resource_deleted }); -static void _properties_changed(void *data, const Efl_Event *ev); - static void _focus_chain_update(Eo *obj, Elm_Fileselector_Data *pd) { @@ -194,16 +192,121 @@ _elm_fileselector_replace_model(Elm_Fileselector *fs, Elm_Fileselector_Data *sd, } } +static const char * +_io_path_get(Efl_Model *model) +{ + if (!model) return NULL; + if (efl_isa(model, EFL_IO_MODEL_CLASS)) return efl_io_model_path_get(model); + return _io_path_get(efl_ui_view_model_get(model)); +} + +static Eina_Bool +_check_again(Eina_Value *fetch) +{ + Eina_Error err = 0; + char *str; + + if (eina_value_type_get(fetch) != EINA_VALUE_TYPE_ERROR) + return EINA_FALSE; + + eina_value_error_get(fetch, &err); + if (err == EAGAIN) return EINA_TRUE; + + str = eina_value_to_string(fetch); + ERR("Unexpected error: '%s'.", str); + free(str); + + return EINA_TRUE; +} + +static Eina_Bool +_fetch_string_value(Efl_Model *child, const char *name, char **str) +{ + Eina_Value *fetch; + Eina_Bool r = EINA_FALSE; + + *str = NULL; + + fetch = efl_model_property_get(child, name); + if (_check_again(fetch)) goto on_error; + + *str = eina_value_to_string(fetch); + r = EINA_TRUE; + + on_error: + eina_value_free(fetch); + return r; +} + +static Eina_Bool +_fetch_bool_value(Efl_Model *child, const char *name, Eina_Bool *b) +{ + Eina_Value *fetch; + Eina_Bool r = EINA_FALSE; + + fetch = efl_model_property_get(child, name); + if (_check_again(fetch)) goto on_error; + if (!eina_value_bool_get(fetch, b)) goto on_error; + + r = EINA_TRUE; + + on_error: + eina_value_free(fetch); + return r; +} + +static Eina_Bool +_fetch_double_value(Efl_Model *child, const char *name, double *d) +{ + Eina_Value convert = EINA_VALUE_EMPTY; + Eina_Value *fetch; + Eina_Bool r = EINA_FALSE; + + fetch = efl_model_property_get(child, name); + if (_check_again(fetch)) goto on_error; + if (!eina_value_setup(&convert, EINA_VALUE_TYPE_DOUBLE)) + goto on_error; + if (!eina_value_convert(fetch, &convert)) + goto on_error; + if (!eina_value_double_get(&convert, d)) goto on_error; + + r = EINA_TRUE; + + on_error: + eina_value_flush(&convert); + eina_value_free(fetch); + return r; +} + +static Eina_Bool +_fetch_int64_value(Efl_Model *child, const char *name, int64_t *i) +{ + Eina_Value convert = EINA_VALUE_EMPTY; + Eina_Value *fetch; + Eina_Bool r = EINA_FALSE; + + fetch = efl_model_property_get(child, name); + if (_check_again(fetch)) goto on_error; + if (!eina_value_setup(&convert, EINA_VALUE_TYPE_INT64)) + goto on_error; + if (!eina_value_convert(fetch, &convert)) + goto on_error; + if (!eina_value_int64_get(&convert, i)) goto on_error; + + r = EINA_TRUE; + + on_error: + eina_value_free(fetch); + return r; +} + /* final routine on deletion */ static void _elm_fileselector_smart_del_do(Elm_Fileselector *fs, Elm_Fileselector_Data *sd) { Eo *child; EINA_LIST_FREE(sd->children, child) - { - efl_event_callback_del(child, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _properties_changed, sd); - efl_unref(child); - } + efl_unref(child); _elm_fileselector_replace_model(fs, sd, NULL, NULL); efl_replace(&sd->prev_model, NULL); ecore_idler_del(sd->path_entry_idler); @@ -536,6 +639,77 @@ _filter_child(Elm_Fileselector_Data* sd, return EINA_FALSE; } +static Eina_Value +_filter_do(Eo *child, void *data, const Eina_Value v EINA_UNUSED) +{ + Elm_Fileselector_Data* sd = data; + // FIXME: This could be only needed with ELM_FILESELECTOR_MIME_FILTER + char *mime_type = NULL; + char *filename = NULL; + char *path = NULL; + int64_t size = 0; + double mtime = 0; + Eina_Bool dir = EINA_FALSE; + Eina_Bool r = EINA_FALSE; + + if (!_fetch_string_value(child, "path", &path) || + !_fetch_string_value(child, "filename", &filename) || + !_fetch_string_value(child, "mime_type", &mime_type) || + !_fetch_double_value(child, "mtime", &mtime) || + !_fetch_int64_value(child, "size", &size) || + !_fetch_bool_value(child, "is_dir", &dir)) + goto cleanup; + + if (!path || !filename || !mime_type) + { + ERR("Wrong file info ('%s', '%s', '%s').", path, filename, mime_type); + goto cleanup; + } + + if (!_filter_child(sd, path, filename, dir, mime_type)) + goto cleanup; + + r = EINA_TRUE; + + cleanup: + free(mime_type); + free(filename); + free(path); + + return eina_value_bool_init(r); +} + +static void +_filter_free(Eo *o, void *data EINA_UNUSED, const Eina_Future *dead_future EINA_UNUSED) +{ + efl_unref(o); +} + +static Eina_Future * +_filter_simple(void *data, Efl_Filter_Model *parent, Efl_Model *child) +{ + Elm_Fileselector_Data* sd = data; + Eina_Future *request[8]; + Eina_Future *f; + + request[0] = efl_model_property_ready_get(parent, "path"); + request[1] = efl_model_property_ready_get(child, "path"); + request[2] = efl_model_property_ready_get(child, "filename"); + request[3] = efl_model_property_ready_get(child, "mime_type"); + request[4] = efl_model_property_ready_get(child, "mtime"); + request[5] = efl_model_property_ready_get(child, "size"); + request[6] = efl_model_property_ready_get(child, "is_dir"); + request[7] = EINA_FUTURE_SENTINEL; + + f = eina_future_all_array(request); + f = efl_future_then(efl_ref(child), f, + .success = _filter_do, + .free = _filter_free, + .data = sd); + + return f; +} + static const char * _file_type(const char *a) { @@ -706,106 +880,6 @@ _listing_request_cleanup(Listing_Request *lreq) free(lreq); } -static Eina_Bool -_check_again(Eina_Value *fetch) -{ - Eina_Error err = 0; - char *str; - - if (eina_value_type_get(fetch) != EINA_VALUE_TYPE_ERROR) - return EINA_FALSE; - - eina_value_error_get(fetch, &err); - if (err == EAGAIN) return EINA_TRUE; - - str = eina_value_to_string(fetch); - ERR("Unexpected error: '%s'.", str); - free(str); - - return EINA_TRUE; -} - -static Eina_Bool -_fetch_string_value(Efl_Model *child, const char *name, char **str) -{ - Eina_Value *fetch; - Eina_Bool r = EINA_FALSE; - - *str = NULL; - - fetch = efl_model_property_get(child, name); - if (_check_again(fetch)) goto on_error; - - *str = eina_value_to_string(fetch); - r = EINA_TRUE; - - on_error: - eina_value_free(fetch); - return r; -} - -static Eina_Bool -_fetch_bool_value(Efl_Model *child, const char *name, Eina_Bool *b) -{ - Eina_Value *fetch; - Eina_Bool r = EINA_FALSE; - - fetch = efl_model_property_get(child, name); - if (_check_again(fetch)) goto on_error; - if (!eina_value_bool_get(fetch, b)) goto on_error; - - r = EINA_TRUE; - - on_error: - eina_value_free(fetch); - return r; -} - -static Eina_Bool -_fetch_double_value(Efl_Model *child, const char *name, double *d) -{ - Eina_Value convert = EINA_VALUE_EMPTY; - Eina_Value *fetch; - Eina_Bool r = EINA_FALSE; - - fetch = efl_model_property_get(child, name); - if (_check_again(fetch)) goto on_error; - if (!eina_value_setup(&convert, EINA_VALUE_TYPE_DOUBLE)) - goto on_error; - if (!eina_value_convert(fetch, &convert)) - goto on_error; - if (!eina_value_double_get(&convert, d)) goto on_error; - - r = EINA_TRUE; - - on_error: - eina_value_flush(&convert); - eina_value_free(fetch); - return r; -} - -static Eina_Bool -_fetch_int64_value(Efl_Model *child, const char *name, int64_t *i) -{ - Eina_Value convert = EINA_VALUE_EMPTY; - Eina_Value *fetch; - Eina_Bool r = EINA_FALSE; - - fetch = efl_model_property_get(child, name); - if (_check_again(fetch)) goto on_error; - if (!eina_value_setup(&convert, EINA_VALUE_TYPE_INT64)) - goto on_error; - if (!eina_value_convert(fetch, &convert)) - goto on_error; - if (!eina_value_int64_get(&convert, i)) goto on_error; - - r = EINA_TRUE; - - on_error: - eina_value_free(fetch); - return r; -} - static void _process_model(Elm_Fileselector_Data *sd, Efl_Model *child) { @@ -826,7 +900,7 @@ _process_model(Elm_Fileselector_Data *sd, Efl_Model *child) // In case we are shutting down, there might be an error being gnerated if (!parent) return ; - // We should be good now + // We should be good now and already filtered if (!_fetch_string_value(parent, "path", &parent_path) || !_fetch_string_value(child, "path", &path) || !_fetch_string_value(child, "filename", &filename) || @@ -834,31 +908,6 @@ _process_model(Elm_Fileselector_Data *sd, Efl_Model *child) !_fetch_double_value(child, "mtime", &mtime) || !_fetch_int64_value(child, "size", &size) || !_fetch_bool_value(child, "is_dir", &dir)) - { - Eina_Value *check_error = efl_model_property_get(child, "mtime"); - Eina_Error err = EAGAIN; - - if (eina_value_type_get(check_error) == EINA_VALUE_TYPE_ERROR) - { - // If the error is different from EAGAIN, we should definitively drop this one. - eina_value_error_get(check_error, &err); - } - // SETUP listener to retry fetching all data when ready - if (err == EAGAIN) - { - efl_event_callback_add(efl_ref(child), EFL_MODEL_EVENT_PROPERTIES_CHANGED, _properties_changed, sd); - sd->children = eina_list_append(sd->children, child); - } - goto cleanup; - } - - if (!path || !filename || !mime_type) - { - ERR("Wrong file info ('%s', '%s', '%s').", path, filename, mime_type); - goto cleanup; - } - - if (!_filter_child(sd, path, filename, dir, mime_type)) goto cleanup; it_data = calloc(1, sizeof(Elm_Fileselector_Item_Data)); @@ -905,7 +954,7 @@ _process_model(Elm_Fileselector_Data *sd, Efl_Model *child) // Is this item selected if (sd->target && sd->target_ready) { - const char *target_path = efl_io_model_path_get(sd->target); + const char *target_path = _io_path_get(sd->target); if (!strcmp(it_data->path, target_path)) { @@ -923,18 +972,6 @@ _process_model(Elm_Fileselector_Data *sd, Efl_Model *child) free(parent_path); } -static void -_properties_changed(void *data, const Efl_Event *ev) -{ - Elm_Fileselector_Data *sd = data; - Efl_Model *child = ev->object; - - sd->children = eina_list_remove(sd->children, child); - efl_event_callback_del(child, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _properties_changed, sd); - _process_model(sd, child); - efl_unref(child); -} - static Eina_Value _process_children_cb(Eo *model EINA_UNUSED, void *data, const Eina_Value v) { @@ -999,7 +1036,13 @@ _populate(Evas_Object *obj, lreq->sd = sd; lreq->parent_it = (parent_it ? efl_ref(parent_it) : NULL); lreq->obj = efl_ref(obj); - lreq->model = efl_ref(model); + if (efl_isa(model, EFL_FILTER_MODEL_CLASS)) + model = efl_ui_view_model_get(model); + + lreq->model = efl_add_ref(EFL_FILTER_MODEL_CLASS, obj, + efl_ui_view_model_set(efl_added, model), + efl_filter_model_filter_set(efl_added, sd, _filter_simple, NULL), + efl_loop_model_volatile_make(efl_added)); lreq->selected = (selected ? efl_ref(selected) : NULL); lreq->path = NULL; lreq->selected_path = NULL; @@ -1034,11 +1077,11 @@ _populate(Evas_Object *obj, _signal_first(lreq); - if (efl_model_children_count_get(model)) + if (efl_model_children_count_get(lreq->model)) { - future = efl_model_children_slice_get(model, 0, efl_model_children_count_get(model)); + future = efl_model_children_slice_get(lreq->model, 0, efl_model_children_count_get(model)); future = efl_future_then(obj, future); - efl_future_then(model, future, + efl_future_then(lreq->model, future, .success = _process_children_cb, .error = _process_children_error, .data = lreq); @@ -1102,7 +1145,8 @@ _on_item_activated(void *data, const Efl_Event *event) if (!sd->double_tap_navigation) return; - efl_parent_set(it_data->model, data); + // Set the Efl.Io.Model parent to be the fileselector to prevent death when populate + efl_parent_set(efl_ui_view_model_get(it_data->model), data); _populate(data, it_data->model, NULL, NULL); } @@ -1279,7 +1323,7 @@ _on_dir_up(void *data, const Efl_Event *event EINA_UNUSED) if (!efl_isa(parent, EFL_IO_MODEL_CLASS)) { - const char *path = efl_io_model_path_get(sd->model); + const char *path = _io_path_get(sd->model); char dir[PATH_MAX] = ""; char *r; @@ -1345,7 +1389,7 @@ _ok(void *data, const Efl_Event *event EINA_UNUSED) else selection = eina_stringshare_printf("%s/%s", sd->path, name); - selected_model = efl_add_ref(efl_class_get(sd->model), fs, + selected_model = efl_add_ref(efl_class_get(efl_ui_view_model_get(sd->model)), fs, efl_event_callback_array_add(efl_added, noref_death(), NULL), efl_io_model_path_set(efl_added, selection)); @@ -1394,13 +1438,13 @@ _on_text_activated(void *data, const Efl_Event *event) _model_event_call(fs, ELM_FILESELECTOR_EVENT_SELECTED_INVALID, ELM_FILESELECTOR_EVENT_SELECTED_INVALID->name, NULL, path); - elm_widget_part_text_set(event->object, NULL, efl_io_model_path_get(sd->model)); + elm_widget_part_text_set(event->object, NULL, _io_path_get(sd->model)); goto end; } if (!ecore_file_is_dir(path)) { - model = efl_add_ref(efl_class_get(sd->model), fs, + model = efl_add_ref(efl_class_get(efl_ui_view_model_get(sd->model)), fs, efl_io_model_path_set(efl_added, path), efl_event_callback_array_add(efl_added, noref_death(), NULL)); @@ -1411,7 +1455,7 @@ _on_text_activated(void *data, const Efl_Event *event) dir = EINA_TRUE; } - parent = efl_add_ref(efl_class_get(sd->model), fs, + parent = efl_add_ref(efl_class_get(efl_ui_view_model_get(sd->model)), fs, efl_io_model_path_set(efl_added, path), efl_event_callback_array_add(efl_added, noref_death(), NULL)); if (!parent) goto end; @@ -1465,7 +1509,7 @@ _anchor_clicked(void *data, const Efl_Event *event) if (!sd->model) return; - model = efl_add_ref(efl_class_get(sd->model), fs, + model = efl_add_ref(efl_class_get(efl_ui_view_model_get(sd->model)), fs, efl_event_callback_array_add(efl_added, noref_death(), NULL), efl_io_model_path_set(efl_added, info->name)); if (!model) return; @@ -1581,9 +1625,7 @@ _resource_created_then(Eo *model EINA_UNUSED, void *data, const Eina_Value v) ELM_FILESELECTOR_DATA_GET(fs, sd); EINA_VALUE_ARRAY_FOREACH(&v, len, i, child) - { - _process_model(sd, child); - } + _process_model(sd, child); return v; } @@ -1889,7 +1931,7 @@ _from_legacy_event_call(Elm_Fileselector *fs, Elm_Fileselector_Data *sd, const E if (!sd->model) model_cls = EFL_IO_MODEL_CLASS; else - model_cls = efl_class_get(sd->model); + model_cls = efl_class_get(efl_ui_view_model_get(sd->model)); Efl_Model *model = efl_add_ref(model_cls, fs, efl_event_callback_array_add(efl_added, noref_death(), NULL), @@ -2306,7 +2348,7 @@ _elm_fileselector_selected_get_internal(const Evas_Object *obj) if (!sd->path) return NULL; if (sd->target) { - return efl_io_model_path_get(sd->target); + return _io_path_get(sd->target); } Elm_Fileselector_Item_Data *it_data = _selected_item_data_get(sd); @@ -2382,10 +2424,11 @@ _properties_ready(void *data, const Efl_Event *ev) if (!is_dir) { Efl_Model *parent; - const char *path = efl_io_model_path_get(ev->object); + const char *path = _io_path_get(ev->object); char *dir = ecore_file_dir_get(path); - parent = efl_add_ref(EFL_IO_MODEL_CLASS, obj, efl_io_model_path_set(efl_added, dir), + parent = efl_add_ref(EFL_IO_MODEL_CLASS, obj, + efl_io_model_path_set(efl_added, dir), efl_event_callback_array_add(efl_added, noref_death(), NULL)); if (!parent) { @@ -2476,7 +2519,7 @@ _elm_fileselector_elm_interface_fileselector_selected_model_set(Eo *obj, Elm_Fil eina_value_error_get(value, &err); if (err != EAGAIN) { - ERR("Unexpected error '%s' when setting path '%s'.", eina_value_to_string(value), efl_io_model_path_get(pd->target)); + ERR("Unexpected error '%s' when setting path '%s'.", eina_value_to_string(value), _io_path_get(pd->target)); goto clean_up; } @@ -2496,7 +2539,7 @@ _elm_fileselector_elm_interface_fileselector_selected_model_set(Eo *obj, Elm_Fil if (!dir) { Efl_Model *parent; - const char *path = efl_io_model_path_get(pd->target); + const char *path = _io_path_get(pd->target); char *d = ecore_file_dir_get(path); parent = efl_add_ref(EFL_IO_MODEL_CLASS, obj, efl_io_model_path_set(efl_added, d), From ee64f61a68ef24fef6b82fcf2e78717334121c5e Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Tue, 16 Apr 2019 21:33:44 +0200 Subject: [PATCH 15/25] libunibreak: add missing __has_attribute definitions for old compilers __has_attribute has been introduced with gcc 5 [1]. [1] https://www.gnu.org/software/gcc/gcc-5/changes.html Fixes: http://autobuild.buildroot.net/results/64ab825048fac1654b0d0698740ddf857fcc0afa/build-end.log Signed-off-by: Cedric BAIL --- src/static_libs/libunibreak/wordbreak.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/static_libs/libunibreak/wordbreak.c b/src/static_libs/libunibreak/wordbreak.c index 017e0fd091..50c830c7cc 100644 --- a/src/static_libs/libunibreak/wordbreak.c +++ b/src/static_libs/libunibreak/wordbreak.c @@ -209,6 +209,9 @@ static void set_wordbreaks( posLast = posCur; break; } +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif #if __has_attribute(fallthrough) __attribute__((fallthrough)); #endif @@ -325,6 +328,9 @@ static void set_wordbreaks( wbcSeqStart = wbcCur; posLast = posCur; } +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif #if __has_attribute(fallthrough) __attribute__((fallthrough)); #endif From e23e7be07c19ee96bd51615250031c163b2aba50 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 10 May 2019 17:58:33 -0700 Subject: [PATCH 16/25] ecore: forgotten autotools update. --- src/Makefile_Ecore.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 649dbbec28..4c3b5fd937 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -49,7 +49,8 @@ ecore_eolian_files_public = \ lib/ecore/efl_view_model.eo \ lib/ecore/efl_core_env.eo \ lib/ecore/efl_core_proc_env.eo \ - lib/ecore/efl_core_command_line.eo + lib/ecore/efl_core_command_line.eo \ + lib/ecore/efl_filter_model.eo ecore_test_eolian_files = \ tests/ecore/efl_app_test_cml.eo \ @@ -157,6 +158,7 @@ lib/ecore/efl_composite_model_private.h \ lib/ecore/efl_model_accessor_view.c \ lib/ecore/efl_model_accessor_view_private.h \ lib/ecore/efl_view_model.c \ +lib/ecore/efl_filter_model.c \ lib/ecore/efl_linear_interpolator.c \ lib/ecore/efl_accelerate_interpolator.c \ lib/ecore/efl_decelerate_interpolator.c \ From 9c992c05d5494764df209faf1a36c04972814628 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 10 May 2019 14:28:49 -0700 Subject: [PATCH 17/25] eina: refactor and simplify vpath. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8882 --- src/lib/eina/eina_vpath.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c index aa7b46bddb..87b85662d9 100644 --- a/src/lib/eina/eina_vpath.c +++ b/src/lib/eina/eina_vpath.c @@ -258,18 +258,10 @@ _eina_vpath_resolve(const char *path, char *str, size_t size) { const char *p, *end, *meta; char *name; - int max_len = strlen(path); Eina_Bool found = EINA_FALSE; - for (p = path + 2; p <= path + max_len - 2; p++) - { - if ((p[0] ==':') && (p[1] == ')')) - { - end = p; - found = EINA_TRUE; - break; - } - } + end = p = strstr(path + 2, ":)"); + if (p) found = EINA_TRUE; p += 2; if (!found) From 370917751f83bcaf65b56fde8d1a2b0d47b1d676 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 10 May 2019 14:37:24 -0700 Subject: [PATCH 18/25] eina: update vpath to also support a more classic syntax for variable. This enable vpath to recognize also ${} as a variable. It does mimic what Efl.ViewModel provide with Efl.ViewModel.PropertyText and various other language. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8883 --- src/lib/eina/eina_vpath.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c index 87b85662d9..0717e928e0 100644 --- a/src/lib/eina/eina_vpath.c +++ b/src/lib/eina/eina_vpath.c @@ -254,37 +254,53 @@ _eina_vpath_resolve(const char *path, char *str, size_t size) } } // (:xxx:)/* ... <- meta hash table - else if ((path[0] == '(') && (path[1] == ':')) + else if (((path[0] == '(') && (path[1] == ':')) || + ((path[0] == '$') && (path[1] == '{'))) { const char *p, *end, *meta; + const char *msg_start, *msg_end; char *name; + int offset; Eina_Bool found = EINA_FALSE; - end = p = strstr(path + 2, ":)"); + if (path[0] == '(') + { + end = p = strstr(path + 2, ":)"); + offset = 2; + msg_start = "(:"; + msg_end = ":)"; + } + else + { + end = p = strchr(path + 2, '}'); + offset = 1; + msg_start = "${"; + msg_end = "}"; + } if (p) found = EINA_TRUE; - p += 2; + p += offset; if (!found) { - ERR("(: Needs to have a matching ':)'\nThe string was: %s", path); + ERR("'%s' Needs to have a matching '%s'\nThe string was: %s", msg_start, msg_end, path); return 0; } if (*p != '/') { - ERR("A / is expected after :)\nThe string was: %s", path); + ERR("A / is expected after '%s'\nThe string was: %s", msg_end, path); return 0; } if (found) { name = alloca(end - path); - strncpy(name, path + 2, end - path - 2); + strncpy(name, path + 2, end - path - offset); name[end - path - 2] = 0; meta = _eina_vpath_data_get(name); if (meta) { - return snprintf(str, size, "%s%s", meta, end + 2); + return snprintf(str, size, "%s%s", meta, end + offset); } else { From c75415ae369f5988975bc6e40378d9de5e2ccef0 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 10 May 2019 14:42:57 -0700 Subject: [PATCH 19/25] eina: add tests for the new Vpath syntax. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8884 --- src/tests/eina/eina_test_vpath.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tests/eina/eina_test_vpath.c b/src/tests/eina/eina_test_vpath.c index 851c47ee2b..cad61bd831 100644 --- a/src/tests/eina/eina_test_vpath.c +++ b/src/tests/eina/eina_test_vpath.c @@ -21,8 +21,8 @@ EFL_START_TEST(eina_test_vpath_valid) snprintf(test, sizeof(test), "%s/bla", eina_environment_home_get()); ck_assert_str_eq(eina_vpath_resolve("(:home:)/bla"), test); + ck_assert_str_eq(eina_vpath_resolve("${home}/bla"), test); ck_assert_str_eq(eina_vpath_resolve("/test/for/the/last/case"), "/test/for/the/last/case"); - } EFL_END_TEST @@ -33,6 +33,13 @@ EFL_START_TEST(eina_test_vpath_invalid) ck_assert_ptr_eq(eina_vpath_resolve("(:"), NULL); ck_assert_ptr_eq(eina_vpath_resolve("(:home:)"), NULL); ck_assert_ptr_eq(eina_vpath_resolve("(:wrong_meta_key:)/"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${asdfasdfafasdf"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${missing_slash}"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${home}"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${wrong_meta_key}/"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${home:)"), NULL); + ck_assert_ptr_eq(eina_vpath_resolve("${wrong_meta_key:)/"), NULL); } EFL_END_TEST @@ -47,6 +54,10 @@ EFL_START_TEST(eina_test_vpath_snprintf) eina_vpath_resolve_snprintf(buf, sizeof(buf), "(:home:)/%s/%d/", string, x); snprintf(cmp, sizeof(cmp), "%s/%s/%d/", eina_environment_home_get(), string, x); ck_assert_str_eq(buf, cmp); + + eina_vpath_resolve_snprintf(buf, sizeof(buf), "${home}/%s/%d/", string, x); + snprintf(cmp, sizeof(cmp), "%s/%s/%d/", eina_environment_home_get(), string, x); + ck_assert_str_eq(buf, cmp); } EFL_END_TEST From 59f8516ec5d52bc774942b8988c768104c08d472 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Wed, 8 May 2019 20:28:05 +0000 Subject: [PATCH 20/25] eina vpath: fix warning on Windows, as well as the public path Differential Revision: https://phab.enlightenment.org/D8866 --- src/lib/eina/eina_vpath_xdg.c | 38 +++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/lib/eina/eina_vpath_xdg.c b/src/lib/eina/eina_vpath_xdg.c index bd36042f5d..0db6e7836d 100644 --- a/src/lib/eina/eina_vpath_xdg.c +++ b/src/lib/eina/eina_vpath_xdg.c @@ -28,28 +28,36 @@ eina_xdg_env_init(void) } while (0) #ifdef _WIN32 -# define ENV_SET(_env, _dir, _meta) \ +# define ENV_DIR_SET(_env, _dir, _meta) \ char _meta[PATH_MAX + 128]; \ if (_env) { \ s = getenv(_env); \ if (!s) s = home; \ } else s = home; \ - if (_dir) FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\%s", s, (char *)_dir); \ - else FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\", s); \ + FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\%s", s, (char *)_dir); \ (&user)->_meta = _meta; - ENV_SET(NULL, "Desktop", desktop); - ENV_SET(NULL, "Documents", documents); - ENV_SET(NULL, "Downloads", downloads); - ENV_SET(NULL, "Music", music); - ENV_SET(NULL, "Pictures", pictures); - ENV_SET("CommonProgramFiles", NULL, pub); - ENV_SET("APPDATA", "Microsoft\\Windows\\Templates", templates); - ENV_SET(NULL, "Videos", videos); - ENV_SET("LOCALAPPDATA", NULL, data); - ENV_SET("LOCALAPPDATA", "Temp", tmp); - ENV_SET("APPDATA", NULL, config); - ENV_SET("LOCALAPPDATA", NULL, cache); +# define ENV_SET(_env, _meta) \ + char _meta[PATH_MAX + 128]; \ + if (_env) { \ + s = getenv(_env); \ + if (!s) s = home; \ + } else s = home; \ + FATAL_SNPRINTF(_meta, "vpath string '%s' truncated - fatal", "%s\\", s); \ + (&user)->_meta = _meta; + + ENV_DIR_SET(NULL, "Desktop", desktop); + ENV_DIR_SET(NULL, "Documents", documents); + ENV_DIR_SET(NULL, "Downloads", downloads); + ENV_DIR_SET(NULL, "Music", music); + ENV_DIR_SET(NULL, "Pictures", pictures); + ENV_SET("PUBLIC", pub); + ENV_DIR_SET("APPDATA", "Microsoft\\Windows\\Templates", templates); + ENV_DIR_SET(NULL, "Videos", videos); + ENV_SET("LOCALAPPDATA", data); + ENV_DIR_SET("LOCALAPPDATA", "Temp", tmp); + ENV_SET("APPDATA", config); + ENV_SET("LOCALAPPDATA", cache); if (!(s = getenv("APPDATA"))) user.run = NULL; else From 09a4731813cf643bb6ef81ae18888d437867e001 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 29 Apr 2019 11:11:10 +0200 Subject: [PATCH 21/25] efl_canvas_animation: reply on the correct API the animation itself does not implement the player interface, and nothing forces it to do so. Additionally, we should ask the reference object for the current progress. Not the animation object. This fixes pos_set / pos_get. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D8783 --- src/lib/evas/canvas/efl_canvas_animation_player.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c index 063f932d49..42fb2c4127 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.c +++ b/src/lib/evas/canvas/efl_canvas_animation_player.c @@ -286,9 +286,9 @@ _efl_canvas_animation_player_efl_player_pos_get(const Eo *eo_obj, { //TODO: this is not correct Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj); - double length = efl_player_length_get(anim); + double length = efl_animation_duration_get(anim); - return length * efl_player_progress_get(anim); + return length * efl_player_progress_get(eo_obj); } EOLIAN static void @@ -301,7 +301,7 @@ _efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj, return; EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); - double length = efl_player_length_get(anim); + double length = efl_animation_duration_get(anim); pd->progress = sec / length; efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); } From fe56c04b591fdafb92b26673dd20db6324e78990 Mon Sep 17 00:00:00 2001 From: "Myoungwoon Roy, Kim" Date: Mon, 13 May 2019 13:06:54 +0900 Subject: [PATCH 22/25] docs: Fix a wrong ingroup name of textpath. Summary: This patch fixes the wrong ingroup name of elm_textpath APIs. Elm_Textpath had been defined in elm_textpath.h enum values had been included into Efl_Ui group So I had modified all APIs and enum values to be inclused in Elm_Textpath_Group. Test Plan: run unit test cases Reviewers: segfaultxavi, cedric, zmike, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8885 --- src/lib/elementary/efl_ui_textpath_eo.legacy.h | 2 +- src/lib/elementary/elm_textpath.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_textpath_eo.legacy.h b/src/lib/elementary/efl_ui_textpath_eo.legacy.h index 47660c5f59..dad8d9e120 100644 --- a/src/lib/elementary/efl_ui_textpath_eo.legacy.h +++ b/src/lib/elementary/efl_ui_textpath_eo.legacy.h @@ -13,7 +13,7 @@ typedef Eo Efl_Ui_Textpath; /** Textpath direction * - * @ingroup Efl_Ui + * @ingroup Elm_Textpath_Group */ typedef enum { diff --git a/src/lib/elementary/elm_textpath.h b/src/lib/elementary/elm_textpath.h index 064c865bf3..29506b8cbb 100644 --- a/src/lib/elementary/elm_textpath.h +++ b/src/lib/elementary/elm_textpath.h @@ -1,5 +1,5 @@ /** - * @defgroup Elm_Textpath Textpath + * @defgroup Elm_Textpath_Group Textpath * @ingroup Elementary */ From 4e6539725e59fce99a861566219c5b23d4f5868a Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Mon, 13 May 2019 13:09:24 +0900 Subject: [PATCH 23/25] Efl.Ui.Textpath: enhance to support legacy API Summary: The legacy API is available after https://phab.enlightenment.org/D7033 but internal function does not care of it. This change makes textpath work with the legacy style file(./data/elementary/themes/edc/elm/textpath.edc). Reviewers: Hermet, jsuya Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8875 --- src/lib/elementary/efl_ui_textpath.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 2e4eff536f..593339c059 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -528,7 +528,7 @@ _textpath_ellipsis_set(Efl_Ui_Textpath_Data *pd, Eina_Bool enabled) } static void -_ellipsis_set(Efl_Ui_Textpath_Data *pd) +_ellipsis_set(Efl_Ui_Textpath_Data *pd, Eo *obj) { if (!pd->text_obj) return; @@ -536,7 +536,11 @@ _ellipsis_set(Efl_Ui_Textpath_Data *pd) Eina_Bool is_ellipsis = EINA_FALSE; const Evas_Object *tb; - tb = edje_object_part_object_get(pd->text_obj, "efl.text"); + if (elm_widget_is_legacy(obj)) + tb = edje_object_part_object_get(pd->text_obj, "elm.text"); + else + tb = edje_object_part_object_get(pd->text_obj, "efl.text"); + evas_object_textblock_size_native_get(tb, &w, &h); evas_object_size_hint_min_set(pd->text_obj, w, h); if (pd->ellipsis) @@ -566,7 +570,7 @@ _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); + _ellipsis_set(pd, obj); _sizing_eval(pd); return ret; @@ -663,7 +667,7 @@ _efl_ui_textpath_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textpath_Data *pd) elm_widget_theme_object_set(obj, pd->text_obj, "textpath", "base", elm_widget_style_get(obj)); - _ellipsis_set(pd); + _ellipsis_set(pd, obj); return ret; } @@ -728,12 +732,12 @@ _efl_ui_textpath_slice_number_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, } EOLIAN static void -_efl_ui_textpath_ellipsis_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, Eina_Bool ellipsis) +_efl_ui_textpath_ellipsis_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool ellipsis) { if (pd->ellipsis == ellipsis) return; pd->ellipsis = ellipsis; - _ellipsis_set(pd); + _ellipsis_set(pd, obj); _sizing_eval(pd); } From ecce35c555be583c1a6447cca4a310eb1c1a9871 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Fri, 10 May 2019 19:29:34 +0900 Subject: [PATCH 24/25] efl_mono: move libeflcustomexportsmono.so to lib with versions by meson meson generates libeflcustomexportsmono.so to lib/efl-mono-1/ directory unlike other so files. Moreover, the so file does not have versions in the file name unlike other so files. Like other so files, libeflcustomexportsmono.so is moved to lib directory with versions in the file name. --- src/bindings/mono/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index e7c5e00d9a..c17956736f 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -94,8 +94,8 @@ blacklisted_files = [ efl_mono_lib = library('eflcustomexportsmono', join_paths('..', '..', 'lib', 'efl_mono', 'efl_custom_exports_mono.c'), install : true, - install_dir : join_paths(dir_lib, 'efl-mono-'+version_major), - dependencies : [eo, eina, ecore] + dependencies : [eo, eina, ecore], + version : meson.project_version() ) beta_option = [] From 9d28d91626fd3704c5f9b046c7c18a49e8ac4888 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Fri, 10 May 2019 19:36:17 +0900 Subject: [PATCH 25/25] efl_mono: generate efl_canvas_vg_object.eo.cs by meson This commit is the same as 0e8f289d7dfb4c5877559917a57a3ac08545fb86 but this commit is for meson. To use vector graphics in efl csharp bindings, it is permitted to generate efl_canvas_vg_object.eo.cs. Other efl_canvas_vg .eo.cs files have already been generated because the file names were changed from efl_vg to efl_canvas_vg. --- src/bindings/mono/meson.build | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index c17956736f..c55a8f4e37 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -53,14 +53,6 @@ blacklisted_files = [ 'evas_canvas3d_primitive.eo', 'evas_canvas3d_scene.eo', 'evas_canvas3d_texture.eo', - 'efl_canvas_vg_object.eo', - 'efl_vg.eo', - 'efl_vg_container.eo', - 'efl_vg_gradient.eo', - 'efl_vg_gradient_radial.eo', - 'efl_vg_gradient_linear.eo', - 'efl_vg_root_node.eo', - 'efl_vg_shape.eo.cs', 'efl_io_buffer.eo', 'efl_io_queue.eo', 'efl_io_sizer.eo',