Commit Graph

1850 Commits

Author SHA1 Message Date
Daniel Kolesa 4fa4be2b14 evas_textgrid: remove pointers 2016-11-03 17:13:30 +01:00
Daniel Kolesa df47f92236 evas_box: remove pointers 2016-11-03 17:13:00 +01:00
Daniel Kolesa 713df88b66 efl_canvas_output: remove pointer 2016-11-03 17:10:40 +01:00
Daniel Kolesa 01117bf898 efl_vg: remove pointer 2016-11-03 17:10:01 +01:00
Daniel Kolesa af45994679 evas_canvas3d_light: remove pointer 2016-11-03 17:09:22 +01:00
Daniel Kolesa db3bbe821f evas_canvas3d_node: remove pointers 2016-11-03 17:08:54 +01:00
Daniel Kolesa 418f68020f evas_canvas3d_primitive: remove pointer 2016-11-03 17:08:10 +01:00
Daniel Kolesa 137afa68ad evas_canvas3d_mesh: remove pointers 2016-11-03 17:07:46 +01:00
Daniel Kolesa b347c05f11 evas_canvas3d_camera: remove pointer 2016-11-03 17:07:15 +01:00
Daniel Kolesa 06e0473a79 evas_canvas: remove pointers 2016-11-03 17:06:28 +01:00
Daniel Kolesa cbe42ac34d efl_canvas_text: remove pointers 2016-11-03 17:05:00 +01:00
Daniel Kolesa d433f1e73c efl_canvas_text_cursor: remove pointers 2016-11-03 17:04:00 +01:00
Daniel Kolesa 3c4e0ff76e efl_input_event: remove pointer 2016-11-03 16:53:33 +01:00
Stefan Schmidt 049bf0247c docs: evas: document various type defines 2016-11-03 11:57:40 +01:00
Jean-Philippe Andre b96b2aafcb evas: Fix warning with va_start in internal EAPI
Clang 3.9.0 told me:
  warning: passing an object that undergoes default argument
  promotion to 'va_start' has undefined behavior [-Wvarargs]

So I told it to shut up and changed Eina_Bool to int.

Note that edje_edit_state_external_param_set has the same issue.
2016-11-03 17:22:15 +09:00
Jean-Philippe Andre d0333561be evas: Add some safety code to evas_clip
I'm trying to fix a crash that seems to happens in some very odd
circumstances under stress testing. I have absolutely no idea
what is going wrong... So let's just add some extra safety.
2016-11-03 17:22:15 +09:00
Jean-Philippe Andre 7f25f19b47 evas: Simplify intercept code
I'm trying to fix a bug. This is not changing logic in any way,
just factorizes the use of va_args.
2016-11-03 17:22:15 +09:00
Jean-Philippe Andre a8ff76eb0d evas: Fix debug logs with REND_DBG (typo) 2016-11-03 17:22:14 +09:00
Jean-Philippe Andre 4d1c53d916 evas: Avoid calling render() on smart objects
Smart objects do not render themselves. This can avoid a
bit of extra unnecessary work.
2016-11-03 17:22:14 +09:00
Guilherme Iscaro 402abcaefc Evas Device: Avoid invalid ptr indirection.
Summary:
When Evas is deleted the function _evas_device_cleanup() goes thru all
devices and unref them. Since Evas_Devices are Efl_Input_Device, the user
may still hold a reference to the device (efl_ref()),
thus causing the device to do not be deleted *yet*.
This causes a problem, because when the user calls efl_unref()
and the device itself is deleted the Evas _del_cb
callback will be called and will try to access the Evas_Public_Data from
a deleted object.
In order to avoid this problem all devices will be kept in the devices
list and Evas will unregister the EFL_EVENT_DEL from those devices that
were not deleted.

Reviewers: jpeg, bdilly, barbieri, cedric

Reviewed By: bdilly, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4369
2016-11-01 16:03:52 -02:00
Carsten Haitzler 860e0d34b0 obj caching - add a reuse in key event objects too to nuke leaks
new leak since sink was added.
2016-10-28 22:58:36 +09:00
Tom Hacohen f2e049c818 Input events cache: use the new mechanism to reuse eo objects. 2016-10-28 13:20:56 +01:00
Carsten Haitzler b533f15880 evas - fix smart clipped if a move happens to recurse within itself
so since this uses new pos - cur pos to move BY x pixels... there is
an issue that if the move of the obj ends up re-moving the current obj
TO the same pos. it moved BY the same delta again thus racing ahead.
not great. because x/y is not stored until the call stack returns to
after the smart move func and the pos set storce the new position in
the object struct. the easiest way atm until we have relative
positioning etc. is to store this in the smart obj and use the delta
at that time of the call then store it immediately so a recursion ends
up with a delta of 0 if its the same pos, so go back to where we were.

this fixes a nasty issue i spotted in fileselector that made filesel
icons race along when scrolling 2x as fast as everything else. oddly i
couldnt see this in any other widget that scrolled when i looked...
which is odd, but... either way a nasty issue... subtle... and now
fixed. never saw this before so this seems new.
2016-10-28 08:21:50 +09:00
Stefan Schmidt 21f935c39c docs: evas: document missing structs 2016-10-27 18:22:42 +02:00
Stefan Schmidt 6f25878665 docs: fix the last missing enum field docs all over the tree
With this comit we reach 100% eo doc coverage for enum fields. Keep it like
this. :)
2016-10-27 00:26:16 +02:00
Stefan Schmidt 1183e64fb3 docs: evas 3d: update and correct some docs for 3d object class 2016-10-27 00:03:01 +02:00
Stefan Schmidt 67282977a1 docs: evas_types: finishing up documenting all enum types in evas_types 2016-10-27 00:03:01 +02:00
Jean-Philippe Andre 40fec5f608 evas: Fix legacy events output vs. canvas coords
In case of a mapped object (eg. when applying a map to a window
in wayland compositor), the canvas and output coordinates are
not meant to be the same.

In EO land, applications should instead use the common interface
Efl.Input.Interface.pointer_xy.get (on the canvas).

@fix
2016-10-26 13:42:54 +09:00
Subhransu Mohanty 4f16e16b94 evas: vg/gradient - add missing legacy api for gradient object creation.
Reviewers: jpeg, Hermet, artem.popov, cedric

Reviewed By: artem.popov, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4331

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-25 14:37:11 -07:00
Stefan Schmidt 1ed2b0fbde docs: document all missing enums
With this commit we reach 100% enum doc coverage. The fields in the enums are
still at 91%, but there is progress on that front as well.
2016-10-25 16:08:25 +02:00
Chris Michael 9c9c8809a7 evas: Fix framespace object clipping detection
This patch fixes an issue where border icons were missing when running
EFL Wayland client applications. This also fixes the issue where
softcursor mouse pointers would not draw over bottom window border.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-24 13:08:00 -04:00
Marcel Hollerbach 0180da708d evas_callbacks: restore error message behaviour from MAGIC_CHECK
before changing MAGIC_CHECK to eo_isa passing NULL to a function would
result in nothing, now it gives a error message. This restores the old
behaviour.
2016-10-22 19:26:47 +02:00
Chris Michael 0f6c33eff1 evas: Fix issue of wayland clients not drawing border icons
Due to commit 7ce79be1a1, EFL Wayland
Client applications stopped rendering their window icons. This was due
to the code which tried to detect if an object is in framespace.
Previous version would just check the obj->is_frame flag ... which is
insufficient to determine if an object is in Framespace. This commit
fixes that issue by checking an objects geometry also.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-21 15:32:47 -04:00
Subhransu Mohanty 9b7ac51943 evas/map: do nothing when same map is set again
Reviewers: cedric, Hermet, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4344
2016-10-17 10:49:10 +09:00
Jean-Philippe Andre 2fc23aa561 evas: Fix evas_object_smart_clipped_clipper_get
This was broken for smart objects that are not "clipped smart
objects". This fixes the example evas_smart_object.

NOTE: This EAPI was removed in efl-1.18!
/!\ This was an uncaught API break between 1.17 and 1.18 /!\

@fix
2016-10-14 14:00:02 +09:00
Jean-Philippe Andre 9b9c044865 evas: Improve render debug logs
Compiled out by default
2016-10-14 13:59:41 +09:00
Chris Michael fa5e4c252f evas: Fix directly dereferencing pointer which may be NULL
Coverity reports this as a dereference before null check which implies
that 'cur' May be null here, so let's not use it before we check it.

Fixes CID1363765

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-13 12:50:12 -04:00
Chris Michael 7633696cb6 evas: Fix directly dereferencing pointer which may be NULL
Coverity reports this as a dereference before null check which implies
that 'pd' May be null here, so let's not use it before we check it.

Fixes CID1364114

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-13 12:47:38 -04:00
Chris Michael 61643e6a06 evas: Fix missing varargs cleanup
This patch fixes Coverity CID1364123 which reports that (in some
cases) va_end was not being called for var args. As they were
previously initialized with va_start, then va_end should be getting
called.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-13 12:43:44 -04:00
Jean-Philippe Andre c5ffad3731 evas: Use proper type in smart objects API (eo) 2016-10-13 10:25:20 +09:00
Jean-Philippe Andre 9bf0df8f32 evas: Mark group_add/del as internal
Lacking a proper internal tag, I'm using both protected (it is
in fact a protected access function) and beta (to mark as unstable,
not real API).

New smart objects based on EO only should rely on constructor,
finalize and destructor exclusively. In theory, this should be fine.

Unfortunately it may be impossible to inherit from the Efl.Ui.Win
class as it uses a really bad hack and calls super.constructor
inside the finalize method.
2016-10-12 11:47:50 +09:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre a0b8408021 evas: Move move_children_relative to legacy only
While this kind of API seems to make sense with smart objects
(relative coordinates), it is currently not used apart from
the smart object class itself.

So, for now, I'm moving this to legacy to clean up Efl.Canvas.Group
and we can later add the equivalent in a clean "group" API.
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 62abe2cbff evas: Move clip_unset to legacy, remove group_clip
Similarly to group_color_set, group_clip_[un]set should not
exist and should be a result of efl_super and inheritance.

This patch also removes clip_unset from the EO API and keeps
only clip_set(NULL). The reason is that it will avoid bad overrides
of clip_unset() vs. clip_unset(NULL). This also simplifies the code
a bit. Ideally we should be able to reintroduce clip_unset in EO
if we can have a "@final" tag (like java's final keyword), to
prevent overrides.
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 52969ccd9b evas: Remove method group_color_set
Widgets should simply override efl_gfx_color_set and call
super all the way up to evas object.

Legacy compatibility with call interceptors and early call
abortion (eg. delete_me or obj->layer == NULL) are implemented
with an internal call. See the previous commit introducing the
API.
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre 39949b022d evas: Add pseudo-internal API to intercept basic calls
This is a poor man's solution to get rid of group functions such
as clip_set, clip_unset, color_set, etc... See the following
commits.

This API needs to be EAPI for elementary but shouldn't be used
outside EFL. This is required purely for legacy compatibility.

Here's the call flow, inside show(obj):
1. if (intercept_show(obj)) return;
2. show(super(obj));
3. do other stuff
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre dfc3f9deab evas: Simplify code with intercept macros 2016-10-12 11:25:55 +09:00
Jean-Philippe Andre 9e235faf90 evas_data: Fix safety checks in evas_object_data
This relies on efl_isa rather than the broken magic check
(by broken I mean it only checks for NULL).
2016-10-12 11:25:55 +09:00