Page MenuHomePhabricator

Split raw_editable and canvas_text to interfaces so they can be used as composite objects
Open, Incoming QueuePublic

Description

Due to the regressions in T8184 and following discussions on the ML, we unfortunately need to split out both of these classes into interfaces so they can be used as composite objects.

This means that for each class all of their methods, events and properties needs to be moved to an interface, and that interface should also inherit all of the interfaces that need to be exposed in Ui.Text. I know it's confusing, so here's an example:

class @beta Efl2.Canvas.Text extends Efl.Canvas.Object implements Efl2.Text.Content.Markup,
                       Efl.Canvas.Filter.Internal, Efl2.Text.Wrap.Properties, Efl.Ui.I18n
{
   [[Efl canvas text class]]
   methods {
      @property vertical_align {
         [[Vertical alignment of text]]
         set {}
         get {}
         values {
            value: double; [[Vertical alignment value]]
         }
      }
      ...
  }
  ...
}

We want users of Efl.Ui.Text to be able to set the markup, and Wrap properties (not sure about the rest, maybe those too, but just for example), so we would need to create a new interface:

// Name is bad, ignore it
interface @beta Efl2.Canvas.Text_Interface extends Efl2.Text.Content.Markup,
                        Efl2.Text.Wrap.Properties]
{
   [[Efl canvas text interface]]
   methods {
      @property vertical_align {
         [[Vertical alignment of text]]
         set {}
         get {}
         values {
            value: double; [[Vertical alignment value]]
         }
      }
      ...
  }
  ...
}

// Now for the class itself:
class @beta Efl2.Canvas.Text extends Efl.Canvas.Object implements Efl2.Canvas.Text_Interface,
                       Efl.Canvas.Filter.Internal, Efl.Ui.I18n
{
   [[Efl canvas text class]]
  ...
}

This is needed because this interface will now be exposed by Efl.Ui.Text, so all of the functions we need exposed will have to be there.

tasn created this task.Oct 11 2019, 12:39 AM
zmike moved this task from Backlog to Evaluating on the efl: api board.Oct 14 2019, 5:56 AM
ali.alzyod moved this task from Evaluating to Backlog on the efl: api board.Mon, Feb 10, 3:12 AM