Use is<>() / downcast<>() for Element
[WebKit-https.git] / Source / WebKit / win / DOMEventsClasses.cpp
1 /*
2  * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24  */
25
26 #include "config.h"
27 #include "WebKitDLL.h"
28 #include <initguid.h>
29 #include "DOMEventsClasses.h"
30
31 #include <WebCore/COMPtr.h>
32 #include <WebCore/DOMWindow.h>
33 #include <WebCore/Event.h>
34 #include <WebCore/EventNames.h>
35 #include <WebCore/KeyboardEvent.h>
36 #include <WebCore/MouseEvent.h>
37 #include <WebCore/ScriptExecutionContext.h>
38
39 // DOMEventListener -----------------------------------------------------------
40
41 HRESULT STDMETHODCALLTYPE DOMEventListener::QueryInterface(const IID &riid, void** ppvObject)
42 {
43     *ppvObject = 0;
44     if (IsEqualGUID(riid, IID_IDOMEventListener))
45         *ppvObject = static_cast<IDOMEventListener*>(this);
46     else
47         return DOMObject::QueryInterface(riid, ppvObject);
48
49     AddRef();
50     return S_OK;
51 }
52
53 HRESULT STDMETHODCALLTYPE DOMEventListener::handleEvent( 
54     /* [in] */ IDOMEvent* /*evt*/)
55 {
56     return E_NOTIMPL;
57 }
58
59 WebEventListener::WebEventListener(IDOMEventListener* i)
60     : EventListener(CPPEventListenerType)
61     , m_iDOMEventListener(i)
62 {
63     m_iDOMEventListener->AddRef();
64 }
65
66 WebEventListener::~WebEventListener()
67 {
68     m_iDOMEventListener->Release();
69 }
70
71 bool WebEventListener::operator==(const WebCore::EventListener& other)
72 {
73     return (other.type() == CPPEventListenerType 
74         && reinterpret_cast<const WebEventListener*>(&other)->m_iDOMEventListener == m_iDOMEventListener);
75 }
76
77 void WebEventListener::handleEvent(WebCore::ScriptExecutionContext* s, WebCore::Event* e)
78 {
79     RefPtr<WebCore::Event> ePtr(e);
80     COMPtr<IDOMEvent> domEvent = DOMEvent::createInstance(ePtr);
81     m_iDOMEventListener->handleEvent(domEvent.get());
82 }
83
84 PassRefPtr<WebEventListener> WebEventListener::create(IDOMEventListener* d)
85 {
86     return adoptRef(new WebEventListener(d));
87 }
88
89 // DOMEvent -------------------------------------------------------------------
90
91 DOMEvent::DOMEvent(PassRefPtr<WebCore::Event> e)
92 : m_event(0)
93 {
94     m_event = e;
95 }
96
97 DOMEvent::~DOMEvent()
98 {
99 }
100
101 IDOMEvent* DOMEvent::createInstance(PassRefPtr<WebCore::Event> e)
102 {
103     if (!e)
104         return 0;
105
106     HRESULT hr;
107     IDOMEvent* domEvent = 0;
108
109     if (e->isKeyboardEvent()) {
110         DOMKeyboardEvent* newEvent = new DOMKeyboardEvent(e);
111         hr = newEvent->QueryInterface(IID_IDOMKeyboardEvent, (void**)&domEvent);
112     } else if (e->isMouseEvent()) {
113         DOMMouseEvent* newEvent = new DOMMouseEvent(e);
114         hr = newEvent->QueryInterface(IID_IDOMMouseEvent, (void**)&domEvent);
115     } else if (e->eventInterface() == WebCore::MutationEventInterfaceType) {
116         DOMMutationEvent* newEvent = new DOMMutationEvent(e);
117         hr = newEvent->QueryInterface(IID_IDOMMutationEvent, (void**)&domEvent);
118     } else if (e->eventInterface() == WebCore::OverflowEventInterfaceType) {
119         DOMOverflowEvent* newEvent = new DOMOverflowEvent(e);
120         hr = newEvent->QueryInterface(IID_IDOMOverflowEvent, (void**)&domEvent);
121     } else if (e->eventInterface() == WebCore::WheelEventInterfaceType) {
122         DOMWheelEvent* newEvent = new DOMWheelEvent(e);
123         hr = newEvent->QueryInterface(IID_IDOMWheelEvent, (void**)&domEvent);
124     } else if (e->isUIEvent()) {
125         DOMUIEvent* newEvent = new DOMUIEvent(e);
126         hr = newEvent->QueryInterface(IID_IDOMUIEvent, (void**)&domEvent);
127     } else {
128         DOMEvent* newEvent = new DOMEvent(e);
129         hr = newEvent->QueryInterface(IID_IDOMEvent, (void**)&domEvent);
130     }
131
132     if (FAILED(hr))
133         return 0;
134
135     return domEvent;
136 }
137
138 HRESULT STDMETHODCALLTYPE DOMEvent::QueryInterface(const IID &riid, void** ppvObject)
139 {
140     *ppvObject = 0;
141     if (IsEqualGUID(riid, IID_DOMEvent))
142         *ppvObject = this;
143     else if (IsEqualGUID(riid, IID_IDOMEvent))
144         *ppvObject = static_cast<IDOMEvent*>(this);
145     else
146         return DOMObject::QueryInterface(riid, ppvObject);
147
148     AddRef();
149     return S_OK;
150 }
151
152 HRESULT STDMETHODCALLTYPE DOMEvent::type( 
153     /* [retval][out] */ BSTR* /*result*/)
154 {
155     return E_NOTIMPL;
156 }
157
158 HRESULT STDMETHODCALLTYPE DOMEvent::target( 
159     /* [retval][out] */ IDOMEventTarget** /*result*/)
160 {
161     return E_NOTIMPL;
162 }
163
164 HRESULT STDMETHODCALLTYPE DOMEvent::currentTarget( 
165     /* [retval][out] */ IDOMEventTarget** /*result*/)
166 {
167     return E_NOTIMPL;
168 }
169
170 HRESULT STDMETHODCALLTYPE DOMEvent::eventPhase( 
171     /* [retval][out] */ unsigned short* /*result*/)
172 {
173     return E_NOTIMPL;
174 }
175
176 HRESULT STDMETHODCALLTYPE DOMEvent::bubbles( 
177     /* [retval][out] */ BOOL* /*result*/)
178 {
179     return E_NOTIMPL;
180 }
181
182 HRESULT STDMETHODCALLTYPE DOMEvent::cancelable( 
183     /* [retval][out] */ BOOL* /*result*/)
184 {
185     return E_NOTIMPL;
186 }
187
188 HRESULT STDMETHODCALLTYPE DOMEvent::timeStamp( 
189     /* [retval][out] */ DOMTimeStamp* /*result*/)
190 {
191     return E_NOTIMPL;
192 }
193
194 HRESULT STDMETHODCALLTYPE DOMEvent::stopPropagation( void)
195 {
196     return E_NOTIMPL;
197 }
198
199 HRESULT STDMETHODCALLTYPE DOMEvent::preventDefault( void)
200 {
201     return E_NOTIMPL;
202 }
203
204 HRESULT STDMETHODCALLTYPE DOMEvent::initEvent( 
205     /* [in] */ BSTR /*eventTypeArg*/,
206     /* [in] */ BOOL /*canBubbleArg*/,
207     /* [in] */ BOOL /*cancelableArg*/)
208 {
209     return E_NOTIMPL;
210 }
211
212 // DOMUIEvent -----------------------------------------------------------------
213
214 HRESULT STDMETHODCALLTYPE DOMUIEvent::QueryInterface(REFIID riid, void** ppvObject)
215 {
216     *ppvObject = 0;
217     if (IsEqualGUID(riid, IID_IDOMUIEvent))
218         *ppvObject = static_cast<IDOMUIEvent*>(this);
219     else
220         return DOMEvent::QueryInterface(riid, ppvObject);
221
222     AddRef();
223     return S_OK;
224 }
225
226 HRESULT STDMETHODCALLTYPE DOMUIEvent::view( 
227     /* [retval][out] */ IDOMWindow** /*result*/)
228 {
229     return E_NOTIMPL;
230 }
231
232 HRESULT STDMETHODCALLTYPE DOMUIEvent::detail( 
233     /* [retval][out] */ long* /*result*/)
234 {
235     return E_NOTIMPL;
236 }
237
238 HRESULT STDMETHODCALLTYPE DOMUIEvent::initUIEvent( 
239     /* [in] */ BSTR /*type*/,
240     /* [in] */ BOOL /*canBubble*/,
241     /* [in] */ BOOL /*cancelable*/,
242     /* [in] */ IDOMWindow* /*view*/,
243     /* [in] */ long /*detail*/)
244 {
245     return E_NOTIMPL;
246 }
247
248 HRESULT STDMETHODCALLTYPE DOMUIEvent::keyCode( 
249     /* [retval][out] */ long* /*result*/)
250 {
251     return E_NOTIMPL;
252 }
253
254 HRESULT STDMETHODCALLTYPE DOMUIEvent::charCode( 
255     /* [retval][out] */ long* /*result*/)
256 {
257     return E_NOTIMPL;
258 }
259
260 HRESULT STDMETHODCALLTYPE DOMUIEvent::unused1(
261     /* [retval][out] */ long* /*result*/)
262 {
263     return E_NOTIMPL;
264 }
265
266 HRESULT STDMETHODCALLTYPE DOMUIEvent::unused2(
267     /* [retval][out] */ long* /*result*/)
268 {
269     return E_NOTIMPL;
270 }
271
272 HRESULT STDMETHODCALLTYPE DOMUIEvent::pageX( 
273     /* [retval][out] */ long* /*result*/)
274 {
275     return E_NOTIMPL;
276 }
277
278 HRESULT STDMETHODCALLTYPE DOMUIEvent::pageY( 
279     /* [retval][out] */ long* /*result*/)
280 {
281     return E_NOTIMPL;
282 }
283
284 HRESULT STDMETHODCALLTYPE DOMUIEvent::which( 
285     /* [retval][out] */ long* /*result*/)
286 {
287     return E_NOTIMPL;
288 }
289
290 // DOMKeyboardEvent -----------------------------------------------------------
291
292 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::QueryInterface(REFIID riid, void** ppvObject)
293 {
294     *ppvObject = 0;
295     if (IsEqualGUID(riid, IID_IDOMKeyboardEvent))
296         *ppvObject = static_cast<IDOMKeyboardEvent*>(this);
297     else
298         return DOMUIEvent::QueryInterface(riid, ppvObject);
299
300     AddRef();
301     return S_OK;
302 }
303
304 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::keyIdentifier( 
305     /* [retval][out] */ BSTR* /*result*/)
306 {
307     return E_NOTIMPL;
308 }
309
310 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::location(
311     /* [retval][out] */ unsigned long* /*result*/)
312 {
313     return E_NOTIMPL;
314 }
315
316 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::keyLocation( 
317     /* [retval][out] */ unsigned long* /*result*/)
318 {
319     return E_NOTIMPL;
320 }
321
322 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::ctrlKey( 
323     /* [retval][out] */ BOOL* result)
324 {
325     *result = FALSE;
326     if (!m_event || !m_event->isKeyboardEvent())
327         return E_FAIL;
328     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
329
330     *result = keyEvent->ctrlKey() ? TRUE : FALSE;
331     return S_OK;
332 }
333
334 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::shiftKey( 
335     /* [retval][out] */ BOOL* result)
336 {
337     *result = FALSE;
338     if (!m_event || !m_event->isKeyboardEvent())
339         return E_FAIL;
340     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
341
342     *result = keyEvent->shiftKey() ? TRUE : FALSE;
343     return S_OK;
344 }
345
346 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::altKey( 
347     /* [retval][out] */ BOOL* result)
348 {
349     *result = FALSE;
350     if (!m_event || !m_event->isKeyboardEvent())
351         return E_FAIL;
352     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
353
354     *result = keyEvent->altKey() ? TRUE : FALSE;
355     return S_OK;
356 }
357
358 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::metaKey( 
359     /* [retval][out] */ BOOL* result)
360 {
361     *result = FALSE;
362     if (!m_event || !m_event->isKeyboardEvent())
363         return E_FAIL;
364     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
365
366     *result = keyEvent->metaKey() ? TRUE : FALSE;
367     return S_OK;
368 }
369
370 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::altGraphKey( 
371     /* [retval][out] */ BOOL* result)
372 {
373     *result = FALSE;
374     if (!m_event || !m_event->isKeyboardEvent())
375         return E_FAIL;
376     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
377
378     *result = keyEvent->altGraphKey() ? TRUE : FALSE;
379     return S_OK;
380 }
381
382 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::getModifierState( 
383     /* [in] */ BSTR /*keyIdentifierArg*/,
384     /* [retval][out] */ BOOL* /*result*/)
385 {
386     return E_NOTIMPL;
387 }
388
389 HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::initKeyboardEvent( 
390     /* [in] */ BSTR /*type*/,
391     /* [in] */ BOOL /*canBubble*/,
392     /* [in] */ BOOL /*cancelable*/,
393     /* [in] */ IDOMWindow* /*view*/,
394     /* [in] */ BSTR /*keyIdentifier*/,
395     /* [in] */ unsigned long /*keyLocation*/,
396     /* [in] */ BOOL /*ctrlKey*/,
397     /* [in] */ BOOL /*altKey*/,
398     /* [in] */ BOOL /*shiftKey*/,
399     /* [in] */ BOOL /*metaKey*/,
400     /* [in] */ BOOL /*graphKey*/)
401 {
402     return E_NOTIMPL;
403 }
404
405 // DOMMouseEvent --------------------------------------------------------------
406
407 HRESULT STDMETHODCALLTYPE DOMMouseEvent::QueryInterface(REFIID riid, void** ppvObject)
408 {
409     *ppvObject = 0;
410     if (IsEqualGUID(riid, IID_IDOMMouseEvent))
411         *ppvObject = static_cast<IDOMMouseEvent*>(this);
412     else
413         return DOMUIEvent::QueryInterface(riid, ppvObject);
414
415     AddRef();
416     return S_OK;
417 }
418
419 HRESULT STDMETHODCALLTYPE DOMMouseEvent::screenX( 
420     /* [retval][out] */ long* /*result*/)
421 {
422     return E_NOTIMPL;
423 }
424
425 HRESULT STDMETHODCALLTYPE DOMMouseEvent::screenY( 
426     /* [retval][out] */ long* /*result*/)
427 {
428     return E_NOTIMPL;
429 }
430
431 HRESULT STDMETHODCALLTYPE DOMMouseEvent::clientX( 
432     /* [retval][out] */ long* /*result*/)
433 {
434     return E_NOTIMPL;
435 }
436
437 HRESULT STDMETHODCALLTYPE DOMMouseEvent::clientY( 
438     /* [retval][out] */ long* /*result*/)
439 {
440     return E_NOTIMPL;
441 }
442
443 HRESULT STDMETHODCALLTYPE DOMMouseEvent::ctrlKey( 
444     /* [retval][out] */ BOOL* result)
445 {
446     *result = FALSE;
447     if (!m_event || !m_event->isMouseEvent())
448         return E_FAIL;
449     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
450
451     *result = mouseEvent->ctrlKey() ? TRUE : FALSE;
452     return S_OK;
453 }
454
455 HRESULT STDMETHODCALLTYPE DOMMouseEvent::shiftKey( 
456     /* [retval][out] */ BOOL* result)
457 {
458     *result = FALSE;
459     if (!m_event || !m_event->isMouseEvent())
460         return E_FAIL;
461     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
462
463     *result = mouseEvent->shiftKey() ? TRUE : FALSE;
464     return S_OK;
465 }
466
467 HRESULT STDMETHODCALLTYPE DOMMouseEvent::altKey( 
468     /* [retval][out] */ BOOL* result)
469 {
470     *result = FALSE;
471     if (!m_event || !m_event->isMouseEvent())
472         return E_FAIL;
473     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
474
475     *result = mouseEvent->altKey() ? TRUE : FALSE;
476     return S_OK;
477 }
478
479 HRESULT STDMETHODCALLTYPE DOMMouseEvent::metaKey( 
480     /* [retval][out] */ BOOL* result)
481 {
482     *result = FALSE;
483     if (!m_event || !m_event->isMouseEvent())
484         return E_FAIL;
485     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
486
487     *result = mouseEvent->metaKey() ? TRUE : FALSE;
488     return S_OK;
489 }
490
491 HRESULT STDMETHODCALLTYPE DOMMouseEvent::button( 
492     /* [retval][out] */ unsigned short* /*result*/)
493 {
494     return E_NOTIMPL;
495 }
496
497 HRESULT STDMETHODCALLTYPE DOMMouseEvent::relatedTarget( 
498     /* [retval][out] */ IDOMEventTarget** /*result*/)
499 {
500     return E_NOTIMPL;
501 }
502
503 HRESULT STDMETHODCALLTYPE DOMMouseEvent::initMouseEvent( 
504     /* [in] */ BSTR /*type*/,
505     /* [in] */ BOOL /*canBubble*/,
506     /* [in] */ BOOL /*cancelable*/,
507     /* [in] */ IDOMWindow* /*view*/,
508     /* [in] */ long /*detail*/,
509     /* [in] */ long /*screenX*/,
510     /* [in] */ long /*screenY*/,
511     /* [in] */ long /*clientX*/,
512     /* [in] */ long /*clientY*/,
513     /* [in] */ BOOL /*ctrlKey*/,
514     /* [in] */ BOOL /*altKey*/,
515     /* [in] */ BOOL /*shiftKey*/,
516     /* [in] */ BOOL /*metaKey*/,
517     /* [in] */ unsigned short /*button*/,
518     /* [in] */ IDOMEventTarget* /*relatedTarget*/)
519 {
520     return E_NOTIMPL;
521 }
522
523 HRESULT STDMETHODCALLTYPE DOMMouseEvent::offsetX( 
524     /* [retval][out] */ long* /*result*/)
525 {
526     return E_NOTIMPL;
527 }
528
529 HRESULT STDMETHODCALLTYPE DOMMouseEvent::offsetY( 
530     /* [retval][out] */ long* /*result*/)
531 {
532     return E_NOTIMPL;
533 }
534
535 HRESULT STDMETHODCALLTYPE DOMMouseEvent::x( 
536     /* [retval][out] */ long* /*result*/)
537 {
538     return E_NOTIMPL;
539 }
540
541 HRESULT STDMETHODCALLTYPE DOMMouseEvent::y( 
542     /* [retval][out] */ long* /*result*/)
543 {
544     return E_NOTIMPL;
545 }
546
547 HRESULT STDMETHODCALLTYPE DOMMouseEvent::fromElement( 
548     /* [retval][out] */ IDOMNode** /*result*/)
549 {
550     return E_NOTIMPL;
551 }
552
553 HRESULT STDMETHODCALLTYPE DOMMouseEvent::toElement(
554     /* [retval][out] */ IDOMNode** /*result*/)
555 {
556     return E_NOTIMPL;
557 }
558
559 // DOMMutationEvent -----------------------------------------------------------
560
561 HRESULT STDMETHODCALLTYPE DOMMutationEvent::QueryInterface(REFIID riid, void** ppvObject)
562 {
563     *ppvObject = 0;
564     if (IsEqualGUID(riid, IID_IDOMMutationEvent))
565         *ppvObject = static_cast<IDOMMutationEvent*>(this);
566     else
567         return DOMEvent::QueryInterface(riid, ppvObject);
568
569     AddRef();
570     return S_OK;
571 }
572
573 HRESULT STDMETHODCALLTYPE DOMMutationEvent::relatedNode( 
574     /* [retval][out] */ IDOMNode** /*result*/)
575 {
576     return E_NOTIMPL;
577 }
578
579 HRESULT STDMETHODCALLTYPE DOMMutationEvent::prevValue( 
580     /* [retval][out] */ BSTR* /*result*/)
581 {
582     return E_NOTIMPL;
583 }
584
585 HRESULT STDMETHODCALLTYPE DOMMutationEvent::newValue( 
586     /* [retval][out] */ BSTR* /*result*/)
587 {
588     return E_NOTIMPL;
589 }
590
591 HRESULT STDMETHODCALLTYPE DOMMutationEvent::attrName( 
592     /* [retval][out] */ BSTR* /*result*/)
593 {
594     return E_NOTIMPL;
595 }
596
597 HRESULT STDMETHODCALLTYPE DOMMutationEvent::attrChange( 
598     /* [retval][out] */ unsigned short* /*result*/)
599 {
600     return E_NOTIMPL;
601 }
602
603 HRESULT STDMETHODCALLTYPE DOMMutationEvent::initMutationEvent(
604     /* [in] */ BSTR /*type*/,
605     /* [in] */ BOOL /*canBubble*/,
606     /* [in] */ BOOL /*cancelable*/,
607     /* [in] */ IDOMNode* /*relatedNode*/,
608     /* [in] */ BSTR /*prevValue*/,
609     /* [in] */ BSTR /*newValue*/,
610     /* [in] */ BSTR /*attrName*/,
611     /* [in] */ unsigned short /*attrChange*/)
612 {
613     return E_NOTIMPL;
614 }
615
616 // DOMOverflowEvent -----------------------------------------------------------
617
618 HRESULT STDMETHODCALLTYPE DOMOverflowEvent::QueryInterface(REFIID riid, void** ppvObject)
619 {
620     *ppvObject = 0;
621     if (IsEqualGUID(riid, IID_IDOMOverflowEvent))
622         *ppvObject = static_cast<IDOMOverflowEvent*>(this);
623     else
624         return DOMEvent::QueryInterface(riid, ppvObject);
625
626     AddRef();
627     return S_OK;
628 }
629
630 HRESULT STDMETHODCALLTYPE DOMOverflowEvent::orient( 
631     /* [retval][out] */ unsigned short* /*result*/)
632 {
633     return E_NOTIMPL;
634 }
635
636 HRESULT STDMETHODCALLTYPE DOMOverflowEvent::horizontalOverflow( 
637     /* [retval][out] */ BOOL* /*result*/)
638 {
639     return E_NOTIMPL;
640 }
641
642 HRESULT STDMETHODCALLTYPE DOMOverflowEvent::verticalOverflow( 
643     /* [retval][out] */ BOOL* /*result*/)
644 {
645     return E_NOTIMPL;
646 }
647
648 // DOMWheelEvent --------------------------------------------------------------
649
650 HRESULT STDMETHODCALLTYPE DOMWheelEvent::QueryInterface(REFIID riid, void** ppvObject)
651 {
652     *ppvObject = 0;
653     if (IsEqualGUID(riid, IID_IDOMWheelEvent))
654         *ppvObject = static_cast<IDOMWheelEvent*>(this);
655     else
656         return DOMUIEvent::QueryInterface(riid, ppvObject);
657
658     AddRef();
659     return S_OK;
660 }
661
662 HRESULT STDMETHODCALLTYPE DOMWheelEvent::screenX( 
663     /* [retval][out] */ long* /*result*/)
664 {
665     return E_NOTIMPL;
666 }
667
668 HRESULT STDMETHODCALLTYPE DOMWheelEvent::screenY( 
669     /* [retval][out] */ long* /*result*/)
670 {
671     return E_NOTIMPL;
672 }
673
674 HRESULT STDMETHODCALLTYPE DOMWheelEvent::clientX( 
675     /* [retval][out] */ long* /*result*/)
676 {
677     return E_NOTIMPL;
678 }
679
680 HRESULT STDMETHODCALLTYPE DOMWheelEvent::clientY( 
681     /* [retval][out] */ long* /*result*/)
682 {
683     return E_NOTIMPL;
684 }
685
686 HRESULT STDMETHODCALLTYPE DOMWheelEvent::ctrlKey( 
687     /* [retval][out] */ BOOL* /*result*/)
688 {
689     return E_NOTIMPL;
690 }
691
692 HRESULT STDMETHODCALLTYPE DOMWheelEvent::shiftKey( 
693     /* [retval][out] */ BOOL* /*result*/)
694 {
695     return E_NOTIMPL;
696 }
697
698 HRESULT STDMETHODCALLTYPE DOMWheelEvent::altKey( 
699     /* [retval][out] */ BOOL* /*result*/)
700 {
701     return E_NOTIMPL;
702 }
703
704 HRESULT STDMETHODCALLTYPE DOMWheelEvent::metaKey( 
705     /* [retval][out] */ BOOL* /*result*/)
706 {
707     return E_NOTIMPL;
708 }
709
710 HRESULT STDMETHODCALLTYPE DOMWheelEvent::wheelDelta( 
711     /* [retval][out] */ long* /*result*/)
712 {
713     return E_NOTIMPL;
714 }
715
716 HRESULT STDMETHODCALLTYPE DOMWheelEvent::wheelDeltaX( 
717     /* [retval][out] */ long* /*result*/)
718 {
719     return E_NOTIMPL;
720 }
721
722 HRESULT STDMETHODCALLTYPE DOMWheelEvent::wheelDeltaY( 
723     /* [retval][out] */ long* /*result*/)
724 {
725     return E_NOTIMPL;
726 }
727
728 HRESULT STDMETHODCALLTYPE DOMWheelEvent::offsetX( 
729     /* [retval][out] */ long* /*result*/)
730 {
731     return E_NOTIMPL;
732 }
733
734 HRESULT STDMETHODCALLTYPE DOMWheelEvent::offsetY( 
735     /* [retval][out] */ long* /*result*/)
736 {
737     return E_NOTIMPL;
738 }
739
740 HRESULT STDMETHODCALLTYPE DOMWheelEvent::x( 
741     /* [retval][out] */ long* /*result*/)
742 {
743     return E_NOTIMPL;
744 }
745
746 HRESULT STDMETHODCALLTYPE DOMWheelEvent::y( 
747     /* [retval][out] */ long* /*result*/)
748 {
749     return E_NOTIMPL;
750 }
751
752 HRESULT STDMETHODCALLTYPE DOMWheelEvent::isHorizontal( 
753     /* [retval][out] */ BOOL* /*result*/)
754 {
755     return E_NOTIMPL;
756 }
757
758 HRESULT STDMETHODCALLTYPE DOMWheelEvent::initWheelEvent( 
759     /* [in] */ long /*wheelDeltaX*/,
760     /* [in] */ long /*wheelDeltaY*/,
761     /* [in] */ IDOMWindow* /*view*/,
762     /* [in] */ long /*screenX*/,
763     /* [in] */ long /*screenY*/,
764     /* [in] */ long /*clientX*/,
765     /* [in] */ long /*clientY*/,
766     /* [in] */ BOOL /*ctrlKey*/,
767     /* [in] */ BOOL /*altKey*/,
768     /* [in] */ BOOL /*shiftKey*/,
769     /* [in] */ BOOL /*metaKey*/)
770 {
771     return E_NOTIMPL;
772 }