Re: [Mac][clutter-gtk]Make it support osx backend
- From: Emmanuele Bassi <ebassi gmail com>
- To: cee1 <fykcee1 gmail com>
- Cc: "clutter-list gnome org" <clutter-list gnome org>
- Subject: Re: [Mac][clutter-gtk]Make it support osx backend
- Date: Fri, 6 Dec 2013 10:52:12 +0000
hi;
thanks for your patches.
Clutter uses Bugzilla for tracking contributions, bug reports, and
patches — for the clutter-gtk integration library you can use the
'clutter-gtk' product on the GNOME Bugzilla:
* https://bugzilla.gnome.org/browse.cgi?product=clutter-gtk
you can file a new bug by following this link:
* https://bugzilla.gnome.org/enter_bug.cgi?product=clutter-gtk
and attach your patches there. it's highly recommended for you to use
`git-bz`, which is available at:
* http://git.fishsoup.net/cgit/git-bz/
and makes filing bugs and submitting and applying patches to and from
bugzilla really easy.
as far as I can see from your patches, though, you only fixed the
event handling, but there's no embedding going on. GDK and Clutter
have no API to allow foreign NSView, which is the basic requirement to
allow Clutter to draw on a surface managed by GDK, and to allow
embedding GTK widgets inside that surface.
again, thanks for your patches, and I'll make sure to review them as
soon as possible once they are on Bugzilla.
ciao,
Emmanuele.
On 2 December 2013 08:19, cee1 <fykcee1 gmail com> wrote:
Hi all,
I'm trying to add some code to make clutter-gtk support osx
backend[1][2], but there's on clutter_osx_disable_event_retrieval in
clutter, I'm planning to implement it as win32 backend did -- set a
variable and check it in _clutter_backend_osx_events_init:
if (!_no_event_retrieval)
_clutter_osx_event_loop_init ();
Does the above make sense?
----
[1] The gdk backend doesn't work -- "Unable to initialize Clutter:
Could not find a suitable CoglWinsys for a GdkDisplay of type
GdkQuartzDisplay"
[2] Changes to make it support osx backend:
diff --git a/clutter-gtk/Makefile.am b/clutter-gtk/Makefile.am
index 9a35919..363e0ec 100644
--- a/clutter-gtk/Makefile.am
+++ b/clutter-gtk/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
-DCLUTTER_GTK_COMPILATION \
$(CLUTTER_GTK_DEPRECATED_CFLAGS) \
$(CLUTTER_GTK_DEBUG_CFLAGS) \
+ "-xobjective-c" \
$(NULL)
AM_CFLAGS = $(MAINTAINER_CFLAGS) $(CLUTTER_GTK_DEPS_CFLAGS)
diff --git a/clutter-gtk/gtk-clutter-util.c b/clutter-gtk/gtk-clutter-util.c
index d4a9fa5..e4fe061 100644
--- a/clutter-gtk/gtk-clutter-util.c
+++ b/clutter-gtk/gtk-clutter-util.c
@@ -23,6 +23,10 @@
#include <clutter/win32/clutter-win32.h>
#endif
+#if defined(CLUTTER_WINDOWING_OSX)
+#include <clutter/osx/clutter-osx.h>
+#endif
+
#if defined(GDK_WINDOWING_X11)
#include <gdk/gdkx.h>
#endif
@@ -31,6 +35,10 @@
#include <gdk/gdkwin32.h>
#endif
+#if defined(GDK_WINDOWING_QUARTZ)
+#include <gdk/gdkquartz.h>
+#endif
+
/**
* SECTION:gtk-clutter-util
* @Title: Utility Functions
@@ -96,6 +104,14 @@ post_parse_hook (GOptionContext *context,
}
else
#endif
+#if defined(GDK_WINDOWING_QUARTZ) && defined(CLUTTER_WINDOWING_OSX)
+ if (clutter_check_windowing_backend (CLUTTER_WINDOWING_OSX) &&
+ GDK_IS_QUARTZ_DISPLAY (display))
+ {
+ /* let GTK+ be in charge of the event handling */
+ }
+ else
+#endif
g_error ("*** Unsupported backend.");
/* this is required since parsing clutter's option group did not
--
Regards,
- cee1
_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]