Compare commits

...

105 Commits

Author SHA1 Message Date
Stefan Schmidt 9138731476 release: Update NEWS and bump version for 1.24.4 release 2020-09-28 12:16:54 +02:00
Vincent Torri b6ecdbb91c Ethumb: reorder _init/shutdown functions, ecore and evas init/shutdown are useless, as ecore_evas already manages them
Test Plan: compilation

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12161
2020-09-26 14:45:48 +02:00
Vincent Torri ab44a15b4c edje_external_inspector: re-order _init a bit: log after eina, remove ecore_init/shutdown as it is already managed by edje_init/shutdown
Reviewers: raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12160
2020-09-26 14:45:34 +02:00
Carsten Haitzler 0a21bf58d2 eina file - fix getdents64 on older glibc's and use raw syscall 2020-08-21 12:50:15 +01:00
Carsten Haitzler 5ab9f4a64c eina - eina_file_close_from - handle coverity theory that closes change
this won't happen as the setup should not have the # of fd's found in
2st pass and 2nd pass for a dirfd change as nothing should interfere.
comment to that effect and add a paranoid change num_closes to the
number found
2020-08-21 12:49:45 +01:00
Carsten Haitzler 41296effc6 ecore - don't do anything with heap between fork and exec
this avoids a possibgle deadlock if a malloc impl is holding a lock
and has not released it at the time we fork.

@fix
2020-08-20 14:22:29 +01:00
Carsten Haitzler 29554c2f44 evas - fix deadlock with sw async rendering calling cbs in post flush
post flush doesnt cleanr evas->rendering until after it calls post
flush callbacks. any post flush callback that neexts so access data
and block waiting for an async render tyo be done thus blocks forever.

this adds a 0.2 sec timeout in case so we at last march on with
hiccups instead of totally stalling AND clears evas->rendering before
calling the callbacks.

@fix
2020-08-17 13:27:18 +01:00
Carsten Haitzler 179ff71c80 edje - calce - really respect max image size for img sets
when you have an image set for an image it wouldnt actually respect
image max size and not select something bigger than it.. now it will

@fix
2020-08-13 17:44:25 +01:00
Carsten Haitzler 8a723c1b83 efl ui image - fix scal to fill - broken with non-rect src images
@fix
2020-08-02 16:27:24 +01:00
Carsten Haitzler 3163458619 eina vpath - fix windows ~username handling to only error when used
we would always rrturn 0 on windows ... missing  {} in block. fix that.

@fix
2020-07-30 11:14:41 +01:00
Carsten Haitzler 56830b08df evas - render - dont crash is private data is null
@fix
2020-07-27 22:52:43 +01:00
Carsten Haitzler 4f448d6339 edje - fix edje_cc mis-re-iding images in image sets
wanr of unused images so it's properly fixed too... always warn to
stdout so devs know to cleanup their theme. by not removing image sets
this fixes the mis-id'ing too.

@fix
2020-07-15 12:24:35 +01:00
Stefan Schmidt c7c5b49465 build: bump minimum meson version to 0.50
We have seen a few build problems from users with version 0.49 (default
in Debian stable, backports has an update). We bumped this in master
already, but people keep running into it in our stable branch as well.

[Instead of backporting the various version changing commits from master
this is a stable branch only patch with the same result]
2020-06-23 11:53:11 +02:00
Carsten Haitzler 5bfdf26fb6 efreet caceh - fix coverity report
fix CID 1429935
2020-06-19 00:57:03 +01:00
Carsten Haitzler 74e24cbed0 efreet - mtime 0 fix build on windows 2020-06-18 11:36:26 +01:00
Carsten Haitzler 125648cc92 efreetd - cache - add more statinfo work around 0 mtime distros
some distros 9notably in this case nixos) want to do reproducible
builds. to them this means going around setting mtime for all files to
0. this means efreetd not only thinks mtime is invalid/stupid (0 is
generally just that as midnight on jan 1 1970 is not exactly a
sensible dare for a modified timestamp of a file as no filesystem with
any sanity will have not been modified since that time), but it keeps
mtime at 0 even when things update. this totally breaks efreetd that
expects to find mtime increases over time as things change. it's
necessary because it has to perform a "are mu caches up to date" scan
of all file data it caches and it needs to know if it should rebuild
something based on this.

so this does a few things:

1. it makes mtime have to be an exact match to the cache, not cache
mtime >= file mtime. so any change forward or back is an inavlidation.
2. it now also uses ctime, mode, size, uid, gid, block count and if a
symlink, the sha1 of the symlink path in addition and any change to
these == invalid.

this adds a lot of code and changes how dirs get scanned a bit but it
means it can pick up changes on these 0 mtime distros.

interestingly the policy of mtime being 0 is to have a reprodcible fs
... but ctime still changes and is > 0, as does inode info, so it's
not actually possible to have it totally work... but they try still,
so this is a fix for that problem.

whilst i was doing thisi also noticed efreetd re-red dirs many times
due to icon theme inhritance. i also fixed that to do a LOT less
syscalls by only scanning a dir once as i was rejigging the scanning
code at the time anyway. this should optimize thr scan costs at
efreetd startup too.

@fix
@opt
2020-06-18 11:18:35 +01:00
Stefan Schmidt 0d2310678a release: Update NEWS and bump version for 1.24.3 release 2020-06-17 09:47:23 +02:00
Stefan Schmidt c23befc36d modules: vnc: allow building for FreeBSD with a different header path
Original patch provided by phyb user CeDeROM.

Fixes T8713
2020-06-15 15:44:24 +02:00
Hermet Park 30fda64641 ui image: fix a missing else case.
it sholud be turned on enabled status.

it's side issue by 0826b4916e
2020-06-15 15:44:06 +02:00
Taehyub Kim d72bf1fcae efl_ui_image: fixed elm_image_preload_disabled_set api is not working when it is called before file set
Summary:
when elm_image_preload_disabled_set(img, EINA_TRUE) is called before file set.
The image preload is not canceled, because the function will be returned since the image is not loaded.
so preload disabled api is fixed to work even if it is called before file set.
@fix

Reviewers: Hermet, kimcinoo, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11969
2020-06-15 15:43:53 +02:00
Jaehyun Cho b9d126d2e2 edje_cc_handlers: update documentation of "fixed" to be clearer
Summary:
Since "fixed" does not affect the group size by the part's min size, the
documentation is updated to be clearer.

Reviewers: woohyun, raster

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11934
2020-06-15 15:43:53 +02:00
Woochanlee 324029062b elm_calendar: Do not pass NULL to function.
Summary:
T7076

legacy calendar inc/dec button has auto repeat feature.
for that if user click the button very quickly, we delete internal timer than it will pass to function.

to prevent this, need to check NULL pointer.

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11966
2020-06-15 15:43:53 +02:00
Myoungwoon Roy, Kim e674d9d965 doxygen docs: Fix API reference group to Ecore_Eo
This patch fixs a wrong group name in Ecore_Eo API reference

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11952
2020-06-15 15:43:53 +02:00
Subhransu Mohanty 69bf3cd31f elementary/example: Fix memory leak in gengrid test
Reviewers: Hermet, SanghyeonLee

Reviewed By: Hermet, SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11928
2020-06-15 15:42:09 +02:00
Subhransu Mohanty ebbc6a3c2d ecore_ipc: Fix memory leak
Summary:
As delete_me flag was not updated in the delete callback it dosen't
call ecore_ipc_client_del() on the client hence the leak.

Reviewers: Hermet, raster, bu5hm4n, CHAN

Reviewed By: Hermet, CHAN

Subscribers: CHAN, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11927
2020-06-15 15:41:59 +02:00
Hermet Park 909dd07ba8 eldbus: fix the data size issue.
Summary:
dbus message requires the void* value for the message data,
the returned value of dbus_message_iter_get_basic() can be mismatched by to the architure,
This could bring the returned va_argues memory corrupted among the series of values.

We can use the defined type for exceptions.

Reviewers: herb, kimcinoo, jsuya, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11940
2020-06-15 15:41:31 +02:00
Carsten Haitzler 9dc5255d10 elm test - animated icon - big win to have a bg and not garbage 2020-06-15 15:40:38 +02:00
Subhransu Mohanty c904970ad3 evas/engine: Fix memory leak in generic cache.
Summary:
During shutdown we used to call engine_image_free() which was causing some deadlock.
as we have evas_cache which takes care of freeing all the images we just have to
delete the generic cache without freeing the image during shutdown.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11915
2020-06-15 15:39:54 +02:00
Subhransu Mohanty 709f31ebe8 eo: Fix memory leak in efl_key_wref_set() api.
Testcase:
   elementary_test -to snapshot

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11888
2020-06-15 15:39:17 +02:00
Hermet Park 95af339431 canvas svg: fix missing break. 2020-06-15 15:38:30 +02:00
junsu choi 08d148eba2 elm_hoversel: Add missing resize_job's free
Summary:
resize_job can be called after obj is deleted.
So add free to destructor.

Test Plan: N/A

Reviewers: Hermet, herb, kimcinoo, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11911
2020-06-15 15:38:16 +02:00
Subhransu Mohanty 8d27e70bc3 elementary: Fix memory leak in elm_list
Reviewers: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11909
2020-06-15 15:38:00 +02:00
Subhransu Mohanty 5d19a932e8 svg/loader: Fix memory leak
Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11908
2020-06-15 15:38:00 +02:00
Marcel Hollerbach a111e9702c elm_gen****: free item_content map
Summary:
this should be freeed. Both can be freed in group_del after the items
are deleted.

fix T8732

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8732

Differential Revision: https://phab.enlightenment.org/D11882
2020-06-15 15:37:37 +02:00
Carsten Haitzler 841ecb4326 evas examples - build box example again - missing header 2020-06-15 15:37:10 +02:00
Myoungwoon Roy, Kim 93147f0bd0 edje: fix memory leak in edje part recalculation.
Allocated part_array is only freed when _circular_dependency_find() is successful. It is not freed in other cases.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11886
2020-06-15 15:35:37 +02:00
Vincent Torri e6dd33d7a5 Eina file test: use the correct Eina file object
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11885
2020-06-15 15:35:27 +02:00
Vincent Torri 4211bc1f3c Eina file test: on Windows, open cmd, not a shell
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11884
2020-06-15 15:35:17 +02:00
Hermet Park 69dfeb0323 efl gfx_path: fix memory leak.
his reverts commit 38be95b0b6.

The reverting patch blocks efl_canvas_vg_shape triggers efl_canvas_vg_node destructor.

That occurs massive leaks among the all nodes in the vector tree.

To fix the origin issue, we must reset path explicitly in the derived class.

@fix
2020-06-15 15:34:44 +02:00
Subhransu Mohanty bfb4c0a483 edje: fix memory leak by freeing the limits pointer.
Summary:
This limit parts are only used in naviframe edc thats why it is
only showing up in naviframe test app.

Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11887
2020-06-15 15:34:24 +02:00
Woochanlee 8419b7dfb1 edje_load : clean up vector resource when edje file freed.
Summary: Fix memory leak.

Reviewers: cedric, Hermet, smohanty, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11859
2020-06-15 15:34:12 +02:00
Subhransu Mohanty 334fc6b6ee edje: Fix memory leak by freeing the filter data.
Reviewers: Hermet, CHAN

Reviewed By: CHAN

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11879
2020-06-15 15:34:01 +02:00
Ali Alzyod 00cfe685dc evas_textblock: fix doc typo
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11845
2020-06-15 15:33:21 +02:00
Marcel Hollerbach 88cf37d152 ecore_main_timechanges: fix include
we should not prefix this with the full path.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11881
2020-06-15 15:33:10 +02:00
Hermet Park 83d9bbd7a3 canvas vg: fix vector file data memory leak.
this file data must be freed when eet file is closed.

@fix
2020-06-15 15:32:31 +02:00
Hermet Park 3e5a28325e evas vg: clean up dangling instances
unref containers when file is closed.

@fix
2020-06-15 15:32:21 +02:00
Hermet Park 10427694d9 canvas vg: fix dangling vector containers.
These duplicated containers are not going removed
since its refernece is always more than 0.

We need to unref explicity when they have to

@fix
2020-06-15 15:32:01 +02:00
Hermet Park 9dd7ec6272 edje: fix animation memory leak.
if object is destructed on canvas animation,
its internal resource is leaked.

Here simple fix brings stopping animation before deleting obj.

@fix
2020-06-15 15:31:42 +02:00
Daniel Kolesa 6138e371df evas/engines/gl_generic: fix byte order after glReadPixels on BE
This fixes the screenshot tool in Enlightenment on big endian
systems besides other things.
2020-06-12 18:48:44 +02:00
Marcel Hollerbach d068889df4 build: make eina drag in the -lm flag
eina uses math.h we need to drag in this flag everywhere.

Differential Revision: https://phab.enlightenment.org/D11896
2020-06-12 11:32:32 +02:00
Daniel Kolesa 2620295542 modules: only build gl_drm evas engine when using es-egl
This module does not work with desktop opengl contexts,
and needs EGL to work.
2020-06-11 15:50:26 +02:00
Daniel Kolesa f5d371d6ec ecore: use standard LC_ALL instead of __LC_ALL in systemd module
The former is a POSIX name, the latter is non-standard. I don't
know why the latter was used, considering glibc literally has
just #define LC_ALL __LC_ALL, but change it and unbreak build
on musl and other systems.
2020-06-11 15:50:19 +02:00
Daniel Kolesa 8f59fb469f eina: only enable EINA_LOG_BACKTRACE when backtrace API is present
This prevents build breakage on platforms that either don't have
backtrace() or don't have the appropriate library for it installed.
2020-06-11 15:50:12 +02:00
Carsten Haitzler b03baef4b5 build - systemd service files - install fix if systemd not found
so if systemd is not found - installe in PREFIX/lib/systemd/user which
allows build to work without disabling systemd.
2020-06-11 15:49:48 +02:00
Carsten Haitzler 7ef58c47d3 efreet - handle runtime relocation right with default XDG_DATA_DIRS
XDG_DATA_DIRS was only set up to a default including where efl was
installed prefix-wise as the compiled-=in prefix, not runtime
determined prefix. it shouldn't actually affect most people except
those making use of this.

@fix
2020-06-09 10:16:43 +01:00
Carsten Haitzler af2fd2ead0 evas - genetic update regions smart merge - merge v adjacent regions
regions sometimes produce box sets like:
// +---+
// |   |
// +---+    +-------+
// |   |    |       |
// +---+    +-------+---------+
//          |                 |
//          |                 |
//          +-----------------+

so the upper-left 2 boxes can be merged into 1 and they have the same
x coords and are flush-aligned one above the other. that is what
this does - find these and merge them to have fewer rects

@fix
2020-06-05 00:16:31 +01:00
Carsten Haitzler e917e3111b evas - csd and wl csd - fix alpha zeroing to avoid framespace junk
i noticed some junk in framespace... this happesn when solid objects
are outside the normal window content area and their solid areas are
not clipped to this inner frame area thus those areas are not "zeroed
out" next render.

@fix
2020-05-26 12:19:40 +01:00
Stefan Schmidt 1eb5bd7fff release: Update NEWS and bump version for 1.24.2 release 2020-05-25 11:18:48 +02:00
Shinwoo Kim 5b8a1f4a78 evas image: reload after alpha_set
Summary:
The alpha_set cancels preload, and do not try to load it again.
So the image is not showing, if the alpha_set is called while preloading.

[Sample]
   Evas_Object *image = elm_image_add(box);
   elm_box_pack_end(box, image);
   evas_object_show(image);

   elm_image_file_set(image, "img.png", NULL);     // start preloading

   Evas_Object *eimg = elm_image_object_get(image);
   evas_object_image_alpha_set(eimg, EINA_TRUE);   // cancel preloading

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11864
2020-05-25 10:27:12 +02:00
Vincent Torri 9a37508f62 elm test: include evil_private.h to declare realpath() on Windows
Reviewers: raster, zmike

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11872
2020-05-25 10:27:12 +02:00
Vincent Torri 614e471ab2 ecore_evas: fix uninitialized variable warning
Test Plan: compilation

Reviewers: raster, zmike

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11871
2020-05-25 10:27:12 +02:00
Taehyub Kim c3adf72aa8 evas_vg_container: return NULL in evas_vg_container_add when the parent of container is NULL
Summary:
evas_vg_container should return NULL when the parent is NULL
because the function does not allot NULL parent
@fix

Reviewers: kimcinoo, jsuya, Hermet

Reviewed By: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11867
2020-05-25 10:27:12 +02:00
Hosang Kim e81c326088 elm_genlist/elm_gengrid: fix memory leak caused by efl_wref_del.
Summary:
efl_wref_del makes pointer to NULL.
So we should copy pointer before efl_wref_del is called.

Reviewers: SanghyeonLee, cedric

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11866
2020-05-25 10:27:11 +02:00
Vincent Torri 7de6b87508 evas: gesture_manager: fix usage of long on Windows
On Windows 64bits, long is a 4 bytes type. Declare count as being a intptr_t instead of long

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11836
2020-05-25 10:21:52 +02:00
Vincent Torri 40e0c2dced tests: eina: fix usage of long on Windows
On Windows 64bits, long is a 4 bytes type. Declare i as being a uintptr_t instead of unsigned long

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11837
2020-05-25 10:21:52 +02:00
Vincent Torri 26afa83cee ecore_con: Fix unused argument warning
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11849
2020-05-25 10:21:52 +02:00
Shinwoo Kim 1230184ccf png: handle file name .9.png
Summary: .9.png is not 9 patch file, but a png file which name is .9

Test Plan: evas_object_image_file_set(image, "./.9.png", NULL);

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11848
2020-05-25 10:21:52 +02:00
Carsten Haitzler 323eb9fcff ecore-x - ensure we fully look at all xkb events and refresh all binds
this ensures for sure that we rebind known key/mouse grabs too for xkb
mapping changes and force a get of the keymaps too

@fix
2020-05-19 18:45:06 +01:00
WooHyun Jung a030859f67 efl_ui_image: fix to call "clicked" smart callback when there is no img
Summary:
Some applications have used "clicked" smart callback from elm_image which
does not have an image in it.
To keep backward compatibility, hit_rect needs to be resized properly to
call smart callback function.

@fix

Reviewers: Hermet, jsuya, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11840
2020-05-18 15:35:43 +02:00
Taehyub Kim e4964f94fa evas_vg_shape: return NULL in evas_vg_shape_add when the parent of shape is NULL
Summary:
evas_vg_shaep_add should returned NULL when the parent is NULL
because the function does not allow the NULL parent.
@fix

Reviewers: jsuya, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11839
2020-05-18 15:35:43 +02:00
junsu choi 0033f2b8ed edje_calc: Add unload file for already loaded vector lottie file.
Summary:
Users can use multiple jsons per description in one part in edc.
At that time, multiple files are loaded,
if a file is already loaded, it must be unloaded.

Test Plan:
edje_cc -beta -id ./ json_edc.edc
make
./test
Push Change button -> shutdown application

{F3882716}

Reviewers: Hermet, herb, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11820
2020-05-18 15:35:42 +02:00
junsu choi d76a2a01f1 Efl.Ui.Radio_Legacy: Prevent unnecessary signal emit for contents
Summary:
When call elm_radio_add, theme_apply of layout is called and
_efl_ui_radio_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
this call is unnecessary.

Test Plan:
Evas_Object *bt;
clock_t start, finish;
double sum= 0 ;
double avg = 0;
double cnt = 1000;

for(int i =0 ; i<(int)cnt; i++)
  {
     start = clock();
     bt = elm_radio_add(win);
     finish = clock();
     sum += (double)(finish-start)/CLOCKS_PER_SEC;
  }
avg = sum / cnt ;
printf("radio avg : %f\n",avg);

[before]
radio avg : 0.000232

[after]
radio avg : 0.000197

Reviewers: akanad, Jaehyun_Cho, Hermet, YOhoho, zmike

Reviewed By: zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11813
2020-05-18 15:35:42 +02:00
junsu choi e0e7101e8c Efl.Ui.Check_Legacy: Prevent unnecessary signal emit for contents
Summary:
When call elm_check_add, theme_apply of layout is called and
_efl_ui_check_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
this call is unnecessary.

Test Plan: N/A

Reviewers: akanad, Jaehyun_Cho, Hermet, YOhoho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11812
2020-05-18 15:35:42 +02:00
junsu choi 255e535a3f Efl.Ui.Progressbar_Legacy: Prevent unnecessary signal emit for contents
Summary:
When call elm_progressbar_add, theme_apply of layout is called and
_efl_ui_progressbar_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
this call is unnecessary.

Test Plan: N/A

Reviewers: Hermet, bowonryu, Jaehyun_Cho, YOhoho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11811
2020-05-18 15:35:42 +02:00
junsu choi 8b65d85243 Efl.Ui.Button_Legacy: Prevent duplicate signal emit of contents
Summary:
When call elm_button_add, theme_apply of layout is called and
_efl_ui_button_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
In the button theme, the default of the icon is hidden,
so this call is unnecessary.

Test Plan:
Evas_Object *bt;
clock_t start, finish;
start = clock();
bt = elm_button_add(win);
finish = clock();
printf("duration : %f\n", (double)(finish-start)/CLOCKS_PER_SEC);

Evas_Object *bt;
clock_t start, finish;
double sum= 0 ;
double avg = 0;
double cnt = 1000;

for(int i =0 ; i<(int)cnt; i++)
  {
     start = clock();
     bt = elm_button_add(win);
     finish = clock();
     sum += (double)(finish-start)/CLOCKS_PER_SEC;
  }
avg = sum / cnt ;
printf("button avg : %f %f\n",avg, sum);

[before]
button avg : 0.000215

[after]
button avg : 0.000138

Reviewers: Hermet, YOhoho, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11810
2020-05-18 15:35:42 +02:00
junsu choi 8076d6211f Efl.Canvas.Object.Animation: Prevent crash when called .animation_pause_set.
Summary:
When call efl_canvas_object_animation_animation_pause_set,
pd->in is freed by calling efl_canvas_object_animation_stop in _animator_cb.
So when set pause_state, crash occurred
This patch add null check to prevent null access.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, herb, bu5hm4n

Reviewed By: Hermet, bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11815
2020-05-18 15:33:18 +02:00
Stefan Schmidt f5e5eae1d5 build: ensure we set ENABLE_LUA_OLD when using a lua interpreter
We missed to actually set the ENABLE_LUA_OLD. Ross run into some
problems with Lua 5.2 builds and we hope this fixes the issue for him.

Found and fixed by Marcel Hollerbach (only put in the system by me).

Fixes T8705
2020-05-12 13:45:45 +02:00
Stefan Schmidt 71caee07ba release: Update NEWS and bump version for 1.24.1 release 2020-05-11 13:32:09 +02:00
Stefan Schmidt 84ba2e082c tests: ecore_con: renew test ssl certificate which expired in 2016
For our unit testing of ecore_con we have a sself-signed certificate for
localhost to do some of the tests. It expired in 2016 and this was not
really a problem so far. Starting from Debian 10 and Ubuntu 20.04 this
resulted in failures thought. Either the newer openssl version is more
strict or the config for Debian and Ubuntu is.

Anyway, time to generate a new one. Its valied until Sep 23 12:33:13
2024 GMT and I used the follwoing commands to generate the cert/key and
the second command to rmeove the key passphrase.

openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.pem -days 1600 -subj '/CN=127.0.0.1'
openssl rsa -in server.key -out server2.key

Someone has to do this again in 4 years. if we stillhave this code
around.
2020-05-11 12:44:22 +02:00
Carsten Haitzler af4c39c37a evas + gl - fix callback-to-app-changes-state issue with pixel data
so if we call a callback that has e do something like set new pixel
data in a pixel data provider and we do it from the is pixel inside
call ebcause pixels were marked as dirty - pixels may no longer exist
after that, so re-get to make sure and handle properly.

this was found with tiling + e + shaped windows + moving them around
in tiling. it's a valid efl bug though.

@fix
2020-05-09 14:06:19 +01:00
Mike Blumenkrantz a7bcba534a evas/events: fix conditional for emitting source mouse move events
Summary:
this should match all other similar cases when determining whether to
emit the event by checking whether at least one coord has changed, not both
Depends on D11791

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11792
2020-05-09 09:26:42 +01:00
Mike Blumenkrantz f5cc8574c7 elm: resolve float comparison warnings
Summary: Depends on D11790

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11791
2020-05-09 09:26:42 +01:00
Mike Blumenkrantz 0b5121bce7 bin/elm: resolve float compare warnings
Summary: Depends on D11789

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11790
2020-05-09 09:26:41 +01:00
Mike Blumenkrantz d0209836b4 tests: resolve float comparison warnings
Summary: Depends on D11788

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11789
2020-05-09 09:26:41 +01:00
Mike Blumenkrantz 7012428389 edje_cc: consistently use eina macros for all float comparisons
Summary: Depends on D11787

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11788
2020-05-09 09:26:41 +01:00
Mike Blumenkrantz 15b6563357 edje_cc: fix comparisons for possible non-float values
Summary:
when defined, BUILD_EDJE_FP causes some of these struct members to not
be floating types and additionally defines special macros to be used
for comparisons to handle this case
Depends on D11786

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11787
2020-05-09 09:26:41 +01:00
Mike Blumenkrantz 499fd1808c eina: resolve float comparison warnings
Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11786
2020-05-09 09:26:41 +01:00
Shinwoo Kim 16378307fa evas: use SEQUENTIAL for decoding png file
Summary:
There was a mistake caused by "2a0eeba evas: fix png regression issue".

The flag is_for_data was close_file before this commit.
_evas_image_load_file_internal_head_png closes file if it is called only for
header. So the close_file does not mean is_for_data.

This patch is changing is_for_data to is_for_head, and make
_evas_image_load_file_internal_head_png use EINA_FILE_SEQUENTIAL
for data decoding.

Reviewers: Hermet, jsuya, herb, raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11783
2020-05-07 08:57:18 +01:00
Hermet Park 2e5e624702 canvas map: draw direct image as possible.
Since we moved to floating calculation for msaa, this comparsion
is not working for direct image drawing though it's doable.

To resolve this, we can compare floatings regardless of msaa enable.
2020-05-07 08:43:07 +01:00
Shinwoo Kim 6a5b253a72 evas: fix png regression issue
Summary:
Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding the 9 patch feature with small code refactoring made use of setjmp
incorrectly.

[Problem]
evas_image_load_file_data_png calls _evas_image_load_file_internal_head_png,
and _evas_image_load_file_internal_head_png calls setjmp and returns without
problem. And png_read_row calls longjmp. This causes jumping into a function
which was exited. Problematic png file will be attached.

[Solution]
Save calling environment i.e. call setjmp, after returning from
_evas_image_load_file_internal_head_png.

Test Plan:
Problematic png file
{F3876983}

And example code.
{F3876986}

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11782
2020-05-07 08:42:24 +01:00
Ali Alzyod 0b7d945a0d tests: edje: Fedora32 system fail resolve
This test seems to fail on Fedora32, we increase font size margin to
prevent it from happening

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11776
2020-05-05 16:14:48 +02:00
Marcel Hollerbach 924c6fec18 exactness_player: do not test for delay_ms
that is a unsigned int, if its 0 the timer is called as fast as
possible. Not doing that breaks exactness.

@fix

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11774
2020-05-05 16:14:48 +02:00
Stefan Schmidt 7d3e8fcad0 ecore_drm: ensure we have the symbol available at the right place.
Summary:
Linking under Fedora32 toolchain got more picky. Ecore_drm_device.c
needs the symbol so make sure we have it there.

Reviewers: devilhorns, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11772
2020-05-05 11:29:08 +01:00
Stefan Schmidt fd0f8362f4 exactness: remove no longer needed _evas_new()
This has been unused since the move to a preloaded lib and now makes
trouble durign compilation on Fedora32.

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11767
2020-05-04 14:18:59 +02:00
Marcel Hollerbach aabea0de2f ecore_evas: only define these eina errors once
Summary:
they are not needed multiple times, infact this is creating multiple
definition errors.

@fix

Reviewers: stefan_schmidt, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11766
2020-05-04 14:18:59 +02:00
Carsten Haitzler 2d3fafc3c1 ecore_evas_x - fix maximize/unmaximize request corner case
state was not managed well.. this will fix that. also a test in
elementary for it to you can test it out.

@fix
2020-05-03 15:35:44 +01:00
Carsten Haitzler 57c8bf661b edje - don't set font sizes less than 1
this makes evas unhappy and results in noise.

@fix
2020-05-01 12:51:39 +01:00
Marcel Hollerbach 498af4b32d elm_fileselector: support expandable items
Summary:
the fileselector can store exactly 1 model and monitor that for changes,
which works normally just well. However, when we expand a items, another
model comes into play, which is not monitored, and no additional
reference is taken. Which means, _process_last will simply delete it,
and elements that did not come into play at the _populate call are never
displayed.

With this commit, we check that we do not have a parent item, and
explictly wait for the model to publish all its items, before we call
_process_last.

Additionally, that showed that the tracking of the list/grid item is
ultimatly buggy, as there is no assertion that the parent model is
really the parent directoy. Hence we need to hand pass the parent item
here, as a fallback option to set the correct parent item.

fixes T8689

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8689

Differential Revision: https://phab.enlightenment.org/D11765
2020-04-30 16:02:35 +01:00
Xavi Artigas 55184ba832 doxygen docs: Add missing group braces
Without them, these Evil docs had no group and therefore didn't appear anywhere.
2020-04-30 11:55:15 +02:00
Xavi Artigas ae6b907ccb doxygen docs: Add tests folder to EXAMPLE_PATH
One Emotion example is located in src/tests instead of src/examples
so look for examples in that folder too.
2020-04-30 11:55:15 +02:00
Xavi Artigas d6017150b6 doxygen docs: add missing example references 2020-04-30 11:55:15 +02:00
Xavi Artigas ba508532cc doxygen docs: Fix reference to Elm_Start 2020-04-30 11:55:15 +02:00
Xavi Artigas 8affc994a3 doxygen docs: Replace broken URL with doxygen ref 2020-04-30 11:55:15 +02:00
Xavi Artigas 3a50d86067 doxygen docs: Fix missing links in Ecore_Drm
Ecore_Drm_Input had SOME docs, so a group for them is created.
Ecore_Drm_Sprite had NO DOCS at all, so the link is just removed.
This is a deprecated library anyway.
2020-04-30 11:55:15 +02:00
Xavi Artigas 2d39cb4c7a doxygen docs: Fix broken links in main page 2020-04-30 11:55:15 +02:00
148 changed files with 1701 additions and 772 deletions

53
NEWS
View File

@ -1,7 +1,58 @@
==========
EFL 1.24.0
EFL 1.24.4
==========
Changes since 1.24.3:
---------------------
Fixes:
* efreetd - cache - add more statinfo work around 0 mtime distros
* edje - fix edje_cc mis-re-iding images in image sets
* evas - render - dont crash is private data is null
* eina vpath - fix windows ~username handling to only error when used
* efl ui image - fix scal to fill - broken with non-rect src images
* edje - calce - really respect max image size for img sets
* evas - fix deadlock with sw async rendering calling cbs in post flush
* ecore - don't do anything with heap between fork and exec
Changes since 1.24.2:
---------------------
Fixes:
* evas - csd and wl csd - fix alpha zeroing to avoid framespace junk
* evas - genetic update regions smart merge - merge v adjacent regions
* efreet - handle runtime relocation right with default XDG_DATA_DIRS
* edje: fix animation memory leak.
* canvas vg: fix dangling vector containers.
* evas vg: clean up dangling instances
* canvas vg: fix vector file data memory leak.
* efl gfx_path: fix memory leak.
* efl_ui_image: fixed elm_image_preload_disabled_set api is not working when it is called before file set
Changes since 1.24.1:
---------------------
Fixes:
* evas_vg_shape: return NULL in evas_vg_shape_add when the parent of shape is NULL
* efl_ui_image: fix to call "clicked" smart callback when there is no img
* ecore-x - ensure we fully look at all xkb events and refresh all binds
* evas_vg_container: return NULL in evas_vg_container_add when the parent of container is NULL
Changes since 1.24.0:
---------------------
Fixes:
* edje - don't set font sizes less than 1
* ecore_evas_x - fix maximize/unmaximize request corner case
* ecore_evas: only define these eina errors once
* exactness: remove no longer needed _evas_new()
* exactness_player: do not test for delay_ms
* evas + gl - fix callback-to-app-changes-state issue with pixel data
Changes since 1.23.0:
---------------------

View File

@ -681,7 +681,8 @@ EXCLUDE_SYMBOLS = eo_cxx::*
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH = @top_srcdir@/src/examples
EXAMPLE_PATH = @top_srcdir@/src/examples \
@top_srcdir@/src/tests
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp

View File

@ -23,7 +23,7 @@
* @li @ref eio_main asynchronous input/output
* @li @ref eldbus_main D-Bus integration.
* @li @ref embryo_main embedded script language.
* @li @ref eo_main generic object system.
* @li @ref eolian_main an EO file parser and code generator.
*
* <h3>Graphics libraries</h3>
*
@ -35,15 +35,6 @@
* @li @ref ethumb_main to generate thumbnail images of files.
* @li @ref evas_main drawing canvas.
*
* <h3>Operating System specific libraries</h3>
*
* @li @ref escape_main playstation3 portability layer.
* @li @ref evil_main microsoft windows portability layer.
*
* <h3>Early stage libraries (BETA testing)</h3>
*
* @li @ref eolian_main an EO file parser and code generator.
*
* If you are looking for methods that do not fit into the above list you can
* see the full <a href="modules.html" />module listing</a>.
*/

View File

@ -9,10 +9,10 @@
* This is a VERY SIMPLE toolkit. It is not meant for writing extensive desktop
* applications (yet). Small simple ones with simple needs.
*
* It is meant to make the programmers work almost brainless but give them lots
* It is meant to make the programmers work almost brainlessly but give them lots
* of flexibility.
*
* @li @ref Start - Go here to quickly get started with writing Apps
* @li @ref Elm_Start - Go here to quickly get started with writing Apps
*
* @section organization Organization
*

View File

@ -1,7 +1,7 @@
project('efl', ['c','cpp'],
version: '1.24.0',
version: '1.24.4',
default_options : ['buildtype=release', 'cpp_std=c++11'],
meson_version : '>=0.47'
meson_version : '>=0.50'
)
if host_machine.system() == 'darwin'
@ -267,6 +267,7 @@ luaold_interpreters = [
lua_pc_name = ''
if get_option('lua-interpreter') == 'lua'
config_h.set('ENABLE_LUA_OLD', '1')
foreach l : luaold_interpreters
lua = dependency(l[0], version: l[1], required:false)
lua_pc_name = l[0]

View File

@ -3554,7 +3554,7 @@ st_collections_base_scale(void)
check_min_arg_count(1);
edje_file->base_scale = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
if (edje_file->base_scale == ZERO)
if (EQ(edje_file->base_scale, ZERO))
{
ERR("The base_scale is 0.0. The value should be bigger than 0.0.");
exit(-1);
@ -4015,12 +4015,12 @@ _link_combine(void)
EINA_LIST_FOREACH_SAFE(tup->data, l, ll, ell)
{
if (ell->pr->tween.mode != el->pr->tween.mode) continue;
if (fabs(ell->pr->tween.time - el->pr->tween.time) > DBL_EPSILON) continue;
if (fabs(ell->pr->tween.v1 - el->pr->tween.v1) > DBL_EPSILON) continue;
if (fabs(ell->pr->tween.v2 - el->pr->tween.v2) > DBL_EPSILON) continue;
if (fabs(ell->pr->tween.v3 - el->pr->tween.v3) > DBL_EPSILON) continue;
if (fabs(ell->pr->tween.v4 - el->pr->tween.v4) > DBL_EPSILON) continue;
if (fabs(ell->ed->state.value - el->ed->state.value) > DBL_EPSILON) continue;
if (!EQ(ell->pr->tween.time, el->pr->tween.time)) continue;
if (!EQ(ell->pr->tween.v1, el->pr->tween.v1)) continue;
if (!EQ(ell->pr->tween.v2, el->pr->tween.v2)) continue;
if (!EQ(ell->pr->tween.v3, el->pr->tween.v3)) continue;
if (!EQ(ell->pr->tween.v4, el->pr->tween.v4)) continue;
if (!EQ(ell->ed->state.value, el->ed->state.value)) continue;
if ((!!ell->ed->state.name) != (!!el->ed->state.name))
{
if (((!!ell->ed->state.name) && strcmp(ell->ed->state.name, "default")) ||
@ -8304,7 +8304,7 @@ st_collections_group_parts_part_description_inherit(void)
exit(-1);
}
if (!strcmp(parent_name, "default") && parent_val == 0.0)
if (!strcmp(parent_name, "default") && EINA_DBL_EQ(parent_val, 0.0))
parent = ep->default_desc;
else
{
@ -8335,7 +8335,7 @@ st_collections_group_parts_part_description_inherit(void)
}
}
if (min_dst)
if (EINA_DBL_NONZERO(min_dst))
{
WRN("%s:%i: couldn't find an exact match in part '%s' when looking for '%s' %lf. Falling back to nearest one '%s' %lf.",
file_in, line - 1, ep->name, parent_name, parent_val, parent ? parent->state.name : NULL, parent ? parent->state.value : 0);
@ -8569,8 +8569,8 @@ _part_description_state_update(Edje_Part_Description_Common *ed)
Edje_Part *ep = current_part;
if (ed == ep->default_desc) return;
if ((ep->default_desc->state.name && !strcmp(ed->state.name, ep->default_desc->state.name) && ed->state.value == ep->default_desc->state.value) ||
(!ep->default_desc->state.name && !strcmp(ed->state.name, "default") && ed->state.value == ep->default_desc->state.value))
if ((ep->default_desc->state.name && !strcmp(ed->state.name, ep->default_desc->state.name) && EINA_DBL_EQ(ed->state.value, ep->default_desc->state.value)) ||
(!ep->default_desc->state.name && !strcmp(ed->state.name, "default") && EINA_DBL_EQ(ed->state.value, ep->default_desc->state.value)))
{
if (ep->type == EDJE_PART_TYPE_IMAGE)
_edje_part_description_image_remove((Edje_Part_Description_Image *)ed);
@ -8586,7 +8586,7 @@ _part_description_state_update(Edje_Part_Description_Common *ed)
unsigned int i;
for (i = 0; i < ep->other.desc_count - 1; ++i)
{
if (!strcmp(ed->state.name, ep->other.desc[i]->state.name) && ed->state.value == ep->other.desc[i]->state.value)
if (!strcmp(ed->state.name, ep->other.desc[i]->state.name) && EINA_DBL_EQ(ed->state.value, ep->other.desc[i]->state.value))
{
if (ep->type == EDJE_PART_TYPE_IMAGE)
_edje_part_description_image_remove((Edje_Part_Description_Image *)ed);
@ -8645,7 +8645,7 @@ st_collections_group_parts_part_description_state(void)
val = parse_float_range(1, 0.0, 1.0);
/* if only default desc exists and current desc is not default, commence paddling */
if ((!ep->other.desc_count) && (val || (!eina_streq(s, "default"))))
if ((!ep->other.desc_count) && (EINA_DBL_NONZERO(val) || (!eina_streq(s, "default"))))
{
ERR("parse error %s:%i. invalid state name: '%s'. \"default\" state must always be first.",
file_in, line - 1, s);
@ -8830,8 +8830,8 @@ st_collections_group_parts_part_description_align(void)
This affects the minimum size calculation. See
edje_object_size_min_calc() and edje_object_size_min_restricted_calc().
This tells the min size calculation routine that this part does not
change size in width or height (1 for it doesn't, 0 for it does), so
the routine should not try and expand or contract the part.
change group size in width or height (1 for it doesn't, 0 for it does),
so the routine should not try and expand or contract the group.
Defaults: 0 0
@endproperty
@ -15135,7 +15135,7 @@ edje_cc_handlers_wildcard(void)
if (((!!ed->state.name) != (!!current_desc->state.name)) ||
(ed->state.name && strcmp(ed->state.name, current_desc->state.name)) ||
(fabs(ed->state.value - st) > DBL_EPSILON)) continue;
(!EINA_DBL_EQ(ed->state.value, st))) continue;
current_desc = ed;
break;
}

View File

@ -3509,7 +3509,7 @@ _data_image_h_size_compare_cb(const void *data1, const void *data2)
}
static void
_data_image_sets_size_set()
_data_image_sets_size_set(void)
{
Evas *evas;
Edje_Image_Directory_Set *set;
@ -4029,11 +4029,12 @@ free_group:
if (de->entry && eina_hash_find(images_in_use, de->entry))
continue;
printf("Warning: Image '%s' not used\n", de->entry);
INF("Image '%s' in resource 'edje/image/%i' will not be included as it is unused.",
de->entry, de->id);
/* so as not to write the unused images, moved last image in the
list to unused image position and check it */
// so as not to write the unused images, moved last image in the
// list to unused image position and check it
free((void *)de->entry);
de->entry = NULL;
de_last = edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1;
@ -4042,8 +4043,8 @@ free_group:
images_unused_list = eina_list_append(images_unused_list, iui);
iui->new_id = i;
de_last->id = i;
memcpy(de, de_last, sizeof (Edje_Image_Directory_Entry));
--i; /* need to check a moved image on this index */
memcpy(de, de_last, sizeof(Edje_Image_Directory_Entry));
--i; // need to check a moved image on this index
edje_file->image_dir->entries_count--;
img = realloc(edje_file->image_dir->entries,
sizeof (Edje_Image_Directory_Entry) * edje_file->image_dir->entries_count);
@ -4057,6 +4058,17 @@ free_group:
if (set->name && eina_hash_find(images_in_use, set->name))
continue;
printf("Warning: Image set '%s' not used\n", set->name);
EINA_LIST_FOREACH(set->entries, l, set_e)
{
printf(" Contains '%s' size %ix%i -> %ix%i\n",
set_e->name,
set_e->size.min.w, set_e->size.min.h,
set_e->size.max.w, set_e->size.max.h);
}
/* No need to redo id's - we will warn of unused images - fix in src
* Also .. this is broken and messes up id's ... so easyer - complain
* to develoepr to clean up the theme...
INF("Set '%s' will not be included as it is unused.", set->name);
free((void *)set->name);
@ -4078,6 +4090,7 @@ free_group:
set_realloc = realloc(edje_file->image_dir->sets,
sizeof(Edje_Image_Directory_Set) * edje_file->image_dir->sets_count);
edje_file->image_dir->sets = set_realloc;
*/
}
/* update image id in parts */

View File

@ -1946,7 +1946,7 @@ _calcf(char op, double a, double b)
return a;
case '/':
if (b != 0) a /= b;
if (EINA_DBL_NONZERO(b)) a /= b;
else
ERR("%s:%i divide by zero", file_in, line - 1);
return a;
@ -1956,7 +1956,7 @@ _calcf(char op, double a, double b)
return a;
case '%':
if (0 != b) a = (double)((int)a % (int)b);
if (EINA_DBL_NONZERO(b)) a = (double)((int)a % (int)b);
else
ERR("%s:%i modula by zero", file_in, line - 1);
return a;

View File

@ -614,9 +614,7 @@ main(int argc, char **argv)
ecore_app_no_system_modules();
ecore_init();
eina_init();
edje_init();
_log_dom = eina_log_domain_register
("edje_external_inspector", EINA_COLOR_YELLOW);
@ -628,6 +626,8 @@ main(int argc, char **argv)
goto error_log;
}
edje_init();
arg_index = ecore_getopt_parse(&optdesc, values, argc, argv);
if (arg_index < 0)
{
@ -670,10 +670,9 @@ main(int argc, char **argv)
free(module_patterns_str);
error_getopt:
edje_shutdown();
eina_log_domain_unregister(_log_dom);
error_log:
edje_shutdown();
ecore_shutdown();
eina_shutdown();
return ret;

View File

@ -38,38 +38,36 @@ static Eina_Hash *icon_themes = NULL;
static Eina_Bool
cache_directory_modified(Eina_Hash *dirs, const char *dir)
{
Efreet_Cache_Directory *dcache;
long long time;
Efreet_Cache_Directory *dcache;
Efreet_Cache_Check check;
if (!dirs) return EINA_TRUE;
time = ecore_file_mod_time(dir);
if (!time)
return EINA_FALSE;
dcache = eina_hash_find(dirs, dir);
if (!dcache)
{
if (!dirs) return EINA_TRUE;
if (!efreet_file_cache_fill(dir, &check)) return EINA_FALSE;
dcache = eina_hash_find(dirs, dir);
if (!dcache)
{
dcache = malloc(sizeof (Efreet_Cache_Directory));
if (!dcache) return EINA_TRUE;
dcache->modified_time = time;
dcache->check = check;
eina_hash_add(dirs, dir, dcache);
}
else if (dcache->modified_time == time) return EINA_FALSE;
dcache->modified_time = time;
return EINA_TRUE;
}
else if (efreet_file_cache_check(&check, &dcache->check))
return EINA_FALSE;
else
dcache->check = check;
return EINA_TRUE;
}
static Eina_Bool
cache_extension_lookup(const char *ext)
{
unsigned int i;
unsigned int i;
for (i = 0; i < exts->count; ++i)
if (!strcmp(exts->data[i], ext))
return EINA_TRUE;
return EINA_FALSE;
for (i = 0; i < exts->count; ++i)
{
if (!strcmp(exts->data[i], ext)) return EINA_TRUE;
}
return EINA_FALSE;
}
static Eina_Bool
@ -223,6 +221,37 @@ check_fallback_changed(Efreet_Cache_Icon_Theme *theme)
return EINA_FALSE;
}
typedef struct
{
char *path;
int name_start;
} Scanned_Entry;
static Eina_Hash *already_scanned_path = NULL;
static void
cache_theme_change_verify(Efreet_Cache_Icon_Theme *theme)
{
Eina_Bool changed = EINA_FALSE;
Eina_List *l;
Efreet_Icon_Theme_Directory *d;
char buf[PATH_MAX], *tdir, *sep;
tdir = strdup(theme->path);
sep = strrchr(tdir, '/');
if (sep) *sep = 0;
EINA_LIST_FOREACH(theme->theme.directories, l, d)
{
snprintf(buf, sizeof(buf), "%s/%s", tdir, d->name);
if (cache_directory_modified(theme->dirs, buf))
{
changed = EINA_TRUE;
}
}
free(tdir);
if (changed) theme->changed = changed;
}
static Eina_Bool
cache_scan_path_dir(Efreet_Icon_Theme *theme,
const char *path,
@ -232,29 +261,64 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme,
Eina_Iterator *it;
char buf[PATH_MAX];
Eina_File_Direct_Info *entry;
Eina_List *dirs = NULL;
Eina_List *l;
char *ext;
Scanned_Entry *scentry;
snprintf(buf, sizeof(buf), "%s/%s", path, dir->name);
// we wont ever free this - no point
if (!already_scanned_path)
already_scanned_path = eina_hash_string_superfast_new(NULL);
dirs = eina_hash_find(already_scanned_path, buf);
if ((intptr_t)dirs == (intptr_t)(-1L)) return EINA_TRUE;
else if (!dirs)
{
it = eina_file_stat_ls(buf);
if (!it)
{
eina_hash_add(already_scanned_path, buf, (void *)(intptr_t)(-1L));
return EINA_TRUE;
}
it = eina_file_stat_ls(buf);
if (!it) return EINA_TRUE;
EINA_ITERATOR_FOREACH(it, entry)
{
if (entry->type == EINA_FILE_DIR) continue;
ext = strrchr(entry->path + entry->name_start, '.');
if (!ext || !cache_extension_lookup(ext)) continue;
scentry = malloc(sizeof(Scanned_Entry));
if (!scentry)
{
ERR("Out of memory");
exit(1);
}
scentry->name_start = entry->name_start;
scentry->path = strdup(entry->path);
if (!scentry->path)
{
ERR("Out of memory");
exit(1);
}
dirs = eina_list_append(dirs, scentry);
}
eina_iterator_free(it);
if (dirs)
eina_hash_add(already_scanned_path, buf, dirs);
else
eina_hash_add(already_scanned_path, buf, (void *)(intptr_t)(-1L));
}
EINA_ITERATOR_FOREACH(it, entry)
EINA_LIST_FOREACH(dirs, l, scentry)
{
Efreet_Cache_Icon *icon;
char *name;
char *ext;
const char **tmp;
unsigned int i;
if (entry->type == EINA_FILE_DIR)
continue;
ext = strrchr(entry->path + entry->name_start, '.');
if (!ext || !cache_extension_lookup(ext))
continue;
ext = strrchr(scentry->path + scentry->name_start, '.');
if (!ext) continue;
/* icon with known extension */
name = entry->path + entry->name_start;
name = scentry->path + scentry->name_start;
*ext = '\0';
icon = eina_hash_find(icons, name);
@ -284,7 +348,7 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme,
/* check if the path already exist */
for (j = 0; j < icon->icons[i]->paths_count; ++j)
if (!strcmp(icon->icons[i]->paths[j], entry->path))
if (!strcmp(icon->icons[i]->paths[j], scentry->path))
break;
if (j != icon->icons[i]->paths_count)
@ -348,12 +412,9 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme,
exit(1);
}
icon->icons[i]->paths = tmp;
icon->icons[i]->paths[icon->icons[i]->paths_count] = eina_stringshare_add(entry->path);
icon->icons[i]->paths[icon->icons[i]->paths_count] = eina_stringshare_add(scentry->path);
eina_array_push(strs, icon->icons[i]->paths[icon->icons[i]->paths_count++]);
}
eina_iterator_free(it);
return EINA_TRUE;
}
@ -364,7 +425,9 @@ cache_scan_path(Efreet_Icon_Theme *theme, Eina_Hash *icons, const char *path)
Efreet_Icon_Theme_Directory *dir;
EINA_LIST_FOREACH(theme->directories, l, dir)
{
if (!cache_scan_path_dir(theme, path, dir, icons)) return EINA_FALSE;
}
return EINA_TRUE;
}
@ -511,13 +574,13 @@ icon_theme_index_read(Efreet_Cache_Icon_Theme *theme, const char *path)
Efreet_Ini *ini;
Efreet_Icon_Theme_Directory *dir;
const char *tmp;
long long time;
Efreet_Cache_Check check;
if (!theme || !path) return EINA_FALSE;
time = ecore_file_mod_time(path);
if (!time) return EINA_FALSE;
if (theme->path && !strcmp(theme->path, path) && theme->last_cache_check >= time)
if (!efreet_file_cache_fill(path, &check)) return EINA_FALSE;
if (theme->path && !strcmp(theme->path, path) &&
efreet_file_cache_check(&check, &(theme->check)))
{
/* no change */
theme->valid = 1;
@ -528,8 +591,7 @@ icon_theme_index_read(Efreet_Cache_Icon_Theme *theme, const char *path)
theme->path = eina_stringshare_add(path);
eina_array_push(strs, theme->path);
}
if (time > theme->last_cache_check)
theme->last_cache_check = time;
theme->check = check;
theme->changed = 1;
ini = efreet_ini_new(path);
@ -644,10 +706,10 @@ cache_theme_scan(const char *dir)
Efreet_Cache_Icon_Theme *theme;
const char *name;
const char *path;
long long time;
Efreet_Cache_Check check;
Efreet_Cache_Directory *d;
time = ecore_file_mod_time(entry->path);
if (!time) continue;
if (!efreet_file_cache_fill(entry->path, &check)) continue;
if ((entry->type != EINA_FILE_DIR) &&
(entry->type != EINA_FILE_LNK))
@ -669,10 +731,26 @@ cache_theme_scan(const char *dir)
(void *)theme->theme.name.internal, theme);
theme->changed = 1;
}
if (time > theme->last_cache_check)
{
theme->last_cache_check = time;
d = NULL;
if (theme->dirs)
d = eina_hash_find(theme->dirs, entry->path);
if (!d)
{
if (!theme->dirs)
theme->dirs = eina_hash_string_superfast_new(NULL);
theme->changed = 1;
d = NEW(Efreet_Cache_Directory, 1);
d->check = check;
eina_hash_add(theme->dirs, entry->path, d);
}
else
{
if (!efreet_file_cache_check(&check, &(d->check)))
{
d->check = check;
theme->changed = 1;
}
}
/* TODO: We need to handle change in order of included paths */
@ -732,8 +810,7 @@ icon_theme_free(Efreet_Cache_Icon_Theme *theme)
eina_list_free(theme->theme.paths);
eina_list_free(theme->theme.inherits);
EINA_LIST_FREE(theme->theme.directories, data)
free(data);
EINA_LIST_FREE(theme->theme.directories, data) free(data);
if (theme->dirs) efreet_hash_free(theme->dirs, free);
free(theme);
}
@ -926,7 +1003,7 @@ main(int argc, char **argv)
if (!theme->theme.name.name) continue;
#endif
INF("scan theme %s", theme->theme.name.name);
cache_theme_change_verify(theme);
theme->changed = check_changed(theme);
if (flush)
theme->changed = EINA_TRUE;
@ -981,18 +1058,18 @@ main(int argc, char **argv)
icons_it = eina_hash_iterator_tuple_new(icons);
EINA_ITERATOR_FOREACH(icons_it, tuple)
eet_data_write(icon_ef, icon_edd, tuple->key, tuple->data, 1);
eet_data_write(icon_ef, icon_edd, tuple->key, tuple->data, EET_COMPRESSION_SUPERFAST);
eina_iterator_free(icons_it);
INF("theme change: %s %lld", theme->theme.name.internal, theme->last_cache_check);
eet_data_write(theme_ef, theme_edd, theme->theme.name.internal, theme, 1);
INF("theme change: %s %lld", theme->theme.name.internal, theme->check.mtime);
eet_data_write(theme_ef, theme_edd, theme->theme.name.internal, theme, EET_COMPRESSION_SUPERFAST);
}
eina_hash_free(themes);
eina_hash_free(icons);
changed = EINA_TRUE;
}
eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1);
eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, EET_COMPRESSION_SUPERFAST);
eet_close(icon_ef);
efreet_setowner(efreet_icon_cache_file(theme->theme.name.internal));
free(icon_version);
@ -1064,17 +1141,17 @@ main(int argc, char **argv)
icons_it = eina_hash_iterator_tuple_new(icons);
EINA_ITERATOR_FOREACH(icons_it, tuple)
eet_data_write(icon_ef, fallback_edd, tuple->key, tuple->data, 1);
eet_data_write(icon_ef, fallback_edd, tuple->key, tuple->data, EET_COMPRESSION_SUPERFAST);
eina_iterator_free(icons_it);
}
eina_hash_free(icons);
eet_data_write(theme_ef, theme_edd, EFREET_CACHE_ICON_FALLBACK, theme, 1);
eet_data_write(theme_ef, theme_edd, EFREET_CACHE_ICON_FALLBACK, theme, EET_COMPRESSION_SUPERFAST);
}
icon_theme_free(theme);
eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1);
eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, EET_COMPRESSION_SUPERFAST);
eet_close(icon_ef);
efreet_setowner(efreet_icon_cache_file(EFREET_CACHE_ICON_FALLBACK));
free(icon_version);
@ -1082,7 +1159,7 @@ main(int argc, char **argv)
eina_hash_free(icon_themes);
/* save data */
eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, 1);
eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, EET_COMPRESSION_SUPERFAST);
eet_close(theme_ef);
theme_ef = NULL;

View File

@ -213,7 +213,7 @@ bf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -224,7 +224,7 @@ bf_change(void *data EINA_UNUSED,
double bf = elm_config_scroll_bounce_friction_get();
double val = elm_slider_value_get(obj);
if (bf == val) return;
if (EINA_DBL_EQ(bf, val)) return;
elm_config_scroll_bounce_friction_set(val);
elm_config_all_flush();
}
@ -238,7 +238,7 @@ ps_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -249,7 +249,7 @@ ps_change(void *data EINA_UNUSED,
double ps = elm_config_scroll_page_scroll_friction_get();
double val = elm_slider_value_get(obj);
if (ps == val) return;
if (EINA_DBL_EQ(ps, val)) return;
elm_config_scroll_page_scroll_friction_set(val);
elm_config_all_flush();
}
@ -263,7 +263,7 @@ bis_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -274,7 +274,7 @@ bis_change(void *data EINA_UNUSED,
double bis = elm_config_scroll_bring_in_scroll_friction_get();
double val = elm_slider_value_get(obj);
if (bis == val) return;
if (EINA_DBL_EQ(bis, val)) return;
elm_config_scroll_bring_in_scroll_friction_set(val);
elm_config_all_flush();
}
@ -288,7 +288,7 @@ zf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -299,7 +299,7 @@ zf_change(void *data EINA_UNUSED,
double zf = elm_config_scroll_zoom_friction_get();
double val = elm_slider_value_get(obj);
if (zf == val) return;
if (EINA_DBL_EQ(zf, val)) return;
elm_config_scroll_zoom_friction_set(val);
elm_config_all_flush();
}
@ -313,7 +313,7 @@ smooth_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 100.0))) / 100.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -324,7 +324,7 @@ smooth_change(void *data EINA_UNUSED,
double zf = elm_config_scroll_thumbscroll_smooth_amount_get();
double val = elm_slider_value_get(obj);
if (zf == val) return;
if (EINA_DBL_EQ(zf, val)) return;
elm_config_scroll_thumbscroll_smooth_amount_set(val);
elm_config_all_flush();
}
@ -338,7 +338,7 @@ smooth_win_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 100.0))) / 100.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -349,7 +349,7 @@ smooth_win_change(void *data EINA_UNUSED,
double zf = elm_config_scroll_thumbscroll_smooth_time_window_get();
double val = elm_slider_value_get(obj);
if (zf == val) return;
if (EINA_DBL_EQ(zf, val)) return;
elm_config_scroll_thumbscroll_smooth_time_window_set(val);
elm_config_all_flush();
}
@ -378,7 +378,7 @@ tst_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -389,7 +389,7 @@ tst_change(void *data EINA_UNUSED,
double tst = elm_config_scroll_thumbscroll_threshold_get();
double val = elm_slider_value_get(obj);
if (tst == val) return;
if (EINA_DBL_EQ(tst, val)) return;
elm_config_scroll_thumbscroll_threshold_set(val);
elm_config_all_flush();
}
@ -403,7 +403,7 @@ tsht_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -414,7 +414,7 @@ tsht_change(void *data EINA_UNUSED,
double tst = elm_config_scroll_thumbscroll_hold_threshold_get();
double val = elm_slider_value_get(obj);
if (tst == val) return;
if (EINA_DBL_EQ(tst, val)) return;
elm_config_scroll_thumbscroll_hold_threshold_set(val);
elm_config_all_flush();
}
@ -428,7 +428,7 @@ tsmt_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -439,7 +439,7 @@ tsmt_change(void *data EINA_UNUSED,
double tsmt = elm_config_scroll_thumbscroll_momentum_threshold_get();
double val = elm_slider_value_get(obj);
if (tsmt == val) return;
if (EINA_DBL_EQ(tsmt, val)) return;
elm_config_scroll_thumbscroll_momentum_threshold_set(val);
elm_config_all_flush();
}
@ -453,7 +453,7 @@ tsfdt_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -464,7 +464,7 @@ tsfdt_change(void *data EINA_UNUSED,
double tsfdt = elm_config_scroll_thumbscroll_flick_distance_tolerance_get();
double val = elm_slider_value_get(obj);
if (tsfdt == val) return;
if (EINA_DBL_EQ(tsfdt, val)) return;
elm_config_scroll_thumbscroll_flick_distance_tolerance_set(val);
elm_config_all_flush();
}
@ -478,7 +478,7 @@ tsf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -489,7 +489,7 @@ tsf_change(void *data EINA_UNUSED,
double tsf = elm_config_scroll_thumbscroll_friction_get();
double val = elm_slider_value_get(obj);
if (tsf == val) return;
if (EINA_DBL_EQ(tsf, val)) return;
elm_config_scroll_thumbscroll_friction_set(val);
elm_config_all_flush();
}
@ -503,7 +503,7 @@ tsmf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -514,7 +514,7 @@ tsmf_change(void *data EINA_UNUSED,
double tsmf = elm_config_scroll_thumbscroll_min_friction_get();
double val = elm_slider_value_get(obj);
if (tsmf == val) return;
if (EINA_DBL_EQ(tsmf, val)) return;
elm_config_scroll_thumbscroll_min_friction_set(val);
elm_config_all_flush();
}
@ -528,7 +528,7 @@ tsfs_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -539,7 +539,7 @@ tsfs_change(void *data EINA_UNUSED,
double tsfs = elm_config_scroll_thumbscroll_friction_standard_get();
double val = elm_slider_value_get(obj);
if (tsfs == val) return;
if (EINA_DBL_EQ(tsfs, val)) return;
elm_config_scroll_thumbscroll_friction_standard_set(val);
elm_config_all_flush();
}
@ -553,7 +553,7 @@ tsbf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -564,7 +564,7 @@ tsbf_change(void *data EINA_UNUSED,
double tsbf = elm_config_scroll_thumbscroll_border_friction_get();
double val = elm_slider_value_get(obj);
if (tsbf == val) return;
if (EINA_DBL_EQ(tsbf, val)) return;
elm_config_scroll_thumbscroll_border_friction_set(val);
elm_config_all_flush();
}
@ -578,7 +578,7 @@ tssf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 20.0))) / 20.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -589,7 +589,7 @@ tssf_change(void *data EINA_UNUSED,
double tssf = elm_config_scroll_thumbscroll_sensitivity_friction_get();
double val = elm_slider_value_get(obj);
if (tssf == val) return;
if (EINA_DBL_EQ(tssf, val)) return;
elm_config_scroll_thumbscroll_sensitivity_friction_set(val);
elm_config_all_flush();
}
@ -603,7 +603,7 @@ tsat_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -614,7 +614,7 @@ tsat_change(void *data EINA_UNUSED,
double tsat = elm_config_scroll_thumbscroll_acceleration_threshold_get();
double val = elm_slider_value_get(obj);
if (tsat == val) return;
if (EINA_DBL_EQ(tsat, val)) return;
elm_config_scroll_thumbscroll_acceleration_threshold_set(val);
elm_config_all_flush();
}
@ -628,7 +628,7 @@ tsatl_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -639,7 +639,7 @@ tsatl_change(void *data EINA_UNUSED,
double tsatl = elm_config_scroll_thumbscroll_acceleration_time_limit_get();
double val = elm_slider_value_get(obj);
if (tsatl == val) return;
if (EINA_DBL_EQ(tsatl, val)) return;
elm_config_scroll_thumbscroll_acceleration_time_limit_set(val);
elm_config_all_flush();
}
@ -653,7 +653,7 @@ tsaw_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -664,7 +664,7 @@ tsaw_change(void *data EINA_UNUSED,
double tsaw = elm_config_scroll_thumbscroll_acceleration_weight_get();
double val = elm_slider_value_get(obj);
if (tsaw == val) return;
if (EINA_DBL_EQ(tsaw, val)) return;
elm_config_scroll_thumbscroll_acceleration_weight_set(val);
elm_config_all_flush();
}
@ -692,7 +692,7 @@ cf_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 5.0))) / 5.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -703,7 +703,7 @@ cf_change(void *data EINA_UNUSED,
double cf = elm_config_cache_flush_interval_get();
double val = elm_slider_value_get(obj);
if (cf == val) return;
if (EINA_DBL_EQ(cf, val)) return;
elm_config_cache_flush_interval_set(val);
elm_config_all_flush();
}
@ -717,7 +717,7 @@ fc_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -728,7 +728,7 @@ fc_change(void *data EINA_UNUSED,
double font_cache = elm_config_cache_font_cache_size_get();
double val = elm_slider_value_get(obj);
if (font_cache == val) return;
if (EINA_DBL_EQ(font_cache, val)) return;
elm_config_cache_font_cache_size_set(val * 1024);
elm_config_all_flush();
}
@ -742,7 +742,7 @@ ic_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -753,7 +753,7 @@ ic_change(void *data EINA_UNUSED,
double image_cache = elm_config_cache_image_cache_size_get();
double val = elm_slider_value_get(obj);
if (image_cache == val) return;
if (EINA_DBL_EQ(image_cache, val)) return;
elm_config_cache_image_cache_size_set(val * 1024);
elm_config_all_flush();
}
@ -767,7 +767,7 @@ sc_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 10.0))) / 10.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -778,7 +778,7 @@ sc_change(void *data EINA_UNUSED,
double scale = elm_config_scale_get();
double val = elm_slider_value_get(obj);
if (scale == val) return;
if (EINA_DBL_EQ(scale, val)) return;
elm_config_scale_set(val);
elm_config_all_flush();
}
@ -792,7 +792,7 @@ fs_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 5.0))) / 5.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -803,7 +803,7 @@ fs_change(void *data EINA_UNUSED,
double fs = elm_config_finger_size_get();
double val = elm_slider_value_get(obj);
if (fs == val) return;
if (EINA_DBL_EQ(fs, val)) return;
elm_config_finger_size_set(val);
elm_config_all_flush();
}
@ -817,7 +817,7 @@ efc_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 5.0))) / 5.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -828,7 +828,7 @@ efc_change(void *data EINA_UNUSED,
double efc = elm_config_cache_edje_file_cache_size_get();
double val = elm_slider_value_get(obj);
if (efc == val) return;
if (EINA_DBL_EQ(efc, val)) return;
elm_config_cache_edje_file_cache_size_set(val);
elm_config_all_flush();
}
@ -842,7 +842,7 @@ ecc_round(void *data EINA_UNUSED,
double v;
v = ((double)((int)(val * 5.0))) / 5.0;
if (v != val) elm_slider_value_set(obj, v);
if (!EINA_DBL_EQ(v, val)) elm_slider_value_set(obj, v);
}
static void
@ -853,7 +853,7 @@ ecc_change(void *data EINA_UNUSED,
double ecc = elm_config_cache_edje_collection_cache_size_get();
double val = elm_slider_value_get(obj);
if (ecc == val) return;
if (EINA_DBL_EQ(ecc, val)) return;
elm_config_cache_edje_collection_cache_size_set(val);
elm_config_all_flush();
}
@ -944,7 +944,7 @@ transition_duration_change(void *data EINA_UNUSED,
double val = elm_slider_value_get(obj);
Eina_Bool scale = elm_config_transition_duration_factor_get();
if (scale == val) return;
if (EINA_DBL_EQ(scale, val)) return;
elm_config_transition_duration_factor_set(val);
elm_config_all_flush();
}

View File

@ -1345,7 +1345,7 @@ _calcf(char op, double a, double b)
return a;
case '/':
if (b != 0) a /= b;
if (EINA_DBL_NONZERO(b)) a /= b;
else
ERR("%s:%i divide by zero", file_in, line - 1);
return a;
@ -1355,7 +1355,7 @@ _calcf(char op, double a, double b)
return a;
case '%':
if (0 != b) a = (double)((int)a % (int)b);
if (EINA_DBL_NONZERO(b)) a = (double)((int)a % (int)b);
else
ERR("%s:%i modula by zero", file_in, line - 1);
return a;

View File

@ -2160,6 +2160,7 @@ test_gengrid_update(void *data EINA_UNUSED,
win = elm_win_util_standard_add("gengrid-update", "Gengrid Update");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
api->box = bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

View File

@ -272,7 +272,7 @@ rotate_end(void *_po, void *event_info)
po->rot_tot_time = fabs(r_info->momentum) / ROTATE_MOMENTUM_FRICTION;
po->rot_momentum = r_info->momentum;
po->rot_progress = 0.0;
if (po->rot_momentum)
if (EINA_DBL_NONZERO(po->rot_momentum))
{
po->rot_timer = ecore_animator_add(rotate_momentum_animation_operation, po);
}
@ -334,7 +334,7 @@ zoom_end(void *_po, void *event_info)
po->zoom_mom_time = tot_time;
po->zoom_mom = p->momentum;
po->base_zoom = po->zoom;
if (po->zoom_mom)
if (EINA_DBL_NONZERO(po->zoom_mom))
{
po->zoom_momentum = elm_transit_add();
elm_transit_duration_set(po->zoom_momentum,
@ -425,7 +425,7 @@ momentum_end(void *_po, void *event_info)
po->mom_tot_time = sqrt((p->mx * p->mx) + (p->my * p->my))
/ MOMENTUM_FRICTION;
if (po->mom_tot_time)
if (EINA_DBL_NONZERO(po->mom_tot_time))
{ /* Compute acceleration for both compenents, and launch timer */
po->mom_x_acc = (p->mx) / po->mom_tot_time; /* a = (v-v0) / t */
po->mom_y_acc = (p->my) / po->mom_tot_time; /* a = (v-v0) / t */

View File

@ -405,7 +405,7 @@ perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFa
sine = sin(radians);
cosine = cos(radians);
if ((deltaZ == 0) || (sine == 0) || (aspect == 0))
if (EINA_DBL_EQ(deltaZ, 0) || EINA_DBL_EQ(sine, 0) || EINA_DBL_EQ(aspect, 0))
return;
cotangent = cosine / sine;

View File

@ -22,8 +22,7 @@ test_icon_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_add(NULL, "icon-animated-gif", ELM_WIN_BASIC);
elm_win_title_set(win, "Icon Animated Gif");
win = elm_win_util_standard_add("icon-animated-gif", "Icon Animated Gif");
elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);

View File

@ -448,7 +448,7 @@ _map_name_loaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA
if (addr)
{
printf("name of [lon = %lf, lat = %lf] is %s\n", lon, lat, addr);
if ((lon != 0.0) && (lat !=0.0))
if (EINA_DBL_NONZERO(lon) && EINA_DBL_NONZERO(lat))
{
Eina_Bool b = elm_map_paused_get(data);
elm_map_paused_set(data, EINA_TRUE);

View File

@ -175,7 +175,7 @@ my_bt_zoom_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
zoom -= 0.5;
else if ((zoom > 1.0) && (zoom <= 1.5))
zoom = 1.0;
else if (zoom == 1.0)
else if (EINA_DBL_EQ(zoom, 1.0))
zoom = 0.8;
else
zoom = zoom * zoom;

View File

@ -157,7 +157,7 @@ _tt_item_icon3(void *data EINA_UNUSED,
sc = ((float)sw * 0.8) / (float)w;
else if ((float)h / (float)sh >= 0.8)
sc = ((float)sh * 0.8) / (float)h;
if (sc) elm_object_scale_set(ic, sc);
if (EINA_FLT_NONZERO(sc)) elm_object_scale_set(ic, sc);
}
return ic;
}

View File

@ -226,6 +226,22 @@ _bt_win_center_cb(void *data, Evas_Object *obj EINA_UNUSED,
elm_win_center(data, EINA_TRUE, EINA_TRUE);
}
static void
_bt_win_maximize(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
printf("Maximize\n");
elm_win_maximized_set(data, EINA_TRUE);
}
static void
_bt_win_unmaximize(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
printf("Unmaximize\n");
elm_win_maximized_set(data, EINA_FALSE);
}
static void
_win_state_print_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -414,7 +430,7 @@ test_win_state(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Iconify and Activate");
elm_object_text_set(bt, "Iconify + Act");
evas_object_smart_callback_add(bt, "clicked",
_bt_win_iconify_and_activate, win);
evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -423,7 +439,7 @@ test_win_state(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
evas_object_show(bt);
bt = elm_button_add(bx2);
elm_object_text_set(bt, "Iconify and Deiconify");
elm_object_text_set(bt, "Iconify + De");
evas_object_smart_callback_add(bt, "clicked",
_bt_win_iconify_and_deiconify, win);
evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -431,6 +447,24 @@ test_win_state(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
elm_box_pack_end(bx2, bt);
evas_object_show(bt);
bt = elm_button_add(bx2);
elm_object_text_set(bt, "Maximize");
evas_object_smart_callback_add(bt, "clicked",
_bt_win_maximize, win);
evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
elm_box_pack_end(bx2, bt);
evas_object_show(bt);
bt = elm_button_add(bx2);
elm_object_text_set(bt, "Unmaximize");
evas_object_smart_callback_add(bt, "clicked",
_bt_win_unmaximize, win);
evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
elm_box_pack_end(bx2, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Center");
evas_object_smart_callback_add(bt, "clicked",

View File

@ -257,10 +257,8 @@ typedef struct
int nb_shots; /**< The number of shots present in the unit */
} Exactness_Unit;
Evas *(*_evas_new)(void);
const char *_exactness_action_type_to_string_get(Exactness_Action_Type type);
Eina_Bool ex_is_original_app(void);
void ex_set_original_envvar(void);
Eina_Bool exactness_image_compare(Exactness_Image *img1, Exactness_Image *img2, Exactness_Image **diff_img);

View File

@ -511,7 +511,7 @@ _feed_event_timer_cb(void *data EINA_UNUSED)
if (act && act->type != EXACTNESS_ACTION_STABILIZE)
{
act = eina_list_data_get(_cur_event_list);
if (act && act->delay_ms)
if (act)
{
DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0);
ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
@ -552,7 +552,7 @@ _stabilization_timer_cb(void *data EINA_UNUSED)
if (_src_type != FTYPE_REMOTE && !_pause_request)
{
Exactness_Action *act = eina_list_data_get(_cur_event_list);
if (act && act->delay_ms)
if (act)
{
DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0);
ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);

View File

@ -39,23 +39,23 @@ _elm_notify_orient_get(const Evas_Object *obj)
elm_notify_align_get(obj, &horizontal, &vertical);
if ((horizontal == 0.5) && (vertical == 0.0))
if (EINA_DBL_EQ(horizontal, 0.5) && EINA_DBL_EQ(vertical, 0.0))
orient = ELM_NOTIFY_ORIENT_TOP;
else if ((horizontal == 0.5) && (vertical == 0.5))
else if (EINA_DBL_EQ(horizontal, 0.5) && EINA_DBL_EQ(vertical, 0.5))
orient = ELM_NOTIFY_ORIENT_CENTER;
else if ((horizontal == 0.5) && (vertical == 1.0))
else if (EINA_DBL_EQ(horizontal, 0.5) && EINA_DBL_EQ(vertical, 1.0))
orient = ELM_NOTIFY_ORIENT_BOTTOM;
else if ((horizontal == 0.0) && (vertical == 0.5))
else if (EINA_DBL_EQ(horizontal, 0.0) && EINA_DBL_EQ(vertical, 0.5))
orient = ELM_NOTIFY_ORIENT_LEFT;
else if ((horizontal == 1.0) && (vertical == 0.5))
else if (EINA_DBL_EQ(horizontal, 1.0) && EINA_DBL_EQ(vertical, 0.5))
orient = ELM_NOTIFY_ORIENT_RIGHT;
else if ((horizontal == 0.0) && (vertical == 0.0))
else if (EINA_DBL_EQ(horizontal, 0.0) && EINA_DBL_EQ(vertical, 0.0))
orient = ELM_NOTIFY_ORIENT_TOP_LEFT;
else if ((horizontal == 1.0) && (vertical == 0.0))
else if (EINA_DBL_EQ(horizontal, 1.0) && EINA_DBL_EQ(vertical, 0.0))
orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;
else if ((horizontal == 0.0) && (vertical == 1.0))
else if (EINA_DBL_EQ(horizontal, 0.0) && EINA_DBL_EQ(vertical, 1.0))
orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;
else if ((horizontal == 1.0) && (vertical == 1.0))
else if (EINA_DBL_EQ(horizontal, 1.0) && EINA_DBL_EQ(vertical, 1.0))
orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;
else
orient = ELM_NOTIFY_ORIENT_TOP;

View File

@ -22,6 +22,8 @@
#include <stdio.h>
#include <string.h>
#include "evas-common.h"
#define WIDTH (640)
#define HEIGHT (480)

View File

@ -21,7 +21,7 @@
#include "efl_loop_message_future_handler.eo.h"
/**
* @addtogroup Ecore_MainLoop_Group
* @addtogroup Ecore_Main_Loop_Group
*
* @{
*/
@ -93,6 +93,7 @@ EAPI Eo *efl_main_loop_get(void);
*/
/**
* @ingroup Ecore
* @addtogroup Ecore_Fd_Io_Group
*
* @{
@ -115,6 +116,7 @@ EAPI Eo *efl_main_loop_get(void);
*/
/**
* @ingroup Ecore
* @addtogroup Ecore_Model_Group
*
* @{

View File

@ -218,6 +218,13 @@ _impl_ecore_exe_run_priority_get(void)
return run_pri;
}
#if defined (__FreeBSD__) || defined (__OpenBSD__)
# include <dlfcn.h>
static char ***_dl_environ;
#else
extern char **environ;
#endif
Eo *
_impl_ecore_exe_efl_object_finalize(Eo *obj, Ecore_Exe_Data *exe)
{
@ -294,7 +301,29 @@ _impl_ecore_exe_efl_object_finalize(Eo *obj, Ecore_Exe_Data *exe)
else if (pid == 0) /* child */
{
#ifdef HAVE_SYSTEMD
unsetenv("NOTIFY_SOCKET");
char **env = NULL, **e;
# if defined (__FreeBSD__) || defined (__OpenBSD__)
_dl_environ = dlsym(NULL, "environ");
env = *_dl_environ;
# else
env = environ;
# endif
// find NOTIFY_SOCKET env var and remove it without any heap work
if (env)
{
Eina_Bool shuffle = EINA_FALSE;
for (e = env; *e; e++)
{
if (!shuffle)
{
if (!strncmp(e[0], "NOTIFY_SOCKET=", 14))
shuffle = EINA_TRUE;
}
if (shuffle) e[0] = e[1];
}
}
#endif
if (run_pri != ECORE_EXE_PRIORITY_INHERIT)
{

View File

@ -14,7 +14,7 @@
#include "Ecore.h"
#include "ecore_private.h"
#include "lib/ecore/ecore_main_common.h"
#include "ecore_main_common.h"
#ifdef HAVE_SYS_TIMERFD_H

View File

@ -357,8 +357,10 @@ _efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd)
return EINA_FALSE;
#else
Eo *loop;
Efl_Task_Data *tdl, *td = efl_data_scope_get(obj, EFL_TASK_CLASS);
Efl_Task_Data *tdl = NULL, *td = efl_data_scope_get(obj, EFL_TASK_CLASS);
Eina_Iterator *itr = NULL, *itr2 = NULL;
const char *cmd;
char **newenv, **env = NULL, **e;
int devnull;
int pipe_stdin[2];
int pipe_stdout[2];
@ -428,9 +430,17 @@ _efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd)
}
_ecore_signal_pid_lock();
// get these before the fork to avoid heap malloc deadlocks
loop = efl_provider_find(obj, EFL_LOOP_CLASS);
if (loop) tdl = efl_data_scope_get(loop, EFL_TASK_CLASS);
if (pd->env) itr = efl_core_env_content_get(pd->env);
if (pd->env) itr2 = efl_core_env_content_get(pd->env);
pd->pid = fork();
if (pd->pid != 0)
{
if (itr) eina_iterator_free(itr);
if (itr2) eina_iterator_free(itr2);
// parent process is here inside this if block
if (td->flags & EFL_TASK_FLAGS_USE_STDIN) close(pipe_stdin[0]);
if (td->flags & EFL_TASK_FLAGS_USE_STDOUT) close(pipe_stdout[1]);
@ -513,58 +523,77 @@ _efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd)
close(devnull);
}
if (!(loop = efl_provider_find(obj, EFL_LOOP_CLASS))) exit(1);
if (!(tdl = efl_data_scope_get(loop, EFL_TASK_CLASS))) exit(1);
if (!tdl) exit(1);
// clear systemd notify socket... only relevant for systemd world,
// otherwise shouldn't be trouble
putenv("NOTIFY_SOCKET=");
# if defined (__FreeBSD__) || defined (__OpenBSD__)
_dl_environ = dlsym(NULL, "environ");
if (_dl_environ) env = *_dl_environ;
# else
env = environ;
# endif
if (env)
{
Eina_Bool shuffle = EINA_FALSE;
for (e = env; *e; e++)
{
if (!shuffle)
{
if (!strncmp(e[0], "NOTIFY_SOCKET=", 14))
shuffle = EINA_TRUE;
}
if (shuffle) e[0] = e[1];
}
}
// actually setenv the env object (clear what was there before so it is
// the only env there)
if (pd->env)
{
Eina_Iterator *itr;
const char *key;
int count = 0, i = 0;
# ifdef HAVE_CLEARENV
clearenv();
# else
# if defined (__FreeBSD__) || defined (__OpenBSD__)
_dl_environ = dlsym(NULL, "environ");
if (_dl_environ) *_dl_environ = NULL;
else ERR("Can't find envrion symbol");
# else
environ = NULL;
# endif
# endif
itr = efl_core_env_content_get(pd->env);
// use 2nd throw-away itr to count
EINA_ITERATOR_FOREACH(itr2, key)
{
count++;
}
// object which we don't free (sitting in hash table in env obj)
newenv = alloca(sizeof(char *) * (count + 1));
// use 2st iter to walk and fill new env
EINA_ITERATOR_FOREACH(itr, key)
{
setenv(key, efl_core_env_get(pd->env, key) , 1);
newenv[i] = (char *)efl_core_env_get(pd->env, key);
i++;
}
efl_unref(pd->env);
pd->env = NULL;
// yes - we dont free itr or itr2 - we're going to exec below or exit
// also put newenv array on stack pointign to the strings in the env
# if defined (__FreeBSD__) || defined (__OpenBSD__)
if (_dl_environ) *_dl_environ = newenv;
else ERR("Can't find envrion symbol");
# else
environ = newenv;
# endif
}
// close all fd's other than the first 3 (0, 1, 2) and exited write fd
int except[2] = { 0, -1 };
except[0] = pd->fd.exited_write;
eina_file_close_from(3, except);
#ifdef HAVE_PRCTL
# ifdef HAVE_PRCTL
if ((pd->flags & EFL_EXE_FLAGS_TERM_WITH_PARENT))
{
prctl(PR_SET_PDEATHSIG, SIGTERM);
}
#elif defined(HAVE_PROCCTL)
# elif defined(HAVE_PROCCTL)
if ((pd->flags & EFL_EXE_FLAGS_TERM_WITH_PARENT))
{
int sig = SIGTERM;
procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &sig);
}
#endif
# endif
// actually execute!
_exec(cmd, pd->flags, td->flags);
// we couldn't exec... uh oh. HAAAAAAAALP!

View File

@ -634,7 +634,7 @@ _efl_net_socket_windows_efl_object_constructor(Eo *o, Efl_Net_Socket_Windows_Dat
}
EOLIAN static void
_efl_net_socket_windows_efl_object_invalidate(Eo *o, Efl_Net_Socket_Windows_Data *pd)
_efl_net_socket_windows_efl_object_invalidate(Eo *o, Efl_Net_Socket_Windows_Data *pd EINA_UNUSED)
{
if (efl_io_closer_close_on_invalidate_get(o) &&
(!efl_io_closer_closed_get(o)))

View File

@ -221,7 +221,6 @@ EAPI extern int ECORE_DRM_EVENT_SEAT_ADD; /**< @since 1.14 */
* @li @ref Ecore_Drm_Tty_Group
* @li @ref Ecore_Drm_Output_Group
* @li @ref Ecore_Drm_Input_Group
* @li @ref Ecore_Drm_Sprite_Group
* @li @ref Ecore_Drm_Fb_Group
*
*/
@ -621,12 +620,17 @@ EAPI unsigned int ecore_drm_output_crtc_buffer_get(Ecore_Drm_Output *output);
*/
EAPI unsigned int ecore_drm_output_connector_id_get(Ecore_Drm_Output *output);
/* TODO: Doxy */
/** @defgroup Ecore_Drm_Input_Group Drm input handling
* @{
*/
EAPI Eina_Bool ecore_drm_inputs_create(Ecore_Drm_Device *dev);
EAPI void ecore_drm_inputs_destroy(Ecore_Drm_Device *dev);
EAPI Eina_Bool ecore_drm_inputs_enable(Ecore_Drm_Input *input);
EAPI void ecore_drm_inputs_disable(Ecore_Drm_Input *input);
EAPI void ecore_drm_inputs_device_axis_size_set(Ecore_Drm_Evdev *dev, int w, int h);
/**
* @}
*/
EAPI Eina_Bool ecore_drm_sprites_create(Ecore_Drm_Device *dev);
EAPI void ecore_drm_sprites_destroy(Ecore_Drm_Device *dev);

View File

@ -36,6 +36,9 @@
static Eina_List *drm_devices;
static int ticking = 0;
struct xkb_keymap *cached_keymap;
struct xkb_context *cached_context;
static void _ecore_drm_tick_source_set(Ecore_Drm_Device *dev);
static void

View File

@ -96,8 +96,8 @@
# endif
extern int _ecore_drm_log_dom;
struct xkb_keymap *cached_keymap;
struct xkb_context *cached_context;
extern struct xkb_keymap *cached_keymap;
extern struct xkb_context *cached_context;
# define EVDEV_MAX_SLOTS 32

View File

@ -55,6 +55,10 @@
goto _label; \
}
EAPI Eina_Error ecore_evas_no_matching_type;
EAPI Eina_Error ecore_evas_no_selection;
EAPI Eina_Error ecore_evas_request_replaced;
EAPI Eina_Bool _ecore_evas_app_comp_sync = EINA_FALSE;
EAPI int _ecore_evas_log_dom = -1;
static int _ecore_evas_init_count = 0;
@ -5486,7 +5490,7 @@ static Eina_Bool
_deliver_cb(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice)
{
Ecore_Evas_Selection_Seat_Buffers *buffers;
Eina_Content *content;
Eina_Content *content = NULL;
Eina_Content *converted = NULL;
Eina_Bool result = EINA_FALSE;

View File

@ -33,9 +33,9 @@
EAPI extern int _ecore_evas_log_dom;
EAPI Eina_Error ecore_evas_no_matching_type;
EAPI Eina_Error ecore_evas_no_selection;
EAPI Eina_Error ecore_evas_request_replaced;
EAPI extern Eina_Error ecore_evas_no_matching_type;
EAPI extern Eina_Error ecore_evas_no_selection;
EAPI extern Eina_Error ecore_evas_request_replaced;
#ifdef ECORE_EVAS_DEFAULT_LOG_COLOR
# undef ECORE_EVAS_DEFAULT_LOG_COLOR

View File

@ -277,6 +277,8 @@ ecore_ipc_post_event_client_del(Ecore_Ipc_Client *cl)
Ecore_Ipc_Event_Client_Del *ev;
if (cl->delete_me) return;
cl->delete_me = EINA_TRUE;
ev = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del));
EINA_SAFETY_ON_NULL_RETURN(ev);

View File

@ -2540,8 +2540,10 @@ ecore_x_xkb_track_state(void)
{
Eina_Bool ret = EINA_FALSE;
#ifdef ECORE_XKB
unsigned mask = XkbNewKeyboardNotifyMask | XkbMapNotifyMask |
XkbStateNotifyMask | XkbCompatMapNotifyMask;
EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE);
ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, XkbStateNotifyMask, XkbStateNotifyMask);
ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, mask, mask);
if (_ecore_xlib_sync) ecore_x_sync();
#endif
return ret;

View File

@ -2511,10 +2511,16 @@ _ecore_x_event_handle_xkb(XEvent *xevent)
if (xkbev->any.xkb_type == XkbMapNotify)
{
XkbMapNotifyEvent *xkbmapping;
XkbMapNotifyEvent *xkbmapping = (XkbMapNotifyEvent *)xkbev;
xkbmapping = (XkbMapNotifyEvent *)xkbev;
_ecore_x_window_grab_suspend();
_ecore_x_key_grab_suspend();
XkbGetMap(_ecore_x_disp, XkbAllMapComponentsMask,
xkbmapping->device);
XkbRefreshKeyboardMapping(xkbmapping);
_ecore_x_modifiers_get();
_ecore_x_window_grab_resume();
_ecore_x_key_grab_resume();
}
else
{

View File

@ -490,6 +490,25 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name
return ret;
}
static int
_edje_image_set_fill(Edje_Real_Part_Set **eps,
Edje_Image_Directory_Set_Entry *entry,
Edje_Image_Directory_Set *set,
int id)
{
if (eps)
{
if (!*eps) *eps = calloc(1, sizeof(Edje_Real_Part_Set));
if (*eps)
{
(*eps)->entry = entry;
(*eps)->set = set;
(*eps)->id = id;
}
}
return entry->id;
}
static int
_edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps,
Edje_Part_Description_Image *st, Edje_Part_Image_Id *imid)
@ -517,9 +536,7 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps,
{
if (((*eps)->entry->size.min.h <= h) &&
(h <= (*eps)->entry->size.max.h))
{
return (*eps)->entry->id;
}
return (*eps)->entry->id;
}
}
}
@ -530,46 +547,24 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps,
evas_image_max_size_get(evas_object_evas_get(obj), &maxw, &maxh);
EINA_LIST_FOREACH(set->entries, l, entry)
{
// skip images b
if ((entry->size.w > 0) && (entry->size.h > 0) &&
((w > entry->size.w) || (h > entry->size.h)))
continue;
// skip images that exceed max size
if ((maxw > 0) && (maxh > 0) &&
(entry->size.w > 0) && (entry->size.h > 0) &&
((w > entry->size.w) || (h > entry->size.h)))
((entry->size.w > maxw) || (entry->size.h > maxh)))
continue;
if ((entry->size.min.w <= w) && (w <= entry->size.max.w))
{
if ((entry->size.min.h <= h) && (h <= entry->size.max.h))
{
if (eps)
{
if (!*eps) *eps = calloc(1, sizeof(Edje_Real_Part_Set));
if (*eps)
{
(*eps)->entry = entry;
(*eps)->set = set;
(*eps)->id = id;
}
}
return entry->id;
}
return _edje_image_set_fill(eps, entry, set, id);
}
}
// nothing found so pick first - which shouldbe smallest
entry = eina_list_data_get(set->entries);
if (entry)
{
if (eps)
{
if (!*eps)
*eps = calloc(1, sizeof (Edje_Real_Part_Set));
if (*eps)
{
(*eps)->entry = entry;
(*eps)->set = set;
(*eps)->id = id;
}
}
return entry->id;
}
return _edje_image_set_fill(eps, entry, set, id);
return -1;
}
@ -3243,6 +3238,7 @@ _edje_vector_load_lottie(Edje *ed, Edje_Real_Part *ep, const char *key)
{
lottie_data[lottie_data_len] = '\0';
file = eina_file_virtualize(NULL, lottie_data, lottie_data_len + 1, EINA_FALSE);
if (efl_file_loaded_get(ep->object)) efl_file_unload(ep->object);
efl_file_simple_mmap_load(ep->object, file, NULL);
if (ep->typedata.vector->lottie_virtual_file)
@ -3331,10 +3327,11 @@ _edje_vector_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EIN
root = efl_duplicate(src_root);
if (!efl_gfx_path_interpolate(root, src_root, dest_root, pos))
{
ERR("Can't interpolate check the svg file");
}
ERR("Can't interpolate check the svg file");
efl_canvas_vg_object_root_node_set(ep->object, root);
efl_unref(root);
efl_unref(src_root);
efl_unref(dest_root);
}
@ -4055,8 +4052,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
}
ERR("Circular dependency in the group '%s' : %s",
ed->group, depends_path);
eina_array_free(part_array);
}
eina_array_free(part_array);
#endif
return;
}

View File

@ -1881,14 +1881,6 @@ _edje_file_del(Edje *ed)
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_real_part_shutdown(ed, rp);
if (rp->object)
{
_edje_callbacks_focus_del(rp->object, ed);
_edje_callbacks_del(rp->object, ed);
evas_object_del(rp->object);
rp->object = NULL;
}
if (rp->custom)
{
// xxx: lua2
@ -1956,7 +1948,10 @@ _edje_file_del(Edje *ed)
(rp->typedata.vector))
{
if (rp->typedata.vector->anim)
efl_del(rp->typedata.vector->anim);
{
efl_canvas_object_animation_stop(rp->object);
efl_del(rp->typedata.vector->anim);
}
if (rp->typedata.vector->lottie_virtual_file)
eina_file_close(rp->typedata.vector->lottie_virtual_file);
if (rp->typedata.vector->lottie_data)
@ -1966,6 +1961,14 @@ _edje_file_del(Edje *ed)
rp->typedata.vector = NULL;
}
if (rp->object)
{
_edje_callbacks_focus_del(rp->object, ed);
_edje_callbacks_del(rp->object, ed);
evas_object_del(rp->object);
rp->object = NULL;
}
/* Cleanup optional part. */
free(rp->drag);
rp->drag = NULL;
@ -2118,6 +2121,9 @@ _edje_file_free(Edje_File *edf)
{
for (i = 0; i < edf->image_dir->entries_count; ++i)
eina_stringshare_del(edf->image_dir->entries[i].entry);
for (i = 0; i < edf->image_dir->vectors_count; ++i)
eina_stringshare_del(edf->image_dir->vectors[i].entry);
}
/* Sets have been added after edje received eet dictionary support */
@ -2131,6 +2137,7 @@ _edje_file_free(Edje_File *edf)
free(edf->image_dir->entries);
free(edf->image_dir->sets);
free(edf->image_dir->vectors);
free(edf->image_dir);
}
if (edf->sound_dir)
@ -2169,6 +2176,22 @@ _edje_file_free(Edje_File *edf)
free(edf->vibration_dir);
}
if (edf->filter_dir)
{
int i;
if (edf->free_strings)
{
for (i = 0; i < edf->filter_dir->filters_count; ++i)
{
eina_stringshare_del(edf->filter_dir->filters[i].name);
eina_stringshare_del(edf->filter_dir->filters[i].script);
}
}
free(edf->filter_dir->filters);
free(edf->filter_dir);
}
if (edf->mo_dir)
{
unsigned int i;
@ -2349,6 +2372,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec, Edje_Part_Collec
if (ec->script) embryo_program_free(ec->script);
_edje_lua2_script_unload(ec);
if (ec->limits.parts) free(ec->limits.parts);
eina_hash_free(ec->alias);
eina_hash_free(ec->aliased);

View File

@ -367,14 +367,15 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
*/
if (!chosen_desc->text.fit_x) size = sh;
if (inlined_font) efl_text_font_source_set(ep->object, ed->path);
else efl_text_font_source_set(ep->object, NULL);
if (size < 1) size = 1;
if (inlined_font) efl_text_font_source_set(ep->object, ed->path);
else efl_text_font_source_set(ep->object, NULL);
if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
if (ep->part->scale) efl_gfx_entity_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_font_family_set(ep->object, font);
efl_text_font_size_set(ep->object, size);
efl_text_set(ep->object, text);
efl_text_font_family_set(ep->object, font);
efl_text_font_size_set(ep->object, size);
efl_text_set(ep->object, text);
part_get_geometry(ep, &tw, &th);
/* only grow the font size if we didn't already reach the max size

View File

@ -1535,11 +1535,4 @@ _efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
_efl_gfx_path_path_set(obj, pd, from->commands, from->points);
}
EOLIAN static void
_efl_gfx_path_efl_object_destructor(Eo *obj, Efl_Gfx_Path_Data *pd)
{
_efl_gfx_path_reset(obj, pd);
efl_destructor(efl_super(obj, EFL_GFX_PATH_MIXIN));
}
#include "interfaces/efl_gfx_path.eo.c"

View File

@ -1,7 +1,7 @@
import eina_types;
import efl_gfx_types;
mixin @beta Efl.Gfx.Path requires Efl.Object
mixin @beta Efl.Gfx.Path
{
[[EFL graphics path object interface]]
methods {
@ -267,7 +267,4 @@ mixin @beta Efl.Gfx.Path requires Efl.Object
]]
}
}
implements {
Efl.Object.destructor;
}
}

View File

@ -51,6 +51,8 @@ static const char *xdg_pictures_dir = NULL;
static const char *xdg_videos_dir = NULL;
static const char *hostname = NULL;
static Eina_Prefix *pfx= NULL;
static void efreet_dirs_init(void);
static const char *efreet_dir_get(const char *key, const char *fallback);
static Eina_List *efreet_dirs_get(const char *key,
@ -72,6 +74,9 @@ efreet_base_init(void)
EINA_LOG_ERR("Efreet: Could not create a log domain for efreet_base.\n");
return 0;
}
if (!pfx) pfx = eina_prefix_new
(NULL, efreet_init, "EFREET", "efreet", "checkme",
PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
efreet_dirs_init();
return 1;
}
@ -105,6 +110,11 @@ efreet_base_shutdown(void)
IF_RELEASE(hostname);
if (pfx)
{
eina_prefix_free(pfx);
pfx = NULL;
}
eina_log_domain_unregister(_efreet_base_log_dom);
_efreet_base_log_dom = -1;
}
@ -280,6 +290,7 @@ efreet_dirs_reset(void)
static void
efreet_dirs_init(void)
{
char *data_dir = DATA_DIR;
char buf[PATH_MAX];
/* efreet_home_dir */
@ -294,13 +305,27 @@ efreet_dirs_init(void)
xdg_cache_home = efreet_dir_get("XDG_CACHE_HOME", "/.cache");
/* xdg_data_dirs */
if (pfx)
{
const char *dir = eina_prefix_get(pfx);
if (dir)
{
size_t len = strlen(dir);
data_dir = alloca(len + 1 + 5 /*"share" */ + 1);
#ifdef _WIN32
snprintf(buf, sizeof(buf), "%s\\Efl;" DATA_DIR ";", getenv("APPDATA"));
xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS", buf);
snprintf(data_dir, len + 1 + 5 + 1, "%s\\share", dir);
#else
xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS",
DATA_DIR ":/usr/share:/usr/local/share");
snprintf(data_dir, len + 1 + 5 + 1, "%s/share", dir);
#endif
}
}
#ifdef _WIN32
snprintf(buf, sizeof(buf), "%s\\Efl;%s;", data_dir, getenv("APPDATA"));
#else
snprintf(buf, sizeof(buf), "%s:/usr/share:/usr/local/share", data_dir);
#endif
xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS", buf);
/* xdg_config_dirs */
#ifdef _WIN32
xdg_config_dirs = efreet_dirs_get("XDG_CONFIG_DIRS", getenv("APPDATA"));

View File

@ -1,3 +1,4 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@ -536,6 +537,143 @@ efreet_desktop_util_cache_file(void)
/*
* Needs EAPI because of helper binaries
*/
#define SHSH(n, v) ((((v) << (n)) & 0xffffffff) | ((v) >> (32 - (n))))
static inline int
int_to_bigendian(int in)
{
static const unsigned char test[4] = { 0x11, 0x22, 0x33, 0x44 };
static const unsigned int *test_i = (const unsigned int *)test;
if (test_i[0] == 0x44332211) return eina_swap32(in);
return in;
}
static void
sha1(unsigned char *data, int size, unsigned char *dst)
{
unsigned int digest[5], word[80], wa, wb, wc, wd, we, t;
unsigned char buf[64], *d;
int idx, left, i;
const unsigned int magic[4] =
{ 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 };
idx = 0;
digest[0] = 0x67452301; digest[1] = 0xefcdab89; digest[2] = 0x98badcfe;
digest[3] = 0x10325476; digest[4] = 0xc3d2e1f0;
memset(buf, 0, sizeof(buf));
for (left = size, d = data; left > 0; left--, d++)
{
if ((idx == 0) && (left < 64))
{
memset(buf, 0, 60);
buf[60] = (size >> 24) & 0xff;
buf[61] = (size >> 16) & 0xff;
buf[62] = (size >> 8) & 0xff;
buf[63] = (size) & 0xff;
}
buf[idx] = *d;
idx++;
if ((idx == 64) || (left == 1))
{
if ((left == 1) && (idx < 64)) buf[idx] = 0x80;
for (i = 0; i < 16; i++)
{
word[i] = (unsigned int)buf[(i * 4) ] << 24;
word[i] |= (unsigned int)buf[(i * 4) + 1] << 16;
word[i] |= (unsigned int)buf[(i * 4) + 2] << 8;
word[i] |= (unsigned int)buf[(i * 4) + 3];
}
for (i = 16; i < 80; i++)
word[i] = SHSH(1,
word[i - 3 ] ^ word[i - 8 ] ^
word[i - 14] ^ word[i - 16]);
wa = digest[0]; wb = digest[1]; wc = digest[2];
wd = digest[3]; we = digest[4];
for (i = 0; i < 80; i++)
{
if (i < 20)
t = SHSH(5, wa) + ((wb & wc) | ((~wb) & wd)) +
we + word[i] + magic[0];
else if (i < 40)
t = SHSH(5, wa) + (wb ^ wc ^ wd) +
we + word[i] + magic[1];
else if (i < 60)
t = SHSH(5, wa) + ((wb & wc) | (wb & wd) | (wc & wd)) +
we + word[i] + magic[2];
else if (i < 80)
t = SHSH(5, wa) + (wb ^ wc ^ wd) +
we + word[i] + magic[3];
we = wd;
wd = wc;
wc = SHSH(30, wb);
wb = wa;
wa = t;
}
digest[0] += wa; digest[1] += wb; digest[2] += wc;
digest[3] += wd; digest[4] += we;
idx = 0;
}
}
t = int_to_bigendian(digest[0]); digest[0] = t;
t = int_to_bigendian(digest[1]); digest[1] = t;
t = int_to_bigendian(digest[2]); digest[2] = t;
t = int_to_bigendian(digest[3]); digest[3] = t;
t = int_to_bigendian(digest[4]); digest[4] = t;
memcpy(dst, digest, 5 * 4);
}
EAPI Eina_Bool
efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check)
{
struct stat st;
ssize_t size = 0;
char link[PATH_MAX];
memset(check, 0, sizeof(Efreet_Cache_Check));
#ifndef _WIN32
if (lstat(file, &st) != 0) return EINA_FALSE;
if (S_ISLNK(st.st_mode))
{
size = readlink(file, link, sizeof(link));
if ((size > 0) && ((size_t)size >= sizeof(link))) return EINA_FALSE;
if (stat(file, &st) != 0) return EINA_FALSE;
}
if (size > 0) sha1((unsigned char *)link, size, check->link_sha1);
else
#endif
memset(check->link_sha1, 0, sizeof(check->link_sha1));
check->uid = st.st_uid;
check->gid = st.st_gid;
check->size = st.st_size;
#ifndef _WIN32
check->blocks = st.st_blocks;
#else
check->blocks = 0;
#endif
check->mtime = st.st_mtime;
check->chtime = st.st_ctime;
check->mode = st.st_mode;
return EINA_TRUE;
}
EAPI Eina_Bool // true if matches
efreet_file_cache_check(const Efreet_Cache_Check *check1, const Efreet_Cache_Check *check2)
{
if ((check1->mtime != check2->mtime ) ||
(check1->size != check2->size ) ||
(check1->chtime != check2->chtime ) ||
(check1->blocks != check2->blocks) ||
(check1->mode != check2->mode ) ||
(check1->uid != check2->uid ) ||
(check1->gid != check2->gid ) ||
(memcmp(check1->link_sha1, check2->link_sha1, 20) != 0))
{
return EINA_FALSE;
}
return EINA_TRUE; // matches
}
EAPI Eet_Data_Descriptor *
efreet_version_edd(void)
{
@ -691,8 +829,22 @@ efreet_icon_directory_edd(void)
directory_edd = eet_data_descriptor_file_new(&eddc);
if (!directory_edd) return NULL;
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"modified_time", modified_time, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.uid", check.uid, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.gid", check.gid, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.size", check.size, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.blocks", check.blocks, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.mtime", check.mtime, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.chtime", check.chtime, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory,
"check.mode", check.mode, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(directory_edd, Efreet_Cache_Directory,
"check.link_sha1", check.link_sha1, EET_T_CHAR);
return directory_edd;
}
@ -790,7 +942,21 @@ efreet_icon_theme_edd(Eina_Bool cache)
if (cache)
{
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"last_cache_check", last_cache_check, EET_T_LONG_LONG);
"check.uid", check.uid, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.gid", check.gid, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.size", check.size, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.blocks", check.blocks, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.mtime", check.mtime, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.chtime", check.chtime, EET_T_LONG_LONG);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.mode", check.mode, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(icon_theme_edd, Efreet_Cache_Icon_Theme,
"check.link_sha1", check.link_sha1, EET_T_CHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme,
"path", path, EET_T_STRING);

View File

@ -38,11 +38,20 @@
# endif
#endif
typedef struct _Efreet_Cache_Check Efreet_Cache_Check;
typedef struct _Efreet_Cache_Icon_Theme Efreet_Cache_Icon_Theme;
typedef struct _Efreet_Cache_Directory Efreet_Cache_Directory;
typedef struct _Efreet_Cache_Desktop Efreet_Cache_Desktop;
EAPI const char *efreet_desktop_util_cache_file(void);
EAPI const char *efreet_desktop_cache_file(void);
EAPI const char *efreet_icon_cache_file(const char *theme);
EAPI const char *efreet_icon_theme_cache_file(void);
EAPI Eina_Bool efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check);
EAPI Eina_Bool efreet_file_cache_check(const Efreet_Cache_Check *check1, const Efreet_Cache_Check *check2);
EAPI Eet_Data_Descriptor *efreet_version_edd(void);
EAPI Eet_Data_Descriptor *efreet_desktop_edd(void);
EAPI Eet_Data_Descriptor *efreet_hash_array_string_edd(void);
@ -52,15 +61,23 @@ EAPI Eet_Data_Descriptor *efreet_icon_theme_edd(Eina_Bool cache);
EAPI Eet_Data_Descriptor *efreet_icon_edd(void);
EAPI Eet_Data_Descriptor *efreet_icon_fallback_edd(void);
typedef struct _Efreet_Cache_Icon_Theme Efreet_Cache_Icon_Theme;
typedef struct _Efreet_Cache_Directory Efreet_Cache_Directory;
typedef struct _Efreet_Cache_Desktop Efreet_Cache_Desktop;
struct _Efreet_Cache_Check
{
unsigned long long uid;
unsigned long long gid;
unsigned long long size;
unsigned long long blocks;
unsigned long long mtime;
unsigned long long chtime;
unsigned int mode;
unsigned char link_sha1[20];
};
struct _Efreet_Cache_Icon_Theme
{
Efreet_Icon_Theme theme;
long long last_cache_check; /**< Last time the cache was checked */
Efreet_Cache_Check check; /**< relevant stat info from last check */
Eina_Hash *dirs; /**< All possible icon paths for this theme */
@ -73,13 +90,14 @@ struct _Efreet_Cache_Icon_Theme
struct _Efreet_Cache_Directory
{
long long modified_time;
Efreet_Cache_Check check; /**< relevant stat info from last check */
};
struct _Efreet_Cache_Desktop
{
Efreet_Desktop desktop;
Efreet_Cache_Check check; /**< relevant stat info from last check */
double check_time; /**< Last time we check for disk modification */
};

View File

@ -39,6 +39,7 @@
#include "eina_safety_checks.h"
#include "eina_convert.h"
#include "eina_fp.h"
#include "eina_util.h"
/*============================================================================*
* Local *
@ -613,7 +614,7 @@ eina_convert_strtod_c(const char *nptr, char **endptr)
else if (*iter == 0)
goto on_success;
if ((val == 2.2250738585072011) && ((minus_e * (int)expo_part) == -308))
if ((eina_dbl_exact(val, 2.2250738585072011)) && ((minus_e * (int)expo_part) == -308))
{
val *= 1.0e-308;
a = iter;
@ -621,7 +622,7 @@ eina_convert_strtod_c(const char *nptr, char **endptr)
goto on_success;
}
if ((val == 2.2250738585072012) && ((minus_e * (int)expo_part) <= -308))
if ((eina_dbl_exact(val, 2.2250738585072012)) && ((minus_e * (int)expo_part) <= -308))
{
val *= 1.0e-308;
a = iter;

View File

@ -34,6 +34,7 @@
#include "eina_debug.h"
#include "eina_debug_private.h"
#include "eina_util.h"
#ifndef _WIN32
# include <signal.h>
@ -307,7 +308,7 @@ _trace_cb(void *data EINA_UNUSED)
static int bts = 0;
int i;
if (!_trace_t0) _trace_t0 = get_time();
if (!EINA_DBL_NONZERO(_trace_t0)) _trace_t0 = get_time();
// take a lock on grabbing thread debug info like backtraces
eina_spinlock_take(&_eina_debug_thread_lock);

View File

@ -46,6 +46,7 @@
* Here is an example for use:
*
* @include eina_error_01.c
* @example eina_error_01.c
*
* Of course, instead of printf(), eina_log_print() can be used to
* have beautiful error messages.

View File

@ -21,6 +21,10 @@
# include "config.h"
#endif
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
@ -36,6 +40,10 @@
#endif
#include <fcntl.h>
#if defined(__linux__)
# include <sys/syscall.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
@ -1252,6 +1260,50 @@ eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *st)
return 0;
}
///////////////////////////////////////////////////////////////////////////
// this below is funky avoiding opendir to avoid heap allocations thus
// getdents and all the os specific stuff as this is intendedf for use
// between fork and exec normally ... this is important
#if defined(__FreeBSD__)
# define do_getdents(fd, buf, size) getdents(fd, buf, size)
typedef struct
{
ino_t d_ino;
off_t d_off;
unsigned short d_reclen;
unsigned char d_type;
unsigned char ____pad0;
unsigned short d_namlen;
unsigned short ____pad1;
char d_name[4096];
} Dirent;
#elif defined(__OpenBSD__)
# define do_getdents(fd, buf, size) getdents(fd, buf, size)
typedef struct
{
__ino_t d_ino;
__off_t d_off;
unsigned short d_reclen;
unsigned char d_type;
unsigned char d_namlen;
unsigned char ____pad[4];
char d_name[4096];
} Dirent;
#elif defined(__linux__)
# define do_getdents(fd, buf, size) syscall(SYS_getdents64, fd, buf, size)
// getdents64 added un glibc 2.30 ... so use raw syscall - will work
// from some linux 2.4 on... so ... i think that's ok. :)
//# define do_getdents(fd, buf, size) getdents64(fd, buf, size)
typedef struct
{
ino64_t d_ino;
off64_t d_off;
unsigned short d_reclen;
unsigned char d_type;
char d_name[4096];
} Dirent;
#endif
EAPI void
eina_file_close_from(int fd, int *except_fd)
{
@ -1259,62 +1311,179 @@ eina_file_close_from(int fd, int *except_fd)
// XXX: what do to here? anything?
#else
#ifdef HAVE_DIRENT_H
//# if 0
# if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__)
int dirfd;
Dirent *d;
char buf[4096];
int *closes = NULL;
int num_closes = 0, i, j, clo, num;
const char *fname;
ssize_t pos, ret;
Eina_Bool do_read;
// note - this api is EXPECTED to be called in between a fork() and exec()
// when no threads are running. if you use this outside that context then
// it may not work as intended and may miss some fd's etc.
dirfd = open("/proc/self/fd", O_RDONLY | O_DIRECTORY);
if (dirfd < 0) dirfd = open("/dev/fd", O_RDONLY | O_DIRECTORY);
if (dirfd >= 0)
{
// count # of closes - the dir list should/will not change as its
// the fd's we have open so we can read it twice with no changes
// to it
do_read = EINA_TRUE;
for (;;)
{
skip:
if (do_read)
{
pos = 0;
ret = do_getdents(dirfd, buf, sizeof(buf));
if (ret <= 0) break;
do_read = EINA_FALSE;
}
d = (Dirent *)(buf + pos);
fname = d->d_name;
pos += d->d_reclen;
if (pos >= ret) do_read = EINA_TRUE;
if (!((fname[0] >= '0') && (fname[0] <= '9'))) continue;
num = atoi(fname);
if (num < fd) continue;
if (except_fd)
{
for (j = 0; except_fd[j] >= 0; j++)
{
if (except_fd[j] == num) goto skip;
}
}
num_closes++;
}
// alloc closes list and walk again to fill it - on stack to avoid
// heap allocs
closes = alloca(num_closes * sizeof(int));
if ((closes) && (num_closes > 0))
{
clo = 0;
lseek(dirfd, 0, SEEK_SET);
do_read = EINA_TRUE;
for (;;)
{
skip2:
if (do_read)
{
pos = 0;
ret = do_getdents(dirfd, buf, sizeof(buf));
if (ret <= 0) break;
do_read = EINA_FALSE;
}
d = (Dirent *)(buf + pos);
fname = d->d_name;
pos += d->d_reclen;
if (pos >= ret) do_read = EINA_TRUE;
if (!((fname[0] >= '0') && (fname[0] <= '9'))) continue;
num = atoi(fname);
if (num < fd) continue;
if (except_fd)
{
for (j = 0; except_fd[j] >= 0; j++)
{
if (except_fd[j] == num) goto skip2;
}
}
if (clo < num_closes) closes[clo] = num;
clo++;
}
// in case we somehow don't fill up all of closes in 2nd pass
// (this shouldn't happen as no threads are running and we
// do nothing to modify the fd set between 2st and 2nd pass).
// set rest num_closes to clo so we don't close invalid values
num_closes = clo;
}
close(dirfd);
// now go close all those fd's - some may be invalide like the dir
// reading fd above... that's ok.
for (i = 0; i < num_closes; i++)
{
close(closes[i]);
}
return;
}
# else
DIR *dir;
int *closes = NULL;
int num_closes = 0, i, j, clo, num;
struct dirent *dp;
const char *fname;
dir = opendir("/proc/self/fd");
if (!dir) dir = opendir("/dev/fd");
if (dir)
{
struct dirent *dp;
const char *fname;
int *closes = NULL;
int num_closes = 0, i;
// count # of closes - the dir list should/will not change as its
// the fd's we have open so we can read it twice with no changes
// to it
for (;;)
{
skip:
dp = readdir(dir);
if (!dp) break;
if (!(dp = readdir(dir))) break;
fname = dp->d_name;
if ((fname[0] >= '0') && (fname[0] <= '9'))
if (!((fname[0] >= '0') && (fname[0] <= '9'))) continue;
num = atoi(fname);
if (num < fd) continue;
if (except_fd)
{
int num = atoi(fname);
if (num >= fd)
for (j = 0; except_fd[j] >= 0; j++)
{
if (except_fd)
if (except_fd[j] == num) goto skip;
}
}
num_closes++;
}
// alloc closes list and walk again to fill it - on stack to avoid
// heap allocs
closes = alloca(num_closes * sizeof(int));
if ((closes) && (num_closes > 0))
{
clo = 0;
seekdir(dir, 0);
for (;;)
{
skip2:
if (!(dp = readdir(dir))) break;
fname = dp->d_name;
if (!((fname[0] >= '0') && (fname[0] <= '9'))) continue;
num = atoi(fname);
if (num < fd) continue;
if (except_fd)
{
for (j = 0; except_fd[j] >= 0; j++)
{
int j;
for (j = 0; except_fd[j] >= 0; j++)
{
if (except_fd[j] == num) goto skip;
}
}
num_closes++;
int *tmp = realloc(closes, num_closes * sizeof(int));
if (!tmp) num_closes--;
else
{
closes = tmp;
closes[num_closes - 1] = num;
if (except_fd[j] == num) goto skip2;
}
}
if (clo < num_closes) closes[clo] = num;
clo++;
}
}
closedir(dir);
for (i = 0; i < num_closes; i++) close(closes[i]);
free(closes);
// now go close all those fd's - some may be invalide like the dir
// reading fd above... that's ok.
for (i = 0; i < num_closes; i++)
{
close(closes[i]);
}
return;
}
# endif
#endif
int i, max = 1024;
int max = 1024;
# ifdef HAVE_SYS_RESOURCE_H
#ifdef HAVE_SYS_RESOURCE_H
struct rlimit lim;
if (getrlimit(RLIMIT_NOFILE, &lim) < 0) return;
max = lim.rlim_max;
# endif
#endif
for (i = fd; i < max;)
{
if (except_fd)
@ -1323,11 +1492,11 @@ skip:
for (j = 0; except_fd[j] >= 0; j++)
{
if (except_fd[j] == i) goto skip2;
if (except_fd[j] == i) goto skip3;
}
}
close(i);
skip2:
skip3:
i++;
}
#endif

View File

@ -108,6 +108,7 @@
*
* @skip while
* @until }
* @example eina_inlist_01.c
*/
/**
@ -179,6 +180,7 @@
* @until }
*
* Here is the full source code for this example: @ref eina_inlist_02_c
* @example eina_inlist_02.c
*/
/**
@ -266,7 +268,7 @@
*
* To see the full source code for this example, click here: @ref
* eina_inlist_03_c
*
* @example eina_inlist_03.c
*/
/**

View File

@ -42,7 +42,10 @@
#endif
#include "eina_debug_private.h"
#ifdef HAVE_BACKTRACE
#define EINA_LOG_BACKTRACE
#endif
#include "eina_config.h"
#include "eina_private.h"

View File

@ -230,11 +230,11 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
}
// ~username/ <- homedir of user "username"
else
#ifndef HAVE_GETPWENT
ERR("User fetching is disabled on this system\nThe string was: %s", path);
return 0;
#else
{
#ifndef HAVE_GETPWENT
ERR("User fetching is disabled on this system\nThe string was: %s", path);
return 0;
#else
const char *p;
char *name;
@ -249,8 +249,8 @@ _eina_vpath_resolve(const char *path, char *str, size_t size)
if (!_fetch_user_homedir(&home, name, path))
return 0;
path = p;
}
#endif
}
if (home)
{
return snprintf(str, size, "%s%s", home, path);

View File

@ -1,5 +1,5 @@
eina_deps = [dl]
eina_pub_deps = [thread_dep]
eina_pub_deps = [thread_dep, m]
if sys_windows == true
eina_pub_deps += [evil]

View File

@ -619,32 +619,36 @@ eldbus_message_iter_next(Eldbus_Message_Iter *iter)
static void
get_basic(char type, DBusMessageIter *iter, va_list *vl)
{
DBusBasicValue val;
switch (type)
{
case DBUS_TYPE_BYTE:
{
uint8_t *byte = va_arg(*vl, uint8_t *);
dbus_message_iter_get_basic(iter, byte);
dbus_message_iter_get_basic(iter, &val);
*byte = val.bool_val;
break;
}
case DBUS_TYPE_BOOLEAN:
{
Eina_Bool *boolean = va_arg(*vl, Eina_Bool *);
dbus_bool_t val;
dbus_message_iter_get_basic(iter, &val);
*boolean = val;
*boolean = val.bool_val;
break;
}
case DBUS_TYPE_INT16:
{
int16_t *int16 = va_arg(*vl, int16_t *);
dbus_message_iter_get_basic(iter, int16);
dbus_message_iter_get_basic(iter, &val);
*int16 = val.i16;
break;
}
case DBUS_TYPE_UINT16:
{
uint16_t *uint16 = va_arg(*vl, uint16_t *);
dbus_message_iter_get_basic(iter, uint16);
dbus_message_iter_get_basic(iter, &val);
*uint16 = val.u16;
break;
}
case DBUS_TYPE_INT32:
@ -653,31 +657,36 @@ get_basic(char type, DBusMessageIter *iter, va_list *vl)
#endif
{
int32_t *int32 = va_arg(*vl, int32_t *);
dbus_message_iter_get_basic(iter, int32);
dbus_message_iter_get_basic(iter, &val);
*int32 = val.i32;
break;
}
case DBUS_TYPE_UINT32:
{
uint32_t *uint32 = va_arg(*vl, uint32_t *);
dbus_message_iter_get_basic(iter, uint32);
dbus_message_iter_get_basic(iter, &val);
*uint32 = val.u32;
break;
}
case DBUS_TYPE_INT64:
{
int64_t *int64 = va_arg(*vl, int64_t *);
dbus_message_iter_get_basic(iter, int64);
dbus_message_iter_get_basic(iter, &val);
*int64 = val.i64;
break;
}
case DBUS_TYPE_UINT64:
{
uint64_t *uint64 = va_arg(*vl, uint64_t *);
dbus_message_iter_get_basic(iter, uint64);
dbus_message_iter_get_basic(iter, &val);
*uint64 = val.u64;
break;
}
case DBUS_TYPE_DOUBLE:
{
double *double_ieee = va_arg(*vl, double *);
dbus_message_iter_get_basic(iter, double_ieee);
dbus_message_iter_get_basic(iter, &val);
*double_ieee = val.dbl;
break;
}
case DBUS_TYPE_STRING:
@ -685,7 +694,8 @@ get_basic(char type, DBusMessageIter *iter, va_list *vl)
case DBUS_TYPE_SIGNATURE:
{
char **string = va_arg(*vl, char**);
dbus_message_iter_get_basic(iter, string);
dbus_message_iter_get_basic(iter, &val);
*string = val.str;
break;
}
default:

View File

@ -422,7 +422,7 @@ _efl_ui_button_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -481,7 +481,7 @@ _efl_ui_check_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -536,7 +536,7 @@ _state_update(Evas_Object *obj)
if (mx < 1) mx = 1; // quick hack to keep curl line visible
if (mgrad == 0.0) // special horizontal case
if (EINA_DBL_EQ(mgrad, 0.0)) // special horizontal case
mgrad = 0.001; // quick dirty hack for now
// else
{
@ -2099,7 +2099,7 @@ _efl_ui_flip_interaction_direction_hitsize_set(Eo *obj, Efl_Ui_Flip_Data *sd, Ef
else if (hitsize > 1.0)
hitsize = 1.0;
if (sd->dir_hitsize[i] == hitsize) return;
if (EINA_DBL_EQ(sd->dir_hitsize[i], hitsize)) return;
sd->dir_hitsize[i] = hitsize;
if (hitsize >= 0.0)

View File

@ -181,6 +181,7 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
{
Evas_Coord x = 0, y = 0, w = 1, h = 1;
int ox, oy, ow, oh;
Eina_Bool img_no_resize = EINA_FALSE;
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
if (efl_isa(img, EFL_CANVAS_LAYOUT_CLASS))
@ -202,9 +203,7 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
//Exception Case
if ((iw == 0) || (ih == 0) || (ow == 0) || (oh == 0))
{
evas_object_resize(img, 0, 0);
evas_object_resize(sd->hit_rect, 0, 0);
return;
img_no_resize = EINA_TRUE;
}
iw = ((double)iw) * sd->scale;
@ -243,12 +242,9 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
w = ((double)iw * h) / (double)ih;
break;
case EFL_GFX_IMAGE_SCALE_METHOD_EXPAND:
if ((iw - ow) < (ih - oh))
{
w = ow;
h = ((double)ih * w) / (double)iw;
}
else
w = ow;
h = ((double)ih * w) / (double)iw;
if (h < oh)
{
h = oh;
w = ((double)iw * h) / (double)ih;
@ -306,7 +302,10 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
}
}
done:
evas_object_geometry_set(img, x, y, w, h);
if (img_no_resize)
evas_object_geometry_set(img, 0, 0, 0, 0);
else
evas_object_geometry_set(img, x, y, w, h);
evas_object_geometry_set(sd->hit_rect, x, y, w, h);
}
@ -2555,7 +2554,13 @@ elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disable)
EFL_UI_IMAGE_CHECK(obj);
EFL_UI_IMAGE_DATA_GET(obj, sd);
if (sd->edje || !sd->img) return;
if (sd->edje) return;
if (!sd->img)
{
if (disable) sd->preload_status = EFL_UI_IMAGE_PRELOAD_DISABLED;
else sd->preload_status = EFL_UI_IMAGE_PRELOAD_ENABLED;
return;
}
if (disable)
{

View File

@ -2451,7 +2451,7 @@ _efl_ui_image_zoomable_efl_ui_zoom_zoom_level_set(Eo *obj, Efl_Ui_Image_Zoomable
z = (double)sd->size.imw / pw;
else
z = (double)sd->size.imh / ph;
if (z != sd->zoom)
if (!EINA_DBL_EQ(z, sd->zoom))
zoom_changed = 1;
sd->zoom = z;
sd->size.nw = pw;

View File

@ -497,9 +497,9 @@ _progressbar_part_value_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, const char *pa
else
{
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL);
if (sd->val == min)
if (EINA_DBL_EQ(sd->val, min))
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MIN_REACHED, NULL);
if (sd->val == max)
if (EINA_DBL_EQ(sd->val, max))
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MAX_REACHED, NULL);
}
}
@ -771,7 +771,7 @@ _efl_ui_progressbar_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNU
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -365,7 +365,7 @@ _efl_ui_radio_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
/* FIXME: replicated from elm_layout just because radio's icon
* spot is elm.swallow.content, not elm.swallow.icon. Fix that
* whenever we can changed the theme API */
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -1628,7 +1628,7 @@ _efl_ui_scroll_manager_post_event_move_on_hold_eval(Efl_Ui_Scroll_Manager_Data *
_elm_config->thumbscroll_hold_threshold;
}
if ((vx != 0.0) || (vy != 0.0)) _scroll_manager_on_hold_animator_add(sd, vx*sx, vy*sy);
if (EINA_DBL_NONZERO(vx) || EINA_DBL_NONZERO(vy)) _scroll_manager_on_hold_animator_add(sd, vx*sx, vy*sy);
else _scroll_manager_on_hold_animator_del(sd);
}

View File

@ -67,10 +67,10 @@ _emit_events(Eo *obj, Efl_Ui_Slider_Data *sd)
{
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL);
if (sd->val == sd->val_min)
if (EINA_DBL_EQ(sd->val, sd->val_min))
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MIN_REACHED, NULL);
if (sd->val == sd->val_max)
if (EINA_DBL_EQ(sd->val, sd->val_max))
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MAX_REACHED, NULL);
// emit accessibility event also if value was changed by API
@ -133,7 +133,7 @@ _drag_value_fetch(Evas_Object *obj)
static void
_adjust_to_step(Efl_Ui_Slider *obj, Efl_Ui_Slider_Data *pd)
{
if (pd->step)
if (EINA_DBL_NONZERO(pd->step))
{
double relative_step = pd->step/(pd->val_max - pd->val_min);
double new_value = (round(pd->val/relative_step))*relative_step;
@ -777,7 +777,7 @@ _efl_ui_slider_efl_ui_range_interactive_range_step_set(Eo *obj EINA_UNUSED, Efl_
return;
}
if (sd->step == step) return;
if (EINA_DBL_EQ(sd->step, step)) return;
sd->step = step;
}

View File

@ -48,9 +48,9 @@ static void
_emit_events(Eo *obj, Efl_Ui_Slider_Interval_Data *sd)
{
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_CHANGED, NULL);
if (sd->val == sd->val_min)
if (EINA_DBL_EQ(sd->val, sd->val_min))
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MIN_REACHED, NULL);
if (sd->val == sd->val_max)
if (EINA_DBL_EQ(sd->val, sd->val_max))
efl_event_callback_call(obj, EFL_UI_RANGE_EVENT_MAX_REACHED, NULL);
}
@ -850,7 +850,7 @@ _efl_ui_slider_interval_efl_ui_range_interactive_range_step_set(Eo *obj EINA_UNU
return;
}
if (sd->step == step) return;
if (EINA_DBL_EQ(sd->step, step)) return;
sd->step = step;
}

View File

@ -144,7 +144,7 @@ _transition_event_emission(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data
pd->show_request.to = -1;
_transition_end(obj, pd);
}
if (pd->position == pd->show_request.to)
if (EINA_DBL_EQ(pd->position, pd->show_request.to))
{
//successfully there
_transition_end(obj, pd);
@ -707,7 +707,7 @@ _efl_ui_spotlight_container_indicator_set(Eo *obj, Efl_Ui_Spotlight_Container_Da
//the api indicates that the caller passes ownership to this function, so we need to unref here
efl_unref(pd->indicator);
efl_ui_spotlight_indicator_bind(pd->indicator, obj);
if (pd->position != -1)
if (!EINA_DBL_EQ(pd->position, -1))
efl_ui_spotlight_indicator_position_update(pd->indicator, pd->position);
}
}

View File

@ -21,7 +21,7 @@ static void
_emit_position(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Plain_Manager_Data *pd)
{
double absolut_position = efl_pack_index_get(pd->container, pd->current_content);
if (pd->last_pos != absolut_position)
if (!EINA_DBL_EQ(pd->last_pos, absolut_position))
efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &absolut_position);
pd->last_pos = absolut_position;

View File

@ -619,7 +619,7 @@ _path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd)
eina_vector2_normalize(&first, &first);
eina_vector2_normalize(&last, &last);
rad = acos(eina_vector2_dot_product(&first, &last));
if (rad == 0) return;
if (EINA_DBL_EQ(rad, 0)) return;
offset_angle = _rad_to_deg(rad);
if (r.w > pd->total_length / 2)
@ -851,8 +851,8 @@ _efl_ui_textpath_circular_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double radius,
Eina_Size2D text_size;
double sweep_length, x, y;
if (pd->circle.radius == radius &&
pd->circle.start_angle == start_angle &&
if (EINA_DBL_EQ(pd->circle.radius, radius) &&
EINA_DBL_EQ(pd->circle.start_angle, start_angle) &&
pd->direction == direction &&
_map_point_calc(pd) > 0)
return;
@ -984,9 +984,9 @@ elm_textpath_circle_set(Eo *obj, double x, double y, double radius, double start
EFL_UI_TEXTPATH_DATA_GET(obj, pd);
if (!pd) return;
if (pd->circle.x == x && pd->circle.y == y &&
pd->circle.radius == radius &&
pd->circle.start_angle == start_angle &&
if (EINA_DBL_EQ(pd->circle.x, x) && EINA_DBL_EQ(pd->circle.y, y) &&
EINA_DBL_EQ(pd->circle.radius, radius) &&
EINA_DBL_EQ(pd->circle.start_angle, start_angle) &&
pd->direction == direction &&
_map_point_calc(pd) > 0)
return;

View File

@ -49,8 +49,8 @@ _sizing_eval(Eo *obj, void *data)
Eina_Size2D size = efl_canvas_vg_object_default_size_get(pd->vg);
Eina_Size2D min = {-1, -1};
if (hw == 0) min.w = size.w;
if (hh == 0) min.h = size.h;
if (EINA_DBL_EQ(hw, 0)) min.w = size.w;
if (EINA_DBL_EQ(hh, 0)) min.h = size.h;
efl_gfx_hint_size_min_set(obj, min);
}
@ -148,8 +148,8 @@ _transit_del_cb(Elm_Transit_Effect *effect, Elm_Transit *transit)
EFL_UI_VG_ANIMATION_DATA_GET(obj, pd);
if (!pd) return;
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING && pd->progress == 1) ||
(pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS && pd->progress == 0))
if ((pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING && EINA_DBL_EQ(pd->progress, 1)) ||
(pd->state == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS && EINA_DBL_EQ(pd->progress, 0)))
{
if (elm_widget_is_legacy(obj))
evas_object_smart_callback_call(obj, SIG_PLAY_DONE, NULL);
@ -212,7 +212,7 @@ _transit_cb(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
int update_frame = (int)((maxframe - minframe) * progress) + minframe;
int current_frame = evas_object_vg_animated_frame_get(pd->vg);
if (pd->playback_speed == 0)
if (EINA_DBL_EQ(pd->playback_speed, 0))
update_frame = current_frame;
evas_object_vg_animated_frame_set(pd->vg, update_frame);
@ -308,7 +308,7 @@ _update_frame_duration(Efl_Ui_Vg_Animation_Data *pd)
pd->frame_duration = (double)(max_frame - min_frame) / frame_rate;
if (pd->transit)
elm_transit_duration_set(pd->transit, speed != 0 ? pd->frame_duration * (1 / speed) : 0);
elm_transit_duration_set(pd->transit, EINA_DBL_NONZERO(speed) ? pd->frame_duration * (1 / speed) : 0);
}
static Eina_Bool
@ -333,10 +333,10 @@ _ready_play(Eo *obj, Efl_Ui_Vg_Animation_Data *pd)
elm_transit_objects_final_state_keep_set(transit, EINA_TRUE);
elm_transit_event_enabled_set(transit, EINA_TRUE);
pd->transit = transit;
if (pd->min_progress != 0.0 || pd->max_progress != 1.0)
if (EINA_DBL_NONZERO(pd->min_progress) || !EINA_DBL_EQ(pd->max_progress, 1.0))
_update_frame_duration(pd);
else
elm_transit_duration_set(transit, speed != 0 ? pd->frame_duration * (1 / speed) : 0);
elm_transit_duration_set(transit, EINA_DBL_NONZERO(speed) ? pd->frame_duration * (1 / speed) : 0);
return EINA_TRUE;
}
@ -710,7 +710,7 @@ _efl_ui_vg_animation_efl_player_playing_set(Eo *obj, Efl_Ui_Vg_Animation_Data *p
if (pd->state == EFL_UI_VG_ANIMATION_STATE_STOPPED)
{
if (pd->playing_reverse && pd->progress == 0) pd->progress = 1.0;
if (pd->playing_reverse && EINA_DBL_EQ(pd->progress, 0)) pd->progress = 1.0;
_transit_go_facade(obj, pd);
}
else if (rewind)
@ -785,7 +785,7 @@ _efl_ui_vg_animation_efl_player_playback_position_set(Eo *obj, Efl_Ui_Vg_Animati
EINA_SAFETY_ON_TRUE_RETURN(sec < 0);
EINA_SAFETY_ON_TRUE_RETURN(sec > pd->frame_duration);
efl_player_playback_progress_set(obj, pd->frame_duration != 0 ? sec / pd->frame_duration : 0);
efl_player_playback_progress_set(obj, EINA_DBL_NONZERO(pd->frame_duration) ? sec / pd->frame_duration : 0);
}
EOLIAN static double
@ -805,7 +805,7 @@ _efl_ui_vg_animation_efl_player_playback_progress_set(Eo *obj EINA_UNUSED, Efl_U
{
if (progress < 0) progress = 0;
else if (progress > 1) progress = 1;
if (pd->progress == progress) return;
if (EINA_DBL_EQ(pd->progress, progress)) return;
pd->progress = progress;
@ -844,7 +844,7 @@ _efl_ui_vg_animation_efl_player_playback_speed_set(Eo *obj EINA_UNUSED, Efl_Ui_V
pd->playback_speed = speed;
speed = speed < 0 ? speed * -1 : speed;
if (pd->transit)
elm_transit_duration_set(pd->transit, pd->playback_speed != 0 ? pd->frame_duration * (1 / speed) : 0);
elm_transit_duration_set(pd->transit, EINA_DBL_NONZERO(pd->playback_speed) ? pd->frame_duration * (1 / speed) : 0);
}
EOLIAN static double

View File

@ -1482,7 +1482,7 @@ _efl_ui_widget_widget_parent_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Ui_Widg
if (!pd->on_create)
{
if ((scale != prev_scale) || (th != prev_th) ||
if (!EINA_DBL_EQ(scale, prev_scale) || (th != prev_th) ||
(pmirrored != mirrored))
elm_widget_theme(obj);
}
@ -2343,7 +2343,7 @@ EOLIAN static void
_efl_ui_widget_efl_gfx_entity_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale)
{
if (scale < 0.0) scale = 0.0;
if (sd->scale != scale)
if (!EINA_DBL_EQ(sd->scale, scale))
{
sd->scale = scale;
elm_widget_theme(obj);
@ -2354,7 +2354,7 @@ EOLIAN static double
_efl_ui_widget_efl_gfx_entity_scale_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
{
// FIXME: save walking up the tree by storing/caching parent scale
if (sd->scale == 0.0)
if (EINA_DBL_EQ(sd->scale, 0.0))
{
if (sd->parent_obj && elm_widget_is(sd->parent_obj))
{

View File

@ -3745,12 +3745,12 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
maxh = sd->max_h;
// Compatibility hack (for E)
if (sd->single_edje_content && !wx && !wy)
if (sd->single_edje_content && EINA_DBL_EQ(wx, 0) && EINA_DBL_EQ(wy, 0))
wx = wy = 1;
if (!wx) maxw = minw;
if (EINA_DBL_EQ(wx, 0)) maxw = minw;
if (maxw < 1) maxw = 32767;
if (!wy) maxh = minh;
if (EINA_DBL_EQ(wy, 0)) maxh = minh;
if (maxh < 1) maxh = 32767;
if (maxw < minw) maxw = minw;
if (maxh < minh) maxh = minh;

View File

@ -880,7 +880,7 @@ _listing_request_cleanup(Listing_Request *lreq)
}
static void
_process_model(Elm_Fileselector_Data *sd, Efl_Model *child)
_process_model(Elm_Fileselector_Data *sd, Efl_Model *child, Elm_Object_Item *fallback_parent_item)
{
Elm_Fileselector_Item_Data *it_data;
Elm_Object_Item *item, *it_parent;
@ -927,6 +927,8 @@ _process_model(Elm_Fileselector_Data *sd, Efl_Model *child)
it_data->is_dir = dir;
it_parent = efl_key_data_get(parent, ".item.data");
if (!it_parent)
it_parent = fallback_parent_item;
if (dir)
{
@ -981,7 +983,9 @@ _process_children_cb(Eo *model EINA_UNUSED, void *data, const Eina_Value v)
if (!lreq->valid) goto end;
EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
_process_model(lreq->sd, child);
{
_process_model(lreq->sd, child, lreq->parent_it);
}
lreq->item_total = len;
@ -1003,6 +1007,29 @@ _process_children_error(Eo *model EINA_UNUSED, void *data, Eina_Error error)
return eina_value_error_init(error);
}
static void
_count_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Listing_Request *lreq = data;
Eina_Future *future;
efl_event_callback_del(lreq->model, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, _count_changed_cb, lreq);
if (efl_model_children_count_get(lreq->model))
{
future = efl_model_children_slice_get(lreq->model, 0, efl_model_children_count_get(lreq->model));
future = efl_future_then(lreq->obj, future);
efl_future_then(lreq->model, future,
.success = _process_children_cb,
.error = _process_children_error,
.data = lreq);
}
else
{
_process_last(lreq);
}
}
static void
_populate(Evas_Object *obj,
Efl_Model *model,
@ -1087,7 +1114,10 @@ _populate(Evas_Object *obj,
}
else
{
_process_last(lreq);
if (parent_it)
efl_event_callback_add(lreq->model, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, _count_changed_cb, lreq);
else
_process_last(lreq);
}
}
@ -1624,7 +1654,7 @@ _resource_created_then(Eo *model EINA_UNUSED, void *data, const Eina_Value v)
ELM_FILESELECTOR_DATA_GET(fs, sd);
EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
_process_model(sd, child);
_process_model(sd, child, NULL); //this function will always just work for the root model of the fileselector
return v;
}

View File

@ -721,8 +721,11 @@ _elm_hoversel_efl_object_constructor(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED
}
EOLIAN static void
_elm_hoversel_efl_object_destructor(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED)
_elm_hoversel_efl_object_destructor(Eo *obj, Elm_Hoversel_Data *_pd)
{
if (_pd->resize_job)
ELM_SAFE_FREE(_pd->resize_job, ecore_job_del);
elm_obj_hoversel_clear(obj);
efl_destructor(efl_super(obj, MY_CLASS));
}

View File

@ -2602,7 +2602,7 @@ _value_properties_set(const Eldbus_Service_Interface *interface, const char *pro
ret = efl_access_value_and_text_set(obj, value, NULL);
else if(efl_isa(obj, EFL_UI_RANGE_DISPLAY_INTERFACE)) {
efl_ui_range_value_set(obj, value);
ret = (efl_ui_range_value_get(obj) == value);
ret = EINA_DBL_EQ(efl_ui_range_value_get(obj), value);
}
else ret = EINA_FALSE;
Eldbus_Message *answer = eldbus_message_method_return_new(request_msg);

View File

@ -971,8 +971,11 @@ _spin_value(void *data)
if (_update_data(data, sd->month_btn_clicked, sd->spin_speed))
evas_object_smart_changed(data);
sd->interval = sd->interval / 1.05;
ecore_timer_interval_set(sd->spin_timer, sd->interval);
if (sd->spin_timer)
{
sd->interval = sd->interval / 1.05;
ecore_timer_interval_set(sd->spin_timer, sd->interval);
}
return ECORE_CALLBACK_RENEW;
}

View File

@ -2112,10 +2112,10 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line *newline)
return;
}
if (pd->gravity_x == 1.0 || pd->gravity_y == 1.0)
if (EINA_DBL_EQ(pd->gravity_x, 1.0) || EINA_DBL_EQ(pd->gravity_y, 1.0))
_elm_code_widget_scroll_by(widget,
(pd->gravity_x == 1.0 && ww > old_width) ? ww - old_width : 0,
(pd->gravity_y == 1.0 && wh > old_height) ? wh - old_height : 0);
(EINA_DBL_EQ(pd->gravity_x, 1.0) && ww > old_width) ? ww - old_width : 0,
(EINA_DBL_EQ(pd->gravity_y, 1.0) && wh > old_height) ? wh - old_height : 0);
}
EOAPI void

View File

@ -398,10 +398,10 @@ _rgb_to_hsl(Elm_Colorselector_Data *sd)
g2 = (v - g) / vm;
b2 = (v - b) / vm;
if (r == v) sd->h = (g == m ? 5.0 + b2 : 1.0 - g2);
else if (g == v)
sd->h = (b == m ? 1.0 + r2 : 3.0 - b2);
else sd->h = (r == m ? 3.0 + g2 : 5.0 - r2);
if (EINA_DBL_EQ(r, v)) sd->h = (EINA_DBL_EQ(g, m) ? 5.0 + b2 : 1.0 - g2);
else if (EINA_DBL_EQ(g, v))
sd->h = (EINA_DBL_EQ(b, m) ? 1.0 + r2 : 3.0 - b2);
else sd->h = (EINA_DBL_EQ(r, m) ? 3.0 + g2 : 5.0 - r2);
sd->h *= 60.0;
}
@ -418,16 +418,16 @@ _hsl_to_rgb(Elm_Colorselector_Data *sd)
_s = sd->s;
_l = sd->l;
if (_s == 0.0) r = g = b = _l;
if (EINA_DBL_EQ(_s, 0.0)) r = g = b = _l;
else
{
if (_h == 360.0) _h = 0.0;
if (EINA_DBL_EQ(_h, 360.0)) _h = 0.0;
_h /= 60.0;
v = (_l <= 0.5) ? (_l * (1.0 + _s)) : (_l + _s - (_l * _s));
p = _l + _l - v;
if (v) sv = (v - p) / v;
if (EINA_DBL_NONZERO(v)) sv = (v - p) / v;
else sv = 0;
i = (int)_h;
@ -489,7 +489,7 @@ _hsl_to_rgb(Elm_Colorselector_Data *sd)
f = (b * 255.0) - i;
b = (f <= 0.5) ? i : (i + 1);
if (sd->r == r && sd->g == g && sd->b == b) return EINA_FALSE;
if (EINA_DBL_EQ(sd->r, r) && EINA_DBL_EQ(sd->g, g) && EINA_DBL_EQ(sd->b, b)) return EINA_FALSE;
sd->r = r;
sd->g = g;

View File

@ -2047,7 +2047,7 @@ _config_flush_get(void)
evas_font_reinit();
_elm_config_font_overlay_apply();
_elm_config_color_overlay_apply();
if (pre_scale != _elm_config->scale)
if (!EINA_DBL_EQ(pre_scale, _elm_config->scale))
_elm_rescale();
_elm_old_clouseau_reload();
_elm_config_key_binding_hash();
@ -2997,7 +2997,7 @@ elm_config_scale_set(double scale)
{
_elm_config->priv.scale = EINA_TRUE;
if (scale < 0.0) return;
if (_elm_config->scale == scale) return;
if (EINA_DBL_EQ(_elm_config->scale, scale)) return;
_elm_config->scale = scale;
_elm_rescale();
}
@ -3049,7 +3049,7 @@ elm_config_password_show_last_timeout_set(double password_show_last_timeout)
{
_elm_config->priv.password_show_last_timeout = EINA_TRUE;
if (password_show_last_timeout < 0.0) return;
if (_elm_config->password_show_last_timeout == password_show_last_timeout) return;
if (EINA_DBL_EQ(_elm_config->password_show_last_timeout, password_show_last_timeout)) return;
_elm_config->password_show_last_timeout = password_show_last_timeout;
edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
}
@ -4494,12 +4494,13 @@ _elm_config_reload(void)
_elm_config_font_overlay_apply();
_elm_config_color_overlay_apply();
#define CMP(x) (p##x != _elm_config->x)
#define DBL_CMP(x) !EINA_DBL_EQ(p##x, _elm_config->x)
if (
CMP(scale)
DBL_CMP(scale)
|| CMP(finger_size)
|| CMP(icon_size)
|| CMP(password_show_last)
|| CMP(password_show_last_timeout)
|| DBL_CMP(password_show_last_timeout)
|| CMP(week_start)
|| CMP(weekend_start)
|| CMP(weekend_len)
@ -4513,6 +4514,7 @@ _elm_config_reload(void)
|| CMP(icon_theme)
)
_elm_rescale();
#undef DBL_CMP
#undef CMP
_elm_old_clouseau_reload();
_elm_config_key_binding_hash();
@ -4695,7 +4697,7 @@ elm_config_transition_duration_factor_set(double factor)
{
_elm_config->priv.transition_duration_factor = EINA_TRUE;
if (factor < 0.0) return;
if (_elm_config->transition_duration_factor == factor) return;
if (EINA_DBL_EQ(_elm_config->transition_duration_factor, factor)) return;
_elm_config->transition_duration_factor = factor;
edje_transition_duration_factor_set(_elm_config->transition_duration_factor);
}

View File

@ -417,7 +417,7 @@ _cont_obj_anim_start(void *data)
_drag_anim_start(st);
else
{
if (st->anim_tm)
if (EINA_DBL_NONZERO(st->anim_tm))
{
// even if we don't manage the icons animation, we have
// to wait until it is finished before beginning drag.

View File

@ -476,7 +476,7 @@ _items_add(Evas_Object *obj)
EOLIAN static void
_elm_flipselector_efl_ui_range_display_range_limits_set(Eo *obj, Elm_Flipselector_Data *sd, double min, double max)
{
if ((sd->val_min == min) && (sd->val_max == max)) return;
if (EINA_DBL_EQ(sd->val_min, min) && EINA_DBL_EQ(sd->val_max, max)) return;
sd->val_min = min;
sd->val_max = max;
@ -494,9 +494,9 @@ _elm_flipselector_efl_ui_range_display_range_limits_get(const Eo *obj EINA_UNUSE
EOLIAN static void
_elm_flipselector_efl_ui_range_interactive_range_step_set(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, double step)
{
if (sd->step == step) return;
if (EINA_DBL_EQ(sd->step, step)) return;
if (step == 0.0) step = 1.0;
if (EINA_DBL_EQ(step, 0.0)) step = 1.0;
else if (step < 0.0) step *= -1;
sd->step = step;
@ -512,7 +512,7 @@ _elm_flipselector_efl_ui_range_interactive_range_step_get(const Eo *obj EINA_UNU
EOLIAN static double
_elm_flipselector_efl_ui_range_display_range_value_get(const Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd)
{
if (sd->val_min == 0 && sd->val_max == 0)
if (EINA_DBL_EQ(sd->val_min, 0) && EINA_DBL_EQ(sd->val_max, 0))
{
WRN("This API can be used only if you set min and max and flipselector values are numericals");
return 0;

View File

@ -165,8 +165,10 @@ _item_cache_free(Item_Cache *itc)
/* does not exist if cache item has just been reused */
if (itc->base_view)
{
Evas_Object *view = itc->base_view;
efl_wref_del(itc->base_view, &itc->base_view);
efl_del(itc->base_view);
efl_del(view);
itc->base_view = NULL;
}
eina_stringshare_del(itc->item_style);
EINA_LIST_FREE(itc->contents, c)
@ -1494,7 +1496,10 @@ _item_unrealize_cb(Elm_Gen_Item *it)
Evas_Object *c;
if (!_item_cache_add(it, _content_cache_add(it, &cache)))
{
ELM_SAFE_FREE(VIEW(it), evas_object_del);
Evas_Object *view = VIEW(it);
efl_wref_del(VIEW(it), &VIEW(it));
ELM_SAFE_FREE(view, evas_object_del);
VIEW(it) = NULL;
ELM_SAFE_FREE(it->spacer, evas_object_del);
EINA_LIST_FREE(cache, c)
evas_object_del(c);
@ -4180,6 +4185,8 @@ _elm_gengrid_efl_canvas_group_group_del(Eo *obj, Elm_Gengrid_Data *sd)
_item_cache_zero(sd);
ecore_job_del(sd->calc_job);
eina_hash_free(sd->content_item_map);
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
@ -4452,7 +4459,7 @@ _elm_gengrid_align_set(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, double align_x
align_y = 0.0;
sd->align_y = align_y;
if ((old_h != sd->align_x) || (old_y != sd->align_y))
if (!EINA_DBL_EQ(old_h, sd->align_x) || !EINA_DBL_EQ(old_y, sd->align_y))
evas_object_smart_calculate(sd->pan_obj);
}

View File

@ -1555,8 +1555,10 @@ _item_cache_free(Item_Cache *itc)
/* does not exist if cache item has just been reused */
if (itc->base_view)
{
Evas_Object *view = itc->base_view;
efl_wref_del(itc->base_view, &itc->base_view);
efl_del(itc->base_view);
efl_del(view);
itc->base_view = NULL;
}
itc->item_class = NULL;
EINA_LIST_FREE(itc->contents, c)
@ -5386,7 +5388,10 @@ _item_unrealize(Elm_Gen_Item *it)
if (!_item_cache_add(it, _content_cache_add(it, &cache)))
{
ELM_SAFE_FREE(VIEW(it), efl_del);
Evas_Object *view = VIEW(it);
efl_wref_del(VIEW(it), &VIEW(it));
ELM_SAFE_FREE(view, efl_del);
VIEW(it) = NULL;
it->callbacks = EINA_FALSE;
ELM_SAFE_FREE(it->spacer, evas_object_del);
EINA_LIST_FREE(cache, c)
@ -5915,6 +5920,7 @@ _elm_genlist_efl_canvas_group_group_del(Eo *obj, Elm_Genlist_Data *sd)
eina_stringshare_replace(&sd->decorate_it_type, NULL);
eina_hash_free(sd->content_item_map);
_elm_genlist_tree_effect_stop(sd);
}

View File

@ -3582,7 +3582,7 @@ _rotate_test(Evas_Object *obj,
Gesture_Info *gesture;
Rotate_Type *st = NULL;
if (!_elm_config->glayer_rotate_finger_enable)
if (EINA_DBL_EQ(_elm_config->glayer_rotate_finger_enable, 0))
return;
if (!pe)

View File

@ -946,8 +946,8 @@ _elm_scroll_scroll_bar_size_adjust(Elm_Scrollable_Smart_Interface_Data *sid)
-((double)sid->page.y * ((double)vh / (double)h)) / 100.0);
elm_obj_pan_pos_get(sid->pan_obj, &px, &py);
if (vx != mx) x = px;
if (vy != my) y = py;
if (!EINA_DBL_EQ(vx, mx)) x = px;
if (!EINA_DBL_EQ(vy, my)) y = py;
elm_obj_pan_pos_set(sid->pan_obj, x, y);
if (mx > 0) vx = (double)(x - minx) / (double)mx;
@ -2292,8 +2292,8 @@ _elm_scroll_post_event_up(void *data,
static Eina_Bool
_paging_is_enabled(Elm_Scrollable_Smart_Interface_Data *sid)
{
if ((sid->pagerel_h == 0.0) && (!sid->pagesize_h) &&
(sid->pagerel_v == 0.0) && (!sid->pagesize_v))
if (EINA_DBL_EQ(sid->pagerel_h, 0.0) && (!sid->pagesize_h) &&
EINA_DBL_EQ(sid->pagerel_v, 0.0) && (!sid->pagesize_v))
return EINA_FALSE;
return EINA_TRUE;
}
@ -2314,7 +2314,7 @@ _elm_scroll_momentum_animator(void *data, const Efl_Event *event EINA_UNUSED)
t = ecore_loop_time_get();
if (sid->down.anim_dur == 0) dt = 1.0;
if (EINA_DBL_EQ(sid->down.anim_dur, 0)) dt = 1.0;
else dt = (t - sid->down.anim_start) / sid->down.anim_dur;
if (dt >= 0.0)
@ -2675,7 +2675,7 @@ _elm_scroll_momentum_calc(int dx, int dy, double dt, double *vx, double *vy, int
double r = _elm_config->thumbscroll_momentum_friction;
const int min_px = 3;
if ( dt == 0 ) return EINA_FALSE;
if (EINA_DBL_EQ(dt, 0)) return EINA_FALSE;
// store sign value of distance
sign_dx = (dx > 0) - (dx < 0);
@ -3749,7 +3749,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
else
vy = 1.0;
}
if ((vx != 0.0) || (vy != 0.0))
if (EINA_DBL_NONZERO(vx) || EINA_DBL_NONZERO(vy))
{
sid->down.onhold_vx = vx;
sid->down.onhold_vy = vy;

View File

@ -1060,6 +1060,8 @@ _items_fix(Evas_Object *obj)
//focus highlight in_theme is set by list item theme.
_elm_widget_item_highlight_in_theme(
obj, elm_list_first_item_get(obj));
eina_array_flush(&walk);
}
static void

View File

@ -4331,7 +4331,7 @@ _elm_map_efl_ui_zoom_zoom_level_set(Eo *obj, Elm_Map_Data *sd, double zoom)
if (sd->mode != EFL_UI_ZOOM_MODE_MANUAL) return;
if (zoom < 0) zoom = 0;
if (sd->zoom == zoom) return;
if (EINA_DBL_EQ(sd->zoom, zoom)) return;
sd->calc_job.zoom = zoom;
sd->calc_job.zoom_mode_set = _zoom_mode_set;

View File

@ -32,29 +32,29 @@ _notify_theme_apply(Evas_Object *obj)
ax = sd->horizontal_align;
ay = sd->vertical_align;
if (ay == 0.0)
if (EINA_DBL_EQ(ay, 0.0))
{
if (ax == 0.0)
if (EINA_DBL_EQ(ax, 0.0))
position = "top_left";
else if (ax == 1.0)
else if (EINA_DBL_EQ(ax, 1.0))
position = "top_right";
else
position = "top";
}
else if (ay == 1.0)
else if (EINA_DBL_EQ(ay, 1.0))
{
if (ax == 0.0)
if (EINA_DBL_EQ(ax, 0.0))
position = "bottom_left";
else if (ax == 1.0)
else if (EINA_DBL_EQ(ax, 1.0))
position = "bottom_right";
else
position = "bottom";
}
else
{
if (ax == 0.0)
if (EINA_DBL_EQ(ax, 0.0))
position = "left";
else if (ax == 1.0)
else if (EINA_DBL_EQ(ax, 1.0))
position = "right";
else
position = "center";
@ -88,10 +88,10 @@ _notify_move_to_orientation(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_C
ax = sd->horizontal_align;
ay = sd->vertical_align;
if ((efl_ui_mirrored_get(obj)) && (ax != ELM_NOTIFY_ALIGN_FILL)) ax = 1.0 - ax;
if ((efl_ui_mirrored_get(obj)) && (!EINA_DBL_EQ(ax, ELM_NOTIFY_ALIGN_FILL))) ax = 1.0 - ax;
if (ax == ELM_NOTIFY_ALIGN_FILL) minw = w;
if (ay == ELM_NOTIFY_ALIGN_FILL) minh = h;
if (EINA_DBL_EQ(ax, ELM_NOTIFY_ALIGN_FILL)) minw = w;
if (EINA_DBL_EQ(ay, ELM_NOTIFY_ALIGN_FILL)) minh = h;
x = x + ((w - minw) * ax);
y = y + ((h - minh) * ay);
@ -609,23 +609,23 @@ elm_notify_orient_get(const Evas_Object *obj)
elm_notify_align_get(obj, &horizontal, &vertical);
if ((horizontal == 0.5) && (vertical == 0.0))
if (EINA_DBL_EQ(horizontal, 0.5) && EINA_DBL_EQ(vertical, 0.0))
orient = ELM_NOTIFY_ORIENT_TOP;
else if ((horizontal == 0.5) && (vertical == 0.5))
else if (EINA_DBL_EQ(horizontal, 0.5) && EINA_DBL_EQ(vertical, 0.5))
orient = ELM_NOTIFY_ORIENT_CENTER;
else if ((horizontal == 0.5) && (vertical == 1.0))
else if (EINA_DBL_EQ(horizontal, 0.5) && EINA_DBL_EQ(vertical, 1.0))
orient = ELM_NOTIFY_ORIENT_BOTTOM;
else if ((horizontal == 0.0) && (vertical == 0.5))
else if (EINA_DBL_EQ(horizontal, 0.0) && EINA_DBL_EQ(vertical, 0.5))
orient = ELM_NOTIFY_ORIENT_LEFT;
else if ((horizontal == 1.0) && (vertical == 0.5))
else if (EINA_DBL_EQ(horizontal, 1.0) && EINA_DBL_EQ(vertical, 0.5))
orient = ELM_NOTIFY_ORIENT_RIGHT;
else if ((horizontal == 0.0) && (vertical == 0.0))
else if (EINA_DBL_EQ(horizontal, 0.0) && EINA_DBL_EQ(vertical, 0.0))
orient = ELM_NOTIFY_ORIENT_TOP_LEFT;
else if ((horizontal == 1.0) && (vertical == 0.0))
else if (EINA_DBL_EQ(horizontal, 1.0) && EINA_DBL_EQ(vertical, 0.0))
orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;
else if ((horizontal == 0.0) && (vertical == 1.0))
else if (EINA_DBL_EQ(horizontal, 0.0) && EINA_DBL_EQ(vertical, 1.0))
orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;
else if ((horizontal == 1.0) && (vertical == 1.0))
else if (EINA_DBL_EQ(horizontal, 1.0) && EINA_DBL_EQ(vertical, 1.0))
orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;
else
orient = ELM_NOTIFY_ORIENT_TOP;

View File

@ -1501,7 +1501,7 @@ elm_slider_step_set(Evas_Object *obj, double step)
ERR("Wrong param. The step(%lf) should be greater than 0.0", step);
return;
}
if (sd->step == step) return;
if (EINA_DBL_EQ(sd->step, step)) return;
sd->step = step;
}

View File

@ -63,7 +63,7 @@ _key_action_pause(Evas_Object *obj, const char *params EINA_UNUSED)
{
ELM_SLIDESHOW_DATA_GET(obj, sd);
if (sd->timeout)
if (EINA_DBL_NONZERO(sd->timeout))
{
if (sd->timer)
ELM_SAFE_FREE(sd->timer, ecore_timer_del);

View File

@ -134,7 +134,7 @@ _entry_show(Elm_Spinner_Data *sd)
EINA_LIST_FOREACH(sd->special_values, l, sv)
{
if (sv->value == sd->val)
if (EINA_DBL_EQ(sv->value, sd->val))
{
snprintf(buf, sizeof(buf), "%s", sv->label);
goto apply;
@ -196,7 +196,7 @@ _label_write(Evas_Object *obj)
EINA_LIST_FOREACH(sd->special_values, l, sv)
{
if (sv->value == sd->val)
if (EINA_DBL_EQ(sv->value, sd->val))
{
snprintf(buf, sizeof(buf), "%s", sv->label);
goto apply;
@ -245,7 +245,7 @@ _value_set(Evas_Object *obj,
if (sd->round > 0)
{
//Spin value changed by entry input.
if (changed != 0)
if (EINA_DBL_NONZERO(changed))
new_val = sd->val_base +
(double)((((int)((val + changed) - sd->val_base)) / sd->round) * sd->round);
else
@ -270,12 +270,12 @@ _value_set(Evas_Object *obj,
new_val = sd->val_max;
}
if (new_val == sd->val) return EINA_FALSE;
if (EINA_DBL_EQ(new_val, sd->val)) return EINA_FALSE;
sd->val = new_val;
if (sd->val == sd->val_min)
if (EINA_DBL_EQ(sd->val, sd->val_min))
efl_event_callback_legacy_call(obj, ELM_SPINNER_EVENT_MIN_REACHED, NULL);
else if (sd->val == sd->val_max)
else if (EINA_DBL_EQ(sd->val, sd->val_max))
efl_event_callback_legacy_call(obj, ELM_SPINNER_EVENT_MAX_REACHED, NULL);
efl_event_callback_legacy_call(obj, ELM_SPINNER_EVENT_CHANGED, NULL);
@ -334,7 +334,7 @@ _drag_cb(void *data,
else
efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable.slider"), &pos, NULL);
if (sd->drag_prev_pos != 0)
if (EINA_DBL_NONZERO(sd->drag_prev_pos))
sd->drag_val_step = pow((pos - sd->drag_prev_pos), 2);
else
sd->drag_val_step = 1;
@ -688,7 +688,7 @@ _spin_value(void *data)
double real_speed = sd->spin_speed;
/* Sanity check: our step size should be at least as large as our rounding value */
if ((sd->spin_speed != 0.0) && (fabs(sd->spin_speed) < sd->round))
if (EINA_DBL_NONZERO(sd->spin_speed) && (fabs(sd->spin_speed) < sd->round))
{
WRN("The spinning step is smaller than the rounding value, please check your code");
real_speed = sd->spin_speed > 0 ? sd->round : -sd->round;
@ -800,11 +800,11 @@ _button_inc_dec_start_cb(void *data,
{
if (sd->inc_btn_activated)
{
if (sd->val == sd->val_min) return;
if (EINA_DBL_EQ(sd->val, sd->val_min)) return;
}
else
{
if (sd->val == sd->val_max) return;
if (EINA_DBL_EQ(sd->val, sd->val_max)) return;
}
}
}
@ -1438,7 +1438,7 @@ _elm_spinner_label_format_get(const Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd)
EOLIAN static void
_elm_spinner_efl_ui_range_display_range_limits_set(Eo *obj, Elm_Spinner_Data *sd, double min, double max)
{
if ((sd->val_min == min) && (sd->val_max == max)) return;
if (EINA_DBL_EQ(sd->val_min, min) && EINA_DBL_EQ(sd->val_max, max)) return;
sd->val_min = min;
sd->val_max = max;
@ -1472,7 +1472,7 @@ _elm_spinner_efl_ui_range_interactive_range_step_get(const Eo *obj EINA_UNUSED,
EOLIAN static void
_elm_spinner_efl_ui_range_display_range_value_set(Eo *obj, Elm_Spinner_Data *sd, double val)
{
if (sd->val == val) return;
if (EINA_DBL_EQ(sd->val, val)) return;
sd->val = (sd->round <= 0) ? val : sd->val_base +
(double)((((int)(val - sd->val_base + (sd->round / 2))) / sd->round) * sd->round);
@ -1520,7 +1520,7 @@ _elm_spinner_special_value_add(Eo *obj, Elm_Spinner_Data *sd, double value, cons
EINA_LIST_FOREACH(sd->special_values, l, sv)
{
if (sv->value != value)
if (!EINA_DBL_EQ(sv->value, value))
continue;
eina_stringshare_replace(&sv->label, label);
@ -1549,7 +1549,7 @@ elm_spinner_special_value_del(Evas_Object *obj,
EINA_LIST_FOREACH(sd->special_values, l, sv)
{
if (sv->value != value)
if (!EINA_DBL_EQ(sv->value, value))
continue;
sd->special_values = eina_list_remove_list(sd->special_values, l);
@ -1572,7 +1572,7 @@ elm_spinner_special_value_get(Evas_Object *obj,
EINA_LIST_FOREACH(sd->special_values, l, sv)
{
if (sv->value == value)
if (EINA_DBL_EQ(sv->value, value))
return sv->label;
}

View File

@ -3498,12 +3498,12 @@ _elm_toolbar_align_set(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, double align)
{
if (!efl_ui_layout_orientation_is_horizontal(sd->dir, EINA_TRUE))
{
if (sd->align != align)
if (!EINA_DBL_EQ(sd->align, align))
evas_object_box_align_set(sd->bx, 0.5, align);
}
else
{
if (sd->align != align)
if (!EINA_DBL_EQ(sd->align, align))
evas_object_box_align_set(sd->bx, align, 0.5);
}
sd->align = align;

View File

@ -346,7 +346,7 @@ _transit_animate_cb(void *data)
duration = transit->time.duration;
transit->progress = elapsed_time / duration;
if (transit->revert_mode && transit->revert_begin_progress == 0)
if (transit->revert_mode && EINA_DBL_EQ(transit->revert_begin_progress, 0))
{
transit->revert_begin_progress = transit->progress;
transit->time.revert_start = transit->time.current;
@ -932,14 +932,14 @@ elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused)
{
if (transit->revert_mode)
{
if (transit->time.revert_paused == 0) return;
if (EINA_DBL_EQ(transit->time.revert_paused, 0)) return;
ecore_animator_thaw(transit->animator);
transit->time.revert_delayed += (ecore_loop_time_get() - transit->time.revert_paused);
transit->time.revert_paused = 0;
}
else
{
if (transit->time.paused == 0) return;
if (EINA_DBL_EQ(transit->time.paused, 0)) return;
ecore_animator_thaw(transit->animator);
transit->time.delayed += (ecore_loop_time_get() - transit->time.paused);
transit->time.paused = 0;
@ -952,7 +952,7 @@ elm_transit_paused_get(const Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, EINA_FALSE);
if (transit->time.paused == 0)
if (EINA_DBL_EQ(transit->time.paused, 0))
return EINA_FALSE;
return EINA_TRUE;

View File

@ -395,7 +395,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
}
count = eina_list_count(priv->children);
if (!expand)
if (EINA_DBL_EQ(expand, 0))
{
if (rtl) ax = 1.0 - ax;
if (horizontal)
@ -435,8 +435,8 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
fw = fh = 0;
xw = xh = 0;
/* align(-1) means fill to maximum apportioned size */
if (ax == -1.0) {fw = 1; ax = 0.5;}
if (ay == -1.0) {fh = 1; ay = 0.5;}
if (EINA_DBL_EQ(ax, -1.0)) {fw = 1; ax = 0.5;}
if (EINA_DBL_EQ(ay, -1.0)) {fh = 1; ay = 0.5;}
if (rtl) ax = 1.0 - ax;
if (wx > 0.0) xw = 1;
if (wy > 0.0) xh = 1;

View File

@ -385,7 +385,7 @@ _elm_tooltip_reconfigure_orient(Elm_Tooltip *tt,
{
dx = -mx;
mx = -(px / 2);
if (tt->rel_pos.x == 0.5)
if (EINA_DBL_EQ(tt->rel_pos.x, 0.5))
{
tt->rel_pos.x = 0.5 - dx / (double)tcw;
if (tt->rel_pos.x < 0.0) tt->rel_pos.x = 0.0;
@ -395,7 +395,7 @@ _elm_tooltip_reconfigure_orient(Elm_Tooltip *tt,
{
dx = mx + tw - cw;
mx = cw - tw + px / 2;
if (tt->rel_pos.x == 0.5)
if (EINA_DBL_EQ(tt->rel_pos.x, 0.5))
{
tt->rel_pos.x = 0.5 + dx / (double)tcw;
if (tt->rel_pos.x > 1.0) tt->rel_pos.x = 1.0;
@ -406,7 +406,7 @@ _elm_tooltip_reconfigure_orient(Elm_Tooltip *tt,
{
dy = -my;
my = -(py / 2);
if (tt->rel_pos.y == 0.5)
if (EINA_DBL_EQ(tt->rel_pos.y, 0.5))
{
tt->rel_pos.y = 0.5 - dy / (double)tch;
if (tt->rel_pos.y < 0.0) tt->rel_pos.y = 0.0;
@ -416,7 +416,7 @@ _elm_tooltip_reconfigure_orient(Elm_Tooltip *tt,
{
dy = my + th - ch;
my = ch - th + py / 2;
if (tt->rel_pos.y == 0.5)
if (EINA_DBL_EQ(tt->rel_pos.y, 0.5))
{
tt->rel_pos.y = 0.5 + dy / (double)tch;
if (tt->rel_pos.y > 1.0) tt->rel_pos.y = 1.0;

View File

@ -415,7 +415,7 @@ _key_generic_cb_del(void *data, const Efl_Event *event EINA_UNUSED)
{
Eo_Generic_Data_Node *node = data;
Efl_Object_Data *pd = efl_data_scope_get(node->obj, EFL_OBJECT_CLASS);
_eo_key_generic_direct_del(pd, node, EINA_FALSE);
_eo_key_generic_direct_del(pd, node, EINA_TRUE);
}
EOLIAN static void

View File

@ -256,8 +256,6 @@ ethumb_init(void)
_plugins_ext = eina_hash_string_small_new(NULL);
EINA_SAFETY_ON_NULL_GOTO(_plugins_ext, error_plugins_ext);
evas_init();
ecore_init();
ecore_evas_init();
edje_init();
@ -285,6 +283,8 @@ ethumb_init(void)
return ++initcount;
error_plugins_ext:
edje_shutdown();
ecore_evas_shutdown();
eina_prefix_free(_pfx);
_pfx = NULL;
@ -312,10 +312,8 @@ ethumb_shutdown(void)
eina_stringshare_del(_home_thumb_dir);
eina_stringshare_del(_thumb_category_normal);
eina_stringshare_del(_thumb_category_large);
evas_shutdown();
ecore_shutdown();
ecore_evas_shutdown();
edje_shutdown();
ecore_evas_shutdown();
eina_prefix_free(_pfx);
_pfx = NULL;
eina_log_domain_unregister(_log_dom);

View File

@ -33,7 +33,7 @@
requirements.
Evas can serve as a base for widget sets or toolkits
(e.g. Elementary, http://docs.enlightenment.org/auto/elementary/) by
(e.g. @ref elementary_main) by
handling pixel drawing and regional change reporting, but does not
manage windows itself, nor deal with input or window update event
propagation. In other words, it is intended for use in drawing

View File

@ -148,7 +148,7 @@ _efl_canvas_object_animation_animation_pause_set(Eo *obj, Efl_Canvas_Object_Anim
_end(obj, pd);
else
_start(obj, pd,(pd->in->speed < 0) ? 1.0 - pd->in->progress : pd->in->progress);
pd->in->pause_state = pause;
if (pd->in) pd->in->pause_state = pause;
}
EOLIAN static Eina_Bool

View File

@ -493,7 +493,11 @@ evas_vg_container_add(Evas_Object *parent)
{
/* Warn it because the usage has been changed.
We can remove this message after v1.21. */
if (!parent) CRI("Efl_VG Container doesn't allow null parent!");
if (!parent)
{
ERR("Efl_VG Container doesn't allow null parent!");
return NULL;
}
return efl_add(MY_CLASS, parent);
}

View File

@ -349,6 +349,7 @@ _efl_canvas_vg_object_efl_object_invalidate(Eo *eo_obj, Efl_Canvas_Vg_Object_Dat
{
Vg_User_Entry *user_entry = pd->user_entry;
ENFN->ector_surface_cache_drop(ENC, user_entry->root);
if (pd->user_entry->root) efl_unref(pd->user_entry->root);
free(pd->user_entry);
}
pd->user_entry = NULL;

View File

@ -474,7 +474,12 @@ evas_vg_shape_add(Efl_Canvas_Vg_Node *parent)
{
/* Warn it because the usage has been changed.
We can remove this message after v1.21. */
if (!parent) CRI("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
if (!parent)
{
ERR("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
return NULL;
}
return efl_add(MY_CLASS, parent);
}

Some files were not shown because too many files have changed in this diff Show More