Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What happened to the GTK and GDK constants/symbols?

constants Gtk happened Symbols
0
Posted

What happened to the GTK and GDK constants/symbols?

0

The GTK_* constants have been mapped to gtk.* constants, and the GDK_* constants to gtk.gdk.*. The one caveat is that python identifiers can’t start with a number. As is done in a few other Python extension modules, pygtk will prefix these constants with an underscore. So GDK_2BUTTON_PRESS is wrapped as gtk.gdk._2BUTTON_PRESS, while GDK_BUTTON_PRESS is gtk.gdk.BUTTON_PRESS (no underscore). One exception is the keysyms constants. They are accesed through gtk.keysyms.KEY. To see the legal values of KEY just do a import gtk print dir(gtk.

0

The GTK_* constants have been mapped to gtk.* constants, and the GDK_* constants to gtk.gdk.*. The one caveat is that python identifiers can’t start with a number. As is done in a few other Python extension modules, pygtk will prefix these constants with an underscore. So GDK_2BUTTON_PRESS is wrapped as gtk.gdk._2BUTTON_PRESS, while GDK_BUTTON_PRESS is gtk.gdk.BUTTON_PRESS (no underscore). One exception is the keysyms constants. They are accesed through gtk.keysyms.KEY.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.