comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Different screen parameters
Date: Wed, 24 Jun 2020 14:16:20 +0200	[thread overview]
Message-ID: <rcvg6k$4rf$1@dont-email.me> (raw)
In-Reply-To: <5ef31d03$0$1441$e4fe514c@news.kpn.nl>

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

  reply	other threads:[~2020-06-24 12:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  6:31 Different screen parameters ldries46
2020-06-23  9:14 ` Luke A. Guest
2020-06-23  9:54 ` Jeffrey R. Carter
2020-06-24  9:29   ` ldries46
2020-06-24 12:16     ` Jeffrey R. Carter [this message]
2020-06-26  7:23       ` ldries46
2020-06-26 11:47         ` ldries46
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox