This is a very simple proof of concept for using hardware planes for
evas image objects.
Right now only dmabuf objects will be dropped into planes, and they're
considered in the order they're in in the scene graph with no attention
paid to which objects will have the most benefit from being on a plane
at all. There's nothing to prevent your mouse cursor from consuming the
only hardware plane capable of UHD video. :)
This is mostly just to help test the low level functionality in the
engines and ecore_drm2 that enable hardware planes. Smarter plane usage
is coming.
Add functions for assigning hardware planes to evas image objects.
The unfortunate asymmetry of the code is due to plane assignment being
only fully verifiable by doing a test commit through ecore_drm2, so it's
simpler to have the "test" function also do the "assignment", and call
the release on failure to clean up after a failed test.
If an evas object is a wayland dmabuf, uses native surface 5 or higher,
and has a scanout handler set, then it meets the basic requirements for
placing on a hardware plane.
Functions to assign a plane for a native surface, and release a plane
that's been assigned to a native surface.
These are empty for now as they'll need to be overridden in any backend
that can handle planes.
When a native surface ends up on a hardware plane, the caller needs to
know about it so it can prevent the resource from being destroyed while
on scanout (which may cause an implicit page flip and a stall), and
so it knows that the content may have changed usage domains.
This adds stubs for dealing with this - only for wl dmabuf right now, but
it may be useful for other surface types later.
The same fb can be placed in multiple hardware planes, we need to keep
track of the number of planes it's on at any time so we can send events
to a compositor in a later commit.
The plane state struct needs the fb id for drm updates, and the plane
state can be updated even if it's pointed to by a dead plane.
Dead planes need to keep their fb so we can properly handle the fb
lifetime.
The old per output release handler is no longer complicated enough. In
the near future we'll need to be able to tell an engine that its fb has
been placed on scanout via hardware plane, or removed from a hardware
plane.
It's simpler to provide that information as well as release information
through a single callback.
This improves a rare error message when a function is called on an
efl_part() that does not implement it. Example: calling a swallow
function on a non-swallow part.
This isn't entirely fool-proof but should already help quite a bit.
This also changes how the efl_part proxies are stored: the variable
is not reset to NULL every time we use it, instead we check it in
the del intercept.
Note: _part_reuse_error() can not be enabled inside
_internal_proxy_get because there are valid use cases such as:
func1(efl_part(obj, part), func2(efl_part(obj, part), ...), ...)
Here we use two efl_part() at the same time, on the same object,
but we haven't entered "func1" yet when we are reaching the second
call to efl_part(). This is completely valid and there is pretty
much no way to detect this.
I think I will improve this later with a core function on
Efl.Object like "debug_string".
Ref T5584
This focus on the domain and ID bits is very confusing. Let's
keep it at the end of the message, and also try to guess whether
the object may have been deleted or simply doesn't belong to the
current thread.
Forgot to consider the edje object's offset when porting the code
to efl_part (see 98dad1a52b).
This fixes a few bugs, one of which is region_show for the scrollable
mode.
See 4e79dd0f02
That patch was absurd. Do not change the use of a legacy stable
API when you change an EO API. If you need to do that then there
is very clearly a problem in the patch.
This reverts the test case to use the legacy API (which in turn
calls the EO API anyway so both are tested).
Fixes T5587
As we may have both a pointer and touch device on a given system, we
need to accurately set event->device when sending mouse move, wheel,
down, and up events. Previous code here would always try to find a
mouse device first which could potentially end up setting the wrong
event->device (if a touch device also existed).
This patch fixes the issue by comparing the window used for the event
to our focused windows (either mouse or touch) and setting the proper
event->device based on that.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
The patch was created for EFL 1.18. But, it was merged for EFL 1.20.
@fix
Test Plan: N/A
Reviewers: herdsman, jpeg, cedric
Differential Revision: https://phab.enlightenment.org/D4968
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Need to handle this with special care as Efl.Text.Cursor is used in
some functions that are specific to Efl.Canvas.Text, was well as
functions in Efl.Text.Cursor interface.
Value-based alignment (e.g. 0.5, 0.3 etc) isn't very practical.
Horizontal and vertical alignments will be assigned with enums
"left", "center", "right", "auto", "locale", for horizontal alignment,
and "top", "center" and "bottom" for vertical alignment.
This changes the previously added "halign" and "valign" properties.
Summary:
The expand state changed callback has been called when layout property changed and other reason.
Even expand state is not changed.
So we need to check the current view state to call expand changed callback.
(We can't prevent calling the _shrink_mode_set() function. It needs to call the re-arrange internal items.)
Test Plan:
elemenatay_test - multibuttonentry.
Check the shrink, expand state.
Reviewers: jpeg, cedric, woohyun
Reviewed By: jpeg
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4970
Summary:
This completes the documentation for Ecore_Evas for all (non-deprecated)
APIs.
Note that ecore_evas_software_16_ddraw_new, ecore_evas_direct3d_new,
ecore_evas_gl_glew_new, and ecore_evas_sdl16_new are left undocumented
because while they're not declared as deprecated their implementations
are either missing or marked as obsolete or legacy. I suspect a few of
the remaining routines are likely also obsolete but I added
documentation anyway.
Reviewers: cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4972
First steps toward explicit function pointer support in eolian.
To declare a function pointer type, use the following syntax, similar to
a regular eolian method declaration.
function FunctionName {
params {
...
}
return: Return type
}
Summary: Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>
Test Plan: Test with edi.
Reviewers: ajwillia.ms, jpeg, cedric
Reviewed By: ajwillia.ms
Differential Revision: https://phab.enlightenment.org/D4971
this was originally intended to allow some code to be moved out of the
compositor, but the idea turned out to be unfeasible since multiple
display backends need to be supported and not all related components
will provide similar functionality
with async device init, it's possible for mouse in/out/move events to be added
by an application before the pointer devices are created. these are independent
of devices, so store the state and apply when pointer devices are added
fix T5531
This commit reverts support for added API functions inside Ecore_Wl2
to support setting window stacking mode as per IRC discussion with
Cedric
This reverts commit 1359fc9e5f.
Small patch to add API functions which allow getting/setting if a
window is in floating mode
"#divergence"
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to add an API function which can be used to find out if a
given window is set to skip focus events.
"#divergence"
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to add an API function which can be called to set if a
window should skip focus.
"#divergence"
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
There is a mismatch between seat & pointer.
See @zmike's comments in T5515. Having both seat and pointer
devices as different devices leads to these kinds of issues.
Really annoying.
Ref T5515
This enables some insane debugging for input events inside evas.
Also, declutter the code by always providing the "spaces" variable.
Obviously this is not enabled :)
Example, without any running wayland compositor:
ELM_DISPLAY=wl runsomeapp
elm_win runs efl_constructor() during finalize() which is wrong
and leads to this kind of inconsistencies. Urgh.
Test scenario:
elementary_test -to "Window Inline"
Click on an entry, select some text (maybe with the keyboard)
There was a CRI message inside _ecore_evas_interface_get because
ecore_evas_wayland2_window_get() was called on an X11 ecore_evas
(not wayland).
The function was supposed to return NULL here.
This is, unlike what some of the documentation says, a public
API on elm_object. Let's place it along mirrored for consistency,
even if edje object will not implement it.
Ref T5363
Summary:
There are many requests to add a new feature for handling horizontal align
according to current locale. For example, in RTL locale setting,
users want to see right aligned text for every list's item.
Even if some of list's items only contain LTR characters!
It is useful for the needs.
@feature
Test Plan: N/A
Reviewers: herdsman, tasn, woohyun, raster, cedric
Reviewed By: herdsman, raster
Subscribers: z-wony, jpeg
Differential Revision: https://phab.enlightenment.org/D4664
After finalize, the type of an input device can not be changed.
So, deprecate the function and prevent anything from happening
unless we're inside efl_add().
Ref T5515
Summary:
efl_version will be used to figure out which version of EFL lib
is used to develop a edje file.
If there is no property of efl_version, it will be 1.19 as default.
This feature is needed to fix T5548.
Example:
efl_version: 1 20
@feature
Test Plan: N/A
Reviewers: cedric, jpeg, herdsman, zmike, raster
Reviewed By: cedric
Maniphest Tasks: T5548
Differential Revision: https://phab.enlightenment.org/D4961
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Eina_Clist can actually change the pointer in the cell next bypassing
the CoW infrastructure leading to trouble. Considering the case here,
using the optimization of Eina_Clist is not necessary and if performance
issue arise, can be fixed by using a dichotomic search when removing
data. I don't think it is necessary to add this complexity without
a real life case.
This is a safe version of efl_data_scope_get, meaning that it will
return NULL if the object is not of the required type, or if there
is no data for that class, or if the given class was used as an
interface (and isn't a mixin).
@feature
Summary:
Radio, MBE items, color selector items have ELM_ATSPI_ROLE_RADIO_BUTTON role, when one item
is selected the other items are automatically unselected, so a notification has to be sent in atspi mode
to read the status accordingly
Test Plan:
In ATSPI mode when radio, mbe item, color selector item is selected
status has to notified.
Reviewers: kimcinoo, cedric
Subscribers: govi, rajeshps, jpeg
Differential Revision: https://phab.enlightenment.org/D4960
Thanks @zmike for the report.
This in therory should restore behaviour from 1.18,
where the intercept function is called even if the geometry
isn't changed.
Test scenario, in E:
1. remove bryces, shelves on a screen, or mark all as autohide
2. open chromium or any CSD application as unmaximized
3. maximize the window
4. make it fullscreen (eg. with chromium: F11)
See 8a9f0bd603.
Ref T4749
Fixes T5573
@fix
This patch just moves window related functions together in the
Ecore_Wl2_Window_Group
NB: No functional changes
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to fix misleading return value when
ecore_evas_aux_hint_val_set fails. In the above code, we will return
EINA_TRUE already if the aux_hints_set works, so this return value at
the bottom of the function should be EINA_FALSE.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to support using Ecore_Evas_Interface_Wayland in order to
add support for setting auxiliary hints on a surface
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This reverts commit f69686ba40.
this causes major crashes in e every time you move and resize a
window. i cant even debug it properly because i cant move or resize
windows to get terminals up to debug it... this is bad... so until a
fix is found better to go back to working...
Summary:
There are several problem is left on recursize content calc.
previously genlist only calculate size of layout class,
but after recursive content group calculation patch,
layout couldn't get proper size because sizing eval is
not pre-processed.
Test Plan: elementary test working fine.
Reviewers: jpeg, cedric, raster, conr2d
Differential Revision: https://phab.enlightenment.org/D4952
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary: Before the value of stride is calculated, the weight and height of the rotated image should be set.
Test Plan: {F1409510}
Reviewers: jpeg
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4955
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
RETURN_* macro does unref before exiting functions.
Must be called after using PROXY_DATA_GET macro.
@fix
Test Plan:
1. Run terminology
2. Open Setting
3. Check error messages when you change something from Setting.
Reviewers: herdsman, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4956
During a window destruction, the input devices are deleted and
removed from the internal devices list. Since 83d18617b4
basic devices are children of a seat, which means that the seat
deletion was triggering the devices deletion as well. As a
consequence, we were walking an invalid list of devices.
I'm not sure we should have a list of children in the device
data and I'm also not sure we should have a list of devices in
evas, instead of just the list of seats. It's a bit messy right
now.
Ref T5540
1. The word "class" is a pain point with many languages where
it's a keyword. Type is a little better. Also, the property
was already named "device_type" and not "device_class".
2. Remove Efl.Input.Device.Sub_Class
It's not used inside EFL upstream codebase, and unlikely to
be used anywhere else (even in Tizen).
Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.
Ref T5540
Those are now merged with Efl.Object parent, name and comment.
The reasoning is that only seats can be parent devices; And name
and description are not only name clashes but also not extremely
useful anyway.
Tested with VNC.
Fixes T5540
It was always returning true. There is little point in returning
a bool here, an invalid scale value (eg. <= 0) wouuld lead to a
state where scale_get() != scale_set() and that's about it.
This API is used by elementary widgets like:
edje_object_base_scale_get(elm_layout_edje_get(ly));
This means elm_layout in fact should also expose it directly.
Ref T5315
it seems luajit (and lua) broke api again... removed a #define from
their headers from 5.1->5.2 of lua (and seemingly luajit2.1 too). :(
this should fix T2728
@fix
eo_prefix are set to "efl_text".
Also, "Efl.Text.Format" is shortened to now include the "_format"
prefix.
"Efl.Text.Font" keeps the "_font" prefix, for better readability.
This should later be setup through the theme.
One option will be to use global text classes.
Until the above is finalized, at least set this font and size to make
setup of the widget a bit easier.
The following API is now supported with efl_part:
- Efl.Text.text { set; get; }
- Efl.Text.Cursor.cursor { get; }
- Efl.Text.Cursor.cursor_paragraph_first;
- Efl.Text.Cursor.cursor_paragraph_last;
- Efl.Text.Cursor.cursor_position { set; get; }
- Efl.Text.Cursor.cursor_coord_set;
- Efl.Text.Cursor.cursor_line_char_first;
- Efl.Text.Cursor.cursor_line_char_last;
- Efl.Text.Cursor.cursor_char_next;
- Efl.Text.Cursor.cursor_char_prev;
- Efl.Text.Cursor.cursor_line_jump_by;
- Efl.Text.Cursor.cursor_copy;
- Efl.Text.Cursor.cursor_content { get; }
- Efl.Text.Cursor.cursor_geometry { get; }
- Efl.Text.Cursor.cursor_text_insert;
Many of the 'part_text' functionality was moved to legacy, too.
See the edje_object.eo to see which ones are still supported.
You now use the following:
efl_text_set(efl_part(edje_obj, "part"), "text");
const char *text = efl_text_get(efl_part(edje_obj, "part"));
The former method of edje_object_part_text_set/get is now legacy.
Also, adjusted 'tests/emotion/emotion_test_main-eo.c' with
this change.
Originally it was its own object.
There are some valid claims that there is no justification for it to
remain an object.
Furthermore, it's apparent that it added little benefit: changes of
each cursors, in practice, triggered a query for all objects of the
same textblock. There wasn't real advantage to have a finer resolution
of controlling the cursors with their own events.
This ports back a lot of code, and changes a lot of other code in the
higher-up widgets, such as Efl.Ui.Text and co.
The usage was replaces from:
efl_canvas_text_cursor_char_next(cur_obj)
to
efl_canvas_text_cursor_char_next(text_obj, cur_obj)
that is, it is an operations on the TEXT OBJECT, rather than on the
(now removed) cursor object.
So, one less efl object to worry about now.
Hopefully, the port went smooth.
The opcodes registration request is sent directly in case the connection
is already made. Otherwise, the request is waiting for the connection to
be made by the dedicated thread (not the main loop).
That's why the request can be sent by the two different threads at the
same time, leading to send it twice. It means a callback for an opcode
would be invoked twice everytime a request with this opcode is received.
This patch fixes it by checking if the request has already been sent.
adding an "event rect" is a common use case for rectangles, but I needed
a smarter event rect so I sent one off to school and it came back like this.
an event_grabber is a smart object which functions like a normal event rect
which has color(0,0,0,0), but with an important difference: it can have smart
members. event propagation works differently for an event_grabber:
normal:
event -> layer -> smart(obj1,obj2,obj3) ->(?) other objects
in this case, obj1,obj2,obj3 are all "inside" the smart object and their stacking
will always be considered as being inside the smart object. rendering is also
tied to the smart object in this case, as is clipping.
an event which reaches a smart object will be sent to the objects inside,
and then may continue through the smart object if there are no objects which
block repeating.
event_grabber:
event -> layer -> event_grabber -> obj1,obj2,obj3 -> STOP
in this case, obj1,obj2,obj3 are unmodified after being added to the event_grabber
and can be stacked, rendered, and clipped completely independently of the
event_grabber.
the event_grabber is considered an "event_parent" for this case. member objects
are not "inside" the event_grabber, and they are unable to receive events on
their own. instead, the event_grabber, which must be stacked above all its
members, receives events and propagates them top->down through its member objects.
if none of the member objects block the repeat of an event then the event will
still be blocked from further propagation past the event_grabber.
object lifetimes are independent of the event_grabber; deleting the event_grabber
has no effect on its members.
@feature
Summary:
Add some light function docs and code comments to explain the steps
followed in processing hardware events for keyboard hits into actual
printable characters. While this is internal functionality, the process
is important and involves a couple external dependencies (libinput and
libxkbcommon) so documenting this flow may help future developers avoid
introducing bugs.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewers: zmike
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4953
As we now use static_libs/libdrm for compiling ecore-drm2, we can
remove the atomic #ifdefs as we can run-time check this now.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we now use static_libs/libdrm to build ecore_drm2, we need to
fix how our drm_mode variables are declared so we can use them.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we will now use static_libs/libdrm to build ecore_drm2, we no
longer need to include the copied code from the libdrm headers so
remove all of the copied code from our source files.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As these events will be raised to ecore_evas_wl and the handlers there
do not pass along the Ecore_Evas as 'data', we need to change the type
of variable passed along in the event struture so that
ecore_event_window_match can be called to find the Ecore_Evas.
This patch also fixes some typos discovered during compile
Signed-off-by: Chris Michael <cp.michael@samsung.com>