Re: Change the mouse pointer to sandglass
- From: "Jim George" <jimgeorge gmail com>
- To: "Binary Chen" <binary chen gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Change the mouse pointer to sandglass
- Date: Thu, 20 Sep 2007 18:52:49 -0600
I want change to mouse pointer to sandglass to indicate the system is
busy, how can i do it?
I use functions like this:
void set_wait_cursor(GtkWidget *w)
{
GtkWidget *parent;
GdkCursor* cursor;
parent = gtk_widget_get_toplevel(w);
if (parent != NULL) {
cursor = gdk_cursor_new(GDK_WATCH);
gdk_window_set_cursor(parent->window, cursor);
gdk_cursor_destroy(cursor);
}
}
void unset_wait_cursor(GtkWidget *w)
{
GtkWidget *parent;
parent = gtk_widget_get_toplevel(w);
if (parent != NULL) {
gdk_window_set_cursor(gtk_widget_get_toplevel(w)->window, NULL);
}
}
Now, I can call either one from the event handler of any widget in my
program and pass that to these functions.
-Jim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]