Re: DnD
- From: Owen Taylor <otaylor redhat com>
- To: Robert Roebling <roebling ruf uni-freiburg de>
- Cc: gtk-list redhat com
- Subject: Re: DnD
- Date: 15 Jan 1999 17:40:10 -0500
Robert Roebling <roebling@ruf.uni-freiburg.de> writes:
> Owen Taylor wrote:
>
> > The new DND code simply uses strings (X atoms in particular)
> > to convey target types.
> >
> > The standard we use for the format of those strings
> > is MIME types.
> >
> > So, "image/png" is very much a good type to use.
> > so would by "application/x-my-cool-spreadsheat-document"
>
> OK. The format of selection data is always identified
> by an atom for the target "image/png" and by a
> selection atom. Is the latter always GDK_SELECTION_STRING
> for non-standard types? I couldnīt find anything
> like GDK_SELECTION_BINARY.
If we are talking about selections (not DND) -
You can have multiple selections, each identified by
an atom. There are predefined atoms GDK_SELECTION_PRIMARY
and GDK_SELECTION_SECONDARY.
The data in the selection can be retrieved in various
formats, called targets, also identified by atom.
There are a couple of predefined atoms:
GDK_TARGET_BITMAP = 5,
GDK_TARGET_COLORMAP = 7,
GDK_TARGET_DRAWABLE = 17,
GDK_TARGET_PIXMAP = 20,
GDK_TARGET_STRING = 31
(defined by X) but you can use any string.
For DND, there is no conception of multiple selections.
Data types are again represented by atoms:
You might use a targets table that looked like:
static GtkTargetEntry drag_types[] =
{
{ "text/uri-list", 0, TARGET_URI_LIST },
{ "_NETSCAPE_URL", 0, TARGET_URL }
};
Or whatever.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]