I'm programming (in python) GDK without GTK, simply as a x11 abstraction. THIS POST IS MY LAST CHANCE.
My problem is that I don't know how capture the GDK window's signals/events or what are their names.
When I do:
window = gdk.Window(
gdk.get_default_root_window(),
width=400,
height=200,
window_type=gdk.WINDOW_CHILD,
wclass=gdk.INPUT_OUTPUT,
event_mask=gdk.KEY_PRESS_MASK | gdk.MOTION_NOTIFY | gdk.EXPOSURE_MASK)
window.connect("key_press_event", on_key)
I get:
unknown signal name: key_press_event
GTK and PYGTK references talk about classes, functions and constants but nothing about their interrelation so they don't help. Is it about glib main loop?
I need some examples. Any good GDK tutorial or source code? Any glib.MainLoop example for capturing GDK signals?
Thank you.