I stink at reading C code.gtk
In the sample clipboard_simple.c
it states
// NOTE: If you test this without a clipboard manager running, the
// new text saved to the clipboard will disappear as soon as this
// program exits.
xclip does not have this issue, and I can't figure out why.
How do I make a (text) write to the clipboard persistent?
Many thanks,
New info:
I do believe the missing piece of the puzzle is:
gtk-clipboard-store
void
gtk_clipboard_store (GtkClipboard *clipboard);
Would someone point to the structure of GtkClipboard? I think it is buried somewhere in /usr/include/gtk-3.0/gtk/gtkclipboard.h, but I can not figure it out.
Edit: if I am not mistaken, it is just a C pointer to a 64 bit integer
question from:
https://stackoverflow.com/questions/65661734/with-gtk3-how-do-i-make-a-write-to-the-clipboard-presistant 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…