return true;
}
+const char * GetCharEnvironmentVariable( const char * variable )
+{
+ return std::getenv( variable );
}
+
+} // unnamed namespace
+
EnvironmentOptions::EnvironmentOptions()
-: mNetworkControl(0),
+: mWindowName(),
+ mNetworkControl(0),
mFpsFrequency(0),
mUpdateStatusFrequency(0),
mPerformanceStatsLevel(0),
mWindowHeight = height;
}
+void EnvironmentOptions::SetWindowName( const char * name )
+{
+ if ( name )
+ {
+ mWindowName = name;
+ }
+}
+
+const std::string& EnvironmentOptions::GetWindowName() const
+{
+ return mWindowName;
+}
+
bool EnvironmentOptions::PerformanceServerRequired() const
{
return ( (GetPerformanceStatsLoggingOptions() > 0) ||
SetWindowHeight( windowHeight );
}
+ SetWindowName( GetCharEnvironmentVariable( DALI_WINDOW_NAME ) );
}
} // Adaptor
*/
bool PerformanceServerRequired() const;
+ /**
+ * @brief Sets the window name.
+ */
+ void SetWindowName( const char * name );
+
+ /**
+ * @return Gets the window name. NULL if not set
+ */
+ const std::string& GetWindowName() const;
+
private: // Internal
/**
private: // Data
+ std::string mWindowName; ///< name of the window
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
#define DALI_WINDOW_HEIGHT "DALI_WINDOW_HEIGHT"
+#define DALI_WINDOW_NAME "DALI_WINDOW_NAME"
+
} // namespace Adaptor
} // namespace Internal
mInitialized( false ),
mSlotDelegate( this )
{
- // Copy mName from command-line args
- if( argc && ( *argc > 0 ) )
+ // Get mName from environment options
+ mName = mEnvironmentOptions.GetWindowName();
+ if( mName.empty() && argc && ( *argc > 0 ) )
{
+ // Set mName from command-line args if environment option not set
mName = (*argv)[0];
}