Commit Graph

298 Commits

Author SHA1 Message Date
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Jean-Philippe Andre b8ca1272ae evas: Add seat argument to 'pointer_inside' (EO)
This merges pointer_inside and pointer_inside_by_device.
Affects only EO.
2017-11-01 11:22:33 +09:00
Mike Blumenkrantz ed30f41de8 wayland: add support for efl weight hint propagation from elm_win to efl_wl
@feature
2017-10-25 10:44:16 -04:00
Mike Blumenkrantz ffac7fc539 wayland: fix window stack implementation
ref T5350
2017-10-25 10:44:16 -04:00
Jean-Philippe Andre 006546a042 elm: Use auto_unref for parts
This avoids leaks.
2017-10-24 14:49:12 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Lukasz Stanislawski 57aefc53c1 elm: rename Elm_Interface_Atspi_Accessible interface
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5341
2017-10-19 10:13:54 +09:00
Jean-Philippe Andre dfd98b3e48 win: Do not forward all key events on win (legacy)
OMG... I do not like this patch.

See T6148, two key down events are received when a key grab is installed
on a Win object. This is because all input events are propagated from
ecore all the way up to win and can be listened on. Unfortunately this
breaks existing applications that use the key grab API properly to
listen to key events.

Another side effect is that ALL key events are received by the window,
which means it's not limited to what the application expected (from its
list of grabs).

Solution (ugly): block propagation of key down/up events if the window
is a legacy window. This means that no key grab is required for EO
windows, but key grabs are still required for legacy windows.

Fixes T6148

@fix
2017-10-18 21:01:56 +09:00
Jean-Philippe Andre b5c241ca08 frame: Implement content set/get/unset
Not a huge fan of my macro as it uses efl_part() where a direct call
could be possible, depending on the widget (win can, frame can't).

See D5241
2017-10-17 17:31:38 +09:00
Jean-Philippe Andre c9c9e6a209 elm: Rename Elm.Activate to Efl.Ui.Activate
Note: This is an EO-only beta API.

Ref T5329
2017-10-17 17:31:38 +09:00
Marcel Hollerbach 75f5ea686f efl_ui_focus: add parent_provider
thats just a little helper, where the logic to find and fetch the
provider is bound to the position in the widget tree, this means that
for example gengrid could change the way the logical parent is
evalulated. (For example to map the logical parent to a item)
2017-10-13 12:31:47 +02:00
Jean-Philippe Andre ccee1c0944 eo: Simplify debug_name_override
Simply pass in the strbuf and don't expect the callee to own it. This
makes things simpler and safer (it'll crash only if the callee frees
said strbuf, and shouldn't leak). efl_ebug_name is new in the upcoming
release, EFL 1.21.

Realised this after talking with Amitesh. Thanks.

See 999dbd9764
And c4769ff898
2017-10-13 10:57:00 +09:00
Marcel Hollerbach 8453ebfe4e elm: move the focus direction definition to general
and remove the old definition
2017-10-10 19:28:48 +02:00
Marcel Hollerbach 17e730e8e0 efl_ui_win: port to new focus api! 2017-10-10 19:28:48 +02:00
Jean-Philippe Andre 4c0167916b focus: Avoid infinite loop in window
I kept the safety error message for easier debugging.
Test scenario:
  elementary_test -to "Window Inline"
  Click on an entry. Press Shift+Tab.

Ping @bu5hm4n
2017-10-10 19:32:50 +09:00
Carsten Haitzler 49df80aa6f efl ui win - quieten coverity complaint about dead code
the count ?: 1 check is pointless as count is already checked above.
make it clearer that it's > 0 and remove the ? check. silence for
coverity CID 1380542
2017-09-28 15:28:00 +09:00
Cedric BAIL 1ac4a03d4f elementary: avoid segfault when getting focus due to an infinite recursion.
This was two line switched and setting the callbacks on the wrong object.
2017-09-26 15:21:12 -07:00
Cedric BAIL 0b8e3e6fcf elementary: restore input propagation and destroy array properly. 2017-09-26 10:15:07 -07:00
Jean-Philippe Andre 56667a84b1 win: Remove invalid callbacks
Faulty commit (guess who?):
  596dba5fe5

See also d567faa778

Finally make check works again. That was... a painful lot of patches to
fix.
2017-09-26 18:15:45 +09:00
Jean-Philippe Andre e1df334caf Revert "Fix infinite recursion for legacy + efl ui win events"
This reverts commit d567faa778.

This is not trying to fix the root cause for the infinite loop.
2017-09-26 18:11:38 +09:00
Jean-Philippe Andre 5258a6d46f win: Avoid calling same function twice on shutdown
This avoids calling:
  ecore_evas_callback_delete_request_set
  ecore_evas_callback_resize_set
twice when deleting a window. Also adds safety over sd->ee.
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre c2ae93089b win: Avoid safety ERR in efreet
This is an error happening in make check. Annoying but mostly harmless.
2017-09-26 17:58:07 +09:00
Sungtaek Hong ebff5e8639 elm_bg: rename elm_bg to Efl.Ui.Bg
Summary:
elm_bg was supposed to be used only in legacy,
but since we need a common object to be used as a background of widgets,
it is now renamed as efl_ui_bg and supports EO APIs.

Reviewers: cedric, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D5147
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 8557fe818f input: Move pointer props to Canvas
efl_input_pointer_position is defined by two classes... bad!

Fixes T6066
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre e9dfcb44ff widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 839c4ed395 elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
2017-09-26 17:58:07 +09:00
Carsten Haitzler d567faa778 Fix infinite recursion for legacy + efl ui win events 2017-09-26 16:44:45 +09:00
Cedric BAIL 596dba5fe5 elementary: provide and implement lifecycle event on the window.
pause event means that the window is not visible anymore to any user.
resume is triggered when the window became visible again or just
became visible again.
2017-09-25 15:48:53 -07:00
Jean-Philippe Andre 0339ad7740 elm: Move base implementation for efl_part in widget
This means that ALL part handles inherit from the base part class
Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is
specially overridden.

This is a first step towards generic part APIs, including background in
all widgets.
2017-09-21 12:27:33 +09:00
Jean-Philippe Andre 3617053547 win: Use Eina.Size2D for pointer position
Also rename the function for more consistency.
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre e4517b28d6 efl: Use Eina.Size2D for screen size
This API isn't so great when considering Wayland...
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 2df8ad36b4 evas: Use Eina.Slice on the stack (gfx.buffer) 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 1f242afdef evas: Use Eina.Size2D for gfx.buffer
For consistency.
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 686366a03b evas: Use Eina.Rect for object list functions
- objects_at_xy_get
- object_top_at_xy_get
- objects_in_rectangle_get
- object_top_in_rectangle_get
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre bfd9487b94 efl: Use Eina.Size2D for Efl.Canvas.max_image_size
Rarely use
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre d8eea084fb efl: Use Eina.Size2D for size hint aspect 2017-09-18 16:50:58 +09:00
Jean-Philippe Andre 6b5d155918 efl: Use Eina.Size2D for size hints base & step 2017-09-18 16:38:47 +09:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 7d2b4b6916 efl: Use Eina.Size2D for size hint restricted min
This is the "internal" or "intrinsic" minimum size, to be set by EFL and
not by applications.
2017-09-18 14:57:52 +09:00
Jean-Philippe Andre d24dcb3c24 efl: Use Eina.Size2D for size hint max 2017-09-18 14:20:03 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
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
2017-09-18 13:22:52 +09:00
Jean-Philippe Andre 58c2c50dcc efl_access: Use Eina.Rectangle (EO) 2017-09-13 18:20:45 +09:00
Jean-Philippe Andre 13da5e980e efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers
for stack rectangles).
2017-09-13 18:03:34 +09:00
Jean-Philippe Andre d5a31f3f30 edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.

As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.

Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.

Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.

This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)

Ref T5315
Ref T5306
2017-09-13 13:53:49 +09:00
Jean-Philippe Andre 6d0957b0a5 widget: Rename focus_manager_factory to create
factory is not a verb :)

Ref T5363
2017-09-13 13:43:55 +09:00
Lukasz Stanislawski 9cf8e75668 elm: rename Elm.Interface.Atspi.Component => Efl.Access.Component
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5164
2017-09-12 15:49:29 +09:00
Lukasz Stanislawski dfd17229fd elm: rename Elm.Interface.Atspi.Window => Efl.Access.Window
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5162
2017-09-12 15:48:10 +09:00
Marcel Hollerbach 6a12d9c367 efl_ui_win: specify the correct manager
a widget in higher hirachies is not registered in the lower one.
2017-09-02 20:06:15 +02:00