Multiple OS Windows for Squeak?

Andreas Raab andreas.raab at gmx.de
Sun Apr 18 00:26:35 UTC 2004


Tim,

> > No, actually it isn't. If you look at the amount of C code which is
involved
> > in window management it really isn't all that much and dealing with it
on
> > the Squeak end would require no more than we're doing anyway (e.g., use
a
> > few prims to fetch the events and draw some stuff). It's actually a
fairly
> > minor effort to do this if you focus on the right aspects (but I will
> > acknowledge that it is *very* tempting to go beyound it and screw up
> > royally).
> I'd be delighted to be proven wrong - though I truly think you're
> underestimating the effort.

I truly think you're wrong here ;-) Let's see ... two areas we need to fix:
a) We can't rely on implicit updates of the window after BitBlt (or at least
not easily at this point) but that's essentially equivalent to
#forceToScreen: which we have in the bag already and b) we need to pass up
invalidation events since we can't any longer rely on other windows being
updated via fullDisplayUpdate() implicitly. But besides this ... what else
do we need? We could still route the events via the single vm event queue
(just associate a window ID with the event - I quite deliberately left room
for those in the event structure ;-) and dispatch accordingly. Add
primitives for:
a) window creation/destroy
b) window manipulation (visibility, position, size...)
c) window display
and we're done here.
Really, if I weren't busy with other stuff I'd pull out some code which did
almost all of the above and fix it to get it to a working demo. I still have
it somewhere and trust me it wasn't much.

> Nothing wrong with keeping a single main window as special but as John
> points out you need to have the update window type routines able to
> handle many windows instead of assuming The One True.

Right, but that boils down to a #displayImage:at:sourceRect: primitive.

> > Bah... why bother? Wanna know how I think about this? Display should
really
> > be an alias to whatever the host "display system" represents, (for
example
> > the X-server on Linux) and when you draw to display you get something
> > looking like here:
> >
> > http://www.impara.de/~andreas/sample.png
> >
> > *Then* you create a window on that display and associate whatever kind
of
> > drawing surface you want with it (or use the native graphics interface).
> > What you need to do this is a pretty small interface across the
platforms
> > with the only "fast path" being the ability to throw bits to the display
> > surface (e.g., what we do today already).
>
> Very cool idea - tell us more.

Oh, the above was just a fall-out of looking at printing support. Since the
interface to printing and display is fairly similar on windows it's really
simple to just open a display instead of a printer device and draw onto that
one. Makes a lot of sense when you think about it - both display and printer
are physical devices that share lots of common properties.

> One thing that bothers me about the idea
> is that (remembering ancient NT related stuff) some OS's don't want you
> to be able to read or write over the whole screen for security reasons
> or wotnot. NT for example claimed you couldn't do the old ObjectWorks
> tpye window opening with a marquee because it violated their C2
> security.

I call that other people's problems ;-) Seriously, if an OS is too stupid to
allow you to do cool stuff you might be forced to open a window first so
drawing onto "Display" might not be supported on all platforms.

> > The only one I acknowledge from the above are fonts - those you have to
be
> > able to deal with (the screenshot above uses the platform Comic Sans
font)
> > but then again, there is no reason why you can't have both - host font
> > rendering as well as Squeak-internal text layout.
>
> Not sure I follow you here. You only acknowledge that people will ask
> for fonts, or that they're the only ones difficult?

Well, kinda both, but really my point was that fonts are the ones which are
really worthwhile (and hard) to get right.

> If only it were that simple.

I didn't say it's trivial. But I don't understand the big scepticism
either - it seems to me that the important part really is to use a carefully
defined set of abstractions which can be supported cross-platform as well as
emulated in reasonable ways. That's why I said it's both tempting and doomed
to do "too much" in this area - less is better. And if the basics are set
right, people can still add idiosynchratic support for whatever they like.

Cheers,
  - Andreas


                                                                                                                             Received: (qmail 18289 invoked from network); 17 Apr 2004 19:31:26 -0000
Received: from unknown (HELO 62.4.94.210) (218.190.88.34)
  by mail.theinternetone.net with SMTP; 17 Apr 2004 19:31:26 -0000
Received: from [82.252.248.126] by 62.4.94.210 SMTP id 0JNx7Ij18Esf8v; Sat, 17 Apr 2004 21:28:24 +0200
Message-ID: <vmxfa2tc343$$f8459 at od5rw>
From: "Manuel Costello" <j0hqsq at comcast.net>
Reply-To: "Manuel Costello" <j0hqsq at comcast.net>
To: lagedy at 444.net
Subject: New hair growth and color restored. zkhhdgnxlxm hh ypjo 
Date: Sat, 17 Apr 04 21:28:24 GMT
X-Mailer: QUALCOMM Windows Eudora Version 5.1
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary=".E5DC90_5D_.DE"
X-Priority: 3
X-MSMail-Priority: Normal


--.E5DC90_5D_.DE
Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable

x4gql
------------------------
Finest Quality H'G'H at 50% off retail. B'u'y 2 get 1 F_R_E_E!
please look at: http://www.hgh888.com 

Clinical evidence demonstrates that by replacing H'G'H in our bodies we ca=
n dramatically reverse the signs of aging!
* L.o.s.e Body-fat Fast!
* Improve Muscle Tone.
* Improved skin texture resulting in a more youthful appearance.
* Fewer skin wrinkles.
* Enhances overall physical and mental well being.
* Helps provide deeper, more restful sleep.
---------------------------------------
100% Guaranteed,Same Day Shipping.
B'U'Y NOW http://www.hgh888.com 
---------------------------------------
To be deleted from our member database,
click here http://www.hgh888.com/R.html r j edwil  xi m mzgigil hvmye wugp bliglgzvsrea yyo  dr

--.E5DC90_5D_.DE--

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  



More information about the Squeak-dev mailing list