Ffenestri (multiple host window support), and Mac Host Menus
John M McIntosh
johnmci at smalltalkconsulting.com
Wed Jan 17 07:14:15 UTC 2007
mmm.
Well in Sophie we set things up to allow quicktime to draw to a
surface. What we do is setup a GWorld via FFI and call our
quicktime plugin to setup a squeak surface that points to the the
GWorld. Then we tell Quicktime to draw to the GWorld, the
plugin is setup to signal a semaphore when quicktime has finished
drawing a frame. So we wait on the semaphore, and when
fired we flush the form to Display.
For the browser plugin I use this to create a CGBitmapContext
SharedBrowserBitMapContextRef = CGBitmapContextCreate
(SharedMemoryBlock,width,height,
8,rowBytes,colorspace,kCGImageAlphaNoneSkipFirst);
then later do
CGContextDrawImage(SharedBrowserBitMapContextRef, clip, image);
to draw to this bitmap
or
CGContextDrawImage(targetWindowBlock->context, clip, image); to
draw to the window context.
image is a CGImageCreate using a CGDataProviderCreateDirectAccess
which points to the squeak form, usually the Display.
With I think the right parms the CGBitmapContextCreate could write
bits to a Squeak Surface.
I can't say how you would interface to Quartz Composer, first it
would look like you need the Obj-C interface logic, then follow the
instruction on how to use the QCRenderer class to draw to an openGL
context. Which at this point you have exhausted my knowledge of
how to continue.
Evil things, I note the copybits logic grabs an extra word off the
end of a form. That can cause a VM memory protection depending on
how the bitmap storage area was created. In Sophie we tried to use
the Cairo png reader but found this copybits bug was an issue.
On Jan 16, 2007, at 12:58 PM, Edgar J. De Cleene wrote:
> El 1/16/07 5:38 PM, "John M McIntosh"
> <johnmci at smalltalkconsulting.com>
> escribió:
>
>> However no-one I know is using the multiple window support.
>
> All what John send works fine, he is working a lot with this.
>
> I ask he and repeat for all what have Mac and knowledge of Quartz
> Composer
> if some kind of Squeak drive is possible.
>
> I mean some like the attached file could be generated inside Squeak
> (not in
> Quarz Composer) but performed into a host window.
>
> Maybe I again ask stupid things :=)
>
> Edgar
>
> <Blob.qtz>
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|