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 91509 - missing wrappers in pangomm
missing wrappers in pangomm
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other other
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-08-23 11:06 UTC by Martin Schulze
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Some corrections in members.m4 and reorganisation of convert_pango.m4 that goes along with the following patches. (9.64 KB, patch)
2002-08-23 11:08 UTC, Martin Schulze
none Details | Review
New wrappers: simple data types collected from pango/pango-types.h and other files. (20.00 KB, application/octet-stream)
2002-08-23 11:09 UTC, Martin Schulze
  Details
New wrappers: Pango::Item, Pango::Analysis (10.00 KB, application/octet-stream)
2002-08-23 11:10 UTC, Martin Schulze
  Details
New wrappers: Pango::Glyph* (20.00 KB, application/octet-stream)
2002-08-23 11:11 UTC, Martin Schulze
  Details
New wrappers: Pango::Attribute, Pango::Attr*, Pango::AttrIter (40.00 KB, application/octet-stream)
2002-08-23 11:12 UTC, Martin Schulze
  Details
Reflect the changes in other existing files. (18.46 KB, patch)
2002-08-23 11:13 UTC, Martin Schulze
none Details | Review
pangomm-rectangle.tar: Add new wrapper Pango::Rectangle. (10.00 KB, application/octet-stream)
2002-08-23 19:12 UTC, Martin Schulze
  Details
pangomm-language.tar: Add new wrapper Pango::Language. (10.00 KB, application/octet-stream)
2002-08-23 19:12 UTC, Martin Schulze
  Details
pangomm-color.tar: Add new wrapper Pango::Color. (10.00 KB, application/octet-stream)
2002-08-23 19:16 UTC, Martin Schulze
  Details
pangomm-item.tar: Add new wrappers Pango::Analysis, Pango::Item (10.00 KB, application/octet-stream)
2002-08-23 19:17 UTC, Martin Schulze
  Details
pangomm-glyph.tar: Add new wrappers Pango::Glyph* (20.00 KB, application/octet-stream)
2002-08-23 19:18 UTC, Martin Schulze
  Details
pangomm-attr.tar: Add new wrappers Pango::Attribute, Pango::AttrXYZ, Pango::AttrIter (40.00 KB, application/octet-stream)
2002-08-23 19:20 UTC, Martin Schulze
  Details
pangomm-use_new_wrappers.diff: Reflect changes in existing files pango/src/* (20.86 KB, patch)
2002-08-23 19:21 UTC, Martin Schulze
none Details | Review
pangomm-all-in-one.tar.gz: One big package that holds all changes. (15.72 KB, application/octet-stream)
2002-08-24 09:03 UTC, Martin Schulze
  Details
pangomm-all-in-one.tar.gz (v2): attriter.hg corrected. (16.11 KB, application/octet-stream)
2002-08-26 09:44 UTC, Martin Schulze
  Details
pangomm-all-in-one.tar.gz (v3): fix context.{hg,ccg} - hopefully my compiler didn't miss another obvious error ... (16.11 KB, application/octet-stream)
2002-08-26 18:25 UTC, Martin Schulze
  Details
pangomm-all-in-one.tar.gz (v3, really!): grr... wrong diff file last time... (16.16 KB, application/octet-stream)
2002-08-27 07:06 UTC, Martin Schulze
  Details
pangomm-all-in-one.tar.gz (v4): get rid of Pango:: prefix, add more class descriptions, wrap two methods in Pango::Fontset (16.85 KB, application/octet-stream)
2002-08-27 09:25 UTC, Martin Schulze
  Details

Description Martin Schulze 2002-08-23 11:06:23 UTC
The pangomm API is currently incomplete. Lots of c structures are used
directly in our code instead of creating proper wrapper classes. I made
some effort to improve the situation. The work should be complete apart
from missing documentation and thorough testing. I split it into a couple
of patches so that parts can be treated (almost) independently. Please read
and comment.

Note: PangoEngineXYZ is not wrapped because the API seems to be mainly used
to add new pango backends and not useful for userland. The definitions of
the c structures and functions are #ifdefed out by default.
Comment 1 Martin Schulze 2002-08-23 11:08:17 UTC
Created attachment 10662 [details] [review]
Some corrections in members.m4 and reorganisation of convert_pango.m4 that goes along with the following patches.
Comment 2 Martin Schulze 2002-08-23 11:09:42 UTC
Created attachment 10663 [details]
New wrappers: simple data types collected from pango/pango-types.h and other files.
Comment 3 Martin Schulze 2002-08-23 11:10:32 UTC
Created attachment 10664 [details]
New wrappers: Pango::Item, Pango::Analysis
Comment 4 Martin Schulze 2002-08-23 11:11:35 UTC
Created attachment 10665 [details]
New wrappers: Pango::Glyph*
Comment 5 Martin Schulze 2002-08-23 11:12:35 UTC
Created attachment 10666 [details]
New wrappers: Pango::Attribute, Pango::Attr*, Pango::AttrIter
Comment 6 Martin Schulze 2002-08-23 11:13:53 UTC
Created attachment 10667 [details] [review]
Reflect the changes in other existing files.
Comment 7 Martin Schulze 2002-08-23 11:15:16 UTC
Note2: The xyz.tar files contain a xyz.diff file (with the ChangeLog
entry and changes to existing files) and new files.
Comment 8 Murray Cumming 2002-08-23 17:14:53 UTC
1. Please put separate classes in separate .hg|.ccg files, instead of
>1  in types.hg|.ccg.
2. Please tell me what file formats are used here. Try to use the
filename in the description. I don't like guessing what is a diff,
what is a .tar, what is a .tar.gz, what is a .cc, etc.
Comment 9 Martin Schulze 2002-08-23 19:10:43 UTC
Sorry, I forgot that bugzilla is not very verbose about attachments...
Anyway, I reattach all patches to suit your first point apart from the
first attachment (id=10663), which is a .diff file.
Comment 10 Martin Schulze 2002-08-23 19:12:04 UTC
Created attachment 10676 [details]
pangomm-rectangle.tar: Add new wrapper Pango::Rectangle.
Comment 11 Martin Schulze 2002-08-23 19:12:53 UTC
Created attachment 10677 [details]
pangomm-language.tar: Add new wrapper Pango::Language.
Comment 12 Martin Schulze 2002-08-23 19:16:41 UTC
Created attachment 10678 [details]
pangomm-color.tar: Add new wrapper Pango::Color.
Comment 13 Martin Schulze 2002-08-23 19:17:46 UTC
Created attachment 10679 [details]
pangomm-item.tar: Add new wrappers Pango::Analysis, Pango::Item
Comment 14 Martin Schulze 2002-08-23 19:18:34 UTC
Created attachment 10680 [details]
pangomm-glyph.tar: Add new wrappers Pango::Glyph*
Comment 15 Martin Schulze 2002-08-23 19:20:06 UTC
Created attachment 10681 [details]
pangomm-attr.tar: Add new wrappers Pango::Attribute, Pango::AttrXYZ, Pango::AttrIter
Comment 16 Martin Schulze 2002-08-23 19:21:24 UTC
Created attachment 10682 [details] [review]
pangomm-use_new_wrappers.diff: Reflect changes in existing files pango/src/*
Comment 17 Murray Cumming 2002-08-23 21:15:24 UTC
Why on earth did you submit these all as separate patches, when they
clearly depend on each other? It just makes my life difficult. I give
up  trying to make them all work. Please submit one big patch.

I am trying to get cvs write access for you but I can't find a
cvsmaster now.
Comment 18 Martin Schulze 2002-08-24 09:03:50 UTC
Created attachment 10689 [details]
pangomm-all-in-one.tar.gz: One big package that holds all changes.
Comment 19 Murray Cumming 2002-08-24 13:06:08 UTC
That's much easier, but:

../../glib/glibmm/slisthandle.h: In method `void Glib::SListHandle<T, 
Tr>::SListHandle () [with T = Pango::Attribute, Tr = 
Glib::Container_Helpers::TypeTraits<Pango::Attribute>]':
attriter.cc:130:   instantiated from here
../../glib/glibmm/slisthandle.h:296: no matching function for call to 
`Pango::Attribute::Attribute (void *&)'
../../pango/pangomm/attributes.h:146: candidates are: 
Pango::Attribute::Attribute ()
../../pango/pangomm/attributes.h:147:                 
Pango::Attribute::Attribute (const Pango::Attribute &)
../../pango/pangomm/attributes.h:148:                 
Pango::Attribute::Attribute (PangoAttribute *, bool = true)
make[4]: *** [attriter.lo] Error 1
make[4]: Leaving directory `/gnome/head/cvs/c++/gtkmm-1.3/pango/pangomm'
make[3]: *** [all-recursive] Error 1
Comment 20 Martin Schulze 2002-08-26 09:36:07 UTC
I can't reproduce this error with my compiler version (gcc 2.95.3) but
I'm glad that it did happen to you because I chose the wrong return
type for Pango::AttrIter::get_extra_attrs(): it must be
Glib::SListHandle<Pango::Attribute*> (Glib::OWNERSHIP_DEEP) instead of
Glib::SListHandle<Pango::Attribute> (Glib::OWNERSHIP_SHALLOW)!
Comment 21 Martin Schulze 2002-08-26 09:44:21 UTC
Created attachment 10710 [details]
pangomm-all-in-one.tar.gz (v2): attriter.hg corrected.
Comment 22 Murray Cumming 2002-08-26 13:50:35 UTC
Now I get:

../../glib/glibmm/listhandle.h: In method `void Glib::ListHandle<T, 
Tr>::ListHandle () [with T = Pango::Item, Tr = 
Glib::Container_Helpers::TypeTraits<Pango::Item>]':
context.cc:49:   instantiated from here
../../glib/glibmm/listhandle.h:297: no matching function for call to 
`Pango::Item::Item (void *&)'
../../pango/pangomm/item.h:89: candidates are: Pango::Item::Item 
(PangoItem *, bool = true)
../../pango/pangomm/item.h:91:                 Pango::Item::Item (const 
Pango::Item &)
gmake[4]: *** [context.lo] Error 1


Also, I don't understand why you have added the Pango:: namespace
prefix to some method parameters, and removed the conversion for
non-prefixed types. For instance, in Layout.

Also, in Layout, and possibly in other files, please try to use C++
rather than C type names in the documentation.
Comment 23 Martin Schulze 2002-08-26 18:01:54 UTC
1. I'm really sorry that you're having those problems compiling the
patch.  I just don't get those errors so I have to fix things from
your compiler output. I'll investigate the latest problem at once.

2. I added Pango:: namespace prefix because I didn't see any pattern
where it was left out. In some function definitions the first
parameter type would be prefixed with Pango::, the second would not.
So I decided to unify the parameter lists along with my other changes.

3. I try to use c++ names everywhere but since I plan to review and
complete the documentation of Pango anyway I was not very careful.
Comment 24 Martin Schulze 2002-08-26 18:25:43 UTC
Created attachment 10717 [details]
pangomm-all-in-one.tar.gz (v3): fix context.{hg,ccg} - hopefully my compiler didn't miss another obvious error ...
Comment 25 Murray Cumming 2002-08-26 19:18:05 UTC
Sorry, I still see the same error.

2. I would prefer to standardise on not having the prefix unless it is
necessary. We can do that later.
Comment 26 Martin Schulze 2002-08-27 07:06:17 UTC
Created attachment 10726 [details]
pangomm-all-in-one.tar.gz (v3, really!): grr... wrong diff file last time...
Comment 27 Martin Schulze 2002-08-27 09:25:08 UTC
Created attachment 10728 [details]
pangomm-all-in-one.tar.gz (v4): get rid of Pango:: prefix, add more class descriptions, wrap two methods in Pango::Fontset
Comment 28 Murray Cumming 2002-08-27 14:15:28 UTC
Applied. You're search-replace in convert_pango.m4 was quite brutal
and broke lots of things, but i fixed that. You need to be more
careful when committing directly. That's in the queue apparently.

Thanks for making such a big effort. Maybe you could update
api_status.txt to show us what you think needs to be done.