After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353242 - Optionally disable Atk (--enable-api-atk=no)
Optionally disable Atk (--enable-api-atk=no)
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2006-08-28 13:33 UTC by Johannes Schmid
Modified: 2006-09-24 10:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gtkmm (9.33 KB, patch)
2006-08-28 13:34 UTC, Johannes Schmid
none Details | Review
Patch for glibmm (25.44 KB, patch)
2006-08-28 13:35 UTC, Johannes Schmid
none Details | Review
Updated patch for gtkmm which adds "--enable-optional-api" (10.48 KB, patch)
2006-08-30 12:52 UTC, Johannes Schmid
none Details | Review
Patch for gtkmm (10.78 KB, patch)
2006-09-14 15:44 UTC, Johannes Schmid
none Details | Review
Patch for glibmm (25.60 KB, patch)
2006-09-14 15:45 UTC, Johannes Schmid
none Details | Review
glibmm_noatkmm3.patch (28.49 KB, patch)
2006-09-19 19:19 UTC, Murray Cumming
none Details | Review
gtkmm_noatkmm3.patch (16.41 KB, patch)
2006-09-19 20:06 UTC, Murray Cumming
none Details | Review

Description Johannes Schmid 2006-08-28 13:33:37 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!
Comment 1 Johannes Schmid 2006-08-28 13:34:21 UTC
Created attachment 71771 [details] [review]
Patch for gtkmm
Comment 2 Johannes Schmid 2006-08-28 13:35:11 UTC
Created attachment 71772 [details] [review]
Patch for glibmm
Comment 3 Johannes Schmid 2006-08-30 12:52:12 UTC
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.
Comment 4 Murray Cumming 2006-09-10 11:31:22 UTC
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.
Comment 5 Johannes Schmid 2006-09-11 17:07:48 UTC
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
Comment 6 Murray Cumming 2006-09-11 17:28:55 UTC
I don't quite understand. Can you give me two alternative lines of code to choose from?
Comment 7 Johannes Schmid 2006-09-11 18:58:46 UTC
_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)
Comment 8 Murray Cumming 2006-09-11 19:06:25 UTC
_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.
Comment 9 Johannes Schmid 2006-09-14 15:44:09 UTC
Created attachment 72789 [details] [review]
Patch for gtkmm

This is the updated patch with migrates to the new glibmm ifdef feature.
Comment 10 Johannes Schmid 2006-09-14 15:45:17 UTC
Created attachment 72791 [details] [review]
Patch for glibmm

This patch adds a support for ifdefs to the parser of glibmm.
Comment 11 Murray Cumming 2006-09-19 19:19:41 UTC
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.
Comment 12 Murray Cumming 2006-09-19 19:22:14 UTC
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.
Comment 13 Johannes Schmid 2006-09-19 19:28:48 UTC
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
Comment 14 Murray Cumming 2006-09-19 20:04:05 UTC
No, I'm doing it now.
Comment 15 Murray Cumming 2006-09-19 20:06:53 UTC
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.
Comment 16 Murray Cumming 2006-09-19 20:44:29 UTC
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.
Comment 17 Murray Cumming 2006-09-24 10:52:29 UTC
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.