[squeak-dev] Is there a way to determine the screen size without first going to full screen mode?

Eliot Miranda eliot.miranda at gmail.com
Tue Jan 16 18:45:59 UTC 2018


Hi Lou,

On Tue, Jan 16, 2018 at 9:13 AM, Louis LaBrunda <Lou at keystone-software.com>
wrote:

> Hi Fabio,
>
> Thanks for the reply.  You would think so but it gives the current World
> windows size and not
> the monitor screen size.
>
> If I change to full screen mode, I can then get the screen size and change
> back to non-full
> screen mode but the screen blinks to full screen and back and I don't want
> that.
>

There is an implementation in the Terf VM:

primitiveHostWindowScreenWorkAreaSize: windex
<option: #TerfVM>
"Answer the platform's notion of the available work area on the screen
containing the given window."
| size |
self primitive: 'primitiveHostWindowScreenWorkAreaSize'
parameters: #(SmallInteger).
size := self ioSizeOfScreenWorkArea: windex.
size = -1 ifTrue:
[^interpreterProxy primitiveFail].
^self pointFromCompactPointEncoding: size

But this would require you build your own HostWindowPlugin and set the
TerfVM option while building it.  This isn't much of an answer but I hope
that some time this year this code will be more generally available.  Sorry
:-(


>
> Lou
>
>
> On Tue, 16 Jan 2018 16:59:16 +0000, Fabio Niephaus <lists at fniephaus.com>
> wrote:
>
> >Hi Lou,
> >
> >Isn't primitive 106 (screen size) what you are looking for?
> >
> >Best,
> >Fabio
> >
> >On Tue, 16 Jan 2018 at 5:44 pm, Louis LaBrunda <Lou at keystone-software.com
> >
> >wrote:
> >
> >> Hi,
> >>
> >> Is there a way to determine the screen size without first going to full
> >> screen mode?
> >>
> >> Lou
> >> --
> >> Louis LaBrunda
> >> Keystone Software Corp.
> >> SkypeMe callto://PhotonDemon
> >>
> >>
> >>
> --
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
>
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180116/9d111c81/attachment.html>


More information about the Squeak-dev mailing list