簡體   English   中英

Dali :: Timer TickSignal函數

[英]Dali::Timer TickSignal function

我想在tizen應用程序中使用計時器,每10秒就會收到一次信號。 我做了一些挖掘,發現有函數Dali :: Timer :: TickSignal(),但是我對如何使用該函數感到困惑? 任何人都可以提供簡短示例嗎?

頁面

TimerSignalType和Dali :: Timer :: TickSignal()

Signal emitted after specified time interval.

The return of the callback decides whether signal emission 
stops or continues. If the callback function returns false, emission will
 stop and if true, it will continue. This return value is ignored for 
one-shot events, which will always stop after the first execution.

Returns:
The signal to Connect() with
Since:
2.4, DALi version 1.0.0

您還可以在github.com中請求獲取示例: https : //github.com/search? q = TickSignal+tizen&type = Code&utf8 =% E2%9C%93

非常簡單,您只需添加控制器的回調函數,例如:

static Timer timer = Dali::Timer::New(10000);
timer.Start();
timer.TickSignal().Connect(this, &YourController::callbackFunction);

and callback function like:

bool callbackFunction(){

    return true;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM