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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Different screen parameters Date: Wed, 24 Jun 2020 14:16:20 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5ef1a1cc$0$1475$e4fe514c@news.kpn.nl> <5ef31d03$0$1441$e4fe514c@news.kpn.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 24 Jun 2020 12:16:20 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="6363dbd7ebf78e76fd5ed02fdba11fd5"; logging-data="4975"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19STkCFzTU4A0uc4gBZ59/LB4uVC3wPrhU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cancel-Lock: sha1:6WhwN6XiBMAJe3mOLiKy/InG5+0= In-Reply-To: <5ef31d03$0$1441$e4fe514c@news.kpn.nl> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:59198 List-Id: 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. -- Jeff Carter "When and now is this guitar piece from Stottlemeyer? Yes, it's with Mr. Dog in Gertrude's pinball forest." The World's Funniest Joke 133