forked from enlightenment/efl
Compare commits
105 Commits
Author | SHA1 | Date |
---|---|---|
Stefan Schmidt | 9138731476 | |
Vincent Torri | b6ecdbb91c | |
Vincent Torri | ab44a15b4c | |
Carsten Haitzler | 0a21bf58d2 | |
Carsten Haitzler | 5ab9f4a64c | |
Carsten Haitzler | 41296effc6 | |
Carsten Haitzler | 29554c2f44 | |
Carsten Haitzler | 179ff71c80 | |
Carsten Haitzler | 8a723c1b83 | |
Carsten Haitzler | 3163458619 | |
Carsten Haitzler | 56830b08df | |
Carsten Haitzler | 4f448d6339 | |
Stefan Schmidt | c7c5b49465 | |
Carsten Haitzler | 5bfdf26fb6 | |
Carsten Haitzler | 74e24cbed0 | |
Carsten Haitzler | 125648cc92 | |
Stefan Schmidt | 0d2310678a | |
Stefan Schmidt | c23befc36d | |
Hermet Park | 30fda64641 | |
Taehyub Kim | d72bf1fcae | |
Jaehyun Cho | b9d126d2e2 | |
Woochanlee | 324029062b | |
Myoungwoon Roy, Kim | e674d9d965 | |
Subhransu Mohanty | 69bf3cd31f | |
Subhransu Mohanty | ebbc6a3c2d | |
Hermet Park | 909dd07ba8 | |
Carsten Haitzler | 9dc5255d10 | |
Subhransu Mohanty | c904970ad3 | |
Subhransu Mohanty | 709f31ebe8 | |
Hermet Park | 95af339431 | |
junsu choi | 08d148eba2 | |
Subhransu Mohanty | 8d27e70bc3 | |
Subhransu Mohanty | 5d19a932e8 | |
Marcel Hollerbach | a111e9702c | |
Carsten Haitzler | 841ecb4326 | |
Myoungwoon Roy, Kim | 93147f0bd0 | |
Vincent Torri | e6dd33d7a5 | |
Vincent Torri | 4211bc1f3c | |
Hermet Park | 69dfeb0323 | |
Subhransu Mohanty | bfb4c0a483 | |
Woochanlee | 8419b7dfb1 | |
Subhransu Mohanty | 334fc6b6ee | |
Ali Alzyod | 00cfe685dc | |
Marcel Hollerbach | 88cf37d152 | |
Hermet Park | 83d9bbd7a3 | |
Hermet Park | 3e5a28325e | |
Hermet Park | 10427694d9 | |
Hermet Park | 9dd7ec6272 | |
Daniel Kolesa | 6138e371df | |
Marcel Hollerbach | d068889df4 | |
Daniel Kolesa | 2620295542 | |
Daniel Kolesa | f5d371d6ec | |
Daniel Kolesa | 8f59fb469f | |
Carsten Haitzler | b03baef4b5 | |
Carsten Haitzler | 7ef58c47d3 | |
Carsten Haitzler | af2fd2ead0 | |
Carsten Haitzler | e917e3111b | |
Stefan Schmidt | 1eb5bd7fff | |
Shinwoo Kim | 5b8a1f4a78 | |
Vincent Torri | 9a37508f62 | |
Vincent Torri | 614e471ab2 | |
Taehyub Kim | c3adf72aa8 | |
Hosang Kim | e81c326088 | |
Vincent Torri | 7de6b87508 | |
Vincent Torri | 40e0c2dced | |
Vincent Torri | 26afa83cee | |
Shinwoo Kim | 1230184ccf | |
Carsten Haitzler | 323eb9fcff | |
WooHyun Jung | a030859f67 | |
Taehyub Kim | e4964f94fa | |
junsu choi | 0033f2b8ed | |
junsu choi | d76a2a01f1 | |
junsu choi | e0e7101e8c | |
junsu choi | 255e535a3f | |
junsu choi | 8b65d85243 | |
junsu choi | 8076d6211f | |
Stefan Schmidt | f5e5eae1d5 | |
Stefan Schmidt | 71caee07ba | |
Stefan Schmidt | 84ba2e082c | |
Carsten Haitzler | af4c39c37a | |
Mike Blumenkrantz | a7bcba534a | |
Mike Blumenkrantz | f5cc8574c7 | |
Mike Blumenkrantz | 0b5121bce7 | |
Mike Blumenkrantz | d0209836b4 | |
Mike Blumenkrantz | 7012428389 | |
Mike Blumenkrantz | 15b6563357 | |
Mike Blumenkrantz | 499fd1808c | |
Shinwoo Kim | 16378307fa | |
Hermet Park | 2e5e624702 | |
Shinwoo Kim | 6a5b253a72 | |
Ali Alzyod | 0b7d945a0d | |
Marcel Hollerbach | 924c6fec18 | |
Stefan Schmidt | 7d3e8fcad0 | |
Stefan Schmidt | fd0f8362f4 | |
Marcel Hollerbach | aabea0de2f | |
Carsten Haitzler | 2d3fafc3c1 | |
Carsten Haitzler | 57c8bf661b | |
Marcel Hollerbach | 498af4b32d | |
Xavi Artigas | 55184ba832 | |
Xavi Artigas | ae6b907ccb | |
Xavi Artigas | d6017150b6 | |
Xavi Artigas | ba508532cc | |
Xavi Artigas | 8affc994a3 | |
Xavi Artigas | 3a50d86067 | |
Xavi Artigas | 2d39cb4c7a |
53
NEWS
53
NEWS
|
@ -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:
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
11
doc/main.dox
11
doc/main.dox
|
@ -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>.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "evas-common.h"
|
||||
|
||||
#define WIDTH (640)
|
||||
#define HEIGHT (480)
|
||||
|
||||
|
|
|
@ -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
|
||||
*
|
||||
* @{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue