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