Page MenuHomePhabricator

Make sure we are happy with names and locations of files/interfaces/functions
Open, Incoming QueuePublic


This task should be the place for the final discussion and bike-shedding on names, locations and etc.

A few topics that warrant special attention:

Cursor geometry function

It currently accepts a key parameter that toggles the behaviour between two modes. I kept it this way because this is how it was, though I wonder if it makes more sense to just split it to two functions. cursor_behind_geometry_get and cursor_vertical_geometry_get. The names are bad, but just an idea to get your juices going.

Rename attributes to annotations

I called them attributes because we talked about it elsewhere and that's what people liked. Though things have changed a bit (the design of the interface) and it's really just about annotating the text now (by applying attributes). I'd suggest renaming it back to annotations.


We can't use the Efl.Text namespace because eolian blocks it (it doesn't need to, but this is an argument for another day), so it definitely needs to be moved. In addition, I don't think I like the name, so that needs to change too.

Make sure we are happy with the C function names (c_prefix)

As the title says, just need to make sure we set c_prefix where appropriate.

Efl2.Input.Text is still very raw and needs work.

Discussed separately in T8298

Efl2.Text.Content.Plain should be merged into Efl.Text

Unfortunately Efl.Text is already "stable" so it's something I can't change. So Efl2.Text.Content.Plain should be merged into that (just adds a few properties).

Efl2.Text.Content.Markup needs to be renamed.

Because of the former point, Efl2.Text.Content.Markup is now inconsistently named. It should be renamed to something else, maybe Efl.Text_Markup?

Efl2.Ui.Text has some naming related questions

As the title says, open this file and check the comments/FIXMEs.

Anyhow, the point of this ticket is to make sure people are happy with what's there. Especially from a consistency-with-the-rest-of-the-EFL perspective.

tasn created this task.Oct 12 2019, 7:26 AM
tasn updated the task description. (Show Details)Oct 12 2019, 7:40 AM
zmike moved this task from Backlog to Evaluating on the efl: api board.Oct 14 2019, 5:55 AM

Some thoughts on the subject:

Cursor geometry function

There's a comment saying that "split cursors" only work in "before" mode (if I'm reading it correctly). Therefore I think separate functions make more sense.
There's also the topic of getters and setters returning values. This is slightly inconvenient for some bound languages (like C#). I would prefer that geometry just set the unused parameters to -1 (for example) instead of returning a boolean.


If I got this right, this class sits between Efl.Canvas.Text (non-interactive) and Efl.Ui.Text (fully-fledged interactive text editor).
This class provides some of the functionalities needed for editing text (like cursors and selection), but it still isn't a widget, so maybe it should reside in Efl.Canvas.
How about we name it Efl.Canvas.Text_Interactive? We have already used the "interactive" keyword in other places (like ranges) so it fits with the current API.

Make sure we are happy with the C function names (c_prefix)

Just a cautionary note here. Use of c_prefix makes the C API deviate from bound languages so I'd keep it to a minimum.

Efl2.Text.Content.Markup needs to be renamed

"Markup" already means "Text", so maybe we can just call it Efl.Markup?

Efl2.Ui.Text has some naming related questions

  • Efl2.Ui.Selection_Type: Indeed we need a group name for dnd and cnp operations to stop confusing them with text selection. Not only here but throughout all EFL. Something related to clipboard maybe?
  • valign: I prefer more explicit names like vertical_alignment.
  • selection_handler_disabled: I cannot propose other names since the purpose of the function is unclear from its documentation.
ali.alzyod moved this task from Evaluating to Backlog on the efl: api board.Mon, Feb 10, 3:12 AM