2020-01-06 10:59:05 +01:00
|
|
|
// Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
|
2014-07-01 00:30:29 +02:00
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are
|
|
|
|
// met:
|
|
|
|
//
|
|
|
|
// * Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
// * Redistributions in binary form must reproduce the above
|
|
|
|
// copyright notice, this list of conditions and the following disclaimer
|
|
|
|
// in the documentation and/or other materials provided with the
|
|
|
|
// distribution.
|
|
|
|
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
|
|
|
// Framework nor the names of its contributors may be used to endorse
|
|
|
|
// or promote products derived from this software without specific prior
|
|
|
|
// written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool and should not edited
|
|
|
|
// by hand. See the translator.README.txt file in the tools directory for
|
|
|
|
// more information.
|
|
|
|
//
|
2020-01-06 10:59:05 +01:00
|
|
|
// $hash=e642fc1fe3b97a90c0eae7f0fc0a5cfd385e3e17$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
|
|
|
|
#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
|
|
|
|
#pragma once
|
|
|
|
|
2017-05-12 20:28:25 +02:00
|
|
|
#include "include/capi/cef_accessibility_handler_capi.h"
|
2014-07-01 00:30:29 +02:00
|
|
|
#include "include/capi/cef_base_capi.h"
|
|
|
|
#include "include/capi/cef_browser_capi.h"
|
|
|
|
#include "include/capi/cef_drag_data_capi.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
///
|
|
|
|
// Implement this structure to handle events when window rendering is disabled.
|
|
|
|
// The functions of this structure will be called on the UI thread.
|
|
|
|
///
|
|
|
|
typedef struct _cef_render_handler_t {
|
|
|
|
///
|
|
|
|
// Base structure.
|
|
|
|
///
|
2017-02-09 23:07:43 +01:00
|
|
|
cef_base_ref_counted_t base;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-05-12 20:28:25 +02:00
|
|
|
///
|
|
|
|
// Return the handler for accessibility notifications. If no handler is
|
|
|
|
// provided the default implementation will be used.
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_accessibility_handler_t*(CEF_CALLBACK* get_accessibility_handler)(
|
2017-05-12 20:28:25 +02:00
|
|
|
struct _cef_render_handler_t* self);
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
|
|
|
// Called to retrieve the root window rectangle in screen coordinates. Return
|
2018-09-25 15:40:02 +02:00
|
|
|
// true (1) if the rectangle was provided. If this function returns false (0)
|
|
|
|
// the rectangle from GetViewRect will be used.
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_root_screen_rect)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_rect_t* rect);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called to retrieve the view rectangle which is relative to screen
|
2018-09-25 15:40:02 +02:00
|
|
|
// coordinates. This function must always provide a non-NULL rectangle.
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
2018-09-25 15:40:02 +02:00
|
|
|
void(CEF_CALLBACK* get_view_rect)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_rect_t* rect);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called to retrieve the translation from view coordinates to actual screen
|
|
|
|
// coordinates. Return true (1) if the screen coordinates were provided.
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_screen_point)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
int viewX,
|
|
|
|
int viewY,
|
|
|
|
int* screenX,
|
|
|
|
int* screenY);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called to allow the client to fill in the CefScreenInfo object with
|
|
|
|
// appropriate values. Return true (1) if the |screen_info| structure has been
|
|
|
|
// modified.
|
|
|
|
//
|
|
|
|
// If the screen info rectangle is left NULL the rectangle from GetViewRect
|
|
|
|
// will be used. If the rectangle is still NULL or invalid popups may not be
|
|
|
|
// drawn correctly.
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_screen_info)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
struct _cef_screen_info_t* screen_info);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when the browser wants to show or hide the popup widget. The popup
|
|
|
|
// should be shown if |show| is true (1) and hidden if |show| is false (0).
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* on_popup_show)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
int show);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when the browser wants to move or resize the popup widget. |rect|
|
2015-01-01 17:51:56 +01:00
|
|
|
// contains the new location and size in view coordinates.
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* on_popup_size)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
const cef_rect_t* rect);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
2015-01-01 17:51:56 +01:00
|
|
|
// Called when an element should be painted. Pixel values passed to this
|
|
|
|
// function are scaled relative to view coordinates based on the value of
|
|
|
|
// CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
|
|
|
|
// indicates whether the element is the view or the popup widget. |buffer|
|
|
|
|
// contains the pixel data for the whole image. |dirtyRects| contains the set
|
|
|
|
// of rectangles in pixel coordinates that need to be repainted. |buffer| will
|
|
|
|
// be |width|*|height|*4 bytes in size and represents a BGRA image with an
|
2018-10-02 14:14:11 +02:00
|
|
|
// upper-left origin. This function is only called when
|
|
|
|
// cef_window_tInfo::shared_texture_enabled is set to false (0).
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* on_paint)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_paint_element_type_t type,
|
|
|
|
size_t dirtyRectsCount,
|
|
|
|
cef_rect_t const* dirtyRects,
|
|
|
|
const void* buffer,
|
|
|
|
int width,
|
|
|
|
int height);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2018-07-03 02:46:03 +02:00
|
|
|
///
|
2018-10-02 14:14:11 +02:00
|
|
|
// Called when an element has been rendered to the shared texture handle.
|
|
|
|
// |type| indicates whether the element is the view or the popup widget.
|
|
|
|
// |dirtyRects| contains the set of rectangles in pixel coordinates that need
|
|
|
|
// to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that
|
|
|
|
// can be accessed via ID3D11Device using the OpenSharedResource function.
|
|
|
|
// This function is only called when cef_window_tInfo::shared_texture_enabled
|
|
|
|
// is set to true (1), and is currently only supported on Windows.
|
2018-07-03 02:46:03 +02:00
|
|
|
///
|
|
|
|
void(CEF_CALLBACK* on_accelerated_paint)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_paint_element_type_t type,
|
|
|
|
size_t dirtyRectsCount,
|
|
|
|
cef_rect_t const* dirtyRects,
|
|
|
|
void* shared_handle);
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
2014-11-24 22:56:12 +01:00
|
|
|
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
|
|
|
|
// |custom_cursor_info| will be populated with the custom cursor information.
|
2014-07-01 00:30:29 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* on_cursor_change)(
|
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_cursor_handle_t cursor,
|
2014-11-24 22:56:12 +01:00
|
|
|
cef_cursor_type_t type,
|
|
|
|
const struct _cef_cursor_info_t* custom_cursor_info);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when the user starts dragging content in the web view. Contextual
|
2015-01-01 17:51:56 +01:00
|
|
|
// information about the dragged content is supplied by |drag_data|. (|x|,
|
|
|
|
// |y|) is the drag start location in screen coordinates. OS APIs that run a
|
|
|
|
// system message loop may be used within the StartDragging call.
|
2014-07-01 00:30:29 +02:00
|
|
|
//
|
|
|
|
// Return false (0) to abort the drag operation. Don't call any of
|
|
|
|
// cef_browser_host_t::DragSource*Ended* functions after returning false (0).
|
|
|
|
//
|
|
|
|
// Return true (1) to handle the drag operation. Call
|
|
|
|
// cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either
|
|
|
|
// synchronously or asynchronously to inform the web view that the drag
|
|
|
|
// operation has ended.
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* start_dragging)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
struct _cef_drag_data_t* drag_data,
|
|
|
|
cef_drag_operations_mask_t allowed_ops,
|
|
|
|
int x,
|
|
|
|
int y);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when the web view wants to update the mouse cursor during a drag &
|
|
|
|
// drop operation. |operation| describes the allowed operation (none, move,
|
|
|
|
// copy, link).
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* update_drag_cursor)(struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_drag_operations_mask_t operation);
|
2014-10-07 22:43:21 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when the scroll offset has changed.
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* on_scroll_offset_changed)(
|
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
double x,
|
|
|
|
double y);
|
2016-10-28 18:11:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when the IME composition range has changed. |selected_range| is the
|
|
|
|
// range of characters that have been selected. |character_bounds| is the
|
|
|
|
// bounds of each character in view coordinates.
|
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
void(CEF_CALLBACK* on_ime_composition_range_changed)(
|
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
const cef_range_t* selected_range,
|
|
|
|
size_t character_boundsCount,
|
2016-10-28 18:11:24 +02:00
|
|
|
cef_rect_t const* character_bounds);
|
2018-04-09 19:48:23 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when text selection has changed for the specified |browser|.
|
|
|
|
// |selected_text| is the currently selected text and |selected_range| is the
|
|
|
|
// character range.
|
|
|
|
///
|
|
|
|
void(CEF_CALLBACK* on_text_selection_changed)(
|
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
const cef_string_t* selected_text,
|
|
|
|
const cef_range_t* selected_range);
|
2019-02-26 17:49:41 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
// Called when an on-screen keyboard should be shown or hidden for the
|
|
|
|
// specified |browser|. |input_mode| specifies what kind of keyboard should be
|
|
|
|
// opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing keyboard
|
|
|
|
// for this browser should be hidden.
|
|
|
|
///
|
|
|
|
void(CEF_CALLBACK* on_virtual_keyboard_requested)(
|
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
struct _cef_browser_t* browser,
|
|
|
|
cef_text_input_mode_t input_mode);
|
2014-07-01 00:30:29 +02:00
|
|
|
} cef_render_handler_t;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
|