darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 1 | /* |
weinig@apple.com | a4a4cff | 2007-12-30 22:24:47 +0000 | [diff] [blame] | 2 | * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
weinig | f83c3e8 | 2006-09-07 17:08:48 +0000 | [diff] [blame] | 3 | * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Library General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Library General Public License |
| 16 | * along with this library; see the file COPYING.LIB. If not, write to |
ddkilzer | c8eccec | 2007-09-26 02:29:57 +0000 | [diff] [blame] | 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | module events { |
| 22 | |
weinig | eb03030 | 2006-09-09 22:05:58 +0000 | [diff] [blame] | 23 | // Based off of proposed IDL interface for WheelEvent: |
weinig@apple.com | a4a4cff | 2007-12-30 22:24:47 +0000 | [diff] [blame] | 24 | interface [ |
| 25 | GenerateConstructor |
| 26 | ] WheelEvent : UIEvent { |
weinig | eb03030 | 2006-09-09 22:05:58 +0000 | [diff] [blame] | 27 | readonly attribute long screenX; |
| 28 | readonly attribute long screenY; |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 29 | readonly attribute long clientX; |
| 30 | readonly attribute long clientY; |
| 31 | readonly attribute boolean ctrlKey; |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 32 | readonly attribute boolean shiftKey; |
weinig | eb03030 | 2006-09-09 22:05:58 +0000 | [diff] [blame] | 33 | readonly attribute boolean altKey; |
| 34 | readonly attribute boolean metaKey; |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 35 | readonly attribute long wheelDelta; |
hyatt | 4f172f9 | 2006-09-20 09:52:25 +0000 | [diff] [blame] | 36 | readonly attribute long wheelDeltaX; |
| 37 | readonly attribute long wheelDeltaY; |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 38 | |
weinig | f83c3e8 | 2006-09-07 17:08:48 +0000 | [diff] [blame] | 39 | // WebKit Extensions |
weinig | eb03030 | 2006-09-09 22:05:58 +0000 | [diff] [blame] | 40 | readonly attribute long offsetX; |
| 41 | readonly attribute long offsetY; |
| 42 | readonly attribute long x; |
| 43 | readonly attribute long y; |
weinig | f83c3e8 | 2006-09-07 17:08:48 +0000 | [diff] [blame] | 44 | |
weinig | d92deed | 2006-09-20 14:23:03 +0000 | [diff] [blame] | 45 | #if defined(LANGUAGE_OBJECTIVE_C) |
| 46 | readonly attribute boolean isHorizontal; |
| 47 | #endif /* defined(LANGUAGE_OBJECTIVE_C) */ |
| 48 | |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 49 | #if !defined(LANGUAGE_JAVASCRIPT) |
hyatt | 4f172f9 | 2006-09-20 09:52:25 +0000 | [diff] [blame] | 50 | void initWheelEvent(in long wheelDeltaX, |
| 51 | in long wheelDeltaY, |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 52 | in DOMWindow view, |
| 53 | in long screenX, |
| 54 | in long screenY, |
| 55 | in long clientX, |
| 56 | in long clientY, |
| 57 | in boolean ctrlKey, |
| 58 | in boolean altKey, |
| 59 | in boolean shiftKey, |
| 60 | in boolean metaKey); |
weinig | d92deed | 2006-09-20 14:23:03 +0000 | [diff] [blame] | 61 | #endif /* !defined(LANGUAGE_JAVASCRIPT) */ |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | } |