elementary/glview - support "language,changed" callback
authorChunEon Park <hermet@hermet.pe.kr>
Tue, 12 Feb 2013 06:33:19 +0000 (06:33 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Tue, 12 Feb 2013 06:33:19 +0000 (06:33 +0000)
SVN revision: 83839

ChangeLog
NEWS
src/lib/elm_glview.c
src/lib/elm_glview.h

index 0e11938..f1ea848 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 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 (file)
--- 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:
 
index 023a283..57cff7c 100644 (file)
@@ -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),
index 21f67c6..e7b2a4d 100644 (file)
@@ -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.