• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "core/events/UIEvent.h"
25 
26 
27 namespace WebCore {
28 
UIEventInit()29 UIEventInit::UIEventInit()
30     : view(0)
31     , detail(0)
32 {
33 }
34 
UIEvent()35 UIEvent::UIEvent()
36     : m_detail(0)
37 {
38     ScriptWrappable::init(this);
39 }
40 
UIEvent(const AtomicString & eventType,bool canBubbleArg,bool cancelableArg,PassRefPtr<AbstractView> viewArg,int detailArg)41 UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg)
42     : Event(eventType, canBubbleArg, cancelableArg)
43     , m_view(viewArg)
44     , m_detail(detailArg)
45 {
46     ScriptWrappable::init(this);
47 }
48 
UIEvent(const AtomicString & eventType,const UIEventInit & initializer)49 UIEvent::UIEvent(const AtomicString& eventType, const UIEventInit& initializer)
50     : Event(eventType, initializer)
51     , m_view(initializer.view)
52     , m_detail(initializer.detail)
53 {
54     ScriptWrappable::init(this);
55 }
56 
~UIEvent()57 UIEvent::~UIEvent()
58 {
59 }
60 
initUIEvent(const AtomicString & typeArg,bool canBubbleArg,bool cancelableArg,PassRefPtr<AbstractView> viewArg,int detailArg)61 void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg)
62 {
63     if (dispatched())
64         return;
65 
66     initEvent(typeArg, canBubbleArg, cancelableArg);
67 
68     m_view = viewArg;
69     m_detail = detailArg;
70 }
71 
isUIEvent() const72 bool UIEvent::isUIEvent() const
73 {
74     return true;
75 }
76 
interfaceName() const77 const AtomicString& UIEvent::interfaceName() const
78 {
79     return EventNames::UIEvent;
80 }
81 
keyCode() const82 int UIEvent::keyCode() const
83 {
84     return 0;
85 }
86 
charCode() const87 int UIEvent::charCode() const
88 {
89     return 0;
90 }
91 
layerX()92 int UIEvent::layerX()
93 {
94     return 0;
95 }
96 
layerY()97 int UIEvent::layerY()
98 {
99     return 0;
100 }
101 
pageX() const102 int UIEvent::pageX() const
103 {
104     return 0;
105 }
106 
pageY() const107 int UIEvent::pageY() const
108 {
109     return 0;
110 }
111 
which() const112 int UIEvent::which() const
113 {
114     return 0;
115 }
116 
117 } // namespace WebCore
118