|
@@ -1,30 +0,0 @@
|
1
|
|
-package com.th3rdwave.safeareacontext;
|
2
|
|
-
|
3
|
|
-import com.facebook.react.bridge.Arguments;
|
4
|
|
-import com.facebook.react.bridge.WritableMap;
|
5
|
|
-import com.facebook.react.uimanager.events.Event;
|
6
|
|
-import com.facebook.react.uimanager.events.RCTEventEmitter;
|
7
|
|
-
|
8
|
|
-/* package */ class WindowChangeEvent extends Event<WindowChangeEvent> {
|
9
|
|
- private static final String EVENT_NAME = "topWindowChange";
|
10
|
|
-
|
11
|
|
- private Rect mFrame;
|
12
|
|
-
|
13
|
|
- WindowChangeEvent(int viewTag, Rect frame) {
|
14
|
|
- super(viewTag);
|
15
|
|
-
|
16
|
|
- mFrame = frame;
|
17
|
|
- }
|
18
|
|
-
|
19
|
|
- @Override
|
20
|
|
- public String getEventName() {
|
21
|
|
- return EVENT_NAME;
|
22
|
|
- }
|
23
|
|
-
|
24
|
|
- @Override
|
25
|
|
- public void dispatch(RCTEventEmitter rctEventEmitter) {
|
26
|
|
- WritableMap event = Arguments.createMap();
|
27
|
|
- event.putMap("frame", SerializationUtils.rectToJsMap(mFrame));
|
28
|
|
- rctEventEmitter.receiveEvent(getViewTag(), getEventName(), event);
|
29
|
|
- }
|
30
|
|
-}
|