1 // Copyright (c) 2021 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=14eca959988209ba8f95037a47192fd50d64f2f1$ 37 // 38 39 #ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 40 #define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 41 #pragma once 42 43 #include "include/capi/cef_audio_handler_capi.h" 44 #include "include/capi/cef_base_capi.h" 45 #include "include/capi/cef_context_menu_handler_capi.h" 46 #include "include/capi/cef_dialog_handler_capi.h" 47 #include "include/capi/cef_display_handler_capi.h" 48 #include "include/capi/cef_download_handler_capi.h" 49 #include "include/capi/cef_drag_handler_capi.h" 50 #include "include/capi/cef_find_handler_capi.h" 51 #include "include/capi/cef_focus_handler_capi.h" 52 #include "include/capi/cef_jsdialog_handler_capi.h" 53 #include "include/capi/cef_keyboard_handler_capi.h" 54 #include "include/capi/cef_life_span_handler_capi.h" 55 #include "include/capi/cef_load_handler_capi.h" 56 #include "include/capi/cef_print_handler_capi.h" 57 #include "include/capi/cef_process_message_capi.h" 58 #include "include/capi/cef_render_handler_capi.h" 59 #include "include/capi/cef_request_handler_capi.h" 60 61 #ifdef __cplusplus 62 extern "C" { 63 #endif 64 65 /// 66 // Implement this structure to provide handler implementations. 67 /// 68 typedef struct _cef_client_t { 69 /// 70 // Base structure. 71 /// 72 cef_base_ref_counted_t base; 73 74 /// 75 // Return the handler for audio rendering events. 76 /// 77 struct _cef_audio_handler_t*(CEF_CALLBACK* get_audio_handler)( 78 struct _cef_client_t* self); 79 80 /// 81 // Return the handler for context menus. If no handler is provided the default 82 // implementation will be used. 83 /// 84 struct _cef_context_menu_handler_t*(CEF_CALLBACK* get_context_menu_handler)( 85 struct _cef_client_t* self); 86 87 /// 88 // Return the handler for dialogs. If no handler is provided the default 89 // implementation will be used. 90 /// 91 struct _cef_dialog_handler_t*(CEF_CALLBACK* get_dialog_handler)( 92 struct _cef_client_t* self); 93 94 /// 95 // Return the handler for browser display state events. 96 /// 97 struct _cef_display_handler_t*(CEF_CALLBACK* get_display_handler)( 98 struct _cef_client_t* self); 99 100 /// 101 // Return the handler for download events. If no handler is returned downloads 102 // will not be allowed. 103 /// 104 struct _cef_download_handler_t*(CEF_CALLBACK* get_download_handler)( 105 struct _cef_client_t* self); 106 107 /// 108 // Return the handler for drag events. 109 /// 110 struct _cef_drag_handler_t*(CEF_CALLBACK* get_drag_handler)( 111 struct _cef_client_t* self); 112 113 /// 114 // Return the handler for find result events. 115 /// 116 struct _cef_find_handler_t*(CEF_CALLBACK* get_find_handler)( 117 struct _cef_client_t* self); 118 119 /// 120 // Return the handler for focus events. 121 /// 122 struct _cef_focus_handler_t*(CEF_CALLBACK* get_focus_handler)( 123 struct _cef_client_t* self); 124 125 /// 126 // Return the handler for JavaScript dialogs. If no handler is provided the 127 // default implementation will be used. 128 /// 129 struct _cef_jsdialog_handler_t*(CEF_CALLBACK* get_jsdialog_handler)( 130 struct _cef_client_t* self); 131 132 /// 133 // Return the handler for keyboard events. 134 /// 135 struct _cef_keyboard_handler_t*(CEF_CALLBACK* get_keyboard_handler)( 136 struct _cef_client_t* self); 137 138 /// 139 // Return the handler for browser life span events. 140 /// 141 struct _cef_life_span_handler_t*(CEF_CALLBACK* get_life_span_handler)( 142 struct _cef_client_t* self); 143 144 /// 145 // Return the handler for browser load status events. 146 /// 147 struct _cef_load_handler_t*(CEF_CALLBACK* get_load_handler)( 148 struct _cef_client_t* self); 149 150 /// 151 // Return the handler for printing on Linux. If a print handler is not 152 // provided then printing will not be supported on the Linux platform. 153 /// 154 struct _cef_print_handler_t*(CEF_CALLBACK* get_print_handler)( 155 struct _cef_client_t* self); 156 157 /// 158 // Return the handler for off-screen rendering events. 159 /// 160 struct _cef_render_handler_t*(CEF_CALLBACK* get_render_handler)( 161 struct _cef_client_t* self); 162 163 /// 164 // Return the handler for browser request events. 165 /// 166 struct _cef_request_handler_t*(CEF_CALLBACK* get_request_handler)( 167 struct _cef_client_t* self); 168 169 /// 170 // Called when a new message is received from a different process. Return true 171 // (1) if the message was handled or false (0) otherwise. Do not keep a 172 // reference to or attempt to access the message outside of this callback. 173 /// 174 int(CEF_CALLBACK* on_process_message_received)( 175 struct _cef_client_t* self, 176 struct _cef_browser_t* browser, 177 struct _cef_frame_t* frame, 178 cef_process_id_t source_process, 179 struct _cef_process_message_t* message); 180 } cef_client_t; 181 182 #ifdef __cplusplus 183 } 184 #endif 185 186 #endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 187