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 567934 - Add introspection support inside pango
Add introspection support inside pango
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks: 568613 585444
 
 
Reported: 2009-01-16 00:51 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2009-06-11 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
v1 (12.14 KB, patch)
2009-01-16 00:53 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review
v2 (13.58 KB, patch)
2009-01-16 12:27 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review

Description Johan (not receiving bugmail) Dahlin 2009-01-16 00:51:58 UTC
The introspection framework is getting mature, we should include gir/typelib generation/installation directly into Pango.
Comment 1 Johan (not receiving bugmail) Dahlin 2009-01-16 00:53:53 UTC
Created attachment 126548 [details] [review]
v1

Adds gir generation and typelib compilation.
I also added a HarfBuzz-1.0.gir, which should be treated internal to pangoft2.
Perhaps it would be even better to just skip gir generation for pangoft2, dunno.
There's a couple of annotation examples included in this. I didn't annotate the whole API, just the simple list cases I found.
Comment 2 Behdad Esfahbod 2009-01-16 01:09:52 UTC
Humm, why do you need the HarfBuzz.gir again?

I think we should just do this for pangocairo.  Unless you guys are going to bind Xft, FreeType, Xlib, etc...
Comment 3 Johan (not receiving bugmail) Dahlin 2009-01-16 01:30:41 UTC
HarfBuzz is needed because some of the APIs inside PangoFT2 requires the types from within there. We've tradtionally solved that kind of problem by creating new girs a lá HarfBuzz-1.0.gir. 

Eg, gobject-introspection already includes similar stub girs for cairo/xft/freetype/xlib. Some of them are used by other libraries as well.

But yes, it's basically a hack to get things going.
Are there any applications out there actually using PangoX / PangoXft / PangoFT2?
If not, let's just skip gir generation for them.
Comment 4 Behdad Esfahbod 2009-01-16 03:48:38 UTC
(In reply to comment #3)
> HarfBuzz is needed because some of the APIs inside PangoFT2 requires the types
> from within there.

No public API though.  Don't you just scan public API?

> We've tradtionally solved that kind of problem by creating
> new girs a lá HarfBuzz-1.0.gir. 
> 
> Eg, gobject-introspection already includes similar stub girs for
> cairo/xft/freetype/xlib. Some of them are used by other libraries as well.
> 
> But yes, it's basically a hack to get things going.
> Are there any applications out there actually using PangoX / PangoXft /
> PangoFT2?
> If not, let's just skip gir generation for them.

Well, there are definitely apps still using PangoFT2 (the GIMP for example), and possibly PangoXft.  None that I know of expose API dealing with those two though.
Comment 5 Johan (not receiving bugmail) Dahlin 2009-01-16 12:27:53 UTC
Created attachment 126575 [details] [review]
v2

Scans a little bit less in terms of public headers and their sources.
Removed HarfBuzz-1.0.gir.
I also added -Wno-portability to configure.in with a comment explaining why.
Comment 6 Behdad Esfahbod 2009-01-19 19:35:07 UTC
Johan, go ahead and commit please!  I'll roll a tarball later.
Comment 7 Johan (not receiving bugmail) Dahlin 2009-01-20 22:39:00 UTC
Thanks! Committed:

2009-01-20  Johan Dahlin  <jdahlin@async.com.br>

    Bug 567934 – Add introspection support inside pango

    * configure.in:
    * pango/Makefile.am:
    * pango/pango-attributes.c:
    * pango/pango-layout.c:

Remember that it depends on an unreleased version (0.6.2) of gobject-introspection so you might want to wait for me to release that first.