// Class: lime._backend.html5.HTML5Mouse

var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this

$global.Object.defineProperty(exports, "__esModule", {value: true});

var __map_reserved = {};

// Imports

var $hxClasses = require("./../../../hxClasses_stub").default;
var $import = require("./../../../import_stub").default;
function lime_app_Application() {return require("./../../../lime/app/Application");}
function lime_ui_MouseCursor() {return require("./../../../lime/ui/MouseCursor");}
function Type() {return require("./../../../Type");}

// Constructor

var HTML5Mouse = function(){}

// Meta

HTML5Mouse.__name__ = ["lime","_backend","html5","HTML5Mouse"];
HTML5Mouse.prototype = {
	
};
HTML5Mouse.prototype.__class__ = $hxClasses["lime._backend.html5.HTML5Mouse"] = HTML5Mouse;

// Init



// Statics

HTML5Mouse.hide = function() {
	if(!HTML5Mouse.__hidden) {
		HTML5Mouse.__hidden = true;
		var _g = 0;
		var _g1 = (lime_app_Application().default).current.get_windows();
		while(_g < _g1.length) {
			var $window = _g1[_g];
			++_g;
			$window.backend.element.style.cursor = "none";
		}
	}
}
HTML5Mouse.show = function() {
	if(HTML5Mouse.__hidden) {
		HTML5Mouse.__hidden = false;
		var cacheValue = HTML5Mouse.__cursor;
		HTML5Mouse.__cursor = null;
		HTML5Mouse.set_cursor(cacheValue);
	}
}
HTML5Mouse.warp = function(x,y,window) {
}
HTML5Mouse.get_cursor = function() {
	if(HTML5Mouse.__cursor == null) {
		return (lime_ui_MouseCursor().default).DEFAULT;
	}
	return HTML5Mouse.__cursor;
}
HTML5Mouse.set_cursor = function(value) {
	if(HTML5Mouse.__cursor != value) {
		if(!HTML5Mouse.__hidden) {
			var _g = 0;
			var _g1 = (lime_app_Application().default).current.get_windows();
			while(_g < _g1.length) {
				var $window = _g1[_g];
				++_g;
				var tmp;
				switch((Type().default).enumIndex(value)) {
				case 0:
					tmp = "default";
					break;
				case 1:
					tmp = "crosshair";
					break;
				case 3:
					tmp = "move";
					break;
				case 4:
					tmp = "pointer";
					break;
				case 5:
					tmp = "nesw-resize";
					break;
				case 6:
					tmp = "ns-resize";
					break;
				case 7:
					tmp = "nwse-resize";
					break;
				case 8:
					tmp = "ew-resize";
					break;
				case 9:
					tmp = "text";
					break;
				case 10:
					tmp = "wait";
					break;
				case 11:
					tmp = "wait";
					break;
				default:
					tmp = "auto";
				}
				$window.backend.element.style.cursor = tmp;
			}
		}
		HTML5Mouse.__cursor = value;
	}
	return HTML5Mouse.__cursor;
}
HTML5Mouse.get_lock = function() {
	return false;
}
HTML5Mouse.set_lock = function(value) {
	return value;
}


// Export

exports.default = HTML5Mouse;