new Target API [was: Re: introspection and broken API]



> > - DnD is heavily based on X selections, and thus weirdness seeps
> > through. Sepecifically, GTK should provide a canonical list of supported
> > GtkTargetEntry's, map those to X selections, then hide the whole mess
> > from the programmer with getter/setters to those targets.
> > 
> 
> We have made quite some progress towards that goal in 2.6, with hi-level
> api to handle text, images and uris:
> 
> void           gtk_target_list_add_text_targets  (GtkTargetList  *list,
> 						  guint           info);

[snip API]

I noticed the new API in devhelp, but not how to use it. I mostly went
by tests/testdnd.c.

How do you tell a widget to use a GtkTargetList? Create an empty
GtkTargetEntry, call gtk_drag_dest_set with empty entry array, then call
gtk_drag_dest_set_target_list?

I'll add the new stuff to my tutorial ASAP.

Also, I tried passing an gint32 in my tutorial since that was the
simplest datatype not included in your new API. Is there a reason you
can't pass integers?

Cheers,
Ryan




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