// Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// 	private int [] img;
// 	private short width;
// 	private short height;
// 	private short hotspotX;
// 	private short hotspotY;
// 	
// 	public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY)
// 	{
// 		this.img = img;
// 		this.width = width;
// 		this.height = height;
// 		this.hotspotX = hotspotX;
// 		this.hotspotY = hotspotY;
// 	}
// 	
// 	public int[] getCursorBitmap()
// 	{
// 		return img;
// 	}
// 	
// 	public short getWidth()
// 	{
// 		return width;
// 	}
// 	
// 	public short getHeight()
// 	{
// 		return height;
// 	}
// 	
// 	public short getHotspotX()
// 	{
// 		return hotspotX;
// 	}
// 	
// 	public short getHotspotY()
// 	{
// 		return hotspotY;
// 	}
// }
// 
// Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/RemoteDesktopApplication.java
// public interface RemoteDesktopApplication
// {
// 	public void onScreenDimensionsChanged(int width, int height);
// 	public void onRemoteDimensionsChanged(int width, int height);
// 	public void onCursorChanged(int deltaX, int deltaY);
// 	public void onCursorSet(int x, int y);
// 	public void onCursorLeftClick();
// 	public void onSpecialKeyboardKey(short key);
// 	public void onKeyboardKey(char key);
// 	public void onRequestRemoteViewRefresh();
// 	public void requestDisconnect(boolean askUser);
// }


import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import com.jrdp.core.remote.rdp.Cursor;
import com.jrdp.core.remote.rdp.RemoteDesktopApplication;
/*
 * Copyright (C) 2013 JRDP Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.jrdp.client.android;



public class AndroidCanvas extends BitmapDrawable implements com.jrdp.core.remote.Canvas
{
	private RemoteDesktopApplication app;
	//TODO: possible leak with activity here, change to handler
	private Handler handler;
	private Cursor cursor;
	private boolean showCursor;
	private int cursorX;
	private int cursorY;
	
// Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// 	private int [] img;
// 	private short width;
// 	private short height;
// 	private short hotspotX;
// 	private short hotspotY;
// 	
// 	public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY)
// 	{
// 		this.img = img;
// 		this.width = width;
// 		this.height = height;
// 		this.hotspotX = hotspotX;
// 		this.hotspotY = hotspotY;
// 	}
// 	
// 	public int[] getCursorBitmap()
// 	{
// 		return img;
// 	}
// 	
// 	public short getWidth()
// 	{
// 		return width;
// 	}
// 	
// 	public short getHeight()
// 	{
// 		return height;
// 	}
// 	
// 	public short getHotspotX()
// 	{
// 		return hotspotX;
// 	}
// 	
// 	public short getHotspotY()
// 	{
// 		return hotspotY;
// 	}
// }
// 
// Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/RemoteDesktopApplication.java
// public interface RemoteDesktopApplication
// {
// 	public void onScreenDimensionsChanged(int width, int height);
// 	public void onRemoteDimensionsChanged(int width, int height);
// 	public void onCursorChanged(int deltaX, int deltaY);
// 	public void onCursorSet(int x, int y);
// 	public void onCursorLeftClick();
// 	public void onSpecialKeyboardKey(short key);
// 	public void onKeyboardKey(char key);
// 	public void onRequestRemoteViewRefresh();
// 	public void requestDisconnect(boolean askUser);
// }


// Path: jrdp/android/src/main/java/com/jrdp/client/android/AndroidCanvas.java
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import com.jrdp.core.remote.rdp.Cursor;
import com.jrdp.core.remote.rdp.RemoteDesktopApplication;

/*
 * Copyright (C) 2013 JRDP Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.jrdp.client.android;



public class AndroidCanvas extends BitmapDrawable implements com.jrdp.core.remote.Canvas
{
	private RemoteDesktopApplication app;
	//TODO: possible leak with activity here, change to handler
	private Handler handler;
	private Cursor cursor;
	private boolean showCursor;
	private int cursorX;
	private int cursorY;
	
	public AndroidCanvas(Resources res, Bitmap bitmap, Handler handler, RemoteDesktopApplication app)