Ecore_Evas_Input should use this function to report mouse move events.
The previous used function should be used to refeed events, or to
artificially feed mouse move events to the canvas. Basically every other
feed_mouse_move use case that is not an event from the input system.
This function should be used internally by the input system
(Ecore_Evas_Input) to feed Evas with move events. The x,y event info is
relative to the base of the window/surface, instead of the 0,0 of the
canvas.
This case only happens for now under Wayland, where the 0,0 of the
canvas is translated due to the window decorations that are drawn by the
client.
- pack active flag and generation nbr in an _Eo_Id_Entry struct
- replace Eina_Trash with a fifo which lives in mmaped memory owned by eo_id.
- fifo uses indexes instead of pointers to spare memory
- never used entries are served first, then those in the fifo
are reused, thus we ensure that a freed entry won't soon be reused.
Also remove the Classes section from the Ecore_Audio_Group, we don't
need it as the pages are linked automatically
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
We want to introduce a new mechanism concerning the data of the Eo
objects.
The goal is to improve the memory management by defragmenting the memory
banks used by the Eo objects. The first phase has been done by raster
and consists in allocating the objects into a separate memory region
that the one used by malloc. So now, we know where our objects are
located.
Now, moving objects means moving data of objects. The issue we have here
is that a lot of data pointers are stored into data of other objects,
e.g Evas Object data into lists for rendering...
We need a way to reference the data and eo_data_get doesn't provide us
that. So we need to improve the API for data extraction by requesting
from the developer if the data will be stored or not. Five functions are
supplied:
- eo_data_scope_get: no referencing, the data pointer is no more used after
exiting the function.
- eo_data_ref: reference the data of the object. It means that while the
data is referenced, the object cannot be moved.
- eo_data_xref: reference the data of the object but for debug purpose,
we associate the objects that references. Same behavior as eo_data_ref
for non-debug.
- eo_data_unref: unreference the data of an object.
- eo_data_xunref: unreference the data of an object previously
referenced by another object.
I deprecated the eo_data_get function. Most of the time,
eo_data_scope_get needs to be used.
In the next patches, I changed the eo_data_get to the corresponding
functions, according to the usage of the data pointer.
The next step is to find all the places in the code where the data is
stored but not yet referenced. This will be done by:
- requesting from every object to unreference all data to other objects.
- moving all the objects from one region to another
- requesting from every object to rerefenrence the data.
- debugging by hunting the segmentation faults and other weird
creatures.
Since we don't have a changed state callback on Wayland, just call the
changed_state callback of Ecore_Evas from the configure callback.
There's no need to add the Ecore_Job that will send the event later.
This makes the code cleaner, simpler, and will call the callback when
the configure event is received, which is a good place to check for the
changes.
not needed.
During buffer_attach, just call window_damage function which already
handles surface_damage & commit.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The framespace offset must be taken into account when searching the list
of objects which received events, since the objects now have their
original position.
Instead of moving the objects by adding the framespace offset to them,
use this offset when rendering them. This way there's no change in the
object's geometry/position, it works correctly with map, and will be
automatically updated in case that the framespace values change (for
instance if one sets a window to borderless).
There are 2 main places where changes were needed:
- output redraws, when they come from an object being changed, must be
add the framespace offset to their damaged area;
- checks to see if the object is inside a given rendering area, must
also add this offset, since the object is actually being rendered on
a different position;
use of an array of the below struct instead of 3 separate arrays
leads to better cache performance and smaller memory usage
typedef struct
{
_Eo *ptr;
unsigned int active : 1;
unsigned int generation : BITS_FOR_GENERATION_COUNTER;
} _Eo_Id_Entry;
ecore_audio_obj_out now also supports VIO. Add attribute need_writer so
we can generalize the idler creation for subclasses at a later time.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
* The idler for the write callback is now in the output struct because
different outputs might need it.
* Remove paused attribute from output - we have it in Ecore_Audio_Object
already
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
The VIO wrapper functions are needed from the sndfile inputs and outputs
so move them to a separate file and access from both.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Using pa_stream_write_begin we can just request a buffer to write into
This reduces the amount of calloc()/free() and memcpy calls.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Now, Evas.h includes three new files:
- Evas_Eo.h: Eo API functions (functions defines, enums, base id).
- Evas_Legacy.h: contains the API functions related to objects
- Evas_Common.h: common data (structs, enums...) +
functions not related to objects.
This phase is needed for the EFL 1.8 release to disable Eo APIs if we
consider it is not enough mature to be used by applications.
When the window is rotated, the logical pointer position is calculated
based on the window size (width or height) minus the current position,
depending on the rotation used. For wayland, we must add the window
decorations to the ecore_evas size, when doing this calculation.
Now, Edje.h includes three new files:
- Edje_Eo.h: Eo API functions (functions defines, enums, base id).
- Edje_Legacy.h: contains the API functions related to objects
- Edje_Common.h: common data (structs, enums...) + functions not related to
objects.
This phase is needed for the EFL 1.8 release to disable Eo APIs if we
consider it is not enough mature to be used by applications.
This clipper caused several bugs already, and there are some bugs still
not fixed. Let's remove it and try to fix any remaining with some other
kind of solution that does not depend on adding or clipping objects
during the evas render phase, which causes unexpected behavior.
input_attach, input_detach, format_set, and source_set now return an
Eina_Bool
Tests, examples and edje_multisense adapted
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Now, Ecore.h includes three new files:
- Ecore_Eo.h: Eo API functions (functions defines, enums, base id).
- Ecore_Legacy.h: contains the API functions related to objects
- Ecore_Common.h: common data (structs, enums...) + functions not
related to objects.
This phase is needed for the EFL 1.8 release to disable Eo APIs if we
consider it is not enough mature to be used by applications.
Summary: This feature replaces Eo pointers with ids to prevent bad usage
or reuse of these pointers. It doesn't change API.
The mechanism uses tables storing the real pointers to the objects.
See the src/lib/eo/eo_ptr_indirection.c file for more details on the
mechanism.
This follows the simplified handling of sensor object we are already
doing for the sync paths. Its a bit more complicated here as we need
to pass all data through the module specific async handling. But the
result should be the same.
We rely on the app to provide a sensible object pointer and we now longer
need to have a copy of the object around to operate on it.
Simplifies code, maintenance and reduces mem copies. Win-Win :)
These objects should be clipped only during rendering, since keeping
them clipped after that allows for unexpected behavior on the
application side. For instance, an application could check if objects
have clippers before doing something to them, assuming that some objects
should have no clipper, but under wayland, after the first render
iteration, there will be no objects without a clipper.
This commit fixes this behavior by unclipping objects that had no
clipper prior to the render iteration.
Additionally, it fixes a bug where a maximized/fullscreen window could
have not all of its content rendered immediately. This was occuring
because some objects could be clipped to the framespace clipper, but
considered invisible in the beginning of the render phase, where they
are evaluated. They were considered invisible because the framespace
clipper object was not resized at that phase yet, and thus these objects
were being clipped out from the viewport.
In case of short reads just make sure that playback is started
immediately. No need to drain just yet as that just causes issues with
delayed removals of streams.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
A protected read function must now be implemented by the child class to
perform the actual reading.
Signals on playback loop and end are sent.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
(udev registered it as fake)... and in the process i found that we
probably double free as sensor is calloced in the module and AGAIN in
eeze sensor core... oh and symbols probably might lak from modules..
so static them up yo.
Because of the way eo is dispatching method calls of objects the usual
error log you get if you mix up objects or try to call non-existent
methods is:
ERR<12404>:eo lib/eo/eo.c:362 _eo_dov_internal() Can't find func for op
0x24 (ecore_audio_obj_in:ECORE_AUDIO_OBJ_IN_SUB_ID_SPEED_GET) for class
'ecore_audio_obj_out_pulse'. Aborting.
Of course the problem is not really in lib/eo/eo.c, but in the function
calling eo_do()
Now the macros pass source file and line number on to the _internal
functions so we can log where the error originally happened:
ERR<1938>:eo lib/eo/eo.c:362 _eo_dov_internal() in
lib/ecore_audio/ecore_audio_obj_out_pulse.c:119: Can't find func for op
0x24 (ecore_audio_obj_in:ECORE_AUDIO_OBJ_IN_SUB_ID_SPEED_GET) for class
'ecore_audio_obj_out_pulse'. Aborting.
This makes debugging with eo a lot easier.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Eina value type does not support pointer so I used int as of now.
This needs to be converted into hexa later.
By using Clouseau, one can see this Clipper information.
Switch from absolut microseconds since epoch to a monotonic clock with
realtive values. Switch from unsigned long long to double.
This aligns it with how we present time in efl. ecore_time_get is used
when possible. For the tizen modules we convert the the epoch timestamp
we get into a double. This is still a working monotone clock source.
As this will be released the first time with 1.8 we don't have any API
break here.
Together with eeze_sensor_module_register/unregister these are the functions
that are irrelevant for developer when they just want to use the eeze_sensor
API.
Still all three need to be marked with EAPI as they are used in the backend
modules and due to our visibility hidden usage the module loading would fail
if we remove EAPI from them.
Moving them into the private header should give an indication that these are
not meant for pure API users.
These functions let you pass an array of callbacks instead of just one.
It's more memory efficient to use this if you just add a bulk of events
on the same object.
This commits breaks ABI, and breaks API of the EO_EV_CALLBACK_ADD/DEL
signals (the event info passed).
We use the typedef everywhere else. This makes sure we also use it
in the struct to avoid any confusion. The API is new for upcoming
1.8 release so no problem in changing it now.
It's implemented exactly the same way as on the X11 backend. It does
handle multiple devices, though may need some adjustments when
multi-touch is added, since there's no support for multi-touch on
EFL-wayland yet.
If logical cursor is between LTR/RTL text two cursors will be shown.
Upper cursor is shown for the text of the same direction as
paragraph, lower cursor - for opposite.
NOT DONE YET
Signed-off-by: Tom 'TAsn' Hacohen <tom@stosb.com>
The wl_display_sync() request doesn't really wait for all the requests
to be processed, but instead sends a request for the "done" event.
Wayland relies on the fact that the requests are processed in order, so
when the "done" event is received, it means that all the other requests
requested prior to the respective "sync" have been processed already.
This commit makes the ecore_wl_sync() call actually wait for its "done"
event (thus blocking the ecore mainloop).
%f causes 0.0000 to always be printed... changed to %d
to get the desired/correct output result.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
If query at x coord, which points to rigth half of LTR char,
next position will be returned. The same for left half of RTL char.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
We did use this 'begin' boolean to make eina_hash always allocate only
once per item it push in the hash. This boolean was alone at the end of
a structure. It would have costed us 4bytes on 32bits system and 8bytes
on 64bits. Removing it make elemines consume 100KB less on 32bits system.
We may have a speed impact on hash insertion here, but I don't think we
do use eina_hash_add and friends in any hot path, at the moment. If that
was the case there would be some way to mitigate this, just not worth it
at the moment.
Width and height should be swapped when the screen is rotated by 90 or
270 degrees.
Additionally, add a command to the ecore_evas_window_sizes_example which
returns the screen geometry.
Address sanitizer found this. Not really a serious error as text[i] will
be 0 in that case (I believe) and the loop is aborted in any case.
Still, better safe than sorry.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Since the objects are moved by the framespace offset, it must be
considered when populating map points. This is done when the map is
applied to an object (the map points are updated with the framespace
offset of the canvas that is parent of that object.
Additionally, a flag is set on the map struct to indicate that it had
its points updated already to avoid re-adding the offset.
Applications using these functions should not know of any offset. This
patch makes the canvas pointer position to be returned exactly the same
as on X11 backends.
This check makes no sense, since objects can be on outside of the
screen, with negative position, but they still need to be adjusted by
the framespace offset.
Framespace offset adjustment should be applied to every object not
marked with "is_frame".
Additionally, it should be applied only once. Since it is already being
applied on the *_feed_mouse_* functions, there's no need to apply it
again on the _evas_event_source_mouse_* functions, which are called by
the former ones.
Also add the missing adjustment to the feed_mouse_move one.
- mark all children of a given smart object as "is_frame" if the smart
object is also marked as a frame;
- when moving a smart object, use the originally requested move
coordinate to calculate the offset that the children should be moved
too;
- _smart_move_children_relative will fetch the child position with
geometry_get(), this way getting the corrected object position, before
adding the offset.
1. Added evas_obj_image_preload_begin/cancel APIs.
2. Removed evas_obj_image_preload. This accepts 'cancel' as a parameter and it's so confusing to developers.
3. No ChangeLog/NEWS for this change because Eo APIs were not released yet.
4. Discussed with Raster.
5. It's encouraged to use elm_image however. elm_image has elm_image_preload_disabled_set() API.
When user pressed home and ctrl+home, caret is normaly moved to first letter.
But, it is not common behavior for alt+home.
For example, gedit does not have any behavior and urlbar of firefox open
home page when alt+home is pressed.
On some use cases, it is necessary to create a new wl_surface without
associating it to a wl_shell_surface. This new API makes it possible.
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Apparently obj->layer and obj->layer->evas can sometimes be NULL. It is
checked in other objects, for example, image object. Add the checks here
to "fix" a crash reported by Christopher Michael.
The main eeze sensor log domain was EAPI as it was used in the modules as well.
(Gives some nice runtime error when loading the shared object). Switch to different
domains for the module and make the main domain private.
Spotted by zmike.
This memset is not necessary as pack_it_copy can only be accessed when
the part type is a BOX or a TABLE and thus pack_it will be defined. Sadly
GCC 4.7 is more stupid than GCC 4.6 and think that it is an unitialized data
resulting in a massive number of useless warning that could hide real warning.
This is particularly useful when using table and replicating the
same group all over the place. At least for many games I have in mind
this will save a lot of lines !
As cedric said a couple years ago in commit 17c820ae:
"This initialisation is not needed, but will reduce llvm warning noise."
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
* Use an Eina_Hash for the garbage collector list.
* Turn off garbage collection on object that are unlikely to match.
This patch make 1.8 as fast as 1.7 again.
I don't really like this patch. I think it would be nicer to have mmap
been correctly detected when Evil or Exotic is there, but at this point
I don't feel at ease with configure.ac.
In the error case we 'goto' the error path directly without passing
through the declaration and initialization of the variable.
This doesn't work so move the declaration/initialization to the start.
See this example (compile with -Wall for the warning):
-----
#include <stdio.h>
int main(void)
{
goto bar;
int i = 15;
bar:
printf("Foo: %i\n", i);
return 0;
}
----
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
* Use Eina_Hash instead of Eina_List to remember what memory did change.
* Turn off Eina_Cow use of Eina_Magic when doing a release as it is only
used internaly and we should not make any mistake there.
We now need to pass the current class to eo_do_super. This is faster and
more memory efficient and generally lets us do things better.
Using the eo_benchmarks we get ~20% speed-up.
This reverts commit 8ecd30d578.
First of all, if it's not tested it shouldn't be committed. Seriously,
test your stuff before committing, particularly when you *add* an API.
If it slips in and we forget it there, once it's released we can no
longer remove it.
Second, EDBus is a complete wrapper over libdbus and is in our intention
to remove libdbus when the EDBus implements the wire protocol itself.
Therefore there's no point in adding a public function to create an
EDBus_Connection from a DBusConnection, even if it's passed as a void
pointer.
NOTE: if you start your process with Systemd it will automatically use
Journald API. You will need to overide the default logging function to
change that behavior.
This reverts commit c002d113f1.
This commit reliably breaks builds with clang. Please test with
export CC=clang before you commit again.
export CC=clang
./autogen.sh --enable-multisense && make -j 10
The error Jenkins gets (I confirmed locally):
/bin/bash: line 1: 13549 Segmentation fault (core dumped) EFL_RUN_IN_TREE=1 ./bin/edje/edje_cc -id . -fd . -id ./tests/emotion/data tests/emotion/data/theme.edc tests/emotion/data/theme.edj
This patch try to share signal callbacks and automate accross all Edje
object. It does use an Eina_Hash on the callback description (signal,
source, func). There is no need to check it against Edje file or group
only the callbacks matter.
This version remove all use of size_t as it should never be above 32bits.
We have a hard limit on the number of callback to 2^32 now. I am considering
it would be sane to make it a short.
Program received signal SIGSEGV, Segmentation fault.
_edje_emit_cb (ed=ed@entry=0x8ebd68, sig=sig@entry=0x8fba4c
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
warning: Source file is more recent than executable.
1442 eina_list_free(data.matches);
(gdb) bt
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
"focus,part,in", src=0x8222fc "elm.text", sdata=0x0, prop=0 '\000') at
lib/edje/edje_program.c:1366
_pd=0x8222f0, list=0x7fff00000001) at lib/edje/edje_message_queue.c:124
op_type=EO_OP_TYPE_REGULAR, op=564, p_list=0x7fffffffcf28) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ebae0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
(obj=<optimized out>) at lib/edje/edje_message_queue.c:71
(sid=sid@entry=0x8eae88) at elm_interface_scrollable.c:788
(sid=0x8eae88) at elm_interface_scrollable.c:805
_pd=0x8eae88, list=<optimized out>) at elm_interface_scrollable.c:3370
op_type=EO_OP_TYPE_REGULAR, op=840, p_list=0x7fffffffd158) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
_pd=0x8ead70, list=<optimized out>) at elm_entry.c:2804
op_type=EO_OP_TYPE_REGULAR, op=129, p_list=0x7fffffffd328) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:435
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd4a8) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
class_data=<optimized out>, list=<optimized out>) at elm_widget.c:5526
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd628) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_layout.c:2157
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd7b8) at
lib/eo/eo.c:364
op_type=<optimized out>, op=1) at lib/eo/eo.c:463
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd928) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_entry.c:3076
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffdad8) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:1162
elm_entry.c:3068
autorun=0x0) at test.c:441
Revert "edje: reduce memory usage of Edje signal callbacks and automates."
This reverts commit 15aae2c0a4.
It is a very tricky things to get header order right on windows. Having that
order only in .c files simplify the work a lot. So let's try to do it with
Ecore_Evas after it rewrite and split into modules.
This patch try to share signal callbacks and automate accross all Edje
object. It does use an Eina_Hash on the callback description (signal,
source, func). There is no need to check it against Edje file or group
only the callbacks matter.
Be careful, systemd socket activation require you to always order
server socket creation in the same order as defined in the unit file.
This means ecore_con_server_add should always been in the same order
for those of them using systemd socket activation.
This implementation doesn't replace libmount, it just provide an empty
piece of code that will always fail to do anything. It does simplify
Eeze building and use by third party by always providing the API.
It's cleaner. Should have never been a macro. This is part of the effort of
reducing the usage of ({ which is apparently a non standard extension.
We can get rid of most of it and ifdef the rest.
Introduce a new function called evas_object_content_change(). It should
be used when object contents get changed.
The rendering issue involving text objects was due to its map surfaces
not being freed. Thus, evas_object_content_change() is now called in
evas_object_text_text_set() during the relayout of the text for making
sure to get their map surfaces freed before rendering them.
Signed-off-by: Paulo Cavalcanti <paulo.cavalcanti@linux.intel.com>
an existing DBus connection.
This is needed by the python bindings, was done the same way
in edbus1, so it should fit here also
NOTE: I did not test this yet, and I'm not into the edbus code,
so I please who know the code to give a look. thanks
NOTE2: I don't think this need Changelog and stuff as we are probably
the only users of this function, let me know if i'm wrong
EPhysics_Body is an Eina_Inlist, and Eina_Inlist iterator macros use
offsetof(). Since using offsetof in C++ classes is invalid,
EPhysics_Body must be a POD-type struct.
This fixes a mutex allocated on stack, a race on GCond initialization
and use of deprecated functions: g_mutex_new() and friends were
deprecated in glib 2.32.