Mac OS X Integration
Integration
Even though regular GTK+ applications work on the Mac, it is nice to be able to integrate with the native desktop and make it feel more like a Mac application. The integration library provided here will help you with that.
Status
The library is work in progress and is not API stable yet. Please try it out in your app and let us know what you are missing.
Note that if you are running GTK+ 2.12.x you should use ige-mac-integration 0.7. If you have a newer GTK+ version, you need to use ige-mac-integration 0.8 or later.
Get it
The latest source tarball is available here. There is also a git repository if you want the bleeding edge:
git clone git://git.imendio.com/projects/ige-mac-integration.git
Documentation
Documentation is on its way. Here is a simple example for setting up the menu bar:
ige_mac_menu_install_key_handler (); /* only for version 0.8 and later */ ige_mac_menu_set_menu_bar (GTK_MENU_SHELL (menubar));
What this does is, hooking up the menu bar created normally in your application, and syncronizing it with the global Mac menu bar. Changes to the GTK+ menu will be reflected in the Mac menu. To make the menu structure feel more native, you can rearrange menu items a bit:
ige_mac_menu_set_quit_menu_item (GTK_MENU_ITEM (quit_item)); group = ige_mac_menu_add_app_menu_group (); ige_mac_menu_add_app_menu_item (group, GTK_MENU_ITEM (about_item), NULL); group = ige_mac_menu_add_app_menu_group (); ige_mac_menu_add_app_menu_item (group, GTK_MENU_ITEM (preferences_item), NULL);
This moves the Quit, About, and Preferences items to the application menu, where most Mac applications put those.
For more examples, see the code in the source, test-integration.c. In addition the the menu bar integration, the API currently contains some hooks for the dock, and application bundles.
Older version
This package replaces the older sync-menu package, that can still be found here.
