button: Renamed internal variable of button smart data to match with
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 13 Apr 2014 03:43:41 +0000 (12:43 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Thu, 17 Apr 2014 16:26:01 +0000 (01:26 +0900)
actual API.

src/lib/elm_button.c
src/lib/elm_widget_button.h

index 5c489f5..8960c69 100644 (file)
@@ -212,7 +212,7 @@ _autorepeat_initial_send(void *data)
    ELM_SAFE_FREE(sd->timer, ecore_timer_del);
    sd->repeating = EINA_TRUE;
    _autorepeat_send(data);
-   sd->timer = ecore_timer_add(sd->ar_interval, _autorepeat_send, data);
+   sd->timer = ecore_timer_add(sd->ar_gap_timeout, _autorepeat_send, data);
 
    return ECORE_CALLBACK_CANCEL;
 }
@@ -227,11 +227,11 @@ _on_pressed_signal(void *data,
 
    if ((sd->autorepeat) && (!sd->repeating))
      {
-        if (sd->ar_threshold <= 0.0)
+        if (sd->ar_initial_timeout <= 0.0)
           _autorepeat_initial_send(data);  /* call immediately */
         else
           sd->timer = ecore_timer_add
-              (sd->ar_threshold, _autorepeat_initial_send, data);
+              (sd->ar_initial_timeout, _autorepeat_initial_send, data);
      }
 
    evas_object_smart_callback_call(data, SIG_PRESSED, NULL);
@@ -371,9 +371,9 @@ _elm_button_autorepeat_initial_timeout_set(Eo *obj, Elm_Button_Data *sd, double
         return;
      }
 
-   if (sd->ar_threshold == t) return;
+   if (sd->ar_initial_timeout == t) return;
    ELM_SAFE_FREE(sd->timer, ecore_timer_del);
-   sd->ar_threshold = t;
+   sd->ar_initial_timeout = t;
 }
 
 EOLIAN static double
@@ -382,7 +382,7 @@ _elm_button_autorepeat_initial_timeout_get(Eo *obj, Elm_Button_Data *sd)
    if (!_AR_CAPABLE(obj))
       return 0.0;
    else
-      return sd->ar_threshold;
+      return sd->ar_initial_timeout;
 }
 
 EOLIAN static void
@@ -394,16 +394,16 @@ _elm_button_autorepeat_gap_timeout_set(Eo *obj, Elm_Button_Data *sd, double t)
         return;
      }
 
-   if (sd->ar_interval == t) return;
+   if (sd->ar_gap_timeout == t) return;
 
-   sd->ar_interval = t;
+   sd->ar_gap_timeout = t;
    if ((sd->repeating) && (sd->timer)) ecore_timer_interval_set(sd->timer, t);
 }
 
 EOLIAN static double
 _elm_button_autorepeat_gap_timeout_get(Eo *obj EINA_UNUSED, Elm_Button_Data *sd)
 {
-   return sd->ar_interval;
+   return sd->ar_gap_timeout;
 }
 
 EOLIAN static Eina_Bool
index 1a121b3..0c5cb3a 100644 (file)
@@ -21,8 +21,8 @@
 typedef struct _Elm_Button_Data
 {
    /* auto-repeat stuff */
-   double                ar_threshold; /**< Time to wait until first auto-repeated click is generated */
-   double                ar_interval; /**< Time frame for subsequent auto-repeated clicks, after the first automatic one is triggerred */
+   double                ar_initial_timeout; /**< Time to wait until first auto-repeated click is generated */
+   double                ar_gap_timeout; /**< Time frame for subsequent auto-repeated clicks, after the first automatic one is triggerred */
 
    Ecore_Timer          *timer; /**< Internal timer object for auto-repeat behavior */