Re: Clipboard IO under GTK/GDK?



Basically, first have your program listen to "selection_received" events.  
Next, when you want to get the current clipboard, call
gtk_selection_convert() to get gtk+ to fire off a selection_received
signal.

However, I'm still trying to get copying to the clipboard to work.  The
Gtk tutorial mentions how to do this under "Selections", but I'm trying to
figure out how it works with pygtk.

The relevant section for the gtk+ tutorial is here:

    http://gtk.org/tutorial/gtk_tut-19.html

I'm not sure this looks right at all.

Why would signals, events, and interclient issues be involved?

With just Xlib, there was an XFetchBuffer() call or something like that to
get data from the clipboard.

Since the user needs to select `paste', the program cannot and should not
just arbitary paste whenever the selection is updated.




--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/





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