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. package Game_Views.Window_Hooks is 
  10.  
  11.     -- Returns True on the first call after the user attempts to close the 
  12.     -- application window. In Windows, this is when the user clicks the close 
  13.     -- button on the window or presses Alt+F4. In OS X, this is when the user 
  14.     -- clicks the red close button on the window, presses Apple+Q, or selects 
  15.     -- Quit from the application's menu bar. 
  16.     function Close_Window_Clicked return Boolean; 
  17.  
  18.     -- Registers window behavior hooks with Allegro. 
  19.     procedure Initialize; 
  20.  
  21.     -- Unregisters the window behavior hooks with Allegro. 
  22.     procedure Finalize; 
  23.  
  24. private 
  25.  
  26.     -- Called when the close button on the application window is clicked. 
  27.     procedure Close_Window_Callback; 
  28.     pragma Convention( C, Close_Window_Callback ); 
  29.  
  30.     -- Called when the application window regains focus. 
  31.     procedure Switch_In_Callback; 
  32.     pragma Convention( C, Switch_In_Callback ); 
  33.  
  34.     -- Called when the application window loses focus. 
  35.     procedure Switch_Out_Callback; 
  36.     pragma Convention( C, Switch_Out_Callback ); 
  37.  
  38. end Game_Views.Window_Hooks;