From: Olivier Andrieu <oandrieu@nerim.net>
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
Date: Tue, 3 Oct 2006 21:01:21 +0200 [thread overview]
Message-ID: <17698.45953.753908.389772@karryall.dnsalias.org> (raw)
In-Reply-To: <20061003173755.GA28749@malaquias.gwiceb1>
[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1471 bytes --]
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 : <lablgtk type equivalent to GtkWidget*> option
>
> set_image : <lablgtk type equivalent to GtkWidget*> -> 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
[-- Attachment #2: gtkbutton_missing_properties.patch --]
[-- Type: text/plain, Size: 420 bytes --]
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 --
next prev parent reply other threads:[~2006-10-03 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20061003133439.GA2593@malaquias.gwiceb1>
2006-10-03 17:37 ` j.romildo
2006-10-03 18:08 ` [Caml-list] " Eric Cooper
2006-10-03 18:52 ` Patch available for " j.romildo
2006-10-03 19:01 ` Olivier Andrieu [this message]
2006-10-03 19:12 ` [Caml-list] " Olivier Andrieu
2006-10-04 9:29 ` j.romildo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17698.45953.753908.389772@karryall.dnsalias.org \
--to=oandrieu@nerim.net \
--cc=caml-list@inria.fr \
--cc=j.romildo@gmail.com \
--cc=lablgtk@math.nagoya-u.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox