• 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=de430ab07ee4a1ba234c17ae560813a0aeeef5da$
13 //
14 
15 #ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_
16 #define CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_
17 #pragma once
18 
19 #if !defined(BUILDING_CEF_SHARED)
20 #error This file can be included DLL-side only
21 #endif
22 
23 #include "include/capi/cef_render_handler_capi.h"
24 #include "include/cef_render_handler.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 DLL-side only.
29 class CefRenderHandlerCToCpp
30     : public CefCToCppRefCounted<CefRenderHandlerCToCpp,
31                                  CefRenderHandler,
32                                  cef_render_handler_t> {
33  public:
34   CefRenderHandlerCToCpp();
35   virtual ~CefRenderHandlerCToCpp();
36 
37   // CefRenderHandler methods.
38   CefRefPtr<CefAccessibilityHandler> GetAccessibilityHandler() override;
39   bool GetRootScreenRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override;
40   void GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override;
41   bool GetScreenPoint(CefRefPtr<CefBrowser> browser,
42                       int viewX,
43                       int viewY,
44                       int& screenX,
45                       int& screenY) override;
46   bool GetScreenInfo(CefRefPtr<CefBrowser> browser,
47                      CefScreenInfo& screen_info) override;
48   void OnPopupShow(CefRefPtr<CefBrowser> browser, bool show) override;
49   void OnPopupSize(CefRefPtr<CefBrowser> browser, const CefRect& rect) override;
50   void OnPaint(CefRefPtr<CefBrowser> browser,
51                PaintElementType type,
52                const RectList& dirtyRects,
53                const void* buffer,
54                int width,
55                int height) override;
56   void OnAcceleratedPaint(CefRefPtr<CefBrowser> browser,
57                           PaintElementType type,
58                           const RectList& dirtyRects,
59                           void* shared_handle) override;
60   bool StartDragging(CefRefPtr<CefBrowser> browser,
61                      CefRefPtr<CefDragData> drag_data,
62                      DragOperationsMask allowed_ops,
63                      int x,
64                      int y) override;
65   void UpdateDragCursor(CefRefPtr<CefBrowser> browser,
66                         DragOperation operation) override;
67   void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser,
68                              double x,
69                              double y) override;
70   void OnImeCompositionRangeChanged(CefRefPtr<CefBrowser> browser,
71                                     const CefRange& selected_range,
72                                     const RectList& character_bounds) override;
73   void OnTextSelectionChanged(CefRefPtr<CefBrowser> browser,
74                               const CefString& selected_text,
75                               const CefRange& selected_range) override;
76   void OnVirtualKeyboardRequested(CefRefPtr<CefBrowser> browser,
77                                   TextInputMode input_mode) override;
78 };
79 
80 #endif  // CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_
81