DOMEventsClasses.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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 COMPUTER, 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 COMPUTER, 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. #include "config.h"
  26. #include "WebKitDLL.h"
  27. #include <initguid.h>
  28. #include "DOMEventsClasses.h"
  29. #include <WebCore/COMPtr.h>
  30. #include <WebCore/DOMWindow.h>
  31. #include <WebCore/Event.h>
  32. #include <WebCore/EventNames.h>
  33. #include <WebCore/KeyboardEvent.h>
  34. #include <WebCore/MouseEvent.h>
  35. #include <WebCore/ScriptExecutionContext.h>
  36. // DOMEventListener -----------------------------------------------------------
  37. HRESULT STDMETHODCALLTYPE DOMEventListener::QueryInterface(const IID &riid, void** ppvObject)
  38. {
  39. *ppvObject = 0;
  40. if (IsEqualGUID(riid, IID_IDOMEventListener))
  41. *ppvObject = static_cast<IDOMEventListener*>(this);
  42. else
  43. return DOMObject::QueryInterface(riid, ppvObject);
  44. AddRef();
  45. return S_OK;
  46. }
  47. HRESULT STDMETHODCALLTYPE DOMEventListener::handleEvent(
  48. /* [in] */ IDOMEvent* /*evt*/)
  49. {
  50. return E_NOTIMPL;
  51. }
  52. WebEventListener::WebEventListener(IDOMEventListener* i)
  53. : EventListener(CPPEventListenerType)
  54. , m_iDOMEventListener(i)
  55. {
  56. m_iDOMEventListener->AddRef();
  57. }
  58. WebEventListener::~WebEventListener()
  59. {
  60. m_iDOMEventListener->Release();
  61. }
  62. bool WebEventListener::operator==(const WebCore::EventListener& other)
  63. {
  64. return (other.type() == CPPEventListenerType
  65. && reinterpret_cast<const WebEventListener*>(&other)->m_iDOMEventListener == m_iDOMEventListener);
  66. }
  67. void WebEventListener::handleEvent(WebCore::ScriptExecutionContext* s, WebCore::Event* e)
  68. {
  69. RefPtr<WebCore::Event> ePtr(e);
  70. COMPtr<IDOMEvent> domEvent = DOMEvent::createInstance(ePtr);
  71. m_iDOMEventListener->handleEvent(domEvent.get());
  72. }
  73. PassRefPtr<WebEventListener> WebEventListener::create(IDOMEventListener* d)
  74. {
  75. return adoptRef(new WebEventListener(d));
  76. }
  77. // DOMEvent -------------------------------------------------------------------
  78. DOMEvent::DOMEvent(PassRefPtr<WebCore::Event> e)
  79. : m_event(0)
  80. {
  81. m_event = e;
  82. }
  83. DOMEvent::~DOMEvent()
  84. {
  85. }
  86. IDOMEvent* DOMEvent::createInstance(PassRefPtr<WebCore::Event> e)
  87. {
  88. if (!e)
  89. return 0;
  90. HRESULT hr;
  91. IDOMEvent* domEvent = 0;
  92. if (e->isKeyboardEvent()) {
  93. DOMKeyboardEvent* newEvent = new DOMKeyboardEvent(e);
  94. hr = newEvent->QueryInterface(IID_IDOMKeyboardEvent, (void**)&domEvent);
  95. } else if (e->isMouseEvent()) {
  96. DOMMouseEvent* newEvent = new DOMMouseEvent(e);
  97. hr = newEvent->QueryInterface(IID_IDOMMouseEvent, (void**)&domEvent);
  98. } else if (e->hasInterface(WebCore::eventNames().interfaceForMutationEvent)) {
  99. DOMMutationEvent* newEvent = new DOMMutationEvent(e);
  100. hr = newEvent->QueryInterface(IID_IDOMMutationEvent, (void**)&domEvent);
  101. } else if (e->hasInterface(WebCore::eventNames().interfaceForOverflowEvent)) {
  102. DOMOverflowEvent* newEvent = new DOMOverflowEvent(e);
  103. hr = newEvent->QueryInterface(IID_IDOMOverflowEvent, (void**)&domEvent);
  104. } else if (e->hasInterface(WebCore::eventNames().interfaceForWheelEvent)) {
  105. DOMWheelEvent* newEvent = new DOMWheelEvent(e);
  106. hr = newEvent->QueryInterface(IID_IDOMWheelEvent, (void**)&domEvent);
  107. } else if (e->isUIEvent()) {
  108. DOMUIEvent* newEvent = new DOMUIEvent(e);
  109. hr = newEvent->QueryInterface(IID_IDOMUIEvent, (void**)&domEvent);
  110. } else {
  111. DOMEvent* newEvent = new DOMEvent(e);
  112. hr = newEvent->QueryInterface(IID_IDOMEvent, (void**)&domEvent);
  113. }
  114. if (FAILED(hr))
  115. return 0;
  116. return domEvent;
  117. }
  118. HRESULT STDMETHODCALLTYPE DOMEvent::QueryInterface(const IID &riid, void** ppvObject)
  119. {
  120. *ppvObject = 0;
  121. if (IsEqualGUID(riid, IID_DOMEvent))
  122. *ppvObject = this;
  123. else if (IsEqualGUID(riid, IID_IDOMEvent))
  124. *ppvObject = static_cast<IDOMEvent*>(this);
  125. else
  126. return DOMObject::QueryInterface(riid, ppvObject);
  127. AddRef();
  128. return S_OK;
  129. }
  130. HRESULT STDMETHODCALLTYPE DOMEvent::type(
  131. /* [retval][out] */ BSTR* /*result*/)
  132. {
  133. return E_NOTIMPL;
  134. }
  135. HRESULT STDMETHODCALLTYPE DOMEvent::target(
  136. /* [retval][out] */ IDOMEventTarget** /*result*/)
  137. {
  138. return E_NOTIMPL;
  139. }
  140. HRESULT STDMETHODCALLTYPE DOMEvent::currentTarget(
  141. /* [retval][out] */ IDOMEventTarget** /*result*/)
  142. {
  143. return E_NOTIMPL;
  144. }
  145. HRESULT STDMETHODCALLTYPE DOMEvent::eventPhase(
  146. /* [retval][out] */ unsigned short* /*result*/)
  147. {
  148. return E_NOTIMPL;
  149. }
  150. HRESULT STDMETHODCALLTYPE DOMEvent::bubbles(
  151. /* [retval][out] */ BOOL* /*result*/)
  152. {
  153. return E_NOTIMPL;
  154. }
  155. HRESULT STDMETHODCALLTYPE DOMEvent::cancelable(
  156. /* [retval][out] */ BOOL* /*result*/)
  157. {
  158. return E_NOTIMPL;
  159. }
  160. HRESULT STDMETHODCALLTYPE DOMEvent::timeStamp(
  161. /* [retval][out] */ DOMTimeStamp* /*result*/)
  162. {
  163. return E_NOTIMPL;
  164. }
  165. HRESULT STDMETHODCALLTYPE DOMEvent::stopPropagation( void)
  166. {
  167. return E_NOTIMPL;
  168. }
  169. HRESULT STDMETHODCALLTYPE DOMEvent::preventDefault( void)
  170. {
  171. return E_NOTIMPL;
  172. }
  173. HRESULT STDMETHODCALLTYPE DOMEvent::initEvent(
  174. /* [in] */ BSTR /*eventTypeArg*/,
  175. /* [in] */ BOOL /*canBubbleArg*/,
  176. /* [in] */ BOOL /*cancelableArg*/)
  177. {
  178. return E_NOTIMPL;
  179. }
  180. // DOMUIEvent -----------------------------------------------------------------
  181. HRESULT STDMETHODCALLTYPE DOMUIEvent::QueryInterface(REFIID riid, void** ppvObject)
  182. {
  183. *ppvObject = 0;
  184. if (IsEqualGUID(riid, IID_IDOMUIEvent))
  185. *ppvObject = static_cast<IDOMUIEvent*>(this);
  186. else
  187. return DOMEvent::QueryInterface(riid, ppvObject);
  188. AddRef();
  189. return S_OK;
  190. }
  191. HRESULT STDMETHODCALLTYPE DOMUIEvent::view(
  192. /* [retval][out] */ IDOMWindow** /*result*/)
  193. {
  194. return E_NOTIMPL;
  195. }
  196. HRESULT STDMETHODCALLTYPE DOMUIEvent::detail(
  197. /* [retval][out] */ long* /*result*/)
  198. {
  199. return E_NOTIMPL;
  200. }
  201. HRESULT STDMETHODCALLTYPE DOMUIEvent::initUIEvent(
  202. /* [in] */ BSTR /*type*/,
  203. /* [in] */ BOOL /*canBubble*/,
  204. /* [in] */ BOOL /*cancelable*/,
  205. /* [in] */ IDOMWindow* /*view*/,
  206. /* [in] */ long /*detail*/)
  207. {
  208. return E_NOTIMPL;
  209. }
  210. HRESULT STDMETHODCALLTYPE DOMUIEvent::keyCode(
  211. /* [retval][out] */ long* /*result*/)
  212. {
  213. return E_NOTIMPL;
  214. }
  215. HRESULT STDMETHODCALLTYPE DOMUIEvent::charCode(
  216. /* [retval][out] */ long* /*result*/)
  217. {
  218. return E_NOTIMPL;
  219. }
  220. HRESULT STDMETHODCALLTYPE DOMUIEvent::unused1(
  221. /* [retval][out] */ long* /*result*/)
  222. {
  223. return E_NOTIMPL;
  224. }
  225. HRESULT STDMETHODCALLTYPE DOMUIEvent::unused2(
  226. /* [retval][out] */ long* /*result*/)
  227. {
  228. return E_NOTIMPL;
  229. }
  230. HRESULT STDMETHODCALLTYPE DOMUIEvent::pageX(
  231. /* [retval][out] */ long* /*result*/)
  232. {
  233. return E_NOTIMPL;
  234. }
  235. HRESULT STDMETHODCALLTYPE DOMUIEvent::pageY(
  236. /* [retval][out] */ long* /*result*/)
  237. {
  238. return E_NOTIMPL;
  239. }
  240. HRESULT STDMETHODCALLTYPE DOMUIEvent::which(
  241. /* [retval][out] */ long* /*result*/)
  242. {
  243. return E_NOTIMPL;
  244. }
  245. // DOMKeyboardEvent -----------------------------------------------------------
  246. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::QueryInterface(REFIID riid, void** ppvObject)
  247. {
  248. *ppvObject = 0;
  249. if (IsEqualGUID(riid, IID_IDOMKeyboardEvent))
  250. *ppvObject = static_cast<IDOMKeyboardEvent*>(this);
  251. else
  252. return DOMUIEvent::QueryInterface(riid, ppvObject);
  253. AddRef();
  254. return S_OK;
  255. }
  256. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::keyIdentifier(
  257. /* [retval][out] */ BSTR* /*result*/)
  258. {
  259. return E_NOTIMPL;
  260. }
  261. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::keyLocation(
  262. /* [retval][out] */ unsigned long* /*result*/)
  263. {
  264. return E_NOTIMPL;
  265. }
  266. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::ctrlKey(
  267. /* [retval][out] */ BOOL* result)
  268. {
  269. *result = FALSE;
  270. if (!m_event || !m_event->isKeyboardEvent())
  271. return E_FAIL;
  272. WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
  273. *result = keyEvent->ctrlKey() ? TRUE : FALSE;
  274. return S_OK;
  275. }
  276. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::shiftKey(
  277. /* [retval][out] */ BOOL* result)
  278. {
  279. *result = FALSE;
  280. if (!m_event || !m_event->isKeyboardEvent())
  281. return E_FAIL;
  282. WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
  283. *result = keyEvent->shiftKey() ? TRUE : FALSE;
  284. return S_OK;
  285. }
  286. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::altKey(
  287. /* [retval][out] */ BOOL* result)
  288. {
  289. *result = FALSE;
  290. if (!m_event || !m_event->isKeyboardEvent())
  291. return E_FAIL;
  292. WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
  293. *result = keyEvent->altKey() ? TRUE : FALSE;
  294. return S_OK;
  295. }
  296. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::metaKey(
  297. /* [retval][out] */ BOOL* result)
  298. {
  299. *result = FALSE;
  300. if (!m_event || !m_event->isKeyboardEvent())
  301. return E_FAIL;
  302. WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
  303. *result = keyEvent->metaKey() ? TRUE : FALSE;
  304. return S_OK;
  305. }
  306. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::altGraphKey(
  307. /* [retval][out] */ BOOL* result)
  308. {
  309. *result = FALSE;
  310. if (!m_event || !m_event->isKeyboardEvent())
  311. return E_FAIL;
  312. WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
  313. *result = keyEvent->altGraphKey() ? TRUE : FALSE;
  314. return S_OK;
  315. }
  316. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::getModifierState(
  317. /* [in] */ BSTR /*keyIdentifierArg*/,
  318. /* [retval][out] */ BOOL* /*result*/)
  319. {
  320. return E_NOTIMPL;
  321. }
  322. HRESULT STDMETHODCALLTYPE DOMKeyboardEvent::initKeyboardEvent(
  323. /* [in] */ BSTR /*type*/,
  324. /* [in] */ BOOL /*canBubble*/,
  325. /* [in] */ BOOL /*cancelable*/,
  326. /* [in] */ IDOMWindow* /*view*/,
  327. /* [in] */ BSTR /*keyIdentifier*/,
  328. /* [in] */ unsigned long /*keyLocation*/,
  329. /* [in] */ BOOL /*ctrlKey*/,
  330. /* [in] */ BOOL /*altKey*/,
  331. /* [in] */ BOOL /*shiftKey*/,
  332. /* [in] */ BOOL /*metaKey*/,
  333. /* [in] */ BOOL /*graphKey*/)
  334. {
  335. return E_NOTIMPL;
  336. }
  337. // DOMMouseEvent --------------------------------------------------------------
  338. HRESULT STDMETHODCALLTYPE DOMMouseEvent::QueryInterface(REFIID riid, void** ppvObject)
  339. {
  340. *ppvObject = 0;
  341. if (IsEqualGUID(riid, IID_IDOMMouseEvent))
  342. *ppvObject = static_cast<IDOMMouseEvent*>(this);
  343. else
  344. return DOMUIEvent::QueryInterface(riid, ppvObject);
  345. AddRef();
  346. return S_OK;
  347. }
  348. HRESULT STDMETHODCALLTYPE DOMMouseEvent::screenX(
  349. /* [retval][out] */ long* /*result*/)
  350. {
  351. return E_NOTIMPL;
  352. }
  353. HRESULT STDMETHODCALLTYPE DOMMouseEvent::screenY(
  354. /* [retval][out] */ long* /*result*/)
  355. {
  356. return E_NOTIMPL;
  357. }
  358. HRESULT STDMETHODCALLTYPE DOMMouseEvent::clientX(
  359. /* [retval][out] */ long* /*result*/)
  360. {
  361. return E_NOTIMPL;
  362. }
  363. HRESULT STDMETHODCALLTYPE DOMMouseEvent::clientY(
  364. /* [retval][out] */ long* /*result*/)
  365. {
  366. return E_NOTIMPL;
  367. }
  368. HRESULT STDMETHODCALLTYPE DOMMouseEvent::ctrlKey(
  369. /* [retval][out] */ BOOL* result)
  370. {
  371. *result = FALSE;
  372. if (!m_event || !m_event->isMouseEvent())
  373. return E_FAIL;
  374. WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
  375. *result = mouseEvent->ctrlKey() ? TRUE : FALSE;
  376. return S_OK;
  377. }
  378. HRESULT STDMETHODCALLTYPE DOMMouseEvent::shiftKey(
  379. /* [retval][out] */ BOOL* result)
  380. {
  381. *result = FALSE;
  382. if (!m_event || !m_event->isMouseEvent())
  383. return E_FAIL;
  384. WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
  385. *result = mouseEvent->shiftKey() ? TRUE : FALSE;
  386. return S_OK;
  387. }
  388. HRESULT STDMETHODCALLTYPE DOMMouseEvent::altKey(
  389. /* [retval][out] */ BOOL* result)
  390. {
  391. *result = FALSE;
  392. if (!m_event || !m_event->isMouseEvent())
  393. return E_FAIL;
  394. WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
  395. *result = mouseEvent->altKey() ? TRUE : FALSE;
  396. return S_OK;
  397. }
  398. HRESULT STDMETHODCALLTYPE DOMMouseEvent::metaKey(
  399. /* [retval][out] */ BOOL* result)
  400. {
  401. *result = FALSE;
  402. if (!m_event || !m_event->isMouseEvent())
  403. return E_FAIL;
  404. WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
  405. *result = mouseEvent->metaKey() ? TRUE : FALSE;
  406. return S_OK;
  407. }
  408. HRESULT STDMETHODCALLTYPE DOMMouseEvent::button(
  409. /* [retval][out] */ unsigned short* /*result*/)
  410. {
  411. return E_NOTIMPL;
  412. }
  413. HRESULT STDMETHODCALLTYPE DOMMouseEvent::relatedTarget(
  414. /* [retval][out] */ IDOMEventTarget** /*result*/)
  415. {
  416. return E_NOTIMPL;
  417. }
  418. HRESULT STDMETHODCALLTYPE DOMMouseEvent::initMouseEvent(
  419. /* [in] */ BSTR /*type*/,
  420. /* [in] */ BOOL /*canBubble*/,
  421. /* [in] */ BOOL /*cancelable*/,
  422. /* [in] */ IDOMWindow* /*view*/,
  423. /* [in] */ long /*detail*/,
  424. /* [in] */ long /*screenX*/,
  425. /* [in] */ long /*screenY*/,
  426. /* [in] */ long /*clientX*/,
  427. /* [in] */ long /*clientY*/,
  428. /* [in] */ BOOL /*ctrlKey*/,
  429. /* [in] */ BOOL /*altKey*/,
  430. /* [in] */ BOOL /*shiftKey*/,
  431. /* [in] */ BOOL /*metaKey*/,
  432. /* [in] */ unsigned short /*button*/,
  433. /* [in] */ IDOMEventTarget* /*relatedTarget*/)
  434. {
  435. return E_NOTIMPL;
  436. }
  437. HRESULT STDMETHODCALLTYPE DOMMouseEvent::offsetX(
  438. /* [retval][out] */ long* /*result*/)
  439. {
  440. return E_NOTIMPL;
  441. }
  442. HRESULT STDMETHODCALLTYPE DOMMouseEvent::offsetY(
  443. /* [retval][out] */ long* /*result*/)
  444. {
  445. return E_NOTIMPL;
  446. }
  447. HRESULT STDMETHODCALLTYPE DOMMouseEvent::x(
  448. /* [retval][out] */ long* /*result*/)
  449. {
  450. return E_NOTIMPL;
  451. }
  452. HRESULT STDMETHODCALLTYPE DOMMouseEvent::y(
  453. /* [retval][out] */ long* /*result*/)
  454. {
  455. return E_NOTIMPL;
  456. }
  457. HRESULT STDMETHODCALLTYPE DOMMouseEvent::fromElement(
  458. /* [retval][out] */ IDOMNode** /*result*/)
  459. {
  460. return E_NOTIMPL;
  461. }
  462. HRESULT STDMETHODCALLTYPE DOMMouseEvent::toElement(
  463. /* [retval][out] */ IDOMNode** /*result*/)
  464. {
  465. return E_NOTIMPL;
  466. }
  467. // DOMMutationEvent -----------------------------------------------------------
  468. HRESULT STDMETHODCALLTYPE DOMMutationEvent::QueryInterface(REFIID riid, void** ppvObject)
  469. {
  470. *ppvObject = 0;
  471. if (IsEqualGUID(riid, IID_IDOMMutationEvent))
  472. *ppvObject = static_cast<IDOMMutationEvent*>(this);
  473. else
  474. return DOMEvent::QueryInterface(riid, ppvObject);
  475. AddRef();
  476. return S_OK;
  477. }
  478. HRESULT STDMETHODCALLTYPE DOMMutationEvent::relatedNode(
  479. /* [retval][out] */ IDOMNode** /*result*/)
  480. {
  481. return E_NOTIMPL;
  482. }
  483. HRESULT STDMETHODCALLTYPE DOMMutationEvent::prevValue(
  484. /* [retval][out] */ BSTR* /*result*/)
  485. {
  486. return E_NOTIMPL;
  487. }
  488. HRESULT STDMETHODCALLTYPE DOMMutationEvent::newValue(
  489. /* [retval][out] */ BSTR* /*result*/)
  490. {
  491. return E_NOTIMPL;
  492. }
  493. HRESULT STDMETHODCALLTYPE DOMMutationEvent::attrName(
  494. /* [retval][out] */ BSTR* /*result*/)
  495. {
  496. return E_NOTIMPL;
  497. }
  498. HRESULT STDMETHODCALLTYPE DOMMutationEvent::attrChange(
  499. /* [retval][out] */ unsigned short* /*result*/)
  500. {
  501. return E_NOTIMPL;
  502. }
  503. HRESULT STDMETHODCALLTYPE DOMMutationEvent::initMutationEvent(
  504. /* [in] */ BSTR /*type*/,
  505. /* [in] */ BOOL /*canBubble*/,
  506. /* [in] */ BOOL /*cancelable*/,
  507. /* [in] */ IDOMNode* /*relatedNode*/,
  508. /* [in] */ BSTR /*prevValue*/,
  509. /* [in] */ BSTR /*newValue*/,
  510. /* [in] */ BSTR /*attrName*/,
  511. /* [in] */ unsigned short /*attrChange*/)
  512. {
  513. return E_NOTIMPL;
  514. }
  515. // DOMOverflowEvent -----------------------------------------------------------
  516. HRESULT STDMETHODCALLTYPE DOMOverflowEvent::QueryInterface(REFIID riid, void** ppvObject)
  517. {
  518. *ppvObject = 0;
  519. if (IsEqualGUID(riid, IID_IDOMOverflowEvent))
  520. *ppvObject = static_cast<IDOMOverflowEvent*>(this);
  521. else
  522. return DOMEvent::QueryInterface(riid, ppvObject);
  523. AddRef();
  524. return S_OK;
  525. }
  526. HRESULT STDMETHODCALLTYPE DOMOverflowEvent::orient(
  527. /* [retval][out] */ unsigned short* /*result*/)
  528. {
  529. return E_NOTIMPL;
  530. }
  531. HRESULT STDMETHODCALLTYPE DOMOverflowEvent::horizontalOverflow(
  532. /* [retval][out] */ BOOL* /*result*/)
  533. {
  534. return E_NOTIMPL;
  535. }
  536. HRESULT STDMETHODCALLTYPE DOMOverflowEvent::verticalOverflow(
  537. /* [retval][out] */ BOOL* /*result*/)
  538. {
  539. return E_NOTIMPL;
  540. }
  541. // DOMWheelEvent --------------------------------------------------------------
  542. HRESULT STDMETHODCALLTYPE DOMWheelEvent::QueryInterface(REFIID riid, void** ppvObject)
  543. {
  544. *ppvObject = 0;
  545. if (IsEqualGUID(riid, IID_IDOMWheelEvent))
  546. *ppvObject = static_cast<IDOMWheelEvent*>(this);
  547. else
  548. return DOMUIEvent::QueryInterface(riid, ppvObject);
  549. AddRef();
  550. return S_OK;
  551. }
  552. HRESULT STDMETHODCALLTYPE DOMWheelEvent::screenX(
  553. /* [retval][out] */ long* /*result*/)
  554. {
  555. return E_NOTIMPL;
  556. }
  557. HRESULT STDMETHODCALLTYPE DOMWheelEvent::screenY(
  558. /* [retval][out] */ long* /*result*/)
  559. {
  560. return E_NOTIMPL;
  561. }
  562. HRESULT STDMETHODCALLTYPE DOMWheelEvent::clientX(
  563. /* [retval][out] */ long* /*result*/)
  564. {
  565. return E_NOTIMPL;
  566. }
  567. HRESULT STDMETHODCALLTYPE DOMWheelEvent::clientY(
  568. /* [retval][out] */ long* /*result*/)
  569. {
  570. return E_NOTIMPL;
  571. }
  572. HRESULT STDMETHODCALLTYPE DOMWheelEvent::ctrlKey(
  573. /* [retval][out] */ BOOL* /*result*/)
  574. {
  575. return E_NOTIMPL;
  576. }
  577. HRESULT STDMETHODCALLTYPE DOMWheelEvent::shiftKey(
  578. /* [retval][out] */ BOOL* /*result*/)
  579. {
  580. return E_NOTIMPL;
  581. }
  582. HRESULT STDMETHODCALLTYPE DOMWheelEvent::altKey(
  583. /* [retval][out] */ BOOL* /*result*/)
  584. {
  585. return E_NOTIMPL;
  586. }
  587. HRESULT STDMETHODCALLTYPE DOMWheelEvent::metaKey(
  588. /* [retval][out] */ BOOL* /*result*/)
  589. {
  590. return E_NOTIMPL;
  591. }
  592. HRESULT STDMETHODCALLTYPE DOMWheelEvent::wheelDelta(
  593. /* [retval][out] */ long* /*result*/)
  594. {
  595. return E_NOTIMPL;
  596. }
  597. HRESULT STDMETHODCALLTYPE DOMWheelEvent::wheelDeltaX(
  598. /* [retval][out] */ long* /*result*/)
  599. {
  600. return E_NOTIMPL;
  601. }
  602. HRESULT STDMETHODCALLTYPE DOMWheelEvent::wheelDeltaY(
  603. /* [retval][out] */ long* /*result*/)
  604. {
  605. return E_NOTIMPL;
  606. }
  607. HRESULT STDMETHODCALLTYPE DOMWheelEvent::offsetX(
  608. /* [retval][out] */ long* /*result*/)
  609. {
  610. return E_NOTIMPL;
  611. }
  612. HRESULT STDMETHODCALLTYPE DOMWheelEvent::offsetY(
  613. /* [retval][out] */ long* /*result*/)
  614. {
  615. return E_NOTIMPL;
  616. }
  617. HRESULT STDMETHODCALLTYPE DOMWheelEvent::x(
  618. /* [retval][out] */ long* /*result*/)
  619. {
  620. return E_NOTIMPL;
  621. }
  622. HRESULT STDMETHODCALLTYPE DOMWheelEvent::y(
  623. /* [retval][out] */ long* /*result*/)
  624. {
  625. return E_NOTIMPL;
  626. }
  627. HRESULT STDMETHODCALLTYPE DOMWheelEvent::isHorizontal(
  628. /* [retval][out] */ BOOL* /*result*/)
  629. {
  630. return E_NOTIMPL;
  631. }
  632. HRESULT STDMETHODCALLTYPE DOMWheelEvent::initWheelEvent(
  633. /* [in] */ long /*wheelDeltaX*/,
  634. /* [in] */ long /*wheelDeltaY*/,
  635. /* [in] */ IDOMWindow* /*view*/,
  636. /* [in] */ long /*screenX*/,
  637. /* [in] */ long /*screenY*/,
  638. /* [in] */ long /*clientX*/,
  639. /* [in] */ long /*clientY*/,
  640. /* [in] */ BOOL /*ctrlKey*/,
  641. /* [in] */ BOOL /*altKey*/,
  642. /* [in] */ BOOL /*shiftKey*/,
  643. /* [in] */ BOOL /*metaKey*/)
  644. {
  645. return E_NOTIMPL;
  646. }