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 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.
23 #include <dali/devel-api/adaptor-framework/orientation.h>
37 * This creates a stubbed Orientation so that internal Toolkit Adaptor calls work.
38 * Furthermore, it provides an interface to see if certain methods were invoked.
40 class ToolkitOrientation
42 public: // Construction & Destruction
45 ~ToolkitOrientation();
49 Orientation GetHandle();
53 void SetDegrees( int degrees );
55 public: // Signal Emissions
57 void EmitChangedSignal();
59 public: // TEST FUNCTIONS
61 // Enumeration of Adaptor methods
71 mFunctionsCalled.Reset();
74 bool WasCalled(TestFuncEnum func)
78 case GetDegrees: return mFunctionsCalled.GetDegrees;
79 case GetRadians: return mFunctionsCalled.GetRadians;
80 case ChangedSignal: return mFunctionsCalled.ChangedSignal;
85 void ResetCallStatistics(TestFuncEnum func)
89 case GetDegrees: mFunctionsCalled.GetDegrees = false; break;
90 case GetRadians: mFunctionsCalled.GetRadians = false; break;
91 case ChangedSignal: mFunctionsCalled.ChangedSignal = false; break;
110 ChangedSignal = false;
118 TestFunctions mFunctionsCalled;
121 Internal::Adaptor::Orientation* mOrientationStub;
122 friend class Internal::Adaptor::Orientation;
123 Orientation mOrientation; // Hold a handle ourselves.
128 #endif // __DALI_TOOLKIT_TOOLKIT_ORIENTATION_H__