-
-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy pathRNKCOverKeyboardViewState.h
More file actions
43 lines (31 loc) · 880 Bytes
/
RNKCOverKeyboardViewState.h
File metadata and controls
43 lines (31 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/graphics/Float.h>
#ifdef ANDROID
#include <folly/dynamic.h>
#endif
#include <memory>
namespace facebook::react {
/*
* State for <OverKeyboardViewState> component.
*/
class OverKeyboardViewState final {
public:
using Shared = std::shared_ptr<const OverKeyboardViewState>;
OverKeyboardViewState() {}
OverKeyboardViewState(Size screenSize_) : screenSize(screenSize_) {}
#ifdef ANDROID
OverKeyboardViewState(
const OverKeyboardViewState& previousState,
folly::dynamic data)
: screenSize(Size{
(Float)data["screenWidth"].getDouble(),
(Float)data["screenHeight"].getDouble()}) {}
#endif
const Size screenSize{};
#ifdef ANDROID
folly::dynamic getDynamic() const;
#endif
#pragma mark - Getters
};
} // namespace facebook::react