primitive

Bagus Mahawan iwan at a-vip.com
Thu Jan 23 01:41:46 UTC 2003


Hi,

I'm trying to show an image read from the file to squeak's window, like
below:
  aForm _ ImageReadWriter formFromFileNamed: 'foo.jpg'.
  aForm displayAt: 0 at 0.

but instead of using displayAt method (or displayOn:... etc), I want to let
a primitive to do the stuff, i.e., a primitive that acts like displayAt:
method.
The goal is to replace the above code like the following:
  aForm _ ImageReadWriter formFromFileNamed: 'foo.jpg'.
  aForm doIt.

where doIt: is a method of Form class defined as:
  doIt
      <primitive: 'writeToSqueakDisp' module: 'Foo'>
      ^self primitiveFailed

Is it possible to implement a primitive that can manipulate pixels inside
squeak's window ? so that you can change the background image of the
squeak's window, for example.
Any help is greatly appreciated.

Regards,
Iwan



More information about the Squeak-dev mailing list