grab paste buffer


I'm using a GtkText object as an interactive terminal in a
microcontroller console application.

- I have made it not editable.

- Data from the serial port connected to the microcontroller is
collected by a handler (installed with gdk_input_add()) and then
appended to the Text widget.

- Keyboard input is collected by another handler (installed with
gtk_signal_connect() on event "key_press_event"), and then written to
the controller which then echos back to the Text widget.

All is well... now I want to be able to paste into the application with
mouse button 2 (which will actually involve intercepting the data and
sending it to the microcontroller, as with kbd input). I've installed a
handler for that, but I need to get my hands (or buffer) on the data.
I've grepped all available documentation and mailing lists. Hours of
UTSL have led me to believe the answer is in gtkselect.c, but the more I
read, the less I seem to know. Is anyone in the mood to provide a hint?


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