• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=8f99bf38ab96b2ffa22f43891d01c61f73aafaf3$
13 //
14 
15 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_CTOCPP_H_
16 #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_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/capi/views/cef_button_capi.h"
25 #include "include/capi/views/cef_panel_capi.h"
26 #include "include/capi/views/cef_scroll_view_capi.h"
27 #include "include/capi/views/cef_textfield_capi.h"
28 #include "include/capi/views/cef_view_capi.h"
29 #include "include/capi/views/cef_window_capi.h"
30 #include "include/views/cef_browser_view.h"
31 #include "include/views/cef_button.h"
32 #include "include/views/cef_panel.h"
33 #include "include/views/cef_scroll_view.h"
34 #include "include/views/cef_textfield.h"
35 #include "include/views/cef_view.h"
36 #include "include/views/cef_window.h"
37 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
38 
39 // Wrap a C structure with a C++ class.
40 // This class may be instantiated and accessed wrapper-side only.
41 class CefViewCToCpp
42     : public CefCToCppRefCounted<CefViewCToCpp, CefView, cef_view_t> {
43  public:
44   CefViewCToCpp();
45   virtual ~CefViewCToCpp();
46 
47   // CefView methods.
48   CefRefPtr<CefBrowserView> AsBrowserView() override;
49   CefRefPtr<CefButton> AsButton() override;
50   CefRefPtr<CefPanel> AsPanel() override;
51   CefRefPtr<CefScrollView> AsScrollView() override;
52   CefRefPtr<CefTextfield> AsTextfield() override;
53   CefString GetTypeString() override;
54   CefString ToString(bool include_children) override;
55   bool IsValid() override;
56   bool IsAttached() override;
57   bool IsSame(CefRefPtr<CefView> that) override;
58   CefRefPtr<CefViewDelegate> GetDelegate() override;
59   CefRefPtr<CefWindow> GetWindow() override;
60   int GetID() override;
61   void SetID(int id) override;
62   int GetGroupID() override;
63   void SetGroupID(int group_id) override;
64   CefRefPtr<CefView> GetParentView() override;
65   CefRefPtr<CefView> GetViewForID(int id) override;
66   void SetBounds(const CefRect& bounds) override;
67   CefRect GetBounds() override;
68   CefRect GetBoundsInScreen() override;
69   void SetSize(const CefSize& size) override;
70   CefSize GetSize() override;
71   void SetPosition(const CefPoint& position) override;
72   CefPoint GetPosition() override;
73   void SetInsets(const CefInsets& insets) override;
74   CefInsets GetInsets() override;
75   CefSize GetPreferredSize() override;
76   void SizeToPreferredSize() override;
77   CefSize GetMinimumSize() override;
78   CefSize GetMaximumSize() override;
79   int GetHeightForWidth(int width) override;
80   void InvalidateLayout() override;
81   void SetVisible(bool visible) override;
82   bool IsVisible() override;
83   bool IsDrawn() override;
84   void SetEnabled(bool enabled) override;
85   bool IsEnabled() override;
86   void SetFocusable(bool focusable) override;
87   bool IsFocusable() override;
88   bool IsAccessibilityFocusable() override;
89   void RequestFocus() override;
90   void SetBackgroundColor(cef_color_t color) override;
91   cef_color_t GetBackgroundColor() override;
92   bool ConvertPointToScreen(CefPoint& point) override;
93   bool ConvertPointFromScreen(CefPoint& point) override;
94   bool ConvertPointToWindow(CefPoint& point) override;
95   bool ConvertPointFromWindow(CefPoint& point) override;
96   bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override;
97   bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override;
98 };
99 
100 #endif  // CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_CTOCPP_H_
101