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

Louis LaBrunda Lou at Keystone-Software.com
Tue Jan 16 20:27:48 UTC 2018


Hi Bob,

Thanks.

>- build it for an arbitrarily large screen size and always shrink it 
>when displaying

I may try this.  The display of the calendar (to the right of the clock) is optional but I
don't include the calendar if including it shrinks the clock too much.  Some screens are more
square than others.  So, knowing sizes make things easier.

>- turn the changeover into a feature -- display it initially in a 
>low-res version scaled up to the needed size and then fade into the 
>high-res version as it becomes available

This sounds interesting but I'm not sure how to go about it.  Also, scaling down always seems
to look better than up.

Lou


>On 1/16/18 2:52 PM, Louis LaBrunda wrote:
>> Hi Eliot,
>>
>> Thanks for the reply.  Unfortunately that doesn't help.  I'm working on a clock morph that
>> allows the face of the clock to be a picture and optionally contain/display a calendar morph
>> with it.  For my current needs it will be displayed full screen.  I can get it to look good
>> under those circumstances.  When I'm finished, I would like to make both morphs available to
>> other Squeakers.  Therefor, I want it to look good in less than full screen mode.  Building
>> things for full screen size and shrinking them down, looks best.  So, I would like to know the
>> full screen size, build (run time construction of face, hands, calendar and such) the morphs
>> and then shrink them to the required size.  Without being able to do this there isn't much
>> reason to share the work as it will look bad to often.
>>
>> I will keep trying.  Maybe for now I will just put up with the flash of the screen to get its
>> size.
>>
>> Lou
>>
>>
>> On Tue, 16 Jan 2018 10:45:59 -0800, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>
>>> 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
>>>>
>>>>
>>>>
-- 
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon



More information about the Squeak-dev mailing list