package openfl.utils {
import openfl.utils.Future;
import openfl.text.Font;
import openfl.media.Sound;
import openfl.events.Event;
import openfl.display.MovieClip;
import openfl.display.BitmapData;
/**
 * 	The Assets class provides a cross-platform interface to access
 * 	embedded images, fonts, sounds and other resource files.
 * 
 * 	The contents are populated automatically when an application
 * 	is compiled using the OpenFL command-line tools, based on the
 * 	contents of the *.xml project file.
 * 
 * 	For most platforms, the assets are included in the same directory
 * 	or package as the application, and the paths are handled
 * 	automatically. For web content, the assets are preloaded before
 * 	the start of the rest of the application. You can customize the
 * 	preloader by extending the `NMEPreloader` class,
 * 	and specifying a custom preloader using <window preloader="" />
 * 	in the project file.
 * 
 * 	@see [Working with bitmap assets](https://books.openfl.org/openfl-developers-guide/working-with-bitmaps/working-with-bitmap-assets.html)
 * 	@see [Working with byte array assets](https://books.openfl.org/openfl-developers-guide/working-with-byte-arrays/working-with-byte-array-assets.html)
 * 	@see [Working with font assets](https://books.openfl.org/openfl-developers-guide/using-the-textfield-class/working-with-font-assets.html)
 * 	@see [Working with sound assets](https://books.openfl.org/openfl-developers-guide/working-with-sound/working-with-sound-assets.html)
 * 
 * @externs
 */
public class Assets {
	public static var cache:openfl.utils.IAssetCache;
	public static function addEventListener(type:String, listener:*, useCapture:Boolean = undefined, priority:int = undefined, useWeakReference:Boolean = undefined):void {}
	public static function dispatchEvent(event:openfl.events.Event):Boolean { return false; }
	/**
	 * 		Returns whether a specific asset exists
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	type	The asset type to match, or null to match any type
	 * 		@return		Whether the requested asset ID and type exists
	 * 	
	 */
	public static function exists(id:String, type:String = undefined):Boolean { return false; }
	/**
	 * 		Gets an instance of an embedded bitmap.
	 * 
	 * 		```haxe
	 * 		var bitmap = new Bitmap (Assets.getBitmapData ("image.png"));
	 * 		```
	 * 
	 * 		_Note:_ This method may behave differently, depending on the target
	 * 		platform. On targets that can quickly create new BitmapData instances
	 * 		synchronously, every call to `Assets.getBitmapData()` with the same ID
	 * 		will return a BitmapData instance with its own separate copy of the
	 * 		underlying image data. However, on other targets where loading
	 * 		BitmapData synchronously is unacceptably slow, or where BitmapData may
	 * 		not be loaded synchronously at all (meaning that there is no choice but
	 * 		to load it asynchronously), every call to `Assets.getBitmapData()` with
	 * 		the same ID may return a BitmapData instance that shares the same
	 * 		underlying image data each time.
	 * 
	 * 		With that in mind, modifying or disposing the contents of the BitmapData
	 * 		returned by `Assets.getBitmapData()` may affect the results of future
	 * 		calls to `Assets.getBitmapData()` on some targets. To access a
	 * 		BitmapData instance that may be modified or disposed without affecting
	 * 		future calls to `Assets.getBitmapData()`, call the BitmapData instance's
	 * 		`clone()` method to manually create a copy.
	 * 
	 * 		@param	id		The ID or asset path for the bitmap
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		A new BitmapData object
	 * 
	 * 		@see [Working with bitmap assets](https://books.openfl.org/openfl-developers-guide/working-with-bitmaps/working-with-bitmap-assets.html)
	 * 	
	 */
	public static function getBitmapData(id:String, useCache:Boolean = undefined):openfl.display.BitmapData { return null; }
	/**
	 * 		Gets an instance of an embedded binary asset
	 * 
	 * 		```haxe
	 * 		var bytes = Assets.getBytes ("file.zip");
	 * 		```
	 * 
	 * 		@param	id		The ID or asset path for the asset
	 * 		@return		A new ByteArray object
	 * 
	 * 		@see [Working with byte array assets](https://books.openfl.org/openfl-developers-guide/working-with-byte-arrays/working-with-byte-array-assets.html)
	 * 	
	 */
	public static function getBytes(id:String):openfl.utils.ByteArray { return null; }
	/**
	 * 		Gets an instance of an embedded font
	 * 
	 * 		```haxe
	 * 		var fontName = Assets.getFont ("font.ttf").fontName;
	 * 		```
	 * 
	 * 		@param	id		The ID or asset path for the font
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		A new Font object
	 * 
	 * 		@see [Working with font assets](https://books.openfl.org/openfl-developers-guide/using-the-textfield-class/working-with-font-assets.html)
	 * 	
	 */
	public static function getFont(id:String, useCache:Boolean = undefined):openfl.text.Font { return null; }
	public static function getLibrary(name:String):* { return null; }
	/**
	 * 		Gets an instance of an included MovieClip
	 * 
	 * 		```haxe
	 * 		var movieClip = Assets.getMovieClip ("library:BouncingBall");
	 * 		```
	 * 
	 * 		@param	id		The ID for the MovieClip
	 * 		@return		A new MovieClip object
	 * 	
	 */
	public static function getMovieClip(id:String):openfl.display.MovieClip { return null; }
	public static function getMusic(id:String, useCache:Boolean = undefined):openfl.media.Sound { return null; }
	/**
	 * 		Gets the file path (if available) for an asset
	 * 
	 * 		```haxe
	 * 		var path = Assets.getPath ("file.txt");
	 * 		```
	 * 
	 * 		@param	id		The ID or asset path for the asset
	 * 		@return		The path to the asset, or null if it does not exist
	 * 	
	 */
	public static function getPath(id:String):String { return null; }
	/**
	 * 		Gets an instance of an embedded sound
	 * 
	 * 		```haxe
	 * 		var sound = Assets.getSound ("sound.wav");
	 * 		```
	 * 
	 * 		@param	id		The ID or asset path for the sound
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		A new Sound object
	 * 
	 * 		@see [Working with sound assets](https://books.openfl.org/openfl-developers-guide/working-with-sound/working-with-sound-assets.html)
	 * 	
	 */
	public static function getSound(id:String, useCache:Boolean = undefined):openfl.media.Sound { return null; }
	/**
	 * 		Gets an instance of an embedded text asset
	 * 
	 * 		```haxe
	 * 		var text = Assets.getText ("text.txt");
	 * 		```
	 * 
	 * 		@param	id		The ID or asset path for the asset
	 * 		@return		A new String object
	 * 	
	 */
	public static function getText(id:String):String { return null; }
	public static function hasEventListener(type:String):Boolean { return false; }
	public static function hasLibrary(name:String):Boolean { return false; }
	/**
	 * 		Connects a user-defined class to a related asset class.
	 * 
	 * 		This method call is added to the beginning of user-defined class constructors when
	 * 		the `@:bind` meta-data is used. This allows insertion of related asset resources in
	 * 		compatible super classes, such as `openfl.display.MovieClip`.
	 * 		@param	className 		The registered class name of the asset constructor
	 * 		@param  instance		The current class instance to be bound (default is null)
	 * 		@return		Whether asset binding was successful
	 * 	
	 */
	public static function initBinding(className:String, instance:* = undefined):void {}
	/**
	 * 		Returns whether an asset is "local", and therefore can be loaded synchronously
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	type	The asset type to match, or null to match any type
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return	Whether the asset is local
	 * 	
	 */
	public static function isLocal(id:String, type:String = undefined, useCache:Boolean = undefined):Boolean { return false; }
	/**
	 * 		Returns a list of all embedded assets (by type)
	 * 		@param	type	The asset type to match, or null to match any type
	 * 		@return	An array of asset ID values
	 * 	
	 */
	public static function list(type:String = undefined):Array { return null; }
	/**
	 * 		Loads an included bitmap asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadBitmapData ("image.png").onComplete (handleImage);
	 * 		```
	 * 
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		Returns a Future<BitmapData>
	 * 
	 * 		@see [Working with bitmap assets](https://books.openfl.org/openfl-developers-guide/working-with-bitmaps/working-with-bitmap-assets.html)
	 * 	
	 */
	public static function loadBitmapData(id:String, useCache:Object = undefined):openfl.utils.Future { return null; }
	/**
	 * 		Loads an included byte asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadBytes ("file.zip").onComplete (handleBytes);
	 * 		```
	 * 
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@return		Returns a Future<ByteArray>
	 * 
	 * 		@see [Working with byte array assets](https://books.openfl.org/openfl-developers-guide/working-with-byte-arrays/working-with-byte-array-assets.html)
	 * 	
	 */
	public static function loadBytes(id:String):openfl.utils.Future { return null; }
	/**
	 * 		Loads an included font asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadFont ("font.ttf").onComplete (handleFont);
	 * 		```
	 * 
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		Returns a Future<Font>
	 * 
	 * 		@see [Working with font assets](https://books.openfl.org/openfl-developers-guide/using-the-textfield-class/working-with-font-assets.html)
	 * 	
	 */
	public static function loadFont(id:String, useCache:Object = undefined):openfl.utils.Future { return null; }
	/**
	 * 		Load an included AssetLibrary
	 * 		@param	name		The name of the AssetLibrary to load
	 * 		@return		Returns a Future<AssetLibrary>
	 * 	
	 */
	public static function loadLibrary(name:String):openfl.utils.Future { return null; }
	/**
	 * 		Loads an included music asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadMusic ("music.ogg").onComplete (handleMusic);
	 * 		```
	 * 
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		Returns a Future<Sound>
	 * 	
	 */
	public static function loadMusic(id:String, useCache:Object = undefined):openfl.utils.Future { return null; }
	/**
	 * 		Loads an included MovieClip asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadMovieClip ("library:BouncingBall").onComplete (handleMovieClip);
	 * 		```
	 * 
	 * 		@param	id 		The ID for the asset
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		Returns a Future<MovieClip>
	 * 	
	 */
	public static function loadMovieClip(id:String):openfl.utils.Future { return null; }
	/**
	 * 		Loads an included sound asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadSound ("sound.wav").onComplete (handleSound);
	 * 		```
	 * 
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		Returns a Future<Sound>
	 * 
	 * 		@see [Working with sound assets](https://books.openfl.org/openfl-developers-guide/working-with-sound/working-with-sound-assets.html)
	 * 	
	 */
	public static function loadSound(id:String, useCache:Object = undefined):openfl.utils.Future { return null; }
	/**
	 * 		Loads an included text asset asynchronously
	 * 
	 * 		```haxe
	 * 		Assets.loadText ("text.txt").onComplete (handleString);
	 * 		```
	 * 
	 * 		@param	id 		The ID or asset path for the asset
	 * 		@param	useCache		(Optional) Whether to allow use of the asset cache (Default: true)
	 * 		@return		Returns a Future<String>
	 * 	
	 */
	public static function loadText(id:String):openfl.utils.Future { return null; }
	/**
	 * 		Registers an AssetLibrary binding for use with @:bind or Assets.bind
	 * 		@param	className		The class name to use for the binding
	 * 		@param	method		The AssetLibrary responsible for the binding
	 * 	
	 */
	public static function registerBinding(className:String, library:openfl.utils.AssetLibrary):void {}
	/**
	 * 		Registers a new AssetLibrary with the Assets class
	 * 		@param	name		The name (prefix) to use for the library
	 * 		@param	library		An AssetLibrary instance to register
	 * 	
	 */
	public static function registerLibrary(name:String, library:openfl.utils.AssetLibrary):void {}
	public static function removeEventListener(type:String, listener:*, capture:Boolean = undefined):void {}
	public static function unloadLibrary(name:String):void {}
	/**
	 * 		Unregisters an AssetLibrary binding for use with @:bind or Assets.bind
	 * 		@param	className		The class name to use for the binding
	 * 		@param	method		The AssetLibrary responsible for the binding
	 * 	
	 */
	public static function unregisterBinding(className:String, library:openfl.utils.AssetLibrary):void {}
}
}
