EnvironmentOptions::EnvironmentOptions()
: mWindowName(),
+ mWindowClassName(),
mNetworkControl(0),
mFpsFrequency(0),
mUpdateStatusFrequency(0),
return mWindowHeight;
}
-void EnvironmentOptions::SetPanGesturePredictionMode( unsigned int mode )
-{
- mPanGesturePredictionMode = mode;
-}
-
-void EnvironmentOptions::SetPanGesturePredictionAmount( unsigned int amount )
-{
- mPanGesturePredictionAmount = amount;
-}
-
-void EnvironmentOptions::SetPanGestureMaximumPredictionAmount( unsigned int amount )
-{
- mPanGestureMaxPredictionAmount = amount;
-}
-
-void EnvironmentOptions::SetPanGestureMinimumPredictionAmount( unsigned int amount )
-{
- mPanGestureMinPredictionAmount = amount;
-}
-
-void EnvironmentOptions::SetPanGesturePredictionAmountAdjustment( unsigned int amount )
-{
- mPanGesturePredictionAmountAdjustment = amount;
-}
-
-void EnvironmentOptions::SetPanGestureSmoothingMode( unsigned int mode )
-{
- mPanGestureSmoothingMode = mode;
-}
-
-void EnvironmentOptions::SetPanGestureSmoothingAmount( float amount )
-{
- mPanGestureSmoothingAmount = amount;
-}
-
-void EnvironmentOptions::SetMinimumPanDistance( int distance )
-{
- mPanMinimumDistance = distance;
-}
-
-void EnvironmentOptions::SetMinimumPanEvents( int events )
-{
- mPanMinimumEvents = events;
-}
-
-void EnvironmentOptions::SetGlesCallTime( int time )
-{
- mGlesCallTime = time;
-}
-
int EnvironmentOptions::GetGlesCallTime() const
{
return mGlesCallTime;
}
-void EnvironmentOptions::SetWindowWidth( int width )
-{
- mWindowWidth = width;
-}
-
-void EnvironmentOptions::SetWindowHeight( int height )
-{
- mWindowHeight = height;
-}
-
-void EnvironmentOptions::SetWindowName( const char * name )
+const std::string& EnvironmentOptions::GetWindowName() const
{
- if ( name )
- {
- mWindowName = name;
- }
+ return mWindowName;
}
-const std::string& EnvironmentOptions::GetWindowName() const
+const std::string& EnvironmentOptions::GetWindowClassName() const
{
- return mWindowName;
+ return mWindowClassName;
}
bool EnvironmentOptions::PerformanceServerRequired() const
int predictionMode;
if( GetIntegerEnvironmentVariable(DALI_ENV_PAN_PREDICTION_MODE, predictionMode) )
{
- SetPanGesturePredictionMode(predictionMode);
+ mPanGesturePredictionMode = predictionMode;
}
int predictionAmount(-1);
if( GetIntegerEnvironmentVariable(DALI_ENV_PAN_PREDICTION_AMOUNT, predictionAmount) )
// do not support times in the past
predictionAmount = 0;
}
- SetPanGesturePredictionAmount(predictionAmount);
+ mPanGesturePredictionAmount = predictionAmount;
}
int minPredictionAmount(-1);
if( GetIntegerEnvironmentVariable(DALI_ENV_PAN_MIN_PREDICTION_AMOUNT, minPredictionAmount) )
// do not support times in the past
minPredictionAmount = 0;
}
- SetPanGestureMinimumPredictionAmount(minPredictionAmount);
+ mPanGestureMinPredictionAmount = minPredictionAmount;
}
int maxPredictionAmount(-1);
if( GetIntegerEnvironmentVariable(DALI_ENV_PAN_MAX_PREDICTION_AMOUNT, maxPredictionAmount) )
// maximum amount should not be smaller than minimum amount
maxPredictionAmount = minPredictionAmount;
}
- SetPanGestureMaximumPredictionAmount(maxPredictionAmount);
+ mPanGestureMaxPredictionAmount = maxPredictionAmount;
}
int predictionAmountAdjustment(-1);
if( GetIntegerEnvironmentVariable(DALI_ENV_PAN_PREDICTION_AMOUNT_ADJUSTMENT, predictionAmountAdjustment) )
// negative amount doesn't make sense
predictionAmountAdjustment = 0;
}
- SetPanGesturePredictionAmountAdjustment(predictionAmountAdjustment);
+ mPanGesturePredictionAmountAdjustment = predictionAmountAdjustment;
}
int smoothingMode;
if( GetIntegerEnvironmentVariable(DALI_ENV_PAN_SMOOTHING_MODE, smoothingMode) )
{
- SetPanGestureSmoothingMode(smoothingMode);
+ mPanGestureSmoothingMode = smoothingMode;
}
float smoothingAmount = 1.0f;
if( GetFloatEnvironmentVariable(DALI_ENV_PAN_SMOOTHING_AMOUNT, smoothingAmount) )
{
smoothingAmount = Clamp(smoothingAmount, 0.0f, 1.0f);
- SetPanGestureSmoothingAmount(smoothingAmount);
+ mPanGestureSmoothingAmount = smoothingAmount;
}
int minimumDistance(-1);
if ( GetIntegerEnvironmentVariable(DALI_ENV_PAN_MINIMUM_DISTANCE, minimumDistance ))
{
- SetMinimumPanDistance( minimumDistance );
+ mPanMinimumDistance = minimumDistance;
}
int minimumEvents(-1);
if ( GetIntegerEnvironmentVariable(DALI_ENV_PAN_MINIMUM_EVENTS, minimumEvents ))
{
- SetMinimumPanEvents( minimumEvents );
+ mPanMinimumEvents = minimumEvents;
}
int glesCallTime(0);
if ( GetIntegerEnvironmentVariable(DALI_GLES_CALL_TIME, glesCallTime ))
{
- SetGlesCallTime( glesCallTime );
+ mGlesCallTime = glesCallTime;
}
int windowWidth(0), windowHeight(0);
if ( GetIntegerEnvironmentVariable( DALI_WINDOW_WIDTH, windowWidth ) && GetIntegerEnvironmentVariable( DALI_WINDOW_HEIGHT, windowHeight ) )
{
- SetWindowWidth( windowWidth );
- SetWindowHeight( windowHeight );
+ mWindowWidth = windowWidth;
+ mWindowHeight = windowHeight;
}
- SetWindowName( GetCharEnvironmentVariable( DALI_WINDOW_NAME ) );
+ const char * windowName = GetCharEnvironmentVariable( DALI_WINDOW_NAME );
+ if ( windowName )
+ {
+ mWindowName = windowName;
+ }
+
+ const char * windowClassName = GetCharEnvironmentVariable( DALI_WINDOW_CLASS_NAME );
+ if ( windowClassName )
+ {
+ mWindowClassName = windowClassName;
+ }
}
} // Adaptor
int GetPanGestureMinimumPredictionAmount() const;
/**
+ * @brief Gets the prediction amount to adjust when the pan velocity is changed.
+ *
+ * If the pan velocity is accelerating, the prediction amount will be increased
+ * by the specified amount until it reaches the upper bound. If the pan velocity
+ * is decelerating, the prediction amount will be decreased by the specified
+ * amount until it reaches the lower bound.
+ *
* @return pan-gesture prediction amount adjustment
*/
int GetPanGesturePredictionAmountAdjustment() const;
unsigned int GetWindowHeight() const;
/**
- * @brief Sets the mode used to predict pan gesture movement
- *
- * @param[in] mode The prediction mode to use
- */
- void SetPanGesturePredictionMode( unsigned int mode );
-
- /**
- * @brief Sets the prediction amount of the pan gesture
- *
- * @param[in] amount The prediction amount in milliseconds
- */
- void SetPanGesturePredictionAmount( unsigned int amount );
-
- /**
- * @brief Sets the upper bound of the prediction amount for clamping
- *
- * @param[in] amount The prediction amount in milliseconds
- */
- void SetPanGestureMaximumPredictionAmount( unsigned int amount );
-
- /**
- * @brief Sets the lower bound of the prediction amount for clamping
- *
- * @param[in] amount The prediction amount in milliseconds
- */
- void SetPanGestureMinimumPredictionAmount( unsigned int amount );
-
- /**
- * @brief Sets the prediction amount to adjust when the pan velocity is changed.
- * If the pan velocity is accelerating, the prediction amount will be increased
- * by the specified amount until it reaches the upper bound. If the pan velocity
- * is decelerating, the prediction amount will be decreased by the specified
- * amount until it reaches the lower bound.
- *
- * @param[in] amount The prediction amount in milliseconds
- */
- void SetPanGesturePredictionAmountAdjustment( unsigned int amount );
-
- /**
- * @brief Called to set how pan gestures smooth input
- *
- * @param[in] mode The smoothing mode to use
- */
- void SetPanGestureSmoothingMode( unsigned int mode );
-
- /**
- * @brief Sets the mode used to smooth pan gesture movement properties calculated on the Update thread
- *
- * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing
- */
- void SetPanGestureSmoothingAmount( float amount );
-
- /**
- * @brief Sets the minimum distance required before a pan starts
- *
- * @param[in] distance The minimum distance before a pan starts
- */
- void SetMinimumPanDistance( int distance );
-
- /**
- * @brief Sets the minimum number of events required before a pan starts
- *
- * @param[in] events The minimum events before a pan starts
- */
- void SetMinimumPanEvents( int events );
-
- /**
- * @brief Sets how often the gles call logging occurs
- *
- * @param[in] time the number of seconds between logging output
- */
- void SetGlesCallTime( int time );
-
- /**
* @brief Get the graphics status time
*/
int GetGlesCallTime() const;
/**
- * @brief Sets the width of the window
- */
- void SetWindowWidth( int width );
-
- /**
- * @brief Sets the width of the window
- */
- void SetWindowHeight( int height );
-
- /**
* @return true if performance server is required
*/
bool PerformanceServerRequired() const;
/**
- * @brief Sets the window name.
+ * @return Gets the window name.
*/
- void SetWindowName( const char * name );
+ const std::string& GetWindowName() const;
/**
- * @return Gets the window name. NULL if not set
+ * @return Gets the window class.
*/
- const std::string& GetWindowName() const;
+ const std::string& GetWindowClassName() const;
private: // Internal
private: // Data
std::string mWindowName; ///< name of the window
+ std::string mWindowClassName; ///< name of the class the window belongs to
unsigned int mNetworkControl; ///< whether network control is enabled
unsigned int mFpsFrequency; ///< how often fps is logged out in seconds
unsigned int mUpdateStatusFrequency; ///< how often update status is logged out in frames