Cursors with gtk/gdk
- From: Eric Harlow <linuxgeek yahoo com>
- To: gtk-list redhat com
- Subject: Cursors with gtk/gdk
- Date: Thu, 5 Nov 1998 09:42:55 -0800 (PST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]