From: ChunEon Park Date: Tue, 12 Feb 2013 06:33:19 +0000 (+0000) Subject: elementary/glview - support "language,changed" callback X-Git-Tag: submit/efl/20131021.015827~1005 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=785542565b607bfd55a08d649f1dd69061da880a;p=platform%2Fupstream%2Felementary.git elementary/glview - support "language,changed" callback SVN revision: 83839 --- diff --git a/ChangeLog b/ChangeLog index 0e11938..f1ea848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -984,3 +984,8 @@ 2013-02-07 Jaehwan Kim * Add smart callback signals of a scroller. "vbar,drag", "vbar,press", "vbar,unpress", "hbar,drag", "hbar,press", "hbar,unpress". + +2013-02-13 ChunEon Park (Hermet) + + * GLview supports "language,changed" smart callback. + diff --git a/NEWS b/NEWS index 38a7751..6efa0fa 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ Additions: * Add elm_index_delay_change_time_set/get for changing delay change time in index. * Add elm_index smart callback - "language,changed". * Add smart callback signals of a scroller. "vbar,drag", "vbar,press", "vbar,unpress", "hbar,drag", "hbar,press", "hbar,unpress". + * Add elm_glview smart callback - "language,changed". Improvements: diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c index 023a283..57cff7c 100644 --- a/src/lib/elm_glview.c +++ b/src/lib/elm_glview.c @@ -10,15 +10,26 @@ EAPI Eo_Op ELM_OBJ_GLVIEW_BASE_ID = EO_NOOP; static const char SIG_FOCUSED[] = "focused"; static const char SIG_UNFOCUSED[] = "unfocused"; +static const char SIG_LANG_CHANGED[] = "language,changed"; /* smart callbacks coming from elm glview objects: */ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_FOCUSED, ""}, {SIG_UNFOCUSED, ""}, + {SIG_LANG_CHANGED, ""}, {NULL, NULL} }; static void +_elm_glview_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list) +{ + Eina_Bool *ret = va_arg(*list, Eina_Bool *); + evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL); + + if (ret) *ret = EINA_TRUE; +} + +static void _elm_glview_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list) { Eina_Bool *ret = va_arg(*list, Eina_Bool *); @@ -562,6 +573,7 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_glview_smart_resize), EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_glview_smart_on_focus), + EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_glview_smart_translate), EO_OP_FUNC(ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_GL_API_GET), _gl_api_get), EO_OP_FUNC(ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_MODE_SET), _mode_set), diff --git a/src/lib/elm_glview.h b/src/lib/elm_glview.h index 21f67c6..e7b2a4d 100644 --- a/src/lib/elm_glview.h +++ b/src/lib/elm_glview.h @@ -14,6 +14,7 @@ * @ref GLView: * - @c "focused" - when glview has received focus. * - @c "unfocused" - when glview has lost focus. + * - @c "language,changed" - the program's language changed * * Below is an illustrative example of how to use GLView and and OpenGL * to render in elementary environment.