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 Tiles.Libraries.Manager is 
  10.  
  11.     -- Initializes the tile manager. This must be called before loading a 
  12.     -- library. 
  13.     procedure Initialize; 
  14.  
  15.     -- Finalizes the tile manager before application exit. No more libraries can 
  16.     -- be loaded after this has been called. However, references to loaded 
  17.     -- libraries will remain valid and must still be unloaded after use. 
  18.     procedure Finalize; 
  19.  
  20.     -- Synchronously loads a library by name. 'name' should be the base name 
  21.     -- of the library, not including path information or a file extension. 
  22.     -- If 'bitmaps' is True, all of the library's bitmaps will be loaded. 
  23.     -- Otherwise, just the tile information will be loaded. Null will be 
  24.     -- returned on error. 
  25.     -- 
  26.     -- Tile libraries are reference counted and must be unloaded with 
  27.     -- Unload_Library() when the caller is finished with it. 
  28.     function Load_Library( name : String; bitmaps : Boolean ) return A_Tile_Library; 
  29.  
  30.     -- Unloads a tile library by reference. It will not actually be removed from 
  31.     -- memory until all other references have been released. 
  32.     procedure Unload_Library( lib : in out A_Tile_Library ); 
  33.     pragma Postcondition( lib = null ); 
  34.  
  35. end Tiles.Libraries.Manager;