mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Windows: Add off-screen rendering support (issue #518).
- Popup menus, drag&drop and GPU acceleration are not currently supported. - Testing is enabled in cefclient by passing the "off-screen-rendering-enabled" command-line flag. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@919 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
		@@ -270,6 +270,148 @@ void CEF_CALLBACK browser_host_run_file_dialog(struct _cef_browser_host_t* self,
 | 
			
		||||
      CefRunFileDialogCallbackCToCpp::Wrap(callback));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int CEF_CALLBACK browser_host_is_window_rendering_disabled(
 | 
			
		||||
    struct _cef_browser_host_t* self) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return 0;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  bool _retval = CefBrowserHostCppToC::Get(self)->IsWindowRenderingDisabled();
 | 
			
		||||
 | 
			
		||||
  // Return type: bool
 | 
			
		||||
  return _retval;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_was_resized(struct _cef_browser_host_t* self) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->WasResized();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_invalidate(struct _cef_browser_host_t* self,
 | 
			
		||||
    const cef_rect_t* dirtyRect) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: dirtyRect; type: simple_byref_const
 | 
			
		||||
  DCHECK(dirtyRect);
 | 
			
		||||
  if (!dirtyRect)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Translate param: dirtyRect; type: simple_byref_const
 | 
			
		||||
  CefRect dirtyRectVal = dirtyRect?*dirtyRect:CefRect();
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->Invalidate(
 | 
			
		||||
      dirtyRectVal);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_send_key_event(struct _cef_browser_host_t* self,
 | 
			
		||||
    const struct _cef_key_event_t* event) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: event; type: struct_byref_const
 | 
			
		||||
  DCHECK(event);
 | 
			
		||||
  if (!event)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Translate param: event; type: struct_byref_const
 | 
			
		||||
  CefKeyEvent eventObj;
 | 
			
		||||
  if (event)
 | 
			
		||||
    eventObj.Set(*event, false);
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->SendKeyEvent(
 | 
			
		||||
      eventObj);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_send_mouse_click_event(
 | 
			
		||||
    struct _cef_browser_host_t* self, int x, int y,
 | 
			
		||||
    enum cef_mouse_button_type_t type, int mouseUp, int clickCount) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->SendMouseClickEvent(
 | 
			
		||||
      x,
 | 
			
		||||
      y,
 | 
			
		||||
      type,
 | 
			
		||||
      mouseUp?true:false,
 | 
			
		||||
      clickCount);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_send_mouse_move_event(
 | 
			
		||||
    struct _cef_browser_host_t* self, int x, int y, int mouseLeave) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->SendMouseMoveEvent(
 | 
			
		||||
      x,
 | 
			
		||||
      y,
 | 
			
		||||
      mouseLeave?true:false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_send_mouse_wheel_event(
 | 
			
		||||
    struct _cef_browser_host_t* self, int x, int y, int deltaX, int deltaY) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->SendMouseWheelEvent(
 | 
			
		||||
      x,
 | 
			
		||||
      y,
 | 
			
		||||
      deltaX,
 | 
			
		||||
      deltaY);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_send_focus_event(
 | 
			
		||||
    struct _cef_browser_host_t* self, int setFocus) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->SendFocusEvent(
 | 
			
		||||
      setFocus?true:false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK browser_host_send_capture_lost_event(
 | 
			
		||||
    struct _cef_browser_host_t* self) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefBrowserHostCppToC::Get(self)->SendCaptureLostEvent();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// CONSTRUCTOR - Do not edit by hand.
 | 
			
		||||
 | 
			
		||||
@@ -288,6 +430,17 @@ CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
 | 
			
		||||
  struct_.struct_.get_zoom_level = browser_host_get_zoom_level;
 | 
			
		||||
  struct_.struct_.set_zoom_level = browser_host_set_zoom_level;
 | 
			
		||||
  struct_.struct_.run_file_dialog = browser_host_run_file_dialog;
 | 
			
		||||
  struct_.struct_.is_window_rendering_disabled =
 | 
			
		||||
      browser_host_is_window_rendering_disabled;
 | 
			
		||||
  struct_.struct_.was_resized = browser_host_was_resized;
 | 
			
		||||
  struct_.struct_.invalidate = browser_host_invalidate;
 | 
			
		||||
  struct_.struct_.send_key_event = browser_host_send_key_event;
 | 
			
		||||
  struct_.struct_.send_mouse_click_event = browser_host_send_mouse_click_event;
 | 
			
		||||
  struct_.struct_.send_mouse_move_event = browser_host_send_mouse_move_event;
 | 
			
		||||
  struct_.struct_.send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
 | 
			
		||||
  struct_.struct_.send_focus_event = browser_host_send_focus_event;
 | 
			
		||||
  struct_.struct_.send_capture_lost_event =
 | 
			
		||||
      browser_host_send_capture_lost_event;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef NDEBUG
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@
 | 
			
		||||
#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h"
 | 
			
		||||
#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h"
 | 
			
		||||
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
 | 
			
		||||
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
 | 
			
		||||
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
 | 
			
		||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
 | 
			
		||||
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
 | 
			
		||||
@@ -188,6 +189,22 @@ struct _cef_load_handler_t* CEF_CALLBACK client_get_load_handler(
 | 
			
		||||
  return CefLoadHandlerCppToC::Wrap(_retval);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct _cef_render_handler_t* CEF_CALLBACK client_get_render_handler(
 | 
			
		||||
    struct _cef_client_t* self) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return NULL;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefRefPtr<CefRenderHandler> _retval = CefClientCppToC::Get(
 | 
			
		||||
      self)->GetRenderHandler();
 | 
			
		||||
 | 
			
		||||
  // Return type: refptr_same
 | 
			
		||||
  return CefRenderHandlerCppToC::Wrap(_retval);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct _cef_request_handler_t* CEF_CALLBACK client_get_request_handler(
 | 
			
		||||
    struct _cef_client_t* self) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
@@ -246,6 +263,7 @@ CefClientCppToC::CefClientCppToC(CefClient* cls)
 | 
			
		||||
  struct_.struct_.get_keyboard_handler = client_get_keyboard_handler;
 | 
			
		||||
  struct_.struct_.get_life_span_handler = client_get_life_span_handler;
 | 
			
		||||
  struct_.struct_.get_load_handler = client_get_load_handler;
 | 
			
		||||
  struct_.struct_.get_render_handler = client_get_render_handler;
 | 
			
		||||
  struct_.struct_.get_request_handler = client_get_request_handler;
 | 
			
		||||
  struct_.struct_.on_process_message_received =
 | 
			
		||||
      client_on_process_message_received;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										252
									
								
								libcef_dll/cpptoc/render_handler_cpptoc.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										252
									
								
								libcef_dll/cpptoc/render_handler_cpptoc.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,252 @@
 | 
			
		||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
 | 
			
		||||
// reserved. Use of this source code is governed by a BSD-style license that
 | 
			
		||||
// can be found in the LICENSE file.
 | 
			
		||||
//
 | 
			
		||||
// ---------------------------------------------------------------------------
 | 
			
		||||
//
 | 
			
		||||
// This file was generated by the CEF translator tool. If making changes by
 | 
			
		||||
// hand only do so within the body of existing method and function
 | 
			
		||||
// implementations. See the translator.README.txt file in the tools directory
 | 
			
		||||
// for more information.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
 | 
			
		||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// MEMBER FUNCTIONS - Body may be edited by hand.
 | 
			
		||||
 | 
			
		||||
int CEF_CALLBACK render_handler_get_root_screen_rect(
 | 
			
		||||
    struct _cef_render_handler_t* self, cef_browser_t* browser,
 | 
			
		||||
    cef_rect_t* rect) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: rect; type: simple_byref
 | 
			
		||||
  DCHECK(rect);
 | 
			
		||||
  if (!rect)
 | 
			
		||||
    return 0;
 | 
			
		||||
 | 
			
		||||
  // Translate param: rect; type: simple_byref
 | 
			
		||||
  CefRect rectVal = rect?*rect:CefRect();
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  bool _retval = CefRenderHandlerCppToC::Get(self)->GetRootScreenRect(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      rectVal);
 | 
			
		||||
 | 
			
		||||
  // Restore param: rect; type: simple_byref
 | 
			
		||||
  if (rect)
 | 
			
		||||
    *rect = rectVal;
 | 
			
		||||
 | 
			
		||||
  // Return type: bool
 | 
			
		||||
  return _retval;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int CEF_CALLBACK render_handler_get_view_rect(
 | 
			
		||||
    struct _cef_render_handler_t* self, cef_browser_t* browser,
 | 
			
		||||
    cef_rect_t* rect) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: rect; type: simple_byref
 | 
			
		||||
  DCHECK(rect);
 | 
			
		||||
  if (!rect)
 | 
			
		||||
    return 0;
 | 
			
		||||
 | 
			
		||||
  // Translate param: rect; type: simple_byref
 | 
			
		||||
  CefRect rectVal = rect?*rect:CefRect();
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  bool _retval = CefRenderHandlerCppToC::Get(self)->GetViewRect(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      rectVal);
 | 
			
		||||
 | 
			
		||||
  // Restore param: rect; type: simple_byref
 | 
			
		||||
  if (rect)
 | 
			
		||||
    *rect = rectVal;
 | 
			
		||||
 | 
			
		||||
  // Return type: bool
 | 
			
		||||
  return _retval;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int CEF_CALLBACK render_handler_get_screen_point(
 | 
			
		||||
    struct _cef_render_handler_t* self, cef_browser_t* browser, int viewX,
 | 
			
		||||
    int viewY, int* screenX, int* screenY) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: screenX; type: simple_byref
 | 
			
		||||
  DCHECK(screenX);
 | 
			
		||||
  if (!screenX)
 | 
			
		||||
    return 0;
 | 
			
		||||
  // Verify param: screenY; type: simple_byref
 | 
			
		||||
  DCHECK(screenY);
 | 
			
		||||
  if (!screenY)
 | 
			
		||||
    return 0;
 | 
			
		||||
 | 
			
		||||
  // Translate param: screenX; type: simple_byref
 | 
			
		||||
  int screenXVal = screenX?*screenX:0;
 | 
			
		||||
  // Translate param: screenY; type: simple_byref
 | 
			
		||||
  int screenYVal = screenY?*screenY:0;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenPoint(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      viewX,
 | 
			
		||||
      viewY,
 | 
			
		||||
      screenXVal,
 | 
			
		||||
      screenYVal);
 | 
			
		||||
 | 
			
		||||
  // Restore param: screenX; type: simple_byref
 | 
			
		||||
  if (screenX)
 | 
			
		||||
    *screenX = screenXVal;
 | 
			
		||||
  // Restore param: screenY; type: simple_byref
 | 
			
		||||
  if (screenY)
 | 
			
		||||
    *screenY = screenYVal;
 | 
			
		||||
 | 
			
		||||
  // Return type: bool
 | 
			
		||||
  return _retval;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK render_handler_on_popup_show(
 | 
			
		||||
    struct _cef_render_handler_t* self, cef_browser_t* browser, int show) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefRenderHandlerCppToC::Get(self)->OnPopupShow(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      show?true:false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK render_handler_on_popup_size(
 | 
			
		||||
    struct _cef_render_handler_t* self, cef_browser_t* browser,
 | 
			
		||||
    const cef_rect_t* rect) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: rect; type: simple_byref_const
 | 
			
		||||
  DCHECK(rect);
 | 
			
		||||
  if (!rect)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Translate param: rect; type: simple_byref_const
 | 
			
		||||
  CefRect rectVal = rect?*rect:CefRect();
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefRenderHandlerCppToC::Get(self)->OnPopupSize(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      rectVal);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self,
 | 
			
		||||
    cef_browser_t* browser, enum cef_paint_element_type_t type,
 | 
			
		||||
    size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer,
 | 
			
		||||
    int width, int height) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: dirtyRects; type: simple_vec_byref_const
 | 
			
		||||
  DCHECK(dirtyRectsCount == 0 || dirtyRects);
 | 
			
		||||
  if (dirtyRectsCount > 0 && !dirtyRects)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: buffer; type: simple_byaddr
 | 
			
		||||
  DCHECK(buffer);
 | 
			
		||||
  if (!buffer)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Translate param: dirtyRects; type: simple_vec_byref_const
 | 
			
		||||
  std::vector<CefRect > dirtyRectsList;
 | 
			
		||||
  if (dirtyRectsCount > 0) {
 | 
			
		||||
    for (size_t i = 0; i < dirtyRectsCount; ++i) {
 | 
			
		||||
      dirtyRectsList.push_back(dirtyRects[i]);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefRenderHandlerCppToC::Get(self)->OnPaint(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      type,
 | 
			
		||||
      dirtyRectsList,
 | 
			
		||||
      buffer,
 | 
			
		||||
      width,
 | 
			
		||||
      height);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CEF_CALLBACK render_handler_on_cursor_change(
 | 
			
		||||
    struct _cef_render_handler_t* self, cef_browser_t* browser,
 | 
			
		||||
    cef_cursor_handle_t cursor) {
 | 
			
		||||
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
 | 
			
		||||
 | 
			
		||||
  DCHECK(self);
 | 
			
		||||
  if (!self)
 | 
			
		||||
    return;
 | 
			
		||||
  // Verify param: browser; type: refptr_diff
 | 
			
		||||
  DCHECK(browser);
 | 
			
		||||
  if (!browser)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  // Execute
 | 
			
		||||
  CefRenderHandlerCppToC::Get(self)->OnCursorChange(
 | 
			
		||||
      CefBrowserCToCpp::Wrap(browser),
 | 
			
		||||
      cursor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// CONSTRUCTOR - Do not edit by hand.
 | 
			
		||||
 | 
			
		||||
CefRenderHandlerCppToC::CefRenderHandlerCppToC(CefRenderHandler* cls)
 | 
			
		||||
    : CefCppToC<CefRenderHandlerCppToC, CefRenderHandler, cef_render_handler_t>(
 | 
			
		||||
        cls) {
 | 
			
		||||
  struct_.struct_.get_root_screen_rect = render_handler_get_root_screen_rect;
 | 
			
		||||
  struct_.struct_.get_view_rect = render_handler_get_view_rect;
 | 
			
		||||
  struct_.struct_.get_screen_point = render_handler_get_screen_point;
 | 
			
		||||
  struct_.struct_.on_popup_show = render_handler_on_popup_show;
 | 
			
		||||
  struct_.struct_.on_popup_size = render_handler_on_popup_size;
 | 
			
		||||
  struct_.struct_.on_paint = render_handler_on_paint;
 | 
			
		||||
  struct_.struct_.on_cursor_change = render_handler_on_cursor_change;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef NDEBUG
 | 
			
		||||
template<> long CefCppToC<CefRenderHandlerCppToC, CefRenderHandler,
 | 
			
		||||
    cef_render_handler_t>::DebugObjCt = 0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										37
									
								
								libcef_dll/cpptoc/render_handler_cpptoc.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								libcef_dll/cpptoc/render_handler_cpptoc.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
 | 
			
		||||
// reserved. Use of this source code is governed by a BSD-style license that
 | 
			
		||||
// can be found in the LICENSE file.
 | 
			
		||||
//
 | 
			
		||||
// ---------------------------------------------------------------------------
 | 
			
		||||
//
 | 
			
		||||
// This file was generated by the CEF translator tool. If making changes by
 | 
			
		||||
// hand only do so within the body of existing method and function
 | 
			
		||||
// implementations. See the translator.README.txt file in the tools directory
 | 
			
		||||
// for more information.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_
 | 
			
		||||
#define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#ifndef USING_CEF_SHARED
 | 
			
		||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
 | 
			
		||||
#else  // USING_CEF_SHARED
 | 
			
		||||
 | 
			
		||||
#include "include/cef_render_handler.h"
 | 
			
		||||
#include "include/capi/cef_render_handler_capi.h"
 | 
			
		||||
#include "libcef_dll/cpptoc/cpptoc.h"
 | 
			
		||||
 | 
			
		||||
// Wrap a C++ class with a C structure.
 | 
			
		||||
// This class may be instantiated and accessed wrapper-side only.
 | 
			
		||||
class CefRenderHandlerCppToC
 | 
			
		||||
    : public CefCppToC<CefRenderHandlerCppToC, CefRenderHandler,
 | 
			
		||||
        cef_render_handler_t> {
 | 
			
		||||
 public:
 | 
			
		||||
  explicit CefRenderHandlerCppToC(CefRenderHandler* cls);
 | 
			
		||||
  virtual ~CefRenderHandlerCppToC() {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif  // USING_CEF_SHARED
 | 
			
		||||
#endif  // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user