Re: DnD targets question
- From: James Henstridge <james daa com au>
- To: Daniel Weber <DWEBER1 austin rr com>
- cc: gnome-devel-list gnome org
- Subject: Re: DnD targets question
- Date: Mon, 9 Aug 1999 12:00:48 +0800 (WST)
I have not looked at the DnD code much, but the targets are probably atoms
(integer indices into a table of strings stored on the X server). You can
convert the atom into a string with gdk_atom_name().
If you are poking around in the DnD internals, you have probably missed
something (unless you are doing something really complicated). Try
looking at GHex (in gnome-utils) as a simple example of drag and drop.
Another example showing different levels of complexity is the testdnd
example distributed with gtk+.
James.
--
Email: james@daa.com.au
WWW: http://www.daa.com.au/~james/
On Sun, 8 Aug 1999, Daniel Weber wrote:
> Anyone have any experience working with GdkDragContext->targets GList
> structures? I'm trying to figure out what the heck is in this GList and
> haven't had much luck. What I"ve been able to figure out so far:
> - They aren't pointers
> - They look like integers of some kind
> - It's really easy to get a core if you try and use them
>
> I've been going over the gtk source trying to decipher how the targets
> list is stored. It looks like the gchar * strings are hashed into a
> table but I've been unable to figure out how to get them out. What I"m
> really trying to do is write a general example program that prints out
> the contents of a GdkDragContext, this would include the target type,
> hopefully something like "drag contents: text/uri-text". I finally got
> my sample program to respond to a drop, the issue was with the targets
> structure not containing the mime type of the drop.
>
> The more I dig into DnD, the more I see what a lot of work there is
> going on in the background - wow.
>
> The next step after this is to try and decipher what I can do with the
> GdkWindow * source - try to get a process ID and program name
>
> daniel
>
>
> --
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]