Home | History | Annotate | Download | only in dom
      1 /*
      2  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
      3  *
      4  * This library is free software; you can redistribute it and/or
      5  * modify it under the terms of the GNU Library General Public
      6  * License as published by the Free Software Foundation; either
      7  * version 2 of the License, or (at your option) any later version.
      8  *
      9  * This library is distributed in the hope that it will be useful,
     10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12  * Library General Public License for more details.
     13  *
     14  * You should have received a copy of the GNU Library General Public License
     15  * along with this library; see the file COPYING.LIB.  If not, write to
     16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     17  * Boston, MA 02110-1301, USA.
     18  */
     19 
     20 module events {
     21 
     22     // Introduced in DOM Level 2:
     23     interface MouseEvent : UIEvent {
     24         readonly attribute long             screenX;
     25         readonly attribute long             screenY;
     26         readonly attribute long             clientX;
     27         readonly attribute long             clientY;
     28         readonly attribute boolean          ctrlKey;
     29         readonly attribute boolean          shiftKey;
     30         readonly attribute boolean          altKey;
     31         readonly attribute boolean          metaKey;
     32         readonly attribute unsigned short   button;
     33         readonly attribute EventTarget      relatedTarget;
     34 
     35         [OldStyleObjC] void initMouseEvent(in DOMString type,
     36                                            in boolean canBubble,
     37                                            in boolean cancelable,
     38                                            in DOMWindow view,
     39                                            in long detail,
     40                                            in long screenX,
     41                                            in long screenY,
     42                                            in long clientX,
     43                                            in long clientY,
     44                                            in boolean ctrlKey,
     45                                            in boolean altKey,
     46                                            in boolean shiftKey,
     47                                            in boolean metaKey,
     48                                            in unsigned short button,
     49                                            in EventTarget relatedTarget);
     50 
     51         // extensions
     52         readonly attribute long             offsetX;
     53         readonly attribute long             offsetY;
     54         readonly attribute long             x;
     55         readonly attribute long             y;
     56         readonly attribute Node             fromElement;
     57         readonly attribute Node             toElement;
     58 
     59 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     60         readonly attribute Clipboard        dataTransfer;
     61 #endif
     62     };
     63 
     64 }
     65