/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
//------------------------------------------------------------------------------
#include <dali/dali.h>
+#include <dali/devel-api/adaptor-framework/file-loader.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/builder/builder.h>
#include <dali-toolkit/devel-api/builder/tree-node.h>
std::time_t mLastTime;
std::string mstringPath;
- std::string GetFileContents(const std::string &fn)
+ std::string GetFileContents(const std::string &filename)
{
- std::ifstream t(fn.c_str());
- return std::string((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
+ std::streampos bufferSize = 0;
+ Dali::Vector<char> fileBuffer;
+ if( !Dali::FileLoader::ReadFile( filename, bufferSize, fileBuffer, FileLoader::FileType::BINARY ) )
+ {
+ return std::string();
+ }
+
+ return std::string( &fileBuffer[0], bufferSize );
};
};
if(!layer)
{
layer = Layer::New();
- layer.SetParentOrigin(ParentOrigin::CENTER);
- layer.SetAnchorPoint(AnchorPoint::CENTER);
- layer.SetSize( stage.GetRootLayer().GetCurrentSize() );
+ layer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ layer.SetSize( stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
stage.GetRootLayer().Add(layer);
// render tasks may have been setup last load so remove them
//
//
//------------------------------------------------------------------------------
-int main(int argc, char **argv)
+int DALI_EXPORT_API main(int argc, char **argv)
{
Application dali_app = Application::New(&argc, &argv, DEMO_THEME_PATH);