Page MenuHomePhabricator

Open, Incoming QueuePublic


struct @beta Efl.Text_Range {

[[This structure includes text position range (from/to).
start: int; [[The start postion.]]
end: int; [[The end position.]]


ali.alzyod moved this task from Backlog to Evaluating on the efl: api board.

If we have other range structure to replace this one, it is ok too


I don't think Efl.UI.RangeDisplay is not proper for this case.
Do you have another recommendation ?
Or, just keeping current definition would be better ?

I like having generic data type for range (two int value), which can be used in other places.

Yeah, Efl.Ui.Range_Display is totally unrelated, and I don't think we have any other class that serves this purpose.

Therefore, I am OK with keeping this class (even though the docs could be improved, as usual).

ali.alzyod added a comment.EditedTue, Jan 14, 3:30 AM

@segfaultxavi Do you like make this structure more generic like Efl.Int_Range, where it can be used by other types other than text, or make it more precise is a better idea ?

@cedric there was some plan for a range because of MVVM, this looks simular, does that match ?

If we turn this into a generic int range struct, its proper place would probably be Eina.
I also want to hear @cedric's opinion since he knows more Eina.

Hum, it seems we are getting to a logical point where indeed range is a useful structure to add to Eina.

I am unlikely to have the time to take care of that, but I should be able to review the patch in the next 2 weeks.

In this case, I'm OK with moving this to Eina.Int_Range.

And then, we will need to review the whole EFL API and replace all ranges with this new class (where it makes sense).