RE: Changing the cursor in a GTK+ 2 window
- From: martyn 2 russell bt com
- To: gtk-app-devel-list gnome org
- Subject: RE: Changing the cursor in a GTK+ 2 window
- Date: Fri, 28 Mar 2003 10:47:34 -0000
How does one change the cursor to the "watch" cursor in a GTK+ 2.0
window, and then change it back to normal?
GdkCursor *cursor = NULL;
cursor = gdk_cursor_new(GDK_WATCH);
gdk_window_set_cursor (event->window, cursor);
/* clean up */
g_object_unref(G_OBJECT(cursor));
There is a gdk_window_set_cursor() function, but it requires a
GdkWindow. I start with a GtkWindow. There does not seem to be a
function like gtk_window_get_gdk_window() that would bridge the two.
The event is a "motion_notify_event".
To put the cursor back, pass NULL.
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]