1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 // 5 // --------------------------------------------------------------------------- 6 // 7 // This file was generated by the CEF translator tool. If making changes by 8 // hand only do so within the body of existing method and function 9 // implementations. See the translator.README.txt file in the tools directory 10 // for more information. 11 // 12 // $hash=8744854c12c6ea110a5a6eb4f15ccd5b5867c1d1$ 13 // 14 15 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_ 16 #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_ 17 #pragma once 18 19 #if !defined(WRAPPING_CEF_SHARED) 20 #error This file can be included wrapper-side only 21 #endif 22 23 #include "include/capi/views/cef_browser_view_capi.h" 24 #include "include/views/cef_browser_view.h" 25 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 26 27 // Wrap a C structure with a C++ class. 28 // This class may be instantiated and accessed wrapper-side only. 29 class CefBrowserViewCToCpp : public CefCToCppRefCounted<CefBrowserViewCToCpp, 30 CefBrowserView, 31 cef_browser_view_t> { 32 public: 33 CefBrowserViewCToCpp(); 34 virtual ~CefBrowserViewCToCpp(); 35 36 // CefBrowserView methods. 37 CefRefPtr<CefBrowser> GetBrowser() override; 38 CefRefPtr<CefView> GetChromeToolbar() override; 39 void SetPreferAccelerators(bool prefer_accelerators) override; 40 41 // CefView methods. 42 CefRefPtr<CefBrowserView> AsBrowserView() override; 43 CefRefPtr<CefButton> AsButton() override; 44 CefRefPtr<CefPanel> AsPanel() override; 45 CefRefPtr<CefScrollView> AsScrollView() override; 46 CefRefPtr<CefTextfield> AsTextfield() override; 47 CefString GetTypeString() override; 48 CefString ToString(bool include_children) override; 49 bool IsValid() override; 50 bool IsAttached() override; 51 bool IsSame(CefRefPtr<CefView> that) override; 52 CefRefPtr<CefViewDelegate> GetDelegate() override; 53 CefRefPtr<CefWindow> GetWindow() override; 54 int GetID() override; 55 void SetID(int id) override; 56 int GetGroupID() override; 57 void SetGroupID(int group_id) override; 58 CefRefPtr<CefView> GetParentView() override; 59 CefRefPtr<CefView> GetViewForID(int id) override; 60 void SetBounds(const CefRect& bounds) override; 61 CefRect GetBounds() override; 62 CefRect GetBoundsInScreen() override; 63 void SetSize(const CefSize& size) override; 64 CefSize GetSize() override; 65 void SetPosition(const CefPoint& position) override; 66 CefPoint GetPosition() override; 67 void SetInsets(const CefInsets& insets) override; 68 CefInsets GetInsets() override; 69 CefSize GetPreferredSize() override; 70 void SizeToPreferredSize() override; 71 CefSize GetMinimumSize() override; 72 CefSize GetMaximumSize() override; 73 int GetHeightForWidth(int width) override; 74 void InvalidateLayout() override; 75 void SetVisible(bool visible) override; 76 bool IsVisible() override; 77 bool IsDrawn() override; 78 void SetEnabled(bool enabled) override; 79 bool IsEnabled() override; 80 void SetFocusable(bool focusable) override; 81 bool IsFocusable() override; 82 bool IsAccessibilityFocusable() override; 83 void RequestFocus() override; 84 void SetBackgroundColor(cef_color_t color) override; 85 cef_color_t GetBackgroundColor() override; 86 bool ConvertPointToScreen(CefPoint& point) override; 87 bool ConvertPointFromScreen(CefPoint& point) override; 88 bool ConvertPointToWindow(CefPoint& point) override; 89 bool ConvertPointFromWindow(CefPoint& point) override; 90 bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override; 91 bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override; 92 }; 93 94 #endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_ 95