Internal::GetImplementation(*this).RenderOnce();
}
-Any OffscreenApplication::GetFrameworkContext() const
-{
- return Internal::GetImplementation(*this).GetFrameworkContext();
-}
-
OffscreenApplication::OffscreenApplicationSignalType& OffscreenApplication::InitSignal()
{
return Internal::GetImplementation(*this).InitSignal();
*/
void RenderOnce();
- /**
- * @brief Gets the context of the framwork
- * @return Platform dependent context handle
- */
- Any GetFrameworkContext() const;
-
public: // Signals
/**
* @brief Signal to notify the client when the application is ready to be initialized
return NOT_SUPPORTED;
}
-Any Framework::GetMainLoopContext() const
-{
- return nullptr;
-}
-
bool Framework::IsMainLoopRunning()
{
return mRunning;
virtual std::string GetRegion() const;
/**
- * Gets the context of the main loop
- * @return Platform dependent context handle
- */
- virtual Any GetMainLoopContext() const;
-
- /**
* Checks whether the main loop of the framework is running.
* @return true, if the main loop is running, false otherwise.
*/
{
namespace Adaptor
{
-thread_local GMainContext* gContext{nullptr};
+thread_local GMainLoop* gMainLoop{nullptr};
GMainContext* GetMainLoopContext()
{
- return gContext;
+ if(gMainLoop != nullptr)
+ {
+ return g_main_loop_get_context(gMainLoop);
+ }
+ return nullptr;
}
/**
// Constructor
Impl(void* data)
{
- gContext = mContext = g_main_context_new();
- mMainLoop = g_main_loop_new(mContext, false);
+ GMainContext* context = g_main_context_new();
+ gMainLoop = mMainLoop = g_main_loop_new(context, false);
}
~Impl()
{
g_main_loop_unref(mMainLoop);
- g_main_context_unref(mContext);
-
- gContext = nullptr;
+ gMainLoop = nullptr;
}
void Run()
mImpl->Quit();
}
-Any FrameworkGlib::GetMainLoopContext() const
-{
- return mImpl->mContext;
-}
-
} // namespace Adaptor
} // namespace Internal
*/
void Quit() override;
- /**
- * @copydoc Dali::Internal::Adaptor::Framework::GetMainLoopContext()
- */
- Any GetMainLoopContext() const override;
-
private:
// Undefined
FrameworkGlib(const FrameworkGlib&) = delete;
mAdaptor->RenderOnce();
}
-Any OffscreenApplication::GetFrameworkContext() const
-{
- return mFramework->GetMainLoopContext();
-}
-
void OffscreenApplication::OnInit()
{
// Start the adaptor
*/
void RenderOnce();
- /**
- * @copydoc Dali::OffscreenApplication::GetFrameworkContext()
- */
- Any GetFrameworkContext() const;
-
public: // Signals
/**
* @copydoc Dali::OffscreenApplication::InitSignal()