1/* 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public License 18 * along with this library; see the file COPYING.LIB. If not, write to 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23#include "config.h" 24#include "UIEvent.h" 25 26#include "Node.h" 27 28namespace WebCore { 29 30UIEventInit::UIEventInit() 31 : view(0) 32 , detail(0) 33{ 34} 35 36UIEventInit::UIEventInit(bool bubbles, bool cancelable) 37 : EventInit(bubbles, cancelable) 38 , view(0) 39 , detail(0) 40{ 41} 42 43 44UIEvent::UIEvent() 45 : m_detail(0) 46{ 47} 48 49UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg) 50 : Event(eventType, canBubbleArg, cancelableArg) 51 , m_view(viewArg) 52 , m_detail(detailArg) 53{ 54} 55 56UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, double timestamp, PassRefPtr<AbstractView> viewArg, int detailArg) 57 : Event(eventType, canBubbleArg, cancelableArg, timestamp) 58 , m_view(viewArg) 59 , m_detail(detailArg) 60{ 61} 62 63UIEvent::UIEvent(const AtomicString& eventType, const UIEventInit& initializer) 64 : Event(eventType, initializer) 65 , m_view(initializer.view) 66 , m_detail(initializer.detail) 67{ 68} 69 70UIEvent::~UIEvent() 71{ 72} 73 74void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg) 75{ 76 if (dispatched()) 77 return; 78 79 initEvent(typeArg, canBubbleArg, cancelableArg); 80 81 m_view = viewArg; 82 m_detail = detailArg; 83} 84 85bool UIEvent::isUIEvent() const 86{ 87 return true; 88} 89 90EventInterface UIEvent::eventInterface() const 91{ 92 return UIEventInterfaceType; 93} 94 95int UIEvent::keyCode() const 96{ 97 return 0; 98} 99 100int UIEvent::charCode() const 101{ 102 return 0; 103} 104 105int UIEvent::layerX() 106{ 107 return 0; 108} 109 110int UIEvent::layerY() 111{ 112 return 0; 113} 114 115int UIEvent::pageX() const 116{ 117 return 0; 118} 119 120int UIEvent::pageY() const 121{ 122 return 0; 123} 124 125int UIEvent::which() const 126{ 127 return 0; 128} 129 130} // namespace WebCore 131