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 640574 - atk is missing annotations needed for gobject-introspection
atk is missing annotations needed for gobject-introspection
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
git master
Other Linux
: High critical
: ---
Assigned To: Li Yuan
Li Yuan
: 635798 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-25 20:29 UTC by Mike Gorse
Modified: 2011-03-01 20:06 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
Proposed patch. (23.15 KB, patch)
2011-01-25 20:53 UTC, Mike Gorse
committed Details | Review
Patch to generate introspection for atk_text_get_bounded_ranges. (2.43 KB, patch)
2011-02-22 17:40 UTC, Mike Gorse
committed Details | Review

Description Mike Gorse 2011-01-25 20:29:03 UTC
g-ir-scanner has trouble creating a gir for atk because it is missing some annotations (functions that return GObjects need transfer: annotations, and there are a few minor documentation issues).
Comment 1 Mike Gorse 2011-01-25 20:53:44 UTC
Created attachment 179323 [details] [review]
Proposed patch.

This fixes most but not all of the issues.  I believe the callback-related warnings will require an API change to be gobject-introspection-compatible, so we may need to wait until after the proposed ATk/AT-SPI hackfest when we break API.  atk_text_get_bounded_ranges will also still not work with introspection, but the atk free function seems buggy, and I am not even sure how it is supposed to work or if anyone implements it (GAIL apparently does not).
Comment 2 André Klapper 2011-01-25 21:46:34 UTC
[Setting GNOME Target to 3.0 as atk is in jhbuild's gnome-suites-core-deps-3.0.]
Comment 3 Li Yuan 2011-01-26 04:18:38 UTC
Maybe we want to add this bug to bug 638537?
Comment 4 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-01-26 08:10:16 UTC
(In reply to comment #0)
> g-ir-scanner has trouble creating a gir for atk because it is missing some
> annotations (functions that return GObjects need transfer: annotations, and
> there are a few minor documentation issues).

IMHO this is a duplicate of bug 635798

(In reply to comment #3)
> Maybe we want to add this bug to bug 638537?

The purpose of this bug is improve ATK adding/removing API, without the concern of any API breakage (so an ATK 2.0 would be an option). IMHO, annotations is required independently of this.
Comment 5 Li Yuan 2011-01-26 08:43:51 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Maybe we want to add this bug to bug 638537?
> 
> The purpose of this bug is improve ATK adding/removing API, without the concern
> of any API breakage (so an ATK 2.0 would be an option). IMHO, annotations is
> required independently of this.

Mike said 
"This fixes most but not all of the issues.  I believe the callback-related
warnings will require an API change to be gobject-introspection-compatible, so
we may need to wait until after the proposed ATk/AT-SPI hackfest when we break
API."

So I thought to complete fix this bug, an API change is needed.
Comment 6 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-01-26 09:18:04 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Maybe we want to add this bug to bug 638537?
> > 
> > The purpose of this bug is improve ATK adding/removing API, without the concern
> > of any API breakage (so an ATK 2.0 would be an option). IMHO, annotations is
> > required independently of this.
> 
> Mike said 
> "This fixes most but not all of the issues.  I believe the callback-related
> warnings will require an API change to be gobject-introspection-compatible, so
> we may need to wait until after the proposed ATk/AT-SPI hackfest when we break
> API."
> 
> So I thought to complete fix this bug, an API change is needed.

Ok, sorry I missed that comment. Yes it is true that probably any API change would be required for a full gobject introspection support (ie, on Cally, this change was required [1]).

Anyway, in the same way it would be good that have as much gobject introspection as possible in the current atk 1.0.

So I think that makes sense to apply this patch on atk 1.0 (as it is just about the annotations), and create a new bug to track the changes required for a fully supported gobject introspection. Something like "ATK API changes required to became atk fully introspectable".

Opinions?

[1] http://bugzilla.clutter-project.org/show_bug.cgi?id=2479
Comment 7 Li Yuan 2011-01-26 09:27:49 UTC
Sure!

(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (In reply to comment #3)
> > > > Maybe we want to add this bug to bug 638537?
> > > 
> > > The purpose of this bug is improve ATK adding/removing API, without the concern
> > > of any API breakage (so an ATK 2.0 would be an option). IMHO, annotations is
> > > required independently of this.
> > 
> > Mike said 
> > "This fixes most but not all of the issues.  I believe the callback-related
> > warnings will require an API change to be gobject-introspection-compatible, so
> > we may need to wait until after the proposed ATk/AT-SPI hackfest when we break
> > API."
> > 
> > So I thought to complete fix this bug, an API change is needed.
> 
> Ok, sorry I missed that comment. Yes it is true that probably any API change
> would be required for a full gobject introspection support (ie, on Cally, this
> change was required [1]).
> 
> Anyway, in the same way it would be good that have as much gobject
> introspection as possible in the current atk 1.0.
> 
> So I think that makes sense to apply this patch on atk 1.0 (as it is just about
> the annotations), and create a new bug to track the changes required for a
> fully supported gobject introspection. Something like "ATK API changes required
> to became atk fully introspectable".
> 
> Opinions?
> 
> [1] http://bugzilla.clutter-project.org/show_bug.cgi?id=2479
Comment 8 Li Yuan 2011-01-26 09:28:26 UTC
Review of attachment 179323 [details] [review]:

Feel free to commit the patch.
Comment 9 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-01-26 09:58:02 UTC
*** Bug 635798 has been marked as a duplicate of this bug. ***
Comment 10 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-01-26 10:21:13 UTC
(In reply to comment #7)
> Sure!

Bug 640625 created to track the changes that would require API breakage for a full gobject introspection support.
Comment 11 Mike Gorse 2011-02-22 17:40:02 UTC
Created attachment 181607 [details] [review]
Patch to generate introspection for atk_text_get_bounded_ranges.

I also fixed a typo and what looks like a bug in atk_text_free_ranges; I'm guessing that function has never been tested because GAIL doesn't implement atk_text_get_bounded_ranges.
Comment 12 Li Yuan 2011-02-25 04:46:33 UTC
Review of attachment 181607 [details] [review]:

I am OK with the patch. Does it break API? I am not sure since it adds a get_type function in the header file.
Comment 13 Alejandro Piñeiro Iglesias (IRC: infapi00) 2011-02-25 11:16:07 UTC
Well, after a quick check, it is an addition so no current API is affected.

(In the same way it is not a new virtual method on a class structure, so it is not also a ABI break).

IMHO, this doesn't break the API.

BTW, just a question, there are two patches reviewed. Are both waiting to be applied or it is just the last one?
Comment 14 Mike Gorse 2011-02-25 16:44:04 UTC
I've just committed the AtkTextRange patch.  I committed the other patch a while ago.
Comment 15 Matthias Clasen 2011-03-01 19:37:31 UTC
Anything left to do here, or should this be closed ?
Comment 16 Mike Gorse 2011-03-01 20:06:17 UTC
Yeah; should be closed.  I thought I'd done that already.  Thanks.