1. -- 
  2. -- Copyright (c) 2012 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. with Events; 
  10.  
  11. pragma Elaborate_All( Events ); 
  12.  
  13. package Events.Application is 
  14.  
  15.     -- A notification that the application window has lost focus. 
  16.     APP_BLUR_ID : constant Event_Id := To_Event_Id( "App_Blur" ); 
  17.  
  18.     -- A notification that the application window has regained focus. 
  19.     APP_FOCUS_ID : constant Event_Id := To_Event_Id( "App_Focus" ); 
  20.  
  21.     -- A notification that the user is attempting to close the window of the 
  22.     -- application. This does not have to be acted on, for instance, if the 
  23.     -- player hasn't saved his game yet. 
  24.     CLOSE_WINDOW_ID : constant Event_Id := To_Event_Id( "Close_Window" ); 
  25.  
  26.     -- A command to close the application, no questions asked. This event is 
  27.     -- queued when it's time for the application to quit. 
  28.     EXIT_APPLICATION_ID  : constant Event_Id := To_Event_Id( "Exit_Application" ); 
  29.  
  30.     ---------------------------------------------------------------------------- 
  31.  
  32.     -- Queues an App_Blur_Event. 
  33.     procedure Queue_App_Blur; 
  34.  
  35.     -- Queues an App_Focus_Event. 
  36.     procedure Queue_App_Focus; 
  37.  
  38.     -- Queues a Close_Window_Event. 
  39.     procedure Queue_Close_Window; 
  40.  
  41.     -- Queues a Exit_Application_Event. 
  42.     procedure Queue_Exit_Application; 
  43.  
  44. end Events.Application;