Re: Getting the "busy" cursor to display.
- From: Bernd Demian <bernd demian googlemail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Getting the "busy" cursor to display.
- Date: Thu, 12 Apr 2012 06:00:35 -0000
Hallo,
we use in a gtk+2.18 project , following function to set/se back the
cursor:
static void
cscSetzeKursor(Dialogfeld *pDf, gboolean warten)
{
static GdkCursor *kursor_warte;
static GdkCursor *kursor_pfeil;
/* kursor setzen */
if(kursor_warte == NULL)
kursor_warte=
gdk_cursor_new_for_display(gtk_widget_get_display(GTK_WIDGET(pDf->maskenW)),
GDK_WATCH);
if(kursor_pfeil == NULL)
kursor_pfeil =
gdk_cursor_new_for_display(gtk_widget_get_display(GTK_WIDGET(pDf->maskenW)),
GDK_LEFT_PTR);
if(warten){
if(GTK_WIDGET(pDf->maskenW)->window)
gdk_window_set_cursor(GTK_WIDGET(pDf->maskenW)->window,
kursor_warte);
}
else {
if(GTK_WIDGET(pDf->maskenW)->window)
gdk_window_set_cursor(GTK_WIDGET(pDf->maskenW)->window,
kursor_pfeil);
}
}
hope that helps.
bernd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]