[WRTjs] Refactor popup
[platform/framework/web/chromium-efl.git] / wrt / src / browser / wrt_native_window_delegate.h
1 // Copyright 2023 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BROWSER_WRT_NATIVE_WINDOW_DELEGATE_H_
6 #define BROWSER_WRT_NATIVE_WINDOW_DELEGATE_H_
7
8 #include "wrt/src/browser/wrt_native_window.h"
9
10 namespace views {
11 class View;
12 }  // namespace views
13
14 namespace wrt {
15
16 class WRTNativeWindowDelegate {
17  public:
18   WRTNativeWindowDelegate() {}
19   virtual ~WRTNativeWindowDelegate() {}
20
21   virtual Evas_Object* GetWindowEvasObject() { return nullptr; }
22   virtual Evas_Object* GetTopWindow() { return nullptr; }
23   virtual Evas_Object* GetConformant() { return nullptr; }
24
25   virtual WRTWindowTreeHost* GetWindowTreeHost(WRTNativeWindow* native_window);
26   virtual void OnNativeWindowDestroyed(WRTNativeWindow* native_window);
27
28   virtual void ClearHandlers() {}
29   virtual void InitRotation() {}
30   virtual int SetRotationState(bool is_auto, int degree = -1) { return 0; }
31   virtual void SetContentView(WRTNativeWindow* native_window,
32                               views::View* view);
33   virtual void Show(WRTNativeWindow* native_window) {}
34   virtual void Hide() {}
35   virtual bool IsFocused(WRTNativeWindow* native_window) { return false; }
36   virtual void Focus(WRTNativeWindow* native_window, bool focus) {}
37   virtual void OnConformantChange() {}
38   virtual void RemoveWidgetClient(WRTNativeWindow* native_window) {}
39
40   // product specific
41   using ScreenOrientation = WRTNativeWindow::ScreenOrientation;
42   virtual void DidFinishNavigation() {}
43   virtual void SetScreenOrientation(WRTNativeWindow* native_window,
44                                     ScreenOrientation orientation) {}
45   virtual void SetConformantObject(bool no_resize) {}
46   virtual void SetWindowBorderAlpha() {}
47   virtual void SetZoomLevel(double level, const char* style) {}
48 };
49
50 }  // namespace wrt
51
52 #endif  // BROWSER_WRT_NATIVE_WINDOW_DELEGATE_H_