void Application::OnPause()
{
- DoPause();
+ // A DALi app should handle Pause/Resume events.
+ // DALi just delivers the framework Pause event to the application, but not actually pause DALi core.
+ // Pausing DALi core only occurs on the Window Hidden framework event
Dali::Application application(this);
mPauseSignal.Emit( application );
}
// This ensures we do not just redraw the last frame before pausing if that's not required
Dali::Application application(this);
mResumeSignal.Emit( application );
- DoResume();
+
+ // DALi just delivers the framework Resume event to the application.
+ // Resuming DALi core only occurs on the Window Show framework event
}
void Application::OnReset()
/*
- * 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.
if( singleton )
{
DALI_LOG_SINGLETON_SERVICE( Debug::General, "Singleton Added: %s\n", info.name() );
- mSingletonContainer.insert( SingletonPair( info.name(), singleton ) );
+ mSingletonContainer.push_back( SingletonPair( info.name(), singleton ) );
}
}
{
BaseHandle object;
- SingletonConstIter iter = mSingletonContainer.find(info.name());
- if( iter != mSingletonContainer.end() )
+ const SingletonContainer::const_iterator end = mSingletonContainer.end();
+ for( SingletonContainer::const_iterator iter = mSingletonContainer.begin(); iter != end; ++iter )
{
- object = ( *iter ).second;
+ // comparing the addresses as these are allocated statically per library
+ if( ( *iter ).first == info.name() )
+ {
+ object = ( *iter ).second;
+ }
}
return object;
#define __DALI_INTERNAL_SINGLETON_SERVICE_H__
/*
- * 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.
// EXTERNAL INCLUDES
#include <dali/public-api/object/base-object.h>
-#include <dali/devel-api/common/map-wrapper.h>
+#include <dali/public-api/common/vector-wrapper.h>
// INTERNAL INCLUDES
#include <singleton-service.h>
private:
- typedef std::pair<std::string, BaseHandle> SingletonPair;
- typedef std::map<std::string, BaseHandle> SingletonContainer;
+ // using the address of the type name string as compiler will allocate these once per library
+ // and we don't support un/re-loading of dali libraries while singleton service is alive
+ typedef std::pair< const char*, BaseHandle> SingletonPair;
+ typedef std::vector< SingletonPair > SingletonContainer;
typedef SingletonContainer::const_iterator SingletonConstIter;
SingletonContainer mSingletonContainer; ///< The container to look up singleton by its type name
mDisplay = ecore_wl_display_get();
- wl_display* displayWrapper = static_cast< wl_display* >( wl_proxy_create_wrapper( mDisplay ) );
- if( displayWrapper )
+ if( mDisplay )
{
- mEventQueue = wl_display_create_queue( mDisplay );
- if( mEventQueue )
+ wl_display* displayWrapper = static_cast< wl_display* >( wl_proxy_create_wrapper( mDisplay ) );
+ if( displayWrapper )
{
- wl_proxy_set_queue( reinterpret_cast< wl_proxy* >( displayWrapper ), mEventQueue );
+ mEventQueue = wl_display_create_queue( mDisplay );
+ if( mEventQueue )
+ {
+ wl_proxy_set_queue( reinterpret_cast< wl_proxy* >( displayWrapper ), mEventQueue );
- wl_registry* registry = wl_display_get_registry( displayWrapper );
- wl_registry_add_listener( registry, &mRegistryListener, this );
- }
+ wl_registry* registry = wl_display_get_registry( displayWrapper );
+ wl_registry_add_listener( registry, &mRegistryListener, this );
+ }
- wl_proxy_wrapper_destroy( displayWrapper );
+ wl_proxy_wrapper_destroy( displayWrapper );
+ }
}
}
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 41;
+const unsigned int ADAPTOR_MICRO_VERSION = 42;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
dali-core
dali-adaptor
ecore
+ ecore-x
)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb --coverage -Wall -Werror")
Name: dali-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.2.41
+Version: 1.2.42
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT
FcInitReinitialize(); // FcInitBringUptoDate did not seem to reload config file as was still getting old default font.
FcPattern* matchPattern = FcPatternCreate();
- FcConfigSubstitute(NULL, matchPattern, FcMatchPattern);
- FcDefaultSubstitute( matchPattern );
- MatchFontDescriptionToPattern( matchPattern, mDefaultFontDescription );
- FcPatternDestroy( matchPattern );
+ if( matchPattern )
+ {
+ FcConfigSubstitute( NULL, matchPattern, FcMatchPattern );
+ FcDefaultSubstitute( matchPattern );
+
+ MatchFontDescriptionToPattern( matchPattern, mDefaultFontDescription );
+ FcPatternDestroy( matchPattern );
+ }
mDefaultFontDescriptionCached = true;
}