public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* gdk-pixmap-create-from-file problem
@ 2000-01-26  0:15 Janis Dzerins
  2000-01-29 10:41 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Janis Dzerins @ 2000-01-26  0:15 UTC (permalink / raw)
  To: guile-gtk

Hello.

I stuck on the problem with gdk-pixmap-create-from-file: when I try to
load a pixmap using

(gdk-pixmap-create-from-file window #f #f "foo.xpm")

guile-gtk says that 2nd argument (#f) is wrong. I think this procedure
should accept #f (NULL) for the mask.

But, anyway, I changed the line

((ret GdkWindow) mask)

in (define-func gdk_pixmap_create_from_xpm ...) (gdk-1.2.defs:440) to

(GdkWindow mask (null-ok))

and then it worked fine for me.


That's it. Thank you for your attention. (I'm not a subscriber of this
list, so it would be nice if any replies to this message could be cc'ed
to me. Thanks again.)

 --
jonis

A yawn is a silent shout.
		-- G.K. Chesterton

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gdk-pixmap-create-from-file problem
  2000-01-26  0:15 gdk-pixmap-create-from-file problem Janis Dzerins
@ 2000-01-29 10:41 ` Marius Vollmer
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2000-01-29 10:41 UTC (permalink / raw)
  To: Janis Dzerins; +Cc: guile-gtk

Janis Dzerins <jonis@mt.lv> writes:

> I stuck on the problem with gdk-pixmap-create-from-file: when I try to
> load a pixmap using
> 
> (gdk-pixmap-create-from-file window #f #f "foo.xpm")
> 
> guile-gtk says that 2nd argument (#f) is wrong.  I think this
> procedure should accept #f (NULL) for the mask.

Hmm, yes, but not in the way you hvae done it below.  The `mask'
argument is not a pointer to a GdkBitmap, it is a pointer to a pointer
to a GdkBitmap.  The way this is reflected in Scheme is that `mask' is
a list or vector of length one, and after the function returns, the
list (or vector) has been modified and contains the GdkBitmap.

However, it should be possible to pass `#f', indicating that one isn't
interested in the mask bitmap.  The machinery in guile-gtk did not
allow this, but I have now pacthed it so that the mask parameter is
declared as
 
    ((ret GdkWindow) mask (null-ok))

That is, with a recent guile-gtk from CVS you can use

    (gdk-pixmap-create-from-file window #f #f "foo.xpm")

and it will work.

If you always use `#f' for `mask', your version is also safe, but
still incorrect.  Please use guile-gtk from CVS, if you can.

- Marius

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-01-29 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-26  0:15 gdk-pixmap-create-from-file problem Janis Dzerins
2000-01-29 10:41 ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).