Ok, i'm in favor of having everything in smalltalk too.

The problem i have is the following:  i want to change  "how" the VM
should announce events "were" the vm should draw

Regarding the "were", currently the VM has a primitive from which you
can specify which Form will act as the Display. But what if i want to
render to something else than a form?
Esteban: how does the COCOA VM draw the Display? Does it create a
NSWindow, with a custom view, which copies the bits from the Display
Form, into a drawing context (Quartz? OpenGL?).

If we are moving towards a vectorial framework( AthensCanvas rendering
to OpenGL or Cairo), we dont need to hardcode a "Display" a primitive
in the vm. there's no need for such primitive.
We just need access to the drawing context of the Pharo window, and
render whatever we want there.

We need the following: (using COCOA as an example)
an OS window =>NSWindow
with a custom view ==> subclass of NSView
that creates a Cairo surface to a quartz backend, from which in the
image side i can tell the AthensCanvas to draw into.

For the event part, i should directly change the platform specific
code for the Cocoa VM's?
Cocoa provides higher level events and the VM is encoding them into
Arrays, that in the image are decoded back into high level events (
see HandMorph>>generateEvt:from:). Which makes it hard to add new kind
of events, specifically those originated from the trackpad (pinch,
swipe, etc). (another BIG  problem is that  currently, all the VMs
arent encoding EXACTLY the same OS events into the VM Arrays of
events). I would like to play with the OS event encoding/decoding, to
not loose so much in the translation.

Please let me know wether i explained myself clearly, i'm still in the
process of understanding how to detach the VM from the Bitmapped
forms.

Fernando


On Tue, Dec 20, 2011 at 12:45 PM, Esteban Lorenzano <[email protected]> wrote:
>
> El 20/12/2011, a las 7:30a.m., Igor Stasenko escribió:
>>
>> I think what would be easier is to make a language side to handle everything.
>> Unfortunately in practice this means moving substantial parts implemented in 
>> C
>> and putting in smalltalk.
>
> +1
> It takes time... but in the long way is the best approach, I think.
>
>> I also don't see how separating it into 2 processes make things easier.
>> I think it will complicate things even more, because now you will need to
>> invent own communication schemes , which is also platform specific.
>> And possibly it will work slower because of IPC overhead.
>
> They are not easier... but can be better for applications. That's the 
> "default" behavior for mac and that's the reason why you usually don't have 
> UI freezes while doing stuff (of course, not all applications -nor our vm, I 
> changed it to single process-  works that way... because is harder to 
> maintain)
>
> best,
> Esteban
>

Reply via email to