Documenting a struct with gtk-doc



Hi all,

So, I want to document the contents of a standard C struct in gtk-doc. The problem is that I don't typedef it, so rather than:

typedef struct {
   int a;
} my_struct;

the code is actually:

struct my_struct {
   int a;
};


Now, if I use the typedef-version of the struct, I can successfully get the gtk-doc comment like, like
/**
 * my_struct:
 * @a: whatever
 *
 * Pretty struct
 */

But... what if I use the one without typedef, directly with the "struct" keyword?  If tried the above gtk-doc comment, and also one with "struct my_struct:" in first line of comment, but cannot get it properly compiling in gtk-doc html documentation...

Also, I know I can just:
typedef struct my_struct {
   int a;
} my_struct_name2;

And document my_struct_name2... but anyway, is the non-typedef option possible?


Thanks,
-Aleksander


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]