Summary:
It should use legacy class in elm_win_add.
this patch fixes T6898, T6899
Test Plan: make check
Reviewers: zmike, Jaehyun_Cho
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T6899, T6898
Differential Revision: https://phab.enlightenment.org/D6233
Summary:
The efl_gfx_color interface was not applied properly.
The implementation code of evas_object_smart_color_set was moved
to efl_gfx_color_set implementation code. But, these two functions are not same.
In efl_gfx_color_set impl, it has to call super's color set to apply
the given color values to widget object itself.
This bug caused color_set/get test failure and the following bug.
1. elm_image_add
2. evas_object_color_set
3. elm_image_file_set
4. show. See the given color is not applied. It was applied in the past.
Test Plan: color_set/get to elm_image object is included in test suite.
Reviewers: raster, cedric, herdsman, woohyun
Reviewed By: cedric
Subscribers: #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6163
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
This API require more review, I have just fixed API that return type that are
inconsistent over time and fail to allow for proper lifecycle of event, which
lead to crash when those event trigger at unexpected point.
Differential Revision: https://phab.enlightenment.org/D6102
This reverts commit 2fb5cc3ad0.
Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.
Differential Revision: https://phab.enlightenment.org/D6062
When there is a redirect there is no need to adjust the focus property
based on a unregister, so just continue and cleanup the history. When
the redirect is unset the focus is restored.
fix T6908
This is much more extensive than before and we are now
testing both tree and group items.
This test has been run in 9 stable releases down to 1.12
the only one that fail is 1.18 that is know to be broken
wrt item iteration.
Hopefully definitly close T5938
Summary:
this is especially problematic for elm tests as the fork reset callback
in efreet will cause a huge number of server connections to be created
ref T6864
Depends on D5966
Reviewers: stefan_schmidt
Reviewed By: stefan_schmidt
Subscribers: cedric
Maniphest Tasks: T6864
Differential Revision: https://phab.enlightenment.org/D5967
Summary:
this avoids the creation of a new win object for each test
ref T6864
Reviewers: stefan_schmidt, cedric
Reviewed By: cedric
Subscribers: cedric
Maniphest Tasks: T6864
Differential Revision: https://phab.enlightenment.org/D5965
Summary:
init is only called here to verify the refcount, shutdown is only necessary
when not forking in order to preserve the environment
ref T6864
Reviewers: stefan_schmidt
Subscribers: cedric
Maniphest Tasks: T6864
Differential Revision: https://phab.enlightenment.org/D5958
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.
Ref T6859.
Summary:
opening the default theme file can take up to 0.2s in worst case during
a test
ref T6864
Depends on D5914
Reviewers: stefan_schmidt
Reviewed By: stefan_schmidt
Subscribers: cedric
Maniphest Tasks: T6864
Differential Revision: https://phab.enlightenment.org/D5915
Summary:
check whether init+shutdown work explicitly before proceeding to other
tests
Depends on D5913
Reviewers: stefan_schmidt
Reviewed By: stefan_schmidt
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5914
Looks like a copy and paste left over from another test.
../../../src/tests/elementary/elm_test_genlist.c:58:16: warning: unused variable ‘type’ [-Wunused-variable]
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway
see followup commit which resolves some issues with eina tests
ref T6813
ref T6811
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros
timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
the comment here indicates that the author knew it was an invalid api use
so it should not have been here in the first place
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Summary:
If a file path and key string was passed to elm_bg, we could get
the same file path and key string. Even if it failed to load the image file.
And the file path also remained its original form.
ex) Setting file path "~/image.png" => Getting file path "~/image.png"
(Not "/home/user_name/image.png")
@fix
Test Plan: Included in elementary test suite.
Reviewers: jpeg, cedric, raster
Reviewed By: cedric
Subscribers: woohyun
Differential Revision: https://phab.enlightenment.org/D5823
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
so this is then inconsistent with efl.exe and efl.thread, so go back
to being normal with 0'th arg being the binary itself jsut to make
sure we have conistent usage.
so the MAIN loop is actually an efl.app object. which inherits from
efl.loop. the idea is that other loops in threads will not be efl.app
objects. thread on the creator side return an efl.thread object.
inside the thread, like the mainloop, there is now an efl.appthread
object that is for all non-main-loop threads.
every thread (main loop or child) when it spawns a thread is the
parent. there are i/o pipes from parnet to child and back. so parents
are generally expected to, if they want to talk to child thread, so
use the efl.io interfaces on efl.thread, and the main loop's elf.app
class allows you to talk to stdio back to the parent process like the
efl.appthread does the same using the efl.io interfaces to talk to its
parent app or appthread. it's symmetrical
no tests here - sure. i have been holding off on tests until things
settle. that's why i haven't done them yet. those will come back in a
subsequent commit
for really quick examples on using this see:
https://phab.enlightenment.org/F2983118https://phab.enlightenment.org/F2983142
they are just my test code for this.
Please see this design document:
https://phab.enlightenment.org/w/efl-loops-threads/
This reverts commit 135154303b.
Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.
Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.
Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.
Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?
1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)
etc.
this class is a giant FIXME for anyone looking to do refactoring work.
the only reason it seems to exist is to provide wrappers around
efl.gfx functions and provide screen position adjustments--something
which isn't even viable under wayland
note that a test was removed here due to the corresponding method being
removed
Summary:
For example, the widget type of elm_button was "Elm_Button".
But, the object which is created by elm_button_add() will
return its widget type "Efl.Ui.Button_Legacy".
It is not legacy name. It should be fixed to return "Elm_Button".
I don't know when but eolian start to make class name with ".".
So, it should be converted to "_" for all widgets.
@fix
Test Plan:
All test cases are included in this patch.
Run "make check"
Reviewers: raster, cedric, jpeg, taxi2se
Reviewed By: cedric
Subscribers: taxi2se, woohyun
Differential Revision: https://phab.enlightenment.org/D5782
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
focus_user and focus_object are similar classes. by merging them into
one mixin, we can maintain consistency.
Test Plan: make check
Reviewers: bu5hm4n
Subscribers: cedric, Jaehyun_Cho, woohyun, jpeg
Differential Revision: https://phab.enlightenment.org/D5734
The new calculation mechanism does not only look into the exact
directions up,right,down,left of a node, it also now checks the sectors,
bound by: x < node.x, x > node.max_x, y < node.y, y > node.max_y.
ref T6453
Summary:
Added some guards to avoid redefinition of functions.
Partially fixes T5866, as there is still the question whether we should
test internal functions or not, as stated by jpeg in the comments.
Reviewers: vtorri, felipealmeida, jpeg, cedric
Reviewed By: cedric
Subscribers: jenkins, cedric
Maniphest Tasks: T5866
Differential Revision: https://phab.enlightenment.org/D5521
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
elementary_config.h should not even exist. It's been hijacked as a
private header for elementary, but all "real" configuration is stored in
efl's main config.h now.
If you call focus_set(m, o) where o is a logical child, then the focus
will go to any none logical child of o, or if there is nothing in the
children of o, then the focus will remain on the now focused element.
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.
But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.
Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).
@feature
it turns out to be very handy to have a interface for the moving and
border elements, that is unconnected to the way of how widgets are
registering themself.
This for example enables us to get a simple focus manager that just
redirects the call into a internal 2 dimensional data struct
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.
This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.
Ref T5315
This merges them with the now standard interface:
Efl.Canvas.Layout_Signal
Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).
Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.
As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.
Ref T5315
Summary:
If multi selection have 0 column and delete the selection, 0 + 1 column also
deleted
This fix that bug.
Also, remove needless code.
Test Plan:
1. select multi line with 0 column.
2. delete the selection
Reviewers: ajwillia.ms
Reviewed By: ajwillia.ms
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4922
The Efl.Ui.Focus.Manager abstracts the creation of a localization graph
and a logical tree. The localization graph is used to find a object
right left up or down of a given object. The logical tree is used to
iterate throuw the containers which are used to build a ui.
Those managers can be used bound to some layer in the ui, so for
example the window is a layer, the content of a scroller is a layer.
With those layers, we can make sure that movements of a scroller for
example just means that this graph of objects in the scroller needs to
be recalculated, and not the complete ui.
The advantage of having this to layer bound datastructures is that you
can easily debug those graphs, since the complete layer of this
managerobject can be calculated completly.
Efl.Model.Container and Efl.Model.Item to efl/interfaces are used
to create Efl.Model objects with predefined property values.
This is useful to any situation where we want an Efl.Model with
explicit defined property values.
Efl.Ui.View and Efl.Ui.Factory are used to connect Efl.Models with
Widgets, Elm.Layout and Efl.Ui.Image has changed to use news interfaces
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
For c source and headers lookup a simple syntax definition.
Use a very simple text processing line by line to tokenise.
Simple but it gets us one step closer to cross-language syntax
Summary:
When insert newline, check the previous line has keyword.
If so, insert 2 spaces indent more.
Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with keywords.
3. Type <Return>.
4. Check that the indentation of newline is correct.
Reviewers: ajwillia.ms
Reviewed By: ajwillia.ms
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4543
Summary: return value of brace matching function no longer need free().
Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with braces.
3. Check that closing brace has correct indent.
Reviewers: ajwillia.ms
Reviewed By: ajwillia.ms
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4540
Summary: when type closing brace, it find matching braces and then indent.
Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with braces.
3. Check that closing braces have correct indent.
Reviewers: ajwillia.ms
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4444
Summary:
The accessible name is char*, this could confuse API user.
If we provide user callback to get description, an user would return allocated string.
The usage of elm_interface_atspi_description_get/set should be same with elm_interface_atspi_name_get/set
Reviewers: lukasz.stanislawski, cedric, raster
Reviewed By: raster
Subscribers: stanluk, jpeg
Differential Revision: https://phab.enlightenment.org/D4378
This adds a few callbacks to inform applications about
async open and preload:
- load,open
- load,ready
- load,error
- load,cancel
This patch adds a new EAPI as well: elm_image_async_open_set.
This is the only way to use async file open with the legacy APIs
and should be easily matched with whatever EO API we end up using
(be it based on promises or events).
Alter the test cases for make check as they were using the
unstable EO API which I just removed.
Thanks @arosis for the original patch. And sorry for the huge
delay in merging this.
See also: https://phab.enlightenment.org/D4215
@feature
Fileselector test was waiting for the wrong event. It caused the test to
fail in some situations, since it could check the object when it is
not ready.
Fix T4502
@fix
This combines evas canvas functions to list and query
touch points into a single iterator:
- evas_touch_point_list_count
- evas_touch_point_list_nth_xy_get
- evas_touch_point_list_nth_id_get
- evas_touch_point_list_nth_state_get
This also fixes a number of issues related to feeding fake
input events.
Note: I wanted to add delta x,y information as well but it's
in fact not really possible outside the event callback itself,
as the previous x,y position will not be updated unless there's
an event.
@feature
This reverts commit 8a988717e1.
It seems we can't actually inherit from class more than once and neither eo
nor eolian will complain about it. You will just get random weird behavior.
This patch should come back once we have made an interface of edje.
This reverts commit 57d77c9041.
We are in freeze right now and this is a new feature. Considering the access
API is still in beta I might have let this slip by but its does not even build
../../../src/tests/elementary/elm_test_popup.c:27:1: error: conflicting types for ‘elm_object_part_access_object_get’
START_TEST (elm_object_part_access_object_get)
^
In file included from ../../../src/lib/elementary/Elementary.h:240:0,
from ../../../src/tests/elementary/elm_test_popup.c:6:
../../../src/lib/elementary/elm_object.h:521:54: note: previous declaration of ‘elm_object_part_access_object_get’ was here
EAPI Evas_Object *elm_object_part_access_object_get(const Evas_Object *obj, const char *part);
^
../../../src/tests/elementary/elm_test_popup.c: In function ‘elm_object_part_access_object_get’:
../../../src/tests/elementary/elm_test_popup.c:39:47: warning: passing argument 1 of ‘elm_object_part_access_object_get’ makes integer from pointer without a cast [-Wint-conversion]
access = elm_object_part_access_object_get(popup, "access.title");
^
../../../src/tests/elementary/elm_test_popup.c:27:1: note: expected ‘int’ but argument is of type ‘Evas_Object * {aka struct _Eo_Opaque *}’
START_TEST (elm_object_part_access_object_get)
^
../../../src/tests/elementary/elm_test_popup.c:39:13: error: too many arguments to function ‘elm_object_part_access_object_get’
access = elm_object_part_access_object_get(popup, "access.title");
^
../../../src/tests/elementary/elm_test_popup.c:27:1: note: declared here
START_TEST (elm_object_part_access_object_get)
^
../../../src/tests/elementary/elm_test_popup.c:39:11: error: void value not ignored as it ought to be
access = elm_object_part_access_object_get(popup, "access.title");
^
Makefile:43996: recipe for target 'tests/elementary/tests_elementary_elm_suite-elm_test_popup.o' failed
make[5]: *** [tests/elementary/tests_elementary_elm_suite-elm_test_popup.o] Error 1
If you still want this in make sure it actually can compile the tests you added.
Not really somethign we would hit here but still better to change this.
tests/elementary/elm_test_config.c: In function ‘elm_config_profiles’:
tests/elementary/elm_test_config.c:206:12: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
fail_if(cnt != eina_list_count(list));
We are assigning somethign new to this list so no chance for const here.
tests/elementary/elm_test_config.c: In function ‘_eina_list_string_has’:
tests/elementary/elm_test_config.c:174:11: warning: assignment discards ‘const’ qualifier from
pointer target type [-Wdiscarded-qualifiers]
EINA_LIST_FOREACH(list, l, s)
Instead of being a key "audio_mute" + another key "channel"
I've simply implemented a number of different keys:
audio_mute (= all)
audio_mute_all
audio_mute_effect
...
This is to port elm_config to EO APIs.
The current implementation relies on the legacy API, by
simply forwarding calls.
The new API is simply efl_config_set("config_name", value)
where value is an Eina_Value (aka. generic_value).
The C interface proposes a few helpers like config_int_set,
config_double_set, etc...
Unfortunately at the moment, not all config options are
supported, as some rely on more complex types:
- lists
- color class and multiple arguments
- unset functions
- enums
Profiles are also not handled at this point.
@feature
Evas.Common_Interface not only had a bad name, it also
wasn't in line with how we can get a loop object, for
instance.
Use eo_provider_find in each implementing class.
This reverts commit 546ff7bbba.
It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.
We would have an issue with references and objects being freed too soon
and in general, issue with the references.
Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.
eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
This touches Edje and also Elementary where part names are used.
This commit blew up in size since now all content part APIs
(get, set, unset) require to use Efl.Part instead.
This is a big refactoring commit, but no logic should
have been changed. Fingers crossed.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).
This means Eo no longer complains if you have a parent during deletion.
This removes Efl.Pack_Named which had a terrible name,
removes Elm.Container which should have been renamed
Efl.Ui.Container anyway, and introduces an interface
Efl.Container instead.
The hierarchy tree is now changed as objects don't inherit
from Efl.Container (it's an interface, not a regular class)
but only implement it. Obviously it is very easy to
reintroduce an Efl.Ui.Container parent class if we need it,
but I guess it should have some actual logic. It's basically
part of what Elm.Widget already does.
Some function names have been modified to look better in C
with the efl_content prefix.
@feature