Re: Convenience APIs for selections

On Thu, 2004-04-15 at 19:32, Federico Mena Quintero wrote:
> Hi,
> Right now, the only convenience APIs we have for munging/demunging a
> GtkSelectionData data are gtk_selection_data_{set,get}_text().  All
> other data types must be handled by hand.
> We have several well-known data types that get passed around, primarily
> through drag and drop, such as "application/x-color" and
> "text/uri-list".  However, these must be parsed by hand, leading to
> duplicated code, bugs, etc.
> It would be nice to have functions like this:
> /* Sets "application/x-color" from the 16-bit RGB values */
> void gtk_selection_data_set_color (GtkSelectionData *data,
> 				   const GdkColor   *color);

Maybe we could use GValues, which can already contain things like
GdkColor. Then we would not need so many functions. Of course we'd have
to document what types are actually supported, so it might not be so

Murray Cumming
murrayc murrayc com

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