1 #ifndef __DALI_TOOLKIT_TOOLKIT_ORIENTATION_H__
2 #define __DALI_TOOLKIT_TOOLKIT_ORIENTATION_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
24 #include <dali/public-api/adaptor-framework/common/orientation.h>
38 * This creates a stubbed Orientation so that internal Toolkit Adaptor calls work.
39 * Furthermore, it provides an interface to see if certain methods were invoked.
41 class ToolkitOrientation
43 public: // Construction & Destruction
46 ~ToolkitOrientation();
50 Orientation GetHandle();
54 void SetDegrees( int degrees );
56 public: // Signal Emissions
58 void EmitChangedSignal();
60 public: // TEST FUNCTIONS
62 // Enumeration of Adaptor methods
72 mFunctionsCalled.Reset();
75 bool WasCalled(TestFuncEnum func)
79 case GetDegrees: return mFunctionsCalled.GetDegrees;
80 case GetRadians: return mFunctionsCalled.GetRadians;
81 case ChangedSignal: return mFunctionsCalled.ChangedSignal;
86 void ResetCallStatistics(TestFuncEnum func)
90 case GetDegrees: mFunctionsCalled.GetDegrees = false; break;
91 case GetRadians: mFunctionsCalled.GetRadians = false; break;
92 case ChangedSignal: mFunctionsCalled.ChangedSignal = false; break;
111 ChangedSignal = false;
119 TestFunctions mFunctionsCalled;
122 Internal::Adaptor::Orientation* mOrientationStub;
123 friend class Internal::Adaptor::Orientation;
124 Orientation mOrientation; // Hold a handle ourselves.
129 #endif // __DALI_TOOLKIT_TOOLKIT_ORIENTATION_H__