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 "DOMWindow.h"
27
28namespace WebCore {
29
30UIEvent::UIEvent()
31    : m_detail(0)
32{
33}
34
35UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg)
36    : Event(eventType, canBubbleArg, cancelableArg)
37    , m_view(viewArg)
38    , m_detail(detailArg)
39{
40}
41
42UIEvent::~UIEvent()
43{
44}
45
46void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg)
47{
48    if (dispatched())
49        return;
50
51    initEvent(typeArg, canBubbleArg, cancelableArg);
52
53    m_view = viewArg;
54    m_detail = detailArg;
55}
56
57bool UIEvent::isUIEvent() const
58{
59    return true;
60}
61
62int UIEvent::keyCode() const
63{
64    return 0;
65}
66
67int UIEvent::charCode() const
68{
69    return 0;
70}
71
72int UIEvent::layerX() const
73{
74    return 0;
75}
76
77int UIEvent::layerY() const
78{
79    return 0;
80}
81
82int UIEvent::pageX() const
83{
84    return 0;
85}
86
87int UIEvent::pageY() const
88{
89    return 0;
90}
91
92int UIEvent::which() const
93{
94    return 0;
95}
96
97} // namespace WebCore
98