check: add "elm,activate,check,on" and "elm,activate,check,off" signal to support...
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 29 Jul 2015 21:10:49 +0000 (23:10 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 4 Aug 2015 13:21:40 +0000 (15:21 +0200)
Summary:
Currently when user clicks on the checkbox, and when api state_check() called by
the developer we emit "elm,state,check,*" signal. To support state change animation when
user interacts with check box. There is no way to distinguish the action in EDC.
This "elm,activate,check,*" is a way which edc can make use to distinguish the stae change signal
by the user action or due to api call.

Reviewers: woohyun, raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: id213sin

Differential Revision: https://phab.enlightenment.org/D2817

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
legacy/elementary/src/lib/elm_check.c

index 0dbf571..dc761ef 100644 (file)
@@ -57,12 +57,22 @@ _activate(Evas_Object *obj)
    if (sd->statep) *sd->statep = sd->state;
    if (sd->state)
      {
+        // FIXME: to do animation during state change , we need different signal
+        // so that we can distinguish between state change by user or state change
+        // by calling state_change() api. Keep both the signal for backward compatibility
+        // and remove "elm,state,check,on" signal emission when we can break ABI.
+        elm_layout_signal_emit(obj, "elm,activate,check,on", "elm");
         elm_layout_signal_emit(obj, "elm,state,check,on", "elm");
         if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
              _elm_access_say(E_("State: On"));
      }
    else
      {
+        // FIXME: to do animation during state change , we need different signal
+        // so that we can distinguish between state change by user or state change
+        // by calling state_change() api. Keep both the signal for backward compatibility
+        // and remove "elm,state,check,off" signal emission when we can break ABI.
+        elm_layout_signal_emit(obj, "elm,activate,check,off", "elm");
         elm_layout_signal_emit(obj, "elm,state,check,off", "elm");
         if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
              _elm_access_say(E_("State: Off"));