<commit_before>/// this mixin provides mouse press events handling
BaseMouseMixin {
	property int mouseX;
	property int mouseY;
	signal mouseMove;

	///@private
	constructor: {
		this.element = this.parent.element;
		this._bindMove(this.enabled)
	}

	/// @private
	function _updatePosition(event) {
		var parent = this.parent
		var x = event.offsetX
		var y = event.offsetY
		if (x >= 0 && y >= 0 && x < parent.width && y < parent.height) {
			this.mouseX = x
			this.mouseY = y
			this.mouseMove(x, y)
			return true
		}
		else
			return false
	}

	/// @private
	function _bindMove(value) {
		if (value && !this._mouseMoveBinder) {
			this._mouseMoveBinder = new $core.EventBinder(this.element)
			this._mouseMoveBinder.on('mousemove', function(event) {
				if (!this._updatePosition(event) && ('preventDefault' in event))
					event.preventDefault()
			}.bind(this))
		}
		if (this._mouseMoveBinder)
			this._mouseMoveBinder.enable(value)
	}

	onEnabledChanged: {
		this._bindMove(value)
	}
}
<commit_msg>Expose screenX and screenY properties (#200)<commit_after>/// this mixin provides mouse press events handling
BaseMouseMixin {
	property int mouseX;
	property int mouseY;
	property int clientX;
	property int clientY;
	property int screenX;
	property int screenY;
	signal mouseMove;

	///@private
	constructor: {
		this.element = this.parent.element;
		this._bindMove(this.enabled)
	}

	/// @private
	function _updatePosition(event) {
		var parent = this.parent
		this.screenX = event.screenX;
		this.screenY = event.screenY;
		this.clientX = event.clientX;
		this.clientY = event.clientY;
		var x = event.offsetX
		var y = event.offsetY
		if (x >= 0 && y >= 0 && x < parent.width && y < parent.height) {
			this.mouseX = x
			this.mouseY = y
			this.mouseMove(x, y)
			return true
		}
		else
			return false
	}

	/// @private
	function _bindMove(value) {
		if (value && !this._mouseMoveBinder) {
			this._mouseMoveBinder = new $core.EventBinder(this.element)
			this._mouseMoveBinder.on('mousemove', function(event) {
				if (!this._updatePosition(event) && ('preventDefault' in event))
					event.preventDefault()
			}.bind(this))
		}
		if (this._mouseMoveBinder)
			this._mouseMoveBinder.enable(value)
	}

	onEnabledChanged: {
		this._bindMove(value)
	}
}

{'fraction_non_alphanumeric': 0.12671081677704193, 'fraction_numerical': 0.0030905077262693157, 'mean_word_length': 3.5139442231075697, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '81362', 'n_tokens_mistral': 864, 'n_tokens_neox': 773, 'n_words': 179}