From 6f97eeee3fd396cc4b162829fe1c81b98817d7b6 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 9 Mar 2019 16:36:21 +0100 Subject: [PATCH] efl: ensure legacy is only relying on stable types Summary: This commit changes the beta ness of a few types, those types are looking quite stable. Edje types will likely not change. The Efl.Gfx.Join types are actaully already stable since the last release, since evas_vg was stable back then and those enums have been in there. The elementary stuff looks a bit unthought, and we have the chance to change the API in the backend, so maybe we want to not declare it stable, but rather reintroduce the legacy types. With this we can enable eolian generation of beta tags for types. ref T7726 Depends on D8276 Reviewers: cedric, segfaultxavi, zmike, stefan_schmidt, q66 Reviewed By: segfaultxavi, q66 Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7726 Differential Revision: https://phab.enlightenment.org/D8277 --- src/bin/eolian/types.c | 3 -- src/lib/edje/edje_types.eot | 2 +- src/lib/efl/interfaces/efl_gfx_types.eot | 12 +++---- src/lib/efl/interfaces/efl_input_types.eot | 4 +-- src/lib/elementary/efl_ui_text.c | 2 +- src/lib/elementary/elm_cnp.h | 58 +++++++++++++++++------------- 6 files changed, 43 insertions(+), 38 deletions(-) diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c index d9a9bc2..c2a2ea6 100644 --- a/src/bin/eolian/types.c +++ b/src/bin/eolian/types.c @@ -157,14 +157,11 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp, break; } eina_strbuf_append_char(buf, ';'); -#if 0 - /* can't enable this yet, as this would trigger brokenness in our tree */ if (eolian_typedecl_is_beta(tp)) { eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */"); } -#endif return buf; } diff --git a/src/lib/edje/edje_types.eot b/src/lib/edje/edje_types.eot index 87a5cc3..bd58feb 100644 --- a/src/lib/edje/edje_types.eot +++ b/src/lib/edje/edje_types.eot @@ -1,4 +1,4 @@ -enum @beta Efl.Canvas.Layout_Part_Type +enum Efl.Canvas.Layout_Part_Type { [[Type of a part in an Efl.Canvas.Layout object (edje object).]] none = 0, [[None type value, indicates invalid parts.]] diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot index 456d22a..390d7a2 100644 --- a/src/lib/efl/interfaces/efl_gfx_types.eot +++ b/src/lib/efl/interfaces/efl_gfx_types.eot @@ -31,7 +31,7 @@ enum Efl.Gfx.Render_Op { last [[Sentinel value to indicate last enum field during iteration]] } -enum @beta Efl.Gfx.Path_Command_Type { +enum Efl.Gfx.Path_Command_Type { [[These values determine how the points are interpreted in a stream of points. @since 1.14 ]] @@ -43,7 +43,7 @@ enum @beta Efl.Gfx.Path_Command_Type { last [[Sentinel value to indicate last enum field during iteration]] } -enum @beta Efl.Gfx.Cap { +enum Efl.Gfx.Cap { [[These values determine how the end of opened sub-paths are rendered in a stroke. @Efl.Gfx.Shape.stroke_cap.set @@ -55,7 +55,7 @@ enum @beta Efl.Gfx.Cap { last [[Sentinel value to indicate last enum field during iteration]] } -enum @beta Efl.Gfx.Join +enum Efl.Gfx.Join { [[These values determine how two joining lines are rendered in a stroker. @Efl.Gfx.Shape.stroke_join.set @@ -67,7 +67,7 @@ enum @beta Efl.Gfx.Join last [[Sentinel value to indicate last enum field during iteration]] } -enum @beta Efl.Gfx.Gradient_Spread +enum Efl.Gfx.Gradient_Spread { [[Specifies how the area outside the gradient area should be filled. @Efl.Gfx.Gradient.spread.set @@ -88,7 +88,7 @@ enum @beta Efl.Gfx.Fill_Rule odd_even = 1, [[Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape.]] } -struct @beta Efl.Gfx.Dash { +struct Efl.Gfx.Dash { [[Type describing dash. @Efl.Gfx.Shape.stroke_dash.set @since 1.14 @@ -97,7 +97,7 @@ struct @beta Efl.Gfx.Dash { gap: double; [[Distance between two dashes.]] } -struct @beta Efl.Gfx.Gradient_Stop +struct Efl.Gfx.Gradient_Stop { [[Type defining gradient stops. Describes the location and color of a transition point in a gradient. diff --git a/src/lib/efl/interfaces/efl_input_types.eot b/src/lib/efl/interfaces/efl_input_types.eot index eb5f8ed..bad3eb3 100644 --- a/src/lib/efl/interfaces/efl_input_types.eot +++ b/src/lib/efl/interfaces/efl_input_types.eot @@ -29,7 +29,7 @@ enum @beta Efl.Pointer.Flags triple_click = (1 << 1), [[This mouse button press was the 3rd press of a triple click]] } -enum @beta Efl.Input.Flags +enum Efl.Input.Flags { [[Special flags set during an input event propagation. @@ -48,7 +48,7 @@ enum @beta Efl.Input.Flags actually perform anything.]] } -enum @beta Efl.Input.Object_Pointer_Mode { +enum Efl.Input.Object_Pointer_Mode { [[How the mouse pointer should be handled by EFL. In the mode $autograb, when a mouse button is pressed down over an diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 56533f7..f5a2dde 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -1120,7 +1120,7 @@ _hoversel_item_paste_cb(void *data, } static void -_selection_clear(void *data, Elm_Sel_Type selection) +_selection_clear(void *data, Efl_Ui_Selection_Type selection) { EFL_UI_TEXT_DATA_GET(data, sd); diff --git a/src/lib/elementary/elm_cnp.h b/src/lib/elementary/elm_cnp.h index 12fd39a..5feda3a 100644 --- a/src/lib/elementary/elm_cnp.h +++ b/src/lib/elementary/elm_cnp.h @@ -57,41 +57,49 @@ EAPI extern int ELM_CNP_EVENT_SELECTION_CHANGED; * @see http://www.x.org/docs/X11/xlib.pdf * for more details. */ -typedef Efl_Ui_Selection_Type Elm_Sel_Type; -#define ELM_SEL_TYPE_PRIMARY EFL_UI_SELECTION_TYPE_PRIMARY -#define ELM_SEL_TYPE_SECONDARY EFL_UI_SELECTION_TYPE_SECONDARY -#define ELM_SEL_TYPE_XDND EFL_UI_SELECTION_TYPE_DND -#define ELM_SEL_TYPE_CLIPBOARD EFL_UI_SELECTION_TYPE_CLIPBOARD +typedef enum +{ + ELM_SEL_TYPE_PRIMARY = 0, /**< Primary text selection (highlighted or + * selected text) */ + ELM_SEL_TYPE_SECONDARY, /**< Used when primary selection is in use */ + ELM_SEL_TYPE_XDND, /**< Drag and Drop */ + ELM_SEL_TYPE_CLIPBOARD /**< Clipboard selection (ctrl+C) */ +} Elm_Sel_Type; /** * Defines the types of content. */ -typedef Efl_Ui_Selection_Format Elm_Sel_Format; - -#define ELM_SEL_FORMAT_TARGETS EFL_UI_SELECTION_FORMAT_TARGETS -#define ELM_SEL_FORMAT_NONE EFL_UI_SELECTION_FORMAT_NONE -#define ELM_SEL_FORMAT_TEXT EFL_UI_SELECTION_FORMAT_TEXT -#define ELM_SEL_FORMAT_MARKUP EFL_UI_SELECTION_FORMAT_MARKUP -#define ELM_SEL_FORMAT_IMAGE EFL_UI_SELECTION_FORMAT_IMAGE -#define ELM_SEL_FORMAT_VCARD EFL_UI_SELECTION_FORMAT_VCARD -#define ELM_SEL_FORMAT_HTML EFL_UI_SELECTION_FORMAT_HTML +typedef enum +{ + ELM_SEL_FORMAT_TARGETS = -1 /* +1 */, /**< For matching every + * possible atom */ + ELM_SEL_FORMAT_NONE = 0, /**< Content is from outside of Elementary + */ + ELM_SEL_FORMAT_TEXT = 1, /**< Plain unformatted text: Used for things + * that don't want rich markup */ + ELM_SEL_FORMAT_MARKUP = 2, /**< Edje textblock markup, including + * inline images */ + ELM_SEL_FORMAT_IMAGE = 4, /**< Images */ + ELM_SEL_FORMAT_VCARD = 8, /**< Vcards */ + ELM_SEL_FORMAT_HTML = 16 /**< Raw HTML-like data (eg. webkit) */ +} Elm_Sel_Format; /** * Defines the kind of action associated with the drop data if for XDND * @since 1.8 */ -typedef Efl_Ui_Selection_Action Elm_Xdnd_Action; - -#define ELM_XDND_ACTION_UNKNOWN EFL_UI_SELECTION_ACTION_UNKNOWN -#define ELM_XDND_ACTION_COPY EFL_UI_SELECTION_ACTION_COPY -#define ELM_XDND_ACTION_MOVE EFL_UI_SELECTION_ACTION_MOVE -#define ELM_XDND_ACTION_PRIVATE EFL_UI_SELECTION_ACTION_PRIVATE -#define ELM_XDND_ACTION_ASK EFL_UI_SELECTION_ACTION_ASK -#define ELM_XDND_ACTION_LIST EFL_UI_SELECTION_ACTION_LIST -#define ELM_XDND_ACTION_LINK EFL_UI_SELECTION_ACTION_LINK -#define ELM_XDND_ACTION_DESCRIPTION EFL_UI_SELECTION_ACTION_DESCRIPTION - +typedef enum +{ + ELM_XDND_ACTION_UNKNOWN = 0, /**< Action type is unknown */ + ELM_XDND_ACTION_COPY, /**< Copy the data */ + ELM_XDND_ACTION_MOVE, /**< Move the data */ + ELM_XDND_ACTION_PRIVATE, /**< Private action type */ + ELM_XDND_ACTION_ASK, /**< Ask the user what to do */ + ELM_XDND_ACTION_LIST, /**< List the data */ + ELM_XDND_ACTION_LINK, /**< Link the data */ + ELM_XDND_ACTION_DESCRIPTION /**< Describe the data */ +} Elm_Xdnd_Action; /** * Structure holding the info about selected data. */ -- 2.7.4