summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2012-08-14 21:30:16 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2012-08-14 21:30:16 +0900
commit4b1de353173342ec5fbb6126a938556236e8ea82 (patch)
treef50b1b5a13397d717e77ef9aaec0b69acefdb6e1
parentab0697c4856906f191c14858f65fce0ce91d1eb9 (diff)
downloadedje-4b1de353173342ec5fbb6126a938556236e8ea82.tar.gz
edje-4b1de353173342ec5fbb6126a938556236e8ea82.tar.bz2
edje-4b1de353173342ec5fbb6126a938556236e8ea82.zip
Revert "Revert "upstream merge""
This reverts commit b0b3686f6acede73c0d7dc0f2cc4cfcac3c6038c. Conflicts: AUTHORS ChangeLog
-rw-r--r--Makefile.am24
-rw-r--r--NEWS2
-rw-r--r--src/bin/Makefile.am12
-rw-r--r--src/bin/edje_cc.c3
-rw-r--r--src/bin/edje_cc_handlers.c101
-rw-r--r--src/bin/edje_cc_out.c19
-rw-r--r--src/lib/Edje.h9
-rw-r--r--src/lib/edje_calc.c99
-rw-r--r--src/lib/edje_data.c13
-rw-r--r--src/lib/edje_entry.c12
-rw-r--r--src/lib/edje_load.c7
-rw-r--r--src/lib/edje_multisense.c49
-rw-r--r--src/lib/edje_private.h16
-rw-r--r--src/lib/edje_util.c58
14 files changed, 332 insertions, 92 deletions
diff --git a/Makefile.am b/Makefile.am
index 4d02ab0..01415b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,23 +72,21 @@ endif
if EFL_ENABLE_COVERAGE
lcov-reset:
- @rm -rf coverage
- @find . -name "*.gcda" -exec rm {} \;
- @lcov --directory . --zerocounters
+ @rm -rf $(top_builddir)/coverage
+ @find $(top_builddir) -name "*.gcda" -delete
+ @lcov --zerocounters --directory $(top_builddir)
lcov-report:
- @mkdir coverage
- @lcov --compat-libtool --directory $(top_srcdir)/src --capture --output-file coverage/coverage.info
- @lcov -l coverage/coverage.info |grep "\\.h" |cut -d " " -f 2 > coverage/remove
- @lcov -r coverage/coverage.info `cat coverage/remove` > coverage/coverage.cleaned.info
- @rm coverage/remove
- @mv coverage/coverage.cleaned.info coverage/coverage.info
- @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
+ @mkdir $(top_builddir)/coverage
+ lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
+ lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
+ genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
+ @echo "Coverage Report at $(top_builddir)/coverage/html"
coverage:
- @make lcov-reset
- @make check
- @make lcov-report
+ @$(MAKE) lcov-reset
+ @$(MAKE) check
+ @$(MAKE) lcov-report
else
lcov-reset:
@echo "reconfigure with --enable-coverage"
diff --git a/NEWS b/NEWS
index 0da56e4..fb4e059 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Additions:
* edje_player will automatically reload the file when it change on disk.
* Add SPACER part. This part are not putting anything into the canvas. So lighter and faster to
process (Use it to replace RECT part that are never visible and never catch any event).
+ * Add accessibility flags and API to retrieve the relevant part.
+ * Emit signal when flagged part size get to zero.
Improvements:
* Allocate once and reuse Evas_Map.
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 6ebe8fe..ccb6580 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -35,7 +35,7 @@ edje_cc_CPPFLAGS = \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-DEPP_DIR=\"$(libdir)/$(PACKAGE)/utils\" \
@EDJE_CFLAGS@ @EDJE_CC_CFLAGS@ @EIO_CFLAGS@ @EVIL_CFLAGS@ @SNDFILE_CFLAGS@
-edje_cc_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_CC_LIBS@ @EVIL_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@ -lm
+edje_cc_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_CC_LIBS@ @EDJE_LIBS@ @EVIL_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@ -lm
edje_cc_LDFLAGS = @lt_enable_auto_import@
edje_watch_SOURCES = \
@@ -46,7 +46,7 @@ edje_watch_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
@EDJE_CFLAGS@ @EDJE_CC_CFLAGS@ @EIO_CFLAGS@ @EVIL_CFLAGS@ @EDJE_WATCH_CFLAGS@
-edje_watch_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_WATCH_LIBS@
+edje_watch_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_WATCH_LIBS@ @EDJE_LIBS@
edje_watch_LDFLAGS = @lt_enable_auto_import@
edje_decc_SOURCES = \
@@ -59,7 +59,7 @@ edje_decc_CPPFLAGS = \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
@EDJE_CFLAGS@ @EDJE_DECC_CFLAGS@ @EIO_CFLAGS@ @EVIL_CFLAGS@
-edje_decc_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_DECC_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@
+edje_decc_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_DECC_LIBS@ @EDJE_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@
edje_decc_LDFLAGS = @lt_enable_auto_import@
edje_player_SOURCES = edje_player.c
@@ -67,7 +67,7 @@ edje_player_CPPFLAGS = \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
@EDJE_PLAYER_CFLAGS@ @EVIL_CFLAGS@ @EIO_CFLAGS@
-edje_player_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_PLAYER_LIBS@ @EVIL_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@
+edje_player_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_PLAYER_LIBS@ @EDJE_LIBS@ @EVIL_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@
edje_player_LDFLAGS = @lt_enable_auto_import@
edje_inspector_SOURCES = edje_inspector.c
@@ -75,7 +75,7 @@ edje_inspector_CPPFLAGS = \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
@EDJE_INSPECTOR_CFLAGS@ @EIO_CFLAGS@
-edje_inspector_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_INSPECTOR_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@
+edje_inspector_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_INSPECTOR_LIBS@ @EDJE_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@
edje_inspector_LDFLAGS = @lt_enable_auto_import@
edje_external_inspector_SOURCES = edje_external_inspector.c
@@ -83,7 +83,7 @@ edje_external_inspector_CPPFLAGS = \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
@EDJE_EXTERNAL_INSPECTOR_CFLAGS@ @EIO_CFLAGS@
-edje_external_inspector_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_EXTERNAL_INSPECTOR_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@
+edje_external_inspector_LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_EXTERNAL_INSPECTOR_LIBS@ @EDJE_LIBS@ @VORBISENC_LIBS@ @FLAC_LIBS@ @SNDFILE_LIBS@
edje_external_inspector_LDFLAGS = @lt_enable_auto_import@
EXTRA_DIST = @EDJE_RECC_PRG@ edje_cc.h edje_convert.h edje_convert.c edje_multisense_convert.h edje_data_convert.c
diff --git a/src/bin/edje_cc.c b/src/bin/edje_cc.c
index 7152836..c43a3b3 100644
--- a/src/bin/edje_cc.c
+++ b/src/bin/edje_cc.c
@@ -30,7 +30,7 @@ int no_save = 0;
int min_quality = 0;
int max_quality = 100;
int compress_mode = EET_COMPRESSION_DEFAULT;
-int threads = 1;
+int threads = 0;
static void
main_help(void)
@@ -248,6 +248,7 @@ main(int argc, char **argv)
exit(-1);
}
+ _on_edjecc = EINA_TRUE;
using_file(file_in);
if (!edje_init())
diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c
index fb51d62..c7a06f0 100644
--- a/src/bin/edje_cc_handlers.c
+++ b/src/bin/edje_cc_handlers.c
@@ -142,6 +142,7 @@ static void st_collections_group_parts_part_entry_mode(void);
static void st_collections_group_parts_part_select_mode(void);
static void st_collections_group_parts_part_cursor_mode(void);
static void st_collections_group_parts_part_multiline(void);
+static void st_collections_group_parts_part_access(void);
static void st_collections_group_parts_part_dragable_x(void);
static void st_collections_group_parts_part_dragable_y(void);
static void st_collections_group_parts_part_dragable_confine(void);
@@ -170,6 +171,7 @@ static void st_collections_group_parts_part_description_inherit(void);
static void st_collections_group_parts_part_description_source(void);
static void st_collections_group_parts_part_description_state(void);
static void st_collections_group_parts_part_description_visible(void);
+static void st_collections_group_parts_part_description_limit(void);
static void st_collections_group_parts_part_description_align(void);
static void st_collections_group_parts_part_description_fixed(void);
static void st_collections_group_parts_part_description_min(void);
@@ -386,6 +388,7 @@ New_Statement_Handler statement_handlers[] =
{"collections.group.parts.part.select_mode", st_collections_group_parts_part_select_mode},
{"collections.group.parts.part.cursor_mode", st_collections_group_parts_part_cursor_mode},
{"collections.group.parts.part.multiline", st_collections_group_parts_part_multiline},
+ {"collections.group.parts.part.access", st_collections_group_parts_part_access},
{"collections.group.parts.part.image", st_images_image}, /* dup */
{"collections.group.parts.part.set.name", st_images_set_name},
{"collections.group.parts.part.set.image.image", st_images_set_image_image},
@@ -433,6 +436,7 @@ New_Statement_Handler statement_handlers[] =
{"collections.group.parts.part.description.source", st_collections_group_parts_part_description_source},
{"collections.group.parts.part.description.state", st_collections_group_parts_part_description_state},
{"collections.group.parts.part.description.visible", st_collections_group_parts_part_description_visible},
+ {"collections.group.parts.part.description.limit", st_collections_group_parts_part_description_limit},
{"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align},
{"collections.group.parts.part.description.fixed", st_collections_group_parts_part_description_fixed},
{"collections.group.parts.part.description.min", st_collections_group_parts_part_description_min},
@@ -2253,7 +2257,6 @@ st_collections_group_inherit(void)
Edje_Pack_Element_Parser *pitem;
Edje_Part_Description_Common *ed, *ed2;
Edje_List_Foreach_Data fdata;
- Edje_String *es;
Eina_List *l;
char *parent_name;
unsigned int i, j;
@@ -2286,21 +2289,46 @@ st_collections_group_inherit(void)
if (pc2->data)
{
- char *key;
+ char *key, *data;
memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
eina_hash_foreach(pc2->data,
_edje_data_item_list_foreach, &fdata);
- if (!pc->data)
- pc->data = eina_hash_string_small_new(free);
+ if (!pc->data) pc->data = eina_hash_string_small_new(free);
+ EINA_LIST_FREE(fdata.list, key)
+ {
+ data = eina_hash_find(pc2->data, key);
+ eina_hash_direct_add(pc->data, key, data);
+ }
+ }
+
+ if (pc2->alias)
+ {
+ char *key, *alias;
+ memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
+ eina_hash_foreach(pc2->alias,
+ _edje_data_item_list_foreach, &fdata);
+ if (!pc->alias) pc->alias = eina_hash_string_small_new(free);
+ EINA_LIST_FREE(fdata.list, key)
+ {
+ alias = eina_hash_find(pc2->alias, key);
+ eina_hash_direct_add(pc->alias, key, alias);
+ }
+ }
+ if (pc2->aliased)
+ {
+ char *key, *aliased;
+ memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
+ eina_hash_foreach(pc2->aliased,
+ _edje_data_item_list_foreach, &fdata);
+ if (!pc->aliased) pc->aliased = eina_hash_string_small_new(free);
EINA_LIST_FREE(fdata.list, key)
{
- es = mem_alloc(SZ(Edje_String));
- es = (Edje_String *)eina_hash_find(pc2->data, key);
- eina_hash_direct_add(pc->data, key, es);
+ aliased = eina_hash_find(pc2->aliased, key);
+ eina_hash_direct_add(pc->aliased, key, aliased);
}
}
@@ -2340,6 +2368,7 @@ st_collections_group_inherit(void)
ep->select_mode = ep2->select_mode;
ep->cursor_mode = ep2->cursor_mode;
ep->multiline = ep2->multiline;
+ ep->access = ep2->access;
ep->dragable.x = ep2->dragable.x;
ep->dragable.step_x = ep2->dragable.step_x;
ep->dragable.count_x = ep2->dragable.count_x;
@@ -2932,6 +2961,7 @@ ob_collections_group_parts_part(void)
ep->pointer_mode = EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
ep->precise_is_inside = 0;
ep->use_alternate_font_metrics = 0;
+ ep->access = 0;
ep->clip_to_id = -1;
ep->dragable.confine_id = -1;
ep->dragable.event_id = -1;
@@ -3617,6 +3647,25 @@ st_collections_group_parts_part_multiline(void)
/**
@page edcref
+ @property
+ access
+ @parameters
+ [1 or 0]
+ @effect
+ Specifies whether the part will use accessibility feature (1),
+ or not (0). It's set to 0 by default.
+ @endproperty
+*/
+static void
+st_collections_group_parts_part_access(void)
+{
+ check_arg_count(1);
+
+ current_part->access = parse_bool(0);
+}
+
+/**
+ @page edcref
@block
dragable
@context
@@ -4210,6 +4259,7 @@ ob_collections_group_parts_part_description(void)
}
ed->visible = 1;
+ ed->limit = 0;
ed->align.x = FROM_DOUBLE(0.5);
ed->align.y = FROM_DOUBLE(0.5);
ed->min.w = 0;
@@ -4623,6 +4673,43 @@ st_collections_group_parts_part_description_visible(void)
current_desc->visible = parse_bool(0);
}
+/**
+ @page edcref
+ @property
+ limit
+ @parameters
+ [NONE, WIDTH, HEIGHT or BOTH]
+ @effect
+ Emit a signal when the part size change from zero or to a zero size
+ ('limit,width,over', 'limit,width,zero'). By default no signal are
+ emitted.
+ @endproperty
+ @since 1.7.0
+*/
+static void
+st_collections_group_parts_part_description_limit(void)
+{
+ check_arg_count(1);
+
+ current_desc->limit = parse_enum(0,
+ "NONE", 0,
+ "WIDTH", 1,
+ "HEIGHT", 2,
+ "BOTH", 3);
+
+ if (current_desc->limit)
+ {
+ Edje_Part_Collection *pc;
+ int count;
+
+ pc = eina_list_data_get(eina_list_last(edje_collections));
+ count = pc->limits.parts_count++;
+ pc->limits.parts = realloc(pc->limits.parts,
+ pc->limits.parts_count * sizeof (Edje_Part_Limit));
+ data_queue_part_lookup(pc, current_part->name,
+ &(pc->limits.parts[count].part));
+ }
+}
/**
@page edcref
diff --git a/src/bin/edje_cc_out.c b/src/bin/edje_cc_out.c
index 0e72e28..6eee5a6 100644
--- a/src/bin/edje_cc_out.c
+++ b/src/bin/edje_cc_out.c
@@ -1272,7 +1272,6 @@ data_write_scripts(Eet_File *ef)
sc->ef = ef;
sc->cd = cd;
sc->i = i;
- // XXX: from here
snprintf(sc->tmpn, PATH_MAX, "%s/edje_cc.sma-tmp-XXXXXX", tmp_dir);
sc->tmpn_fd = mkstemp(sc->tmpn);
if (sc->tmpn_fd < 0)
@@ -1287,11 +1286,11 @@ data_write_scripts(Eet_File *ef)
"compilation.\n", sc->tmpn);
}
create_script_file(ef, sc->tmpn, cd, sc->tmpn_fd);
- // XXX; to here -> can make set of threads that report back and then
- // spawn
snprintf(buf, sizeof(buf),
- "embryo_cc -i %s/include -o %s %s",
- eina_prefix_data_get(pfx), sc->tmpo, sc->tmpn);
+ "%s/embryo_cc -i %s/include -o %s %s",
+ eina_prefix_bin_get(pfx),
+ eina_prefix_data_get(pfx),
+ sc->tmpo, sc->tmpn);
pending_threads++;
sc->exe = ecore_exe_run(buf, sc);
ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
@@ -2145,11 +2144,15 @@ data_process_lookups(void)
}
else
{
+ char *alias;
+ alias = eina_hash_find(part->pc->alias, part->name);
+ if (!alias)
+ alias = part->name;
for (i = 0; i < part->pc->parts_count; ++i)
{
ep = part->pc->parts[i];
- if ((ep->name) && (!strcmp(ep->name, part->name)))
+ if ((ep->name) && (!strcmp(ep->name, alias)))
{
handle_slave_lookup(part_slave_lookups, part->dest, ep->id);
*(part->dest) = ep->id;
@@ -2159,8 +2162,8 @@ data_process_lookups(void)
if (i == part->pc->parts_count)
{
- ERR("%s: Error. Unable to find part name \"%s\".",
- progname, part->name);
+ ERR("%s: Error. Unable to find part name \"%s\" needed in group '%s'.",
+ progname, alias, part->pc->part);
exit(-1);
}
}
diff --git a/src/lib/Edje.h b/src/lib/Edje.h
index d0ca484..c259e60 100644
--- a/src/lib/Edje.h
+++ b/src/lib/Edje.h
@@ -3674,6 +3674,15 @@ EAPI Evas_Object *edje_object_part_box_remove_at (Evas_Object *obj, con
EAPI Eina_Bool edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear);
/**
+ * @brief Retrieve a list all accessibility part names
+ *
+ * @param obj A valid Evas_Object handle
+ * @return A list all accessibility part names on @p obj
+ * @since 1.3.0
+ */
+EAPI Eina_List * edje_object_access_part_list_get (const Evas_Object *obj);
+
+/**
* @brief Retrieve a child from a table
*
* @param obj A valid Evas_Object handle
diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c
index 6634f96..6b99b61 100644
--- a/src/lib/edje_calc.c
+++ b/src/lib/edje_calc.c
@@ -667,6 +667,79 @@ _edje_recalc_do(Edje *ed)
edje_object_size_min_calc(ed->obj, &w, &h);
evas_object_size_hint_min_set(ed->obj, w, h);
}
+
+ if (!ed->collection) return ;
+
+ for (i = 0; i < ed->collection->limits.parts_count; i++)
+ {
+ const char *name;
+ unsigned char limit;
+ int part;
+
+ name = ed->collection->parts[i]->name;
+ part = ed->collection->limits.parts[i].part;
+ limit = ed->table_parts[part]->chosen_description->limit;
+ switch (limit)
+ {
+ case 0:
+ ed->collection->limits.parts[i].width = 2;
+ ed->collection->limits.parts[i].height = 2;
+ break;
+ case 1:
+ ed->collection->limits.parts[i].height = 2;
+ break;
+ case 2:
+ ed->collection->limits.parts[i].width = 2;
+ break;
+ case 3:
+ break;
+ }
+
+ if (limit | 1)
+ {
+ if (ed->table_parts[part]->w > 0 &&
+ (ed->collection->limits.parts[i].width <= 0 ||
+ ed->collection->limits.parts[i].width == 2))
+ {
+ ed->collection->limits.parts[i].width = 1;
+ _edje_emit(ed, "limit,width,over", name);
+ }
+ else if (ed->table_parts[part]->w < 0 &&
+ ed->collection->limits.parts[i].width >= 0)
+ {
+ ed->collection->limits.parts[i].width = -1;
+ _edje_emit(ed, "limit,width,below", name);
+ }
+ else if (ed->table_parts[part]->w == 0 &&
+ ed->collection->limits.parts[i].width != 0)
+ {
+ ed->collection->limits.parts[i].width = 0;
+ _edje_emit(ed, "limit,width,zero", name);
+ }
+ }
+ if (limit | 2)
+ {
+ if (ed->table_parts[part]->h > 0 &&
+ (ed->collection->limits.parts[i].height <= 0 ||
+ ed->collection->limits.parts[i].height == 2))
+ {
+ ed->collection->limits.parts[i].height = 1;
+ _edje_emit(ed, "limit,height,over", name);
+ }
+ else if (ed->table_parts[part]->h < 0 &&
+ ed->collection->limits.parts[i].height >= 0)
+ {
+ ed->collection->limits.parts[i].height = -1;
+ _edje_emit(ed, "limit,height,beloh", name);
+ }
+ else if (ed->table_parts[part]->h == 0 &&
+ ed->collection->limits.parts[i].height != 0)
+ {
+ ed->collection->limits.parts[i].height = 0;
+ _edje_emit(ed, "limit,height,zero", name);
+ }
+ }
+ }
}
void
@@ -1179,6 +1252,32 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
if (*maxh < *minh) *maxh = *minh;
}
}
+ if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y))
+ {
+ double s = 1.0;
+
+ if (ep->part->scale) s = TO_DOUBLE(sc);
+ evas_object_scale_set(ep->object, s);
+ evas_object_textblock_size_formatted_get(ep->object, &tw, &th);
+ if (chosen_desc->text.fit_x)
+ {
+ if ((tw > 0) && (tw > params->w))
+ {
+ s = (s * params->w) / (double)tw;
+ evas_object_scale_set(ep->object, s);
+ evas_object_textblock_size_formatted_get(ep->object, &tw, &th);
+ }
+ }
+ if (chosen_desc->text.fit_y)
+ {
+ if ((th > 0) && (th > params->h))
+ {
+ s = (s * params->h) / (double)th;
+ evas_object_scale_set(ep->object, s);
+ evas_object_textblock_size_formatted_get(ep->object, &tw, &th);
+ }
+ }
+ }
evas_object_textblock_valign_set(ep->object, TO_DOUBLE(chosen_desc->text.align.y));
}
}
diff --git a/src/lib/edje_data.c b/src/lib/edje_data.c
index 380fee4..da30329 100644
--- a/src/lib/edje_data.c
+++ b/src/lib/edje_data.c
@@ -55,6 +55,7 @@ Eet_Data_Descriptor *_edje_edd_edje_part_description_external_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_image_id = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_image_id_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_external_param = NULL;
+Eet_Data_Descriptor *_edje_edd_edje_part_limit = NULL;
#define EMP(Type, Minus) \
Eina_Mempool *_emp_##Type = NULL; \
@@ -109,7 +110,7 @@ struct {
{ EDJE_PART_TYPE_TABLE, "table" },
{ EDJE_PART_TYPE_EXTERNAL, "external" },
{ EDJE_PART_TYPE_PROXY, "proxy" },
- { EDJE_PART_TYPE_SPACER, "spacer" }
+ { EDJE_PART_TYPE_SPACER, "spacer" }
};
static const char *
@@ -218,6 +219,7 @@ _edje_edd_shutdown(void)
FREED(_edje_edd_edje_external_param);
FREED(_edje_edd_edje_image_directory_set);
FREED(_edje_edd_edje_image_directory_set_entry);
+ FREED(_edje_edd_edje_part_limit);
}
#define EDJE_DEFINE_POINTER_TYPE(Type, Name) \
@@ -454,6 +456,7 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "state.name", state.name, EET_T_STRING); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "state.value", state.value, EET_T_DOUBLE); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "visible", visible, EET_T_CHAR); \
+ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "limit", limit, EET_T_CHAR); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.x", align.x, EDJE_T_FLOAT); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", align.y, EDJE_T_FLOAT); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \
@@ -740,6 +743,7 @@ _edje_edd_init(void)
EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_external, Edje_Part_Description_External, common);
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_description_external, Edje_Part_Description_External, "external_params", external_params, _edje_edd_edje_external_param);
+ EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_spacer);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_rectangle);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_swallow);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_group);
@@ -862,9 +866,15 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "select_mode", select_mode, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "cursor_mode", cursor_mode, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "multiline", multiline, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "access", access, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "api.name", api.name, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "api.description", api.description, EET_T_STRING);
+ EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Limit);
+ _edje_edd_edje_part_limit = eet_data_descriptor_file_new(&eddc);
+
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_limit, Edje_Part_Limit, "part", part, EET_T_INT);
+
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Collection);
_edje_edd_edje_part_collection =
eet_data_descriptor_file_new(&eddc);
@@ -882,6 +892,7 @@ _edje_edd_init(void)
EDJE_DEFINE_POINTER_TYPE(Limit, limit);
EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_collection, Edje_Part_Collection, "limits.vertical", limits.vertical, _edje_edd_edje_limit_pointer);
EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_collection, Edje_Part_Collection, "limits.horizontal", limits.horizontal, _edje_edd_edje_limit_pointer);
+ EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_collection, Edje_Part_Collection, "limits.parts", limits.parts, _edje_edd_edje_part_limit);
EET_DATA_DESCRIPTOR_ADD_HASH(_edje_edd_edje_part_collection, Edje_Part_Collection, "data", data, _edje_edd_edje_string);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "id", id, EET_T_INT);
diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c
index dabba31..30379c0 100644
--- a/src/lib/edje_entry.c
+++ b/src/lib/edje_entry.c
@@ -1315,10 +1315,15 @@ _range_del_emit(Edje *ed, Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o __
{
size_t start, end;
char *tmp;
- Edje_Entry_Change_Info *info = calloc(1, sizeof(*info));
- info->insert = EINA_FALSE;
+ Edje_Entry_Change_Info *info;
+
start = evas_textblock_cursor_pos_get(en->sel_start);
end = evas_textblock_cursor_pos_get(en->sel_end);
+ if (start == end)
+ goto noop;
+
+ info = calloc(1, sizeof(*info));
+ info->insert = EINA_FALSE;
info->change.del.start = start;
info->change.del.end = end;
@@ -1329,6 +1334,7 @@ _range_del_emit(Edje *ed, Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o __
_edje_emit(ed, "entry,changed", en->rp->part->name);
_edje_emit_full(ed, "entry,changed,user", en->rp->part->name, info,
_free_entry_change_info);
+noop:
_sel_clear(en->cursor, en->rp->object, en);
}
@@ -1543,7 +1549,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
evas_textblock_cursor_char_prev(en->cursor);
evas_textblock_cursor_word_start(en->cursor);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_preextend(en->cursor, rp->object, en);
_range_del_emit(ed, en->cursor, rp->object, en);
}
diff --git a/src/lib/edje_load.c b/src/lib/edje_load.c
index 21f8ded..e6efc96 100644
--- a/src/lib/edje_load.c
+++ b/src/lib/edje_load.c
@@ -1139,7 +1139,6 @@ _edje_file_del(Edje *ed)
}
if (rp->swallowed_object)
{
- _edje_real_part_swallow_clear(rp);
/* Objects swallowed by the app do not get deleted,
but those internally swallowed (GROUP type) do. */
switch (rp->part->type)
@@ -1153,6 +1152,7 @@ _edje_file_del(Edje *ed)
default:
break;
}
+ _edje_real_part_swallow_clear(rp);
rp->swallowed_object = NULL;
}
if (rp->items)
@@ -1731,6 +1731,7 @@ _cb_signal_repeat(void *data, Evas_Object *obj, const char *sig, const char *sou
emsg.sig = sig;
emsg.src = alias ? alias : new_src;
emsg.data = NULL;
- _edje_message_send(ed_parent, EDJE_QUEUE_SCRIPT,
- EDJE_MESSAGE_SIGNAL, 0, &emsg);
+ if (ed_parent)
+ _edje_message_send(ed_parent, EDJE_QUEUE_SCRIPT,
+ EDJE_MESSAGE_SIGNAL, 0, &emsg);
}
diff --git a/src/lib/edje_multisense.c b/src/lib/edje_multisense.c
index 715dc0c..d6bea8b 100644
--- a/src/lib/edje_multisense.c
+++ b/src/lib/edje_multisense.c
@@ -20,7 +20,7 @@ typedef struct _Multisense_Data
#define BUF_LEN 64
#define SND_PROCESS_LENGTH 2048
-#ifdef HAVE_LIBREMIX
+#ifdef ENABLE_MULTISENSE
static Ecore_Thread *player_thread = NULL;
static int command_pipe[2];
static Eina_Bool pipe_initialized = EINA_FALSE;
@@ -63,8 +63,7 @@ struct _Edje_Multisense_Sound_Action
Edje_Tone_Action tone;
} type;
};
-
-#ifdef HAVE_LIBREMIX
+#ifdef ENABLE_MULTISENSE
static Multisense_Data *
init_multisense_environment(void)
{
@@ -88,14 +87,14 @@ init_multisense_environment(void)
m = _edje_module_handle_load(ms_factory);
if (!m) goto err;
-
+#ifdef HAVE_LIBREMIX
msdata->msenv->remixenv = remix_init();
-
- multisense_factory_init =
+#endif
+ multisense_factory_init =
eina_module_symbol_get(m, "multisense_factory_init");
if (multisense_factory_init) multisense_factory_init(msdata->msenv);
-
- msdata->multisense_sound_player_get =
+#ifdef HAVE_LIBREMIX
+ msdata->multisense_sound_player_get =
eina_module_symbol_get(m, "multisense_sound_player_get");
if (!msdata->multisense_sound_player_get) goto err;
@@ -113,13 +112,16 @@ init_multisense_environment(void)
msdata->player, msdata->player_layer,
REMIX_SAMPLES(0),
REMIX_SAMPLES(REMIX_COUNT_INFINITE));
+#endif
return msdata;
err:
if (msdata)
{
+#ifdef HAVE_LIBREMIX
if (msdata->deck) remix_destroy(msdata->msenv->remixenv, msdata->deck);
if (msdata->msenv->remixenv) remix_purge(msdata->msenv->remixenv);
+#endif
if (msdata->msenv) free(msdata->msenv);
free(msdata);
}
@@ -127,9 +129,10 @@ err:
}
#endif
-#ifdef HAVE_LIBREMIX
+#if defined(ENABLE_MULTISENSE) && defined(HAVE_LIBREMIX)
static RemixBase *
-eet_sound_reader_get(Edje_Multisense_Env *msenv, const char *path, const char *sound_id, const double speed)
+eet_sound_reader_get(Edje_Multisense_Env *msenv, const char *path,
+ const char *sound_id, const double speed)
{
RemixPlugin *sf_plugin = NULL;
RemixBase * eet_snd_reader = NULL;
@@ -162,7 +165,7 @@ eet_sound_reader_get(Edje_Multisense_Env *msenv, const char *path, const char *s
static RemixBase *
-edje_remix_sample_create(Multisense_Data *msdata, Edje*ed, Edje_Sample_Action *action)
+edje_remix_sample_create(Multisense_Data *msdata, Edje *ed, Edje_Sample_Action *action)
{
RemixBase *remix_snd = NULL;
Edje_Sound_Sample *sample;
@@ -187,7 +190,7 @@ edje_remix_sample_create(Multisense_Data *msdata, Edje*ed, Edje_Sample_Action *a
}
static RemixBase *
-edje_remix_tone_create(Multisense_Data *msdata, Edje*ed, Edje_Tone_Action *action)
+edje_remix_tone_create(Multisense_Data *msdata, Edje *ed, Edje_Tone_Action *action)
{
Edje_Sound_Tone *tone;
RemixSquareTone *square = NULL;
@@ -217,6 +220,7 @@ sound_command_handler(Multisense_Data *msdata)
RemixBase *sound;
if (read(command_pipe[0], &command, sizeof(command)) <= 0) return;
+
switch (command.action)
{
case EDJE_PLAY_SAMPLE:
@@ -245,7 +249,7 @@ sound_command_handler(Multisense_Data *msdata)
}
#endif
-#ifdef HAVE_LIBREMIX
+#ifdef ENABLE_MULTISENSE
// msdata outside of thread due to thread issues in dlsym etc.
static Multisense_Data *msdata = NULL;
@@ -254,11 +258,12 @@ _msdata_free(void)
{
// cleanup msdata outside of thread due to thread issues in dlsym etc.
if (!msdata) return;
+#ifdef HAVE_LIBREMIX
//cleanup Remix stuffs
remix_destroy(msdata->msenv->remixenv, msdata->player);
remix_destroy(msdata->msenv->remixenv, msdata->deck);
remix_purge(msdata->msenv->remixenv);
-
+#endif
free(msdata->msenv);
free(msdata);
msdata = NULL;
@@ -268,9 +273,11 @@ static void
_player_job(void *data __UNUSED__, Ecore_Thread *th)
{
fd_set wait_fds;
+#ifdef HAVE_LIBREMIX
RemixBase *sound;
RemixCount process_len;
-// disable and move outside of thread due to dlsym etc. thread issues
+#endif
+// disable and move outside of thread due to dlsym etc. thread issues
// Multisense_Data * msdata = init_multisense_environment();
if (!msdata) return;
@@ -278,7 +285,7 @@ _player_job(void *data __UNUSED__, Ecore_Thread *th)
fcntl(command_pipe[0], F_SETFL, O_NONBLOCK);
FD_ZERO(&wait_fds);
FD_SET(command_pipe[0], &wait_fds);
-
+#ifdef HAVE_LIBREMIX
while (!ecore_thread_check(th))
{
if (!msdata->remaining)
@@ -305,13 +312,11 @@ _player_job(void *data __UNUSED__, Ecore_Thread *th)
{
remix_destroy(msdata->msenv->remixenv, sound);
}
-
+#endif
close(command_pipe[0]);
close(command_pipe[1]);
}
-#endif
-#ifdef HAVE_LIBREMIX
static void
_player_cancel(void *data __UNUSED__, Ecore_Thread *th __UNUSED__)
{
@@ -319,9 +324,7 @@ _player_cancel(void *data __UNUSED__, Ecore_Thread *th __UNUSED__)
_msdata_free();
player_thread = NULL;
}
-#endif
-#ifdef HAVE_LIBREMIX
static void
_player_end(void *data __UNUSED__, Ecore_Thread *th __UNUSED__)
{
@@ -335,7 +338,7 @@ Eina_Bool
_edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, const double speed)
{
ssize_t size = 0;
-#ifdef ENABLE_MULTISENSE
+#if defined(ENABLE_MULTISENSE) && defined(HAVE_LIBREMIX)
Edje_Multisense_Sound_Action command;
if ((!pipe_initialized) && (!player_thread)) return EINA_FALSE;
@@ -363,7 +366,7 @@ Eina_Bool
_edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const double duration)
{
ssize_t size = 0;
-#ifdef ENABLE_MULTISENSE
+#if defined(ENABLE_MULTISENSE) && defined(HAVE_LIBREMIX)
Edje_Multisense_Sound_Action command;
if ((!pipe_initialized) && (!player_thread)) return EINA_FALSE;
diff --git a/src/lib/edje_private.h b/src/lib/edje_private.h
index 81a921a..3eee720 100644
--- a/src/lib/edje_private.h
+++ b/src/lib/edje_private.h
@@ -195,7 +195,7 @@ struct _Edje_Smart_Api
/* increment this when you add new feature to edje file format without
* breaking backward compatibility.
*/
-#define EDJE_FILE_MINOR 3
+#define EDJE_FILE_MINOR 4
/* FIXME:
*
@@ -321,6 +321,7 @@ typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_
typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table;
typedef struct _Edje_Patterns Edje_Patterns;
typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
+typedef struct _Edje_Part_Limit Edje_Part_Limit;
typedef struct _Edje Edje;
typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
@@ -727,6 +728,14 @@ struct _Edje_Pack_Element
unsigned short colspan, rowspan;
};
+struct _Edje_Part_Limit
+{
+ int part;
+
+ signed char width; /* -1, 0 or 1 */
+ signed char height; /* -1, 0, or 1 */
+};
+
/*----------*/
struct _Edje_Part_Collection
@@ -754,6 +763,9 @@ struct _Edje_Part_Collection
Edje_Limit **horizontal;
unsigned int horizontal_count;
+
+ Edje_Part_Limit *parts;
+ unsigned int parts_count;
} limits;
Edje_Part **parts; /* an array of Edje_Part */
@@ -850,6 +862,7 @@ struct _Edje_Part
unsigned char select_mode;
unsigned char cursor_mode;
unsigned char multiline;
+ unsigned char access; /* it will be used accessibility feature */
Edje_Part_Api api;
};
@@ -914,6 +927,7 @@ struct _Edje_Part_Description_Common
} persp;
unsigned char visible; /* is it shown */
+ unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */
};
struct _Edje_Part_Description_Spec_Fill
diff --git a/src/lib/edje_util.c b/src/lib/edje_util.c
index e6c79c2..8640727 100644
--- a/src/lib/edje_util.c
+++ b/src/lib/edje_util.c
@@ -95,14 +95,14 @@ _edje_user_definition_free(Edje_User_Defined *eud)
rp->swallowed_object = NULL;
rp->swallow_params.min.w = 0;
rp->swallow_params.min.h = 0;
- rp->swallow_params.max.w = 0;
- rp->swallow_params.max.h = 0;
+ rp->swallow_params.max.w = 0;
+ rp->swallow_params.max.h = 0;
rp->edje->dirty = 1;
- rp->edje->recalc_call = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
- rp->invalidate = 1;
+ rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc_do(rp->edje);
break;
case EDJE_USER_BOX_PACK:
child = eud->u.box.child;
@@ -2523,7 +2523,6 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
Edje *ed;
Edje_Real_Part *rp;
Edje_User_Defined *eud = NULL;
- Eina_List *l;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return EINA_FALSE;
@@ -2538,20 +2537,6 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
// XXX: by Sachiel, January 21th 2009, 19:30 UTC
_edje_recalc_do(ed);
- EINA_LIST_FOREACH(ed->user_defined, l, eud)
- if (eud->type == EDJE_USER_SWALLOW && !strcmp(part, eud->part))
- {
- ed->user_defined = eina_list_remove_list(ed->user_defined, l);
- if (!obj_swallow)
- {
- _edje_user_definition_free(eud);
- l = NULL;
- eud = NULL;
- break;
- }
- break;
- }
-
rp = evas_object_data_get(obj_swallow, "\377 edje.swallowing_part");
if (rp)
{
@@ -2890,7 +2875,7 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj_swallow)
{
_edje_user_definition_free(eud);
- break;
+ return ;
}
}
}
@@ -3909,6 +3894,27 @@ edje_object_part_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool cl
return r;
}
+EAPI Eina_List *
+edje_object_access_part_list_get(const Evas_Object *obj)
+{
+ Edje *ed;
+ Eina_List *access_parts = NULL;
+
+ ed = _edje_fetch(obj);
+ if ((!ed)) return NULL;
+
+ unsigned int i;
+ for (i = 0; i < ed->table_parts_size; i++)
+ {
+ Edje_Real_Part *rp;
+ rp = ed->table_parts[i];
+ if (rp->part->access)
+ access_parts = eina_list_append(access_parts, rp->part->name);
+ }
+
+ return access_parts;
+}
+
static void
_edje_box_child_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *child __UNUSED__, void *einfo __UNUSED__)
{
@@ -5074,7 +5080,7 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
}
rp->swallow_params.aspect.w = aw;
rp->swallow_params.aspect.h = ah;
- evas_object_data_set(rp->swallowed_object, "\377 edje.swallowing_part", rp);
+ evas_object_data_set(rp->swallowed_object, "\377 edje.swallowing_part", rp);
}
#ifdef EDJE_CALC_CACHE
@@ -5104,8 +5110,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
{
if (rp->swallowed_object != obj_swallow)
{
- _edje_real_part_swallow_clear(rp);
- rp->swallowed_object = NULL;
+ edje_object_part_unswallow(rp->edje->obj, rp->swallowed_object);
}
else
{
@@ -5129,7 +5134,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
else evas_object_clip_set(rp->swallowed_object, rp->edje->base.clipper);
evas_object_stack_above(rp->swallowed_object, rp->object);
evas_object_event_callback_add(rp->swallowed_object,
- EVAS_CALLBACK_FREE,
+ EVAS_CALLBACK_DEL,
_edje_object_part_swallow_free_cb,
rp);
evas_object_event_callback_add(rp->swallowed_object,
@@ -5167,7 +5172,7 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp)
{
evas_object_smart_member_del(rp->swallowed_object);
evas_object_event_callback_del_full(rp->swallowed_object,
- EVAS_CALLBACK_FREE,
+ EVAS_CALLBACK_DEL,
_edje_object_part_swallow_free_cb,
rp);
evas_object_event_callback_del_full(rp->swallowed_object,
@@ -5179,6 +5184,7 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp)
if (rp->part->mouse_events)
_edje_callbacks_del(rp->swallowed_object, rp->edje);
_edje_callbacks_focus_del(rp->swallowed_object, rp->edje);
+ rp->swallowed_object = NULL;
}
static void