Commit Graph

57 Commits

Author SHA1 Message Date
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Thiep Ha 35339504b0 dnd: add efl_ui_dnd_container
efl_ui_dnd_container is the interface of dnd for container objects.
2018-01-11 17:56:24 +09:00
Thiep Ha 763daa870e cnp_dnd: add selection manager
Selection manager implements functions for selection (cnp)
and drag and drop.
All objects can uses it APIs. It also supports multi-seat.
2018-01-11 17:56:24 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Carsten Haitzler b7eb3c5fe8 elm_priv.h - improve defines, EAPI EWAPI etc. because sub-includes need
this also makes it build for windows
2017-12-27 14:54:13 +09:00
Sungtaek Hong dd4467505e efl_ui_widget: find new edc resource for efl_ui_widgets
new eo widgets(efl_ui_ prefix) finds new edc group in
data/elementary/themes/edc/efl/*.edc.
New group name is "klass/group:style" and "base" group name and
"default" style name can be omitted.

for now, separator for style is ':' but needs to be decided.
2017-12-08 15:57:26 +09:00
Marcel Hollerbach 53052abaa6 elm_widget_item: refactor logic from gengrid into seperated class 2017-11-11 20:21:56 +01:00
Marcel Hollerbach 1ff0d6462b elm_widget: add a new api for directly reevalulating widgets
usefull if the provider changes
2017-11-11 20:21:56 +01:00
Mike Blumenkrantz fd00e3de1a elm_config: add offline and powersave config members
these will be used by enlightenment in the future to notify applications of
global system states

@feature
2017-10-25 10:44:16 -04:00
Carsten Haitzler 64529eac19 elm config - finish flagging all other values that can be set by api
this now means any app that called elm_config_*set on any field at all
will keep what it set forever until it changes it even if shared/core
config changed.
2017-10-19 17:32:47 +09:00
Carsten Haitzler a04d8a929a elm config - track which vars you set locally and keep them as-is
this now flags about 1/4 of the config vars in elm config if you set
them locally so they wont change on conifg reload. i have just started
and this is the first batch. needs more work.
2017-10-19 17:32:47 +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
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
Marcel Hollerbach 9790de4b0c elm: include those headers in Elementary.h 2017-10-11 09:51:33 +02:00
Marcel Hollerbach 6ba107b899 elm: introduce efl_ui_focus_layer
what it does is described in the mixin

this commit refactors inwin hover popup ctxpopup to use that behaviour.
Since it should do exactly that.
2017-10-10 19:28:47 +02:00
Jean-Philippe Andre e401b223f8 elm: Delete atspi root object on shutdown
Ugly implementation but this will do.

@fix
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre a2729d119d widget: Remove part_text from EO
It should be implemented as a efl_part() API.

For now I've only done a quick hack, as the only overrides were:

 - notify: already a Part implementation. Also it turns out the default
   theme does not even have any text part in the notify group.

 - combobox: not a Part implementation, but also very badly defined wrt.
   parts in general. efl_part() is handled by the parent class (button)
   which makes it tricky to override just for one function.

With this patch I'm trying to keep the same behaviour as earlier (where
efl_part() is used for layouts and there is a special path for
combobox).

Ref T5363
2017-08-30 18:33:15 +09:00
Daniel Zaoui 4337e77669 Fix PS3 backend removal (Cedric...)
When running elementary_test with ELM_ENGINE='buffer', we got a crash.
The removal of PS3 backend patch didn't remove ELM_SOFTWARE_PSL1GHT and
didn't shift the _elm_engines indexes.
ELM_SOFTWARE_DDRAW stayed at the index 13 (value NULL) instead of moving
to index 12.
A strcmp with NULL occurred, leading to the crash.

@Cedric, I excuse you to not have run Exactness your code before pushing
:P
2017-08-29 15:21:12 +03:00
Jean-Philippe Andre e9dffa723d win: Add Efl.Ui.Win_Inlined and remove parent2
Inlined windows are the only use case for parent2. We might as well want
to create a separate subclass for those special windows.

Ref T5322
Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre b588cefbae config: Automatically fix some key bindings
This changes the name used in the config file, without changing the
system config files yet. This restores key bindings for:
 - Win
 - Image
 - Video
 - Photocam

See also the previous commit.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre c4ac589455 widget: Remove all legacy event stuff in propagate
The EO API is now clean! Yay!

Ref T5363
2017-08-23 11:16:45 +09:00
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 6372dcdc2d grid: Switch to Efl.Ui.Dir (EO)
Ref T5870
2017-08-10 14:42:08 +09:00
Jean-Philippe Andre b1488b98de efl.ui.box: Switch to Efl.Ui.Dir (EO)
This makes the default box vertical, just like in legacy.
The flow box is horizontal by default.

Ref T5870
2017-08-10 14:42:08 +09:00
Jean-Philippe Andre dee61f4097 elm: Cleanup theme and style set functions
This makes efl_ui_layout_theme_set() return a Theme_Apply error
code. The type is now public as Efl.Ui.Theme.Apply.

Ref T5329
Ref T5363
2017-08-09 17:08:24 +09:00
Jean-Philippe Andre ad6e3ce3df elm: Add missing undef EAPI to Elementary.h
This may solve issues on Windows where EAPI can be either dllimport or
dllexport. Anyway keeping EAPI defined is invalid and inconsistent.

Also, change an invalid EO_BETA_API define tag to EFL_BETA_API_SUPPORT
and EFL_EO_API_SUPPORT.

Thanks @vtorri for the report!

@fix
2017-08-09 13:26:54 +09:00
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00
Jean-Philippe Andre 6864495c99 elm: Move elm_layout_sizing_eval to legacy
elm_layout_sizing_eval() marks an object as requiring recalc.

Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification

I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.

Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.

Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.

Ref T5315
2017-08-08 11:10:56 +09:00
Jean-Philippe Andre 3e5cfb83c0 elm: Remove custom layout signal APIs
This merges them with the now standard interface:
  Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).

Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.

As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 796d4b138b elm: Make content and text aliases internal only
This removes the APIs from the EO API.

Ref T5315
2017-08-04 10:24:03 +09:00
Amitesh Singh bd1ee1b083 Efl.Ui.Image.Zoomable: implement Ui.Image.icon property
@feature
2017-06-02 18:32:09 +09:00
Jean-Philippe Andre 83a294664e elm: Try to fix build (linking failure)
This should expose the proper definition of EAPI before including
elm_widget.h, as elm modules call internal APIs from elementary.

Thanks Mykyta for the report!
2017-05-22 13:28:15 +09:00
Jean-Philippe Andre 4310e641cd evas: Make Efl.Canvas.Object.type internal 2017-05-19 14:07:00 +09:00
Marcel Hollerbach fb6c37f16f elementary: introduce helper functions for the redirects 2017-04-20 14:38:59 +02:00
Carsten Haitzler b8af191a20 fix entry selection by having proper cfg update and def fields
this should fix T5183
2017-02-17 17:21:20 +09:00
Jee-Yong Um ab68723b60 elm.entry: add configuration for the default value of select_allow
Summary:
Small devices (like smart watch) can disallow entry selection by default.
This patch enables to control this behavior with elementary configuration.

Reviewers: cedric, jpeg

Subscribers: id213sin, woohyun

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 14:17:47 -08:00
Andy Williams 9bdaf07d6e elm_code: remove unneeded init code.
Move elm_code init to the main elementary as that's where it lives
2017-01-01 20:10:07 +00:00
Jean-Philippe Andre bdb4977dda win: Implement stronger theme compatibility for frame_obj
The frame object requires a theme of version 119 or more. In fact
I think until we are totally happy with the window API (for EO) we
might want to bump that version regularly. That would indeed disallow
theme customization for border.edc until it's done.

This patch uses a pretty brute force way to set the theme file to
the default file from EFL installation. elm_config is not reliable
here.

This is very custom made and there may be a more generic way to force
a widget to use a minimum theme version. Yes that could mean ugly
widgets if we change the theme API but at least that would make them
work. Note that the border theme contains no visual elements, so the
colors of the background, etc... should all depend on the user
selected theme. But of course CSD (in Wayland) will have to use the
default theme -- and look grey.

Fixes D4976
2016-12-08 16:13:32 +09:00
Jean-Philippe Andre 0e52264ae0 win: Add background part to the win border
Use Efl.Part for window to manipulate the background.

Two part names are used in EDC:
 - elm.rect.background
 - elm.swallow.background

For apps the part name is only "background".

To set a solid color background (alpha is ok):
 efl_gfx_color_set(efl_part(win, "background"), r, g, b, a);

To set an image:
 efl_file_set(efl_part(win, "background"), "image.jpg", NULL);

To set an object:
 efl_content_set(efl_part(win, "background"), subobj);

The solid bg is invisible by default, will become visible and use
COPY render mode if a color is set. Standard window uses the
swallow part.

@feature
2016-11-23 13:04:12 +09:00
Gustavo Sverzut Barbieri fa8630a9b1 elm: convert downloads to efl_net_dialer_http.
Remove Elm_Url and use efl_net_dialer_http with an efl_io_copier to
fetch stuff.

The code was also slightly improved, particularly in elm_photocam
destruction be explicit and clear the grid before deleting... this
will ensure any pending preload are stopped before we remove the
backing memory.
2016-11-22 13:24:16 -02:00
Chris Michael e179115f41 elementary: Add internal function to set wayland cursor
Add an internal elm function we can call from withint els_cursor.c so
that we can set window cursor/pointer images based on what is supplied
by els_cursor.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 14:04:05 -04:00
Jean-Philippe Andre 48111f9732 elm: Fix compilation of other apps (elm_access.eo.h)
Thanks to ApBBB on #e for the report!
2016-10-26 19:05:22 +09:00
Jean-Philippe Andre 4e00d5a71f image: Remove all new EAPI that shouldn't exist
Remove EAPI symbols and functions that were
wrongfully added:
 - elm_image_scale_down_set
 - elm_image_scale_down_get
 - elm_image_scale_up_set
 - elm_image_scale_up_get
 - elm_image_fill_inside_set
 - elm_image_fill_inside_get
 - elm_image_scale_get
 - elm_image_scale_set

Doing this before the 1.18.x release announcement.

Fixes T4343
@fix
2016-08-12 09:24:41 +09:00
Jean-Philippe Andre c6bb29c4e4 elm_image: Remove EAPI sizing_eval
This is an internal API, should not be exposed as EAPI.
Doing this before the 1.18.x announcement.

@fix
2016-08-12 09:20:21 +09:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +09:00
Jean Guyomarc'h 5899858964 elementary: include Ecore_Cocoa.h normally
Guards are not necessary anymore.
2016-06-25 20:45:30 +02:00
Jean-Philippe Andre 47a1fae200 efl: Introduce general Efl.Config API
This is to port elm_config to EO APIs.

The current implementation relies on the legacy API, by
simply forwarding calls.

The new API is simply efl_config_set("config_name", value)
where value is an Eina_Value (aka. generic_value).
The C interface proposes a few helpers like config_int_set,
config_double_set, etc...

Unfortunately at the moment, not all config options are
supported, as some rely on more complex types:
- lists
- color class and multiple arguments
- unset functions
- enums

Profiles are also not handled at this point.

@feature
2016-06-24 16:57:04 +09:00
Jean-Philippe Andre 17c531658f win: Add property accel_preference
It supports the same syntax as the config value, but
overrides it. This provides a more convenient way to select
the acceleration for a single window.

Its get() value should be what was effective when the window was
created. So it can depend on the config or a previous call
to set().

@feature
2016-06-23 17:44:37 +09:00
Chris Michael b1892111b1 elementary: Port elementary to use Ecore_Drm2
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Taehyub Kim 55a6bd7fbb elc_popup: add escape key binding
Summary:
There are no methods to close the popup with key down.
So I added the escape key binding to close the popup with escape key.

Test Plan:
1. patch this code
2. delete /home/{user}/.elementary to refresh the config value
3. launch elementary_test -to "popup"
4. click one example of the list and press escape key
5. see closing the popup

Reviewers: cedric, raster, jpeg, Jaehyun_Cho, Hermet

Reviewed By: Hermet

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

Conflicts:
	src/lib/elementary/elm_priv.h
2016-05-18 22:15:08 +09:00