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