From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B161FBC50 for ; Tue, 3 Oct 2006 21:01:22 +0200 (CEST) Received: from mallaury.nerim.net (smtp-102-tuesday.noc.nerim.net [62.4.17.102]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k93J1MFN007515 for ; Tue, 3 Oct 2006 21:01:22 +0200 Received: from karryall.dnsalias.org (karryall.dnsalias.org [213.41.240.180]) by mallaury.nerim.net (Postfix) with ESMTP id 3BCEA4F3FB; Tue, 3 Oct 2006 21:01:10 +0200 (CEST) Received: by karryall.dnsalias.org (Postfix, from userid 500) id E523D73E351; Tue, 3 Oct 2006 21:01:21 +0200 (CEST) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qJ8aG4Hald" Content-Transfer-Encoding: 7bit Message-ID: <17698.45953.753908.389772@karryall.dnsalias.org> Date: Tue, 3 Oct 2006 21:01:21 +0200 To: j.romildo@gmail.com Cc: caml-list@inria.fr, lablgtk@math.nagoya-u.ac.jp Subject: Re: missing gtk_button_set_image in lablgtk In-Reply-To: <20061003173755.GA28749@malaquias.gwiceb1> References: <20061003133439.GA2593@malaquias.gwiceb1> <20061003173755.GA28749@malaquias.gwiceb1> X-Mailer: VM 7.19 under Emacs 21.4.1 X-j-chkmail-Score: MSGID : 4522B382.000 on concorde : j-chkmail score : X : 0/20 1 X-Miltered: at concorde with ID 4522B382.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 gtk:01 lablgtk:01 romildo:01 romildo:01 lablgtk:01 gtk:01 gbutton:01 mli:01 gbutton:01 extern:01 mli:01 andrieu:01 bazar-ocaml:01 X-Attachments: name="gtkbutton_missing_properties.patch" --qJ8aG4Hald Content-Type: text/plain; charset=us-ascii Content-Description: message body and .signature Content-Transfer-Encoding: 7bit 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 --qJ8aG4Hald Content-Type: text/plain Content-Disposition: attachment; filename="gtkbutton_missing_properties.patch" Content-Transfer-Encoding: 7bit Repository : andrieu@yquem.inria.fr:/net/yquem/devel/caml/repository Module : bazar-ocaml/lablgtk Working dir: ~/src/caml/lablgtk/lablgtk-camlcvs/ In directory .: In directory src: * Modified src/gButton.mli * Modified src/gtkButton.props --------------------- End --------------------- -- last cmd: cvs -f -z3 diff -u src/gtkButton.props src/gButton.mli -- --qJ8aG4Hald--