clouseau: Added 'has_focus' although it doesn't really work well atm.

The problem is that we steal the focus away from the other canvas because
our ui runs in the same process as the other canvas.

SVN revision: 62910
This commit is contained in:
Tom Hacohen 2011-08-28 09:28:21 +00:00
parent b3730d4157
commit 78770a0131
3 changed files with 17 additions and 0 deletions

1
TODO
View File

@ -13,3 +13,4 @@
* callback list?
* EET uses malloc, not stringshare, change stringshare -> strdup
* Fix has_focus.

View File

@ -159,6 +159,7 @@ _obj_information_get(Tree_Item *treeit)
Evas_Object *obj = treeit->ptr;
oinfo = calloc(1, sizeof(*oinfo));
oinfo->evas_props.has_focus = evas_object_focus_get(obj);
oinfo->evas_props.is_visible = evas_object_visible_get(obj);
oinfo->evas_props.name = eina_stringshare_add(evas_object_name_get(obj));
oinfo->evas_props.layer = evas_object_layer_get(obj);
@ -192,6 +193,7 @@ _obj_information_get(Tree_Item *treeit)
oinfo->extra_props.elm.style =
eina_stringshare_add(elm_widget_style_get(obj));
oinfo->extra_props.elm.scale = elm_widget_scale_get(obj);
oinfo->extra_props.elm.has_focus = elm_object_focus_get(obj);
oinfo->extra_props.elm.is_disabled = elm_widget_disabled_get(obj);
oinfo->extra_props.elm.is_mirrored = elm_widget_mirrored_get(obj);
oinfo->extra_props.elm.is_mirrored_automatic =
@ -364,6 +366,12 @@ clouseau_obj_information_list_populate(Tree_Item *treeit)
tit->string = eina_stringshare_add(buf);
main_tit->children = eina_list_append(main_tit->children, tit);
snprintf(buf, sizeof(buf), "Has focus: %d",
(int) oinfo->evas_props.has_focus);
tit = calloc(1, sizeof(*tit));
tit->string = eina_stringshare_add(buf);
main_tit->children = eina_list_append(main_tit->children, tit);
if (oinfo->evas_props.is_clipper)
{
snprintf(buf, sizeof(buf), "Has clipees");
@ -413,6 +421,12 @@ clouseau_obj_information_list_populate(Tree_Item *treeit)
tit->string = eina_stringshare_add(buf);
main_tit->children = eina_list_append(main_tit->children, tit);
snprintf(buf, sizeof(buf), "Has focus: %d",
oinfo->extra_props.elm.has_focus);
tit = calloc(1, sizeof(*tit));
tit->string = eina_stringshare_add(buf);
main_tit->children = eina_list_append(main_tit->children, tit);
snprintf(buf, sizeof(buf), "Mirrored: %d",
oinfo->extra_props.elm.is_mirrored);
tit = calloc(1, sizeof(*tit));

View File

@ -15,6 +15,7 @@ struct _Obj_Information
double align_x, align_y;
double weight_x, weight_y;
int r, g, b, a;
Eina_Bool has_focus;
Eina_Bool is_clipper;
Eina_Bool is_visible;
} evas_props;
@ -32,6 +33,7 @@ struct _Obj_Information
const char *type;
const char *style;
double scale;
Eina_Bool has_focus;
Eina_Bool is_disabled;
Eina_Bool is_mirrored;
Eina_Bool is_mirrored_automatic;