Page MenuHomePhabricator

Efl.Text.Style interface
Closed, ResolvedPublic

Description

This interface will cover the style settings of a text object.
Efl.Canvas.Text will implement it.

// src/lib/efl/interfaces/efl_text_style.eo

enum Efl.Text.Style.Style_Type
{
   none = 0,

   // colored with shadow_color
   shadow,
   far_shadow,
   soft_shadow,
   far_soft_shadow,
   // colored with glow_color
   glow,
   // colored with outline_color
   outline,
   soft_outline,
   // colored with outline_color + shadow_color
   outline_shadow,
   outline_soft_shadow,
}

enum Efl.Text.Style.Shadow_Direction
{
   bottom_right,
   bottom,
   bottom_left,
   left,
   top_left,
   top,
   top_right,
   right,
}

enum Efl.Text.Style.Underline_Type
{
   off = 0,
   on,
   single,
   double,
   dashed,
}

@property normal_color
{
   [[Color of text, excluding style]]
   values
   {
      r: ubyte;
      g: ubyte;
      b: ubyte;
      a: ubyte;
   }
}

@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 normal 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 outline_color
{
   values
   {
      r: ubyte;
      g: ubyte;
      b: ubyte;
      a: ubyte;
   }
}

@property shadow_direction
{
   [[Direction of shadow style]]
   values
   {
      type: Efl.Text.Style.Shadow_Direction;
   }
}

@property shadow_color
{
   values
   {
      r: ubyte;
      g: ubyte;
      b: ubyte;
      a: ubyte;
   }
}

@property glow_color
{
   values
   {
      r: ubyte;
      g: ubyte;
      b: ubyte;
      a: ubyte;
   }
}

@property glow2_color
{
   values
   {
      r: ubyte;
      g: ubyte;
      b: ubyte;
      a: ubyte;
   }
}

@property strikethrough_color
{
   values
   {
      r: ubyte;
      g: ubyte;
      b: ubyte;
      a: ubyte;
   }
}
cedric triaged this task as High priority.Jul 10 2017, 2:21 PM
zmike added a project: efl.Aug 22 2017, 3:37 PM
jpeg assigned this task to herdsman.Oct 10 2017, 2:43 AM
bu5hm4n added a project: Restricted Project.Jun 11 2018, 2:50 AM
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:54 AM
bu5hm4n edited projects, added efl: layout engine; removed Restricted Project.Jun 11 2018, 9:26 AM
herdsman closed this task as Resolved.Mon, Dec 24, 10:36 PM

Not discussion was made here, it seems. This was implemented.