Bumping manifests a=b2g-bump
[gecko.git] / dom / events / ScrollAreaEvent.h
blob02d71da293fa7192f59fd67e2d195264b8949535
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"
16 namespace mozilla {
17 namespace dom {
19 class ScrollAreaEvent : public UIEvent,
20 public nsIDOMScrollAreaEvent
22 public:
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);
46 float X() const
48 return mClientArea.Left();
51 float Y() const
53 return mClientArea.Top();
56 float Width() const
58 return mClientArea.Width();
61 float Height() const
63 return mClientArea.Height();
66 void InitScrollAreaEvent(const nsAString& aType,
67 bool aCanBubble,
68 bool aCancelable,
69 nsIDOMWindow* aView,
70 int32_t aDetail,
71 float aX, float aY,
72 float aWidth, float aHeight,
73 ErrorResult& aRv)
75 aRv = InitScrollAreaEvent(aType, aCanBubble, aCancelable, aView,
76 aDetail, aX, aY, aWidth, aHeight);
79 protected:
80 ~ScrollAreaEvent() {}
82 DOMRect mClientArea;
85 } // namespace dom
86 } // namespace mozilla
88 #endif // mozilla_dom_ScrollAreaEvent_h_