[Gtk-sharp-list] GAPI parser issues

Christian Hoff christian_hoff at gmx.net
Mon Oct 27 06:00:17 EDT 2008


Hi,

I am currently working on revamping the virtual method handling. By now 
Gtk# ignores every virtual method in Gtk's class definitions unless 
explicit implementations are provided in the .custom files. That's why 
many virtual methods like the Activate method of Gtk.CellRenderer are 
missing.

As the VM's should have an "On" prefix in the future(see the patch for 
bug https://bugzilla.novell.com/show_bug.cgi?id=324464) I had to change 
the gapi2xml script. But when I'm trying to reparse the api files 
gapi2xml quits with

ERROR: Failed to parse method current_folder_changed from class definition:

The reason for this strange behaviour is that it cannot find the class 
definition because the *Class struct is defined in the C source file and 
not in the header file. For example I solved a previous similar error by 
moving this code from the C file(GtkClipboard.c) to the corresponding 
header(GtkClipboard.h):

typedef struct _GtkClipboardClass GtkClipboardClass;
struct _GtkClipboardClass
{
  GObjectClass parent_class;

  void (*owner_change) (GtkClipboard        *clipboard,
            GdkEventOwnerChange *event);
};

I'm wondering if this is a bug in gapi2xml and how you manage to reparse 
the api files. I used the Gtk+ 2.12.0 sources as the paths in 
gtk-sharp-2.12-sources.xml suggest. 2.12.2 didn't work, too.

Any help is appreciated!

Christian


More information about the Gtk-sharp-list mailing list