[Vm-dev] changes to Cross headers files
tak at metatoys.org
Mon Apr 21 22:41:03 UTC 2008
On Mon, Apr 21, 2008 at 1:22 PM, Andreas Raab <andreas.raab at gmx.de> wrote:
> Looks good to me. Can you say something about the intended use case for the
> dnd changes? Looks like you're trying to support drags out of Squeak? How
> would the image utilize this?
I added one event type (DragRequest = 5) and three primitives in
DropPlugin for OLPC etoys image.
HandMorph>>primitiveDndOutStart: aByteArray (DropPlugin>>primitiveDndOutStart:)
- Initialize drag out session and tell types (null separated strings) to VM.
- Answer a type which receiver program accepted.
HandMorph>>primitiveDndOutSend: aByteArray (DropPlugin>>primitiveDndOutSend:)
- Transfar actual data to the receiver.
1) For example, if you are about to drag a morph,
#primitiveDndOutStart: is called with types like
"image/png\0image/gif\0image/bmp". And VM starts drag out session.
2) If some application accepts it, DragRequest event is send to the
image. The image knows accepted type e.g. "img/png" through
#primitiveDndOutAcceptedType then send actual png data with
All other internal messy things like canceling the session are handled
inside VM and image don't care about them.
additional code for DropPlugin is:
and support codes for unix vm are:
More information about the Vm-dev