@@ -16,15 +16,18 @@ using ByteMessage = std::vector<uint8_t>;
1616
1717class PlatformView {
1818 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 ) {}
2427 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 ; }
2831 flutter::PluginRegistrar* GetPluginRegistrar () { return registrar_; }
2932 virtual void Dispose () = 0;
3033 virtual void Resize (double width, double height) = 0;
@@ -36,8 +39,8 @@ class PlatformView {
3639 double dy) = 0;
3740 virtual void SetDirection (int direction) = 0;
3841 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_ ; }
4144
4245 // Key input event
4346 virtual void DispatchKeyDownEvent (Ecore_Event_Key* key) = 0;
@@ -47,11 +50,14 @@ class PlatformView {
4750
4851 virtual void SetSoftwareKeyboardContext (Ecore_IMF_Context* context) = 0;
4952
53+ protected:
54+ void * platform_window_;
55+
5056 private:
5157 flutter::PluginRegistrar* registrar_;
52- int viewId_ ;
53- int textureId_ ;
54- bool isFocused_ ;
58+ int view_id_ ;
59+ int texture_id_ ;
60+ bool is_focused_ ;
5561};
5662
5763class PlatformViewFactory {
@@ -64,11 +70,15 @@ class PlatformViewFactory {
6470 const flutter::MessageCodec<flutter::EncodableValue>& GetCodec () {
6571 return codec_;
6672 }
67- virtual PlatformView* Create (int viewId ,
73+ virtual PlatformView* Create (int view_id ,
6874 double width,
6975 double height,
70- const ByteMessage& createParams ) = 0;
76+ const ByteMessage& parameters ) = 0;
7177 virtual void Dispose () = 0;
78+ void SetWindow (void * platform_window) { platform_window_ = platform_window; }
79+
80+ protected:
81+ void * platform_window_;
7282
7383 private:
7484 flutter::PluginRegistrar* registrar_;
0 commit comments