Re: I need help writing to the gtk3 clipboard

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

 



On 12Jan2021 11:59, ToddAndMargo <ToddAndMargo@xxxxxxxx> wrote:
>On 1/12/21 11:29 AM, Samuel Sieb wrote:
>>See if it works, but there's also 
>>https://developer.gnome.org/gtk3/stable/gtk3-Clipboards.html#gtk-clipboard-store 
>>which might be relevant.
>
>Hi Sam,
>By any chance, do yo know were I can find the structure
>for GtkClipboard?

Well, I went digging through the gtk source. There ain't no 
gtk_clipboard_store any more, and a grep on the type said this:

    [~/src/gtk(git:master)]fleet2*> agf GtkClipboard
    NEWS.pre-3.0
    5465:* GtkClipboard
    5525:* GtkClipboard
    6751:* Add types for GtkRowReference, GtkClipboard [Jonathan 
    Blandford, James Henstridge, Owen]

    docs/reference/gtk/migrating-3to4.md
    427:### Replace GtkClipboard with GdkClipboard
    429:The `GtkClipboard` API has been removed, and replaced by 
    #GdkClipboard.
    485:The convenience API for specific target types in `GtkClipboard` 
    has been
    488:| GtkClipboard                         | GType                 |

So I'd say you've got a version 4 Gtk kit.

You say you need help with the gtk3 clipboard - maybe your dev stuff 
isn't version 3?

Here's the relevant bit:

    https://gitlab.gnome.org/GNOME/gtk/-/blob/master/docs/reference/gtk/migrating-3to4.md#replace-gtkclipboard-with-gdkclipboard

The architectural issue you're dealing with (aside from the API change) 
is that a clipboard needs to be stored somewhere.

The basic X11 clipboard stuff stores it on the server in some global 
properties (there are 2 flavours of that, too, one with a primary and 
secondary clipboard and anthor with a ring of 10 buffers). For added 
fun, the clipboard is owned by a particular X11 client - when the client 
goes, so does the value, in part for cleanup and in part because in 
principle the client is involved in returning the contents, as you're 
supposed to be able to indicate what kind of contents you need (a float, 
some text, some rich text, maybe an image) - the clipboard's a reference 
and the client supplies it on demand.

>From earlier comments in this thread I gather Gtk supports a special 
client which is a clipboard manager, which stored stuff for people.  
Possibly persistently (means, to me, over a logout/login or 
alternatively just beyond the life of the client the clip came from).

Anyway, the above suggests the API have changed. See the web page above 
for the stuff you're meant to use now.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux