package Tk
::DragDrop
::KDESite
;
$VERSION = '3.007'; # $Id: //depot/Tk8/DragDrop/DragDrop/KDESite.pm#7 $
use base qw(Tk::DropSite);
Tk
::DropSite
->Type('KDE');
$w->BindClientMessage('DndProtocol',[\
&KDEDrop
,$site]);
my ($string,$offset,$max) = @_;
return substr($string,$offset,$max);
my ($type,$time,$flags,$X,$Y) = unpack('LLLLL',$event->A);
my @data = $w->property('get','DndSelection','root');
if ($type == 128 && @data == 1 && $data[0] =~ /^file:(.*)$/)
# Grab a selection for compatibility with other DND schemes
my $seln = 'XdndSelection';
$w->SelectionHandle('-selection' => $seln, -type
=> 'FILE_NAME',
$w->SelectionOwn('-selection' => $seln,
-command
=> [\
&HandleLoose
,$w,$seln]);
$site->Apply(-dropcommand
=> $Y, $Y, $seln);
print join(' ',$type,$time,$flags,$X,$Y),':"',join(',',@data),'"',"\n";