--
-- Copyright (c) 2012 Kevin Wellwood
-- All rights reserved.
--
-- This source code is distributed under the Modified BSD License. For terms and
-- conditions, see license.txt.
--
package Tiles.Libraries.Manager is
-- Initializes the tile manager. This must be called before loading a
-- library.
procedure Initialize;
-- Finalizes the tile manager before application exit. No more libraries can
-- be loaded after this has been called. However, references to loaded
-- libraries will remain valid and must still be unloaded after use.
procedure Finalize;
-- Synchronously loads a library by name. 'name' should be the base name
-- of the library, not including path information or a file extension.
-- If 'bitmaps' is True, all of the library's bitmaps will be loaded.
-- Otherwise, just the tile information will be loaded. Null will be
-- returned on error.
--
-- Tile libraries are reference counted and must be unloaded with
-- Unload_Library() when the caller is finished with it.
function Load_Library( name : String; bitmaps : Boolean ) return A_Tile_Library;
-- Unloads a tile library by reference. It will not actually be removed from
-- memory until all other references have been released.
procedure Unload_Library( lib : in out A_Tile_Library );
pragma Postcondition( lib = null );
end Tiles.Libraries.Manager;