1 // Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2 // 3 // Redistribution and use in source and binary forms, with or without 4 // modification, are permitted provided that the following conditions are 5 // met: 6 // 7 // * Redistributions of source code must retain the above copyright 8 // notice, this list of conditions and the following disclaimer. 9 // * Redistributions in binary form must reproduce the above 10 // copyright notice, this list of conditions and the following disclaimer 11 // in the documentation and/or other materials provided with the 12 // distribution. 13 // * Neither the name of Google Inc. nor the name Chromium Embedded 14 // Framework nor the names of its contributors may be used to endorse 15 // or promote products derived from this software without specific prior 16 // written permission. 17 // 18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // 30 // --------------------------------------------------------------------------- 31 // 32 // This file was generated by the CEF translator tool and should not edited 33 // by hand. See the translator.README.txt file in the tools directory for 34 // more information. 35 // 36 // $hash=142637539a094a03adc71d2f3f5b711ba64918b1$ 37 // 38 39 #ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 40 #define CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 41 #pragma once 42 43 #include "include/capi/cef_base_capi.h" 44 #include "include/capi/cef_browser_capi.h" 45 #include "include/capi/cef_frame_capi.h" 46 47 #ifdef __cplusplus 48 extern "C" { 49 #endif 50 51 /// 52 // Implement this structure to handle events related to browser display state. 53 // The functions of this structure will be called on the UI thread. 54 /// 55 typedef struct _cef_display_handler_t { 56 /// 57 // Base structure. 58 /// 59 cef_base_ref_counted_t base; 60 61 /// 62 // Called when a frame's address has changed. 63 /// 64 void(CEF_CALLBACK* on_address_change)(struct _cef_display_handler_t* self, 65 struct _cef_browser_t* browser, 66 struct _cef_frame_t* frame, 67 const cef_string_t* url); 68 69 /// 70 // Called when the page title changes. 71 /// 72 void(CEF_CALLBACK* on_title_change)(struct _cef_display_handler_t* self, 73 struct _cef_browser_t* browser, 74 const cef_string_t* title); 75 76 /// 77 // Called when the page icon changes. 78 /// 79 void(CEF_CALLBACK* on_favicon_urlchange)(struct _cef_display_handler_t* self, 80 struct _cef_browser_t* browser, 81 cef_string_list_t icon_urls); 82 83 /// 84 // Called when web content in the page has toggled fullscreen mode. If 85 // |fullscreen| is true (1) the content will automatically be sized to fill 86 // the browser content area. If |fullscreen| is false (0) the content will 87 // automatically return to its original size and position. The client is 88 // responsible for resizing the browser if desired. 89 /// 90 void(CEF_CALLBACK* on_fullscreen_mode_change)( 91 struct _cef_display_handler_t* self, 92 struct _cef_browser_t* browser, 93 int fullscreen); 94 95 /// 96 // Called when the browser is about to display a tooltip. |text| contains the 97 // text that will be displayed in the tooltip. To handle the display of the 98 // tooltip yourself return true (1). Otherwise, you can optionally modify 99 // |text| and then return false (0) to allow the browser to display the 100 // tooltip. When window rendering is disabled the application is responsible 101 // for drawing tooltips and the return value is ignored. 102 /// 103 int(CEF_CALLBACK* on_tooltip)(struct _cef_display_handler_t* self, 104 struct _cef_browser_t* browser, 105 cef_string_t* text); 106 107 /// 108 // Called when the browser receives a status message. |value| contains the 109 // text that will be displayed in the status message. 110 /// 111 void(CEF_CALLBACK* on_status_message)(struct _cef_display_handler_t* self, 112 struct _cef_browser_t* browser, 113 const cef_string_t* value); 114 115 /// 116 // Called to display a console message. Return true (1) to stop the message 117 // from being output to the console. 118 /// 119 int(CEF_CALLBACK* on_console_message)(struct _cef_display_handler_t* self, 120 struct _cef_browser_t* browser, 121 cef_log_severity_t level, 122 const cef_string_t* message, 123 const cef_string_t* source, 124 int line); 125 126 /// 127 // Called when auto-resize is enabled via 128 // cef_browser_host_t::SetAutoResizeEnabled and the contents have auto- 129 // resized. |new_size| will be the desired size in view coordinates. Return 130 // true (1) if the resize was handled or false (0) for default handling. 131 /// 132 int(CEF_CALLBACK* on_auto_resize)(struct _cef_display_handler_t* self, 133 struct _cef_browser_t* browser, 134 const cef_size_t* new_size); 135 136 /// 137 // Called when the overall page loading progress has changed. |progress| 138 // ranges from 0.0 to 1.0. 139 /// 140 void(CEF_CALLBACK* on_loading_progress_change)( 141 struct _cef_display_handler_t* self, 142 struct _cef_browser_t* browser, 143 double progress); 144 145 /// 146 // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then 147 // |custom_cursor_info| will be populated with the custom cursor information. 148 // Return true (1) if the cursor change was handled or false (0) for default 149 // handling. 150 /// 151 int(CEF_CALLBACK* on_cursor_change)( 152 struct _cef_display_handler_t* self, 153 struct _cef_browser_t* browser, 154 cef_cursor_handle_t cursor, 155 cef_cursor_type_t type, 156 const struct _cef_cursor_info_t* custom_cursor_info); 157 } cef_display_handler_t; 158 159 #ifdef __cplusplus 160 } 161 #endif 162 163 #endif // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 164