~mc-return/nux/nux.merge-fix-deprecated-warnings

« back to all changes in this revision

Viewing changes to Nux/WindowThread.cpp

* Refactoring Nux timer API: Some cleanup and update were required for the animation framework.. Fixes: . Approved by Jay Taoko.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
    _inside_main_loop = false;
106
106
    _inside_timer_loop = false;
107
107
    async_wake_up_signal_ = new TimerFunctor();
108
 
    async_wake_up_signal_->time_expires.connect(sigc::mem_fun(this, &WindowThread::AsyncWakeUpCallback));
 
108
    async_wake_up_signal_->tick.connect(sigc::mem_fun(this, &WindowThread::AsyncWakeUpCallback));
109
109
  }
110
110
 
111
111
  WindowThread::~WindowThread()
152
152
      return TimerHandle();
153
153
 
154
154
    // Use "this->" because if called from a different thread, GetTimer and GetWindowThread are invalid.
155
 
    TimerHandle handle = this->GetTimerHandler().AddTimerHandler(time_ms, timeout_signal, user_data, this);
 
155
    TimerHandle handle = this->GetTimerHandler().AddOneShotTimer(time_ms, timeout_signal, user_data, this);
156
156
 
157
157
    return handle;
158
158
  }
196
196
      if ((_inside_main_loop == false) && (_inside_timer_loop == false) && (_pending_wake_up_timer == false))
197
197
      {
198
198
        _pending_wake_up_timer = true;
199
 
        async_wake_up_timer_handle_ = this->GetTimerHandler().AddTimerHandler(0, async_wake_up_signal_, this);
 
199
        async_wake_up_timer_handle_ = this->GetTimerHandler().AddOneShotTimer(0, async_wake_up_signal_, this);
200
200
      }
201
201
    }
202
202
  }