2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "environment-options.h"
30 EnvironmentOptions::EnvironmentOptions()
32 mUpdateStatusFrequency(0),
33 mPerformanceLoggingLevel(0),
34 mPanGestureLoggingLevel(0),
35 mPanGesturePredictionMode(-1),
36 mPanGesturePredictionAmount(-1.0f), ///< only sets value in pan gesture if greater than 0
37 mPanMinimumDistance(-1),
38 mPanMinimumEvents(-1),
43 EnvironmentOptions::~EnvironmentOptions()
47 void EnvironmentOptions::SetLogOptions( const Dali::Integration::Log::LogFunction& logFunction,
48 unsigned int logFrameRateFrequency,
49 unsigned int logupdateStatusFrequency,
50 unsigned int logPerformanceLevel,
51 unsigned int logPanGestureLevel )
53 mLogFunction = logFunction;
54 mFpsFrequency = logFrameRateFrequency;
55 mUpdateStatusFrequency = logupdateStatusFrequency;
56 mPerformanceLoggingLevel = logPerformanceLevel;
57 mPanGestureLoggingLevel = logPanGestureLevel;
60 void EnvironmentOptions::InstallLogFunction() const
62 Dali::Integration::Log::InstallLogFunction( mLogFunction );
65 void EnvironmentOptions::UnInstallLogFunction() const
67 Dali::Integration::Log::UninstallLogFunction();
70 unsigned int EnvironmentOptions::GetFrameRateLoggingFrequency() const
75 unsigned int EnvironmentOptions::GetUpdateStatusLoggingFrequency() const
77 return mUpdateStatusFrequency;
80 unsigned int EnvironmentOptions::GetPerformanceLoggingLevel() const
82 return mPerformanceLoggingLevel;
85 unsigned int EnvironmentOptions::GetPanGestureLoggingLevel() const
87 return mPanGestureLoggingLevel;
90 int EnvironmentOptions::GetPanGestureSmoothingMode() const
92 return mPanGesturePredictionMode;
95 float EnvironmentOptions::GetPanGesturePredictionAmount() const
97 return mPanGesturePredictionAmount;
100 int EnvironmentOptions::GetMinimumPanDistance() const
102 return mPanMinimumDistance;
105 int EnvironmentOptions::GetMinimumPanEvents() const
107 return mPanMinimumEvents;
110 void EnvironmentOptions::SetPanGesturePredictionMode(unsigned int mode)
112 mPanGesturePredictionMode = mode;
115 void EnvironmentOptions::SetPanGesturePredictionAmount(unsigned int amount)
117 mPanGesturePredictionAmount = amount;
120 void EnvironmentOptions::SetMinimumPanDistance( int distance )
122 mPanMinimumDistance = distance;
125 void EnvironmentOptions::SetMinimumPanEvents( int events )
127 mPanMinimumEvents = events;