there's no point in iterating this many times; the base step size is 32
and so each loop will only increase the buffer...not at all since it takes
3 loops for the buffer to increase by the step size
verify that the buffer increases and then stop instead of spinning uselessly
fix T6835
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
the timing does not matter for these tests, so there's no point in
randomly waiting longer and delaying build completion
fix T6832
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
this test is to try and match values in a tree which have not been
inserted, so remove irrelevant insert/remove operations as well as
insane looping
fix T6830
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
the constructor calls init for every object, so ensure a matching
shutdown call exists to balance the init count
ref 517471190f
ref T6816
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
for some reason, a few projects changed this from the expected value of
abs_top_builddir for their test suites, breaking the usage of this define
within those tests
fix T6812
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
this performs an eina init/shutdown check and loads available modules
before running remaining tests
note that this still does not work and may never have worked because
PACKAGE_BUILD_DIR is broken
ref T6812
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
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>
When changing cursors under wayland sometimes we'll see the old cursor
moved to the new hotspot briefly before the cursor changes. This makes
that suck less often.
A proper fix would involve creating a new wayland surface for every
cursor change (actual change, not just a new frame of an animated
cursor). Given the current internals this is invasive. Do the
easy thing for now.
Summary:
we have to check whether all of descendant are none_logical.
ref T6800
Test Plan:
1. elementary_test -to ctxpopup
2. Click 'Ctxpopup with user content'
3. Try focus ctxpopup content(button) using arrow key.
4. Check that the content is focused (you can move scroll bar)
Reviewers: bu5hm4n
Subscribers: cedric
Maniphest Tasks: T6800
Differential Revision: https://phab.enlightenment.org/D5856
Summary:
model based list need to be under the namespace of 'Efl.Ui.View".
thus, I renamed 'Efl.Ui.List' to 'Efl.Ui.View.List' properly.
Test Plan: N/A
Reviewers: cedric, felipealmeida
Differential Revision: https://phab.enlightenment.org/D5855
Function pointers now go through the same argument marshalling pipeline
as normal functions.
This will enable interfaces like Efl.Ui.Format to work properly.
When we have an eina.Value_Native (representing an Eina_Value passed by
value) and assign it to an eina.Value (a class with an IntPtr to an
underlying Eina_Value) we copy it so the eina.Value can take ownership
and free the data normally.
A possibly better alternative would be adding an extra flag to
eina.Value (something like OwnsPointer) to check whether we should free
the struct we point to or not.
When the subchild where we request subchilds from was regular, the while
loop would have run infinitly. This is now fixed by at least calling
once _next, the check to not run outside the node is now done with
calculating the depth of the nodes.
Evas map supports anti-alias(aa) rendering on sw backened.
When aa is toggled on, map forcely turns alpha channel on while it draws on the surface.
Actually, it was intended to blend polygon edges with destination,
but it breaks one case if the original source image alpha channel were turned off.
Simply, it fixed the issue, new implmentation removes the alpha channel switching,
instead fill the alpha values with 255 when map + aa + alpha_off is drawing on it.
@fix T1975
Evas map anti-aliasing haven't worked at all if the smooth scaling were disabled.
evas map rendering has a lot of corner-cases, previous call-position was wrong,
(by mistake maybe) shouldn't be in a certian case.
Let aa post-processing function be performed in universally.
The highlight should start on the second genlist item,
instead nothing is highlighted on first run.
The highlight come back to normal if you press up/down,
or if you give/remove the focus to the window 2 times.
Ector renderer are created by a factory pattern which return a reference.
The possible logic improvement from here would be to rely on setting the
parent of the object to the Ector_Surface and manage a cache by intercepting
efl_noref to trigger an efl_del of the object or a temporary cache of it.
That's for later.
Summary:
This copyedits the descriptions for several _add and _free APIs.
Phrasing is made a bit more concise, without losing the meaning, and
made more consistent so the distinctive differences between the routines
are easier to spot. Some paragraph spacing is added for clarity, for
similar reasons.
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5851
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
127 is the "command not found" shell exeit code, 126 is "the command
file is found but is not executable" which i think i'd interpret not
just for execute permissions but that something is preventing it from
executing in general.
both exe and thread objects must (currently) stay around until the
child thread or exe (task) is done. if you don't do this "bad things
can happen". so produce an error to let the programmer know.
it wasn't looking at the copier queue "todo" at all thus skipping it
on flush. this will fix flushing of ecore ipc message buffers. this
happens to also now fix terminology's "one process" mode.
@fix
We should only have to actually force a tick if we can't set up
the tick job, as the evas changed callback or a following render
from the tick job's tick will cause a flip.
Should remove a potential for a missed tick near the start of
ticking.
Previously, when an error happened in Eolian, the state was left
in a presumably unusable and inconsistent condition. This work
aims to change that, as all changes are committed into a staging
area before being validated and merged back into main state.
This is not yet complete, as units and by-file lookups are not
currently involved in the rollback. This will change in the
subsequent commits.
@feature
Instead of
var bg = efl.ui.Background.static_cast(myobj.Part("background"));
Now do
var bg = myobj.Background;
Also a couple helper functions were added.
Now the generated DllImport call will have the actual library name
instead of placeholders on Linux. Before we relied on dlsym being able
to search for the symbols on all loaded so's while Windows needed you to
specify the correct library to call GetProcAddress.
This fixes the case when someone call an function from an efl interface
defined in efl.so (e.g. efl_part) and the library is not loaded yet.
Apparently when we initiate a client side move in ecore_wl2 we flag that
and send a mouse-up immediately on the next pointer enter.
Do the same for resize.
At some point this might need to be revisited, we should probably be
sending a "cancel" at the start of client initiated move/resize instead
of an up at the end?
Fix T6422
Unlike panic, this will be used to handle regular errors
such as parse errors. There will be no jumps and you
will be able to pass in a pointer to get the error
data into some local memory. That way you will be
able to override printing error messages.
In general, ptr(struct) parameters behavior depends whether the
parameter has the @owned modifier or not.
If there is no @owned parameter (meaning no transfer of ownership
happens) and it is a "complex" struct, with reference type fields
(like strings), the struct is converted to the respective
<Struct>Internal struct and passed with "ref" to the DllImport'd
function. For @in parameters, after the function it returns, this
intermediate struct is converted to the public struct type and
assigned to the original parameter, updating it to the external
world.
When we have ownership transfers, the structure is copied to unmanaged
memory and given to the callee. We can't send managed memory directly as
the callee may try to free it. On the managed side, the original struct
is left to be garbage collected normally.
When transferring the ownership of a ptr(struct) from Unamanaged to
managed, we should marshal the reference-typed fields or they can point
to Managed memory that would make no sense to access from C (for
example, strings would return garbage).
The downside is that it can cause potential leaks if the receiver of the
memory do not free it. In the current state of the EFL api this can
happen in two places:
- Efl.Ui.List.SegArray::remove
return -> ptr(Efl.Ui.List.LayoutItem) @owned
- Efl.Ui.Focus.Manager::fetch
return -> ptr(Efl.Ui.Focus.Relations) @owned
The resources copied by both structs may leak when those functions are
overriden in C# and the values returned to the C code.
Also hide some internal stuff instead of exporting it and generate
implicit conversion operators for struct external/internal.
Summary:
This will avoid infinite loops and errors when the parent tries
to orphan an invalidated child.
Fixes T6780
Test Plan: Run `make check`
Reviewers: cedric
Maniphest Tasks: T6780
Differential Revision: https://phab.enlightenment.org/D5839
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
Similarly to commit 8b962d24ac prevent
extra flips in the drm engine.
These are potentially more harmful to DRM as they can cause frame
drops and missed render opportunities.
It's possible that we unregister then reregister an animator so quickly
that the ecore_evas idle enter/exiters haven't had a chance to run yet.
In this case a render will come shortly anyway and we shouldn't use a
'false' commit to kick off a frame callback.
Silences an ERR and unmeasurably improves protocol utilization.
settings the redirect might result in unfocus calls, that might unset
evas_object_focus on a object that might be registered in two managers
due to border linking. This fixes mysterical disapearing focus.
We dont delete the adapeter when we are still focused, to set anyway the
correct view to it, we need to set the view to the adapeter as often as
possible
somehow genlist leaks the view sometimes, thus the adapter is not
deleted when the item is deleted. This resulted in strange ghost focus
objects in the window.
after that someone probebly wants to check where the last focus was on,
if the set of boder elements has changed since the last border flush, then the
element might not be registered in the parent manager
ecore_wl2_window_commit() must be called during window size negotiation,
but this currently trips a warning when no frame callback has been
received for the first commit. We can't even have frame callbacks at
that point because no buffer is attached.
Don't set up the commit_pending logic until after we have a buffer.
This patch implements bug compatibility.
genlist internally uses both a tree structure with Eina_List and a flat
Eina_Inlist to track its items. ALL of the items are in the inlist while
subitems appear in their parent's list. As a consequence both lists must
be kept in sync pretty tightly. Obviously this is not done at all and
has led to countless bugs, as soon as tree or groups are used:
- Invalid order of items (visually)
- Invalid order of items with sorted_insert
- Glitches in the matrix
- Crashes with sorted_insert
- Odd/even styles not properly set
- Promote/demote functions broken by design
- Developers send to psychiatric hospitals
- Etc...
Legacy genlist (1.19 and before) used an inlist order that basically
didn't make sense, as it didn't follow the logical order of elements (as
they appear visually). Unfortunately this has "worked" (really, that's a
huge stretch to use this word here) for a long time this way. As a
consequence, some applications (*cough* empc *cough*) have relied on
this order to implement "next album" or "previous album" where the
album title is a group node.
By changing the order of items in the inlist, this has broken the
assumptions made above, and ends up in cases that return NULL, leading
to SEGV. Sure, the app should have checked NULL, but that's not really
the point here. The behavior has been changed.
This patch implements "fixes" for the following functions:
- elm_genlist_first_item_get(): Don't return a parent
- elm_genlist_last_item_get(): Return a parent
- elm_genlist_item_next_get(): return a parent upon reaching the last child
- elm_genlist_item_prev_get(): return a child when a parent is passed
Important notes:
- This does not cover 100% behavior compatibility here. The only way to
have it would be to simply revert the entire genlist code to its
original version and never touch it again, ever.
- An explicit API is required for an application to specify which API
level it targets, so that we can cherry-pick which bug compatibility
features we want to enable. We are already doing this for EDC,
unfortunately.
@fix
fix T5938
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
there is no corresponding code to unset this global pointer when the module
is unloaded, so this will crash if elm_shutdown is ever called
Signed-off-by: Mike Blumenkrantz <zmike@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>
there is no check for the existence of this file so this will error most times
from it not existing
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
For numeric types, eina_value_set() accepts values instead of references
on the value to be set. Hence, we were affecting as the exit code of the
loop a garbage value, yielding to invalid results.
This is useless in py as Objects are never returned
directly, you always get the correct subtype (Class,
Variable, etc..). It was also clashing with Class.type
Two of the new tests are failing, the problem is that now
we have name clashes between Eolian_Object and Eolian_Class (at least)
For the moment I spotted:
- Object.name clash with Class.name
- Object.type clash with Class.type
Also fixed a typo in eolian_lib.py spotted by the new tests,
and removed the old tests for Declaration.
Summary:
They were still using the old SetSize(w, h) API instead of receiving
eina.Size2D structs.
Test Plan: Build examples and run them.
Reviewers: felipealmeida, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5830
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
C# does not have a literal form for structs (like C++'s {} aggregate
initialization). Before this commit the user would need to explicitly
instantiate a struct and assign the required values to it, like:
eina.Size2D size;
size.W = width;
size.H = height;
widget.SetSize(size);
As a workaround, this commit generates helper constructor with
parameters corresponding to the struct fields in the order they are
declared. These parameters have default values if one does not want to
explicitly initialize all fields directly. With these constructs, the
above code could be translated to:
widget.SetSize(new eina.Size2D(width, height));
It should be noted that the constructed struct will live on the managed
memory (GC) instead of the stack.
Test Plan: run "make check"
Reviewers: felipealmeida
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5838
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Added support for Eolian_Object, made other luaified types
"inherited" from Eolian_Object, removed type-specific file_get
as it was replaced by Object's file_get, declarations API still
in place
strstr() can give false positives if the extension name is a subset of
a string in the extension list, for example EGL_EXT_image_dma_buf_import
would match EGL_EXT_image_dma_buf_import_modifiers.
I've opted for a mildly badgered copy of epoxy's test, which should be
robust in the face of subsets.
Anything non-EGL we might query would have to be queried here, so
I'm moving the call here to protect us in the event that we need GL
extensions in the future.
I'm still a bit confused as to what string I should be passing to
evas_gl_symbols, though.
As nearly every Eolian handle is backed by an Eolian_Object,
this information is now publicly exposed and has an API. This
opens up an array of new possibilities for tooling, as you
can now externally query file names, line numbers etc.,
as well as cast arbitrary handles to Eolian_Object pointers
and back.
This will be expanded later and it will replace the Declaration
system, as it's cleaner, better integrated and more versatile.
@feature
This is a hint that we want a high priority context. Since gl_drm is
likely a compositor or a full screen app, it makes sense that it try to
use this (but other engines probably shouldn't)
Based loosely on Chris Wilson's weston patch to do the same thing.
(weston commit b678befb6ed055e6c66466505d9195a3cebf8073)
As this extension appears to have been around for years, I haven't
added fallback defines for:
EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
This is just a first step. All user of destructor should be updated to
move the code that rely on their efl_parent and on efl_provider_find to
invalidate. Then we will be able to change the way efl_add and efl_del
work to properly refcount things. efl_noref won't be triggered at the
moment until both efl_parent_set(obj, NULL) and the last user ref are
set to NULL. This is not what we want, but due to how user refcount is
accounting parent at the moment, until all the code is move to rely
on invalidate we can not fix this.
As strlen() cannot accept NULL (segfaults), we should check for valid
key, keyname, and compose strings here before passing to strlen().
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Small patch to reduce calls to strlen when sending key events. This
patch is loosely based on Phab D5567
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
When theme is applied text is reset and cursor position is set to 0.
This patch is recover the position to previous after text is reset.
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewers: cedric, jpeg, woohyun, herdsman
Reviewed By: cedric
Subscribers: cedric, jpeg
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D5695
Signed-off-by: Cedric Bail <cedric@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>
Summary:
"aborted": The escape key was pressed on a single line entry. (since 1.7)
"activated": The enter key was pressed on a single line entry.
Reviewers: id213sin, jpeg, cedric, herdsman
Subscribers: cedric, jpeg
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D5728
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
We've been missed type of class name.
Add legacy class name to maintain compatibility.
@fix
Reviewers: jpeg, woohyun, Jaehyun_Cho
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5749
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
Instead of including the legacy header on the main header, just include
it where it is actually used (diff_widget.c), like in elm_code_widget.c.
Test Plan: Try to compile edi with the tarball from `make dist`. It should not fail with elm_code related errors.
Reviewers: raster, stefan_schmidt, felipealmeida
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5807
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
this commit add null check logic on evas_object_smart_attach
because a segmentation fault occurs once the argument is not valid (eg. null).
Test Plan:
1. invoke evas_object_smart_add(obj, NULL)
2. see the application crashes
Reviewers: woohyun, cedric
Differential Revision: https://phab.enlightenment.org/D5817
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
I did it wrong.
The "Elm_Multibuttonentry_Format_Cb" should be maintain for legacy.
efl_ui_XXX has to use efl_format interface.
@fix
Test Plan: elementary_test->multibuttonentry sample.
Reviewers: cedric, woohyun, Jaehyun
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5824
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
Increasing offset as 2 for next map points is wrong.
If evas tries to draw for wrong combination of map points,
it can cause wrong results. Actually, every drawing code for
map points use and increase offset as 4.
@fix
Test Plan:
A test case for textpach is modified for testing this issue.
1. Run elementary_test with sync render mode.
ex) ECORE_EVAS_FORCE_SYNC_RENDER=1 elementary_test
2. Open textpath test.
3. Set a short text by clicking newly added check box.
4. (It will show another issues... So,) change slice number to update textpath properly.
5. See some noises at top-left side of text.
It is drawn from the two of end map points to the two of empty(not used) map points.
Reviewers: raster, cedric, jpeg, jypark
Differential Revision: https://phab.enlightenment.org/D5833
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
Improve the verbage in the doxygen comments. Refer to the value being
changed as the 'previous' rather than the 'old' value, to be more
precise. Drop the phrase 'keeping API sane' as it is unnecessary and
is an odd thing to say. Try to avoid referring to 'your program' as we
shouldn't assume the reader's situation.
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D5834
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
'thiz' is not commonly used in EFL, more commonly used is a word or
abbreviation that is descriptive of the object being used ('hash' for
Eina_Hashes, 'str' for Eina_Strings, 'array' for Eina_Arrays, etc.)
Follow this convention by using 'rect' (as used already in various
places) instead of 'thiz' or 'r'.
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D5836
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
For all routines that can return NULL on error, mention this in the
function's @return docs. In cases where a small number of situations
result in this return, move the docs to the @return; in other cases just
state the NULL return briefly and leave the elaboration in the body.
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D5837
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.