Question about GtkClipboard and selections

I have a question..

Assuming that I have asked for the TARGETS target; How do I get the data
of a clipboard_get_selection_cb() into a GtkTargetEntry where
clipboard_get_selection_cb() is the (first) callback for
gtk_clipboard_set_with_data() ?

can I just cast it ? it used to be something like .. atoms_targets =
(GdkAtom *)selection_data->data; in gtk1.0 but that aint a
GtkTargetEntry; right?

Or can I feed the function gtk_clipboard_set_with_data() also with a
GdkAtom *atoms_targets ? 

What I want to do is, I want to get the current selection's TARGETS,
then I want to get all those targets one by one, and then I want to
reclaim the selectionownership on all the targets that I have collected.
For that, it looks like I will have to convert GdkAtom *atoms_targets to
a GtkTargetEntry. Or am I missing the point here? :)

Philip van Hoof aka freax (
irc: mailto:freax @

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