Commit Graph

13672 Commits

Author SHA1 Message Date
Jean-Philippe Andre 20a5968c12 elm: Use a macro to handle key bindings
This factorizes the code and makes most widgets handle key down events
in the same way:
 - check that the object is not disabled, event is not on hold
 - figure out the key binding based on the class name
 - mark event as on hold

The class name is usually MY_CLASS_NAME but in some cases it was
MY_CLASS_NAME_LEGACY which may be different from the EO class name (eg.
elm_win vs. Efl.Ui.Win). In that case the key bindings are broken.

This breaks key bindings for the following widgets:
 - Win (focus)
 - Image ("clicked")
 - Video (move, play)

This fixes key bindings for the following widgets:
 - Nstate

Some widgets remain broken:
 - Photocam / Efl.Ui.Image.Zoomable

A patch will be applied to restore the key bindings for the above
breaks.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 069747b9de widget: Add eo event info inside widget_event
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.

Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre e8826062eb eo: Define Efl.Event in EO
This can be used in the widgets propagation mechanism later. I don't see
any really good reason to not define this struct in EO anyway.

Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 47070c7d14 widget: Remove import edje_types from EO
Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 1a1b8bc451 evas: Set weight to "expand" by default
This is a semi experimental patch to set the default weight
of objects to (1, 1), i.e. EXPAND. This seems like a more
sensible default value than no weight. Some objects may not
need the expand weight, but this seems to be the minority,
not the majority.

Ref T5301
2017-08-23 11:16:45 +09:00
Felipe Magno de Almeida a7649a7897 eolian-cxx: Add workaround for function pointer types 2017-08-22 22:40:13 -03:00
Daniel Zaoui 2f53bdfe60 Move efl interfaces from evas to efl directory
You may need to remove your installed directory to avoid conflicts
2017-08-22 09:53:24 +03:00
Woochan Lee d1631d8a86 elm_spinner: Support min,max filter for float format case.
Summary: The previous min, max filter doesn't support float format case.

Test Plan: elementary_test -> spinner.

Reviewers: jpeg, cedric, woohyun, myoungwoon

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5016
2017-08-22 14:42:27 +09:00
Woochan Lee 4656f98e22 efl_ui_clock: Parses the format recursively.
Summary:
Some of locale formats convert as extension format.
For example,
             uk_UA d_t_fmt is "%a, %d-%b-%Y %X %z".
             The %X will convert as %T.
             The %T format has to convert one more time to convert as %H:%M:%S.

ref : https://lh.2xlibre.net/locale/uk_UA/

We need to parse the format recursively to support that kind of case.

@fix

Test Plan:
Change the locale as uk_UA.
Run elementary_test -> datetime
See the time field is not appear.

Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5021
2017-08-22 14:17:41 +09:00
Jean-Philippe Andre 76d4c965c4 evas: Add safety checks to avoid crash
Without more information or clear reproduction scenario (this crash
doesn't happen for me), this is probably the best we can do.

Fixes T5532
2017-08-22 11:50:31 +09:00
Jean-Philippe Andre ba36214a47 evas: Fix experimental code related to visibility
This is to pretend the object is visible when it's been added with
efl_add but evas hasn't started rendering yet (it's in the queue).

This code is not enabled (yet?) although I think it could very well be
(I don't observe the same bugs as I did the first time I tried this
patch).
2017-08-22 09:44:07 +09:00
Jean-Philippe Andre 85d04a74d4 elm_box: Fix support of aspect hints
Test scenario: ephoto without a recent patch (47fe2b9ab03c151b0f4).
Before any further explanation, ephoto was definitely misusing the
aspect API here. A label most definitely shouldn't be sized based on an
aspect ratio, that's just crazy (you really want to make it as tall as
it's wide?)

If a box has an aspected item, it needs to run its min calc loop twice:
 1. Once to determine the "true" min size in the direction of the box
    (ie.  in X in case of a horizontal box), and
 2. Once more in order to apply the aspect ratio to aspected items and
    augment the perpendicular min size (ie. Y for horizontal).

After that, it can go and layout the items based on the available size.

As we may guess from the above description (1) determines min W and
(2) determines min H (in horizontal mode).

BUT, there were two problems:
 - The wrong item min size was used inside the 2nd loop (the code was
   not symmetrical between horizontal and vertical modes). These are the
   changes in _smart_extents_non_homogeneous_calc.
 - The box min length was based on the actual size of aspected items,
   rather than their min size. This goes against the observation. These
   are the changes in _smart_extents_calculate.

Ref T5888

@fix
2017-08-21 18:35:31 +09:00
Jean-Philippe Andre 7270a98d8c popup: Avoid error messages on NULL
Those were spotted in ephoto (with no config, first run).
2017-08-21 16:30:21 +09:00
Jean-Philippe Andre d44cbb618a glview: Fix ALWAYS render policy
@fix
2017-08-21 13:53:29 +09:00
Amitesh Singh e2724b300d elm segment control: delete event cbs on obj delete.
@fix
2017-08-19 16:32:59 +09:00
Derek Foreman 913e216ea3 ecore_wl2: Send configure complete when windows don't need configure
The intent of the "configure complete" event is to indicate that the
window is configured and ready to receive buffers.

For "windows" like mouse cursors, that's immediate - let them know.
2017-08-18 14:27:32 -05:00
Derek Foreman 9df39b5616 ecore_wl2: Refactor out code to send window configure complete event 2017-08-18 14:27:32 -05:00
Derek Foreman 51768ff62b ecore_wl2: Add ecore_wl2_window_buffer_attach API
Let ecore_wl2 track some buffer related state so we can more easily sync
things between ecore_evas and the evas_engines.
2017-08-18 14:27:32 -05:00
Derek Foreman 8f038b2591 ecore_wl2: Add new APIs ecore_wl2_window_frame_callback_add/del()
Abstract frame callbacks through ecore_wl2_window so we can add them in
multiple places without having the wayland compositor generate more than
one.

Also allows us to keep a callback registered over hide/unhide of a window
easily.
2017-08-18 14:27:32 -05:00
Derek Foreman b599b1b900 ecore_wl2: Add API ecore_wl2_window_pending_get()
Lets us test if a commit has been requested but the compositor hasn't
yet told use to draw new content for it.
2017-08-18 14:27:32 -05:00
Derek Foreman 11d3bf7939 ecore_wl2: Add API ecore_wl2_window_commit()
Abstract wl_surface commits in ecore_wl2_window.
2017-08-18 14:27:32 -05:00
Mike Blumenkrantz dc073c1ea3 wayland: fix num/caps lock handling in events
locks are not the same as modifiers, and the corresponding event flag must
be set based on whichever value(s) are set instead of yolo mixing and matching

@fix

ref T5737
2017-08-18 15:24:37 -04:00
Mike Blumenkrantz 850bba4986 evas: make top object returning functions return the top object
this previously just returned the top clipper at the specified points

@fix
2017-08-18 15:24:37 -04:00
Bryce Harrington 829cc94aee ecore_sdl: Add API doc for ecore_sdl_feed_events
Reviewers: cedric, devilhorns

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5097
2017-08-18 09:48:59 -04:00
Jean-Philippe Andre 49d339b72e elm_color_class: Save all cc overlays
It seems that cc overlays that didn't change got lost in the process of
saving elm_config and then reloading it (automatically happens because
the file changed... which we just wrote to).

Fixes T3682
2017-08-18 16:54:58 +09:00
Jean-Philippe Andre 9008dd88bc colorselector: Fix invalid API (orient vs. dir) 2017-08-18 16:54:58 +09:00
Jean-Philippe Andre fb57bc0106 elm_config: Add env var to skip profile save
This only skips writing the profile name to
  ~/.elementary/config/profile.cfg

This allows easier testing of elementaryt apps (and E) with custom
profiles.

export ELM_PROFILE_NOSAVE=1
2017-08-18 16:38:15 +09:00
Cedric BAIL a21f25b0eb evas: do not double include interface.
This lead to unproperly defined symbol (as they should be build in libefl) on
windows with actually no need for it.
2017-08-17 15:02:11 -07:00
Bryce Harrington 67fff04cc7 evas: Fix spelling/grammar errors
Summary:
Fixes some basic punctuation and grammar errors, corrects spelling and
word order/choice in various places.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5098
2017-08-17 10:45:35 -04:00
Bryce Harrington f377f722e6 evas: Drop excessive use of 'just' and 'which'
Reviewers: cedric, devilhorns

Reviewed By: devilhorns

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5099
2017-08-17 10:44:05 -04:00
Bryce Harrington c4a5b7b19c evas_rectangle_main: Whitespace cleanup
Summary: Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5100
2017-08-17 10:43:08 -04:00
Bryce Harrington e3e2a37b0f elput: Fix @brief's in docs
Summary:
It is not necessary to specify @brief since the first line will
automatically be used, but if it is used it should be only for the brief
description, not the detailed description.

Also reformat other docs in this file to follow convention for the brief
docs.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5101
2017-08-17 10:41:26 -04:00
Jean-Philippe Andre c7ca7221ab evas: Fix auto-show of EO objects
Objects show should happen as early as possible during the render cycle,
as it affects smart objects calculation and everything else.

Thanks @JackDanielZ for the report!

Fixes T5880
2017-08-17 10:28:10 +09:00
Thiep Ha 7d5e5f749e ui.box: add aspect ratio support
Adding support for aspect ratio.

ref T5487
2017-08-17 10:04:36 +09:00
Thiep Ha 5ab5d823fa ui.box: Add handling for weight + align
Issue: If the item has weight and non-filled align, item is not resized.
This patch fixes this issue.
Test: elementary_test -> ui.box -> Equal weight. Buttons Btn1, BtnA, B, C
do not resize when resize the window.

ref T5487
2017-08-17 07:56:23 +09:00
Gustavo Sverzut Barbieri 4cd1257b1b value size is stored in type, no need to manually specify them. 2017-08-15 19:01:23 -03:00
Vincent Torri dee65b525c ector: fix EAPI on Windows
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-15 14:13:25 -07:00
Cedric BAIL b5cede94ea eina: add an API to check if a pointer is a valid element of a mempool. 2017-08-15 13:46:34 -07:00
Vincent Torri 45bcc87e76 eio: fix correct stat structure on Windows 32 bits
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-14 10:17:24 -07:00
Vincent Torri 15108ecad0 evas: move EAPI undef to the correct place
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-14 10:16:44 -07:00
Vincent Torri 9816cc90b2 evas: undef EAPI properly.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-14 10:16:19 -07:00
Mike Blumenkrantz 595aa6bbb4 efl: add EFL_VERSION_1_21
indicate that features from this version can be used
2017-08-14 07:25:04 -04:00
Amitesh Singh b3532d16ab Efl.ui.panes: move legacy APIs at bottom of file 2017-08-14 09:55:38 +09:00
Cedric Bail a0ee90d9f3 Revert "evas: we should be able to access this data during an object being destroyed."
This reverts commit 207cab086f.

Better make efl_data_scope_safe_get work during EFL_EVENT_DEL.
2017-08-13 13:18:08 -07:00
Cedric Bail 87acc90fc7 eo: only return NULL when the object is destructed.
There is a problem with the previous version. The object can still be
alive due to the use of manual_free in evas. So you wouldn't be able
for example to remove a callback from an object that hasn't been
destroyed yet. If that callback is triggered by the destruction
of the object, you would end up with an unexpected and impossible to
prevent effect of access after free on a callback that you had removed.

Not sure if that still solve the original problem that the code was
trying to prevent in Ecore_Evas.
2017-08-13 13:18:04 -07:00
Marcel Hollerbach 190af04983 ecore_evas: define the predefine for wl2 instead of wayland 2017-08-12 15:30:53 +02:00
Mike Blumenkrantz e40435a1b0 efl-wl: max size of 0x0 from shell is -1x-1 in efl 2017-08-11 18:43:13 -04:00
Mike Blumenkrantz 0303805ef7 efl-wl: initialize seat keymap fd to -1
@fix
2017-08-11 18:43:13 -04:00
Mike Blumenkrantz c03ea430ab ecore: always set delete_me before removing fd from poll
ensure bad fds don't immediately get re-added to polling

@fix
2017-08-11 18:43:13 -04:00
Mike Blumenkrantz 302237fa77 efl-wl: handle case where eglBindWaylandDisplay fails
@fix
2017-08-11 18:43:13 -04:00