Re: how to hide mouse cursor (GTK + CPP)?
- From: M Santhoff t-online de (Marc Santhoff)
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: how to hide mouse cursor (GTK + CPP)?
- Date: Wed, 26 Jan 2005 17:00:56 +0100
Am Mi, den 26.01.2005 schrieb ALLs soft um 15:31:
my code is here
[...]
pixmap = gdk_bitmap_create_from_data(NULL, bits, 1, 1);
cursor = gdk_cursor_new_from_pixmap(pixmap, pixmap, &color, &color, 0, 0);
gdk_window_set_cursor(GDK_WINDOW(window), cursor);
gtk_widget_show (window);
I've done it with a pixmap and mask containing only zeros sucessfully:
<Pascal code>
cursorbits:array[0..31] of char = (#0,#0,#0,#0,#0, ... ,#0);
cursormask:array[0..31] of char = (#0,#0,#0,#0,#0, ... ,#0);
...
source := gdk_bitmap_create_from_data (NULL, cursorbits, 16, 16);
mask := gdk_bitmap_create_from_data (NULL, cursormask, 16, 16);
cursor := gdk_cursor_new_from_pixmap (source, mask, @fg, @bg, 8, 8);
gdk_pixmap_unref (source);
gdk_pixmap_unref (mask);
</Pascal code>
(on GTK+1.2, but it should work for 2.x, too)
But beware, you've got to do this on dialog windows again.
HTH,
Marc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]