

int main( String[] args )
{
	WindowSprite	window = new WindowSprite() ;
	VirtualInput	input = new VirtualInput() ;

	window.setOptionalFlags
		( WindowSprite.flagAllowClose
			| WindowSprite.flagVariableWindowSize ) ;
	window.createDisplay
		( "Hello Window",
			WindowSprite.modeWindow, 1280, 720 ) ;
	input.attachPostListenerToWindow( window ) ;

	VirtualInput.Command	cmd = new VirtualInput.Command() ;
	VirtualInput.InputEvent	iev = new VirtualInput.InputEvent() ;
	for ( ; ; )
	{
		if ( input.getCommand( cmd ) )
		{
			if ( cmd.strID == VirtualInput.Command.AppExit )
			{
				break ;
			}
		}
		if ( input.getInputEvent( iev ) )
		{
			if ( (iev.typeDevice == VirtualInput.deviceKeyboard)
				|| (iev.codeKey == VirtualInput.vkeyEscape) )
			{
				break ;
			}
		}
		try
		{
			Thread.sleep( 1 ) ;
		}
		catch( Exception e )
		{
			break ;
		}
	}

	input.detachPostListenerToWindow( window ) ;
	window.closeDisplay() ;
	return	0 ;
}


