Injecting input inside a gtk program?

How does one inject keystrokes in a gtk program?
Let's say I'm writing a test case for a library written
with gtk, the test case is going to be linked
against the library (so I don't need this to work
across processes), and the test case just wants
to bring an existing window to the foreground
and send a key to it.
Does one just call g_signal_emit with
and then

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