[9892] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Cursors with gtk/gdk

daemon@ATHENA.MIT.EDU (Eric Harlow)
Thu Nov 5 12:48:02 1998

Date: Thu, 5 Nov 1998 09:42:55 -0800 (PST)
From: Eric Harlow <linuxgeek@yahoo.com>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


Hi folks,

I was experimenting with cursors and came across a problem creating my
own cursor using gdk_cursor_new_from_pixmap with gtk 1.0.4

Here's the pseudo code:

I have pixmap data defined:

static char *xpm_data [] = {
"16 16 2 1",
"  c None",
"X c #FFFF0",
" XXX           ",
..... all the pixmap data here....

Then after I display a window, I run the code:

pixmap = gdk_pixmap_create_from_xpm_d (window->window, &mask, NULL,
xpm_data);
cursor = gdk_cursor_new_from_pixmap (pixmap, mask, &yellow, &black, 1,
1);

gtk_main ();


--- You'll notice that I haven't assigned the cursor to a window yet -
and it still crashes.  The error is:

** ERROR **: BadMatch (invalid parameter attributes)
  serial 131 error_code 8 request_code 93 minor_code 0

1 - how do I track down such an error?
2 - does someone have sample code of creating a cursor from pixmap
data that works so I can figure out what I'm doing wrong?

 -Eric






_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post