GNOME Bugzilla – Bug 353242
Optionally disable Atk (--enable-api-atk=no)
Last modified: 2006-09-24 10:52:29 UTC
This patch adds support for building Gtkmm without the ATK API. This is esspecially usefull on embedded platform like maemo because it reduces binary size. The patch also needs a patched version of glibmm which support the atk_only flag for methods, signals, vfuncs and interfaces. NOTE: Some of the examples which use ATK will not be build correctly if you use this option. The work on this patch was payed by Openismus Gmbh!
Created attachment 71771 [details] [review] Patch for gtkmm
Created attachment 71772 [details] [review] Patch for glibmm
Created attachment 71898 [details] [review] Updated patch for gtkmm which adds "--enable-optional-api" This patch additionally adds a "--enable-optional-api" option which automactily sets --enable-deprecated-api and --enable-api-atk. This is just for conviniece.
Thanks. Instead of this: _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_popup_accessible(), gtk_combo_box_get_popup_accessible, atk_only) I would prefer this: _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_popup_accessible(), gtk_combo_box_get_popup_accessible, ifdef GTKMM_ATKMM_API_DISABLED) That would be more generic so we might be able to use it for other things. You should be able to look at the optional "deprecated" option for a clue about how to get the extra argument. For instance, from WrapParser: elsif($argRef =~ /^deprecated(.*)/) #If deprecated is at the start. { $$objCfunc{deprecated} = "deprecated"; if($1 ne "") { $deprecation_docs = string_unquote(string_trim($1)); } } Note also that I'd prefer to use a GTKMM_ prefix for gtkmm. The use of an ATK_ prefix suggests that it was defined by ATK. If possible, I'd like to keep the --enable-optional-api changes in a separate patch.
Hi Murray! Both things are no real problem, I hope to get it ready by the end of the week. Do you want the "ifdef" in the wrap-command or would GTKMM_ATKMM_API_DISABLED alone be ok? Regards, Johannes
I don't quite understand. Can you give me two alternative lines of code to choose from?
_WRAP_METHOD(Glib::RefPtr<Atk::Object> get_popup_accessible(), gtk_combo_box_get_popup_accessible, ifdef GTKMM_ATKMM_API_DISABLED) or _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_popup_accessible(), gtk_combo_box_get_popup_accessible, GTKMM_ATKMM_API_DISABLED) (The second would avoid having to parse the "ifdef GTKMM_ATK_API_DISABLED" statement though that might be quite easy in perl)
_WRAP_METHOD(Glib::RefPtr<Atk::Object> get_popup_accessible(), gtk_combo_box_get_popup_accessible, ifdef GTKMM_ATKMM_API_DISABLED) please. That's the whole point of making it generic.
Created attachment 72789 [details] [review] Patch for gtkmm This is the updated patch with migrates to the new glibmm ifdef feature.
Created attachment 72791 [details] [review] Patch for glibmm This patch adds a support for ifdefs to the parser of glibmm.
Created attachment 73046 [details] [review] glibmm_noatkmm3.patch This patch - removes extra generated newlines (by adding dnl in the .m4 files), and - changes the generated ifndef to ifdef, to match how we are detecting other optional API. It's awkward for backwards compatibility (glibmm must be upgraded too), but it seems clearer to me. I have expanded the ChangeLog entry. Please try to be quite exact when describing what has changed. It is helpful for other people who might try to do something similar in future.
Oh, and do try to review your patches so you can ignore irrelevant changes. There was some stuff in your patch that changed the INCLUDES for the examples so that they did not build.
I assume I will have to update the patch to gtkmm to reflect your changes? I will try to add some more information to the ChangeLog in the future. Regards, Johannes
No, I'm doing it now.
Created attachment 73050 [details] [review] gtkmm_noatkmm3.patch - Changed ifndefs to ifdefs. - Removed strange changes to include paths. - Put some of the configure check in reduced.m4, replacing the not-used half-done macro that was already there.
Committed to gtkmm HEAD and gtkmm-2-12 branch, and glibmm HEAD, and glibmm-2-12 branch. I might commit it to other branches after it has proven itself in cvs for 2 days, and then I'll release some tarballs.
I have committed this to various branches and released new versions of glibmm 2.10, 2.12, and 2.13, and gtkmm 2.8 (using glibmm 2.10) and gtkmm 2.10.