comp.lang.ada
 help / color / mirror / Atom feed
* OSX Quit is not the same as Close
@ 2018-12-15 11:23 ahlan.marriott
  2018-12-16 19:35 ` gautier_niouzes
  0 siblings, 1 reply; 4+ messages in thread
From: ahlan.marriott @ 2018-12-15 11:23 UTC (permalink / raw)


Hi,

Our applications use GtkAda and catch the main window close-event to shutdown.
Under Windows this works fine but OSX differentiates between closing the main window and quitting the application.
Under OSX closing the main window behaves as expected but using Quit from the docking icon has no effect
From what I understand (which of course is very little) we need to catch the NsApplicationShouldTerminate event - which has nothing to do with Gtk because it has nothing to do with the GUI - an application can be asked to terminate even if it hasn't got a GUI.

But how do I go about catching and processing this signal.
Does anyone know how to do this in Ada?

Best wishes,
Ahlan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OSX Quit is not the same as Close
  2018-12-15 11:23 OSX Quit is not the same as Close ahlan.marriott
@ 2018-12-16 19:35 ` gautier_niouzes
  2018-12-17  7:10   ` ahlan.marriott
  0 siblings, 1 reply; 4+ messages in thread
From: gautier_niouzes @ 2018-12-16 19:35 UTC (permalink / raw)


Hi Ahlan,
Just wild-guessing: perhaps you need to see how to close the main menu?
On Macs (GUI-wise) the Menu is the boss, even when all windows are closed.
On Windows, the main window is at the top and may contain a menu with a Quit command.
HTH
Gautier

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OSX Quit is not the same as Close
  2018-12-16 19:35 ` gautier_niouzes
@ 2018-12-17  7:10   ` ahlan.marriott
  2018-12-21 18:26     ` ahlan.marriott
  0 siblings, 1 reply; 4+ messages in thread
From: ahlan.marriott @ 2018-12-17  7:10 UTC (permalink / raw)


On Sunday, 16 December 2018 20:35:38 UTC+1, gautier...@hotmail.com  wrote:
> Hi Ahlan,
> Just wild-guessing: perhaps you need to see how to close the main menu?
> On Macs (GUI-wise) the Menu is the boss, even when all windows are closed.
> On Windows, the main window is at the top and may contain a menu with a Quit command.
> HTH
> Gautier

All OSX applications have a menu, the first pulldown of which has the same name as the application and which contains a quit item. Selecting this does nothing. This may well be the same as the Quit in the dock. The question still remains though on how to catch the event generated by selecting this item because my program didn't create it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OSX Quit is not the same as Close
  2018-12-17  7:10   ` ahlan.marriott
@ 2018-12-21 18:26     ` ahlan.marriott
  0 siblings, 0 replies; 4+ messages in thread
From: ahlan.marriott @ 2018-12-21 18:26 UTC (permalink / raw)


On Monday, 17 December 2018 08:10:26 UTC+1, ahlan.m...@gmail.com  wrote:
> On Sunday, 16 December 2018 20:35:38 UTC+1, gautier...@hotmail.com  wrote:
> > Hi Ahlan,
> > Just wild-guessing: perhaps you need to see how to close the main menu?
> > On Macs (GUI-wise) the Menu is the boss, even when all windows are closed.
> > On Windows, the main window is at the top and may contain a menu with a Quit command.
> > HTH
> > Gautier
> 
> All OSX applications have a menu, the first pulldown of which has the same name as the application and which contains a quit item. Selecting this does nothing. This may well be the same as the Quit in the dock. The question still remains though on how to catch the event generated by selecting this item because my program didn't create it.

I guess that in order to do OSX specific things such as handle the menu quit or find out the filename that started the application (if the application was associated to a file) then I will need to use GtkOsxApplication.

Does anyone know if there are Ada bindings to GtkOsxApplication?

MfG
Ahlan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-21 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-15 11:23 OSX Quit is not the same as Close ahlan.marriott
2018-12-16 19:35 ` gautier_niouzes
2018-12-17  7:10   ` ahlan.marriott
2018-12-21 18:26     ` ahlan.marriott

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