1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_ScrollAreaEvent_h_
7 #define mozilla_dom_ScrollAreaEvent_h_
9 #include "mozilla/dom/DOMRect.h"
10 #include "mozilla/dom/ScrollAreaEventBinding.h"
11 #include "mozilla/dom/UIEvent.h"
12 #include "mozilla/Attributes.h"
13 #include "mozilla/EventForwards.h"
14 #include "nsIDOMScrollAreaEvent.h"
19 class ScrollAreaEvent
: public UIEvent
,
20 public nsIDOMScrollAreaEvent
23 ScrollAreaEvent(EventTarget
* aOwner
,
24 nsPresContext
* aPresContext
,
25 InternalScrollAreaEvent
* aEvent
);
27 NS_DECL_ISUPPORTS_INHERITED
29 NS_DECL_NSIDOMSCROLLAREAEVENT
31 NS_FORWARD_NSIDOMUIEVENT(UIEvent::)
33 NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION
34 NS_IMETHOD
DuplicatePrivateData()
36 return Event::DuplicatePrivateData();
38 NS_IMETHOD_(void) Serialize(IPC::Message
* aMsg
, bool aSerializeInterfaceType
) MOZ_OVERRIDE
;
39 NS_IMETHOD_(bool) Deserialize(const IPC::Message
* aMsg
, void** aIter
) MOZ_OVERRIDE
;
41 virtual JSObject
* WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
43 return ScrollAreaEventBinding::Wrap(aCx
, this);
48 return mClientArea
.Left();
53 return mClientArea
.Top();
58 return mClientArea
.Width();
63 return mClientArea
.Height();
66 void InitScrollAreaEvent(const nsAString
& aType
,
72 float aWidth
, float aHeight
,
75 aRv
= InitScrollAreaEvent(aType
, aCanBubble
, aCancelable
, aView
,
76 aDetail
, aX
, aY
, aWidth
, aHeight
);
86 } // namespace mozilla
88 #endif // mozilla_dom_ScrollAreaEvent_h_