date DND
Waldo Bastian
bastian at kde.org
Tue Jul 22 15:36:46 EEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 22 July 2003 00:34, Owen Taylor wrote:
> On Mon, 2003-07-21 at 18:11, Waldo Bastian wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Monday 21 July 2003 23:58, John Meacham wrote:
> > > I would very much like to see this on freedesktop.org. DND can be used
> > > for a lot of interesting things besides files, and can simplify UIs
> > > considerably. for example, I would really like to see a standard DND
> > > type for dragging and dropping colors and all color selection widgets
> > > should be able to recieve and provide such dnd items. an app which
> > > acted like a palette to drag colors off of to customize other apps with
> > > a consistant color scheme would be very cool.
> > > John
> >
> > application/x-color is actually supported by both Gtk and Qt/KDE already.
> >
> > You may like KColorChooser that comes with KDE.
>
> Hmmm, drops into GTK+ from KColorChooser don't seem to work.
>
> (testgtk:8556): Gtk-WARNING **: Received invalid color data
>
> (gdb) p data.format
> $14 = 8
> (gdb) p data.length
> $14 = 8
>
> The contents look like little-endian 16 bit data, so I wonder
> KColorChooser can DND to itself across endian properly?
Amazing how people manage to interpret such a simple spec still quite
differently :-}
I'm not really very deep into this stuff, but Qt does:
XChangeProperty ( QPaintDevice::x11AppDisplay(), req->requestor,
req->property,
req->target, 8, PropModeReplace,
(unsigned char *)a.data(), a.size() );
And a.data() essentially refers to ushort[4] so I don't think kcolorchooser
has a chance of working across endianness.
Does the 8 in the XChangeProperty call refer to your data.format above? Would
there be some sort of endian-conversion if it was 16? Where?
What is surprising (frightening?) is that the code in KDE is from 1999 and has
as comment: // A short int for each of R G B Alpha (compatible with gtk);
Cheers,
Waldo
- --
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/HS/eN4pvrENfboIRAiyMAJ9ru+E5jJJX2TjPQTktQAXCO+jzYwCfQcnf
cLWiq1HlrQL7w1Kul3ZZWHw=
=kJMi
-----END PGP SIGNATURE-----
More information about the xdg
mailing list