DisplayScreen class method depth:width:height:fullscreen:
Last updated at 1:04 am UTC on 17 January 2006
From: Andreas Raab [SMTP:email@example.com]
To: 'The general-purpose Squeak developers list'
Subject: RE: What is supposed to be the effect of DisplayScreen class>depth:width:height:fullscreen: ?
Sent: 31.03.03 23:14
The primitive you're talking about has basically two purposes. It depends on
whether the fullscreen flag is true or false.
Mode A: fullscreen == false
This requests to change the size of the hosting window in a windowed
environment. In a non-windowed environment (such as using /dev/fb) it is
allowed to fall back to mode B.
Mode B: fullscreen == true
This requests to change the size of whatever it is Squeak is currently
displayed on - in other words, it means that the primitive (if supported)
should in fact change your monitor resolution (or whatever the equivalent)
to allow, for example, games or similar "fullscreen activities with fixed
resolutions" to take over the entire screen in a well-defined combination of
display size and depth.
As the hosting environment may support a change in depth in addition to the
resolution, the depth is passed into the primitive. Therefore, if you
request 640x480x16xfullscreen on a platform which supports it then your
screen should switch to 640x480x16 with Squeak being the only, fullscreen
visible thing in it.
However, if the hosting environment does not support changing the screen
resolution it is allowed to fall back to mode A (e.g., change the resolution
of the window or somesuch) as the primary request of the primitive is for a
certain resolution. The depth and the fullscreen flag are "optional" - e.g.,
may be ignored if the platform does not support changing any of these.
The primitive should fail only if:
the platform can support mode B but the parameters passed are invalid
(e.g., requesting 1024x768x32xfs on a platform which only supports
[Note: If a platform supports mode A and doesn't support mode B, then it
should essentially never fail and just change the window resolution].
BTW, the reason this is just one primitive is that for Squeak the effect is
the same - the size of what's reported by DisplayScreen>>actualScreenSize
will change to whatever was requested if the primitive succeeds. Everything
else is optional and allows for some attributations which are very handy if
you happen to know you're likely to run in a "window environment" - and the
fallback positions do allow you to get a reasonable approximation of what
you want if the primitive is not capable of dealing with screen resolutions
Clearly enough defined?! ;-)
> —–Original Message—–
> From: firstname.lastname@example.org
> [mailto:email@example.com] On
> Behalf Of Tim Rowledge
> Sent: Monday, March 31, 2003 8:55 PM
> To: firstname.lastname@example.org
> Subject: What is supposed to be the effect of DisplayScreen
> class>depth:width:height:fullscreen: ?
> This is a very curious primitive.
> First, there are no senders so I have to wonder if it is
> actually of any
> Secondly, just what is it supposed to do? Setting the
> fullscreen flag to
> true and the width or height to some number not equal to the
> full screen
> size does what exactly? Should the prim ignore w & if
> fullscreen = true?
> Setting the depth should do what? It can't set the depth of
> the Display
> object - that has to be done via methods like
> DisplayScreen>setExtent:depth:. I suppose it could possibly set the
> bitdepth of the OS window buffer (where one is used) but that
> seems like
> it is private to the VM.
> I can see a value in having a prim that programmatically sets
> the window
> size (which is why I ended up looking at this) but I don't think this
> prim is entirely suitable nor even properly defined nor even widely
> implemented. Any thoughts anyone?
> Tim Rowledge, email@example.com, http://sumeru.stanford.edu/tim
> Useful random insult:- Lightbulb over his head is burned out