Re: how to hide mouse cursor (GTK + CPP)?



my code is here

#include <gtk/gtk.h>

int main( int   argc,
         char *argv[] )
{
GtkWidget *window;
GtkWidget *button;
GtkWidget *table;

gtk_init (&argc, &argv);

/* Create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);

gtk_window_maximize(GTK_WINDOW (window));

gchar bits[] = { 0 };
GdkColor color = { 0, 0, 0, 0 };
GdkPixmap *pixmap;
GdkCursor *cursor;

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);


gtk_main ();

return 0;
}

but i stil have cursor.

please help...

thanks





----- Original Message ----- From: "David Necas (Yeti)" <yeti physics muni cz>
To: "ALLs soft" <info alls org>
Cc: <gtk-app-devel-list gnome org>
Sent: Wednesday, January 26, 2005 12:48 PM
Subject: Re: how to hide mouse cursor (GTK + CPP)?


On Wed, Jan 26, 2005 at 11:13:16AM +0100, ALLs soft wrote:
Please send example if you have it.

 guchar bits[] = { 0 };
 GdkColor color = { 0, 0, 0, 0 };
 GdkPixmap *pixmap;
 GdkCursor *cursor;

 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(widget->window, cursor);

Yeti


--
Dynamic IP address is not a crime.




--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21.1.2005





--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21.1.2005




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]