edje: add accessibility flags and API.

Patch by Kim Shinwoo <kimcinoo.efl@gmail.com>


SVN revision: 72521
This commit is contained in:
Cedric BAIL 2012-06-20 07:29:47 +00:00
parent 1cf893a99d
commit 5c7cfbacb5
8 changed files with 61 additions and 0 deletions

View File

@ -25,3 +25,4 @@ Mikael Sans <sans.mikael@gmail.com>
Jérôme Pinot <ngc891@gmail.com>
Rajeev Ranjan (Rajeev) <rajeev.r@samsung.com> <rajeev.jnnce@gmail.com>
ChunEon Park (Hermet) <hermet@hermet.pe.kr>
Kim Shinwoo <kimcinoo.efl@gmail.com>

View File

@ -485,3 +485,7 @@
2012-06-06 Jihoon Kim
* edje_entry: display preedit string even though there is no attribute
2012-06-20 Kim Shinwoo
* Add edje_object_access_part_list_get and acess flags in edc file.

View File

@ -9,6 +9,7 @@ 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.
Improvements:
* Allocate once and reuse Evas_Map.

View File

@ -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);
@ -387,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},
@ -2343,6 +2345,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;
@ -2935,6 +2938,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 +3621,25 @@ st_collections_group_parts_part_multiline(void)
current_part->multiline = parse_bool(0);
}
/**
@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

View File

@ -3622,6 +3622,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
*

View File

@ -862,6 +862,7 @@ _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);

View File

@ -849,6 +849,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;
};

View File

@ -3844,6 +3844,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__)
{