1 #ifndef DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H
2 #define DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #define DALI_EVENT_THREAD_CALLBACK_H
23 #include <dali-toolkit/public-api/dali-toolkit-common.h>
24 #include <dali/public-api/signals/callback.h>
29 class DALI_TOOLKIT_API EventThreadCallback
33 EventThreadCallback( CallbackBase* callback );
35 ~EventThreadCallback();
39 bool WaitingForTrigger();
41 CallbackBase* GetCallback();
45 // undefined copy constructor.
46 EventThreadCallback( const EventThreadCallback& );
48 // undefined assignment operator
49 EventThreadCallback& operator=( const EventThreadCallback& );
63 * Wait for the tested code to create an event trigger, then
64 * wait for triggerCount Trigger calls to occur, and execute the trigger
65 * callback afterwards.
67 * Will wait for a maximum of 30s before failing the test and returning.
69 bool WaitForEventThreadTrigger( int triggerCount, int timeoutInSeconds=30 );
74 #endif // DALI_TOOLKIT_EVENT_THREAD_CALLBACK_H