198 lines
7.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- MouseEvent interface -->
<interface name="MouseEvent" inherits="UIEvent" id="Events-MouseEvent"
since="DOM Level 2">
<descr>
<p>The <code>MouseEvent</code> interface provides specific contextual
information associated with Mouse events.</p>
<p>The <code>detail</code> attribute inherited from <code>UIEvent</code>
indicates the number of times a mouse button has been pressed and
released over the same screen location during a user action. The
attribute value is 1 when the user begins this action and increments by 1
for each full sequence of pressing and releasing. If the user moves the
mouse between the mousedown and mouseup the value will be set to 0,
indicating that no click is occurring.</p>
<p>In the case of nested elements mouse events are always targeted at the
most deeply nested element. Ancestors of the targeted element may use
bubbling to obtain notification of mouse events which occur within its
descendent elements.</p>
</descr>
<attribute type="long" name="screenX" readonly="yes"
id="Events-MouseEvent-screenX">
<descr>
<p>The horizontal coordinate at which the
event occurred relative to the origin of the screen coordinate
system.</p>
</descr>
</attribute>
<attribute type="long" name="screenY" readonly="yes"
id="Events-MouseEvent-screenY">
<descr>
<p>The vertical coordinate at which the
event occurred relative to the origin of the screen coordinate
system.</p>
</descr>
</attribute>
<attribute type="long" name="clientX" readonly="yes"
id="Events-MouseEvent-clientX">
<descr>
<p>The horizontal coordinate at which the
event occurred relative to the DOM implementation's client area.</p>
</descr>
</attribute>
<attribute type="long" name="clientY" readonly="yes"
id="Events-MouseEvent-clientY">
<descr>
<p>The vertical coordinate at which the
event occurred relative to the DOM implementation's client area.</p>
</descr>
</attribute>
<attribute type="boolean" name="ctrlKey" readonly="yes"
id="Events-MouseEvent-ctrlKey">
<descr>
<p>Used to indicate whether the 'ctrl' key was depressed
during the firing of the event.</p>
</descr>
</attribute>
<attribute type="boolean" name="shiftKey" readonly="yes"
id="Events-MouseEvent-shiftKey">
<descr>
<p>Used to indicate whether the 'shift' key was depressed
during the firing of the event.</p>
</descr>
</attribute>
<attribute type="boolean" name="altKey" readonly="yes"
id="Events-MouseEvent-altKey">
<descr>
<p>Used to indicate whether the 'alt' key was depressed
during the firing of the event. On some platforms this key may map to
an alternative key name.</p>
</descr>
</attribute>
<attribute type="boolean" name="metaKey" readonly="yes"
id="Events-MouseEvent-metaKey">
<descr>
<p>Used to indicate whether the 'meta' key was depressed
during the firing of the event. On some platforms this key may map to
an alternative key name.</p>
</descr>
</attribute>
<attribute type="unsigned short" name="button" readonly="yes"
id="Events-MouseEvent-button">
<descr>
<p>During mouse events caused by the depression or release of a mouse
button, <code>button</code> is used to indicate which mouse button
changed state. The values for <code>button</code> range from zero to indicate
the left button of the mouse, one to indicate the middle button if present, and
two to indicate the right button. For mice configured for left handed use in which
the button actions are reversed the values are instead read from right to left.</p>
</descr>
</attribute>
<attribute type="EventTarget" name="relatedTarget" readonly="yes"
id="Events-MouseEvent-relatedTarget">
<descr>
<p>Used to identify a secondary <code>EventTarget</code> related
to a UI event. Currently this attribute is used with the mouseover event to indicate the
<code>EventTarget</code> which the pointing device exited and with the mouseout event to indicate the
<code>EventTarget</code> which the pointing device entered.</p>
</descr>
</attribute>
<method name="initMouseEvent" id="Events-Event-initMouseEvent">
<descr>
<p>The <code>initMouseEvent</code> method is used to initialize the value of a <code>MouseEvent</code> created through
the <code>DocumentEvent</code> interface. This method may only be called before the <code>MouseEvent</code> has
been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.</p>
</descr>
<parameters>
<param name="typeArg" type="DOMString" attr="in">
<descr><p>Specifies the event type.</p>
</descr>
</param>
<param name="canBubbleArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event can bubble.</p>
</descr>
</param>
<param name="cancelableArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event's default
action can be prevented.</p>
</descr>
</param>
<param name="viewArg" type="views::AbstractView" attr="in">
<descr><p>Specifies the <code>Event</code>'s
<code>AbstractView</code>.</p>
</descr>
</param>
<param name="detailArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s mouse click count.</p>
</descr>
</param>
<param name="screenXArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s screen x coordinate</p>
</descr>
</param>
<param name="screenYArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s screen y coordinate</p>
</descr>
</param>
<param name="clientXArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s client x coordinate</p>
</descr>
</param>
<param name="clientYArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s client y coordinate</p>
</descr>
</param>
<param name="ctrlKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not control key was depressed during
the <code>Event</code>.</p>
</descr>
</param>
<param name="altKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not alt key was depressed during the
<code>Event</code>.</p>
</descr>
</param>
<param name="shiftKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not shift key was depressed during the
<code>Event</code>.</p>
</descr>
</param>
<param name="metaKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not meta key was depressed during the
<code>Event</code>.</p>
</descr>
</param>
<param name="buttonArg" type="unsigned short" attr="in">
<descr><p>Specifies the <code>Event</code>'s mouse button.</p>
</descr>
</param>
<param name="relatedTargetArg" type="EventTarget" attr="in">
<descr><p>Specifies the <code>Event</code>'s related <code>EventTarget</code>.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>