Re: [gtk-osx-users] checking for GDK quartz backend and Mac Integration

On Feb 9, 2012, at 12:39 PM, Philip Chimento wrote:

> Hi John,
> I was wondering about the best way to check whether to use GTK Mac
> Integration in a multi-platform application - the information here [1]
> is kind of outdated, because the --target pkg-config variable doesn't
> exist in GTK 3 anymore. It's now --targets and can be more than one
> backend, and comes with a GTK_CHECK_BACKEND macro to check it for you:
> GTK_CHECK_BACKEND([quartz], [3.0], [osx=yes], [osx=no])
> But wouldn't one want to build with Mac Integration even if the app is
> running on X11 in OS X, in order to get the native menu bar? So I
> thought maybe the best way to find out whether to build with Mac
> Integration would simply be to check whether it's installed and if so,
> build with it:
> PKG_CHECK_EXISTS([gtk-mac-integration], [PKG_CHECK_MODULES([GTK_MAC],
> [gtk-mac-integration])])
> But this wouldn't work if you wanted to make sure that Mac Integration
> was required on Mac. What would you suggest?
> [1]

Please use the mailing list. I've CC'd my reply there for your convenience.

I've never tried GtkOSXApplication with X11. I'd be worried about event-loop conflicts, but if it works, great.

Multiple backends are a bit of an issue with Quartz because there are different versions of a few files (gtkdnd-quartz.c, gtkclipboard-quartz.c, gtkstatusicon-quartz.c, and if you're using the quartz-integration branch, gtkselection-quartz.c) which are built in place of their non-quartz counterparts and don't have any backend-selection code. There hasn't been much interest in fixing this because mac and linux binaries are incompatible and we don't see why anyone would want to run in X11 if quartz is available -- and it's always available on a Mac.

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]