mPanMinimumDistance(-1),
mPanMinimumEvents(-1),
mGlesCallTime(0),
+ mWindowWidth( 0 ),
+ mWindowHeight( 0 ),
mLogFunction( NULL )
{
}
return mPanMinimumEvents;
}
+unsigned int EnvironmentOptions::GetWindowWidth() const
+{
+ return mWindowWidth;
+}
+
+unsigned int EnvironmentOptions::GetWindowHeight() const
+{
+ return mWindowHeight;
+}
+
void EnvironmentOptions::SetPanGesturePredictionMode( unsigned int mode )
{
mPanGesturePredictionMode = mode;
return mGlesCallTime;
}
+void EnvironmentOptions::SetWindowWidth( int width )
+{
+ mWindowWidth = width;
+}
+
+void EnvironmentOptions::SetWindowHeight( int height )
+{
+ mWindowHeight = height;
+}
+
bool EnvironmentOptions::PerformanceServerRequired() const
{
return ( (GetPerformanceStatsLoggingOptions() > 0) ||
/**
* Contains environment options which define settings and the ability to install a log function.
+ *
+ * TODO: This file and adaptor needs cleaning up. There should not be any environment options in the adaptor class, only here!
*/
class EnvironmentOptions
{
int GetMinimumPanEvents() const;
/**
+ * @return The width of the window
+ */
+ unsigned int GetWindowWidth() const;
+
+ /**
+ * @return The height of the window
+ */
+ unsigned int GetWindowHeight() const;
+
+ /**
* @brief Sets the mode used to predict pan gesture movement
*
* @param[in] mode The prediction mode to use
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;
int mPanGestureMaxPredictionAmount; ///< maximum prediction amount for pan gestures
int mPanGestureMinPredictionAmount; ///< minimum prediction amount for pan gestures
int mPanGesturePredictionAmountAdjustment; ///< adjustment of prediction amount for pan gestures
- int mPanGestureSmoothingMode; ///< prediction mode for pan gestures
- float mPanGestureSmoothingAmount; ///< prediction amount for pan gestures
+ int mPanGestureSmoothingMode; ///< prediction mode for pan gestures
+ float mPanGestureSmoothingAmount; ///< prediction amount for pan gestures
int mPanMinimumDistance; ///< minimum distance required before pan starts
int mPanMinimumEvents; ///< minimum events required before pan starts
int mGlesCallTime; ///< time in seconds between status updates
+ unsigned int mWindowWidth; ///< width of the window
+ unsigned int mWindowHeight; ///< height of the window
Dali::Integration::Log::LogFunction mLogFunction;
mEnvironmentOptions.SetGlesCallTime( glesCallTime );
}
+ int windowWidth(0), windowHeight(0);
+ if ( GetIntegerEnvironmentVariable( DALI_WINDOW_WIDTH, windowWidth ) && GetIntegerEnvironmentVariable( DALI_WINDOW_HEIGHT, windowHeight ) )
+ {
+ mEnvironmentOptions.SetWindowWidth( windowWidth );
+ mEnvironmentOptions.SetWindowHeight( windowHeight );
+ }
+
mEnvironmentOptions.InstallLogFunction();
}
{
Integration::SetPanGestureSmoothingAmount(mEnvironmentOptions.GetPanGestureSmoothingAmount());
}
+ if( mEnvironmentOptions.GetWindowWidth() && mEnvironmentOptions.GetWindowHeight() )
+ {
+ SurfaceResized( PositionSize( 0, 0, mEnvironmentOptions.GetWindowWidth(), mEnvironmentOptions.GetWindowHeight() ));
+ }
}
Adaptor::~Adaptor()