On 29 May 2017 at 05:18, Davide Andreoli <d...@gurumeditation.it> wrote:

> 2017-05-28 15:00 GMT+02:00 Daniel Hirt <hirt.da...@gmail.com>:
> > herdsman pushed a commit to branch master.
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=
> da2ef30f2b4d53aa3c1658b83c8c8381743469a0
> >
> > commit da2ef30f2b4d53aa3c1658b83c8c8381743469a0
> > Author: Daniel Hirt <hirt.da...@gmail.com>
> > Date:   Mon May 22 17:36:41 2017 +0300
> >
> >     Efl text: add Font, Format and Style interfaces
> >
> >     The following text interfaces are added:
> >       - Efl.Text.Font: font settings that decide which font to display in
> >     the text
> >       - Efl.Text.Format: formatting that affects the looks and layout of
> >     the text
> >       - Efl.Text.Style: decorations and overlays that shouldn't affect
> the
> >     font choice or the layout
> >
> >     @feature
>
> I think we have another namespacing issue here:
> Efl.Text.Style do not use any namespace, while Efl.Text.Font and Format do,
>
> We discussed this already in chat today and we did not find a successfull
> deal,
> what I think at this point is that we really should find a rule to
> apply to every Iface,
> ...the problem is that we did not find any always-correct rule :(
>

In short, as I didn't follow that conversation, what were the arguments
against namespacing "style"?

I also wonder if having 9 color functions is really better than a single
color function and an enum: color1, color2, color3, shadow, underline,
etc...?

Also, what objects will implement the below interfaces? I expect
Efl.Canvas.Text for the default style, and some kind of text item object?

ideas?
>
>
> PS: I stripped down the commit below to only show the new eo interfaces,
> so that
> the issue is more evident
>
>
>
> > +interface Efl.Text.Font {
> > +   [[Font settings of the text
> > +
> > +     @since 1.20
> > +   ]]
> > +   methods {
> > +      @property font {
> > +         [[The font name and size that is used for the displayed text]]
> > +         values {
> > +            font: string;
> > +            size: int;
> > +         }
> > +      }
> > +      @property font_source {
> > +         [[The source that will be used to lookup the font of the text
> > +
> > +           The source can be either a path to a font file e.g.
> > +           "/path/to/font.ttf", or an eet file e.g. "/path/to/font.eet".
> > +         ]]
> > +         values {
> > +            font_source: string;
> > +         }
> > +      }
> > +
> > +      @property font_fallbacks {
> > +         [[Comma-separated list of font fallbacks
> > +
> > +           Will be used in case the primary font isn't available.
> > +         ]]
> > +         values {
> > +            font_fallbacks: string;
> > +         }
> > +      }
> > +
> > +      @property font_weight {
> > +         [[Type of weight of the displayed font
> > +
> > +           Default is $Efl.Text.Font.Weight.normal\.
> > +         ]]
> > +         values {
> > +            font_weight: Efl.Text.Font.Weight;
> > +         }
> > +      }
> > +
> > +      @property font_slant {
> > +         [[Type of slant of the displayed font
> > +
> > +           Default is $Efl.Text.Font.Slant.normal\.
> > +         ]]
> > +         values {
> > +            style: Efl.Text.Font.Slant;
> > +         }
> > +      }
> > +
> > +      @property font_width {
> > +         [[Type of width of the displayed font
> > +
> > +           Default is $Efl.Text.Font.Width.normal\.
> > +         ]]
> > +         values {
> > +            width: Efl.Text.Font.Width;
> > +         }
> > +      }
> > +
> > +      @property font_lang {
> > +         [[Specific language of the displayed font
> > +
> > +           This is used to lookup fonts suitable to the specified
> language, as
> > +           well as helping the font shaper backend.
> > +           The language $lang can be either a code e.g "en_US",
> > +           "auto" to use the system locale, or "none".
> > +         ]]
> > +         values {
> > +            lang: string;
> > +         }
> > +      }
> > +   }
> > +}
>
>
> > +interface Efl.Text.Format {
> > +   [[The look and layout of the text
> > +
> > +     The text format can affect the geometry of the text object, as
> well as
> > +     how characters are presented.
> > +
> > +     @since 1.20
> > +   ]]
> > +   methods {
> > +      @property format_ellipsis {
> > +         [[Ellipsis value (number from -1.0 to 1.0)]]
> > +         values
> > +         {
> > +            value: double;
> > +         }
> > +      }
> > +
> > +      @property format_wrap {
> > +         [[Wrap mode for use in the text]]
> > +         values {
> > +            wrap: Efl.Text.Format.Wrap;
> > +         }
> > +      }
> > +
> > +      @property format_multiline {
> > +         [[Multiline is enabled or not]]
> > +         values {
> > +            enabled: bool;
> > +         }
> > +      }
> > +
> > +      @property format_halign {
> > +         [[Horizontal alignment of text (number from 0.0 to 1.0)]]
> > +         values
> > +         {
> > +            value: double;
> > +         }
> > +      }
> > +
> > +      @property format_valign {
> > +         [[Vertical alignment of text (number from -1.0 to 1.0)]]
> > +         values
> > +         {
> > +            value: double;
> > +         }
> > +      }
> > +
> > +      @property format_linegap {
> > +         [[Minimal line gap (top and bottom) for each line in the text
> > +
> > +           $value is absolute size.
> > +         ]]
> > +         values
> > +         {
> > +            value: double;
> > +         }
> > +      }
> > +
> > +      @property format_linerelgap {
> > +         [[Relative line gap (top and bottom) for each line in the text
> > +
> > +           The original line gap value is multiplied by $value.
> > +         ]]
> > +         values
> > +         {
> > +            value: double;
> > +         }
> > +      }
> > +
> > +      @property format_tabstops {
> > +         [[Tabstops value]]
> > +         values
> > +         {
> > +            value: int;
> > +         }
> > +      }
> > +
> > +      @property format_password {
> > +         [[Whether text is a password]]
> > +         values
> > +         {
> > +            enabled: bool;
> > +         }
> > +      }
> > +
> > +      @property format_replacement_char {
> > +         [[The character used to replace characters that can not be
> displayed
> > +
> > +           Currently, only used to replace characters if
> @.format_password
> > +           is enabled.
> > +         ]]
> > +         values {
> > +            repch: string;
> > +         }
> > +      }
> > +   }
> > +}
>
>
> > +interface Efl.Text.Style {
> > +   [[Style to apply to the text
> > +
> > +     A style can be coloring, effects, underline, strikethrough etc.
> > +
> > +     @since 1.20
> > +   ]]
> > +   methods {
> > +      @property normal_color {
> > +         [[Color of text, excluding style]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property backing_type {
> > +         values
> > +         {
> > +            type: Efl.Text.Style.Backing_Type;
> > +         }
> > +      }
> > +
> > +      @property backing_color {
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property underline_type {
> > +         [[Sets an underline style on the text]]
> > +         values
> > +         {
> > +            type: Efl.Text.Style.Underline_Type;
> > +         }
> > +      }
> > +
> > +      @property underline_color
> > +      {
> > +         [[Color of normal underline style]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property underline_height
> > +      {
> > +         [[Height of underline style]]
> > +         values
> > +         {
> > +            height: double;
> > +         }
> > +      }
> > +
> > +      @property underline_dashed_color
> > +      {
> > +         [[Color of dashed underline style]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property underline_dashed_width
> > +      {
> > +         [[Width of dashed underline style]]
> > +         values
> > +         {
> > +            width: int;
> > +         }
> > +      }
> > +
> > +      @property underline_dashed_gap
> > +      {
> > +         [[Gap of dashed underline style]]
> > +         values
> > +         {
> > +            gap: int;
> > +         }
> > +      }
> > +
> > +      @property underline2_type
> > +      {
> > +         [[Type of underline2 style]]
> > +         values
> > +         {
> > +            type: Efl.Text.Style.Underline_Type;
> > +         }
> > +      }
> > +
> > +      @property underline2_color
> > +      {
> > +         [[Color of underline2 style]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property strikethrough_type {
> > +         [[Type of strikethrough style]]
> > +         values
> > +         {
> > +            type: Efl.Text.Style.Strikethrough_Type;
> > +         }
> > +      }
> > +
> > +      @property strikethrough_color
> > +      {
> > +         [[Color of strikethrough_style]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property effect_type {
> > +         [[Type of effect used for the displayed text]]
> > +         values {
> > +            type: Efl.Text.Style.Effect_Type;
> > +         }
> > +      }
> > +      @property outline_color
> > +      {
> > +         [[Color of outline effect]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property shadow_direction
> > +      {
> > +         [[Direction of shadow effect]]
> > +         values
> > +         {
> > +            type: Efl.Text.Style.Shadow_Direction;
> > +         }
> > +      }
> > +
> > +      @property shadow_color
> > +      {
> > +         [[Color of shadow effect]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property glow_color
> > +      {
> > +         [[Color of glow effect]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +
> > +      @property glow2_color
> > +      {
> > +         [[Second color of the glow effect]]
> > +         values
> > +         {
> > +            r: ubyte;
> > +            g: ubyte;
> > +            b: ubyte;
> > +            a: ubyte;
> > +         }
> > +      }
> > +   }
> > +}
> >
> > --
> >
> >
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to