dom/events/NotifyPaintEvent.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:b2166589c511
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/. */
5
6 #ifndef mozilla_dom_NotifyPaintEvent_h_
7 #define mozilla_dom_NotifyPaintEvent_h_
8
9 #include "mozilla/Attributes.h"
10 #include "mozilla/dom/Event.h"
11 #include "mozilla/dom/NotifyPaintEventBinding.h"
12 #include "nsIDOMNotifyPaintEvent.h"
13 #include "nsPresContext.h"
14
15 namespace mozilla {
16 namespace dom {
17
18 class DOMRect;
19 class DOMRectList;
20 class PaintRequestList;
21
22 class NotifyPaintEvent : public Event,
23 public nsIDOMNotifyPaintEvent
24 {
25
26 public:
27 NotifyPaintEvent(EventTarget* aOwner,
28 nsPresContext* aPresContext,
29 WidgetEvent* aEvent,
30 uint32_t aEventType,
31 nsInvalidateRequestList* aInvalidateRequests);
32
33 NS_DECL_ISUPPORTS_INHERITED
34
35 NS_DECL_NSIDOMNOTIFYPAINTEVENT
36
37 // Forward to base class
38 NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION
39 NS_IMETHOD DuplicatePrivateData() MOZ_OVERRIDE
40 {
41 return Event::DuplicatePrivateData();
42 }
43 NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) MOZ_OVERRIDE;
44 NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, void** aIter) MOZ_OVERRIDE;
45
46 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
47 {
48 return NotifyPaintEventBinding::Wrap(aCx, this);
49 }
50
51 already_AddRefed<DOMRectList> ClientRects();
52
53 already_AddRefed<DOMRect> BoundingClientRect();
54
55 already_AddRefed<PaintRequestList> PaintRequests();
56 private:
57 nsRegion GetRegion();
58
59 nsTArray<nsInvalidateRequestList::Request> mInvalidateRequests;
60 };
61
62 } // namespace dom
63 } // namespace mozilla
64
65 #endif // mozilla_dom_NotifyPaintEvent_h_

mercurial