setting busy interactive pointer (left_ptr_watch)

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

 



Hi,
I'm trying to add the "Busy-Interactive" pointer to my pygtk app as described in the HIG:http://developer.gnome.org/projects/gup/hig/2.0/feedback-types.html
Now mozilla at least has a nice themed animated version of this pointer,which I understand, X/GDK do not support directly according to:http://vektor-sigma.livejournal.com/1137.htmlhttp://www.mail-archive.com/devel@xxxxxxxxxxx/msg00428.htmlI used the bitmap referenced above, but it generates a differenthash as can be seen in the program below.Note this program works on pygtk2-2.6.0-3 but not on 2.8.1-0ubuntu2do to an apparent interface change in gtk.gdk.bitmap_create_from_data ?
So my questions in summary:
1. Is there an easier way to set left_ptr_watch instead of copying the mozilla bits?2. If not how does one set the correct bits?3. Is there a way to do this across the referenced pygtk versions at least.
thanks,Pádraig.----------------------
import osos.environ['XCURSOR_DISCOVER']='1' #Turn on logging in Xlib
print "hash to match:     08e8e1c95fe2fc01f976f1e063a24ccd"
import gtkw=gtk.Window()w.realize()
#used `convert spinning.gif spinning.xbm`bit_data =     "\x01\x00\x03\x00\x07\x00\x0f\x00\x1f\x00\x3f\x00\x7f\x00\xff\x0e\x1f\x0e\x1b\x15\x31\x37\x30\x11\x60\x0e\x60\x0e"#used bitmap util to save inverse of abovebitmask_data = "\xfe\xff\xfc\xff\xf8\xff\xf0\xff\xe0\xff\xc0\xff\x80\xff\x00\xf1\xe0\xf1\xe4\xea\xce\xc8\xcf\xee\x9f\xf1\x9f\xf1"
#create pixmap from xbm datapix = gtk.gdk.bitmap_create_from_data(None, bit_data, 14, 14)mask = gtk.gdk.bitmap_create_from_data(None, bitmask_data, 14, 14)
#set cursor from pixmapcolor = gtk.gdk.Color()LEFT_PTR_WATCH=gtk.gdk.Cursor(mask, pix, color, color, 0, 0)#Note needed to switch mask and pix params above?
#set cursor from enum#LEFT_PTR_WATCH=gtk.gdk.Cursor(gtk.gdk.WATCH)
#set cursorw.window.set_cursor(LEFT_PTR_WATCH)
w.connect("destroy", gtk.main_quit)w.show_all()gtk.main()_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux