Page MenuHomePhabricator

enum Efl.Ui.Scrollbar_Direction
Open, TODOPublic

Description

enum @beta Efl.Ui.Scrollbar_Direction
{
   horizontal = 0,
   vertical,
   last
}
segfaultxavi triaged this task as TODO priority.

@eagleeye
Let's take a look at this together.

Currently, I cannot find any problem in this definition.

Shouldn't all users of this class use Efl.Ui.Layout_Orientation instead?
For example, Efl.Ui.Scrollbar should implement the Efl.Ui.Layout_Orientable interface instead of defining its own enum with the same values.

@eagleeye

Could you check the idea of @segfaultxavi ?

If there would be no matter with axit_bitmask and inverted in Efl.Ui.Layout_Orientation -
I also think it's good idea.

Scrollbars can just ignore the inverted flag. We will document it. I think users will understand :)

If Efl.Ui.Scrollbar implements Efl.Ui.Layout_Orientable, it makes conflict on efl_ui_image_zoomable.eo.
Because efl_ui_image_zoomable.eo implements Efl.Gfx.Image_Orientable also, there are two orientation method with same name.
Do you have some ideas of avoiding conflict?

eagleeye moved this task from Backlog to Evaluating on the efl: api board.Wed, Jun 26, 11:08 PM

Hmmmm... you are correct. We had not found any such case before.

I guess the only solution is to rename the conflicting properties to image_orientation and layout_orientation.
The C method names should not change (because of the repeated word) and the C# names will be clearer (object.ImageOrientation).

Do you want to provide a patch, @eagleeye?