[Lazarus] Is it possible to drag and drop a web browser URL into a Lazarus app?

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Mar 22 13:01:20 CET 2012

On 22 March 2012 11:59, Hans-Peter Diettrich <DrDiettrich1 at ...> wrote:
> Inter-process D&D requires special assistance by the OS. IMO such operations
> are limited to drop file names, or other pure text, unless a platform offers
> something like OLE-DragDrop.

That shouldn't be a problem for Lazarus LCL then, seeing that
"everything is native" and all Lazarus's target desktop platforms
support inter-process DND - yet the full inter-process DND support in
LCL is still missing. Will this be fixed before the 1.0 release?

Most OS's these days can and do use mime-types (just like the whole
internet does) for DND. But obviously each OS/platform has a different
way in which they transfer data between processes (I guess this is
what you meant by "like OLE-DragDrop"). Anyway, fpGUI uses mime-types
for DND, for in-app and cross-process DND. Under Windows, I still have
support for the older-style DND (eg: where data types are registered
as STRING or WIDESTRING like the clipboard etc). In the case of fpGUI
under Windows, I simply map those older data types to similar
mime-types automatically. X11 uses mime-types as-is (so no mapping or
trickery required under X11). Mac OS X also has mime-type DND support.
What's nice about X11's DND support is that no data is generated or
transferred until it is actually known that the drop target accepted
the drop. Windows unfortunately is not that clever and generates the
data resources when the DND action starts at the source, not when the
drop target accepts the drop. So Windows is a bit waist-full with
resources (what's new).

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list