Faking dragging to a window?
hello,
Suppose I have the window-id of a window and the name of a file.
Can I let the window (i.e. the application that owns the window) believe the
file has been dragged and dropped onto it?
If so, what is the highest-level library I can use to do that? Reading the
qt documentation (secooin drag&drop) I couldn't understand if this is
possible.
Thanks for any help.
PS: It is for the program [url]http://onefinger.sf.net[/url], written in python.
--
Best Regards,
Maurizio Colucci --- [url]http://onefinger.sf.net[/url]
Please remove the uppercase letters "S,P,A,M":
[email]seSgPuAsMo.forever@tin.it[/email]
Re: Faking dragging to a window?
On Mon, 20 Sep 2004 17:34:21 GMT, seguso staggered into the Black Sun
and said:[color=blue]
> Suppose I have the window-id of a window and the name of a file. Can
> I let the window (i.e. the application that owns the window) believe
> the file has been dragged and dropped onto it?
>
> If so, what is the highest-level library I can use to do that? Reading
> the qt documentation (secooin drag&drop) I couldn't understand if this
> is possible.[/color]
Qt would be the thing to use if you can manage that. What is "secooin"?
DCOP may be able to do this. A quick troll with kdcop on a few
applications didn't show anything obvious.
If that's not possible, or is too hard, you can use the XTest extension
to send fake mouse-motion and fake mouse-button presses to the X server.
I assume you already have the coordinates of the window(s) where the
files are. XTest has a C interface; I'm not sure whether there are any
bindings for any other languages.
[color=blue]
> PS: It is for the program [url]http://onefinger.sf.net[/url], written in python.[/color]
I tried that. Dark blue on black is not the worst color scheme in
existence, but it is pretty damned bad. Make the default different, or
at least get the user's preferences using the same mechanism that KDE
uses (KDE Control Center->Appearance and Themes->Colors) so the
background and the text will look appropriate.
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
[url]http://www.brainbench.com[/url] / Hire me!
-----------------------------/ [url]http://crow202.dyndns.org/~mhgraham/resume[/url]