Added UIThreadLoader to GLIB framework 25/298525/2
authorDavid Steele <david.steele@samsung.com>
Fri, 8 Sep 2023 08:54:28 +0000 (09:54 +0100)
committerDavid Steele <david.steele@samsung.com>
Mon, 11 Sep 2023 10:14:59 +0000 (11:14 +0100)
Using GLIB framework adaptor profile, when GLIB is the
ONLY framework, also need to implement UIThreadLoader.

Note, this should not be implemented when GLIB is being
used alongside other frameworks.

Change-Id: I0a677a4b4e15d7c95eada8a1fa75a207083aab47
Signed-off-by: David Steele <david.steele@samsung.com>
dali/internal/adaptor/glib/framework-glib.cpp

index dbcbbfc..d4af05d 100644 (file)
@@ -111,6 +111,56 @@ Any FrameworkGlib::GetMainLoopContext() const
   return mImpl->mContext;
 }
 
+// If the GLIB profile is being used on desktop, define the UIThreadLoader methods.
+// Note that it shouldn't be defined normally, as GLIB framework can be used in
+// conjunction with ECORE framework.
+#if defined(DALI_PROFILE_GLIB_X11)
+
+/**
+ * Impl for Pre-Initailized using UI Thread.
+ */
+struct UIThreadLoader::Impl
+{
+  // Constructor
+
+  Impl(void* data)
+  {
+  }
+
+  ~Impl()
+  {
+  }
+
+  void Run(Runner runner)
+  {
+  }
+
+private:
+  // Undefined
+  Impl(const Impl& impl);
+  Impl& operator=(const Impl& impl);
+};
+
+/**
+ * UI Thread loader to support Pre-Initailized using UI Thread.
+ */
+UIThreadLoader::UIThreadLoader(int* argc, char*** argv)
+: mArgc(argc),
+  mArgv(argv),
+  mImpl(nullptr)
+{
+}
+
+UIThreadLoader::~UIThreadLoader()
+{
+}
+
+void UIThreadLoader::Run(Runner runner)
+{
+}
+
+#endif
+
 } // namespace Adaptor
 
 } // namespace Internal