// EXTERNAL INCLUDES
#include <algorithm>
-#include <sstream>
-#include <unistd.h>
#include <dali/devel-api/images/distance-field.h>
#include <dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h>
#include <dali-toolkit/devel-api/shader-effects/distance-field-effect.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
// INTERNAL INCLUDES
-#include "shared/view.h"
+#include "shared/execute-process.h"
#include "shared/utility.h"
+#include "shared/view.h"
using namespace Dali;
using namespace Dali::Toolkit;
ApplyCubeEffectToPages();
Dali::Window winHandle = application.GetWindow();
- winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT );
- winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE );
- winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE );
- winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE );
+
+ if( stageSize.width <= stageSize.height )
+ {
+ winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT );
+ winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE );
+ winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE );
+ winHandle.RemoveAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE );
+ }
+ else
+ {
+ winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE );
+ winHandle.RemoveAvailableOrientation( Dali::Window::PORTRAIT );
+ winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE );
+ winHandle.RemoveAvailableOrientation( Dali::Window::PORTRAIT_INVERSE );
+ }
// Set initial orientation
unsigned int degrees = 0;
{
std::string name = mPressedActor.GetName();
- std::stringstream stream;
- stream << DEMO_EXAMPLE_BIN << name.c_str();
- pid_t pid = fork();
- if( pid == 0)
- {
- execlp( stream.str().c_str(), name.c_str(), NULL );
- DALI_ASSERT_ALWAYS(false && "exec failed!");
- }
+ ExecuteProcess( name );
+
mPressedActor.Reset();
}
}