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