Page MenuHomePhabricator

efl.canvas.scene
Open, TODOPublic

Description

|interface Efl.Canvas.Scene
|├ (P) image_max_size
|├ (P) smart_objects_calculating
|├ (P) device
|├ (P) seat
|├ (P) pointer_position
|├ (M) smart_objects_calculate
|├ (M) objects_at_xy_get
|├ (M) object_top_at_xy_get
|├ (M) objects_in_rectangle_get
|├ (M) object_top_in_rectangle_get
|├ (M) seats
|├ (M) pointer_iterate @beta
|├ (E) focus,in
|├ (E) focus,out
|├ (E) object,focus,in
|├ (E) object,focus,out
|├ (E) render,pre
|├ (E) render,post
|├ (E) device,changed
|├ (E) device,added
|├ (E) device,removed
zmike created this task.Jan 8 2019, 11:51 AM
zmike triaged this task as TODO priority.
zmike updated the task description. (Show Details)Jan 9 2019, 6:06 AM
zmike added a comment.Wed, Feb 13, 8:49 AM

I think device,changed is slightly ambiguously named given that there are also added and removed events; for example, if I hook changed then is that triggered with the other two?

Why is image_max_size here? That feels totally out of place.

Seat, device and device ID are utterly confusing to me. The docs in that file are not very helpful.
Therefore I do not know what to say, I cannot contribute here. Other than "The docs need serious rewrite."

zmike added a comment.Thu, Feb 14, 5:48 AM

seat is a widely used term meaning "group of devices", where a device is the representation of a physical input device. Not sure what you mean by "device ID"; sometimes an int is associated with a device/seat based on arbitrary ordering in the display backend.

Mostly these terms are taken from Wayland concepts and implemented for Wayland compatibility.

OK, I'm not familiar with Wayland (or X).
Still, this class looks like a bunch of unrelated things thrown together, I can see no clear purpose for it. It does not help that the class docs are:

[[Common interface for window and some internal classes in EFL.]]

It's not even consistent within itself, since seat is a read-only property, but seats is a method returning an iterator of seats.
Plus, it's got a couple of FIXMEs... overall, not a good vibe.

zmike added a comment.Thu, Feb 14, 7:38 AM

Yeah, I think a lot of this was slapped together a bit hastily.

The lack of docs seems to be the main issue here. I am not very convinced of exposing smart_objects_calculating and smart_objects_calculate, but the rest seems to be properly related to a canvas scene.

Now, how to address the lack of documentation. @zmike would you have some time looking at it? This would likely help stabilize this class.

zmike added a comment.Thu, Feb 14, 9:38 AM

The lack of docs seems to be the main issue here. I am not very convinced of exposing smart_objects_calculating and smart_objects_calculate, but the rest seems to be properly related to a canvas scene.

smart_objects_calculating was specifically added in order to work around an infinite loop when recalc needs to be triggered but some determination needs to be made based on whether the current calculation is occurring during smart calc: https://git.enlightenment.org/core/enlightenment.git/tree/src/bin/e_gadget.c#n674

Now, how to address the lack of documentation. @zmike would you have some time looking at it? This would likely help stabilize this class.

Yea I'll take a run at it today.

In T7584#131315, @zmike wrote:

The lack of docs seems to be the main issue here. I am not very convinced of exposing smart_objects_calculating and smart_objects_calculate, but the rest seems to be properly related to a canvas scene.

smart_objects_calculating was specifically added in order to work around an infinite loop when recalc needs to be triggered but some determination needs to be made based on whether the current calculation is occurring during smart calc: https://git.enlightenment.org/core/enlightenment.git/tree/src/bin/e_gadget.c#n674

Ah, indeed. Hum, we need to rename it as in the new API smart object are now Efl.Canvas.Group. So what about naming them : group_objects_calculating and group_objects_calculate ?

zmike added a comment.Thu, Feb 14, 9:53 AM

Seems fine.

seats method is not implemented by anything at present btw.