@@ -16,15 +16,18 @@ using ByteMessage = std::vector<uint8_t>;
16
16
17
17
class PlatformView {
18
18
public:
19
- PlatformView (flutter::PluginRegistrar* registrar, int viewId)
20
- : registrar_(registrar),
21
- viewId_ (viewId),
22
- textureId_(0 ),
23
- isFocused_(false ) {}
19
+ PlatformView (flutter::PluginRegistrar* registrar,
20
+ int view_id,
21
+ void * platform_window)
22
+ : platform_window_(platform_window),
23
+ registrar_ (registrar),
24
+ view_id_(view_id),
25
+ texture_id_(0 ),
26
+ is_focused_(false ) {}
24
27
virtual ~PlatformView () {}
25
- int GetViewId () { return viewId_ ; }
26
- int GetTextureId () { return textureId_ ; }
27
- void SetTextureId (int textureId ) { textureId_ = textureId ; }
28
+ int GetViewId () { return view_id_ ; }
29
+ int GetTextureId () { return texture_id_ ; }
30
+ void SetTextureId (int texture_id ) { texture_id_ = texture_id ; }
28
31
flutter::PluginRegistrar* GetPluginRegistrar () { return registrar_; }
29
32
virtual void Dispose () = 0;
30
33
virtual void Resize (double width, double height) = 0;
@@ -36,8 +39,8 @@ class PlatformView {
36
39
double dy) = 0;
37
40
virtual void SetDirection (int direction) = 0;
38
41
virtual void ClearFocus () = 0;
39
- void SetFocus (bool f) { isFocused_ = f; }
40
- bool IsFocused () { return isFocused_ ; }
42
+ void SetFocus (bool f) { is_focused_ = f; }
43
+ bool IsFocused () { return is_focused_ ; }
41
44
42
45
// Key input event
43
46
virtual void DispatchKeyDownEvent (Ecore_Event_Key* key) = 0;
@@ -47,11 +50,14 @@ class PlatformView {
47
50
48
51
virtual void SetSoftwareKeyboardContext (Ecore_IMF_Context* context) = 0;
49
52
53
+ protected:
54
+ void * platform_window_;
55
+
50
56
private:
51
57
flutter::PluginRegistrar* registrar_;
52
- int viewId_ ;
53
- int textureId_ ;
54
- bool isFocused_ ;
58
+ int view_id_ ;
59
+ int texture_id_ ;
60
+ bool is_focused_ ;
55
61
};
56
62
57
63
class PlatformViewFactory {
@@ -64,11 +70,15 @@ class PlatformViewFactory {
64
70
const flutter::MessageCodec<flutter::EncodableValue>& GetCodec () {
65
71
return codec_;
66
72
}
67
- virtual PlatformView* Create (int viewId ,
73
+ virtual PlatformView* Create (int view_id ,
68
74
double width,
69
75
double height,
70
- const ByteMessage& createParams ) = 0;
76
+ const ByteMessage& parameters ) = 0;
71
77
virtual void Dispose () = 0;
78
+ void SetWindow (void * platform_window) { platform_window_ = platform_window; }
79
+
80
+ protected:
81
+ void * platform_window_;
72
82
73
83
private:
74
84
flutter::PluginRegistrar* registrar_;
0 commit comments