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.
25 #include <dali/public-api/adaptor-framework/common/orientation.h>
39 * This creates a stubbed Orientation so that internal Toolkit Adaptor calls work.
40 * Furthermore, it provides an interface to see if certain methods were invoked.
42 class ToolkitOrientation
44 public: // Construction & Destruction
47 ~ToolkitOrientation();
51 Orientation GetHandle();
55 void SetDegrees( int degrees );
57 public: // Signal Emissions
59 void EmitChangedSignal();
61 public: // TEST FUNCTIONS
63 // Enumeration of Adaptor methods
73 mFunctionsCalled.Reset();
76 bool WasCalled(TestFuncEnum func)
80 case GetDegrees: return mFunctionsCalled.GetDegrees;
81 case GetRadians: return mFunctionsCalled.GetRadians;
82 case ChangedSignal: return mFunctionsCalled.ChangedSignal;
87 void ResetCallStatistics(TestFuncEnum func)
91 case GetDegrees: mFunctionsCalled.GetDegrees = false; break;
92 case GetRadians: mFunctionsCalled.GetRadians = false; break;
93 case ChangedSignal: mFunctionsCalled.ChangedSignal = false; break;
112 ChangedSignal = false;
120 TestFunctions mFunctionsCalled;
123 Internal::Adaptor::Orientation* mOrientationStub;
124 friend class Internal::Adaptor::Orientation;
125 Orientation mOrientation; // Hold a handle ourselves.
130 #endif // __DALI_TOOLKIT_TOOLKIT_ORIENTATION_H__