From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail Subject: Re: Different screen parameters Newsgroups: comp.lang.ada References: <5ef1a1cc$0$1475$e4fe514c@news.kpn.nl> <5ef31d03$0$1441$e4fe514c@news.kpn.nl> From: ldries46 Date: Fri, 26 Jun 2020 09:23:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Message-ID: <5ef5a28d$0$1481$e4fe514c@news.kpn.nl> NNTP-Posting-Host: 6256398b.news.kpn.nl X-Trace: G=ENMxksgl,C=U2FsdGVkX1/gtXHpI55+TGtE00IIG03oR0GXGdKOZpDqbODKUArX8D4yw3eRRUIX9s4qf9ZwFmB2eibrCLNmMNBIXDX8mgT79ZMibMsu9tE= X-Complaints-To: abuse@kpn.nl Xref: reader01.eternal-september.org comp.lang.ada:59229 List-Id: Op 24-6-2020 om 14:16 schreef Jeffrey R. Carter: > On 6/24/20 11:29 AM, ldries46 wrote: >> Op 23-6-2020 om 11:54 schreef Jeffrey R. Carter: >>> On 6/23/20 8:31 AM, ldries46 wrote: >>>> >>>> My question is: >>>> Is there an Ada library that is able to somehow read the maximum >>>> sizes of the screen in pixels so I can firstly maximize my values >>>> for size definition in Gtk. >>> >>> Gnoga has package Gnoga.Gui.Screen that provides this kind of >>> information. >>> >> I found the procedures that can possibly give me the correct result >> bit I cannot find an example how tu use them in a Gtk environment. >> especially the value op the type Gnoga.Gui.Window.Window_Type I need > > Mainly, I was saying that you could use Gnoga if GTKAda doesn't > provide the information you need. > > These would require you to initialize a Gnoga application: > > procedure Get_Screen_Size (Height : out Positive; Width : out > Positive) is >    Window : Gnoga.Gui.Window.Window_Type; > begin -- Get_Screen_Size >    Gnoga.Application.Singleton.Initialize (Main_Window => Window); >    Height := Gnoga.Gui.Screen.Height (Window); >    Width  := Gnoga.Gui.Screen.Width  (Window); > end Get_Screen_Size; > > Possibly you could use this from a GTKAda application. > > On my system, these functions return a height of 1080 and a width of > 1920. > It looked nice but in my environment (Gtk) it looks like shooting with a Cannon at a fly.