[squeak-dev] Host Window Support (was: The Trunk: Graphics-bf.189.mcz)

Bert Freudenberg bert at freudenbergs.de
Fri Jan 6 12:46:17 UTC 2012

On 06.01.2012, at 05:49, Chris Muller wrote:

> Wow, you'd been holding back..!
> On Thu, Jan 5, 2012 at 11:49 AM,  <commits at source.squeak.org> wrote:
>> Bert Freudenberg uploaded a new version of Graphics to project The Trunk:
>> http://source.squeak.org/trunk/Graphics-bf.189.mcz
>> ==================== Summary ====================
>> Name: Graphics-bf.189
>> Author: bf
>> Time: 5 January 2012, 6:49:09.36 pm
>> UUID: d007ccad-e223-498d-9e78-bfc861403099
>> Ancestors: Graphics-bf.188
>> Add host window support. This is based on the stubs found in Pharo, with various fixes and extensions by me. In particular, I added event handling support. See examplePaint in DisplayHostWindow class.
>> =============== Diff against Graphics-bf.188 ===============

Hehe, well, the bulk of this code comes from Tim's/John's old Areithfa Ffenestri work which was used in Sophie:

	((PackageInfo named: 'Graphics-External-Ffenestri') methods
		inject: Bag new
		into: [:b :m | b add: (m timeStamp copyUpTo: $ ). b]
	) sortedCounts

==> {75->'JMM' . 40->'tpr' . 21->'bf' . 7->'lr' . 3->'HenrikSperreJohansen' . 2->'StephaneDucasse' . 1->'nice'}

Note that I do not intend to make this work with Morphic. Rather, it's the bare minimum needed to experiment with alternative UIs - you get events as input, and a display surface for output, and can do anything you want there. E.g., the "examplePaint" method processes events and paints onto the window, without any "UI framework".

This works on the Mac, it should work on Windows (untested), does not work on X11 until more of the HostWindowPlugin is implemented.

Clicking a window should make it active, that does not happen on the Mac right now (you have to click the title bar, or press cmd-`). We may need a VM change for that, or possibly change some flags on the window.

Help welcome :)

- Bert -

More information about the Squeak-dev mailing list