j.romildo@gmail.com [Tuesday 3 October 2006] : > > On Tue, Oct 03, 2006 at 10:34:39AM -0300, j.romildo@gmail.com wrote: > > Hello. > > > > I am using lablgtk to write the GUI for an application I am > > developing. Currently I want to set the image associated with a > > button, but it seems that lablgtk does not have support for the > > Gtk API function gtk_button_set_image. So I am writing to request > > this support in the next version of lablgtk. > > I have written the attached to add the methos image and set_image > to class Button of gtklabel. But I did not get the types correct > for the GtkWidget* from the Gtk+ API. Maybe someone has a clue on > how those methods should be typed. > > In Gtk+ the functions have the prototypes: > > GtkWidget* gtk_button_get_image (GtkButton *button); > > void gtk_button_set_image (GtkButton *button, GtkWidget *image); > > The idea is to have two new methods in the class button (files > gButton.mli and gButton.ml): > > image : option > > set_image : -> unit > > and two extern functions in module Button of file gtkButton.ml: No need to, since "image" is defined as a property. You just have to modify gtkButton.props and propcc will generate the code, and add the new methods in gButton.mli. Here is a patch, with a bunch of other missing properties of GtkButton. -- Olivier