/*
 * Copyright (C) 2006, 2007, 2015 Apple Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

[
    Constructor(DOMString type, optional MouseEventInit eventInitDict),
    DoNotCheckConstants,
] interface MouseEvent : UIEvent {
    [Conditional=MOUSE_FORCE_EVENTS] const double WEBKIT_FORCE_AT_MOUSE_DOWN = 1;
    [Conditional=MOUSE_FORCE_EVENTS] const double WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN = 2;

    readonly attribute long screenX;
    readonly attribute long screenY;
    readonly attribute long clientX;
    readonly attribute long clientY;
    readonly attribute boolean ctrlKey;
    readonly attribute boolean shiftKey;
    readonly attribute boolean altKey;
    readonly attribute boolean metaKey;
    readonly attribute unsigned short button;
    readonly attribute unsigned short buttons;
    readonly attribute EventTarget? relatedTarget;
    [Conditional=POINTER_LOCK] readonly attribute long movementX;
    [Conditional=POINTER_LOCK] readonly attribute long movementY;
    [Conditional=MOUSE_FORCE_EVENTS, ImplementedAs=force]readonly attribute double webkitForce;

    // FIXME: Using "undefined" as default parameter value is wrong.
    // FIXME: relatedTarget should be of type EventTarget? but we need to use any to support a quirk for iAd Producer (rdar://problem/30640101).
    [CallWith=ScriptState&ScriptExecutionContext, ImplementedAs=initMouseEventQuirk] void initMouseEvent(optional DOMString type = "undefined",
        optional boolean canBubble = false, optional boolean cancelable = false,
        optional DOMWindow? view = null, optional long detail = 0,
        optional long screenX = 0, optional long screenY = 0, optional long clientX = 0, optional long clientY = 0,
        optional boolean ctrlKey = false, optional boolean altKey = false, optional boolean shiftKey = false, optional boolean metaKey = false,
        optional unsigned short button = 0, optional any relatedTarget = null);

    readonly attribute long offsetX;
    readonly attribute long offsetY;
    readonly attribute long x;
    readonly attribute long y;
    readonly attribute Node? fromElement;
    readonly attribute Node? toElement;
    readonly attribute DataTransfer dataTransfer;
};
