Commit Graph

48 Commits

Author SHA1 Message Date
Carsten Haitzler db081f9648 ecore evas ews - deprecate/remove
it's broken. it doesnt render anything. input is broken. it isn't in
use so it doesnt justify fixing. no one has complained it's brokne
thus proof of it not in use, so proof that it's not needed, so do the
right thing and nuke it to save work

@feat
2021-03-28 13:56:33 +01:00
Vincent Torri 07d6a25c20 elm_theme: more secure check extension as '.edj' and not 'edj'
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12121
2020-08-31 11:16:40 +02:00
Carsten Haitzler e15d9c86df eina file refs in edje/evas - audit them and plug holes where refs stay
in 1 situation at least we delete the eina file (close it) but keep
the ptr around (during destruction) which could cause issues with
callbaks and events on del and so on.... which may lead to multiple
closes where only one should happen ... which would explain my invalid
eina file ref problems i'm seeing. i carefully matched eina file
handle stores/opens/dups to closes in edje/evas and they seemed to all
match up so this audit with comments and fixes seems to have plugged
that now.

@fix
2019-08-21 20:02:24 +01:00
Carsten Haitzler 79228cd723 elm theme - handle error cases and eina file handles properly
@fix
2019-08-21 20:02:23 +01:00
Carsten Haitzler ce44122f61 elm theme - fix leak in error cse in elm theme mmap set
we don't free the eina file handle on error. coverity found it. fix

fix CID 1402680
2019-08-05 14:28:40 +01:00
Woochanlee 3cc9fc481c elm_theme: Check the ref count to delete or unref.
Summary:
In case of the ref count bigger than 1.
That means the eo_theme ref count is 2.

In that case we need to call efl_unref when theme freed.
other case we can delete eo_theme.

@fix

Reviewers: Jaehyun_Cho, woohyun, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8714
2019-04-25 21:24:42 +09:00
Mike Blumenkrantz 4f8a7233cc elm_icon: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8176
2019-03-07 14:15:31 -08:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
Summary:
now that the error codes have been change to be compatible with eina_error,
this can be removed and will work through eina_error naturally

fix T7718

Depends on D8067

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04 13:37:07 -05:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Marcel Hollerbach 37d2d378ec eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which
enabled those functions to be overwritten in classes inheriting another
class. However in task T7675 we decided that this is not really good for
bindings, as most OOP languages do not support this sort of feature.

After this commit eolian realizes class function completly outside of
the vtable, the c-symbol that is the class funciton is now just directly
redirecting to a implementation, without the involvement of the vtable.

This also means a change to the syntax created by eo:

Calling before:
  class_function(CLASS_A);
Calling after:
   class_function();

Implementation before:
   class_function(const Eo *obj, void *pd) { ... }
Implementation after:
   class_function(void) { ... }

This fixes T7675.

Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
WooHyun Jung 7f2b26861f elm: prevent from accessing null pointer after memory allocation
Summary: Add null checking code just after allocating memory

Test Plan: make check

Reviewers: jypark, Jaehyun_Cho, zmike

Reviewed By: Jaehyun_Cho, zmike

Subscribers: devilhorns, zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7801
2019-01-29 09:23:44 -05:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Carsten Haitzler 659473a7bf elm theme - initialize all struct members to null
missing aded struct members...
2018-11-09 11:43:59 +00:00
Jaehyun Cho f66414beec elm_theme: Fix to set default style group name correctly
"default" should not be appended to the group name in new EFL interface
theme. e.g. "efl/button"

Therefore, if "default" is given as a style name, then the style name
should be converted to NULL for the group name in new EFL interface
theme.
2018-11-09 17:52:34 +09:00
Jaehyun Cho d03d29f7a2 elm_theme: fix return value when default style fallback is done
To keep backward compatibility, EFL_UI_THEME_APPLY_DEFAULT is returned
instead of EFL_UI_THEME_APPLY_SUCCESS if style is not found in theme and
default style fallback is done instead.

This patch fixes 7353fc1cb8

@fix
2018-10-04 19:21:44 +09:00
Mike Blumenkrantz 99fca5b01d elm_theme: use themes and extensions lists for _elm_theme_data_find
Differential Revision: https://phab.enlightenment.org/D5956
2018-04-25 12:09:32 -04:00
Carsten Haitzler ca93267670 Revert "theme: rename "default" theme to "dark""
This reverts commit d764e0b279.

The whole idea of renaming the default theme is an "api break" even if
config is changed. and symlinks don't work on windows as a solution.
(well on ntfs only as only as administrator, so they don't exist).

modifying config for switch from default to dark also will break the
case where someone put ~/.elementary/themes/default.edj there and it just
is different to the system one and how their theme changes on them as
it switches to dark.

basically we can't rename a theme like this mid-flight in efl. default is
default and has to stay that name. it can change the look, but not the
name.

i think the apparent reasoning behind this is not a good one. the work on
flat is temporary. i don't think we will ever maintain multiple "default
themes" as its just far too much work.

we can maintain color SCHEMES which are just a list of colorclasses and
colors for them - that's separate to a theme and would override. right now
these things don't exist. we are not going to create a dark.edj and a
light.edj just to store differing default colorclass values. we should be
doing the above with colorclass "color palette/scheme/whatever" files
that override those named colorclasses globally on init.

so reverting because this is an api break and we shouldn't break api
unless there is really absolutely no other choice.

here the choice is to just temporarily work in a branch and modify
default and then merge the branch when done.
2018-03-01 16:44:01 +09:00
Mike Blumenkrantz d764e0b279 theme: rename "default" theme to "dark"
this inhibits maintenance and development of multiple stock themes

a symlink is created to 'default.edj' to preserve compatibility
2018-02-28 16:02:39 -05:00
Mike Blumenkrantz bf7890c806 theme: add fallback matching when referenced theme is not found
if done properly, this should never occur, but at least find some
layout to use if one is available
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz 07d0fb03db theme: introduce theme overlay/extension matching
after this commit, efl base themes should now specify:

data.item: "efl_theme_base" "theme_name";

and overlays/extensions which match a given theme should use:

data.item: "efl_theme_match" "theme_name";

this will cause overlays and extensions with the data.item to only
be loaded when the corresponding theme is in use. note that this
should not be specified for theme-independent overlays/extensions
as it will completely block loading of themes
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz 7353fc1cb8 elm_theme: deduplicate theme apply code
the "default" style fallback code here was identical, so just call again
with "default" instead of copy and pasting the same code
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz fe0bd38f4c elm_theme: massively simplify internals
instead of maintaining separate lists for the file and the edje file,
maintain a single list of structs containing both of these

also dynamically manage a string list of files to preserve compat with
existing (bad) functions which return this directly
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz a0f7dd5aa9 elm: set default theme name internally when applying config
for whatever reason this is only generated in elm_theme_get(), so call
that whenever doing theme string parsing

@fix
2018-02-28 16:02:38 -05:00
Sungtaek Hong cb25699dac efl_ui_legacy: add new interface to indicate legacy widget
Summary:
For now, how to check whether a widget is legacy or not
is to check flags in private data or static flag, which is set
during elm_legacy_add.
If Efl.Ui.Legacy interface is added, it can be easilly checked
by efl_isa(obj, EFL_UI_LEGACY_INTERFACE)

Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5748
2018-01-24 18:14:26 +09:00
Jean-Philippe Andre 421217b150 Revert "elm: disable interface theme loading"
This reverts commit 3d07b90461.

Some commits should address the issues mentioned in T6579
  959571b995
  fe346d2ee2

But to be honest I am still not sure exactly what the issue was?

Ref T6579
2018-01-17 14:18:17 +09:00
Jean-Philippe Andre 6a8816b50c Revert "warning remove - comment out unused vars"
This reverts commit bbac253f11.
2018-01-17 14:03:09 +09:00
Carsten Haitzler bbac253f11 warning remove - comment out unused vars 2018-01-06 19:01:09 +09:00
Mike Blumenkrantz 3d07b90461 elm: disable interface theme loading
this is broken. do not reenable until testing has been done.

partially reverts dd4467505e

ref T6579
2018-01-05 11:46:36 -05: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
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
Carsten Haitzler 0efb70e317 elm theme - remove redundent check
found by PVS studio
2017-07-31 11:38:42 +09:00
Amitesh Singh bd1ee1b083 Efl.Ui.Image.Zoomable: implement Ui.Image.icon property
@feature
2017-06-02 18:32:09 +09:00
Prasoon Singh 7c368923a1 elm_theme: check whether object is valid before calling edje_object_mmap_set
Summary:
In Issue scenario when _elm_theme_set was called,object was already deleted by app causing
unnecessary addition of the style in style_not_found list.
Check for object validity, if object is NULL return theme apply failed.

Test Plan: Make object pointer NULL before _elm_theme_set is called.

Reviewers: cedric, shilpasingh

Subscribers: rajeshps, govi, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-08 15:15:19 -07:00
Stefan Schmidt eef89ceb3a elm: theme: avoid double free in theme version check
If we would have a version below 110 we would run into a double free here.
Just warn and let the freeing happen two lines below.

CID: 1366926
2016-12-12 16:44:02 +01:00
Jean-Philippe Andre 055e905b84 theme: Fix crash at app shutdown
The wrong hash was used to store theme data items. Obviously
this is an API that wasn't used within EFL thus untested. Yay.

@fix
2016-12-08 16:30:34 +09: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 0de72b44c1 win: Fix support for legacy themes (elm_bg)
For standard windows, we want to create an elm_bg object if
the theme is a legacy one. Otherwise the default theme
doesn't require an extra object, just a rectangle.
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre d4929e58fc elm: Remove some eo files from installation
These are some of the EO files that shouldn't be part of the public
EO API:
- elm_access (old)
- actionslider
- bubble
- diskselector
- flipselector (a fancy spinner)
- hoversel (use combobox instead)
- icon (use image instead)
- inwin
- naviframe (unreplaced for now)
- photo (use image)
- prefs
- segment control
- separator
- slideshow
- thumb (use image)

Note: This breaks the use of the elm_widget_xxx.h headers. Those
      were internal headers anyway. Exposed because of a lack of
      a proper inheritance API.
2016-10-26 13:42:54 +09:00
Mykyta Biliavskyi 9266ce4bd5 Elm_theme: parse theme name "<disk>:/file.ext" only on Windows.
Commit 86928a430c broke ability to use more than one theme file for
posix compatible systems. For case
ELM_THEME=/home/user/a.edj:/home/user/b.edj string was parsed
incorrectly. The result was a single string
"/home/user/a.edj:/home/user/b.edj", but expected two strings
"/home/user/a.edj" and "/home/user/b.edj"

This commit add additional check of the file paths like
<disk>:/filename.ext or <disk>:\filename.ext in Windows only.
This avoid wrong parse behaviour on Linux and macOS.
2016-10-21 16:08:04 +03:00
Mykyta Biliavskyi 86928a430c Elm theme: correct parse a theme filename on Windows OS.
Windows os uses ':'  as delimiter between disk name and file path.
<disk>:/<dir>/file.ext. In this commit added parse case for <disk_name>
symbol meets before ":/".
2016-10-20 18:21:02 +03:00
Cedric BAIL 0cbb5a42f3 elementary: fix copy & paste error, thanks Dave. 2016-09-27 10:54:09 -07:00
Cedric BAIL 5323f7e173 elementary: set the extension on the extension, not the overlay !
@fix

This is a port of D4317
2016-09-26 15:01:33 -07:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Carsten Haitzler abeeb11b19 elm theme - don't use empty env vars eina_prefix handles anyway
in 14ec825aa9 cedric added trying
ELM_DATA_DIR env var explicitly for looking for themes. first if this
is NULL then we look in a bogus directory (null). secondly eina_prefix
already takes care of env vars like thsi as part of figuring out
prefix with correct namespace etc. so this just is a bug as opposed to
anything useful and the CORRECt implementation is already done in
eina_prefix.

@fix
2016-08-03 17:27:42 +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
Andy Williams 3d0eff2199 elementary: Don't force elm theme over fdo icons
Make sure we don't mmap icons if we're using external sources
2016-04-28 15:00:08 +01:00
Cedric Bail 14ec825aa9 elementary: search ELM_DATA_DIR environment for themes. 2016-03-24 11:23:11 -07:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00