»
S
I
D
E
B
A
R
«
gtk-doc is not listing your properties and signals?
May 3rd, 2009 by Pierre-Luc Beaudoin

I’ve got to share what I just found about gtk-doc.  I’ve been using it for months now to document libchamplain’s API.  It was complex to setup but the result is worth it.  Here is my experience about how to get your properties and signals to show up:

  • Is my_object_get_type listing in the .types file?
  • Is the section correctly identified in your doc and -docs.sgml?
  • And today’s discovery: is your object struct declared as a typedef?

To make that last point explicit:

typedef struct
{
  GObject parent;
} MyObject;

will produce minimalistic documentation while

typedef struct _MyObject MyObject;

struct _MyObject
{
  GObject parent;
};

will produce complete documentation with properties, signals and object hierarchy.

Consider yourself warned! :)


3 Responses

James Henstridge writes:
May 4th, 2009 at 2:06

Perhaps this should be considered a bug rather than a quirk of the tool?

Sven Neumann writes:
May 4th, 2009 at 6:15

Thanks. I was wondering for quite a while now what’s wrong about the gtk-doc setup in two libraries that I set up recently. Apparently it was a bad idea to list the foo-types.h header file in IGNORE_HFILES. Without the typedefs in that file, gtk-doc was not producing complete object documentation.

Marc-Andre Lureau writes:
May 4th, 2009 at 16:29
Leave a Reply

You must be logged in to post a comment.

»  Substance: WordPress   »  Style: Ahren Ahimsa