1. package Game_Views.Window_Hooks is 
  2.  
  3.     -- Register window behavior hooks with Allegro. 
  4.     procedure Initialize; 
  5.  
  6.     -- Unregister the hooks. 
  7.     procedure Finalize; 
  8.  
  9.     -- Returns True on the first call after the close window button has been 
  10.     -- clicked. For OS X this can also mean pressing Apple + Q or selecting Quit 
  11.     -- in the application's menu. 
  12.     function Close_Window_Clicked return Boolean; 
  13.  
  14. private 
  15.  
  16.     -- Called when the close button on the application window is clicked. 
  17.     procedure Close_Window_Callback; 
  18.     pragma Convention( C, Close_Window_Callback ); 
  19.  
  20.     -- Called when the application window regains focus. 
  21.     procedure Switch_In_Callback; 
  22.     pragma Convention( C, Switch_In_Callback ); 
  23.  
  24.     -- Called when the application window loses focus. 
  25.     procedure Switch_Out_Callback; 
  26.     pragma Convention( C, Switch_Out_Callback ); 
  27.  
  28. end Game_Views.Window_Hooks;