Re: [gtk-osx-users] checking for GDK quartz backend and Mac Integration
- From: John Ralls <jralls ceridwen us>
- To: Philip Chimento <philip chimento gmail com>
- Cc: gtk-osx-users-list gnome org
- Subject: Re: [gtk-osx-users] checking for GDK quartz backend and Mac Integration
- Date: Sat, 11 Feb 2012 09:22:30 -0800
On Feb 11, 2012, at 3:37 AM, Philip Chimento wrote:
> On Fri, Feb 10, 2012 at 20:24, John Ralls <jralls ceridwen us> wrote:
>>
>> On Feb 9, 2012, at 12:39 PM, Philip Chimento wrote:
>>>
>>> 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] http://live.gnome.org/GTK%2B/OSX/Integration#Documentation
>>
>> Please use the mailing list. I've CC'd my reply there for your convenience.
>
> Sure thing, I didn't think long enough to realize there was a mailing
> list. Sorry.
>
>> 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.
>
> Ok, then it's probably not worth it to even try to run
> GtkOSXApplication on X11. So that means GTK_CHECK_BACKEND for quartz
> is probably the best way to check whether to build with
> gtk-mac-integration. May I add that info to the wiki?
>
Of course, if you think it's appropriate.
Regards,
John Ralls
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]