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;
}
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);
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
if (!_AR_CAPABLE(obj))
return 0.0;
else
- return sd->ar_threshold;
+ return sd->ar_initial_timeout;
}
EOLIAN static void
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
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 */