Is there a way to determine the screen size without first going to full screen mode?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to determine the screen size without first going to full screen mode?

Louis LaBrunda
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


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to determine the screen size without first going to full screen mode?

marcel.taeumel
Well, on my Windows machine, the call "SmalltalkImage current getSystemAttribute: 10003" returns a string with interesting information about your GFX hardware including the "primary monitor resolution".

Graphics Hardware Details
-------------------------
Display Information: 
Graphics adapter name: Intel(R) HD Graphics 5000
Primary monitor resolution: 2560 x 1440

Device: ???
Adapter String: Intel(R) HD Graphics 5000
Bios String: Intel Video BIOS
Chip Type: Intel(R) HD Graphics Family
DAC Type: Internal
Memory Size: 0x40000000

Driver Versions:
igdumdim64: 

Best,
Marcel

Am 16.01.2018 17:44:08 schrieb Louis LaBrunda <[hidden email]>:

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




Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to determine the screen size without first going to full screen mode?

fniephaus
In reply to this post by Louis LaBrunda
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 <[hidden email]> 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 <a href="callto://PhotonDemon" target="_blank">callto://PhotonDemon




Reply | Threaded
Open this post in threaded view
|

Is there a way to determine the screen size without first going to full screen mode?

Louis LaBrunda
In reply to this post by marcel.taeumel
Hi Marcel,

Thanks for the reply.  Your suggestion would work but it is only for windows.  Maybe I can find
another solution for linux and check the system type first and then use the appropriate one.

Lou

On Tue, 16 Jan 2018 17:58:15 +0100, Marcel Taeumel <[hidden email]> wrote:

>Well, on my Windows machine, the call "SmalltalkImage current getSystemAttribute: 10003" returns a string with interesting information about your GFX hardware including the "primary monitor resolution".
>
>Graphics Hardware Details
>-------------------------
>Display Information: 
>Graphics adapter name: Intel(R) HD Graphics 5000
>Primary monitor resolution: 2560 x 1440
>
>Device: ???
>Adapter String: Intel(R) HD Graphics 5000
>Bios String: Intel Video BIOS
>Chip Type: Intel(R) HD Graphics Family
>DAC Type: Internal
>Memory Size: 0x40000000
>
>Driver Versions:
>igdumdim64: 
>
>Best,
>Marcel
>Am 16.01.2018 17:44:08 schrieb Louis LaBrunda <[hidden email]>:
>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


Reply | Threaded
Open this post in threaded view
|

Is there a way to determine the screen size without first going to full screen mode?

Louis LaBrunda
In reply to this post by fniephaus
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.

Lou


On Tue, 16 Jan 2018 16:59:16 +0000, Fabio Niephaus <[hidden email]> 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 <[hidden email]>
>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


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to determine the screen size without first going to full screen mode?

Eliot Miranda-2
Hi Lou,

On Tue, Jan 16, 2018 at 9:13 AM, Louis LaBrunda <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>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


Reply | Threaded
Open this post in threaded view
|

Is there a way to determine the screen size without first going to full screen mode?

Louis LaBrunda
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 <[hidden email]> wrote:

>Hi Lou,
>
>On Tue, Jan 16, 2018 at 9:13 AM, Louis LaBrunda <[hidden email]>
>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 <[hidden email]>
>> 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 <[hidden email]
>> >
>> >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


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to determine the screen size without first going to full screen mode?

Bob Arning-2

you could

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

- 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


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 [hidden email] wrote:

Hi Lou,

On Tue, Jan 16, 2018 at 9:13 AM, Louis LaBrunda [hidden email]
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 [hidden email]
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 <[hidden email]

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






Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to determine the screen size without first going to full screen mode?

timrowledge
In reply to this post by Louis LaBrunda

> On 16-01-2018, at 11:52 AM, Louis LaBrunda <[hidden email]> 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.

This is why I keep trying to get some action for a decent vector graphics system.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
In the long run, every program becomes rococco, and then rubble.



Reply | Threaded
Open this post in threaded view
|

Is there a way to determine the screen size without first going to full screen mode?

Louis LaBrunda
In reply to this post by Bob Arning-2
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 <[hidden email]> wrote:
>>
>>> Hi Lou,
>>>
>>> On Tue, Jan 16, 2018 at 9:13 AM, Louis LaBrunda <[hidden email]>
>>> 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 <[hidden email]>
>>>> 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 <[hidden email]
>>>>>
>>>>> 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