Пример #1
0
static void
_input_panel_hide(Ecore_IMF_Context *ctx, Eina_Bool instant)
{
   if (instant || (_hide_timer && ecore_timer_pending_get(_hide_timer) <= 0.0))
     {
        _clear_hide_timer();
        _send_input_panel_hide_request(ctx);
     }
   else
     {
        _input_panel_hide_timer_start(ctx);
     }
}
Пример #2
0
/**
 * @brief Set a timeout to disconnect after no activity
 * @param e The #Esql object (NOT NULL)
 * @param timeout The timeout in seconds
 *
 * Use this function to apply a timer policy to an Esql object and force disconnection
 * after @p timeout seconds of inactivity.
 * @note Setting a value <= 0 will disable this feature.
 */
void
esql_connect_timeout_set(Esql  *e,
                         double timeout)
{
   EINA_SAFETY_ON_NULL_RETURN(e);

   e->timeout = timeout;
   if (e->pool)
     {
        esql_pool_connect_timeout_set((Esql_Pool*)e, timeout);
        return;
     }
   if (timeout > 0.0)
     {
        if (e->timeout_timer) ecore_timer_delay(e->timeout_timer, e->timeout - ecore_timer_pending_get(e->timeout_timer));
        else e->timeout_timer = ecore_timer_add(timeout, (Ecore_Task_Cb)esql_timeout_cb, e);
     }
   else
     {
        ecore_timer_del(e->timeout_timer);
        e->timeout_timer = NULL;
        e->timeout = 0;
     }
}
Пример #3
0
double Timer::getPending ()
{
  return ecore_timer_pending_get (mETimer);
}