Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ade29136d75b33f63cf65db4b91de9cd66114562$
//
#ifndef CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Implement this structure to receive accessibility notification when
// accessibility events have been registered. The functions of this structure
@@ -60,18 +61,19 @@ typedef struct _cef_accessibility_handler_t {
// Called after renderer process sends accessibility tree changes to the
// browser process.
///
void (CEF_CALLBACK *on_accessibility_tree_change)(
struct _cef_accessibility_handler_t* self, struct _cef_value_t* value);
void(CEF_CALLBACK* on_accessibility_tree_change)(
struct _cef_accessibility_handler_t* self,
struct _cef_value_t* value);
///
// Called after renderer process sends accessibility location changes to the
// browser process.
///
void (CEF_CALLBACK *on_accessibility_location_change)(
struct _cef_accessibility_handler_t* self, struct _cef_value_t* value);
void(CEF_CALLBACK* on_accessibility_location_change)(
struct _cef_accessibility_handler_t* self,
struct _cef_value_t* value);
} cef_accessibility_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=52ce63b881a6e3d2d13a39b81ad2626f366fc130$
//
#ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
@@ -72,8 +74,9 @@ typedef struct _cef_app_t {
// modify command-line arguments for non-browser processes as this may result
// in undefined behavior including crashes.
///
void (CEF_CALLBACK *on_before_command_line_processing)(
struct _cef_app_t* self, const cef_string_t* process_type,
void(CEF_CALLBACK* on_before_command_line_processing)(
struct _cef_app_t* self,
const cef_string_t* process_type,
struct _cef_command_line_t* command_line);
///
@@ -82,7 +85,8 @@ typedef struct _cef_app_t {
// each process and the registered schemes should be the same across all
// processes.
///
void (CEF_CALLBACK *on_register_custom_schemes)(struct _cef_app_t* self,
void(CEF_CALLBACK* on_register_custom_schemes)(
struct _cef_app_t* self,
struct _cef_scheme_registrar_t* registrar);
///
@@ -91,25 +95,24 @@ typedef struct _cef_app_t {
// If no handler is returned resources will be loaded from pack files. This
// function is called by the browser and render processes on multiple threads.
///
struct _cef_resource_bundle_handler_t* (
CEF_CALLBACK *get_resource_bundle_handler)(struct _cef_app_t* self);
struct _cef_resource_bundle_handler_t*(
CEF_CALLBACK* get_resource_bundle_handler)(struct _cef_app_t* self);
///
// Return the handler for functionality specific to the browser process. This
// function is called on multiple threads in the browser process.
///
struct _cef_browser_process_handler_t* (
CEF_CALLBACK *get_browser_process_handler)(struct _cef_app_t* self);
struct _cef_browser_process_handler_t*(
CEF_CALLBACK* get_browser_process_handler)(struct _cef_app_t* self);
///
// Return the handler for functionality specific to the render process. This
// function is called on the render process main thread.
///
struct _cef_render_process_handler_t* (
CEF_CALLBACK *get_render_process_handler)(struct _cef_app_t* self);
struct _cef_render_process_handler_t*(
CEF_CALLBACK* get_render_process_handler)(struct _cef_app_t* self);
} cef_app_t;
///
// This function should be called from the application entry point function to
// execute a secondary process. It can be used to run secondary processes from
@@ -123,7 +126,8 @@ typedef struct _cef_app_t {
// cef_sandbox_win.h for details).
///
CEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args,
cef_app_t* application, void* windows_sandbox_info);
cef_app_t* application,
void* windows_sandbox_info);
///
// This function should be called on the main application thread to initialize
@@ -133,8 +137,9 @@ CEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args,
// be NULL (see cef_sandbox_win.h for details).
///
CEF_EXPORT int cef_initialize(const struct _cef_main_args_t* args,
const struct _cef_settings_t* settings, cef_app_t* application,
void* windows_sandbox_info);
const struct _cef_settings_t* settings,
cef_app_t* application,
void* windows_sandbox_info);
///
// This function should be called on the main application thread to shut down

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=639d58245ecd39624d39ee8b49e0e4e056d1c4ed$
//
#ifndef CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Callback structure used for asynchronous continuation of authentication
// requests.
@@ -58,16 +59,16 @@ typedef struct _cef_auth_callback_t {
///
// Continue the authentication request.
///
void (CEF_CALLBACK *cont)(struct _cef_auth_callback_t* self,
const cef_string_t* username, const cef_string_t* password);
void(CEF_CALLBACK* cont)(struct _cef_auth_callback_t* self,
const cef_string_t* username,
const cef_string_t* password);
///
// Cancel the authentication request.
///
void (CEF_CALLBACK *cancel)(struct _cef_auth_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_auth_callback_t* self);
} cef_auth_callback_t;
#ifdef __cplusplus
}
#endif

View File

@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
@@ -57,22 +56,21 @@ typedef struct _cef_base_ref_counted_t {
// Called to increment the reference count for the object. Should be called
// for every new copy of a pointer to a given object.
///
void (CEF_CALLBACK *add_ref)(struct _cef_base_ref_counted_t* self);
void(CEF_CALLBACK* add_ref)(struct _cef_base_ref_counted_t* self);
///
// Called to decrement the reference count for the object. If the reference
// count falls to 0 the object should self-delete. Returns true (1) if the
// resulting reference count is 0.
///
int (CEF_CALLBACK *release)(struct _cef_base_ref_counted_t* self);
int(CEF_CALLBACK* release)(struct _cef_base_ref_counted_t* self);
///
// Returns true (1) if the current reference count is 1.
///
int (CEF_CALLBACK *has_one_ref)(struct _cef_base_ref_counted_t* self);
int(CEF_CALLBACK* has_one_ref)(struct _cef_base_ref_counted_t* self);
} cef_base_ref_counted_t;
///
// All scoped framework structures must include this structure first.
///
@@ -85,19 +83,17 @@ typedef struct _cef_base_scoped_t {
///
// Called to delete this object. May be NULL if the object is not owned.
///
void (CEF_CALLBACK *del)(struct _cef_base_scoped_t* self);
void(CEF_CALLBACK* del)(struct _cef_base_scoped_t* self);
} cef_base_scoped_t;
// Check that the structure |s|, which is defined with a size_t member at the
// top, is large enough to contain the specified member |f|.
#define CEF_MEMBER_EXISTS(s, f) \
((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= \
*reinterpret_cast<size_t*>(s))
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))
#define CEF_MEMBER_EXISTS(s, f) \
((intptr_t) & \
((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= *reinterpret_cast<size_t*>(s))
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b6308ab5e97eb9f7af95f1f4c371fd6e7edbf852$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
@@ -69,122 +71,124 @@ typedef struct _cef_browser_t {
// Returns the browser host object. This function can only be called in the
// browser process.
///
struct _cef_browser_host_t* (CEF_CALLBACK *get_host)(
struct _cef_browser_host_t*(CEF_CALLBACK* get_host)(
struct _cef_browser_t* self);
///
// Returns true (1) if the browser can navigate backwards.
///
int (CEF_CALLBACK *can_go_back)(struct _cef_browser_t* self);
int(CEF_CALLBACK* can_go_back)(struct _cef_browser_t* self);
///
// Navigate backwards.
///
void (CEF_CALLBACK *go_back)(struct _cef_browser_t* self);
void(CEF_CALLBACK* go_back)(struct _cef_browser_t* self);
///
// Returns true (1) if the browser can navigate forwards.
///
int (CEF_CALLBACK *can_go_forward)(struct _cef_browser_t* self);
int(CEF_CALLBACK* can_go_forward)(struct _cef_browser_t* self);
///
// Navigate forwards.
///
void (CEF_CALLBACK *go_forward)(struct _cef_browser_t* self);
void(CEF_CALLBACK* go_forward)(struct _cef_browser_t* self);
///
// Returns true (1) if the browser is currently loading.
///
int (CEF_CALLBACK *is_loading)(struct _cef_browser_t* self);
int(CEF_CALLBACK* is_loading)(struct _cef_browser_t* self);
///
// Reload the current page.
///
void (CEF_CALLBACK *reload)(struct _cef_browser_t* self);
void(CEF_CALLBACK* reload)(struct _cef_browser_t* self);
///
// Reload the current page ignoring any cached data.
///
void (CEF_CALLBACK *reload_ignore_cache)(struct _cef_browser_t* self);
void(CEF_CALLBACK* reload_ignore_cache)(struct _cef_browser_t* self);
///
// Stop loading the page.
///
void (CEF_CALLBACK *stop_load)(struct _cef_browser_t* self);
void(CEF_CALLBACK* stop_load)(struct _cef_browser_t* self);
///
// Returns the globally unique identifier for this browser.
///
int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self);
int(CEF_CALLBACK* get_identifier)(struct _cef_browser_t* self);
///
// Returns true (1) if this object is pointing to the same handle as |that|
// object.
///
int (CEF_CALLBACK *is_same)(struct _cef_browser_t* self,
struct _cef_browser_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_browser_t* self,
struct _cef_browser_t* that);
///
// Returns true (1) if the window is a popup window.
///
int (CEF_CALLBACK *is_popup)(struct _cef_browser_t* self);
int(CEF_CALLBACK* is_popup)(struct _cef_browser_t* self);
///
// Returns true (1) if a document has been loaded in the browser.
///
int (CEF_CALLBACK *has_document)(struct _cef_browser_t* self);
int(CEF_CALLBACK* has_document)(struct _cef_browser_t* self);
///
// Returns the main (top-level) frame for the browser window.
///
struct _cef_frame_t* (CEF_CALLBACK *get_main_frame)(
struct _cef_frame_t*(CEF_CALLBACK* get_main_frame)(
struct _cef_browser_t* self);
///
// Returns the focused frame for the browser window.
///
struct _cef_frame_t* (CEF_CALLBACK *get_focused_frame)(
struct _cef_frame_t*(CEF_CALLBACK* get_focused_frame)(
struct _cef_browser_t* self);
///
// Returns the frame with the specified identifier, or NULL if not found.
///
struct _cef_frame_t* (CEF_CALLBACK *get_frame_byident)(
struct _cef_browser_t* self, int64 identifier);
struct _cef_frame_t*(CEF_CALLBACK* get_frame_byident)(
struct _cef_browser_t* self,
int64 identifier);
///
// Returns the frame with the specified name, or NULL if not found.
///
struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_browser_t* self,
const cef_string_t* name);
struct _cef_frame_t*(CEF_CALLBACK* get_frame)(struct _cef_browser_t* self,
const cef_string_t* name);
///
// Returns the number of frames that currently exist.
///
size_t (CEF_CALLBACK *get_frame_count)(struct _cef_browser_t* self);
size_t(CEF_CALLBACK* get_frame_count)(struct _cef_browser_t* self);
///
// Returns the identifiers of all existing frames.
///
void (CEF_CALLBACK *get_frame_identifiers)(struct _cef_browser_t* self,
size_t* identifiersCount, int64* identifiers);
void(CEF_CALLBACK* get_frame_identifiers)(struct _cef_browser_t* self,
size_t* identifiersCount,
int64* identifiers);
///
// Returns the names of all existing frames.
///
void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self,
cef_string_list_t names);
void(CEF_CALLBACK* get_frame_names)(struct _cef_browser_t* self,
cef_string_list_t names);
///
// Send a message to the specified |target_process|. Returns true (1) if the
// message was sent successfully.
///
int (CEF_CALLBACK *send_process_message)(struct _cef_browser_t* self,
int(CEF_CALLBACK* send_process_message)(
struct _cef_browser_t* self,
cef_process_id_t target_process,
struct _cef_process_message_t* message);
} cef_browser_t;
///
// Callback structure for cef_browser_host_t::RunFileDialog. The functions of
// this structure will be called on the browser process UI thread.
@@ -202,12 +206,12 @@ typedef struct _cef_run_file_dialog_callback_t {
// |file_paths| will be a single value or a list of values depending on the
// dialog mode. If the selection was cancelled |file_paths| will be NULL.
///
void (CEF_CALLBACK *on_file_dialog_dismissed)(
struct _cef_run_file_dialog_callback_t* self, int selected_accept_filter,
void(CEF_CALLBACK* on_file_dialog_dismissed)(
struct _cef_run_file_dialog_callback_t* self,
int selected_accept_filter,
cef_string_list_t file_paths);
} cef_run_file_dialog_callback_t;
///
// Callback structure for cef_browser_host_t::GetNavigationEntries. The
// functions of this structure will be called on the browser process UI thread.
@@ -225,12 +229,13 @@ typedef struct _cef_navigation_entry_visitor_t {
// navigation entry. |index| is the 0-based index of this entry and |total| is
// the total number of entries.
///
int (CEF_CALLBACK *visit)(struct _cef_navigation_entry_visitor_t* self,
struct _cef_navigation_entry_t* entry, int current, int index,
int total);
int(CEF_CALLBACK* visit)(struct _cef_navigation_entry_visitor_t* self,
struct _cef_navigation_entry_t* entry,
int current,
int index,
int total);
} cef_navigation_entry_visitor_t;
///
// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this
// structure will be called on the browser process UI thread.
@@ -246,12 +251,12 @@ typedef struct _cef_pdf_print_callback_t {
// the output path. |ok| will be true (1) if the printing completed
// successfully or false (0) otherwise.
///
void (CEF_CALLBACK *on_pdf_print_finished)(
struct _cef_pdf_print_callback_t* self, const cef_string_t* path,
void(CEF_CALLBACK* on_pdf_print_finished)(
struct _cef_pdf_print_callback_t* self,
const cef_string_t* path,
int ok);
} cef_pdf_print_callback_t;
///
// Callback structure for cef_browser_host_t::DownloadImage. The functions of
// this structure will be called on the browser process UI thread.
@@ -268,13 +273,13 @@ typedef struct _cef_download_image_callback_t {
// resulting HTTP status code. |image| is the resulting image, possibly at
// multiple scale factors, or NULL if the download failed.
///
void (CEF_CALLBACK *on_download_image_finished)(
void(CEF_CALLBACK* on_download_image_finished)(
struct _cef_download_image_callback_t* self,
const cef_string_t* image_url, int http_status_code,
const cef_string_t* image_url,
int http_status_code,
struct _cef_image_t* image);
} cef_download_image_callback_t;
///
// Structure used to represent the browser process aspects of a browser window.
// The functions of this structure can only be called in the browser process.
@@ -290,7 +295,7 @@ typedef struct _cef_browser_host_t {
///
// Returns the hosted browser object.
///
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
struct _cef_browser_t*(CEF_CALLBACK* get_browser)(
struct _cef_browser_host_t* self);
///
@@ -303,8 +308,8 @@ typedef struct _cef_browser_host_t {
// cef_life_span_handler_t::do_close() documentation for additional usage
// information.
///
void (CEF_CALLBACK *close_browser)(struct _cef_browser_host_t* self,
int force_close);
void(CEF_CALLBACK* close_browser)(struct _cef_browser_host_t* self,
int force_close);
///
// Helper for closing a browser. Call this function from the top-level window
@@ -314,19 +319,19 @@ typedef struct _cef_browser_host_t {
// and cef_life_span_handler_t::do_close() documentation for additional usage
// information. This function must be called on the browser process UI thread.
///
int (CEF_CALLBACK *try_close_browser)(struct _cef_browser_host_t* self);
int(CEF_CALLBACK* try_close_browser)(struct _cef_browser_host_t* self);
///
// Set whether the browser is focused.
///
void (CEF_CALLBACK *set_focus)(struct _cef_browser_host_t* self, int focus);
void(CEF_CALLBACK* set_focus)(struct _cef_browser_host_t* self, int focus);
///
// Retrieve the window handle for this browser. If this browser is wrapped in
// a cef_browser_view_t this function should be called on the browser process
// UI thread and it will return the handle for the top-level native window.
///
cef_window_handle_t (CEF_CALLBACK *get_window_handle)(
cef_window_handle_t(CEF_CALLBACK* get_window_handle)(
struct _cef_browser_host_t* self);
///
@@ -335,39 +340,39 @@ typedef struct _cef_browser_host_t {
// cef_browser_view_t. This function can be used in combination with custom
// handling of modal windows.
///
cef_window_handle_t (CEF_CALLBACK *get_opener_window_handle)(
cef_window_handle_t(CEF_CALLBACK* get_opener_window_handle)(
struct _cef_browser_host_t* self);
///
// Returns true (1) if this browser is wrapped in a cef_browser_view_t.
///
int (CEF_CALLBACK *has_view)(struct _cef_browser_host_t* self);
int(CEF_CALLBACK* has_view)(struct _cef_browser_host_t* self);
///
// Returns the client for this browser.
///
struct _cef_client_t* (CEF_CALLBACK *get_client)(
struct _cef_client_t*(CEF_CALLBACK* get_client)(
struct _cef_browser_host_t* self);
///
// Returns the request context for this browser.
///
struct _cef_request_context_t* (CEF_CALLBACK *get_request_context)(
struct _cef_request_context_t*(CEF_CALLBACK* get_request_context)(
struct _cef_browser_host_t* self);
///
// Get the current zoom level. The default zoom level is 0.0. This function
// can only be called on the UI thread.
///
double (CEF_CALLBACK *get_zoom_level)(struct _cef_browser_host_t* self);
double(CEF_CALLBACK* get_zoom_level)(struct _cef_browser_host_t* self);
///
// Change the zoom level to the specified value. Specify 0.0 to reset the zoom
// level. If called on the UI thread the change will be applied immediately.
// Otherwise, the change will be applied asynchronously on the UI thread.
///
void (CEF_CALLBACK *set_zoom_level)(struct _cef_browser_host_t* self,
double zoomLevel);
void(CEF_CALLBACK* set_zoom_level)(struct _cef_browser_host_t* self,
double zoomLevel);
///
// Call to run a file chooser dialog. Only a single file chooser dialog may be
@@ -385,17 +390,20 @@ typedef struct _cef_browser_host_t {
// dismissed or immediately if another dialog is already pending. The dialog
// will be initiated asynchronously on the UI thread.
///
void (CEF_CALLBACK *run_file_dialog)(struct _cef_browser_host_t* self,
cef_file_dialog_mode_t mode, const cef_string_t* title,
const cef_string_t* default_file_path, cef_string_list_t accept_filters,
void(CEF_CALLBACK* run_file_dialog)(
struct _cef_browser_host_t* self,
cef_file_dialog_mode_t mode,
const cef_string_t* title,
const cef_string_t* default_file_path,
cef_string_list_t accept_filters,
int selected_accept_filter,
struct _cef_run_file_dialog_callback_t* callback);
///
// Download the file at |url| using cef_download_handler_t.
///
void (CEF_CALLBACK *start_download)(struct _cef_browser_host_t* self,
const cef_string_t* url);
void(CEF_CALLBACK* start_download)(struct _cef_browser_host_t* self,
const cef_string_t* url);
///
// Download |image_url| and execute |callback| on completion with the images
@@ -409,14 +417,18 @@ typedef struct _cef_browser_host_t {
// unlimited. If |bypass_cache| is true (1) then |image_url| is requested from
// the server even if it is present in the browser cache.
///
void (CEF_CALLBACK *download_image)(struct _cef_browser_host_t* self,
const cef_string_t* image_url, int is_favicon, uint32 max_image_size,
int bypass_cache, struct _cef_download_image_callback_t* callback);
void(CEF_CALLBACK* download_image)(
struct _cef_browser_host_t* self,
const cef_string_t* image_url,
int is_favicon,
uint32 max_image_size,
int bypass_cache,
struct _cef_download_image_callback_t* callback);
///
// Print the current browser contents.
///
void (CEF_CALLBACK *print)(struct _cef_browser_host_t* self);
void(CEF_CALLBACK* print)(struct _cef_browser_host_t* self);
///
// Print the current browser contents to the PDF file specified by |path| and
@@ -424,7 +436,8 @@ typedef struct _cef_browser_host_t {
// |path| when done. For PDF printing to work on Linux you must implement the
// cef_print_handler_t::GetPdfPaperSize function.
///
void (CEF_CALLBACK *print_to_pdf)(struct _cef_browser_host_t* self,
void(CEF_CALLBACK* print_to_pdf)(
struct _cef_browser_host_t* self,
const cef_string_t* path,
const struct _cef_pdf_print_settings_t* settings,
struct _cef_pdf_print_callback_t* callback);
@@ -440,15 +453,18 @@ typedef struct _cef_browser_host_t {
// instance, if any, returned via cef_client_t::GetFindHandler will be called
// to report find results.
///
void (CEF_CALLBACK *find)(struct _cef_browser_host_t* self, int identifier,
const cef_string_t* searchText, int forward, int matchCase,
int findNext);
void(CEF_CALLBACK* find)(struct _cef_browser_host_t* self,
int identifier,
const cef_string_t* searchText,
int forward,
int matchCase,
int findNext);
///
// Cancel all searches that are currently going on.
///
void (CEF_CALLBACK *stop_finding)(struct _cef_browser_host_t* self,
int clearSelection);
void(CEF_CALLBACK* stop_finding)(struct _cef_browser_host_t* self,
int clearSelection);
///
// Open developer tools (DevTools) in its own browser. The DevTools browser
@@ -459,7 +475,8 @@ typedef struct _cef_browser_host_t {
// inspected. The |windowInfo| parameter will be ignored if this browser is
// wrapped in a cef_browser_view_t.
///
void (CEF_CALLBACK *show_dev_tools)(struct _cef_browser_host_t* self,
void(CEF_CALLBACK* show_dev_tools)(
struct _cef_browser_host_t* self,
const struct _cef_window_info_t* windowInfo,
struct _cef_client_t* client,
const struct _cef_browser_settings_t* settings,
@@ -468,13 +485,13 @@ typedef struct _cef_browser_host_t {
///
// Explicitly close the associated DevTools browser, if any.
///
void (CEF_CALLBACK *close_dev_tools)(struct _cef_browser_host_t* self);
void(CEF_CALLBACK* close_dev_tools)(struct _cef_browser_host_t* self);
///
// Returns true (1) if this browser currently has an associated DevTools
// browser. Must be called on the browser process UI thread.
///
int (CEF_CALLBACK *has_dev_tools)(struct _cef_browser_host_t* self);
int(CEF_CALLBACK* has_dev_tools)(struct _cef_browser_host_t* self);
///
// Retrieve a snapshot of current navigation entries as values sent to the
@@ -482,38 +499,41 @@ typedef struct _cef_browser_host_t {
// navigation entry will be sent, otherwise all navigation entries will be
// sent.
///
void (CEF_CALLBACK *get_navigation_entries)(struct _cef_browser_host_t* self,
struct _cef_navigation_entry_visitor_t* visitor, int current_only);
void(CEF_CALLBACK* get_navigation_entries)(
struct _cef_browser_host_t* self,
struct _cef_navigation_entry_visitor_t* visitor,
int current_only);
///
// Set whether mouse cursor change is disabled.
///
void (CEF_CALLBACK *set_mouse_cursor_change_disabled)(
struct _cef_browser_host_t* self, int disabled);
void(CEF_CALLBACK* set_mouse_cursor_change_disabled)(
struct _cef_browser_host_t* self,
int disabled);
///
// Returns true (1) if mouse cursor change is disabled.
///
int (CEF_CALLBACK *is_mouse_cursor_change_disabled)(
int(CEF_CALLBACK* is_mouse_cursor_change_disabled)(
struct _cef_browser_host_t* self);
///
// If a misspelled word is currently selected in an editable node calling this
// function will replace it with the specified |word|.
///
void (CEF_CALLBACK *replace_misspelling)(struct _cef_browser_host_t* self,
const cef_string_t* word);
void(CEF_CALLBACK* replace_misspelling)(struct _cef_browser_host_t* self,
const cef_string_t* word);
///
// Add the specified |word| to the spelling dictionary.
///
void (CEF_CALLBACK *add_word_to_dictionary)(struct _cef_browser_host_t* self,
const cef_string_t* word);
void(CEF_CALLBACK* add_word_to_dictionary)(struct _cef_browser_host_t* self,
const cef_string_t* word);
///
// Returns true (1) if window rendering is disabled.
///
int (CEF_CALLBACK *is_window_rendering_disabled)(
int(CEF_CALLBACK* is_window_rendering_disabled)(
struct _cef_browser_host_t* self);
///
@@ -522,14 +542,14 @@ typedef struct _cef_browser_host_t {
// cef_render_handler_t::OnPaint asynchronously with the updated regions. This
// function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *was_resized)(struct _cef_browser_host_t* self);
void(CEF_CALLBACK* was_resized)(struct _cef_browser_host_t* self);
///
// Notify the browser that it has been hidden or shown. Layouting and
// cef_render_handler_t::OnPaint notification will stop when the browser is
// hidden. This function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *was_hidden)(struct _cef_browser_host_t* self, int hidden);
void(CEF_CALLBACK* was_hidden)(struct _cef_browser_host_t* self, int hidden);
///
// Send a notification to the browser that the screen info has changed. The
@@ -539,7 +559,7 @@ typedef struct _cef_browser_host_t {
// current display. This function is only used when window rendering is
// disabled.
///
void (CEF_CALLBACK *notify_screen_info_changed)(
void(CEF_CALLBACK* notify_screen_info_changed)(
struct _cef_browser_host_t* self);
///
@@ -547,29 +567,34 @@ typedef struct _cef_browser_host_t {
// asynchronously. This function is only used when window rendering is
// disabled.
///
void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self,
cef_paint_element_type_t type);
void(CEF_CALLBACK* invalidate)(struct _cef_browser_host_t* self,
cef_paint_element_type_t type);
///
// Send a key event to the browser.
///
void (CEF_CALLBACK *send_key_event)(struct _cef_browser_host_t* self,
const struct _cef_key_event_t* event);
void(CEF_CALLBACK* send_key_event)(struct _cef_browser_host_t* self,
const struct _cef_key_event_t* event);
///
// Send a mouse click event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view.
///
void (CEF_CALLBACK *send_mouse_click_event)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event, cef_mouse_button_type_t type,
int mouseUp, int clickCount);
void(CEF_CALLBACK* send_mouse_click_event)(
struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
cef_mouse_button_type_t type,
int mouseUp,
int clickCount);
///
// Send a mouse move event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view.
///
void (CEF_CALLBACK *send_mouse_move_event)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event, int mouseLeave);
void(CEF_CALLBACK* send_mouse_move_event)(
struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
int mouseLeave);
///
// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
@@ -578,26 +603,28 @@ typedef struct _cef_browser_host_t {
// In order to scroll inside select popups with window rendering disabled
// cef_render_handler_t::GetScreenPoint should be implemented properly.
///
void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event, int deltaX, int deltaY);
void(CEF_CALLBACK* send_mouse_wheel_event)(
struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
int deltaX,
int deltaY);
///
// Send a focus event to the browser.
///
void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_host_t* self,
int setFocus);
void(CEF_CALLBACK* send_focus_event)(struct _cef_browser_host_t* self,
int setFocus);
///
// Send a capture lost event to the browser.
///
void (CEF_CALLBACK *send_capture_lost_event)(
struct _cef_browser_host_t* self);
void(CEF_CALLBACK* send_capture_lost_event)(struct _cef_browser_host_t* self);
///
// Notify the browser that the window hosting it is about to be moved or
// resized. This function is only used on Windows and Linux.
///
void (CEF_CALLBACK *notify_move_or_resize_started)(
void(CEF_CALLBACK* notify_move_or_resize_started)(
struct _cef_browser_host_t* self);
///
@@ -607,7 +634,7 @@ typedef struct _cef_browser_host_t {
// requested rate. The minimum value is 1 and the maximum value is 60 (default
// 30). This function can only be called on the UI thread.
///
int (CEF_CALLBACK *get_windowless_frame_rate)(
int(CEF_CALLBACK* get_windowless_frame_rate)(
struct _cef_browser_host_t* self);
///
@@ -617,8 +644,9 @@ typedef struct _cef_browser_host_t {
// minimum value is 1 and the maximum value is 60 (default 30). Can also be
// set at browser creation via cef_browser_tSettings.windowless_frame_rate.
///
void (CEF_CALLBACK *set_windowless_frame_rate)(
struct _cef_browser_host_t* self, int frame_rate);
void(CEF_CALLBACK* set_windowless_frame_rate)(
struct _cef_browser_host_t* self,
int frame_rate);
///
// Begins a new composition or updates the existing composition. Blink has a
@@ -643,8 +671,10 @@ typedef struct _cef_browser_host_t {
//
// This function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *ime_set_composition)(struct _cef_browser_host_t* self,
const cef_string_t* text, size_t underlinesCount,
void(CEF_CALLBACK* ime_set_composition)(
struct _cef_browser_host_t* self,
const cef_string_t* text,
size_t underlinesCount,
cef_composition_underline_t const* underlines,
const cef_range_t* replacement_range,
const cef_range_t* selection_range);
@@ -658,9 +688,10 @@ typedef struct _cef_browser_host_t {
// |relative_cursor_pos| values are only used on OS X. This function is only
// used when window rendering is disabled.
///
void (CEF_CALLBACK *ime_commit_text)(struct _cef_browser_host_t* self,
const cef_string_t* text, const cef_range_t* replacement_range,
int relative_cursor_pos);
void(CEF_CALLBACK* ime_commit_text)(struct _cef_browser_host_t* self,
const cef_string_t* text,
const cef_range_t* replacement_range,
int relative_cursor_pos);
///
// Completes the existing composition by applying the current composition node
@@ -668,15 +699,16 @@ typedef struct _cef_browser_host_t {
// will be discarded. See comments on ImeSetComposition for usage. This
// function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *ime_finish_composing_text)(
struct _cef_browser_host_t* self, int keep_selection);
void(CEF_CALLBACK* ime_finish_composing_text)(
struct _cef_browser_host_t* self,
int keep_selection);
///
// Cancels the existing composition and discards the composition node contents
// without applying them. See comments on ImeSetComposition for usage. This
// function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *ime_cancel_composition)(struct _cef_browser_host_t* self);
void(CEF_CALLBACK* ime_cancel_composition)(struct _cef_browser_host_t* self);
///
// Call this function when the user drags the mouse into the web view (before
@@ -687,7 +719,8 @@ typedef struct _cef_browser_host_t {
// cef_render_handler_t::StartDragging). This function is only used when
// window rendering is disabled.
///
void (CEF_CALLBACK *drag_target_drag_enter)(struct _cef_browser_host_t* self,
void(CEF_CALLBACK* drag_target_drag_enter)(
struct _cef_browser_host_t* self,
struct _cef_drag_data_t* drag_data,
const struct _cef_mouse_event_t* event,
cef_drag_operations_mask_t allowed_ops);
@@ -698,7 +731,8 @@ typedef struct _cef_browser_host_t {
// DragTargetDragLeave/DragTargetDrop). This function is only used when window
// rendering is disabled.
///
void (CEF_CALLBACK *drag_target_drag_over)(struct _cef_browser_host_t* self,
void(CEF_CALLBACK* drag_target_drag_over)(
struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
cef_drag_operations_mask_t allowed_ops);
@@ -707,7 +741,7 @@ typedef struct _cef_browser_host_t {
// calling DragTargetDragEnter). This function is only used when window
// rendering is disabled.
///
void (CEF_CALLBACK *drag_target_drag_leave)(struct _cef_browser_host_t* self);
void(CEF_CALLBACK* drag_target_drag_leave)(struct _cef_browser_host_t* self);
///
// Call this function when the user completes the drag operation by dropping
@@ -716,8 +750,8 @@ typedef struct _cef_browser_host_t {
// DragTargetDragEnter call. This function is only used when window rendering
// is disabled.
///
void (CEF_CALLBACK *drag_target_drop)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event);
void(CEF_CALLBACK* drag_target_drop)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event);
///
// Call this function when the drag operation started by a
@@ -728,8 +762,10 @@ typedef struct _cef_browser_host_t {
// DragSource* mthods. This function is only used when window rendering is
// disabled.
///
void (CEF_CALLBACK *drag_source_ended_at)(struct _cef_browser_host_t* self,
int x, int y, cef_drag_operations_mask_t op);
void(CEF_CALLBACK* drag_source_ended_at)(struct _cef_browser_host_t* self,
int x,
int y,
cef_drag_operations_mask_t op);
///
// Call this function when the drag operation started by a
@@ -739,14 +775,14 @@ typedef struct _cef_browser_host_t {
// then all DragTarget* functions should be called before DragSource* mthods.
// This function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *drag_source_system_drag_ended)(
void(CEF_CALLBACK* drag_source_system_drag_ended)(
struct _cef_browser_host_t* self);
///
// Returns the current visible navigation entry for this browser. This
// function can only be called on the UI thread.
///
struct _cef_navigation_entry_t* (CEF_CALLBACK *get_visible_navigation_entry)(
struct _cef_navigation_entry_t*(CEF_CALLBACK* get_visible_navigation_entry)(
struct _cef_browser_host_t* self);
///
@@ -774,11 +810,10 @@ typedef struct _cef_browser_host_t {
// objects are not created. The client may implement platform accessibility
// objects using CefAccessibiltyHandler callbacks if desired.
///
void (CEF_CALLBACK *set_accessibility_state)(struct _cef_browser_host_t* self,
cef_state_t accessibility_state);
void(CEF_CALLBACK* set_accessibility_state)(struct _cef_browser_host_t* self,
cef_state_t accessibility_state);
} cef_browser_host_t;
///
// Create a new browser window using the window parameters specified by
// |windowInfo|. All values will be copied internally and the actual window will
@@ -787,8 +822,10 @@ typedef struct _cef_browser_host_t {
// thread and will not block.
///
CEF_EXPORT int cef_browser_host_create_browser(
const cef_window_info_t* windowInfo, struct _cef_client_t* client,
const cef_string_t* url, const struct _cef_browser_settings_t* settings,
const cef_window_info_t* windowInfo,
struct _cef_client_t* client,
const cef_string_t* url,
const struct _cef_browser_settings_t* settings,
struct _cef_request_context_t* request_context);
///
@@ -797,11 +834,12 @@ CEF_EXPORT int cef_browser_host_create_browser(
// used. This function can only be called on the browser process UI thread.
///
CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync(
const cef_window_info_t* windowInfo, struct _cef_client_t* client,
const cef_string_t* url, const struct _cef_browser_settings_t* settings,
const cef_window_info_t* windowInfo,
struct _cef_client_t* client,
const cef_string_t* url,
const struct _cef_browser_settings_t* settings,
struct _cef_request_context_t* request_context);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0868c7d129e35c38b207b1066fd5eba0c1eef45c$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
@@ -47,7 +49,6 @@
extern "C" {
#endif
///
// Structure used to implement browser process callbacks. The functions of this
// structure will be called on the browser process main thread unless otherwise
@@ -63,7 +64,7 @@ typedef struct _cef_browser_process_handler_t {
// Called on the browser process UI thread immediately after the CEF context
// has been initialized.
///
void (CEF_CALLBACK *on_context_initialized)(
void(CEF_CALLBACK* on_context_initialized)(
struct _cef_browser_process_handler_t* self);
///
@@ -73,7 +74,7 @@ typedef struct _cef_browser_process_handler_t {
// opportunity to modify the child process command line. Do not keep a
// reference to |command_line| outside of this function.
///
void (CEF_CALLBACK *on_before_child_process_launch)(
void(CEF_CALLBACK* on_before_child_process_launch)(
struct _cef_browser_process_handler_t* self,
struct _cef_command_line_t* command_line);
@@ -84,7 +85,7 @@ typedef struct _cef_browser_process_handler_t {
// cef_render_process_handler_t::on_render_thread_created() in the render
// process. Do not keep a reference to |extra_info| outside of this function.
///
void (CEF_CALLBACK *on_render_process_thread_created)(
void(CEF_CALLBACK* on_render_process_thread_created)(
struct _cef_browser_process_handler_t* self,
struct _cef_list_value_t* extra_info);
@@ -92,7 +93,7 @@ typedef struct _cef_browser_process_handler_t {
// Return the handler for printing on Linux. If a print handler is not
// provided then printing will not be supported on the Linux platform.
///
struct _cef_print_handler_t* (CEF_CALLBACK *get_print_handler)(
struct _cef_print_handler_t*(CEF_CALLBACK* get_print_handler)(
struct _cef_browser_process_handler_t* self);
///
@@ -108,11 +109,11 @@ typedef struct _cef_browser_process_handler_t {
// specified delay and any currently pending scheduled call should be
// cancelled.
///
void (CEF_CALLBACK *on_schedule_message_pump_work)(
struct _cef_browser_process_handler_t* self, int64 delay_ms);
void(CEF_CALLBACK* on_schedule_message_pump_work)(
struct _cef_browser_process_handler_t* self,
int64 delay_ms);
} cef_browser_process_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=68de2255fd429696d62115786fc480f1d5f9882b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Generic callback structure used for asynchronous continuation.
///
@@ -57,15 +58,14 @@ typedef struct _cef_callback_t {
///
// Continue processing.
///
void (CEF_CALLBACK *cont)(struct _cef_callback_t* self);
void(CEF_CALLBACK* cont)(struct _cef_callback_t* self);
///
// Cancel processing.
///
void (CEF_CALLBACK *cancel)(struct _cef_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_callback_t* self);
} cef_callback_t;
///
// Generic callback structure used for asynchronous completion.
///
@@ -78,10 +78,9 @@ typedef struct _cef_completion_callback_t {
///
// Method that will be called once the task is complete.
///
void (CEF_CALLBACK *on_complete)(struct _cef_completion_callback_t* self);
void(CEF_CALLBACK* on_complete)(struct _cef_completion_callback_t* self);
} cef_completion_callback_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7f554250e73537ece3f8f67310c23e718f91d41b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
@@ -59,7 +61,6 @@
extern "C" {
#endif
///
// Implement this structure to provide handler implementations.
///
@@ -73,89 +74,89 @@ typedef struct _cef_client_t {
// Return the handler for context menus. If no handler is provided the default
// implementation will be used.
///
struct _cef_context_menu_handler_t* (CEF_CALLBACK *get_context_menu_handler)(
struct _cef_context_menu_handler_t*(CEF_CALLBACK* get_context_menu_handler)(
struct _cef_client_t* self);
///
// Return the handler for dialogs. If no handler is provided the default
// implementation will be used.
///
struct _cef_dialog_handler_t* (CEF_CALLBACK *get_dialog_handler)(
struct _cef_dialog_handler_t*(CEF_CALLBACK* get_dialog_handler)(
struct _cef_client_t* self);
///
// Return the handler for browser display state events.
///
struct _cef_display_handler_t* (CEF_CALLBACK *get_display_handler)(
struct _cef_display_handler_t*(CEF_CALLBACK* get_display_handler)(
struct _cef_client_t* self);
///
// Return the handler for download events. If no handler is returned downloads
// will not be allowed.
///
struct _cef_download_handler_t* (CEF_CALLBACK *get_download_handler)(
struct _cef_download_handler_t*(CEF_CALLBACK* get_download_handler)(
struct _cef_client_t* self);
///
// Return the handler for drag events.
///
struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)(
struct _cef_drag_handler_t*(CEF_CALLBACK* get_drag_handler)(
struct _cef_client_t* self);
///
// Return the handler for find result events.
///
struct _cef_find_handler_t* (CEF_CALLBACK *get_find_handler)(
struct _cef_find_handler_t*(CEF_CALLBACK* get_find_handler)(
struct _cef_client_t* self);
///
// Return the handler for focus events.
///
struct _cef_focus_handler_t* (CEF_CALLBACK *get_focus_handler)(
struct _cef_focus_handler_t*(CEF_CALLBACK* get_focus_handler)(
struct _cef_client_t* self);
///
// Return the handler for geolocation permissions requests. If no handler is
// provided geolocation access will be denied by default.
///
struct _cef_geolocation_handler_t* (CEF_CALLBACK *get_geolocation_handler)(
struct _cef_geolocation_handler_t*(CEF_CALLBACK* get_geolocation_handler)(
struct _cef_client_t* self);
///
// Return the handler for JavaScript dialogs. If no handler is provided the
// default implementation will be used.
///
struct _cef_jsdialog_handler_t* (CEF_CALLBACK *get_jsdialog_handler)(
struct _cef_jsdialog_handler_t*(CEF_CALLBACK* get_jsdialog_handler)(
struct _cef_client_t* self);
///
// Return the handler for keyboard events.
///
struct _cef_keyboard_handler_t* (CEF_CALLBACK *get_keyboard_handler)(
struct _cef_keyboard_handler_t*(CEF_CALLBACK* get_keyboard_handler)(
struct _cef_client_t* self);
///
// Return the handler for browser life span events.
///
struct _cef_life_span_handler_t* (CEF_CALLBACK *get_life_span_handler)(
struct _cef_life_span_handler_t*(CEF_CALLBACK* get_life_span_handler)(
struct _cef_client_t* self);
///
// Return the handler for browser load status events.
///
struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
struct _cef_load_handler_t*(CEF_CALLBACK* get_load_handler)(
struct _cef_client_t* self);
///
// Return the handler for off-screen rendering events.
///
struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)(
struct _cef_render_handler_t*(CEF_CALLBACK* get_render_handler)(
struct _cef_client_t* self);
///
// Return the handler for browser request events.
///
struct _cef_request_handler_t* (CEF_CALLBACK *get_request_handler)(
struct _cef_request_handler_t*(CEF_CALLBACK* get_request_handler)(
struct _cef_client_t* self);
///
@@ -163,12 +164,13 @@ typedef struct _cef_client_t {
// (1) if the message was handled or false (0) otherwise. Do not keep a
// reference to or attempt to access the message outside of this callback.
///
int (CEF_CALLBACK *on_process_message_received)(struct _cef_client_t* self,
struct _cef_browser_t* browser, cef_process_id_t source_process,
int(CEF_CALLBACK* on_process_message_received)(
struct _cef_client_t* self,
struct _cef_browser_t* browser,
cef_process_id_t source_process,
struct _cef_process_message_t* message);
} cef_client_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b917030321dc11ddfc8d8939239dda7952d2f955$
//
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure used to create and/or parse command line arguments. Arguments with
// '--', '-' and, on Windows, '/' prefixes are considered switches. Switches
@@ -65,18 +66,18 @@ typedef struct _cef_command_line_t {
// Returns true (1) if this object is valid. Do not call any other functions
// if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_command_line_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_command_line_t* self);
///
// Returns true (1) if the values of this object are read-only. Some APIs may
// expose read-only objects.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_command_line_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_command_line_t* self);
///
// Returns a writable copy of this object.
///
struct _cef_command_line_t* (CEF_CALLBACK *copy)(
struct _cef_command_line_t*(CEF_CALLBACK* copy)(
struct _cef_command_line_t* self);
///
@@ -84,116 +85,117 @@ typedef struct _cef_command_line_t {
// The first argument must be the name of the program. This function is only
// supported on non-Windows platforms.
///
void (CEF_CALLBACK *init_from_argv)(struct _cef_command_line_t* self,
int argc, const char* const* argv);
void(CEF_CALLBACK* init_from_argv)(struct _cef_command_line_t* self,
int argc,
const char* const* argv);
///
// Initialize the command line with the string returned by calling
// GetCommandLineW(). This function is only supported on Windows.
///
void (CEF_CALLBACK *init_from_string)(struct _cef_command_line_t* self,
const cef_string_t* command_line);
void(CEF_CALLBACK* init_from_string)(struct _cef_command_line_t* self,
const cef_string_t* command_line);
///
// Reset the command-line switches and arguments but leave the program
// component unchanged.
///
void (CEF_CALLBACK *reset)(struct _cef_command_line_t* self);
void(CEF_CALLBACK* reset)(struct _cef_command_line_t* self);
///
// Retrieve the original command line string as a vector of strings. The argv
// array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
///
void (CEF_CALLBACK *get_argv)(struct _cef_command_line_t* self,
cef_string_list_t argv);
void(CEF_CALLBACK* get_argv)(struct _cef_command_line_t* self,
cef_string_list_t argv);
///
// Constructs and returns the represented command line string. Use this
// function cautiously because quoting behavior is unclear.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_command_line_string)(
cef_string_userfree_t(CEF_CALLBACK* get_command_line_string)(
struct _cef_command_line_t* self);
///
// Get the program part of the command line string (the first item).
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_program)(
cef_string_userfree_t(CEF_CALLBACK* get_program)(
struct _cef_command_line_t* self);
///
// Set the program part of the command line string (the first item).
///
void (CEF_CALLBACK *set_program)(struct _cef_command_line_t* self,
const cef_string_t* program);
void(CEF_CALLBACK* set_program)(struct _cef_command_line_t* self,
const cef_string_t* program);
///
// Returns true (1) if the command line has switches.
///
int (CEF_CALLBACK *has_switches)(struct _cef_command_line_t* self);
int(CEF_CALLBACK* has_switches)(struct _cef_command_line_t* self);
///
// Returns true (1) if the command line contains the given switch.
///
int (CEF_CALLBACK *has_switch)(struct _cef_command_line_t* self,
const cef_string_t* name);
int(CEF_CALLBACK* has_switch)(struct _cef_command_line_t* self,
const cef_string_t* name);
///
// Returns the value associated with the given switch. If the switch has no
// value or isn't present this function returns the NULL string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_switch_value)(
struct _cef_command_line_t* self, const cef_string_t* name);
cef_string_userfree_t(CEF_CALLBACK* get_switch_value)(
struct _cef_command_line_t* self,
const cef_string_t* name);
///
// Returns the map of switch names and values. If a switch has no value an
// NULL string is returned.
///
void (CEF_CALLBACK *get_switches)(struct _cef_command_line_t* self,
cef_string_map_t switches);
void(CEF_CALLBACK* get_switches)(struct _cef_command_line_t* self,
cef_string_map_t switches);
///
// Add a switch to the end of the command line. If the switch has no value
// pass an NULL value string.
///
void (CEF_CALLBACK *append_switch)(struct _cef_command_line_t* self,
const cef_string_t* name);
void(CEF_CALLBACK* append_switch)(struct _cef_command_line_t* self,
const cef_string_t* name);
///
// Add a switch with the specified value to the end of the command line.
///
void (CEF_CALLBACK *append_switch_with_value)(
struct _cef_command_line_t* self, const cef_string_t* name,
const cef_string_t* value);
void(CEF_CALLBACK* append_switch_with_value)(struct _cef_command_line_t* self,
const cef_string_t* name,
const cef_string_t* value);
///
// True if there are remaining command line arguments.
///
int (CEF_CALLBACK *has_arguments)(struct _cef_command_line_t* self);
int(CEF_CALLBACK* has_arguments)(struct _cef_command_line_t* self);
///
// Get the remaining command line arguments.
///
void (CEF_CALLBACK *get_arguments)(struct _cef_command_line_t* self,
cef_string_list_t arguments);
void(CEF_CALLBACK* get_arguments)(struct _cef_command_line_t* self,
cef_string_list_t arguments);
///
// Add an argument to the end of the command line.
///
void (CEF_CALLBACK *append_argument)(struct _cef_command_line_t* self,
const cef_string_t* argument);
void(CEF_CALLBACK* append_argument)(struct _cef_command_line_t* self,
const cef_string_t* argument);
///
// Insert a command before the current command. Common for debuggers, like
// "valgrind" or "gdb --args".
///
void (CEF_CALLBACK *prepend_wrapper)(struct _cef_command_line_t* self,
const cef_string_t* wrapper);
void(CEF_CALLBACK* prepend_wrapper)(struct _cef_command_line_t* self,
const cef_string_t* wrapper);
} cef_command_line_t;
///
// Create a new cef_command_line_t instance.
///
@@ -205,7 +207,6 @@ CEF_EXPORT cef_command_line_t* cef_command_line_create();
///
CEF_EXPORT cef_command_line_t* cef_command_line_get_global();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2e295ba277083061103147a400bc30f78e6a94f5$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_
@@ -62,16 +64,16 @@ typedef struct _cef_run_context_menu_callback_t {
// Complete context menu display by selecting the specified |command_id| and
// |event_flags|.
///
void (CEF_CALLBACK *cont)(struct _cef_run_context_menu_callback_t* self,
int command_id, cef_event_flags_t event_flags);
void(CEF_CALLBACK* cont)(struct _cef_run_context_menu_callback_t* self,
int command_id,
cef_event_flags_t event_flags);
///
// Cancel context menu display.
///
void (CEF_CALLBACK *cancel)(struct _cef_run_context_menu_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_run_context_menu_callback_t* self);
} cef_run_context_menu_callback_t;
///
// Implement this structure to handle context menu events. The functions of this
// structure will be called on the UI thread.
@@ -89,9 +91,11 @@ typedef struct _cef_context_menu_handler_t {
// modified to show a custom menu. Do not keep references to |params| or
// |model| outside of this callback.
///
void (CEF_CALLBACK *on_before_context_menu)(
struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params,
void(CEF_CALLBACK* on_before_context_menu)(
struct _cef_context_menu_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_context_menu_params_t* params,
struct _cef_menu_model_t* model);
///
@@ -102,8 +106,10 @@ typedef struct _cef_context_menu_handler_t {
// selected command ID. For default display return false (0). Do not keep
// references to |params| or |model| outside of this callback.
///
int (CEF_CALLBACK *run_context_menu)(struct _cef_context_menu_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
int(CEF_CALLBACK* run_context_menu)(
struct _cef_context_menu_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_context_menu_params_t* params,
struct _cef_menu_model_t* model,
struct _cef_run_context_menu_callback_t* callback);
@@ -117,21 +123,24 @@ typedef struct _cef_context_menu_handler_t {
// on_before_context_menu(). Do not keep a reference to |params| outside of
// this callback.
///
int (CEF_CALLBACK *on_context_menu_command)(
struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_context_menu_params_t* params,
int command_id, cef_event_flags_t event_flags);
int(CEF_CALLBACK* on_context_menu_command)(
struct _cef_context_menu_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_context_menu_params_t* params,
int command_id,
cef_event_flags_t event_flags);
///
// Called when the context menu is dismissed irregardless of whether the menu
// was NULL or a command was selected.
///
void (CEF_CALLBACK *on_context_menu_dismissed)(
struct _cef_context_menu_handler_t* self, struct _cef_browser_t* browser,
void(CEF_CALLBACK* on_context_menu_dismissed)(
struct _cef_context_menu_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame);
} cef_context_menu_handler_t;
///
// Provides information about the context menu state. The ethods of this
// structure can only be accessed on browser process the UI thread.
@@ -146,19 +155,19 @@ typedef struct _cef_context_menu_params_t {
// Returns the X coordinate of the mouse where the context menu was invoked.
// Coords are relative to the associated RenderView's origin.
///
int (CEF_CALLBACK *get_xcoord)(struct _cef_context_menu_params_t* self);
int(CEF_CALLBACK* get_xcoord)(struct _cef_context_menu_params_t* self);
///
// Returns the Y coordinate of the mouse where the context menu was invoked.
// Coords are relative to the associated RenderView's origin.
///
int (CEF_CALLBACK *get_ycoord)(struct _cef_context_menu_params_t* self);
int(CEF_CALLBACK* get_ycoord)(struct _cef_context_menu_params_t* self);
///
// Returns flags representing the type of node that the context menu was
// invoked on.
///
cef_context_menu_type_flags_t (CEF_CALLBACK *get_type_flags)(
cef_context_menu_type_flags_t(CEF_CALLBACK* get_type_flags)(
struct _cef_context_menu_params_t* self);
///
@@ -166,7 +175,7 @@ typedef struct _cef_context_menu_params_t {
// context menu was invoked on.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_link_url)(
cef_string_userfree_t(CEF_CALLBACK* get_link_url)(
struct _cef_context_menu_params_t* self);
///
@@ -174,7 +183,7 @@ typedef struct _cef_context_menu_params_t {
// don't validate this field in the frontend process.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_unfiltered_link_url)(
cef_string_userfree_t(CEF_CALLBACK* get_unfiltered_link_url)(
struct _cef_context_menu_params_t* self);
///
@@ -182,14 +191,14 @@ typedef struct _cef_context_menu_params_t {
// invoked on. Example of elements with source URLs are img, audio, and video.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_source_url)(
cef_string_userfree_t(CEF_CALLBACK* get_source_url)(
struct _cef_context_menu_params_t* self);
///
// Returns true (1) if the context menu was invoked on an image which has non-
// NULL contents.
///
int (CEF_CALLBACK *has_image_contents)(
int(CEF_CALLBACK* has_image_contents)(
struct _cef_context_menu_params_t* self);
///
@@ -197,21 +206,21 @@ typedef struct _cef_context_menu_params_t {
// an image.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_title_text)(
cef_string_userfree_t(CEF_CALLBACK* get_title_text)(
struct _cef_context_menu_params_t* self);
///
// Returns the URL of the top level page that the context menu was invoked on.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_page_url)(
cef_string_userfree_t(CEF_CALLBACK* get_page_url)(
struct _cef_context_menu_params_t* self);
///
// Returns the URL of the subframe that the context menu was invoked on.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_frame_url)(
cef_string_userfree_t(CEF_CALLBACK* get_frame_url)(
struct _cef_context_menu_params_t* self);
///
@@ -219,20 +228,20 @@ typedef struct _cef_context_menu_params_t {
// invoked on.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_frame_charset)(
cef_string_userfree_t(CEF_CALLBACK* get_frame_charset)(
struct _cef_context_menu_params_t* self);
///
// Returns the type of context node that the context menu was invoked on.
///
cef_context_menu_media_type_t (CEF_CALLBACK *get_media_type)(
cef_context_menu_media_type_t(CEF_CALLBACK* get_media_type)(
struct _cef_context_menu_params_t* self);
///
// Returns flags representing the actions supported by the media element, if
// any, that the context menu was invoked on.
///
cef_context_menu_media_state_flags_t (CEF_CALLBACK *get_media_state_flags)(
cef_context_menu_media_state_flags_t(CEF_CALLBACK* get_media_state_flags)(
struct _cef_context_menu_params_t* self);
///
@@ -240,7 +249,7 @@ typedef struct _cef_context_menu_params_t {
// invoked on.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_selection_text)(
cef_string_userfree_t(CEF_CALLBACK* get_selection_text)(
struct _cef_context_menu_params_t* self);
///
@@ -248,7 +257,7 @@ typedef struct _cef_context_menu_params_t {
// invoked on.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_misspelled_word)(
cef_string_userfree_t(CEF_CALLBACK* get_misspelled_word)(
struct _cef_context_menu_params_t* self);
///
@@ -256,26 +265,27 @@ typedef struct _cef_context_menu_params_t {
// |suggestions| from the spell check service for the misspelled word if there
// is one.
///
int (CEF_CALLBACK *get_dictionary_suggestions)(
struct _cef_context_menu_params_t* self, cef_string_list_t suggestions);
int(CEF_CALLBACK* get_dictionary_suggestions)(
struct _cef_context_menu_params_t* self,
cef_string_list_t suggestions);
///
// Returns true (1) if the context menu was invoked on an editable node.
///
int (CEF_CALLBACK *is_editable)(struct _cef_context_menu_params_t* self);
int(CEF_CALLBACK* is_editable)(struct _cef_context_menu_params_t* self);
///
// Returns true (1) if the context menu was invoked on an editable node where
// spell-check is enabled.
///
int (CEF_CALLBACK *is_spell_check_enabled)(
int(CEF_CALLBACK* is_spell_check_enabled)(
struct _cef_context_menu_params_t* self);
///
// Returns flags representing the actions supported by the editable node, if
// any, that the context menu was invoked on.
///
cef_context_menu_edit_state_flags_t (CEF_CALLBACK *get_edit_state_flags)(
cef_context_menu_edit_state_flags_t(CEF_CALLBACK* get_edit_state_flags)(
struct _cef_context_menu_params_t* self);
///
@@ -283,15 +293,14 @@ typedef struct _cef_context_menu_params_t {
// renderer process (for example, plugin placeholder or pepper plugin menu
// items).
///
int (CEF_CALLBACK *is_custom_menu)(struct _cef_context_menu_params_t* self);
int(CEF_CALLBACK* is_custom_menu)(struct _cef_context_menu_params_t* self);
///
// Returns true (1) if the context menu was invoked from a pepper plugin.
///
int (CEF_CALLBACK *is_pepper_menu)(struct _cef_context_menu_params_t* self);
int(CEF_CALLBACK* is_pepper_menu)(struct _cef_context_menu_params_t* self);
} cef_context_menu_params_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c2bf8084385f3c795ae7494da6970a0a61b96ac6$
//
#ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
@@ -65,16 +67,18 @@ typedef struct _cef_cookie_manager_t {
// NULL it will be executed asnychronously on the IO thread after the change
// has been applied. Must be called before any cookies are accessed.
///
void (CEF_CALLBACK *set_supported_schemes)(struct _cef_cookie_manager_t* self,
cef_string_list_t schemes, struct _cef_completion_callback_t* callback);
void(CEF_CALLBACK* set_supported_schemes)(
struct _cef_cookie_manager_t* self,
cef_string_list_t schemes,
struct _cef_completion_callback_t* callback);
///
// Visit all cookies on the IO thread. The returned cookies are ordered by
// longest path, then by earliest creation date. Returns false (0) if cookies
// cannot be accessed.
///
int (CEF_CALLBACK *visit_all_cookies)(struct _cef_cookie_manager_t* self,
struct _cef_cookie_visitor_t* visitor);
int(CEF_CALLBACK* visit_all_cookies)(struct _cef_cookie_manager_t* self,
struct _cef_cookie_visitor_t* visitor);
///
// Visit a subset of cookies on the IO thread. The results are filtered by the
@@ -83,9 +87,10 @@ typedef struct _cef_cookie_manager_t {
// cookies are ordered by longest path, then by earliest creation date.
// Returns false (0) if cookies cannot be accessed.
///
int (CEF_CALLBACK *visit_url_cookies)(struct _cef_cookie_manager_t* self,
const cef_string_t* url, int includeHttpOnly,
struct _cef_cookie_visitor_t* visitor);
int(CEF_CALLBACK* visit_url_cookies)(struct _cef_cookie_manager_t* self,
const cef_string_t* url,
int includeHttpOnly,
struct _cef_cookie_visitor_t* visitor);
///
// Sets a cookie given a valid URL and explicit user-provided cookie
@@ -96,9 +101,10 @@ typedef struct _cef_cookie_manager_t {
// asnychronously on the IO thread after the cookie has been set. Returns
// false (0) if an invalid URL is specified or if cookies cannot be accessed.
///
int (CEF_CALLBACK *set_cookie)(struct _cef_cookie_manager_t* self,
const cef_string_t* url, const struct _cef_cookie_t* cookie,
struct _cef_set_cookie_callback_t* callback);
int(CEF_CALLBACK* set_cookie)(struct _cef_cookie_manager_t* self,
const cef_string_t* url,
const struct _cef_cookie_t* cookie,
struct _cef_set_cookie_callback_t* callback);
///
// Delete all cookies that match the specified parameters. If both |url| and
@@ -111,8 +117,10 @@ typedef struct _cef_cookie_manager_t {
// or if cookies cannot be accessed. Cookies can alternately be deleted using
// the Visit*Cookies() functions.
///
int (CEF_CALLBACK *delete_cookies)(struct _cef_cookie_manager_t* self,
const cef_string_t* url, const cef_string_t* cookie_name,
int(CEF_CALLBACK* delete_cookies)(
struct _cef_cookie_manager_t* self,
const cef_string_t* url,
const cef_string_t* cookie_name,
struct _cef_delete_cookies_callback_t* callback);
///
@@ -125,8 +133,10 @@ typedef struct _cef_cookie_manager_t {
// asnychronously on the IO thread after the manager's storage has been
// initialized. Returns false (0) if cookies cannot be accessed.
///
int (CEF_CALLBACK *set_storage_path)(struct _cef_cookie_manager_t* self,
const cef_string_t* path, int persist_session_cookies,
int(CEF_CALLBACK* set_storage_path)(
struct _cef_cookie_manager_t* self,
const cef_string_t* path,
int persist_session_cookies,
struct _cef_completion_callback_t* callback);
///
@@ -134,11 +144,10 @@ typedef struct _cef_cookie_manager_t {
// be executed asnychronously on the IO thread after the flush is complete.
// Returns false (0) if cookies cannot be accessed.
///
int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self,
struct _cef_completion_callback_t* callback);
int(CEF_CALLBACK* flush_store)(struct _cef_cookie_manager_t* self,
struct _cef_completion_callback_t* callback);
} cef_cookie_manager_t;
///
// Returns the global cookie manager. By default data will be stored at
// CefSettings.cache_path if specified or in memory otherwise. If |callback| is
@@ -160,10 +169,10 @@ CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager(
// manager's storage has been initialized.
///
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
const cef_string_t* path, int persist_session_cookies,
const cef_string_t* path,
int persist_session_cookies,
struct _cef_completion_callback_t* callback);
///
// Structure to implement for visiting cookie values. The functions of this
// structure will always be called on the IO thread.
@@ -181,12 +190,13 @@ typedef struct _cef_cookie_visitor_t {
// Return false (0) to stop visiting cookies. This function may never be
// called if no cookies are found.
///
int (CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t* self,
const struct _cef_cookie_t* cookie, int count, int total,
int* deleteCookie);
int(CEF_CALLBACK* visit)(struct _cef_cookie_visitor_t* self,
const struct _cef_cookie_t* cookie,
int count,
int total,
int* deleteCookie);
} cef_cookie_visitor_t;
///
// Structure to implement to be notified of asynchronous completion via
// cef_cookie_manager_t::set_cookie().
@@ -201,11 +211,10 @@ typedef struct _cef_set_cookie_callback_t {
// Method that will be called upon completion. |success| will be true (1) if
// the cookie was set successfully.
///
void (CEF_CALLBACK *on_complete)(struct _cef_set_cookie_callback_t* self,
int success);
void(CEF_CALLBACK* on_complete)(struct _cef_set_cookie_callback_t* self,
int success);
} cef_set_cookie_callback_t;
///
// Structure to implement to be notified of asynchronous completion via
// cef_cookie_manager_t::delete_cookies().
@@ -220,11 +229,10 @@ typedef struct _cef_delete_cookies_callback_t {
// Method that will be called upon completion. |num_deleted| will be the
// number of cookies that were deleted or -1 if unknown.
///
void (CEF_CALLBACK *on_complete)(struct _cef_delete_cookies_callback_t* self,
int num_deleted);
void(CEF_CALLBACK* on_complete)(struct _cef_delete_cookies_callback_t* self,
int num_deleted);
} cef_delete_cookies_callback_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=8b7354f5a1ad6b255d77e477c64374b927f4fe28$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Crash reporting is configured using an INI-style config file named
// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
@@ -143,7 +144,7 @@ CEF_EXPORT int cef_crash_reporting_enabled();
// Sets or clears a specific key-value pair from the crash metadata.
///
CEF_EXPORT void cef_set_crash_key_value(const cef_string_t* key,
const cef_string_t* value);
const cef_string_t* value);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b8a44f4f624ba51107d06ff3d1a7934e83765786$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Callback structure for asynchronous continuation of file dialog requests.
///
@@ -62,16 +63,16 @@ typedef struct _cef_file_dialog_callback_t {
// or a list of values depending on the dialog mode. An NULL |file_paths|
// value is treated the same as calling cancel().
///
void (CEF_CALLBACK *cont)(struct _cef_file_dialog_callback_t* self,
int selected_accept_filter, cef_string_list_t file_paths);
void(CEF_CALLBACK* cont)(struct _cef_file_dialog_callback_t* self,
int selected_accept_filter,
cef_string_list_t file_paths);
///
// Cancel the file selection.
///
void (CEF_CALLBACK *cancel)(struct _cef_file_dialog_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_file_dialog_callback_t* self);
} cef_file_dialog_callback_t;
///
// Implement this structure to handle dialog events. The functions of this
// structure will be called on the browser process UI thread.
@@ -97,14 +98,17 @@ typedef struct _cef_dialog_handler_t {
// return true (1) and execute |callback| either inline or at a later time. To
// display the default dialog return false (0).
///
int (CEF_CALLBACK *on_file_dialog)(struct _cef_dialog_handler_t* self,
struct _cef_browser_t* browser, cef_file_dialog_mode_t mode,
const cef_string_t* title, const cef_string_t* default_file_path,
cef_string_list_t accept_filters, int selected_accept_filter,
int(CEF_CALLBACK* on_file_dialog)(
struct _cef_dialog_handler_t* self,
struct _cef_browser_t* browser,
cef_file_dialog_mode_t mode,
const cef_string_t* title,
const cef_string_t* default_file_path,
cef_string_list_t accept_filters,
int selected_accept_filter,
struct _cef_file_dialog_callback_t* callback);
} cef_dialog_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=f0f3fd4cab00c0eb11956e674a111cb30d3af100$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Implement this structure to handle events related to browser display state.
// The functions of this structure will be called on the UI thread.
@@ -60,21 +61,24 @@ typedef struct _cef_display_handler_t {
///
// Called when a frame's address has changed.
///
void (CEF_CALLBACK *on_address_change)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
const cef_string_t* url);
void(CEF_CALLBACK* on_address_change)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
const cef_string_t* url);
///
// Called when the page title changes.
///
void (CEF_CALLBACK *on_title_change)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* title);
void(CEF_CALLBACK* on_title_change)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* title);
///
// Called when the page icon changes.
///
void (CEF_CALLBACK *on_favicon_urlchange)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, cef_string_list_t icon_urls);
void(CEF_CALLBACK* on_favicon_urlchange)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
cef_string_list_t icon_urls);
///
// Called when web content in the page has toggled fullscreen mode. If
@@ -83,8 +87,9 @@ typedef struct _cef_display_handler_t {
// automatically return to its original size and position. The client is
// responsible for resizing the browser if desired.
///
void (CEF_CALLBACK *on_fullscreen_mode_change)(
struct _cef_display_handler_t* self, struct _cef_browser_t* browser,
void(CEF_CALLBACK* on_fullscreen_mode_change)(
struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
int fullscreen);
///
@@ -95,26 +100,29 @@ typedef struct _cef_display_handler_t {
// tooltip. When window rendering is disabled the application is responsible
// for drawing tooltips and the return value is ignored.
///
int (CEF_CALLBACK *on_tooltip)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, cef_string_t* text);
int(CEF_CALLBACK* on_tooltip)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
cef_string_t* text);
///
// Called when the browser receives a status message. |value| contains the
// text that will be displayed in the status message.
///
void (CEF_CALLBACK *on_status_message)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* value);
void(CEF_CALLBACK* on_status_message)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* value);
///
// Called to display a console message. Return true (1) to stop the message
// from being output to the console.
///
int (CEF_CALLBACK *on_console_message)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* message,
const cef_string_t* source, int line);
int(CEF_CALLBACK* on_console_message)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* message,
const cef_string_t* source,
int line);
} cef_display_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=db82ff508cb1b4a03001b8b30bc5126186ee1bd2$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
@@ -64,11 +66,10 @@ typedef struct _cef_domvisitor_t {
// keep references to or attempt to access any DOM objects outside the scope
// of this function.
///
void (CEF_CALLBACK *visit)(struct _cef_domvisitor_t* self,
struct _cef_domdocument_t* document);
void(CEF_CALLBACK* visit)(struct _cef_domvisitor_t* self,
struct _cef_domdocument_t* document);
} cef_domvisitor_t;
///
// Structure used to represent a DOM document. The functions of this structure
// should only be called on the render process main thread thread.
@@ -82,81 +83,82 @@ typedef struct _cef_domdocument_t {
///
// Returns the document type.
///
cef_dom_document_type_t (CEF_CALLBACK *get_type)(
cef_dom_document_type_t(CEF_CALLBACK* get_type)(
struct _cef_domdocument_t* self);
///
// Returns the root document node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_document)(
struct _cef_domnode_t*(CEF_CALLBACK* get_document)(
struct _cef_domdocument_t* self);
///
// Returns the BODY node of an HTML document.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_body)(
struct _cef_domnode_t*(CEF_CALLBACK* get_body)(
struct _cef_domdocument_t* self);
///
// Returns the HEAD node of an HTML document.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_head)(
struct _cef_domnode_t*(CEF_CALLBACK* get_head)(
struct _cef_domdocument_t* self);
///
// Returns the title of an HTML document.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_title)(
cef_string_userfree_t(CEF_CALLBACK* get_title)(
struct _cef_domdocument_t* self);
///
// Returns the document element with the specified ID value.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_element_by_id)(
struct _cef_domdocument_t* self, const cef_string_t* id);
struct _cef_domnode_t*(CEF_CALLBACK* get_element_by_id)(
struct _cef_domdocument_t* self,
const cef_string_t* id);
///
// Returns the node that currently has keyboard focus.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_focused_node)(
struct _cef_domnode_t*(CEF_CALLBACK* get_focused_node)(
struct _cef_domdocument_t* self);
///
// Returns true (1) if a portion of the document is selected.
///
int (CEF_CALLBACK *has_selection)(struct _cef_domdocument_t* self);
int(CEF_CALLBACK* has_selection)(struct _cef_domdocument_t* self);
///
// Returns the selection offset within the start node.
///
int (CEF_CALLBACK *get_selection_start_offset)(
int(CEF_CALLBACK* get_selection_start_offset)(
struct _cef_domdocument_t* self);
///
// Returns the selection offset within the end node.
///
int (CEF_CALLBACK *get_selection_end_offset)(struct _cef_domdocument_t* self);
int(CEF_CALLBACK* get_selection_end_offset)(struct _cef_domdocument_t* self);
///
// Returns the contents of this selection as markup.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_selection_as_markup)(
cef_string_userfree_t(CEF_CALLBACK* get_selection_as_markup)(
struct _cef_domdocument_t* self);
///
// Returns the contents of this selection as text.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_selection_as_text)(
cef_string_userfree_t(CEF_CALLBACK* get_selection_as_text)(
struct _cef_domdocument_t* self);
///
// Returns the base URL for the document.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_base_url)(
cef_string_userfree_t(CEF_CALLBACK* get_base_url)(
struct _cef_domdocument_t* self);
///
@@ -164,11 +166,11 @@ typedef struct _cef_domdocument_t {
// partial URL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_complete_url)(
struct _cef_domdocument_t* self, const cef_string_t* partialURL);
cef_string_userfree_t(CEF_CALLBACK* get_complete_url)(
struct _cef_domdocument_t* self,
const cef_string_t* partialURL);
} cef_domdocument_t;
///
// Structure used to represent a DOM node. The functions of this structure
// should only be called on the render process main thread.
@@ -182,163 +184,162 @@ typedef struct _cef_domnode_t {
///
// Returns the type for this node.
///
cef_dom_node_type_t (CEF_CALLBACK *get_type)(struct _cef_domnode_t* self);
cef_dom_node_type_t(CEF_CALLBACK* get_type)(struct _cef_domnode_t* self);
///
// Returns true (1) if this is a text node.
///
int (CEF_CALLBACK *is_text)(struct _cef_domnode_t* self);
int(CEF_CALLBACK* is_text)(struct _cef_domnode_t* self);
///
// Returns true (1) if this is an element node.
///
int (CEF_CALLBACK *is_element)(struct _cef_domnode_t* self);
int(CEF_CALLBACK* is_element)(struct _cef_domnode_t* self);
///
// Returns true (1) if this is an editable node.
///
int (CEF_CALLBACK *is_editable)(struct _cef_domnode_t* self);
int(CEF_CALLBACK* is_editable)(struct _cef_domnode_t* self);
///
// Returns true (1) if this is a form control element node.
///
int (CEF_CALLBACK *is_form_control_element)(struct _cef_domnode_t* self);
int(CEF_CALLBACK* is_form_control_element)(struct _cef_domnode_t* self);
///
// Returns the type of this form control element node.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_form_control_element_type)(
cef_string_userfree_t(CEF_CALLBACK* get_form_control_element_type)(
struct _cef_domnode_t* self);
///
// Returns true (1) if this object is pointing to the same handle as |that|
// object.
///
int (CEF_CALLBACK *is_same)(struct _cef_domnode_t* self,
struct _cef_domnode_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_domnode_t* self,
struct _cef_domnode_t* that);
///
// Returns the name of this node.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_domnode_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_name)(struct _cef_domnode_t* self);
///
// Returns the value of this node.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_value)(struct _cef_domnode_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_value)(struct _cef_domnode_t* self);
///
// Set the value of this node. Returns true (1) on success.
///
int (CEF_CALLBACK *set_value)(struct _cef_domnode_t* self,
const cef_string_t* value);
int(CEF_CALLBACK* set_value)(struct _cef_domnode_t* self,
const cef_string_t* value);
///
// Returns the contents of this node as markup.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_as_markup)(
cef_string_userfree_t(CEF_CALLBACK* get_as_markup)(
struct _cef_domnode_t* self);
///
// Returns the document associated with this node.
///
struct _cef_domdocument_t* (CEF_CALLBACK *get_document)(
struct _cef_domdocument_t*(CEF_CALLBACK* get_document)(
struct _cef_domnode_t* self);
///
// Returns the parent node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_parent)(
struct _cef_domnode_t* self);
struct _cef_domnode_t*(CEF_CALLBACK* get_parent)(struct _cef_domnode_t* self);
///
// Returns the previous sibling node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_previous_sibling)(
struct _cef_domnode_t*(CEF_CALLBACK* get_previous_sibling)(
struct _cef_domnode_t* self);
///
// Returns the next sibling node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_next_sibling)(
struct _cef_domnode_t*(CEF_CALLBACK* get_next_sibling)(
struct _cef_domnode_t* self);
///
// Returns true (1) if this node has child nodes.
///
int (CEF_CALLBACK *has_children)(struct _cef_domnode_t* self);
int(CEF_CALLBACK* has_children)(struct _cef_domnode_t* self);
///
// Return the first child node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_first_child)(
struct _cef_domnode_t*(CEF_CALLBACK* get_first_child)(
struct _cef_domnode_t* self);
///
// Returns the last child node.
///
struct _cef_domnode_t* (CEF_CALLBACK *get_last_child)(
struct _cef_domnode_t*(CEF_CALLBACK* get_last_child)(
struct _cef_domnode_t* self);
// The following functions are valid only for element nodes.
///
// Returns the tag name of this element.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_element_tag_name)(
cef_string_userfree_t(CEF_CALLBACK* get_element_tag_name)(
struct _cef_domnode_t* self);
///
// Returns true (1) if this element has attributes.
///
int (CEF_CALLBACK *has_element_attributes)(struct _cef_domnode_t* self);
int(CEF_CALLBACK* has_element_attributes)(struct _cef_domnode_t* self);
///
// Returns true (1) if this element has an attribute named |attrName|.
///
int (CEF_CALLBACK *has_element_attribute)(struct _cef_domnode_t* self,
const cef_string_t* attrName);
int(CEF_CALLBACK* has_element_attribute)(struct _cef_domnode_t* self,
const cef_string_t* attrName);
///
// Returns the element attribute named |attrName|.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_element_attribute)(
struct _cef_domnode_t* self, const cef_string_t* attrName);
cef_string_userfree_t(CEF_CALLBACK* get_element_attribute)(
struct _cef_domnode_t* self,
const cef_string_t* attrName);
///
// Returns a map of all element attributes.
///
void (CEF_CALLBACK *get_element_attributes)(struct _cef_domnode_t* self,
cef_string_map_t attrMap);
void(CEF_CALLBACK* get_element_attributes)(struct _cef_domnode_t* self,
cef_string_map_t attrMap);
///
// Set the value for the element attribute named |attrName|. Returns true (1)
// on success.
///
int (CEF_CALLBACK *set_element_attribute)(struct _cef_domnode_t* self,
const cef_string_t* attrName, const cef_string_t* value);
int(CEF_CALLBACK* set_element_attribute)(struct _cef_domnode_t* self,
const cef_string_t* attrName,
const cef_string_t* value);
///
// Returns the inner text of the element.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_element_inner_text)(
cef_string_userfree_t(CEF_CALLBACK* get_element_inner_text)(
struct _cef_domnode_t* self);
///
// Returns the bounds of the element.
///
cef_rect_t (CEF_CALLBACK *get_element_bounds)(struct _cef_domnode_t* self);
cef_rect_t(CEF_CALLBACK* get_element_bounds)(struct _cef_domnode_t* self);
} cef_domnode_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=4475f7e48898bdef8051c849873fb2528320cd9c$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Callback structure used to asynchronously continue a download.
///
@@ -62,11 +63,11 @@ typedef struct _cef_before_download_callback_t {
// suggested name and the default temp directory. Set |show_dialog| to true
// (1) if you do wish to show the default "Save As" dialog.
///
void (CEF_CALLBACK *cont)(struct _cef_before_download_callback_t* self,
const cef_string_t* download_path, int show_dialog);
void(CEF_CALLBACK* cont)(struct _cef_before_download_callback_t* self,
const cef_string_t* download_path,
int show_dialog);
} cef_before_download_callback_t;
///
// Callback structure used to asynchronously cancel a download.
///
@@ -79,20 +80,19 @@ typedef struct _cef_download_item_callback_t {
///
// Call to cancel the download.
///
void (CEF_CALLBACK *cancel)(struct _cef_download_item_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_download_item_callback_t* self);
///
// Call to pause the download.
///
void (CEF_CALLBACK *pause)(struct _cef_download_item_callback_t* self);
void(CEF_CALLBACK* pause)(struct _cef_download_item_callback_t* self);
///
// Call to resume the download.
///
void (CEF_CALLBACK *resume)(struct _cef_download_item_callback_t* self);
void(CEF_CALLBACK* resume)(struct _cef_download_item_callback_t* self);
} cef_download_item_callback_t;
///
// Structure used to handle file downloads. The functions of this structure will
// called on the browser process UI thread.
@@ -110,7 +110,8 @@ typedef struct _cef_download_handler_t {
// download if desired. Do not keep a reference to |download_item| outside of
// this function.
///
void (CEF_CALLBACK *on_before_download)(struct _cef_download_handler_t* self,
void(CEF_CALLBACK* on_before_download)(
struct _cef_download_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_download_item_t* download_item,
const cef_string_t* suggested_name,
@@ -123,13 +124,13 @@ typedef struct _cef_download_handler_t {
// download if desired. Do not keep a reference to |download_item| outside of
// this function.
///
void (CEF_CALLBACK *on_download_updated)(struct _cef_download_handler_t* self,
void(CEF_CALLBACK* on_download_updated)(
struct _cef_download_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_download_item_t* download_item,
struct _cef_download_item_callback_t* callback);
} cef_download_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=cc669703d613f5a6a5bae95030835dc99f55a6fa$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure used to represent a download item.
///
@@ -58,103 +59,102 @@ typedef struct _cef_download_item_t {
// Returns true (1) if this object is valid. Do not call any other functions
// if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_download_item_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_download_item_t* self);
///
// Returns true (1) if the download is in progress.
///
int (CEF_CALLBACK *is_in_progress)(struct _cef_download_item_t* self);
int(CEF_CALLBACK* is_in_progress)(struct _cef_download_item_t* self);
///
// Returns true (1) if the download is complete.
///
int (CEF_CALLBACK *is_complete)(struct _cef_download_item_t* self);
int(CEF_CALLBACK* is_complete)(struct _cef_download_item_t* self);
///
// Returns true (1) if the download has been canceled or interrupted.
///
int (CEF_CALLBACK *is_canceled)(struct _cef_download_item_t* self);
int(CEF_CALLBACK* is_canceled)(struct _cef_download_item_t* self);
///
// Returns a simple speed estimate in bytes/s.
///
int64 (CEF_CALLBACK *get_current_speed)(struct _cef_download_item_t* self);
int64(CEF_CALLBACK* get_current_speed)(struct _cef_download_item_t* self);
///
// Returns the rough percent complete or -1 if the receive total size is
// unknown.
///
int (CEF_CALLBACK *get_percent_complete)(struct _cef_download_item_t* self);
int(CEF_CALLBACK* get_percent_complete)(struct _cef_download_item_t* self);
///
// Returns the total number of bytes.
///
int64 (CEF_CALLBACK *get_total_bytes)(struct _cef_download_item_t* self);
int64(CEF_CALLBACK* get_total_bytes)(struct _cef_download_item_t* self);
///
// Returns the number of received bytes.
///
int64 (CEF_CALLBACK *get_received_bytes)(struct _cef_download_item_t* self);
int64(CEF_CALLBACK* get_received_bytes)(struct _cef_download_item_t* self);
///
// Returns the time that the download started.
///
cef_time_t (CEF_CALLBACK *get_start_time)(struct _cef_download_item_t* self);
cef_time_t(CEF_CALLBACK* get_start_time)(struct _cef_download_item_t* self);
///
// Returns the time that the download ended.
///
cef_time_t (CEF_CALLBACK *get_end_time)(struct _cef_download_item_t* self);
cef_time_t(CEF_CALLBACK* get_end_time)(struct _cef_download_item_t* self);
///
// Returns the full path to the downloaded or downloading file.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_full_path)(
cef_string_userfree_t(CEF_CALLBACK* get_full_path)(
struct _cef_download_item_t* self);
///
// Returns the unique identifier for this download.
///
uint32 (CEF_CALLBACK *get_id)(struct _cef_download_item_t* self);
uint32(CEF_CALLBACK* get_id)(struct _cef_download_item_t* self);
///
// Returns the URL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_url)(
cef_string_userfree_t(CEF_CALLBACK* get_url)(
struct _cef_download_item_t* self);
///
// Returns the original URL before any redirections.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_original_url)(
cef_string_userfree_t(CEF_CALLBACK* get_original_url)(
struct _cef_download_item_t* self);
///
// Returns the suggested file name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_suggested_file_name)(
cef_string_userfree_t(CEF_CALLBACK* get_suggested_file_name)(
struct _cef_download_item_t* self);
///
// Returns the content disposition.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_content_disposition)(
cef_string_userfree_t(CEF_CALLBACK* get_content_disposition)(
struct _cef_download_item_t* self);
///
// Returns the mime type.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_mime_type)(
cef_string_userfree_t(CEF_CALLBACK* get_mime_type)(
struct _cef_download_item_t* self);
} cef_download_item_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a4b5264c1e685cad86203772631460684ee7820d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Structure used to represent drag data. The functions of this structure may be
// called on any thread.
@@ -60,61 +61,61 @@ typedef struct _cef_drag_data_t {
///
// Returns a copy of the current object.
///
struct _cef_drag_data_t* (CEF_CALLBACK *clone)(struct _cef_drag_data_t* self);
struct _cef_drag_data_t*(CEF_CALLBACK* clone)(struct _cef_drag_data_t* self);
///
// Returns true (1) if this object is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_drag_data_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_drag_data_t* self);
///
// Returns true (1) if the drag data is a link.
///
int (CEF_CALLBACK *is_link)(struct _cef_drag_data_t* self);
int(CEF_CALLBACK* is_link)(struct _cef_drag_data_t* self);
///
// Returns true (1) if the drag data is a text or html fragment.
///
int (CEF_CALLBACK *is_fragment)(struct _cef_drag_data_t* self);
int(CEF_CALLBACK* is_fragment)(struct _cef_drag_data_t* self);
///
// Returns true (1) if the drag data is a file.
///
int (CEF_CALLBACK *is_file)(struct _cef_drag_data_t* self);
int(CEF_CALLBACK* is_file)(struct _cef_drag_data_t* self);
///
// Return the link URL that is being dragged.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_link_url)(
cef_string_userfree_t(CEF_CALLBACK* get_link_url)(
struct _cef_drag_data_t* self);
///
// Return the title associated with the link being dragged.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_link_title)(
cef_string_userfree_t(CEF_CALLBACK* get_link_title)(
struct _cef_drag_data_t* self);
///
// Return the metadata, if any, associated with the link being dragged.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_link_metadata)(
cef_string_userfree_t(CEF_CALLBACK* get_link_metadata)(
struct _cef_drag_data_t* self);
///
// Return the plain text fragment that is being dragged.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_fragment_text)(
cef_string_userfree_t(CEF_CALLBACK* get_fragment_text)(
struct _cef_drag_data_t* self);
///
// Return the text/html fragment that is being dragged.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_fragment_html)(
cef_string_userfree_t(CEF_CALLBACK* get_fragment_html)(
struct _cef_drag_data_t* self);
///
@@ -122,14 +123,14 @@ typedef struct _cef_drag_data_t {
// resolving relative URLs and may be NULL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_fragment_base_url)(
cef_string_userfree_t(CEF_CALLBACK* get_fragment_base_url)(
struct _cef_drag_data_t* self);
///
// Return the name of the file being dragged out of the browser window.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_file_name)(
cef_string_userfree_t(CEF_CALLBACK* get_file_name)(
struct _cef_drag_data_t* self);
///
@@ -138,89 +139,88 @@ typedef struct _cef_drag_data_t {
// this function will return the size of the file contents in bytes. Call
// get_file_name() to get a suggested name for the file.
///
size_t (CEF_CALLBACK *get_file_contents)(struct _cef_drag_data_t* self,
struct _cef_stream_writer_t* writer);
size_t(CEF_CALLBACK* get_file_contents)(struct _cef_drag_data_t* self,
struct _cef_stream_writer_t* writer);
///
// Retrieve the list of file names that are being dragged into the browser
// window.
///
int (CEF_CALLBACK *get_file_names)(struct _cef_drag_data_t* self,
cef_string_list_t names);
int(CEF_CALLBACK* get_file_names)(struct _cef_drag_data_t* self,
cef_string_list_t names);
///
// Set the link URL that is being dragged.
///
void (CEF_CALLBACK *set_link_url)(struct _cef_drag_data_t* self,
const cef_string_t* url);
void(CEF_CALLBACK* set_link_url)(struct _cef_drag_data_t* self,
const cef_string_t* url);
///
// Set the title associated with the link being dragged.
///
void (CEF_CALLBACK *set_link_title)(struct _cef_drag_data_t* self,
const cef_string_t* title);
void(CEF_CALLBACK* set_link_title)(struct _cef_drag_data_t* self,
const cef_string_t* title);
///
// Set the metadata associated with the link being dragged.
///
void (CEF_CALLBACK *set_link_metadata)(struct _cef_drag_data_t* self,
const cef_string_t* data);
void(CEF_CALLBACK* set_link_metadata)(struct _cef_drag_data_t* self,
const cef_string_t* data);
///
// Set the plain text fragment that is being dragged.
///
void (CEF_CALLBACK *set_fragment_text)(struct _cef_drag_data_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* set_fragment_text)(struct _cef_drag_data_t* self,
const cef_string_t* text);
///
// Set the text/html fragment that is being dragged.
///
void (CEF_CALLBACK *set_fragment_html)(struct _cef_drag_data_t* self,
const cef_string_t* html);
void(CEF_CALLBACK* set_fragment_html)(struct _cef_drag_data_t* self,
const cef_string_t* html);
///
// Set the base URL that the fragment came from.
///
void (CEF_CALLBACK *set_fragment_base_url)(struct _cef_drag_data_t* self,
const cef_string_t* base_url);
void(CEF_CALLBACK* set_fragment_base_url)(struct _cef_drag_data_t* self,
const cef_string_t* base_url);
///
// Reset the file contents. You should do this before calling
// cef_browser_host_t::DragTargetDragEnter as the web view does not allow us
// to drag in this kind of data.
///
void (CEF_CALLBACK *reset_file_contents)(struct _cef_drag_data_t* self);
void(CEF_CALLBACK* reset_file_contents)(struct _cef_drag_data_t* self);
///
// Add a file that is being dragged into the webview.
///
void (CEF_CALLBACK *add_file)(struct _cef_drag_data_t* self,
const cef_string_t* path, const cef_string_t* display_name);
void(CEF_CALLBACK* add_file)(struct _cef_drag_data_t* self,
const cef_string_t* path,
const cef_string_t* display_name);
///
// Get the image representation of drag data. May return NULL if no image
// representation is available.
///
struct _cef_image_t* (CEF_CALLBACK *get_image)(struct _cef_drag_data_t* self);
struct _cef_image_t*(CEF_CALLBACK* get_image)(struct _cef_drag_data_t* self);
///
// Get the image hotspot (drag start location relative to image dimensions).
///
cef_point_t (CEF_CALLBACK *get_image_hotspot)(struct _cef_drag_data_t* self);
cef_point_t(CEF_CALLBACK* get_image_hotspot)(struct _cef_drag_data_t* self);
///
// Returns true (1) if an image representation of drag data is available.
///
int (CEF_CALLBACK *has_image)(struct _cef_drag_data_t* self);
int(CEF_CALLBACK* has_image)(struct _cef_drag_data_t* self);
} cef_drag_data_t;
///
// Create a new cef_drag_data_t object.
///
CEF_EXPORT cef_drag_data_t* cef_drag_data_create();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c557dad9522f4bd4c6b3295d149c6b893fc18d52$
//
#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Implement this structure to handle events related to dragging. The functions
// of this structure will be called on the UI thread.
@@ -63,9 +64,10 @@ typedef struct _cef_drag_handler_t {
// operation. Return false (0) for default drag handling behavior or true (1)
// to cancel the drag event.
///
int (CEF_CALLBACK *on_drag_enter)(struct _cef_drag_handler_t* self,
struct _cef_browser_t* browser, struct _cef_drag_data_t* dragData,
cef_drag_operations_mask_t mask);
int(CEF_CALLBACK* on_drag_enter)(struct _cef_drag_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_drag_data_t* dragData,
cef_drag_operations_mask_t mask);
///
// Called whenever draggable regions for the browser window change. These can
@@ -74,12 +76,13 @@ typedef struct _cef_drag_handler_t {
// never be called. If the last draggable region is removed from a document
// this function will be called with an NULL vector.
///
void (CEF_CALLBACK *on_draggable_regions_changed)(
struct _cef_drag_handler_t* self, struct _cef_browser_t* browser,
size_t regionsCount, cef_draggable_region_t const* regions);
void(CEF_CALLBACK* on_draggable_regions_changed)(
struct _cef_drag_handler_t* self,
struct _cef_browser_t* browser,
size_t regionsCount,
cef_draggable_region_t const* regions);
} cef_drag_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=4601edefadfafea031f2c5df498262fc2142252b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Creates a directory and all parent directories if they don't already exist.
// Returns true (1) on successful creation or if the directory already exists.
@@ -71,7 +72,7 @@ CEF_EXPORT int cef_get_temp_directory(cef_string_t* temp_dir);
// browser process UI or IO threads is not allowed.
///
CEF_EXPORT int cef_create_new_temp_directory(const cef_string_t* prefix,
cef_string_t* new_temp_path);
cef_string_t* new_temp_path);
///
// Creates a directory within another directory. Extra characters will be
@@ -82,7 +83,8 @@ CEF_EXPORT int cef_create_new_temp_directory(const cef_string_t* prefix,
// or IO threads is not allowed.
///
CEF_EXPORT int cef_create_temp_directory_in_directory(
const cef_string_t* base_dir, const cef_string_t* prefix,
const cef_string_t* base_dir,
const cef_string_t* prefix,
cef_string_t* new_dir);
///
@@ -109,7 +111,8 @@ CEF_EXPORT int cef_delete_file(const cef_string_t* path, int recursive);
// or IO threads is not allowed.
///
CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
const cef_string_t* dest_file, int include_hidden_files);
const cef_string_t* dest_file,
int include_hidden_files);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=975114b079fa271fecbf31ef160974941faed8a4$
//
#ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Implement this structure to handle events related to find results. The
// functions of this structure will be called on the UI thread.
@@ -64,13 +65,15 @@ typedef struct _cef_find_handler_t {
// current position in the search results, and |finalUpdate| is true (1) if
// this is the last find notification.
///
void (CEF_CALLBACK *on_find_result)(struct _cef_find_handler_t* self,
struct _cef_browser_t* browser, int identifier, int count,
const cef_rect_t* selectionRect, int activeMatchOrdinal,
int finalUpdate);
void(CEF_CALLBACK* on_find_result)(struct _cef_find_handler_t* self,
struct _cef_browser_t* browser,
int identifier,
int count,
const cef_rect_t* selectionRect,
int activeMatchOrdinal,
int finalUpdate);
} cef_find_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=bed1f7b94e060b83e3f22eb84ce1274f2d10b3e6$
//
#ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
@@ -47,7 +49,6 @@
extern "C" {
#endif
///
// Implement this structure to handle events related to focus. The functions of
// this structure will be called on the UI thread.
@@ -64,25 +65,26 @@ typedef struct _cef_focus_handler_t {
// will be true (1) if the browser is giving focus to the next component and
// false (0) if the browser is giving focus to the previous component.
///
void (CEF_CALLBACK *on_take_focus)(struct _cef_focus_handler_t* self,
struct _cef_browser_t* browser, int next);
void(CEF_CALLBACK* on_take_focus)(struct _cef_focus_handler_t* self,
struct _cef_browser_t* browser,
int next);
///
// Called when the browser component is requesting focus. |source| indicates
// where the focus request is originating from. Return false (0) to allow the
// focus to be set or true (1) to cancel setting the focus.
///
int (CEF_CALLBACK *on_set_focus)(struct _cef_focus_handler_t* self,
struct _cef_browser_t* browser, cef_focus_source_t source);
int(CEF_CALLBACK* on_set_focus)(struct _cef_focus_handler_t* self,
struct _cef_browser_t* browser,
cef_focus_source_t source);
///
// Called when the browser component has received focus.
///
void (CEF_CALLBACK *on_got_focus)(struct _cef_focus_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_got_focus)(struct _cef_focus_handler_t* self,
struct _cef_browser_t* browser);
} cef_focus_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c1457ef21c14c40422b19b681121283eae3e9d70$
//
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
@@ -66,83 +68,84 @@ typedef struct _cef_frame_t {
///
// True if this object is currently attached to a valid frame.
///
int (CEF_CALLBACK *is_valid)(struct _cef_frame_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_frame_t* self);
///
// Execute undo in this frame.
///
void (CEF_CALLBACK *undo)(struct _cef_frame_t* self);
void(CEF_CALLBACK* undo)(struct _cef_frame_t* self);
///
// Execute redo in this frame.
///
void (CEF_CALLBACK *redo)(struct _cef_frame_t* self);
void(CEF_CALLBACK* redo)(struct _cef_frame_t* self);
///
// Execute cut in this frame.
///
void (CEF_CALLBACK *cut)(struct _cef_frame_t* self);
void(CEF_CALLBACK* cut)(struct _cef_frame_t* self);
///
// Execute copy in this frame.
///
void (CEF_CALLBACK *copy)(struct _cef_frame_t* self);
void(CEF_CALLBACK* copy)(struct _cef_frame_t* self);
///
// Execute paste in this frame.
///
void (CEF_CALLBACK *paste)(struct _cef_frame_t* self);
void(CEF_CALLBACK* paste)(struct _cef_frame_t* self);
///
// Execute delete in this frame.
///
void (CEF_CALLBACK *del)(struct _cef_frame_t* self);
void(CEF_CALLBACK* del)(struct _cef_frame_t* self);
///
// Execute select all in this frame.
///
void (CEF_CALLBACK *select_all)(struct _cef_frame_t* self);
void(CEF_CALLBACK* select_all)(struct _cef_frame_t* self);
///
// Save this frame's HTML source to a temporary file and open it in the
// default text viewing application. This function can only be called from the
// browser process.
///
void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self);
void(CEF_CALLBACK* view_source)(struct _cef_frame_t* self);
///
// Retrieve this frame's HTML source as a string sent to the specified
// visitor.
///
void (CEF_CALLBACK *get_source)(struct _cef_frame_t* self,
struct _cef_string_visitor_t* visitor);
void(CEF_CALLBACK* get_source)(struct _cef_frame_t* self,
struct _cef_string_visitor_t* visitor);
///
// Retrieve this frame's display text as a string sent to the specified
// visitor.
///
void (CEF_CALLBACK *get_text)(struct _cef_frame_t* self,
struct _cef_string_visitor_t* visitor);
void(CEF_CALLBACK* get_text)(struct _cef_frame_t* self,
struct _cef_string_visitor_t* visitor);
///
// Load the request represented by the |request| object.
///
void (CEF_CALLBACK *load_request)(struct _cef_frame_t* self,
struct _cef_request_t* request);
void(CEF_CALLBACK* load_request)(struct _cef_frame_t* self,
struct _cef_request_t* request);
///
// Load the specified |url|.
///
void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self,
const cef_string_t* url);
void(CEF_CALLBACK* load_url)(struct _cef_frame_t* self,
const cef_string_t* url);
///
// Load the contents of |string_val| with the specified dummy |url|. |url|
// should have a standard scheme (for example, http scheme) or behaviors like
// link clicks and web security restrictions may not behave as expected.
///
void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self,
const cef_string_t* string_val, const cef_string_t* url);
void(CEF_CALLBACK* load_string)(struct _cef_frame_t* self,
const cef_string_t* string_val,
const cef_string_t* url);
///
// Execute a string of JavaScript code in this frame. The |script_url|
@@ -151,19 +154,20 @@ typedef struct _cef_frame_t {
// error. The |start_line| parameter is the base line number to use for error
// reporting.
///
void (CEF_CALLBACK *execute_java_script)(struct _cef_frame_t* self,
const cef_string_t* code, const cef_string_t* script_url,
int start_line);
void(CEF_CALLBACK* execute_java_script)(struct _cef_frame_t* self,
const cef_string_t* code,
const cef_string_t* script_url,
int start_line);
///
// Returns true (1) if this is the main (top-level) frame.
///
int (CEF_CALLBACK *is_main)(struct _cef_frame_t* self);
int(CEF_CALLBACK* is_main)(struct _cef_frame_t* self);
///
// Returns true (1) if this is the focused frame.
///
int (CEF_CALLBACK *is_focused)(struct _cef_frame_t* self);
int(CEF_CALLBACK* is_focused)(struct _cef_frame_t* self);
///
// Returns the name for this frame. If the frame has an assigned name (for
@@ -173,47 +177,46 @@ typedef struct _cef_frame_t {
// value.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_name)(struct _cef_frame_t* self);
///
// Returns the globally unique identifier for this frame or < 0 if the
// underlying frame does not yet exist.
///
int64 (CEF_CALLBACK *get_identifier)(struct _cef_frame_t* self);
int64(CEF_CALLBACK* get_identifier)(struct _cef_frame_t* self);
///
// Returns the parent of this frame or NULL if this is the main (top-level)
// frame.
///
struct _cef_frame_t* (CEF_CALLBACK *get_parent)(struct _cef_frame_t* self);
struct _cef_frame_t*(CEF_CALLBACK* get_parent)(struct _cef_frame_t* self);
///
// Returns the URL currently loaded in this frame.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_url)(struct _cef_frame_t* self);
///
// Returns the browser that this frame belongs to.
///
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(struct _cef_frame_t* self);
struct _cef_browser_t*(CEF_CALLBACK* get_browser)(struct _cef_frame_t* self);
///
// Get the V8 context associated with the frame. This function can only be
// called from the render process.
///
struct _cef_v8context_t* (CEF_CALLBACK *get_v8context)(
struct _cef_v8context_t*(CEF_CALLBACK* get_v8context)(
struct _cef_frame_t* self);
///
// Visit the DOM document. This function can only be called from the render
// process.
///
void (CEF_CALLBACK *visit_dom)(struct _cef_frame_t* self,
struct _cef_domvisitor_t* visitor);
void(CEF_CALLBACK* visit_dom)(struct _cef_frame_t* self,
struct _cef_domvisitor_t* visitor);
} cef_frame_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=3ae57ba897d73f3fcccc955c827379746b6203af$
//
#ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Implement this structure to receive geolocation updates. The functions of
// this structure will be called on the browser process UI thread.
@@ -59,12 +60,11 @@ typedef struct _cef_get_geolocation_callback_t {
// Called with the 'best available' location information or, if the location
// update failed, with error information.
///
void (CEF_CALLBACK *on_location_update)(
void(CEF_CALLBACK* on_location_update)(
struct _cef_get_geolocation_callback_t* self,
const struct _cef_geoposition_t* position);
} cef_get_geolocation_callback_t;
///
// Request a one-time geolocation update. This function bypasses any user
// permission checks so should only be used by code that is allowed to access

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ec60811fcefbe02348f14ecddbe5778ce836bf53$
//
#ifndef CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_GEOLOCATION_HANDLER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Callback structure used for asynchronous continuation of geolocation
// permission requests.
@@ -59,11 +60,9 @@ typedef struct _cef_geolocation_callback_t {
///
// Call to allow or deny geolocation access.
///
void (CEF_CALLBACK *cont)(struct _cef_geolocation_callback_t* self,
int allow);
void(CEF_CALLBACK* cont)(struct _cef_geolocation_callback_t* self, int allow);
} cef_geolocation_callback_t;
///
// Implement this structure to handle events related to geolocation permission
// requests. The functions of this structure will be called on the browser
@@ -83,21 +82,23 @@ typedef struct _cef_geolocation_handler_t {
// time to continue or cancel the request. Return false (0) to cancel the
// request immediately.
///
int (CEF_CALLBACK *on_request_geolocation_permission)(
struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,
const cef_string_t* requesting_url, int request_id,
int(CEF_CALLBACK* on_request_geolocation_permission)(
struct _cef_geolocation_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* requesting_url,
int request_id,
struct _cef_geolocation_callback_t* callback);
///
// Called when a geolocation access request is canceled. |request_id| is the
// unique ID for the permission request.
///
void (CEF_CALLBACK *on_cancel_geolocation_permission)(
struct _cef_geolocation_handler_t* self, struct _cef_browser_t* browser,
void(CEF_CALLBACK* on_cancel_geolocation_permission)(
struct _cef_geolocation_handler_t* self,
struct _cef_browser_t* browser,
int request_id);
} cef_geolocation_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=60f904f2f77ce6d89f9fceeeda0050273a3c9e6d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Container for a single image represented at different scale factors. All
// image representations should be the same size in density independent pixel
@@ -63,14 +64,14 @@ typedef struct _cef_image_t {
///
// Returns true (1) if this Image is NULL.
///
int (CEF_CALLBACK *is_empty)(struct _cef_image_t* self);
int(CEF_CALLBACK* is_empty)(struct _cef_image_t* self);
///
// Returns true (1) if this Image and |that| Image share the same underlying
// storage. Will also return true (1) if both images are NULL.
///
int (CEF_CALLBACK *is_same)(struct _cef_image_t* self,
struct _cef_image_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_image_t* self,
struct _cef_image_t* that);
///
// Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA
@@ -79,49 +80,57 @@ typedef struct _cef_image_t {
// pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size.
// |color_type| and |alpha_type| values specify the pixel format.
///
int (CEF_CALLBACK *add_bitmap)(struct _cef_image_t* self, float scale_factor,
int pixel_width, int pixel_height, cef_color_type_t color_type,
cef_alpha_type_t alpha_type, const void* pixel_data,
size_t pixel_data_size);
int(CEF_CALLBACK* add_bitmap)(struct _cef_image_t* self,
float scale_factor,
int pixel_width,
int pixel_height,
cef_color_type_t color_type,
cef_alpha_type_t alpha_type,
const void* pixel_data,
size_t pixel_data_size);
///
// Add a PNG image representation for |scale_factor|. |png_data| is the image
// data of size |png_data_size|. Any alpha transparency in the PNG data will
// be maintained.
///
int (CEF_CALLBACK *add_png)(struct _cef_image_t* self, float scale_factor,
const void* png_data, size_t png_data_size);
int(CEF_CALLBACK* add_png)(struct _cef_image_t* self,
float scale_factor,
const void* png_data,
size_t png_data_size);
///
// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the
// image data of size |jpeg_data_size|. The JPEG format does not support
// transparency so the alpha byte will be set to 0xFF for all pixels.
///
int (CEF_CALLBACK *add_jpeg)(struct _cef_image_t* self, float scale_factor,
const void* jpeg_data, size_t jpeg_data_size);
int(CEF_CALLBACK* add_jpeg)(struct _cef_image_t* self,
float scale_factor,
const void* jpeg_data,
size_t jpeg_data_size);
///
// Returns the image width in density independent pixel (DIP) units.
///
size_t (CEF_CALLBACK *get_width)(struct _cef_image_t* self);
size_t(CEF_CALLBACK* get_width)(struct _cef_image_t* self);
///
// Returns the image height in density independent pixel (DIP) units.
///
size_t (CEF_CALLBACK *get_height)(struct _cef_image_t* self);
size_t(CEF_CALLBACK* get_height)(struct _cef_image_t* self);
///
// Returns true (1) if this image contains a representation for
// |scale_factor|.
///
int (CEF_CALLBACK *has_representation)(struct _cef_image_t* self,
float scale_factor);
int(CEF_CALLBACK* has_representation)(struct _cef_image_t* self,
float scale_factor);
///
// Removes the representation for |scale_factor|. Returns true (1) on success.
///
int (CEF_CALLBACK *remove_representation)(struct _cef_image_t* self,
float scale_factor);
int(CEF_CALLBACK* remove_representation)(struct _cef_image_t* self,
float scale_factor);
///
// Returns information for the representation that most closely matches
@@ -129,9 +138,11 @@ typedef struct _cef_image_t {
// representation. |pixel_width| and |pixel_height| are the representation
// size in pixel coordinates. Returns true (1) on success.
///
int (CEF_CALLBACK *get_representation_info)(struct _cef_image_t* self,
float scale_factor, float* actual_scale_factor, int* pixel_width,
int* pixel_height);
int(CEF_CALLBACK* get_representation_info)(struct _cef_image_t* self,
float scale_factor,
float* actual_scale_factor,
int* pixel_width,
int* pixel_height);
///
// Returns the bitmap representation that most closely matches |scale_factor|.
@@ -141,10 +152,13 @@ typedef struct _cef_image_t {
// Returns a cef_binary_value_t containing the pixel data on success or NULL
// on failure.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_as_bitmap)(
struct _cef_image_t* self, float scale_factor,
cef_color_type_t color_type, cef_alpha_type_t alpha_type,
int* pixel_width, int* pixel_height);
struct _cef_binary_value_t*(CEF_CALLBACK* get_as_bitmap)(
struct _cef_image_t* self,
float scale_factor,
cef_color_type_t color_type,
cef_alpha_type_t alpha_type,
int* pixel_width,
int* pixel_height);
///
// Returns the PNG representation that most closely matches |scale_factor|. If
@@ -154,9 +168,12 @@ typedef struct _cef_image_t {
// cef_binary_value_t containing the PNG image data on success or NULL on
// failure.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_as_png)(
struct _cef_image_t* self, float scale_factor, int with_transparency,
int* pixel_width, int* pixel_height);
struct _cef_binary_value_t*(CEF_CALLBACK* get_as_png)(
struct _cef_image_t* self,
float scale_factor,
int with_transparency,
int* pixel_width,
int* pixel_height);
///
// Returns the JPEG representation that most closely matches |scale_factor|.
@@ -167,19 +184,20 @@ typedef struct _cef_image_t {
// cef_binary_value_t containing the JPEG image data on success or NULL on
// failure.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_as_jpeg)(
struct _cef_image_t* self, float scale_factor, int quality,
int* pixel_width, int* pixel_height);
struct _cef_binary_value_t*(CEF_CALLBACK* get_as_jpeg)(
struct _cef_image_t* self,
float scale_factor,
int quality,
int* pixel_width,
int* pixel_height);
} cef_image_t;
///
// Create a new cef_image_t. It will initially be NULL. Use the Add*() functions
// to add representations at different scale factors.
///
CEF_EXPORT cef_image_t* cef_image_create();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=351cff5a52f29b54d1854d5dfbb1733c8a62797d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Callback structure used for asynchronous continuation of JavaScript dialog
// requests.
@@ -60,11 +61,11 @@ typedef struct _cef_jsdialog_callback_t {
// Continue the JS dialog request. Set |success| to true (1) if the OK button
// was pressed. The |user_input| value should be specified for prompt dialogs.
///
void (CEF_CALLBACK *cont)(struct _cef_jsdialog_callback_t* self, int success,
const cef_string_t* user_input);
void(CEF_CALLBACK* cont)(struct _cef_jsdialog_callback_t* self,
int success,
const cef_string_t* user_input);
} cef_jsdialog_callback_t;
///
// Implement this structure to handle events related to JavaScript dialogs. The
// functions of this structure will be called on the UI thread.
@@ -92,11 +93,14 @@ typedef struct _cef_jsdialog_handler_t {
// the application must execute |callback| once the custom dialog is
// dismissed.
///
int (CEF_CALLBACK *on_jsdialog)(struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* origin_url,
cef_jsdialog_type_t dialog_type, const cef_string_t* message_text,
const cef_string_t* default_prompt_text,
struct _cef_jsdialog_callback_t* callback, int* suppress_message);
int(CEF_CALLBACK* on_jsdialog)(struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* origin_url,
cef_jsdialog_type_t dialog_type,
const cef_string_t* message_text,
const cef_string_t* default_prompt_text,
struct _cef_jsdialog_callback_t* callback,
int* suppress_message);
///
// Called to run a dialog asking the user if they want to leave a page. Return
@@ -106,9 +110,11 @@ typedef struct _cef_jsdialog_handler_t {
// dialog is used the application must execute |callback| once the custom
// dialog is dismissed.
///
int (CEF_CALLBACK *on_before_unload_dialog)(
struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser,
const cef_string_t* message_text, int is_reload,
int(CEF_CALLBACK* on_before_unload_dialog)(
struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* message_text,
int is_reload,
struct _cef_jsdialog_callback_t* callback);
///
@@ -116,17 +122,17 @@ typedef struct _cef_jsdialog_handler_t {
// be called due to events like page navigation irregardless of whether any
// dialogs are currently pending.
///
void (CEF_CALLBACK *on_reset_dialog_state)(
struct _cef_jsdialog_handler_t* self, struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_reset_dialog_state)(
struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser);
///
// Called when the default implementation dialog is closed.
///
void (CEF_CALLBACK *on_dialog_closed)(struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_dialog_closed)(struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser);
} cef_jsdialog_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=07c2a01bb9975fa52fdb287712f8f369557ba755$
//
#ifndef CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Implement this structure to handle events related to keyboard input. The
// functions of this structure will be called on the UI thread.
@@ -63,9 +64,11 @@ typedef struct _cef_keyboard_handler_t {
// (0) otherwise. If the event will be handled in on_key_event() as a keyboard
// shortcut set |is_keyboard_shortcut| to true (1) and return false (0).
///
int (CEF_CALLBACK *on_pre_key_event)(struct _cef_keyboard_handler_t* self,
struct _cef_browser_t* browser, const struct _cef_key_event_t* event,
cef_event_handle_t os_event, int* is_keyboard_shortcut);
int(CEF_CALLBACK* on_pre_key_event)(struct _cef_keyboard_handler_t* self,
struct _cef_browser_t* browser,
const struct _cef_key_event_t* event,
cef_event_handle_t os_event,
int* is_keyboard_shortcut);
///
// Called after the renderer and JavaScript in the page has had a chance to
@@ -73,12 +76,12 @@ typedef struct _cef_keyboard_handler_t {
// |os_event| is the operating system event message, if any. Return true (1)
// if the keyboard event was handled or false (0) otherwise.
///
int (CEF_CALLBACK *on_key_event)(struct _cef_keyboard_handler_t* self,
struct _cef_browser_t* browser, const struct _cef_key_event_t* event,
cef_event_handle_t os_event);
int(CEF_CALLBACK* on_key_event)(struct _cef_keyboard_handler_t* self,
struct _cef_browser_t* browser,
const struct _cef_key_event_t* event,
cef_event_handle_t os_event);
} cef_keyboard_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7894d507f337ebe5f9296770e10773a4e6458f00$
//
#ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
@@ -80,20 +82,26 @@ typedef struct _cef_life_span_handler_t {
// the parent browser is destroyed before the popup browser creation completes
// (indicated by a call to OnAfterCreated for the popup browser).
///
int (CEF_CALLBACK *on_before_popup)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
const cef_string_t* target_url, const cef_string_t* target_frame_name,
cef_window_open_disposition_t target_disposition, int user_gesture,
int(CEF_CALLBACK* on_before_popup)(
struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
const cef_string_t* target_url,
const cef_string_t* target_frame_name,
cef_window_open_disposition_t target_disposition,
int user_gesture,
const struct _cef_popup_features_t* popupFeatures,
struct _cef_window_info_t* windowInfo, struct _cef_client_t** client,
struct _cef_browser_settings_t* settings, int* no_javascript_access);
struct _cef_window_info_t* windowInfo,
struct _cef_client_t** client,
struct _cef_browser_settings_t* settings,
int* no_javascript_access);
///
// Called after a new browser is created. This callback will be the first
// notification that references |browser|.
///
void (CEF_CALLBACK *on_after_created)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_after_created)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser);
///
// Called when a browser has recieved a request to close. This may result
@@ -184,8 +192,8 @@ typedef struct _cef_life_span_handler_t {
// browsers
// exist.
///
int (CEF_CALLBACK *do_close)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser);
int(CEF_CALLBACK* do_close)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser);
///
// Called just before a browser is destroyed. Release all references to the
@@ -194,11 +202,10 @@ typedef struct _cef_life_span_handler_t {
// notification that references |browser|. See do_close() documentation for
// additional usage information.
///
void (CEF_CALLBACK *on_before_close)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_before_close)(struct _cef_life_span_handler_t* self,
struct _cef_browser_t* browser);
} cef_life_span_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d8fa87bb47ec889cab864fe96f94e07bf1deb0f6$
//
#ifndef CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Implement this structure to handle events related to browser load status. The
// functions of this structure will be called on the browser process UI thread
@@ -65,9 +66,11 @@ typedef struct _cef_load_handler_t {
// of failure. It will be called before any calls to OnLoadStart and after all
// calls to OnLoadError and/or OnLoadEnd.
///
void (CEF_CALLBACK *on_loading_state_change)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser, int isLoading, int canGoBack,
int canGoForward);
void(CEF_CALLBACK* on_loading_state_change)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser,
int isLoading,
int canGoBack,
int canGoForward);
///
// Called after a navigation has been committed and before the browser begins
@@ -81,9 +84,10 @@ typedef struct _cef_load_handler_t {
// navigations that fail or are canceled before commit. For notification of
// overall browser load status use OnLoadingStateChange instead.
///
void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
cef_transition_type_t transition_type);
void(CEF_CALLBACK* on_load_start)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
cef_transition_type_t transition_type);
///
// Called when the browser is done loading a frame. The |frame| value will
@@ -95,9 +99,10 @@ typedef struct _cef_load_handler_t {
// For notification of overall browser load status use OnLoadingStateChange
// instead.
///
void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
int httpStatusCode);
void(CEF_CALLBACK* on_load_end)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
int httpStatusCode);
///
// Called when a navigation fails or is canceled. This function may be called
@@ -106,13 +111,14 @@ typedef struct _cef_load_handler_t {
// error text and |failedUrl| is the URL that failed to load. See
// net\base\net_error_list.h for complete descriptions of the error codes.
///
void (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
cef_errorcode_t errorCode, const cef_string_t* errorText,
const cef_string_t* failedUrl);
void(CEF_CALLBACK* on_load_error)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
cef_errorcode_t errorCode,
const cef_string_t* errorText,
const cef_string_t* failedUrl);
} cef_load_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=295f7f55ebe6d548aba1476e67efb2c88ab10ca5$
//
#ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Supports creation and modification of menus. See cef_menu_id_t for the
// command ids that have default implementations. All user-defined command ids
@@ -61,329 +62,363 @@ typedef struct _cef_menu_model_t {
///
// Returns true (1) if this menu is a submenu.
///
int (CEF_CALLBACK *is_sub_menu)(struct _cef_menu_model_t* self);
int(CEF_CALLBACK* is_sub_menu)(struct _cef_menu_model_t* self);
///
// Clears the menu. Returns true (1) on success.
///
int (CEF_CALLBACK *clear)(struct _cef_menu_model_t* self);
int(CEF_CALLBACK* clear)(struct _cef_menu_model_t* self);
///
// Returns the number of items in this menu.
///
int (CEF_CALLBACK *get_count)(struct _cef_menu_model_t* self);
int(CEF_CALLBACK* get_count)(struct _cef_menu_model_t* self);
///
// Add a separator to the menu. Returns true (1) on success.
///
int (CEF_CALLBACK *add_separator)(struct _cef_menu_model_t* self);
int(CEF_CALLBACK* add_separator)(struct _cef_menu_model_t* self);
///
// Add an item to the menu. Returns true (1) on success.
///
int (CEF_CALLBACK *add_item)(struct _cef_menu_model_t* self, int command_id,
const cef_string_t* label);
int(CEF_CALLBACK* add_item)(struct _cef_menu_model_t* self,
int command_id,
const cef_string_t* label);
///
// Add a check item to the menu. Returns true (1) on success.
///
int (CEF_CALLBACK *add_check_item)(struct _cef_menu_model_t* self,
int command_id, const cef_string_t* label);
int(CEF_CALLBACK* add_check_item)(struct _cef_menu_model_t* self,
int command_id,
const cef_string_t* label);
///
// Add a radio item to the menu. Only a single item with the specified
// |group_id| can be checked at a time. Returns true (1) on success.
///
int (CEF_CALLBACK *add_radio_item)(struct _cef_menu_model_t* self,
int command_id, const cef_string_t* label, int group_id);
int(CEF_CALLBACK* add_radio_item)(struct _cef_menu_model_t* self,
int command_id,
const cef_string_t* label,
int group_id);
///
// Add a sub-menu to the menu. The new sub-menu is returned.
///
struct _cef_menu_model_t* (CEF_CALLBACK *add_sub_menu)(
struct _cef_menu_model_t* self, int command_id,
struct _cef_menu_model_t*(CEF_CALLBACK* add_sub_menu)(
struct _cef_menu_model_t* self,
int command_id,
const cef_string_t* label);
///
// Insert a separator in the menu at the specified |index|. Returns true (1)
// on success.
///
int (CEF_CALLBACK *insert_separator_at)(struct _cef_menu_model_t* self,
int index);
int(CEF_CALLBACK* insert_separator_at)(struct _cef_menu_model_t* self,
int index);
///
// Insert an item in the menu at the specified |index|. Returns true (1) on
// success.
///
int (CEF_CALLBACK *insert_item_at)(struct _cef_menu_model_t* self, int index,
int command_id, const cef_string_t* label);
int(CEF_CALLBACK* insert_item_at)(struct _cef_menu_model_t* self,
int index,
int command_id,
const cef_string_t* label);
///
// Insert a check item in the menu at the specified |index|. Returns true (1)
// on success.
///
int (CEF_CALLBACK *insert_check_item_at)(struct _cef_menu_model_t* self,
int index, int command_id, const cef_string_t* label);
int(CEF_CALLBACK* insert_check_item_at)(struct _cef_menu_model_t* self,
int index,
int command_id,
const cef_string_t* label);
///
// Insert a radio item in the menu at the specified |index|. Only a single
// item with the specified |group_id| can be checked at a time. Returns true
// (1) on success.
///
int (CEF_CALLBACK *insert_radio_item_at)(struct _cef_menu_model_t* self,
int index, int command_id, const cef_string_t* label, int group_id);
int(CEF_CALLBACK* insert_radio_item_at)(struct _cef_menu_model_t* self,
int index,
int command_id,
const cef_string_t* label,
int group_id);
///
// Insert a sub-menu in the menu at the specified |index|. The new sub-menu is
// returned.
///
struct _cef_menu_model_t* (CEF_CALLBACK *insert_sub_menu_at)(
struct _cef_menu_model_t* self, int index, int command_id,
struct _cef_menu_model_t*(CEF_CALLBACK* insert_sub_menu_at)(
struct _cef_menu_model_t* self,
int index,
int command_id,
const cef_string_t* label);
///
// Removes the item with the specified |command_id|. Returns true (1) on
// success.
///
int (CEF_CALLBACK *remove)(struct _cef_menu_model_t* self, int command_id);
int(CEF_CALLBACK* remove)(struct _cef_menu_model_t* self, int command_id);
///
// Removes the item at the specified |index|. Returns true (1) on success.
///
int (CEF_CALLBACK *remove_at)(struct _cef_menu_model_t* self, int index);
int(CEF_CALLBACK* remove_at)(struct _cef_menu_model_t* self, int index);
///
// Returns the index associated with the specified |command_id| or -1 if not
// found due to the command id not existing in the menu.
///
int (CEF_CALLBACK *get_index_of)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* get_index_of)(struct _cef_menu_model_t* self,
int command_id);
///
// Returns the command id at the specified |index| or -1 if not found due to
// invalid range or the index being a separator.
///
int (CEF_CALLBACK *get_command_id_at)(struct _cef_menu_model_t* self,
int index);
int(CEF_CALLBACK* get_command_id_at)(struct _cef_menu_model_t* self,
int index);
///
// Sets the command id at the specified |index|. Returns true (1) on success.
///
int (CEF_CALLBACK *set_command_id_at)(struct _cef_menu_model_t* self,
int index, int command_id);
int(CEF_CALLBACK* set_command_id_at)(struct _cef_menu_model_t* self,
int index,
int command_id);
///
// Returns the label for the specified |command_id| or NULL if not found.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_label)(
struct _cef_menu_model_t* self, int command_id);
cef_string_userfree_t(CEF_CALLBACK* get_label)(struct _cef_menu_model_t* self,
int command_id);
///
// Returns the label at the specified |index| or NULL if not found due to
// invalid range or the index being a separator.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_label_at)(
struct _cef_menu_model_t* self, int index);
cef_string_userfree_t(
CEF_CALLBACK* get_label_at)(struct _cef_menu_model_t* self, int index);
///
// Sets the label for the specified |command_id|. Returns true (1) on success.
///
int (CEF_CALLBACK *set_label)(struct _cef_menu_model_t* self, int command_id,
const cef_string_t* label);
int(CEF_CALLBACK* set_label)(struct _cef_menu_model_t* self,
int command_id,
const cef_string_t* label);
///
// Set the label at the specified |index|. Returns true (1) on success.
///
int (CEF_CALLBACK *set_label_at)(struct _cef_menu_model_t* self, int index,
const cef_string_t* label);
int(CEF_CALLBACK* set_label_at)(struct _cef_menu_model_t* self,
int index,
const cef_string_t* label);
///
// Returns the item type for the specified |command_id|.
///
cef_menu_item_type_t (CEF_CALLBACK *get_type)(struct _cef_menu_model_t* self,
int command_id);
cef_menu_item_type_t(CEF_CALLBACK* get_type)(struct _cef_menu_model_t* self,
int command_id);
///
// Returns the item type at the specified |index|.
///
cef_menu_item_type_t (CEF_CALLBACK *get_type_at)(
struct _cef_menu_model_t* self, int index);
cef_menu_item_type_t(
CEF_CALLBACK* get_type_at)(struct _cef_menu_model_t* self, int index);
///
// Returns the group id for the specified |command_id| or -1 if invalid.
///
int (CEF_CALLBACK *get_group_id)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* get_group_id)(struct _cef_menu_model_t* self,
int command_id);
///
// Returns the group id at the specified |index| or -1 if invalid.
///
int (CEF_CALLBACK *get_group_id_at)(struct _cef_menu_model_t* self,
int index);
int(CEF_CALLBACK* get_group_id_at)(struct _cef_menu_model_t* self, int index);
///
// Sets the group id for the specified |command_id|. Returns true (1) on
// success.
///
int (CEF_CALLBACK *set_group_id)(struct _cef_menu_model_t* self,
int command_id, int group_id);
int(CEF_CALLBACK* set_group_id)(struct _cef_menu_model_t* self,
int command_id,
int group_id);
///
// Sets the group id at the specified |index|. Returns true (1) on success.
///
int (CEF_CALLBACK *set_group_id_at)(struct _cef_menu_model_t* self, int index,
int group_id);
int(CEF_CALLBACK* set_group_id_at)(struct _cef_menu_model_t* self,
int index,
int group_id);
///
// Returns the submenu for the specified |command_id| or NULL if invalid.
///
struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu)(
struct _cef_menu_model_t* self, int command_id);
struct _cef_menu_model_t*(CEF_CALLBACK* get_sub_menu)(
struct _cef_menu_model_t* self,
int command_id);
///
// Returns the submenu at the specified |index| or NULL if invalid.
///
struct _cef_menu_model_t* (CEF_CALLBACK *get_sub_menu_at)(
struct _cef_menu_model_t* self, int index);
struct _cef_menu_model_t*(
CEF_CALLBACK* get_sub_menu_at)(struct _cef_menu_model_t* self, int index);
///
// Returns true (1) if the specified |command_id| is visible.
///
int (CEF_CALLBACK *is_visible)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* is_visible)(struct _cef_menu_model_t* self, int command_id);
///
// Returns true (1) if the specified |index| is visible.
///
int (CEF_CALLBACK *is_visible_at)(struct _cef_menu_model_t* self, int index);
int(CEF_CALLBACK* is_visible_at)(struct _cef_menu_model_t* self, int index);
///
// Change the visibility of the specified |command_id|. Returns true (1) on
// success.
///
int (CEF_CALLBACK *set_visible)(struct _cef_menu_model_t* self,
int command_id, int visible);
int(CEF_CALLBACK* set_visible)(struct _cef_menu_model_t* self,
int command_id,
int visible);
///
// Change the visibility at the specified |index|. Returns true (1) on
// success.
///
int (CEF_CALLBACK *set_visible_at)(struct _cef_menu_model_t* self, int index,
int visible);
int(CEF_CALLBACK* set_visible_at)(struct _cef_menu_model_t* self,
int index,
int visible);
///
// Returns true (1) if the specified |command_id| is enabled.
///
int (CEF_CALLBACK *is_enabled)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* is_enabled)(struct _cef_menu_model_t* self, int command_id);
///
// Returns true (1) if the specified |index| is enabled.
///
int (CEF_CALLBACK *is_enabled_at)(struct _cef_menu_model_t* self, int index);
int(CEF_CALLBACK* is_enabled_at)(struct _cef_menu_model_t* self, int index);
///
// Change the enabled status of the specified |command_id|. Returns true (1)
// on success.
///
int (CEF_CALLBACK *set_enabled)(struct _cef_menu_model_t* self,
int command_id, int enabled);
int(CEF_CALLBACK* set_enabled)(struct _cef_menu_model_t* self,
int command_id,
int enabled);
///
// Change the enabled status at the specified |index|. Returns true (1) on
// success.
///
int (CEF_CALLBACK *set_enabled_at)(struct _cef_menu_model_t* self, int index,
int enabled);
int(CEF_CALLBACK* set_enabled_at)(struct _cef_menu_model_t* self,
int index,
int enabled);
///
// Returns true (1) if the specified |command_id| is checked. Only applies to
// check and radio items.
///
int (CEF_CALLBACK *is_checked)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* is_checked)(struct _cef_menu_model_t* self, int command_id);
///
// Returns true (1) if the specified |index| is checked. Only applies to check
// and radio items.
///
int (CEF_CALLBACK *is_checked_at)(struct _cef_menu_model_t* self, int index);
int(CEF_CALLBACK* is_checked_at)(struct _cef_menu_model_t* self, int index);
///
// Check the specified |command_id|. Only applies to check and radio items.
// Returns true (1) on success.
///
int (CEF_CALLBACK *set_checked)(struct _cef_menu_model_t* self,
int command_id, int checked);
int(CEF_CALLBACK* set_checked)(struct _cef_menu_model_t* self,
int command_id,
int checked);
///
// Check the specified |index|. Only applies to check and radio items. Returns
// true (1) on success.
///
int (CEF_CALLBACK *set_checked_at)(struct _cef_menu_model_t* self, int index,
int checked);
int(CEF_CALLBACK* set_checked_at)(struct _cef_menu_model_t* self,
int index,
int checked);
///
// Returns true (1) if the specified |command_id| has a keyboard accelerator
// assigned.
///
int (CEF_CALLBACK *has_accelerator)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* has_accelerator)(struct _cef_menu_model_t* self,
int command_id);
///
// Returns true (1) if the specified |index| has a keyboard accelerator
// assigned.
///
int (CEF_CALLBACK *has_accelerator_at)(struct _cef_menu_model_t* self,
int index);
int(CEF_CALLBACK* has_accelerator_at)(struct _cef_menu_model_t* self,
int index);
///
// Set the keyboard accelerator for the specified |command_id|. |key_code| can
// be any virtual key or character value. Returns true (1) on success.
///
int (CEF_CALLBACK *set_accelerator)(struct _cef_menu_model_t* self,
int command_id, int key_code, int shift_pressed, int ctrl_pressed,
int alt_pressed);
int(CEF_CALLBACK* set_accelerator)(struct _cef_menu_model_t* self,
int command_id,
int key_code,
int shift_pressed,
int ctrl_pressed,
int alt_pressed);
///
// Set the keyboard accelerator at the specified |index|. |key_code| can be
// any virtual key or character value. Returns true (1) on success.
///
int (CEF_CALLBACK *set_accelerator_at)(struct _cef_menu_model_t* self,
int index, int key_code, int shift_pressed, int ctrl_pressed,
int alt_pressed);
int(CEF_CALLBACK* set_accelerator_at)(struct _cef_menu_model_t* self,
int index,
int key_code,
int shift_pressed,
int ctrl_pressed,
int alt_pressed);
///
// Remove the keyboard accelerator for the specified |command_id|. Returns
// true (1) on success.
///
int (CEF_CALLBACK *remove_accelerator)(struct _cef_menu_model_t* self,
int command_id);
int(CEF_CALLBACK* remove_accelerator)(struct _cef_menu_model_t* self,
int command_id);
///
// Remove the keyboard accelerator at the specified |index|. Returns true (1)
// on success.
///
int (CEF_CALLBACK *remove_accelerator_at)(struct _cef_menu_model_t* self,
int index);
int(CEF_CALLBACK* remove_accelerator_at)(struct _cef_menu_model_t* self,
int index);
///
// Retrieves the keyboard accelerator for the specified |command_id|. Returns
// true (1) on success.
///
int (CEF_CALLBACK *get_accelerator)(struct _cef_menu_model_t* self,
int command_id, int* key_code, int* shift_pressed, int* ctrl_pressed,
int* alt_pressed);
int(CEF_CALLBACK* get_accelerator)(struct _cef_menu_model_t* self,
int command_id,
int* key_code,
int* shift_pressed,
int* ctrl_pressed,
int* alt_pressed);
///
// Retrieves the keyboard accelerator for the specified |index|. Returns true
// (1) on success.
///
int (CEF_CALLBACK *get_accelerator_at)(struct _cef_menu_model_t* self,
int index, int* key_code, int* shift_pressed, int* ctrl_pressed,
int* alt_pressed);
int(CEF_CALLBACK* get_accelerator_at)(struct _cef_menu_model_t* self,
int index,
int* key_code,
int* shift_pressed,
int* ctrl_pressed,
int* alt_pressed);
///
// Set the explicit color for |command_id| and |color_type| to |color|.
@@ -391,8 +426,10 @@ typedef struct _cef_menu_model_t {
// color or default color is set for |color_type| then the system color will
// be used. Returns true (1) on success.
///
int (CEF_CALLBACK *set_color)(struct _cef_menu_model_t* self, int command_id,
cef_menu_color_type_t color_type, cef_color_t color);
int(CEF_CALLBACK* set_color)(struct _cef_menu_model_t* self,
int command_id,
cef_menu_color_type_t color_type,
cef_color_t color);
///
// Set the explicit color for |command_id| and |index| to |color|. Specify a
@@ -401,16 +438,20 @@ typedef struct _cef_menu_model_t {
// set. If no explicit color or default color is set for |color_type| then the
// system color will be used. Returns true (1) on success.
///
int (CEF_CALLBACK *set_color_at)(struct _cef_menu_model_t* self, int index,
cef_menu_color_type_t color_type, cef_color_t color);
int(CEF_CALLBACK* set_color_at)(struct _cef_menu_model_t* self,
int index,
cef_menu_color_type_t color_type,
cef_color_t color);
///
// Returns in |color| the color that was explicitly set for |command_id| and
// |color_type|. If a color was not set then 0 will be returned in |color|.
// Returns true (1) on success.
///
int (CEF_CALLBACK *get_color)(struct _cef_menu_model_t* self, int command_id,
cef_menu_color_type_t color_type, cef_color_t* color);
int(CEF_CALLBACK* get_color)(struct _cef_menu_model_t* self,
int command_id,
cef_menu_color_type_t color_type,
cef_color_t* color);
///
// Returns in |color| the color that was explicitly set for |command_id| and
@@ -418,8 +459,10 @@ typedef struct _cef_menu_model_t {
// |color|. If a color was not set then 0 will be returned in |color|. Returns
// true (1) on success.
///
int (CEF_CALLBACK *get_color_at)(struct _cef_menu_model_t* self, int index,
cef_menu_color_type_t color_type, cef_color_t* color);
int(CEF_CALLBACK* get_color_at)(struct _cef_menu_model_t* self,
int index,
cef_menu_color_type_t color_type,
cef_color_t* color);
///
// Sets the font list for the specified |command_id|. If |font_list| is NULL
@@ -433,8 +476,9 @@ typedef struct _cef_menu_model_t {
// Here are examples of valid font description strings: - "Arial, Helvetica,
// Bold Italic 14px" - "Arial, 14px"
///
int (CEF_CALLBACK *set_font_list)(struct _cef_menu_model_t* self,
int command_id, const cef_string_t* font_list);
int(CEF_CALLBACK* set_font_list)(struct _cef_menu_model_t* self,
int command_id,
const cef_string_t* font_list);
///
// Sets the font list for the specified |index|. Specify an |index| value of
@@ -449,18 +493,17 @@ typedef struct _cef_menu_model_t {
// Here are examples of valid font description strings: - "Arial, Helvetica,
// Bold Italic 14px" - "Arial, 14px"
///
int (CEF_CALLBACK *set_font_list_at)(struct _cef_menu_model_t* self,
int index, const cef_string_t* font_list);
int(CEF_CALLBACK* set_font_list_at)(struct _cef_menu_model_t* self,
int index,
const cef_string_t* font_list);
} cef_menu_model_t;
///
// Create a new MenuModel with the specified |delegate|.
///
CEF_EXPORT cef_menu_model_t* cef_menu_model_create(
struct _cef_menu_model_delegate_t* delegate);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=74f40f20f94ce3a6e7f3c879a3834a7108099ed4$
//
#ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
@@ -61,55 +63,59 @@ typedef struct _cef_menu_model_delegate_t {
// Perform the action associated with the specified |command_id| and optional
// |event_flags|.
///
void (CEF_CALLBACK *execute_command)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model, int command_id,
cef_event_flags_t event_flags);
void(CEF_CALLBACK* execute_command)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model,
int command_id,
cef_event_flags_t event_flags);
///
// Called when the user moves the mouse outside the menu and over the owning
// window.
///
void (CEF_CALLBACK *mouse_outside_menu)(
void(CEF_CALLBACK* mouse_outside_menu)(
struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point);
struct _cef_menu_model_t* menu_model,
const cef_point_t* screen_point);
///
// Called on unhandled open submenu keyboard commands. |is_rtl| will be true
// (1) if the menu is displaying a right-to-left language.
///
void (CEF_CALLBACK *unhandled_open_submenu)(
void(CEF_CALLBACK* unhandled_open_submenu)(
struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model, int is_rtl);
struct _cef_menu_model_t* menu_model,
int is_rtl);
///
// Called on unhandled close submenu keyboard commands. |is_rtl| will be true
// (1) if the menu is displaying a right-to-left language.
///
void (CEF_CALLBACK *unhandled_close_submenu)(
void(CEF_CALLBACK* unhandled_close_submenu)(
struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model, int is_rtl);
struct _cef_menu_model_t* menu_model,
int is_rtl);
///
// The menu is about to show.
///
void (CEF_CALLBACK *menu_will_show)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model);
void(CEF_CALLBACK* menu_will_show)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model);
///
// The menu has closed.
///
void (CEF_CALLBACK *menu_closed)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model);
void(CEF_CALLBACK* menu_closed)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model);
///
// Optionally modify a menu item label. Return true (1) if |label| was
// modified.
///
int (CEF_CALLBACK *format_label)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model, cef_string_t* label);
int(CEF_CALLBACK* format_label)(struct _cef_menu_model_delegate_t* self,
struct _cef_menu_model_t* menu_model,
cef_string_t* label);
} cef_menu_model_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a862d0004de2a1bdf4c214fe87278badd90562a7$
//
#ifndef CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Structure used to represent an entry in navigation history.
///
@@ -59,55 +60,55 @@ typedef struct _cef_navigation_entry_t {
// Returns true (1) if this object is valid. Do not call any other functions
// if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_navigation_entry_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_navigation_entry_t* self);
///
// Returns the actual URL of the page. For some pages this may be data: URL or
// similar. Use get_display_url() to return a display-friendly version.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_url)(
cef_string_userfree_t(CEF_CALLBACK* get_url)(
struct _cef_navigation_entry_t* self);
///
// Returns a display-friendly version of the URL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_display_url)(
cef_string_userfree_t(CEF_CALLBACK* get_display_url)(
struct _cef_navigation_entry_t* self);
///
// Returns the original URL that was entered by the user before any redirects.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_original_url)(
cef_string_userfree_t(CEF_CALLBACK* get_original_url)(
struct _cef_navigation_entry_t* self);
///
// Returns the title set by the page. This value may be NULL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_title)(
cef_string_userfree_t(CEF_CALLBACK* get_title)(
struct _cef_navigation_entry_t* self);
///
// Returns the transition type which indicates what the user did to move to
// this page from the previous page.
///
cef_transition_type_t (CEF_CALLBACK *get_transition_type)(
cef_transition_type_t(CEF_CALLBACK* get_transition_type)(
struct _cef_navigation_entry_t* self);
///
// Returns true (1) if this navigation includes post data.
///
int (CEF_CALLBACK *has_post_data)(struct _cef_navigation_entry_t* self);
int(CEF_CALLBACK* has_post_data)(struct _cef_navigation_entry_t* self);
///
// Returns the time for the last known successful navigation completion. A
// navigation may be completed more than once if the page is reloaded. May be
// 0 if the navigation has not yet completed.
///
cef_time_t (CEF_CALLBACK *get_completion_time)(
cef_time_t(CEF_CALLBACK* get_completion_time)(
struct _cef_navigation_entry_t* self);
///
@@ -115,17 +116,15 @@ typedef struct _cef_navigation_entry_t {
// response. May be 0 if the response has not yet been received or if the
// navigation has not yet completed.
///
int (CEF_CALLBACK *get_http_status_code)(
struct _cef_navigation_entry_t* self);
int(CEF_CALLBACK* get_http_status_code)(struct _cef_navigation_entry_t* self);
///
// Returns the SSL information for this navigation entry.
///
struct _cef_sslstatus_t* (CEF_CALLBACK *get_sslstatus)(
struct _cef_sslstatus_t*(CEF_CALLBACK* get_sslstatus)(
struct _cef_navigation_entry_t* self);
} cef_navigation_entry_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2e5afff3277384ea9f3f74ef509c018f6d307dc4$
//
#ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Add an entry to the cross-origin access whitelist.
//
@@ -82,16 +83,20 @@ extern "C" {
// |source_origin| is invalid or the whitelist cannot be accessed.
///
CEF_EXPORT int cef_add_cross_origin_whitelist_entry(
const cef_string_t* source_origin, const cef_string_t* target_protocol,
const cef_string_t* target_domain, int allow_target_subdomains);
const cef_string_t* source_origin,
const cef_string_t* target_protocol,
const cef_string_t* target_domain,
int allow_target_subdomains);
///
// Remove an entry from the cross-origin access whitelist. Returns false (0) if
// |source_origin| is invalid or the whitelist cannot be accessed.
///
CEF_EXPORT int cef_remove_cross_origin_whitelist_entry(
const cef_string_t* source_origin, const cef_string_t* target_protocol,
const cef_string_t* target_domain, int allow_target_subdomains);
const cef_string_t* source_origin,
const cef_string_t* target_protocol,
const cef_string_t* target_domain,
int allow_target_subdomains);
///
// Remove all entries from the cross-origin access whitelist. Returns false (0)

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d2f01fbfc3ae72a86c03399606088054b3a9337f$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
@@ -44,13 +46,12 @@
extern "C" {
#endif
///
// Parse the specified |url| into its component parts. Returns false (0) if the
// URL is NULL or invalid.
///
CEF_EXPORT int cef_parse_url(const cef_string_t* url,
struct _cef_urlparts_t* parts);
struct _cef_urlparts_t* parts);
///
// Creates a URL from the specified |parts|, which must contain a non-NULL spec
@@ -58,7 +59,7 @@ CEF_EXPORT int cef_parse_url(const cef_string_t* url,
// if |parts| isn't initialized as described.
///
CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
cef_string_t* url);
cef_string_t* url);
///
// This is a convenience function for formatting a URL in a concise and human-
@@ -71,16 +72,16 @@ CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
// for URLs which will be parsed or sent to other applications.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_format_url_for_security_display(
const cef_string_t* origin_url);
CEF_EXPORT cef_string_userfree_t
cef_format_url_for_security_display(const cef_string_t* origin_url);
///
// Returns the mime type for the specified file extension or an NULL string if
// unknown.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_get_mime_type(
const cef_string_t* extension);
CEF_EXPORT cef_string_userfree_t
cef_get_mime_type(const cef_string_t* extension);
///
// Get the extensions associated with the given mime type. This should be passed
@@ -89,14 +90,14 @@ CEF_EXPORT cef_string_userfree_t cef_get_mime_type(
// elements in the provided vector will not be erased.
///
CEF_EXPORT void cef_get_extensions_for_mime_type(const cef_string_t* mime_type,
cef_string_list_t extensions);
cef_string_list_t extensions);
///
// Encodes |data| as a base64 string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_base64encode(const void* data,
size_t data_size);
size_t data_size);
///
// Decodes the base64 encoded string |data|. The returned value will be NULL if
@@ -113,7 +114,7 @@ CEF_EXPORT struct _cef_binary_value_t* cef_base64decode(
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
int use_plus);
int use_plus);
///
// Unescapes |text| and returns the result. Unescaping consists of looking for
@@ -126,14 +127,17 @@ CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
// supports further customization the decoding process.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);
CEF_EXPORT cef_string_userfree_t
cef_uridecode(const cef_string_t* text,
int convert_to_utf8,
cef_uri_unescape_rule_t unescape_rule);
///
// Parses the specified |json_string| and returns a dictionary or list
// representation. If JSON parsing fails this function returns NULL.
///
CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
CEF_EXPORT struct _cef_value_t* cef_parse_json(
const cef_string_t* json_string,
cef_json_parser_options_t options);
///
@@ -143,8 +147,10 @@ CEF_EXPORT struct _cef_value_t* cef_parse_json(const cef_string_t* json_string,
// formatted error message respectively.
///
CEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error(
const cef_string_t* json_string, cef_json_parser_options_t options,
cef_json_parser_error_t* error_code_out, cef_string_t* error_msg_out);
const cef_string_t* json_string,
cef_json_parser_options_t options,
cef_json_parser_error_t* error_code_out,
cef_string_t* error_msg_out);
///
// Generates a JSON string from the specified root |node| which should be a
@@ -152,8 +158,8 @@ CEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error(
// requires exclusive access to |node| including any underlying data.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_write_json(struct _cef_value_t* node,
cef_json_writer_options_t options);
CEF_EXPORT cef_string_userfree_t
cef_write_json(struct _cef_value_t* node, cef_json_writer_options_t options);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=fbb817705137a12b4718950ff696396c30057007$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Retrieve the path associated with the specified |key|. Returns true (1) on
// success. Can be called on any thread in the browser process.

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=e8f6bdc822cf4f5c32b22ba8b5cacb25823d8971$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Callback structure for asynchronous continuation of print dialog requests.
///
@@ -59,16 +60,15 @@ typedef struct _cef_print_dialog_callback_t {
///
// Continue printing with the specified |settings|.
///
void (CEF_CALLBACK *cont)(struct _cef_print_dialog_callback_t* self,
struct _cef_print_settings_t* settings);
void(CEF_CALLBACK* cont)(struct _cef_print_dialog_callback_t* self,
struct _cef_print_settings_t* settings);
///
// Cancel the printing.
///
void (CEF_CALLBACK *cancel)(struct _cef_print_dialog_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_print_dialog_callback_t* self);
} cef_print_dialog_callback_t;
///
// Callback structure for asynchronous continuation of print job requests.
///
@@ -81,10 +81,9 @@ typedef struct _cef_print_job_callback_t {
///
// Indicate completion of the print job.
///
void (CEF_CALLBACK *cont)(struct _cef_print_job_callback_t* self);
void(CEF_CALLBACK* cont)(struct _cef_print_job_callback_t* self);
} cef_print_job_callback_t;
///
// Implement this structure to handle printing on Linux. The functions of this
// structure will be called on the browser process UI thread.
@@ -101,48 +100,52 @@ typedef struct _cef_print_handler_t {
// how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript
// window.print() or PDF extension print button).
///
void (CEF_CALLBACK *on_print_start)(struct _cef_print_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_print_start)(struct _cef_print_handler_t* self,
struct _cef_browser_t* browser);
///
// Synchronize |settings| with client state. If |get_defaults| is true (1)
// then populate |settings| with the default print settings. Do not keep a
// reference to |settings| outside of this callback.
///
void (CEF_CALLBACK *on_print_settings)(struct _cef_print_handler_t* self,
struct _cef_print_settings_t* settings, int get_defaults);
void(CEF_CALLBACK* on_print_settings)(struct _cef_print_handler_t* self,
struct _cef_print_settings_t* settings,
int get_defaults);
///
// Show the print dialog. Execute |callback| once the dialog is dismissed.
// Return true (1) if the dialog will be displayed or false (0) to cancel the
// printing immediately.
///
int (CEF_CALLBACK *on_print_dialog)(struct _cef_print_handler_t* self,
int has_selection, struct _cef_print_dialog_callback_t* callback);
int(CEF_CALLBACK* on_print_dialog)(
struct _cef_print_handler_t* self,
int has_selection,
struct _cef_print_dialog_callback_t* callback);
///
// Send the print job to the printer. Execute |callback| once the job is
// completed. Return true (1) if the job will proceed or false (0) to cancel
// the job immediately.
///
int (CEF_CALLBACK *on_print_job)(struct _cef_print_handler_t* self,
const cef_string_t* document_name, const cef_string_t* pdf_file_path,
struct _cef_print_job_callback_t* callback);
int(CEF_CALLBACK* on_print_job)(struct _cef_print_handler_t* self,
const cef_string_t* document_name,
const cef_string_t* pdf_file_path,
struct _cef_print_job_callback_t* callback);
///
// Reset client state related to printing.
///
void (CEF_CALLBACK *on_print_reset)(struct _cef_print_handler_t* self);
void(CEF_CALLBACK* on_print_reset)(struct _cef_print_handler_t* self);
///
// Return the PDF paper size in device units. Used in combination with
// cef_browser_host_t::print_to_pdf().
///
cef_size_t (CEF_CALLBACK *get_pdf_paper_size)(
struct _cef_print_handler_t* self, int device_units_per_inch);
cef_size_t(CEF_CALLBACK* get_pdf_paper_size)(
struct _cef_print_handler_t* self,
int device_units_per_inch);
} cef_print_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=5b26ebd2d8e1e65a25fa0c08317b8994887c0498$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure representing print settings.
///
@@ -58,37 +59,37 @@ typedef struct _cef_print_settings_t {
// Returns true (1) if this object is valid. Do not call any other functions
// if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_print_settings_t* self);
///
// Returns true (1) if the values of this object are read-only. Some APIs may
// expose read-only objects.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_print_settings_t* self);
///
// Returns a writable copy of this object.
///
struct _cef_print_settings_t* (CEF_CALLBACK *copy)(
struct _cef_print_settings_t*(CEF_CALLBACK* copy)(
struct _cef_print_settings_t* self);
///
// Set the page orientation.
///
void (CEF_CALLBACK *set_orientation)(struct _cef_print_settings_t* self,
int landscape);
void(CEF_CALLBACK* set_orientation)(struct _cef_print_settings_t* self,
int landscape);
///
// Returns true (1) if the orientation is landscape.
///
int (CEF_CALLBACK *is_landscape)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* is_landscape)(struct _cef_print_settings_t* self);
///
// Set the printer printable area in device units. Some platforms already
// provide flipped area. Set |landscape_needs_flip| to false (0) on those
// platforms to avoid double flipping.
///
void (CEF_CALLBACK *set_printer_printable_area)(
void(CEF_CALLBACK* set_printer_printable_area)(
struct _cef_print_settings_t* self,
const cef_size_t* physical_size_device_units,
const cef_rect_t* printable_area_device_units,
@@ -97,109 +98,109 @@ typedef struct _cef_print_settings_t {
///
// Set the device name.
///
void (CEF_CALLBACK *set_device_name)(struct _cef_print_settings_t* self,
const cef_string_t* name);
void(CEF_CALLBACK* set_device_name)(struct _cef_print_settings_t* self,
const cef_string_t* name);
///
// Get the device name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_device_name)(
cef_string_userfree_t(CEF_CALLBACK* get_device_name)(
struct _cef_print_settings_t* self);
///
// Set the DPI (dots per inch).
///
void (CEF_CALLBACK *set_dpi)(struct _cef_print_settings_t* self, int dpi);
void(CEF_CALLBACK* set_dpi)(struct _cef_print_settings_t* self, int dpi);
///
// Get the DPI (dots per inch).
///
int (CEF_CALLBACK *get_dpi)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* get_dpi)(struct _cef_print_settings_t* self);
///
// Set the page ranges.
///
void (CEF_CALLBACK *set_page_ranges)(struct _cef_print_settings_t* self,
size_t rangesCount, cef_range_t const* ranges);
void(CEF_CALLBACK* set_page_ranges)(struct _cef_print_settings_t* self,
size_t rangesCount,
cef_range_t const* ranges);
///
// Returns the number of page ranges that currently exist.
///
size_t (CEF_CALLBACK *get_page_ranges_count)(
size_t(CEF_CALLBACK* get_page_ranges_count)(
struct _cef_print_settings_t* self);
///
// Retrieve the page ranges.
///
void (CEF_CALLBACK *get_page_ranges)(struct _cef_print_settings_t* self,
size_t* rangesCount, cef_range_t* ranges);
void(CEF_CALLBACK* get_page_ranges)(struct _cef_print_settings_t* self,
size_t* rangesCount,
cef_range_t* ranges);
///
// Set whether only the selection will be printed.
///
void (CEF_CALLBACK *set_selection_only)(struct _cef_print_settings_t* self,
int selection_only);
void(CEF_CALLBACK* set_selection_only)(struct _cef_print_settings_t* self,
int selection_only);
///
// Returns true (1) if only the selection will be printed.
///
int (CEF_CALLBACK *is_selection_only)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* is_selection_only)(struct _cef_print_settings_t* self);
///
// Set whether pages will be collated.
///
void (CEF_CALLBACK *set_collate)(struct _cef_print_settings_t* self,
int collate);
void(CEF_CALLBACK* set_collate)(struct _cef_print_settings_t* self,
int collate);
///
// Returns true (1) if pages will be collated.
///
int (CEF_CALLBACK *will_collate)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* will_collate)(struct _cef_print_settings_t* self);
///
// Set the color model.
///
void (CEF_CALLBACK *set_color_model)(struct _cef_print_settings_t* self,
cef_color_model_t model);
void(CEF_CALLBACK* set_color_model)(struct _cef_print_settings_t* self,
cef_color_model_t model);
///
// Get the color model.
///
cef_color_model_t (CEF_CALLBACK *get_color_model)(
cef_color_model_t(CEF_CALLBACK* get_color_model)(
struct _cef_print_settings_t* self);
///
// Set the number of copies.
///
void (CEF_CALLBACK *set_copies)(struct _cef_print_settings_t* self,
int copies);
void(CEF_CALLBACK* set_copies)(struct _cef_print_settings_t* self,
int copies);
///
// Get the number of copies.
///
int (CEF_CALLBACK *get_copies)(struct _cef_print_settings_t* self);
int(CEF_CALLBACK* get_copies)(struct _cef_print_settings_t* self);
///
// Set the duplex mode.
///
void (CEF_CALLBACK *set_duplex_mode)(struct _cef_print_settings_t* self,
cef_duplex_mode_t mode);
void(CEF_CALLBACK* set_duplex_mode)(struct _cef_print_settings_t* self,
cef_duplex_mode_t mode);
///
// Get the duplex mode.
///
cef_duplex_mode_t (CEF_CALLBACK *get_duplex_mode)(
cef_duplex_mode_t(CEF_CALLBACK* get_duplex_mode)(
struct _cef_print_settings_t* self);
} cef_print_settings_t;
///
// Create a new cef_print_settings_t object.
///
CEF_EXPORT cef_print_settings_t* cef_print_settings_create();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c2ee22474637f9aed7673670fb10c960ae621535$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Structure representing a message. Can be used on any process and thread.
///
@@ -59,42 +60,40 @@ typedef struct _cef_process_message_t {
// Returns true (1) if this object is valid. Do not call any other functions
// if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_process_message_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_process_message_t* self);
///
// Returns true (1) if the values of this object are read-only. Some APIs may
// expose read-only objects.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_process_message_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_process_message_t* self);
///
// Returns a writable copy of this object.
///
struct _cef_process_message_t* (CEF_CALLBACK *copy)(
struct _cef_process_message_t*(CEF_CALLBACK* copy)(
struct _cef_process_message_t* self);
///
// Returns the message name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_name)(
cef_string_userfree_t(CEF_CALLBACK* get_name)(
struct _cef_process_message_t* self);
///
// Returns the list of arguments.
///
struct _cef_list_value_t* (CEF_CALLBACK *get_argument_list)(
struct _cef_list_value_t*(CEF_CALLBACK* get_argument_list)(
struct _cef_process_message_t* self);
} cef_process_message_t;
///
// Create a new cef_process_message_t object with the specified name.
///
CEF_EXPORT cef_process_message_t* cef_process_message_create(
const cef_string_t* name);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=aad07da2d500b8d31e02a75331bdb68f16d4c662$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Launches the process specified via |command_line|. Returns true (1) upon
// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=5d20fc88dea8dad8691f05bfb7e8c1ce5cf2bbc1$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
@@ -47,7 +49,6 @@
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.
@@ -62,31 +63,35 @@ typedef struct _cef_render_handler_t {
// Return the handler for accessibility notifications. If no handler is
// provided the default implementation will be used.
///
struct _cef_accessibility_handler_t* (
CEF_CALLBACK *get_accessibility_handler)(
struct _cef_accessibility_handler_t*(CEF_CALLBACK* get_accessibility_handler)(
struct _cef_render_handler_t* self);
///
// Called to retrieve the root window rectangle in screen coordinates. Return
// true (1) if the rectangle was provided.
///
int (CEF_CALLBACK *get_root_screen_rect)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_rect_t* rect);
int(CEF_CALLBACK* get_root_screen_rect)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
cef_rect_t* rect);
///
// Called to retrieve the view rectangle which is relative to screen
// coordinates. Return true (1) if the rectangle was provided.
///
int (CEF_CALLBACK *get_view_rect)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_rect_t* rect);
int(CEF_CALLBACK* get_view_rect)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
cef_rect_t* rect);
///
// Called to retrieve the translation from view coordinates to actual screen
// coordinates. Return true (1) if the screen coordinates were provided.
///
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);
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);
///
// Called to allow the client to fill in the CefScreenInfo object with
@@ -97,22 +102,25 @@ typedef struct _cef_render_handler_t {
// will be used. If the rectangle is still NULL or invalid popups may not be
// drawn correctly.
///
int (CEF_CALLBACK *get_screen_info)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, struct _cef_screen_info_t* screen_info);
int(CEF_CALLBACK* get_screen_info)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_screen_info_t* screen_info);
///
// 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).
///
void (CEF_CALLBACK *on_popup_show)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, int show);
void(CEF_CALLBACK* on_popup_show)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
int show);
///
// Called when the browser wants to move or resize the popup widget. |rect|
// contains the new location and size in view coordinates.
///
void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, const cef_rect_t* rect);
void(CEF_CALLBACK* on_popup_size)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
const cef_rect_t* rect);
///
// Called when an element should be painted. Pixel values passed to this
@@ -124,17 +132,23 @@ typedef struct _cef_render_handler_t {
// be |width|*|height|*4 bytes in size and represents a BGRA image with an
// upper-left origin.
///
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);
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);
///
// 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.
///
void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_cursor_handle_t cursor,
void(CEF_CALLBACK* on_cursor_change)(
struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info);
@@ -152,37 +166,44 @@ typedef struct _cef_render_handler_t {
// synchronously or asynchronously to inform the web view that the drag
// operation has ended.
///
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);
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);
///
// 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).
///
void (CEF_CALLBACK *update_drag_cursor)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_drag_operations_mask_t operation);
void(CEF_CALLBACK* update_drag_cursor)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
cef_drag_operations_mask_t operation);
///
// Called when the scroll offset has changed.
///
void (CEF_CALLBACK *on_scroll_offset_changed)(
struct _cef_render_handler_t* self, struct _cef_browser_t* browser,
double x, double y);
void(CEF_CALLBACK* on_scroll_offset_changed)(
struct _cef_render_handler_t* self,
struct _cef_browser_t* browser,
double x,
double y);
///
// 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.
///
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,
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,
cef_rect_t const* character_bounds);
} cef_render_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=04ddf8c8cc5e09610a6cd6dbee96194eb6567b41$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_
@@ -51,7 +53,6 @@
extern "C" {
#endif
///
// Structure used to implement render process callbacks. The functions of this
// structure will be called on the render process main thread (TID_RENDERER)
@@ -69,14 +70,14 @@ typedef struct _cef_render_process_handler_t {
// cef_browser_process_handler_t::on_render_process_thread_created(). Do not
// keep a reference to |extra_info| outside of this function.
///
void (CEF_CALLBACK *on_render_thread_created)(
void(CEF_CALLBACK* on_render_thread_created)(
struct _cef_render_process_handler_t* self,
struct _cef_list_value_t* extra_info);
///
// Called after WebKit has been initialized.
///
void (CEF_CALLBACK *on_web_kit_initialized)(
void(CEF_CALLBACK* on_web_kit_initialized)(
struct _cef_render_process_handler_t* self);
///
@@ -84,21 +85,21 @@ typedef struct _cef_render_process_handler_t {
// browser will be created before the old browser with the same identifier is
// destroyed.
///
void (CEF_CALLBACK *on_browser_created)(
void(CEF_CALLBACK* on_browser_created)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser);
///
// Called before a browser is destroyed.
///
void (CEF_CALLBACK *on_browser_destroyed)(
void(CEF_CALLBACK* on_browser_destroyed)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser);
///
// Return the handler for browser load status events.
///
struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
struct _cef_load_handler_t*(CEF_CALLBACK* get_load_handler)(
struct _cef_render_process_handler_t* self);
///
@@ -106,10 +107,12 @@ typedef struct _cef_render_process_handler_t {
// or false (0) to allow the navigation to proceed. The |request| object
// cannot be modified in this callback.
///
int (CEF_CALLBACK *on_before_navigation)(
int(CEF_CALLBACK* on_before_navigation)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, cef_navigation_type_t navigation_type,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
cef_navigation_type_t navigation_type,
int is_redirect);
///
@@ -120,18 +123,20 @@ typedef struct _cef_render_process_handler_t {
// on the associated thread can be retrieved via the
// cef_v8context_t::get_task_runner() function.
///
void (CEF_CALLBACK *on_context_created)(
void(CEF_CALLBACK* on_context_created)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_v8context_t* context);
///
// Called immediately before the V8 context for a frame is released. No
// references to the context should be kept after this function is called.
///
void (CEF_CALLBACK *on_context_released)(
void(CEF_CALLBACK* on_context_released)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_v8context_t* context);
///
@@ -139,10 +144,12 @@ typedef struct _cef_render_process_handler_t {
// callback is disabled by default. To enable set
// CefSettings.uncaught_exception_stack_size > 0.
///
void (CEF_CALLBACK *on_uncaught_exception)(
void(CEF_CALLBACK* on_uncaught_exception)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_v8context_t* context, struct _cef_v8exception_t* exception,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_v8context_t* context,
struct _cef_v8exception_t* exception,
struct _cef_v8stack_trace_t* stackTrace);
///
@@ -153,9 +160,10 @@ typedef struct _cef_render_process_handler_t {
// keep references to or attempt to access any DOM objects outside the scope
// of this function.
///
void (CEF_CALLBACK *on_focused_node_changed)(
void(CEF_CALLBACK* on_focused_node_changed)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_domnode_t* node);
///
@@ -163,13 +171,13 @@ typedef struct _cef_render_process_handler_t {
// (1) if the message was handled or false (0) otherwise. Do not keep a
// reference to or attempt to access the message outside of this callback.
///
int (CEF_CALLBACK *on_process_message_received)(
int(CEF_CALLBACK* on_process_message_received)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, cef_process_id_t source_process,
struct _cef_browser_t* browser,
cef_process_id_t source_process,
struct _cef_process_message_t* message);
} cef_render_process_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=e4d28f171862beea61f00e46d7acb8ee4154b077$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
@@ -60,118 +62,121 @@ typedef struct _cef_request_t {
///
// Returns true (1) if this object is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_request_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_request_t* self);
///
// Get the fully qualified URL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_request_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_url)(struct _cef_request_t* self);
///
// Set the fully qualified URL.
///
void (CEF_CALLBACK *set_url)(struct _cef_request_t* self,
const cef_string_t* url);
void(CEF_CALLBACK* set_url)(struct _cef_request_t* self,
const cef_string_t* url);
///
// Get the request function type. The value will default to POST if post data
// is provided and GET otherwise.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_method)(struct _cef_request_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_method)(struct _cef_request_t* self);
///
// Set the request function type.
///
void (CEF_CALLBACK *set_method)(struct _cef_request_t* self,
const cef_string_t* method);
void(CEF_CALLBACK* set_method)(struct _cef_request_t* self,
const cef_string_t* method);
///
// Set the referrer URL and policy. If non-NULL the referrer URL must be fully
// qualified with an HTTP or HTTPS scheme component. Any username, password or
// ref component will be removed.
///
void (CEF_CALLBACK *set_referrer)(struct _cef_request_t* self,
const cef_string_t* referrer_url, cef_referrer_policy_t policy);
void(CEF_CALLBACK* set_referrer)(struct _cef_request_t* self,
const cef_string_t* referrer_url,
cef_referrer_policy_t policy);
///
// Get the referrer URL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_referrer_url)(
cef_string_userfree_t(CEF_CALLBACK* get_referrer_url)(
struct _cef_request_t* self);
///
// Get the referrer policy.
///
cef_referrer_policy_t (CEF_CALLBACK *get_referrer_policy)(
cef_referrer_policy_t(CEF_CALLBACK* get_referrer_policy)(
struct _cef_request_t* self);
///
// Get the post data.
///
struct _cef_post_data_t* (CEF_CALLBACK *get_post_data)(
struct _cef_post_data_t*(CEF_CALLBACK* get_post_data)(
struct _cef_request_t* self);
///
// Set the post data.
///
void (CEF_CALLBACK *set_post_data)(struct _cef_request_t* self,
struct _cef_post_data_t* postData);
void(CEF_CALLBACK* set_post_data)(struct _cef_request_t* self,
struct _cef_post_data_t* postData);
///
// Get the header values. Will not include the Referer value if any.
///
void (CEF_CALLBACK *get_header_map)(struct _cef_request_t* self,
cef_string_multimap_t headerMap);
void(CEF_CALLBACK* get_header_map)(struct _cef_request_t* self,
cef_string_multimap_t headerMap);
///
// Set the header values. If a Referer value exists in the header map it will
// be removed and ignored.
///
void (CEF_CALLBACK *set_header_map)(struct _cef_request_t* self,
cef_string_multimap_t headerMap);
void(CEF_CALLBACK* set_header_map)(struct _cef_request_t* self,
cef_string_multimap_t headerMap);
///
// Set all values at one time.
///
void (CEF_CALLBACK *set)(struct _cef_request_t* self, const cef_string_t* url,
const cef_string_t* method, struct _cef_post_data_t* postData,
cef_string_multimap_t headerMap);
void(CEF_CALLBACK* set)(struct _cef_request_t* self,
const cef_string_t* url,
const cef_string_t* method,
struct _cef_post_data_t* postData,
cef_string_multimap_t headerMap);
///
// Get the flags used in combination with cef_urlrequest_t. See
// cef_urlrequest_flags_t for supported values.
///
int (CEF_CALLBACK *get_flags)(struct _cef_request_t* self);
int(CEF_CALLBACK* get_flags)(struct _cef_request_t* self);
///
// Set the flags used in combination with cef_urlrequest_t. See
// cef_urlrequest_flags_t for supported values.
///
void (CEF_CALLBACK *set_flags)(struct _cef_request_t* self, int flags);
void(CEF_CALLBACK* set_flags)(struct _cef_request_t* self, int flags);
///
// Set the URL to the first party for cookies used in combination with
// cef_urlrequest_t.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_first_party_for_cookies)(
cef_string_userfree_t(CEF_CALLBACK* get_first_party_for_cookies)(
struct _cef_request_t* self);
///
// Get the URL to the first party for cookies used in combination with
// cef_urlrequest_t.
///
void (CEF_CALLBACK *set_first_party_for_cookies)(struct _cef_request_t* self,
const cef_string_t* url);
void(CEF_CALLBACK* set_first_party_for_cookies)(struct _cef_request_t* self,
const cef_string_t* url);
///
// Get the resource type for this request. Only available in the browser
// process.
///
cef_resource_type_t (CEF_CALLBACK *get_resource_type)(
cef_resource_type_t(CEF_CALLBACK* get_resource_type)(
struct _cef_request_t* self);
///
@@ -179,7 +184,7 @@ typedef struct _cef_request_t {
// process and only applies to requests that represent a main frame or sub-
// frame navigation.
///
cef_transition_type_t (CEF_CALLBACK *get_transition_type)(
cef_transition_type_t(CEF_CALLBACK* get_transition_type)(
struct _cef_request_t* self);
///
@@ -187,16 +192,14 @@ typedef struct _cef_request_t {
// specified. Can be used by cef_request_tHandler implementations in the
// browser process to track a single request across multiple callbacks.
///
uint64 (CEF_CALLBACK *get_identifier)(struct _cef_request_t* self);
uint64(CEF_CALLBACK* get_identifier)(struct _cef_request_t* self);
} cef_request_t;
///
// Create a new cef_request_t object.
///
CEF_EXPORT cef_request_t* cef_request_create();
///
// Structure used to represent post data for a web request. The functions of
// this structure may be called on any thread.
@@ -210,7 +213,7 @@ typedef struct _cef_post_data_t {
///
// Returns true (1) if this object is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_post_data_t* self);
///
// Returns true (1) if the underlying POST data includes elements that are not
@@ -218,45 +221,44 @@ typedef struct _cef_post_data_t {
// upload data). Modifying cef_post_data_t objects with excluded elements may
// result in the request failing.
///
int (CEF_CALLBACK *has_excluded_elements)(struct _cef_post_data_t* self);
int(CEF_CALLBACK* has_excluded_elements)(struct _cef_post_data_t* self);
///
// Returns the number of existing post data elements.
///
size_t (CEF_CALLBACK *get_element_count)(struct _cef_post_data_t* self);
size_t(CEF_CALLBACK* get_element_count)(struct _cef_post_data_t* self);
///
// Retrieve the post data elements.
///
void (CEF_CALLBACK *get_elements)(struct _cef_post_data_t* self,
size_t* elementsCount, struct _cef_post_data_element_t** elements);
void(CEF_CALLBACK* get_elements)(struct _cef_post_data_t* self,
size_t* elementsCount,
struct _cef_post_data_element_t** elements);
///
// Remove the specified post data element. Returns true (1) if the removal
// succeeds.
///
int (CEF_CALLBACK *remove_element)(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element);
int(CEF_CALLBACK* remove_element)(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element);
///
// Add the specified post data element. Returns true (1) if the add succeeds.
///
int (CEF_CALLBACK *add_element)(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element);
int(CEF_CALLBACK* add_element)(struct _cef_post_data_t* self,
struct _cef_post_data_element_t* element);
///
// Remove all existing post data elements.
///
void (CEF_CALLBACK *remove_elements)(struct _cef_post_data_t* self);
void(CEF_CALLBACK* remove_elements)(struct _cef_post_data_t* self);
} cef_post_data_t;
///
// Create a new cef_post_data_t object.
///
CEF_EXPORT cef_post_data_t* cef_post_data_create();
///
// Structure used to represent a single element in the request post data. The
// functions of this structure may be called on any thread.
@@ -270,59 +272,59 @@ typedef struct _cef_post_data_element_t {
///
// Returns true (1) if this object is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_post_data_element_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_post_data_element_t* self);
///
// Remove all contents from the post data element.
///
void (CEF_CALLBACK *set_to_empty)(struct _cef_post_data_element_t* self);
void(CEF_CALLBACK* set_to_empty)(struct _cef_post_data_element_t* self);
///
// The post data element will represent a file.
///
void (CEF_CALLBACK *set_to_file)(struct _cef_post_data_element_t* self,
const cef_string_t* fileName);
void(CEF_CALLBACK* set_to_file)(struct _cef_post_data_element_t* self,
const cef_string_t* fileName);
///
// The post data element will represent bytes. The bytes passed in will be
// copied.
///
void (CEF_CALLBACK *set_to_bytes)(struct _cef_post_data_element_t* self,
size_t size, const void* bytes);
void(CEF_CALLBACK* set_to_bytes)(struct _cef_post_data_element_t* self,
size_t size,
const void* bytes);
///
// Return the type of this post data element.
///
cef_postdataelement_type_t (CEF_CALLBACK *get_type)(
cef_postdataelement_type_t(CEF_CALLBACK* get_type)(
struct _cef_post_data_element_t* self);
///
// Return the file name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_file)(
cef_string_userfree_t(CEF_CALLBACK* get_file)(
struct _cef_post_data_element_t* self);
///
// Return the number of bytes.
///
size_t (CEF_CALLBACK *get_bytes_count)(struct _cef_post_data_element_t* self);
size_t(CEF_CALLBACK* get_bytes_count)(struct _cef_post_data_element_t* self);
///
// Read up to |size| bytes into |bytes| and return the number of bytes
// actually read.
///
size_t (CEF_CALLBACK *get_bytes)(struct _cef_post_data_element_t* self,
size_t size, void* bytes);
size_t(CEF_CALLBACK* get_bytes)(struct _cef_post_data_element_t* self,
size_t size,
void* bytes);
} cef_post_data_element_t;
///
// Create a new cef_post_data_element_t object.
///
CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=791231acc78a2b601257fb0b86d904eace796d63$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
@@ -63,12 +65,11 @@ typedef struct _cef_resolve_callback_t {
// result code. |resolved_ips| will be the list of resolved IP addresses or
// NULL if the resolution failed.
///
void (CEF_CALLBACK *on_resolve_completed)(
struct _cef_resolve_callback_t* self, cef_errorcode_t result,
cef_string_list_t resolved_ips);
void(CEF_CALLBACK* on_resolve_completed)(struct _cef_resolve_callback_t* self,
cef_errorcode_t result,
cef_string_list_t resolved_ips);
} cef_resolve_callback_t;
///
// A request context provides request handling for a set of related browser or
// URL request objects. A request context can be specified when creating a new
@@ -95,27 +96,27 @@ typedef struct _cef_request_context_t {
// Returns true (1) if this object is pointing to the same context as |that|
// object.
///
int (CEF_CALLBACK *is_same)(struct _cef_request_context_t* self,
struct _cef_request_context_t* other);
int(CEF_CALLBACK* is_same)(struct _cef_request_context_t* self,
struct _cef_request_context_t* other);
///
// Returns true (1) if this object is sharing the same storage as |that|
// object.
///
int (CEF_CALLBACK *is_sharing_with)(struct _cef_request_context_t* self,
struct _cef_request_context_t* other);
int(CEF_CALLBACK* is_sharing_with)(struct _cef_request_context_t* self,
struct _cef_request_context_t* other);
///
// Returns true (1) if this object is the global context. The global context
// is used by default when creating a browser or URL request with a NULL
// context argument.
///
int (CEF_CALLBACK *is_global)(struct _cef_request_context_t* self);
int(CEF_CALLBACK* is_global)(struct _cef_request_context_t* self);
///
// Returns the handler for this context if any.
///
struct _cef_request_context_handler_t* (CEF_CALLBACK *get_handler)(
struct _cef_request_context_handler_t*(CEF_CALLBACK* get_handler)(
struct _cef_request_context_t* self);
///
@@ -123,7 +124,7 @@ typedef struct _cef_request_context_t {
// memory cache is being used.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_cache_path)(
cef_string_userfree_t(CEF_CALLBACK* get_cache_path)(
struct _cef_request_context_t* self);
///
@@ -134,7 +135,7 @@ typedef struct _cef_request_context_t {
// If |callback| is non-NULL it will be executed asnychronously on the IO
// thread after the manager's storage has been initialized.
///
struct _cef_cookie_manager_t* (CEF_CALLBACK *get_default_cookie_manager)(
struct _cef_cookie_manager_t*(CEF_CALLBACK* get_default_cookie_manager)(
struct _cef_request_context_t* self,
struct _cef_completion_callback_t* callback);
@@ -151,8 +152,9 @@ typedef struct _cef_request_context_t {
// optional |domain_name|. Returns false (0) if an error occurs. This function
// may be called on any thread in the browser process.
///
int (CEF_CALLBACK *register_scheme_handler_factory)(
struct _cef_request_context_t* self, const cef_string_t* scheme_name,
int(CEF_CALLBACK* register_scheme_handler_factory)(
struct _cef_request_context_t* self,
const cef_string_t* scheme_name,
const cef_string_t* domain_name,
struct _cef_scheme_handler_factory_t* factory);
@@ -160,7 +162,7 @@ typedef struct _cef_request_context_t {
// Clear all registered scheme handler factories. Returns false (0) on error.
// This function may be called on any thread in the browser process.
///
int (CEF_CALLBACK *clear_scheme_handler_factories)(
int(CEF_CALLBACK* clear_scheme_handler_factories)(
struct _cef_request_context_t* self);
///
@@ -170,15 +172,16 @@ typedef struct _cef_request_context_t {
// cef_request_tContextHandler::OnBeforePluginLoad may be called to rebuild
// the plugin list cache.
///
void (CEF_CALLBACK *purge_plugin_list_cache)(
struct _cef_request_context_t* self, int reload_pages);
void(CEF_CALLBACK* purge_plugin_list_cache)(
struct _cef_request_context_t* self,
int reload_pages);
///
// Returns true (1) if a preference with the specified |name| exists. This
// function must be called on the browser process UI thread.
///
int (CEF_CALLBACK *has_preference)(struct _cef_request_context_t* self,
const cef_string_t* name);
int(CEF_CALLBACK* has_preference)(struct _cef_request_context_t* self,
const cef_string_t* name);
///
// Returns the value for the preference with the specified |name|. Returns
@@ -187,8 +190,9 @@ typedef struct _cef_request_context_t {
// will not modify the underlying preference value. This function must be
// called on the browser process UI thread.
///
struct _cef_value_t* (CEF_CALLBACK *get_preference)(
struct _cef_request_context_t* self, const cef_string_t* name);
struct _cef_value_t*(CEF_CALLBACK* get_preference)(
struct _cef_request_context_t* self,
const cef_string_t* name);
///
// Returns all preferences as a dictionary. If |include_defaults| is true (1)
@@ -198,8 +202,9 @@ typedef struct _cef_request_context_t {
// preference values. This function must be called on the browser process UI
// thread.
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_all_preferences)(
struct _cef_request_context_t* self, int include_defaults);
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_all_preferences)(
struct _cef_request_context_t* self,
int include_defaults);
///
// Returns true (1) if the preference with the specified |name| can be
@@ -207,8 +212,8 @@ typedef struct _cef_request_context_t {
// command-line usually cannot be modified. This function must be called on
// the browser process UI thread.
///
int (CEF_CALLBACK *can_set_preference)(struct _cef_request_context_t* self,
const cef_string_t* name);
int(CEF_CALLBACK* can_set_preference)(struct _cef_request_context_t* self,
const cef_string_t* name);
///
// Set the |value| associated with preference |name|. Returns true (1) if the
@@ -217,9 +222,10 @@ typedef struct _cef_request_context_t {
// fails then |error| will be populated with a detailed description of the
// problem. This function must be called on the browser process UI thread.
///
int (CEF_CALLBACK *set_preference)(struct _cef_request_context_t* self,
const cef_string_t* name, struct _cef_value_t* value,
cef_string_t* error);
int(CEF_CALLBACK* set_preference)(struct _cef_request_context_t* self,
const cef_string_t* name,
struct _cef_value_t* value,
cef_string_t* error);
///
// Clears all certificate exceptions that were added as part of handling
@@ -229,7 +235,7 @@ typedef struct _cef_request_context_t {
// |callback| is non-NULL it will be executed on the UI thread after
// completion.
///
void (CEF_CALLBACK *clear_certificate_exceptions)(
void(CEF_CALLBACK* clear_certificate_exceptions)(
struct _cef_request_context_t* self,
struct _cef_completion_callback_t* callback);
@@ -239,7 +245,7 @@ typedef struct _cef_request_context_t {
// want to call cef_shutdown(). If |callback| is non-NULL it will be executed
// on the UI thread after completion.
///
void (CEF_CALLBACK *close_all_connections)(
void(CEF_CALLBACK* close_all_connections)(
struct _cef_request_context_t* self,
struct _cef_completion_callback_t* callback);
@@ -247,8 +253,9 @@ typedef struct _cef_request_context_t {
// Attempts to resolve |origin| to a list of associated IP addresses.
// |callback| will be executed on the UI thread after completion.
///
void (CEF_CALLBACK *resolve_host)(struct _cef_request_context_t* self,
const cef_string_t* origin, struct _cef_resolve_callback_t* callback);
void(CEF_CALLBACK* resolve_host)(struct _cef_request_context_t* self,
const cef_string_t* origin,
struct _cef_resolve_callback_t* callback);
///
// Attempts to resolve |origin| to a list of associated IP addresses using
@@ -256,12 +263,12 @@ typedef struct _cef_request_context_t {
// addresses or NULL if no cached data is available. Returns ERR_NONE on
// success. This function must be called on the browser process IO thread.
///
cef_errorcode_t (CEF_CALLBACK *resolve_host_cached)(
struct _cef_request_context_t* self, const cef_string_t* origin,
cef_errorcode_t(CEF_CALLBACK* resolve_host_cached)(
struct _cef_request_context_t* self,
const cef_string_t* origin,
cef_string_list_t resolved_ips);
} cef_request_context_t;
///
// Returns the global context object.
///
@@ -283,7 +290,6 @@ CEF_EXPORT cef_request_context_t* cef_create_context_shared(
cef_request_context_t* other,
struct _cef_request_context_handler_t* handler);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=9359e227c9d534c9c612d2ede790136461836501$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Implement this structure to provide handler implementations. The handler
// instance will not be released until all objects related to the context have
@@ -63,7 +64,7 @@ typedef struct _cef_request_context_handler_t {
// this function returns NULL the default cookie manager retrievable via
// cef_request_tContext::get_default_cookie_manager() will be used.
///
struct _cef_cookie_manager_t* (CEF_CALLBACK *get_cookie_manager)(
struct _cef_cookie_manager_t*(CEF_CALLBACK* get_cookie_manager)(
struct _cef_request_context_handler_t* self);
///
@@ -85,15 +86,16 @@ typedef struct _cef_request_context_handler_t {
// trigger new calls to this function call
// cef_request_tContext::PurgePluginListCache.
///
int (CEF_CALLBACK *on_before_plugin_load)(
int(CEF_CALLBACK* on_before_plugin_load)(
struct _cef_request_context_handler_t* self,
const cef_string_t* mime_type, const cef_string_t* plugin_url,
int is_main_frame, const cef_string_t* top_origin_url,
const cef_string_t* mime_type,
const cef_string_t* plugin_url,
int is_main_frame,
const cef_string_t* top_origin_url,
struct _cef_web_plugin_info_t* plugin_info,
cef_plugin_policy_t* plugin_policy);
} cef_request_context_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b6cbe39a8124a961036205864e7e6b2e1eb0bf6b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
@@ -53,7 +55,6 @@
extern "C" {
#endif
///
// Callback structure used for asynchronous continuation of url requests.
///
@@ -67,15 +68,14 @@ typedef struct _cef_request_callback_t {
// Continue the url request. If |allow| is true (1) the request will be
// continued. Otherwise, the request will be canceled.
///
void (CEF_CALLBACK *cont)(struct _cef_request_callback_t* self, int allow);
void(CEF_CALLBACK* cont)(struct _cef_request_callback_t* self, int allow);
///
// Cancel the url request.
///
void (CEF_CALLBACK *cancel)(struct _cef_request_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_request_callback_t* self);
} cef_request_callback_t;
///
// Callback structure used to select a client certificate for authentication.
///
@@ -89,12 +89,11 @@ typedef struct _cef_select_client_certificate_callback_t {
// Chooses the specified certificate for client certificate authentication.
// NULL value means that no client certificate should be used.
///
void (CEF_CALLBACK *select)(
void(CEF_CALLBACK* select)(
struct _cef_select_client_certificate_callback_t* self,
struct _cef_x509certificate_t* cert);
} cef_select_client_certificate_callback_t;
///
// Implement this structure to handle events related to browser requests. The
// functions of this structure will be called on the thread indicated.
@@ -115,9 +114,11 @@ typedef struct _cef_request_handler_t {
// cef_load_handler_t::OnLoadError will be called with an |errorCode| value of
// ERR_ABORTED.
///
int (CEF_CALLBACK *on_before_browse)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, int is_redirect);
int(CEF_CALLBACK* on_before_browse)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
int is_redirect);
///
// Called on the UI thread before OnBeforeBrowse in certain limited cases
@@ -135,10 +136,13 @@ typedef struct _cef_request_handler_t {
// true (1) to cancel the navigation or false (0) to allow the navigation to
// proceed in the source browser's top-level frame.
///
int (CEF_CALLBACK *on_open_urlfrom_tab)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
int(CEF_CALLBACK* on_open_urlfrom_tab)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
const cef_string_t* target_url,
cef_window_open_disposition_t target_disposition, int user_gesture);
cef_window_open_disposition_t target_disposition,
int user_gesture);
///
// Called on the IO thread before a resource request is loaded. The |request|
@@ -148,9 +152,11 @@ typedef struct _cef_request_handler_t {
// Return RV_CANCEL to cancel the request immediately.
//
///
cef_return_value_t (CEF_CALLBACK *on_before_resource_load)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
cef_return_value_t(CEF_CALLBACK* on_before_resource_load)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_request_callback_t* callback);
///
@@ -159,9 +165,11 @@ typedef struct _cef_request_handler_t {
// a cef_resource_handler_t object. The |request| object should not be
// modified in this callback.
///
struct _cef_resource_handler_t* (CEF_CALLBACK *get_resource_handler)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request);
struct _cef_resource_handler_t*(CEF_CALLBACK* get_resource_handler)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request);
///
// Called on the IO thread when a resource load is redirected. The |request|
@@ -171,10 +179,12 @@ typedef struct _cef_request_handler_t {
// changed if desired. The |request| object cannot be modified in this
// callback.
///
void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, struct _cef_response_t* response,
cef_string_t* new_url);
void(CEF_CALLBACK* on_resource_redirect)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response,
cef_string_t* new_url);
///
// Called on the IO thread when a resource response is received. To allow the
@@ -182,18 +192,22 @@ typedef struct _cef_request_handler_t {
// resource modify |request| (url, headers or post body) and return true (1).
// The |response| object cannot be modified in this callback.
///
int (CEF_CALLBACK *on_resource_response)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, struct _cef_response_t* response);
int(CEF_CALLBACK* on_resource_response)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response);
///
// Called on the IO thread to optionally filter resource response content.
// |request| and |response| represent the request and response respectively
// and cannot be modified in this callback.
///
struct _cef_response_filter_t* (CEF_CALLBACK *get_resource_response_filter)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
struct _cef_response_filter_t*(CEF_CALLBACK* get_resource_response_filter)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response);
///
@@ -202,10 +216,13 @@ typedef struct _cef_request_handler_t {
// modified in this callback. |status| indicates the load completion status.
// |received_content_length| is the number of response bytes actually read.
///
void (CEF_CALLBACK *on_resource_load_complete)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
struct _cef_response_t* response, cef_urlrequest_status_t status,
void(CEF_CALLBACK* on_resource_load_complete)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response,
cef_urlrequest_status_t status,
int64 received_content_length);
///
@@ -219,10 +236,16 @@ typedef struct _cef_request_handler_t {
// the authentication information is available. Return false (0) to cancel the
// request immediately.
///
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
const cef_string_t* host, int port, const cef_string_t* realm,
const cef_string_t* scheme, struct _cef_auth_callback_t* callback);
int(CEF_CALLBACK* get_auth_credentials)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
int isProxy,
const cef_string_t* host,
int port,
const cef_string_t* realm,
const cef_string_t* scheme,
struct _cef_auth_callback_t* callback);
///
// Called on the IO thread when JavaScript requests a specific storage quota
@@ -233,9 +256,11 @@ typedef struct _cef_request_handler_t {
// grant or deny the request. Return false (0) to cancel the request
// immediately.
///
int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* origin_url,
int64 new_size, struct _cef_request_callback_t* callback);
int(CEF_CALLBACK* on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* origin_url,
int64 new_size,
struct _cef_request_callback_t* callback);
///
// Called on the UI thread to handle requests for URLs with an unknown
@@ -244,9 +269,10 @@ typedef struct _cef_request_handler_t {
// YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR
// OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
///
void (CEF_CALLBACK *on_protocol_execution)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
const cef_string_t* url, int* allow_os_execution);
void(CEF_CALLBACK* on_protocol_execution)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* url,
int* allow_os_execution);
///
// Called on the UI thread to handle requests for URLs with an invalid SSL
@@ -256,9 +282,12 @@ typedef struct _cef_request_handler_t {
// CefSettings.ignore_certificate_errors is set all invalid certificates will
// be accepted without calling this function.
///
int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, cef_errorcode_t cert_error,
const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,
int(CEF_CALLBACK* on_certificate_error)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
cef_errorcode_t cert_error,
const cef_string_t* request_url,
struct _cef_sslinfo_t* ssl_info,
struct _cef_request_callback_t* callback);
///
@@ -274,9 +303,12 @@ typedef struct _cef_request_handler_t {
// pruned by Chromium so that it only contains certificates from issuers that
// the server trusts.
///
int (CEF_CALLBACK *on_select_client_certificate)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
int isProxy, const cef_string_t* host, int port,
int(CEF_CALLBACK* on_select_client_certificate)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
int isProxy,
const cef_string_t* host,
int port,
size_t certificatesCount,
struct _cef_x509certificate_t* const* certificates,
struct _cef_select_client_certificate_callback_t* callback);
@@ -285,27 +317,28 @@ typedef struct _cef_request_handler_t {
// Called on the browser process UI thread when a plugin has crashed.
// |plugin_path| is the path of the plugin that crashed.
///
void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* plugin_path);
void(CEF_CALLBACK* on_plugin_crashed)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* plugin_path);
///
// Called on the browser process UI thread when the render view associated
// with |browser| is ready to receive/handle IPC messages in the render
// process.
///
void (CEF_CALLBACK *on_render_view_ready)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_render_view_ready)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser);
///
// Called on the browser process UI thread when the render process terminates
// unexpectedly. |status| indicates how the process terminated.
///
void (CEF_CALLBACK *on_render_process_terminated)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
void(CEF_CALLBACK* on_render_process_terminated)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
cef_termination_status_t status);
} cef_request_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=82f2ce6f2ea3a8268ac69e33d304ace1a0e192b2$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure used for retrieving resources from the resource bundle (*.pak)
// files loaded by CEF during startup or via the cef_resource_bundle_tHandler
@@ -64,8 +65,9 @@ typedef struct _cef_resource_bundle_t {
// of valid string ID values.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_localized_string)(
struct _cef_resource_bundle_t* self, int string_id);
cef_string_userfree_t(CEF_CALLBACK* get_localized_string)(
struct _cef_resource_bundle_t* self,
int string_id);
///
// Retrieves the contents of the specified scale independent |resource_id|. If
@@ -75,8 +77,10 @@ typedef struct _cef_resource_bundle_t {
// memory and should not be freed. Include cef_pack_resources.h for a listing
// of valid resource ID values.
///
int (CEF_CALLBACK *get_data_resource)(struct _cef_resource_bundle_t* self,
int resource_id, void** data, size_t* data_size);
int(CEF_CALLBACK* get_data_resource)(struct _cef_resource_bundle_t* self,
int resource_id,
void** data,
size_t* data_size);
///
// Retrieves the contents of the specified |resource_id| nearest the scale
@@ -88,18 +92,19 @@ typedef struct _cef_resource_bundle_t {
// memory and should not be freed. Include cef_pack_resources.h for a listing
// of valid resource ID values.
///
int (CEF_CALLBACK *get_data_resource_for_scale)(
struct _cef_resource_bundle_t* self, int resource_id,
cef_scale_factor_t scale_factor, void** data, size_t* data_size);
int(CEF_CALLBACK* get_data_resource_for_scale)(
struct _cef_resource_bundle_t* self,
int resource_id,
cef_scale_factor_t scale_factor,
void** data,
size_t* data_size);
} cef_resource_bundle_t;
///
// Returns the global resource bundle instance.
///
CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=cd94d8670c26bf17082629e5297407a716f01503$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure used to implement a custom resource bundle structure. See
// CefSettings for additional options related to resource bundle loading. The
@@ -62,8 +63,9 @@ typedef struct _cef_resource_bundle_handler_t {
// return true (1). To use the default translation return false (0). Include
// cef_pack_strings.h for a listing of valid string ID values.
///
int (CEF_CALLBACK *get_localized_string)(
struct _cef_resource_bundle_handler_t* self, int string_id,
int(CEF_CALLBACK* get_localized_string)(
struct _cef_resource_bundle_handler_t* self,
int string_id,
cef_string_t* string);
///
@@ -74,8 +76,10 @@ typedef struct _cef_resource_bundle_handler_t {
// resident in memory. Include cef_pack_resources.h for a listing of valid
// resource ID values.
///
int (CEF_CALLBACK *get_data_resource)(
struct _cef_resource_bundle_handler_t* self, int resource_id, void** data,
int(CEF_CALLBACK* get_data_resource)(
struct _cef_resource_bundle_handler_t* self,
int resource_id,
void** data,
size_t* data_size);
///
@@ -86,12 +90,14 @@ typedef struct _cef_resource_bundle_handler_t {
// not be copied and must remain resident in memory. Include
// cef_pack_resources.h for a listing of valid resource ID values.
///
int (CEF_CALLBACK *get_data_resource_for_scale)(
struct _cef_resource_bundle_handler_t* self, int resource_id,
cef_scale_factor_t scale_factor, void** data, size_t* data_size);
int(CEF_CALLBACK* get_data_resource_for_scale)(
struct _cef_resource_bundle_handler_t* self,
int resource_id,
cef_scale_factor_t scale_factor,
void** data,
size_t* data_size);
} cef_resource_bundle_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=cd9c4ed153ad4425ff43d640a81693e3c83817d2$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_
@@ -49,7 +51,6 @@
extern "C" {
#endif
///
// Structure used to implement a custom request handler structure. The functions
// of this structure will always be called on the IO thread.
@@ -67,8 +68,9 @@ typedef struct _cef_resource_handler_t {
// function if header information is available immediately). To cancel the
// request return false (0).
///
int (CEF_CALLBACK *process_request)(struct _cef_resource_handler_t* self,
struct _cef_request_t* request, struct _cef_callback_t* callback);
int(CEF_CALLBACK* process_request)(struct _cef_resource_handler_t* self,
struct _cef_request_t* request,
struct _cef_callback_t* callback);
///
// Retrieve response header information. If the response length is not known
@@ -81,9 +83,10 @@ typedef struct _cef_resource_handler_t {
// URL. If an error occured while setting up the request you can call
// set_error() on |response| to indicate the error condition.
///
void (CEF_CALLBACK *get_response_headers)(
struct _cef_resource_handler_t* self, struct _cef_response_t* response,
int64* response_length, cef_string_t* redirectUrl);
void(CEF_CALLBACK* get_response_headers)(struct _cef_resource_handler_t* self,
struct _cef_response_t* response,
int64* response_length,
cef_string_t* redirectUrl);
///
// Read response data. If data is available immediately copy up to
@@ -92,32 +95,33 @@ typedef struct _cef_resource_handler_t {
// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the
// data is available. To indicate response completion return false (0).
///
int (CEF_CALLBACK *read_response)(struct _cef_resource_handler_t* self,
void* data_out, int bytes_to_read, int* bytes_read,
struct _cef_callback_t* callback);
int(CEF_CALLBACK* read_response)(struct _cef_resource_handler_t* self,
void* data_out,
int bytes_to_read,
int* bytes_read,
struct _cef_callback_t* callback);
///
// Return true (1) if the specified cookie can be sent with the request or
// false (0) otherwise. If false (0) is returned for any cookie then no
// cookies will be sent with the request.
///
int (CEF_CALLBACK *can_get_cookie)(struct _cef_resource_handler_t* self,
const struct _cef_cookie_t* cookie);
int(CEF_CALLBACK* can_get_cookie)(struct _cef_resource_handler_t* self,
const struct _cef_cookie_t* cookie);
///
// Return true (1) if the specified cookie returned with the response can be
// set or false (0) otherwise.
///
int (CEF_CALLBACK *can_set_cookie)(struct _cef_resource_handler_t* self,
const struct _cef_cookie_t* cookie);
int(CEF_CALLBACK* can_set_cookie)(struct _cef_resource_handler_t* self,
const struct _cef_cookie_t* cookie);
///
// Request processing has been canceled.
///
void (CEF_CALLBACK *cancel)(struct _cef_resource_handler_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_resource_handler_t* self);
} cef_resource_handler_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=3f0ed89d2320677780c2fd526be7fe6312580cd8$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure used to represent a web response. The functions of this structure
// may be called on any thread.
@@ -58,83 +59,81 @@ typedef struct _cef_response_t {
///
// Returns true (1) if this object is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_response_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_response_t* self);
///
// Get the response error code. Returns ERR_NONE if there was no error.
///
cef_errorcode_t (CEF_CALLBACK *get_error)(struct _cef_response_t* self);
cef_errorcode_t(CEF_CALLBACK* get_error)(struct _cef_response_t* self);
///
// Set the response error code. This can be used by custom scheme handlers to
// return errors during initial request processing.
///
void (CEF_CALLBACK *set_error)(struct _cef_response_t* self,
cef_errorcode_t error);
void(CEF_CALLBACK* set_error)(struct _cef_response_t* self,
cef_errorcode_t error);
///
// Get the response status code.
///
int (CEF_CALLBACK *get_status)(struct _cef_response_t* self);
int(CEF_CALLBACK* get_status)(struct _cef_response_t* self);
///
// Set the response status code.
///
void (CEF_CALLBACK *set_status)(struct _cef_response_t* self, int status);
void(CEF_CALLBACK* set_status)(struct _cef_response_t* self, int status);
///
// Get the response status text.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_status_text)(
cef_string_userfree_t(CEF_CALLBACK* get_status_text)(
struct _cef_response_t* self);
///
// Set the response status text.
///
void (CEF_CALLBACK *set_status_text)(struct _cef_response_t* self,
const cef_string_t* statusText);
void(CEF_CALLBACK* set_status_text)(struct _cef_response_t* self,
const cef_string_t* statusText);
///
// Get the response mime type.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_mime_type)(
cef_string_userfree_t(CEF_CALLBACK* get_mime_type)(
struct _cef_response_t* self);
///
// Set the response mime type.
///
void (CEF_CALLBACK *set_mime_type)(struct _cef_response_t* self,
const cef_string_t* mimeType);
void(CEF_CALLBACK* set_mime_type)(struct _cef_response_t* self,
const cef_string_t* mimeType);
///
// Get the value for the specified response header field.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_header)(struct _cef_response_t* self,
const cef_string_t* name);
cef_string_userfree_t(CEF_CALLBACK* get_header)(struct _cef_response_t* self,
const cef_string_t* name);
///
// Get all response header fields.
///
void (CEF_CALLBACK *get_header_map)(struct _cef_response_t* self,
cef_string_multimap_t headerMap);
void(CEF_CALLBACK* get_header_map)(struct _cef_response_t* self,
cef_string_multimap_t headerMap);
///
// Set all response header fields.
///
void (CEF_CALLBACK *set_header_map)(struct _cef_response_t* self,
cef_string_multimap_t headerMap);
void(CEF_CALLBACK* set_header_map)(struct _cef_response_t* self,
cef_string_multimap_t headerMap);
} cef_response_t;
///
// Create a new cef_response_t object.
///
CEF_EXPORT cef_response_t* cef_response_create();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c7126418fc448f9f75e770fda8434613eed0930d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Implement this structure to filter resource response content. The functions
// of this structure will be called on the browser process IO thread.
@@ -59,7 +60,7 @@ typedef struct _cef_response_filter_t {
// Initialize the response filter. Will only be called a single time. The
// filter will not be installed if this function returns false (0).
///
int (CEF_CALLBACK *init_filter)(struct _cef_response_filter_t* self);
int(CEF_CALLBACK* init_filter)(struct _cef_response_filter_t* self);
///
// Called to filter a chunk of data. Expected usage is as follows:
@@ -92,13 +93,16 @@ typedef struct _cef_response_filter_t {
//
// Do not keep a reference to the buffers passed to this function.
///
cef_response_filter_status_t (CEF_CALLBACK *filter)(
struct _cef_response_filter_t* self, void* data_in, size_t data_in_size,
size_t* data_in_read, void* data_out, size_t data_out_size,
cef_response_filter_status_t(CEF_CALLBACK* filter)(
struct _cef_response_filter_t* self,
void* data_in,
size_t data_in_size,
size_t* data_in_read,
void* data_out,
size_t data_out_size,
size_t* data_out_written);
} cef_response_filter_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a920e25c5ca348dcc45965d53389c16a8a29b0ed$
//
#ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
@@ -119,13 +121,16 @@ typedef struct _cef_scheme_registrar_t {
// per unique |scheme_name| value. If |scheme_name| is already registered or
// if an error occurs this function will return false (0).
///
int (CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t* self,
const cef_string_t* scheme_name, int is_standard, int is_local,
int is_display_isolated, int is_secure, int is_cors_enabled,
int is_csp_bypassing);
int(CEF_CALLBACK* add_custom_scheme)(struct _cef_scheme_registrar_t* self,
const cef_string_t* scheme_name,
int is_standard,
int is_local,
int is_display_isolated,
int is_secure,
int is_cors_enabled,
int is_csp_bypassing);
} cef_scheme_registrar_t;
///
// Structure that creates cef_resource_handler_t instances for handling scheme
// requests. The functions of this structure will always be called on the IO
@@ -145,13 +150,14 @@ typedef struct _cef_scheme_handler_factory_t {
// example, if the request came from cef_urlrequest_t). The |request| object
// passed to this function will not contain cookie data.
///
struct _cef_resource_handler_t* (CEF_CALLBACK *create)(
struct _cef_resource_handler_t*(CEF_CALLBACK* create)(
struct _cef_scheme_handler_factory_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
const cef_string_t* scheme_name, struct _cef_request_t* request);
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
const cef_string_t* scheme_name,
struct _cef_request_t* request);
} cef_scheme_handler_factory_t;
///
// Register a scheme handler factory with the global request context. An NULL
// |domain_name| value for a standard scheme will cause the factory to match all
@@ -168,7 +174,8 @@ typedef struct _cef_scheme_handler_factory_t {
// ory().
///
CEF_EXPORT int cef_register_scheme_handler_factory(
const cef_string_t* scheme_name, const cef_string_t* domain_name,
const cef_string_t* scheme_name,
const cef_string_t* domain_name,
cef_scheme_handler_factory_t* factory);
///

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7489f3078e15407c3984f0b2393df3b0ddc045b0$
//
#ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Structure representing SSL information.
///
@@ -60,17 +61,15 @@ typedef struct _cef_sslinfo_t {
// Returns a bitmask containing any and all problems verifying the server
// certificate.
///
cef_cert_status_t (CEF_CALLBACK *get_cert_status)(
struct _cef_sslinfo_t* self);
cef_cert_status_t(CEF_CALLBACK* get_cert_status)(struct _cef_sslinfo_t* self);
///
// Returns the X.509 certificate.
///
struct _cef_x509certificate_t* (CEF_CALLBACK *get_x509certificate)(
struct _cef_x509certificate_t*(CEF_CALLBACK* get_x509certificate)(
struct _cef_sslinfo_t* self);
} cef_sslinfo_t;
///
// Returns true (1) if the certificate status has any error, major or minor.
///

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2aa604a0520a802ae3b10f5922d4a7ca48078785$
//
#ifndef CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// Structure representing the SSL information for a navigation entry.
///
@@ -59,35 +60,34 @@ typedef struct _cef_sslstatus_t {
///
// Returns true (1) if the status is related to a secure SSL/TLS connection.
///
int (CEF_CALLBACK *is_secure_connection)(struct _cef_sslstatus_t* self);
int(CEF_CALLBACK* is_secure_connection)(struct _cef_sslstatus_t* self);
///
// Returns a bitmask containing any and all problems verifying the server
// certificate.
///
cef_cert_status_t (CEF_CALLBACK *get_cert_status)(
cef_cert_status_t(CEF_CALLBACK* get_cert_status)(
struct _cef_sslstatus_t* self);
///
// Returns the SSL version used for the SSL connection.
///
cef_ssl_version_t (CEF_CALLBACK *get_sslversion)(
cef_ssl_version_t(CEF_CALLBACK* get_sslversion)(
struct _cef_sslstatus_t* self);
///
// Returns a bitmask containing the page security content status.
///
cef_ssl_content_status_t (CEF_CALLBACK *get_content_status)(
cef_ssl_content_status_t(CEF_CALLBACK* get_content_status)(
struct _cef_sslstatus_t* self);
///
// Returns the X.509 certificate.
///
struct _cef_x509certificate_t* (CEF_CALLBACK *get_x509certificate)(
struct _cef_x509certificate_t*(CEF_CALLBACK* get_x509certificate)(
struct _cef_sslstatus_t* self);
} cef_sslstatus_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=4e127106e9b5fada6bf05ea6e29bc502bb2a1e0d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Structure the client can implement to provide a custom stream reader. The
// functions of this structure may be called on any thread.
@@ -58,35 +59,37 @@ typedef struct _cef_read_handler_t {
///
// Read raw binary data.
///
size_t (CEF_CALLBACK *read)(struct _cef_read_handler_t* self, void* ptr,
size_t size, size_t n);
size_t(CEF_CALLBACK* read)(struct _cef_read_handler_t* self,
void* ptr,
size_t size,
size_t n);
///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
///
int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, int64 offset,
int whence);
int(CEF_CALLBACK* seek)(struct _cef_read_handler_t* self,
int64 offset,
int whence);
///
// Return the current offset position.
///
int64 (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_read_handler_t* self);
///
// Return non-zero if at end of file.
///
int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self);
int(CEF_CALLBACK* eof)(struct _cef_read_handler_t* self);
///
// Return true (1) if this handler performs work like accessing the file
// system which may block. Used as a hint for determining the thread to access
// the handler from.
///
int (CEF_CALLBACK *may_block)(struct _cef_read_handler_t* self);
int(CEF_CALLBACK* may_block)(struct _cef_read_handler_t* self);
} cef_read_handler_t;
///
// Structure used to read data from a stream. The functions of this structure
// may be called on any thread.
@@ -100,35 +103,37 @@ typedef struct _cef_stream_reader_t {
///
// Read raw binary data.
///
size_t (CEF_CALLBACK *read)(struct _cef_stream_reader_t* self, void* ptr,
size_t size, size_t n);
size_t(CEF_CALLBACK* read)(struct _cef_stream_reader_t* self,
void* ptr,
size_t size,
size_t n);
///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
///
int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, int64 offset,
int whence);
int(CEF_CALLBACK* seek)(struct _cef_stream_reader_t* self,
int64 offset,
int whence);
///
// Return the current offset position.
///
int64 (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_stream_reader_t* self);
///
// Return non-zero if at end of file.
///
int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self);
int(CEF_CALLBACK* eof)(struct _cef_stream_reader_t* self);
///
// Returns true (1) if this reader performs work like accessing the file
// system which may block. Used as a hint for determining the thread to access
// the reader from.
///
int (CEF_CALLBACK *may_block)(struct _cef_stream_reader_t* self);
int(CEF_CALLBACK* may_block)(struct _cef_stream_reader_t* self);
} cef_stream_reader_t;
///
// Create a new cef_stream_reader_t object from a file.
///
@@ -139,7 +144,7 @@ CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(
// Create a new cef_stream_reader_t object from data.
///
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
size_t size);
size_t size);
///
// Create a new cef_stream_reader_t object from a custom handler.
@@ -147,7 +152,6 @@ CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
cef_read_handler_t* handler);
///
// Structure the client can implement to provide a custom stream writer. The
// functions of this structure may be called on any thread.
@@ -161,35 +165,37 @@ typedef struct _cef_write_handler_t {
///
// Write raw binary data.
///
size_t (CEF_CALLBACK *write)(struct _cef_write_handler_t* self,
const void* ptr, size_t size, size_t n);
size_t(CEF_CALLBACK* write)(struct _cef_write_handler_t* self,
const void* ptr,
size_t size,
size_t n);
///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
///
int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, int64 offset,
int whence);
int(CEF_CALLBACK* seek)(struct _cef_write_handler_t* self,
int64 offset,
int whence);
///
// Return the current offset position.
///
int64 (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_write_handler_t* self);
///
// Flush the stream.
///
int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self);
int(CEF_CALLBACK* flush)(struct _cef_write_handler_t* self);
///
// Return true (1) if this handler performs work like accessing the file
// system which may block. Used as a hint for determining the thread to access
// the handler from.
///
int (CEF_CALLBACK *may_block)(struct _cef_write_handler_t* self);
int(CEF_CALLBACK* may_block)(struct _cef_write_handler_t* self);
} cef_write_handler_t;
///
// Structure used to write data to a stream. The functions of this structure may
// be called on any thread.
@@ -203,35 +209,37 @@ typedef struct _cef_stream_writer_t {
///
// Write raw binary data.
///
size_t (CEF_CALLBACK *write)(struct _cef_stream_writer_t* self,
const void* ptr, size_t size, size_t n);
size_t(CEF_CALLBACK* write)(struct _cef_stream_writer_t* self,
const void* ptr,
size_t size,
size_t n);
///
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
///
int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, int64 offset,
int whence);
int(CEF_CALLBACK* seek)(struct _cef_stream_writer_t* self,
int64 offset,
int whence);
///
// Return the current offset position.
///
int64 (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_stream_writer_t* self);
///
// Flush the stream.
///
int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self);
int(CEF_CALLBACK* flush)(struct _cef_stream_writer_t* self);
///
// Returns true (1) if this writer performs work like accessing the file
// system which may block. Used as a hint for determining the thread to access
// the writer from.
///
int (CEF_CALLBACK *may_block)(struct _cef_stream_writer_t* self);
int(CEF_CALLBACK* may_block)(struct _cef_stream_writer_t* self);
} cef_stream_writer_t;
///
// Create a new cef_stream_writer_t object for a file.
///
@@ -244,7 +252,6 @@ CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
cef_write_handler_t* handler);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2e8edddfd49aea615c7adf8d0d092a4865b79229$
//
#ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Implement this structure to receive string values asynchronously.
///
@@ -57,11 +58,10 @@ typedef struct _cef_string_visitor_t {
///
// Method that will be executed.
///
void (CEF_CALLBACK *visit)(struct _cef_string_visitor_t* self,
const cef_string_t* string);
void(CEF_CALLBACK* visit)(struct _cef_string_visitor_t* self,
const cef_string_t* string);
} cef_string_visitor_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=344ba415349b4cc305f51cb9e22563b232433e25$
//
#ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Implement this structure for asynchronous task execution. If the task is
// posted successfully and if the associated message loop is still running then
@@ -62,10 +63,9 @@ typedef struct _cef_task_t {
///
// Method that will be executed on the target thread.
///
void (CEF_CALLBACK *execute)(struct _cef_task_t* self);
void(CEF_CALLBACK* execute)(struct _cef_task_t* self);
} cef_task_t;
///
// Structure that asynchronously executes tasks on the associated thread. It is
// safe to call the functions of this structure on any thread.
@@ -85,27 +85,26 @@ typedef struct _cef_task_runner_t {
// Returns true (1) if this object is pointing to the same task runner as
// |that| object.
///
int (CEF_CALLBACK *is_same)(struct _cef_task_runner_t* self,
struct _cef_task_runner_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_task_runner_t* self,
struct _cef_task_runner_t* that);
///
// Returns true (1) if this task runner belongs to the current thread.
///
int (CEF_CALLBACK *belongs_to_current_thread)(
struct _cef_task_runner_t* self);
int(CEF_CALLBACK* belongs_to_current_thread)(struct _cef_task_runner_t* self);
///
// Returns true (1) if this task runner is for the specified CEF thread.
///
int (CEF_CALLBACK *belongs_to_thread)(struct _cef_task_runner_t* self,
cef_thread_id_t threadId);
int(CEF_CALLBACK* belongs_to_thread)(struct _cef_task_runner_t* self,
cef_thread_id_t threadId);
///
// Post a task for execution on the thread associated with this task runner.
// Execution will occur asynchronously.
///
int (CEF_CALLBACK *post_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task);
int(CEF_CALLBACK* post_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task);
///
// Post a task for delayed execution on the thread associated with this task
@@ -113,11 +112,11 @@ typedef struct _cef_task_runner_t {
// supported on V8 WebWorker threads and will be executed without the
// specified delay.
///
int (CEF_CALLBACK *post_delayed_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task, int64 delay_ms);
int(CEF_CALLBACK* post_delayed_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task,
int64 delay_ms);
} cef_task_runner_t;
///
// Returns the task runner for the current thread. Only CEF threads will have
// task runners. An NULL reference will be returned if this function is called
@@ -131,7 +130,6 @@ CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread();
CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread(
cef_thread_id_t threadId);
///
// Returns true (1) if called on the specified thread. Equivalent to using
// cef_task_tRunner::GetForThread(threadId)->belongs_to_current_thread().
@@ -149,8 +147,9 @@ CEF_EXPORT int cef_post_task(cef_thread_id_t threadId, cef_task_t* task);
// using cef_task_tRunner::GetForThread(threadId)->PostDelayedTask(task,
// delay_ms).
///
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, cef_task_t* task,
int64 delay_ms);
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
cef_task_t* task,
int64 delay_ms);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d844086fc675680bfae12c3fa12a6886cc804816$
//
#ifndef CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// A simple thread abstraction that establishes a message loop on a new thread.
// The consumer uses cef_task_tRunner to execute code on the thread's message
@@ -67,14 +68,14 @@ typedef struct _cef_thread_t {
// Returns the cef_task_tRunner that will execute code on this thread's
// message loop. This function is safe to call from any thread.
///
struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)(
struct _cef_task_runner_t*(CEF_CALLBACK* get_task_runner)(
struct _cef_thread_t* self);
///
// Returns the platform thread ID. It will return the same value after stop()
// is called. This function is safe to call from any thread.
///
cef_platform_thread_id_t (CEF_CALLBACK *get_platform_thread_id)(
cef_platform_thread_id_t(CEF_CALLBACK* get_platform_thread_id)(
struct _cef_thread_t* self);
///
@@ -82,16 +83,15 @@ typedef struct _cef_thread_t {
// that called cef_thread_create(). Do not call this function if
// cef_thread_create() was called with a |stoppable| value of false (0).
///
void (CEF_CALLBACK *stop)(struct _cef_thread_t* self);
void(CEF_CALLBACK* stop)(struct _cef_thread_t* self);
///
// Returns true (1) if the thread is currently running. This function must be
// called from the same thread that called cef_thread_create().
///
int (CEF_CALLBACK *is_running)(struct _cef_thread_t* self);
int(CEF_CALLBACK* is_running)(struct _cef_thread_t* self);
} cef_thread_t;
///
// Create and start a new thread. This function does not block waiting for the
// thread to run initialization. |display_name| is the name that will be used to
@@ -103,10 +103,12 @@ typedef struct _cef_thread_t {
// specifies how COM will be initialized for the thread. If |com_init_mode| is
// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI.
///
CEF_EXPORT cef_thread_t* cef_thread_create(const cef_string_t* display_name,
cef_thread_priority_t priority, cef_message_loop_type_t message_loop_type,
int stoppable, cef_com_init_mode_t com_init_mode);
CEF_EXPORT cef_thread_t* cef_thread_create(
const cef_string_t* display_name,
cef_thread_priority_t priority,
cef_message_loop_type_t message_loop_type,
int stoppable,
cef_com_init_mode_t com_init_mode);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2684497985a960a8699e6c24aeb17370cf318e88$
//
#ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Implement this structure to receive notification when tracing has completed.
// The functions of this structure will be called on the browser process UI
@@ -62,12 +63,11 @@ typedef struct _cef_end_tracing_callback_t {
// the path at which tracing data was written. The client is responsible for
// deleting |tracing_file|.
///
void (CEF_CALLBACK *on_end_tracing_complete)(
void(CEF_CALLBACK* on_end_tracing_complete)(
struct _cef_end_tracing_callback_t* self,
const cef_string_t* tracing_file);
} cef_end_tracing_callback_t;
///
// Start tracing events on all processes. Tracing is initialized asynchronously
// and |callback| will be executed on the UI thread after initialization is
@@ -86,7 +86,7 @@ typedef struct _cef_end_tracing_callback_t {
// This function must be called on the browser process UI thread.
///
CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
struct _cef_completion_callback_t* callback);
struct _cef_completion_callback_t* callback);
///
// Stop tracing events on all processes.
@@ -102,7 +102,7 @@ CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
// This function must be called on the browser process UI thread.
///
CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
cef_end_tracing_callback_t* callback);
cef_end_tracing_callback_t* callback);
///
// Returns the current system trace time or, if none is defined, the current

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d0ac53d1df275f9ea9cf19a6a07f8dce88f2b151$
//
#ifndef CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_
@@ -67,26 +69,26 @@ typedef struct _cef_urlrequest_t {
// Returns the request object used to create this URL request. The returned
// object is read-only and should not be modified.
///
struct _cef_request_t* (CEF_CALLBACK *get_request)(
struct _cef_request_t*(CEF_CALLBACK* get_request)(
struct _cef_urlrequest_t* self);
///
// Returns the client.
///
struct _cef_urlrequest_client_t* (CEF_CALLBACK *get_client)(
struct _cef_urlrequest_client_t*(CEF_CALLBACK* get_client)(
struct _cef_urlrequest_t* self);
///
// Returns the request status.
///
cef_urlrequest_status_t (CEF_CALLBACK *get_request_status)(
cef_urlrequest_status_t(CEF_CALLBACK* get_request_status)(
struct _cef_urlrequest_t* self);
///
// Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
// otherwise.
///
cef_errorcode_t (CEF_CALLBACK *get_request_error)(
cef_errorcode_t(CEF_CALLBACK* get_request_error)(
struct _cef_urlrequest_t* self);
///
@@ -94,16 +96,15 @@ typedef struct _cef_urlrequest_t {
// Response information will only be available after the upload has completed.
// The returned object is read-only and should not be modified.
///
struct _cef_response_t* (CEF_CALLBACK *get_response)(
struct _cef_response_t*(CEF_CALLBACK* get_response)(
struct _cef_urlrequest_t* self);
///
// Cancel the request.
///
void (CEF_CALLBACK *cancel)(struct _cef_urlrequest_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_urlrequest_t* self);
} cef_urlrequest_t;
///
// Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request
// functions are supported. Multiple post data elements are not supported and
@@ -120,10 +121,10 @@ typedef struct _cef_urlrequest_t {
// renderer process' browser will be used.
///
CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create(
struct _cef_request_t* request, struct _cef_urlrequest_client_t* client,
struct _cef_request_t* request,
struct _cef_urlrequest_client_t* client,
struct _cef_request_context_t* request_context);
///
// Structure that should be implemented by the cef_urlrequest_t client. The
// functions of this structure will be called on the same thread that created
@@ -140,9 +141,8 @@ typedef struct _cef_urlrequest_client_t {
// cef_urlrequest_t::GetRequestStatus function to determine if the request was
// successful or not.
///
void (CEF_CALLBACK *on_request_complete)(
struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request);
void(CEF_CALLBACK* on_request_complete)(struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request);
///
// Notifies the client of upload progress. |current| denotes the number of
@@ -150,26 +150,31 @@ typedef struct _cef_urlrequest_client_t {
// chunked upload is enabled). This function will only be called if the
// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
///
void (CEF_CALLBACK *on_upload_progress)(struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request, int64 current, int64 total);
void(CEF_CALLBACK* on_upload_progress)(struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request,
int64 current,
int64 total);
///
// Notifies the client of download progress. |current| denotes the number of
// bytes received up to the call and |total| is the expected total size of the
// response (or -1 if not determined).
///
void (CEF_CALLBACK *on_download_progress)(
struct _cef_urlrequest_client_t* self, struct _cef_urlrequest_t* request,
int64 current, int64 total);
void(CEF_CALLBACK* on_download_progress)(
struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request,
int64 current,
int64 total);
///
// Called when some part of the response is read. |data| contains the current
// bytes received since the last call. This function will not be called if the
// UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
///
void (CEF_CALLBACK *on_download_data)(struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request, const void* data,
size_t data_length);
void(CEF_CALLBACK* on_download_data)(struct _cef_urlrequest_client_t* self,
struct _cef_urlrequest_t* request,
const void* data,
size_t data_length);
///
// Called on the IO thread when the browser needs credentials from the user.
@@ -180,13 +185,16 @@ typedef struct _cef_urlrequest_client_t {
// function will only be called for requests initiated from the browser
// process.
///
int (CEF_CALLBACK *get_auth_credentials)(
struct _cef_urlrequest_client_t* self, int isProxy,
const cef_string_t* host, int port, const cef_string_t* realm,
const cef_string_t* scheme, struct _cef_auth_callback_t* callback);
int(CEF_CALLBACK* get_auth_credentials)(
struct _cef_urlrequest_client_t* self,
int isProxy,
const cef_string_t* host,
int port,
const cef_string_t* realm,
const cef_string_t* scheme,
struct _cef_auth_callback_t* callback);
} cef_urlrequest_client_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=aecaacd4f1b5294258f4e78883bcfec0a5c5677f$
//
#ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
@@ -70,7 +72,7 @@ typedef struct _cef_v8context_t {
// be accessed from the thread on which they are created. This function can be
// called on any render process thread.
///
struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)(
struct _cef_task_runner_t*(CEF_CALLBACK* get_task_runner)(
struct _cef_v8context_t* self);
///
@@ -78,26 +80,26 @@ typedef struct _cef_v8context_t {
// on the current thread. Do not call any other functions if this function
// returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_v8context_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_v8context_t* self);
///
// Returns the browser for this context. This function will return an NULL
// reference for WebWorker contexts.
///
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
struct _cef_browser_t*(CEF_CALLBACK* get_browser)(
struct _cef_v8context_t* self);
///
// Returns the frame for this context. This function will return an NULL
// reference for WebWorker contexts.
///
struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_v8context_t* self);
struct _cef_frame_t*(CEF_CALLBACK* get_frame)(struct _cef_v8context_t* self);
///
// Returns the global object for this context. The context must be entered
// before calling this function.
///
struct _cef_v8value_t* (CEF_CALLBACK *get_global)(
struct _cef_v8value_t*(CEF_CALLBACK* get_global)(
struct _cef_v8context_t* self);
///
@@ -107,20 +109,20 @@ typedef struct _cef_v8context_t {
// objects belong to the context in which they are created. Returns true (1)
// if the scope was entered successfully.
///
int (CEF_CALLBACK *enter)(struct _cef_v8context_t* self);
int(CEF_CALLBACK* enter)(struct _cef_v8context_t* self);
///
// Exit this context. Call this function only after calling enter(). Returns
// true (1) if the scope was exited successfully.
///
int (CEF_CALLBACK *exit)(struct _cef_v8context_t* self);
int(CEF_CALLBACK* exit)(struct _cef_v8context_t* self);
///
// Returns true (1) if this object is pointing to the same handle as |that|
// object.
///
int (CEF_CALLBACK *is_same)(struct _cef_v8context_t* self,
struct _cef_v8context_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_v8context_t* self,
struct _cef_v8context_t* that);
///
// Execute a string of JavaScript code in this V8 context. The |script_url|
@@ -130,12 +132,14 @@ typedef struct _cef_v8context_t {
// function will return true (1). On failure |exception| will be set to the
// exception, if any, and the function will return false (0).
///
int (CEF_CALLBACK *eval)(struct _cef_v8context_t* self,
const cef_string_t* code, const cef_string_t* script_url, int start_line,
struct _cef_v8value_t** retval, struct _cef_v8exception_t** exception);
int(CEF_CALLBACK* eval)(struct _cef_v8context_t* self,
const cef_string_t* code,
const cef_string_t* script_url,
int start_line,
struct _cef_v8value_t** retval,
struct _cef_v8exception_t** exception);
} cef_v8context_t;
///
// Returns the current (top) context object in the V8 context stack.
///
@@ -151,7 +155,6 @@ CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context();
///
CEF_EXPORT int cef_v8context_in_context();
///
// Structure that should be implemented to handle V8 function calls. The
// functions of this structure will be called on the thread associated with the
@@ -170,13 +173,15 @@ typedef struct _cef_v8handler_t {
// function return value. If execution fails set |exception| to the exception
// that will be thrown. Return true (1) if execution was handled.
///
int (CEF_CALLBACK *execute)(struct _cef_v8handler_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
size_t argumentsCount, struct _cef_v8value_t* const* arguments,
struct _cef_v8value_t** retval, cef_string_t* exception);
int(CEF_CALLBACK* execute)(struct _cef_v8handler_t* self,
const cef_string_t* name,
struct _cef_v8value_t* object,
size_t argumentsCount,
struct _cef_v8value_t* const* arguments,
struct _cef_v8value_t** retval,
cef_string_t* exception);
} cef_v8handler_t;
///
// Structure that should be implemented to handle V8 accessor calls. Accessor
// identifiers are registered by calling cef_v8value_t::set_value(). The
@@ -196,9 +201,11 @@ typedef struct _cef_v8accessor_t {
// exception that will be thrown. Return true (1) if accessor retrieval was
// handled.
///
int (CEF_CALLBACK *get)(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t** retval, cef_string_t* exception);
int(CEF_CALLBACK* get)(struct _cef_v8accessor_t* self,
const cef_string_t* name,
struct _cef_v8value_t* object,
struct _cef_v8value_t** retval,
cef_string_t* exception);
///
// Handle assignment of the accessor value identified by |name|. |object| is
@@ -207,12 +214,13 @@ typedef struct _cef_v8accessor_t {
// exception that will be thrown. Return true (1) if accessor assignment was
// handled.
///
int (CEF_CALLBACK *set)(struct _cef_v8accessor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t* value, cef_string_t* exception);
int(CEF_CALLBACK* set)(struct _cef_v8accessor_t* self,
const cef_string_t* name,
struct _cef_v8value_t* object,
struct _cef_v8value_t* value,
cef_string_t* exception);
} cef_v8accessor_t;
///
// Structure that should be implemented to handle V8 interceptor calls. The
// functions of this structure will be called on the thread associated with the
@@ -236,9 +244,11 @@ typedef struct _cef_v8interceptor_t {
// accessor, it will be called only if you don't set |retval|. Return true (1)
// if interceptor retrieval was handled, false (0) otherwise.
///
int (CEF_CALLBACK *get_byname)(struct _cef_v8interceptor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t** retval, cef_string_t* exception);
int(CEF_CALLBACK* get_byname)(struct _cef_v8interceptor_t* self,
const cef_string_t* name,
struct _cef_v8value_t* object,
struct _cef_v8value_t** retval,
cef_string_t* exception);
///
// Handle retrieval of the interceptor value identified by |index|. |object|
@@ -248,9 +258,11 @@ typedef struct _cef_v8interceptor_t {
// |exception| to the exception that will be thrown. Return true (1) if
// interceptor retrieval was handled, false (0) otherwise.
///
int (CEF_CALLBACK *get_byindex)(struct _cef_v8interceptor_t* self, int index,
struct _cef_v8value_t* object, struct _cef_v8value_t** retval,
cef_string_t* exception);
int(CEF_CALLBACK* get_byindex)(struct _cef_v8interceptor_t* self,
int index,
struct _cef_v8value_t* object,
struct _cef_v8value_t** retval,
cef_string_t* exception);
///
// Handle assignment of the interceptor value identified by |name|. |object|
@@ -260,9 +272,11 @@ typedef struct _cef_v8interceptor_t {
// be called, even when the property has an associated accessor. Return true
// (1) if interceptor assignment was handled, false (0) otherwise.
///
int (CEF_CALLBACK *set_byname)(struct _cef_v8interceptor_t* self,
const cef_string_t* name, struct _cef_v8value_t* object,
struct _cef_v8value_t* value, cef_string_t* exception);
int(CEF_CALLBACK* set_byname)(struct _cef_v8interceptor_t* self,
const cef_string_t* name,
struct _cef_v8value_t* object,
struct _cef_v8value_t* value,
cef_string_t* exception);
///
// Handle assignment of the interceptor value identified by |index|. |object|
@@ -271,12 +285,13 @@ typedef struct _cef_v8interceptor_t {
// |exception| to the exception that will be thrown. Return true (1) if
// interceptor assignment was handled, false (0) otherwise.
///
int (CEF_CALLBACK *set_byindex)(struct _cef_v8interceptor_t* self, int index,
struct _cef_v8value_t* object, struct _cef_v8value_t* value,
cef_string_t* exception);
int(CEF_CALLBACK* set_byindex)(struct _cef_v8interceptor_t* self,
int index,
struct _cef_v8value_t* object,
struct _cef_v8value_t* value,
cef_string_t* exception);
} cef_v8interceptor_t;
///
// Structure representing a V8 exception. The functions of this structure may be
// called on any render process thread.
@@ -291,14 +306,14 @@ typedef struct _cef_v8exception_t {
// Returns the exception message.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_message)(
cef_string_userfree_t(CEF_CALLBACK* get_message)(
struct _cef_v8exception_t* self);
///
// Returns the line of source code that the exception occurred within.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_source_line)(
cef_string_userfree_t(CEF_CALLBACK* get_source_line)(
struct _cef_v8exception_t* self);
///
@@ -306,41 +321,40 @@ typedef struct _cef_v8exception_t {
// the error originates.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_script_resource_name)(
cef_string_userfree_t(CEF_CALLBACK* get_script_resource_name)(
struct _cef_v8exception_t* self);
///
// Returns the 1-based number of the line where the error occurred or 0 if the
// line number is unknown.
///
int (CEF_CALLBACK *get_line_number)(struct _cef_v8exception_t* self);
int(CEF_CALLBACK* get_line_number)(struct _cef_v8exception_t* self);
///
// Returns the index within the script of the first character where the error
// occurred.
///
int (CEF_CALLBACK *get_start_position)(struct _cef_v8exception_t* self);
int(CEF_CALLBACK* get_start_position)(struct _cef_v8exception_t* self);
///
// Returns the index within the script of the last character where the error
// occurred.
///
int (CEF_CALLBACK *get_end_position)(struct _cef_v8exception_t* self);
int(CEF_CALLBACK* get_end_position)(struct _cef_v8exception_t* self);
///
// Returns the index within the line of the first character where the error
// occurred.
///
int (CEF_CALLBACK *get_start_column)(struct _cef_v8exception_t* self);
int(CEF_CALLBACK* get_start_column)(struct _cef_v8exception_t* self);
///
// Returns the index within the line of the last character where the error
// occurred.
///
int (CEF_CALLBACK *get_end_column)(struct _cef_v8exception_t* self);
int(CEF_CALLBACK* get_end_column)(struct _cef_v8exception_t* self);
} cef_v8exception_t;
///
// Structure representing a V8 value handle. V8 handles can only be accessed
// from the thread on which they are created. Valid threads for creating a V8
@@ -359,103 +373,102 @@ typedef struct _cef_v8value_t {
// on the current thread. Do not call any other functions if this function
// returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_v8value_t* self);
///
// True if the value type is undefined.
///
int (CEF_CALLBACK *is_undefined)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_undefined)(struct _cef_v8value_t* self);
///
// True if the value type is null.
///
int (CEF_CALLBACK *is_null)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_null)(struct _cef_v8value_t* self);
///
// True if the value type is bool.
///
int (CEF_CALLBACK *is_bool)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_bool)(struct _cef_v8value_t* self);
///
// True if the value type is int.
///
int (CEF_CALLBACK *is_int)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_int)(struct _cef_v8value_t* self);
///
// True if the value type is unsigned int.
///
int (CEF_CALLBACK *is_uint)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_uint)(struct _cef_v8value_t* self);
///
// True if the value type is double.
///
int (CEF_CALLBACK *is_double)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_double)(struct _cef_v8value_t* self);
///
// True if the value type is Date.
///
int (CEF_CALLBACK *is_date)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_date)(struct _cef_v8value_t* self);
///
// True if the value type is string.
///
int (CEF_CALLBACK *is_string)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_string)(struct _cef_v8value_t* self);
///
// True if the value type is object.
///
int (CEF_CALLBACK *is_object)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_object)(struct _cef_v8value_t* self);
///
// True if the value type is array.
///
int (CEF_CALLBACK *is_array)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_array)(struct _cef_v8value_t* self);
///
// True if the value type is function.
///
int (CEF_CALLBACK *is_function)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_function)(struct _cef_v8value_t* self);
///
// Returns true (1) if this object is pointing to the same handle as |that|
// object.
///
int (CEF_CALLBACK *is_same)(struct _cef_v8value_t* self,
struct _cef_v8value_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_v8value_t* self,
struct _cef_v8value_t* that);
///
// Return a bool value.
///
int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* get_bool_value)(struct _cef_v8value_t* self);
///
// Return an int value.
///
int32 (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self);
int32(CEF_CALLBACK* get_int_value)(struct _cef_v8value_t* self);
///
// Return an unsigned int value.
///
uint32 (CEF_CALLBACK *get_uint_value)(struct _cef_v8value_t* self);
uint32(CEF_CALLBACK* get_uint_value)(struct _cef_v8value_t* self);
///
// Return a double value.
///
double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self);
double(CEF_CALLBACK* get_double_value)(struct _cef_v8value_t* self);
///
// Return a Date value.
///
cef_time_t (CEF_CALLBACK *get_date_value)(struct _cef_v8value_t* self);
cef_time_t(CEF_CALLBACK* get_date_value)(struct _cef_v8value_t* self);
///
// Return a string value.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_string_value)(
cef_string_userfree_t(CEF_CALLBACK* get_string_value)(
struct _cef_v8value_t* self);
// OBJECT METHODS - These functions are only available on objects. Arrays and
// functions are also objects. String- and integer-based keys can be used
// interchangably with the framework converting between them as necessary.
@@ -463,31 +476,31 @@ typedef struct _cef_v8value_t {
///
// Returns true (1) if this is a user created object.
///
int (CEF_CALLBACK *is_user_created)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* is_user_created)(struct _cef_v8value_t* self);
///
// Returns true (1) if the last function call resulted in an exception. This
// attribute exists only in the scope of the current CEF value object.
///
int (CEF_CALLBACK *has_exception)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* has_exception)(struct _cef_v8value_t* self);
///
// Returns the exception resulting from the last function call. This attribute
// exists only in the scope of the current CEF value object.
///
struct _cef_v8exception_t* (CEF_CALLBACK *get_exception)(
struct _cef_v8exception_t*(CEF_CALLBACK* get_exception)(
struct _cef_v8value_t* self);
///
// Clears the last exception and returns true (1) on success.
///
int (CEF_CALLBACK *clear_exception)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* clear_exception)(struct _cef_v8value_t* self);
///
// Returns true (1) if this object will re-throw future exceptions. This
// attribute exists only in the scope of the current CEF value object.
///
int (CEF_CALLBACK *will_rethrow_exceptions)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* will_rethrow_exceptions)(struct _cef_v8value_t* self);
///
// Set whether this object will re-throw future exceptions. By default
@@ -496,19 +509,19 @@ typedef struct _cef_v8value_t {
// caught and not re-thrown. Returns true (1) on success. This attribute
// exists only in the scope of the current CEF value object.
///
int (CEF_CALLBACK *set_rethrow_exceptions)(struct _cef_v8value_t* self,
int rethrow);
int(CEF_CALLBACK* set_rethrow_exceptions)(struct _cef_v8value_t* self,
int rethrow);
///
// Returns true (1) if the object has a value with the specified identifier.
///
int (CEF_CALLBACK *has_value_bykey)(struct _cef_v8value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* has_value_bykey)(struct _cef_v8value_t* self,
const cef_string_t* key);
///
// Returns true (1) if the object has a value with the specified identifier.
///
int (CEF_CALLBACK *has_value_byindex)(struct _cef_v8value_t* self, int index);
int(CEF_CALLBACK* has_value_byindex)(struct _cef_v8value_t* self, int index);
///
// Deletes the value with the specified identifier and returns true (1) on
@@ -516,8 +529,8 @@ typedef struct _cef_v8value_t {
// exception is thrown. For read-only and don't-delete values this function
// will return true (1) even though deletion failed.
///
int (CEF_CALLBACK *delete_value_bykey)(struct _cef_v8value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* delete_value_bykey)(struct _cef_v8value_t* self,
const cef_string_t* key);
///
// Deletes the value with the specified identifier and returns true (1) on
@@ -525,22 +538,23 @@ typedef struct _cef_v8value_t {
// fails or an exception is thrown. For read-only and don't-delete values this
// function will return true (1) even though deletion failed.
///
int (CEF_CALLBACK *delete_value_byindex)(struct _cef_v8value_t* self,
int index);
int(CEF_CALLBACK* delete_value_byindex)(struct _cef_v8value_t* self,
int index);
///
// Returns the value with the specified identifier on success. Returns NULL if
// this function is called incorrectly or an exception is thrown.
///
struct _cef_v8value_t* (CEF_CALLBACK *get_value_bykey)(
struct _cef_v8value_t* self, const cef_string_t* key);
struct _cef_v8value_t*(CEF_CALLBACK* get_value_bykey)(
struct _cef_v8value_t* self,
const cef_string_t* key);
///
// Returns the value with the specified identifier on success. Returns NULL if
// this function is called incorrectly or an exception is thrown.
///
struct _cef_v8value_t* (CEF_CALLBACK *get_value_byindex)(
struct _cef_v8value_t* self, int index);
struct _cef_v8value_t*(
CEF_CALLBACK* get_value_byindex)(struct _cef_v8value_t* self, int index);
///
// Associates a value with the specified identifier and returns true (1) on
@@ -548,9 +562,10 @@ typedef struct _cef_v8value_t {
// exception is thrown. For read-only values this function will return true
// (1) even though assignment failed.
///
int (CEF_CALLBACK *set_value_bykey)(struct _cef_v8value_t* self,
const cef_string_t* key, struct _cef_v8value_t* value,
cef_v8_propertyattribute_t attribute);
int(CEF_CALLBACK* set_value_bykey)(struct _cef_v8value_t* self,
const cef_string_t* key,
struct _cef_v8value_t* value,
cef_v8_propertyattribute_t attribute);
///
// Associates a value with the specified identifier and returns true (1) on
@@ -558,8 +573,9 @@ typedef struct _cef_v8value_t {
// exception is thrown. For read-only values this function will return true
// (1) even though assignment failed.
///
int (CEF_CALLBACK *set_value_byindex)(struct _cef_v8value_t* self, int index,
struct _cef_v8value_t* value);
int(CEF_CALLBACK* set_value_byindex)(struct _cef_v8value_t* self,
int index,
struct _cef_v8value_t* value);
///
// Registers an identifier and returns true (1) on success. Access to the
@@ -568,36 +584,37 @@ typedef struct _cef_v8value_t {
// function is called incorrectly or an exception is thrown. For read-only
// values this function will return true (1) even though assignment failed.
///
int (CEF_CALLBACK *set_value_byaccessor)(struct _cef_v8value_t* self,
const cef_string_t* key, cef_v8_accesscontrol_t settings,
cef_v8_propertyattribute_t attribute);
int(CEF_CALLBACK* set_value_byaccessor)(struct _cef_v8value_t* self,
const cef_string_t* key,
cef_v8_accesscontrol_t settings,
cef_v8_propertyattribute_t attribute);
///
// Read the keys for the object's values into the specified vector. Integer-
// based keys will also be returned as strings.
///
int (CEF_CALLBACK *get_keys)(struct _cef_v8value_t* self,
cef_string_list_t keys);
int(CEF_CALLBACK* get_keys)(struct _cef_v8value_t* self,
cef_string_list_t keys);
///
// Sets the user data for this object and returns true (1) on success. Returns
// false (0) if this function is called incorrectly. This function can only be
// called on user created objects.
///
int (CEF_CALLBACK *set_user_data)(struct _cef_v8value_t* self,
struct _cef_base_ref_counted_t* user_data);
int(CEF_CALLBACK* set_user_data)(struct _cef_v8value_t* self,
struct _cef_base_ref_counted_t* user_data);
///
// Returns the user data, if any, assigned to this object.
///
struct _cef_base_ref_counted_t* (CEF_CALLBACK *get_user_data)(
struct _cef_base_ref_counted_t*(CEF_CALLBACK* get_user_data)(
struct _cef_v8value_t* self);
///
// Returns the amount of externally allocated memory registered for the
// object.
///
int (CEF_CALLBACK *get_externally_allocated_memory)(
int(CEF_CALLBACK* get_externally_allocated_memory)(
struct _cef_v8value_t* self);
///
@@ -611,17 +628,16 @@ typedef struct _cef_v8value_t {
// returns the number of bytes associated with the object after the
// adjustment. This function can only be called on user created objects.
///
int (CEF_CALLBACK *adjust_externally_allocated_memory)(
struct _cef_v8value_t* self, int change_in_bytes);
int(CEF_CALLBACK* adjust_externally_allocated_memory)(
struct _cef_v8value_t* self,
int change_in_bytes);
// ARRAY METHODS - These functions are only available on arrays.
///
// Returns the number of elements in the array.
///
int (CEF_CALLBACK *get_array_length)(struct _cef_v8value_t* self);
int(CEF_CALLBACK* get_array_length)(struct _cef_v8value_t* self);
// FUNCTION METHODS - These functions are only available on functions.
@@ -629,13 +645,13 @@ typedef struct _cef_v8value_t {
// Returns the function name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_function_name)(
cef_string_userfree_t(CEF_CALLBACK* get_function_name)(
struct _cef_v8value_t* self);
///
// Returns the function handler or NULL if not a CEF-created function.
///
struct _cef_v8handler_t* (CEF_CALLBACK *get_function_handler)(
struct _cef_v8handler_t*(CEF_CALLBACK* get_function_handler)(
struct _cef_v8value_t* self);
///
@@ -649,9 +665,11 @@ typedef struct _cef_v8value_t {
// Returns NULL if this function is called incorrectly or an exception is
// thrown.
///
struct _cef_v8value_t* (CEF_CALLBACK *execute_function)(
struct _cef_v8value_t* self, struct _cef_v8value_t* object,
size_t argumentsCount, struct _cef_v8value_t* const* arguments);
struct _cef_v8value_t*(CEF_CALLBACK* execute_function)(
struct _cef_v8value_t* self,
struct _cef_v8value_t* object,
size_t argumentsCount,
struct _cef_v8value_t* const* arguments);
///
// Execute the function using the specified V8 context. |object| is the
@@ -661,13 +679,14 @@ typedef struct _cef_v8value_t {
// success. Returns NULL if this function is called incorrectly or an
// exception is thrown.
///
struct _cef_v8value_t* (CEF_CALLBACK *execute_function_with_context)(
struct _cef_v8value_t* self, struct _cef_v8context_t* context,
struct _cef_v8value_t* object, size_t argumentsCount,
struct _cef_v8value_t*(CEF_CALLBACK* execute_function_with_context)(
struct _cef_v8value_t* self,
struct _cef_v8context_t* context,
struct _cef_v8value_t* object,
size_t argumentsCount,
struct _cef_v8value_t* const* arguments);
} cef_v8value_t;
///
// Create a new cef_v8value_t object of type undefined.
///
@@ -718,7 +737,8 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value);
// callback, or in combination with calling enter() and exit() on a stored
// cef_v8context_t reference.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_v8accessor_t* accessor,
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(
cef_v8accessor_t* accessor,
cef_v8interceptor_t* interceptor);
///
@@ -738,8 +758,7 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_array(int length);
// enter() and exit() on a stored cef_v8context_t reference.
///
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,
cef_v8handler_t* handler);
cef_v8handler_t* handler);
///
// Structure representing a V8 stack trace handle. V8 handles can only be
@@ -759,28 +778,26 @@ typedef struct _cef_v8stack_trace_t {
// on the current thread. Do not call any other functions if this function
// returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_trace_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_v8stack_trace_t* self);
///
// Returns the number of stack frames.
///
int (CEF_CALLBACK *get_frame_count)(struct _cef_v8stack_trace_t* self);
int(CEF_CALLBACK* get_frame_count)(struct _cef_v8stack_trace_t* self);
///
// Returns the stack frame at the specified 0-based index.
///
struct _cef_v8stack_frame_t* (CEF_CALLBACK *get_frame)(
struct _cef_v8stack_trace_t* self, int index);
struct _cef_v8stack_frame_t*(
CEF_CALLBACK* get_frame)(struct _cef_v8stack_trace_t* self, int index);
} cef_v8stack_trace_t;
///
// Returns the stack trace for the currently active context. |frame_limit| is
// the maximum number of frames that will be captured.
///
CEF_EXPORT cef_v8stack_trace_t* cef_v8stack_trace_get_current(int frame_limit);
///
// Structure representing a V8 stack frame handle. V8 handles can only be
// accessed from the thread on which they are created. Valid threads for
@@ -799,13 +816,13 @@ typedef struct _cef_v8stack_frame_t {
// on the current thread. Do not call any other functions if this function
// returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_frame_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_v8stack_frame_t* self);
///
// Returns the name of the resource script that contains the function.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_script_name)(
cef_string_userfree_t(CEF_CALLBACK* get_script_name)(
struct _cef_v8stack_frame_t* self);
///
@@ -814,39 +831,38 @@ typedef struct _cef_v8stack_frame_t {
// "//@ sourceURL=..." string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_script_name_or_source_url)(
cef_string_userfree_t(CEF_CALLBACK* get_script_name_or_source_url)(
struct _cef_v8stack_frame_t* self);
///
// Returns the name of the function.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_function_name)(
cef_string_userfree_t(CEF_CALLBACK* get_function_name)(
struct _cef_v8stack_frame_t* self);
///
// Returns the 1-based line number for the function call or 0 if unknown.
///
int (CEF_CALLBACK *get_line_number)(struct _cef_v8stack_frame_t* self);
int(CEF_CALLBACK* get_line_number)(struct _cef_v8stack_frame_t* self);
///
// Returns the 1-based column offset on the line for the function call or 0 if
// unknown.
///
int (CEF_CALLBACK *get_column)(struct _cef_v8stack_frame_t* self);
int(CEF_CALLBACK* get_column)(struct _cef_v8stack_frame_t* self);
///
// Returns true (1) if the function was compiled using eval().
///
int (CEF_CALLBACK *is_eval)(struct _cef_v8stack_frame_t* self);
int(CEF_CALLBACK* is_eval)(struct _cef_v8stack_frame_t* self);
///
// Returns true (1) if the function was called as a constructor via "new".
///
int (CEF_CALLBACK *is_constructor)(struct _cef_v8stack_frame_t* self);
int(CEF_CALLBACK* is_constructor)(struct _cef_v8stack_frame_t* self);
} cef_v8stack_frame_t;
///
// Register a new V8 extension with the specified JavaScript extension code and
// handler. Functions implemented by the handler are prototyped using the
@@ -904,7 +920,8 @@ typedef struct _cef_v8stack_frame_t {
// </pre>
///
CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,
const cef_string_t* javascript_code, cef_v8handler_t* handler);
const cef_string_t* javascript_code,
cef_v8handler_t* handler);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=4119ecd62e8c308a5876e6a7ac92cf3ff7df6425$
//
#ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
@@ -67,64 +69,64 @@ typedef struct _cef_value_t {
// object can be re-used by calling Set*() even if the underlying data is
// invalid.
///
int (CEF_CALLBACK *is_valid)(struct _cef_value_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_value_t* self);
///
// Returns true (1) if the underlying data is owned by another object.
///
int (CEF_CALLBACK *is_owned)(struct _cef_value_t* self);
int(CEF_CALLBACK* is_owned)(struct _cef_value_t* self);
///
// Returns true (1) if the underlying data is read-only. Some APIs may expose
// read-only objects.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_value_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_value_t* self);
///
// Returns true (1) if this object and |that| object have the same underlying
// data. If true (1) modifications to this object will also affect |that|
// object and vice-versa.
///
int (CEF_CALLBACK *is_same)(struct _cef_value_t* self,
struct _cef_value_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_value_t* self,
struct _cef_value_t* that);
///
// Returns true (1) if this object and |that| object have an equivalent
// underlying value but are not necessarily the same object.
///
int (CEF_CALLBACK *is_equal)(struct _cef_value_t* self,
struct _cef_value_t* that);
int(CEF_CALLBACK* is_equal)(struct _cef_value_t* self,
struct _cef_value_t* that);
///
// Returns a copy of this object. The underlying data will also be copied.
///
struct _cef_value_t* (CEF_CALLBACK *copy)(struct _cef_value_t* self);
struct _cef_value_t*(CEF_CALLBACK* copy)(struct _cef_value_t* self);
///
// Returns the underlying value type.
///
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_value_t* self);
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_value_t* self);
///
// Returns the underlying value as type bool.
///
int (CEF_CALLBACK *get_bool)(struct _cef_value_t* self);
int(CEF_CALLBACK* get_bool)(struct _cef_value_t* self);
///
// Returns the underlying value as type int.
///
int (CEF_CALLBACK *get_int)(struct _cef_value_t* self);
int(CEF_CALLBACK* get_int)(struct _cef_value_t* self);
///
// Returns the underlying value as type double.
///
double (CEF_CALLBACK *get_double)(struct _cef_value_t* self);
double(CEF_CALLBACK* get_double)(struct _cef_value_t* self);
///
// Returns the underlying value as type string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_string)(struct _cef_value_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_string)(struct _cef_value_t* self);
///
// Returns the underlying value as type binary. The returned reference may
@@ -134,7 +136,7 @@ typedef struct _cef_value_t {
// the set_value() function instead of passing the returned reference to
// set_binary().
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
struct _cef_value_t* self);
///
@@ -145,7 +147,7 @@ typedef struct _cef_value_t {
// the set_value() function instead of passing the returned reference to
// set_dictionary().
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
struct _cef_value_t* self);
///
@@ -156,71 +158,69 @@ typedef struct _cef_value_t {
// the set_value() function instead of passing the returned reference to
// set_list().
///
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(struct _cef_value_t* self);
struct _cef_list_value_t*(CEF_CALLBACK* get_list)(struct _cef_value_t* self);
///
// Sets the underlying value as type null. Returns true (1) if the value was
// set successfully.
///
int (CEF_CALLBACK *set_null)(struct _cef_value_t* self);
int(CEF_CALLBACK* set_null)(struct _cef_value_t* self);
///
// Sets the underlying value as type bool. Returns true (1) if the value was
// set successfully.
///
int (CEF_CALLBACK *set_bool)(struct _cef_value_t* self, int value);
int(CEF_CALLBACK* set_bool)(struct _cef_value_t* self, int value);
///
// Sets the underlying value as type int. Returns true (1) if the value was
// set successfully.
///
int (CEF_CALLBACK *set_int)(struct _cef_value_t* self, int value);
int(CEF_CALLBACK* set_int)(struct _cef_value_t* self, int value);
///
// Sets the underlying value as type double. Returns true (1) if the value was
// set successfully.
///
int (CEF_CALLBACK *set_double)(struct _cef_value_t* self, double value);
int(CEF_CALLBACK* set_double)(struct _cef_value_t* self, double value);
///
// Sets the underlying value as type string. Returns true (1) if the value was
// set successfully.
///
int (CEF_CALLBACK *set_string)(struct _cef_value_t* self,
const cef_string_t* value);
int(CEF_CALLBACK* set_string)(struct _cef_value_t* self,
const cef_string_t* value);
///
// Sets the underlying value as type binary. Returns true (1) if the value was
// set successfully. This object keeps a reference to |value| and ownership of
// the underlying data remains unchanged.
///
int (CEF_CALLBACK *set_binary)(struct _cef_value_t* self,
struct _cef_binary_value_t* value);
int(CEF_CALLBACK* set_binary)(struct _cef_value_t* self,
struct _cef_binary_value_t* value);
///
// Sets the underlying value as type dict. Returns true (1) if the value was
// set successfully. This object keeps a reference to |value| and ownership of
// the underlying data remains unchanged.
///
int (CEF_CALLBACK *set_dictionary)(struct _cef_value_t* self,
struct _cef_dictionary_value_t* value);
int(CEF_CALLBACK* set_dictionary)(struct _cef_value_t* self,
struct _cef_dictionary_value_t* value);
///
// Sets the underlying value as type list. Returns true (1) if the value was
// set successfully. This object keeps a reference to |value| and ownership of
// the underlying data remains unchanged.
///
int (CEF_CALLBACK *set_list)(struct _cef_value_t* self,
struct _cef_list_value_t* value);
int(CEF_CALLBACK* set_list)(struct _cef_value_t* self,
struct _cef_list_value_t* value);
} cef_value_t;
///
// Creates a new object.
///
CEF_EXPORT cef_value_t* cef_value_create();
///
// Structure representing a binary value. Can be used on any process and thread.
///
@@ -236,54 +236,54 @@ typedef struct _cef_binary_value_t {
// and that other object is then modified or destroyed. Do not call any other
// functions if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_binary_value_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_binary_value_t* self);
///
// Returns true (1) if this object is currently owned by another object.
///
int (CEF_CALLBACK *is_owned)(struct _cef_binary_value_t* self);
int(CEF_CALLBACK* is_owned)(struct _cef_binary_value_t* self);
///
// Returns true (1) if this object and |that| object have the same underlying
// data.
///
int (CEF_CALLBACK *is_same)(struct _cef_binary_value_t* self,
struct _cef_binary_value_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_binary_value_t* self,
struct _cef_binary_value_t* that);
///
// Returns true (1) if this object and |that| object have an equivalent
// underlying value but are not necessarily the same object.
///
int (CEF_CALLBACK *is_equal)(struct _cef_binary_value_t* self,
struct _cef_binary_value_t* that);
int(CEF_CALLBACK* is_equal)(struct _cef_binary_value_t* self,
struct _cef_binary_value_t* that);
///
// Returns a copy of this object. The data in this object will also be copied.
///
struct _cef_binary_value_t* (CEF_CALLBACK *copy)(
struct _cef_binary_value_t*(CEF_CALLBACK* copy)(
struct _cef_binary_value_t* self);
///
// Returns the data size.
///
size_t (CEF_CALLBACK *get_size)(struct _cef_binary_value_t* self);
size_t(CEF_CALLBACK* get_size)(struct _cef_binary_value_t* self);
///
// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
// the specified byte |data_offset|. Returns the number of bytes read.
///
size_t (CEF_CALLBACK *get_data)(struct _cef_binary_value_t* self,
void* buffer, size_t buffer_size, size_t data_offset);
size_t(CEF_CALLBACK* get_data)(struct _cef_binary_value_t* self,
void* buffer,
size_t buffer_size,
size_t data_offset);
} cef_binary_value_t;
///
// Creates a new object that is not owned by any other object. The specified
// |data| will be copied.
///
CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
size_t data_size);
size_t data_size);
///
// Structure representing a dictionary value. Can be used on any process and
@@ -301,75 +301,76 @@ typedef struct _cef_dictionary_value_t {
// and that other object is then modified or destroyed. Do not call any other
// functions if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_dictionary_value_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_dictionary_value_t* self);
///
// Returns true (1) if this object is currently owned by another object.
///
int (CEF_CALLBACK *is_owned)(struct _cef_dictionary_value_t* self);
int(CEF_CALLBACK* is_owned)(struct _cef_dictionary_value_t* self);
///
// Returns true (1) if the values of this object are read-only. Some APIs may
// expose read-only objects.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_dictionary_value_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_dictionary_value_t* self);
///
// Returns true (1) if this object and |that| object have the same underlying
// data. If true (1) modifications to this object will also affect |that|
// object and vice-versa.
///
int (CEF_CALLBACK *is_same)(struct _cef_dictionary_value_t* self,
struct _cef_dictionary_value_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_dictionary_value_t* self,
struct _cef_dictionary_value_t* that);
///
// Returns true (1) if this object and |that| object have an equivalent
// underlying value but are not necessarily the same object.
///
int (CEF_CALLBACK *is_equal)(struct _cef_dictionary_value_t* self,
struct _cef_dictionary_value_t* that);
int(CEF_CALLBACK* is_equal)(struct _cef_dictionary_value_t* self,
struct _cef_dictionary_value_t* that);
///
// Returns a writable copy of this object. If |exclude_NULL_children| is true
// (1) any NULL dictionaries or lists will be excluded from the copy.
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *copy)(
struct _cef_dictionary_value_t* self, int exclude_empty_children);
struct _cef_dictionary_value_t*(CEF_CALLBACK* copy)(
struct _cef_dictionary_value_t* self,
int exclude_empty_children);
///
// Returns the number of values.
///
size_t (CEF_CALLBACK *get_size)(struct _cef_dictionary_value_t* self);
size_t(CEF_CALLBACK* get_size)(struct _cef_dictionary_value_t* self);
///
// Removes all values. Returns true (1) on success.
///
int (CEF_CALLBACK *clear)(struct _cef_dictionary_value_t* self);
int(CEF_CALLBACK* clear)(struct _cef_dictionary_value_t* self);
///
// Returns true (1) if the current dictionary has a value for the given key.
///
int (CEF_CALLBACK *has_key)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* has_key)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Reads all keys for this dictionary into the specified vector.
///
int (CEF_CALLBACK *get_keys)(struct _cef_dictionary_value_t* self,
cef_string_list_t keys);
int(CEF_CALLBACK* get_keys)(struct _cef_dictionary_value_t* self,
cef_string_list_t keys);
///
// Removes the value at the specified key. Returns true (1) is the value was
// removed successfully.
///
int (CEF_CALLBACK *remove)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* remove)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value type for the specified key.
///
cef_value_type_t (CEF_CALLBACK *get_type)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key. For simple types the returned value
@@ -378,56 +379,61 @@ typedef struct _cef_dictionary_value_t {
// will reference existing data and modifications to the value will modify
// this object.
///
struct _cef_value_t* (CEF_CALLBACK *get_value)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
struct _cef_value_t*(CEF_CALLBACK* get_value)(
struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type bool.
///
int (CEF_CALLBACK *get_bool)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* get_bool)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type int.
///
int (CEF_CALLBACK *get_int)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* get_int)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type double.
///
double (CEF_CALLBACK *get_double)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
double(CEF_CALLBACK* get_double)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_string)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
cef_string_userfree_t(CEF_CALLBACK* get_string)(
struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type binary. The returned value
// will reference existing data.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type dictionary. The returned
// value will reference existing data and modifications to the value will
// modify this object.
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Returns the value at the specified key as type list. The returned value
// will reference existing data and modifications to the value will modify
// this object.
///
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
struct _cef_dictionary_value_t* self, const cef_string_t* key);
struct _cef_list_value_t*(CEF_CALLBACK* get_list)(
struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Sets the value at the specified key. Returns true (1) if the value was set
@@ -437,43 +443,48 @@ typedef struct _cef_dictionary_value_t {
// underlying data will be referenced and modifications to |value| will modify
// this object.
///
int (CEF_CALLBACK *set_value)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, struct _cef_value_t* value);
int(CEF_CALLBACK* set_value)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
struct _cef_value_t* value);
///
// Sets the value at the specified key as type null. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_null)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
int(CEF_CALLBACK* set_null)(struct _cef_dictionary_value_t* self,
const cef_string_t* key);
///
// Sets the value at the specified key as type bool. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_bool)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, int value);
int(CEF_CALLBACK* set_bool)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
int value);
///
// Sets the value at the specified key as type int. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_int)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, int value);
int(CEF_CALLBACK* set_int)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
int value);
///
// Sets the value at the specified key as type double. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_double)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, double value);
int(CEF_CALLBACK* set_double)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
double value);
///
// Sets the value at the specified key as type string. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_string)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, const cef_string_t* value);
int(CEF_CALLBACK* set_string)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
const cef_string_t* value);
///
// Sets the value at the specified key as type binary. Returns true (1) if the
@@ -482,8 +493,9 @@ typedef struct _cef_dictionary_value_t {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
int (CEF_CALLBACK *set_binary)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, struct _cef_binary_value_t* value);
int(CEF_CALLBACK* set_binary)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
struct _cef_binary_value_t* value);
///
// Sets the value at the specified key as type dict. Returns true (1) if the
@@ -492,8 +504,9 @@ typedef struct _cef_dictionary_value_t {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
int (CEF_CALLBACK *set_dictionary)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, struct _cef_dictionary_value_t* value);
int(CEF_CALLBACK* set_dictionary)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
struct _cef_dictionary_value_t* value);
///
// Sets the value at the specified key as type list. Returns true (1) if the
@@ -502,17 +515,16 @@ typedef struct _cef_dictionary_value_t {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
int (CEF_CALLBACK *set_list)(struct _cef_dictionary_value_t* self,
const cef_string_t* key, struct _cef_list_value_t* value);
int(CEF_CALLBACK* set_list)(struct _cef_dictionary_value_t* self,
const cef_string_t* key,
struct _cef_list_value_t* value);
} cef_dictionary_value_t;
///
// Creates a new object that is not owned by any other object.
///
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create();
///
// Structure representing a list value. Can be used on any process and thread.
///
@@ -528,66 +540,65 @@ typedef struct _cef_list_value_t {
// and that other object is then modified or destroyed. Do not call any other
// functions if this function returns false (0).
///
int (CEF_CALLBACK *is_valid)(struct _cef_list_value_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_list_value_t* self);
///
// Returns true (1) if this object is currently owned by another object.
///
int (CEF_CALLBACK *is_owned)(struct _cef_list_value_t* self);
int(CEF_CALLBACK* is_owned)(struct _cef_list_value_t* self);
///
// Returns true (1) if the values of this object are read-only. Some APIs may
// expose read-only objects.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_list_value_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_list_value_t* self);
///
// Returns true (1) if this object and |that| object have the same underlying
// data. If true (1) modifications to this object will also affect |that|
// object and vice-versa.
///
int (CEF_CALLBACK *is_same)(struct _cef_list_value_t* self,
struct _cef_list_value_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_list_value_t* self,
struct _cef_list_value_t* that);
///
// Returns true (1) if this object and |that| object have an equivalent
// underlying value but are not necessarily the same object.
///
int (CEF_CALLBACK *is_equal)(struct _cef_list_value_t* self,
struct _cef_list_value_t* that);
int(CEF_CALLBACK* is_equal)(struct _cef_list_value_t* self,
struct _cef_list_value_t* that);
///
// Returns a writable copy of this object.
///
struct _cef_list_value_t* (CEF_CALLBACK *copy)(
struct _cef_list_value_t* self);
struct _cef_list_value_t*(CEF_CALLBACK* copy)(struct _cef_list_value_t* self);
///
// Sets the number of values. If the number of values is expanded all new
// value slots will default to type null. Returns true (1) on success.
///
int (CEF_CALLBACK *set_size)(struct _cef_list_value_t* self, size_t size);
int(CEF_CALLBACK* set_size)(struct _cef_list_value_t* self, size_t size);
///
// Returns the number of values.
///
size_t (CEF_CALLBACK *get_size)(struct _cef_list_value_t* self);
size_t(CEF_CALLBACK* get_size)(struct _cef_list_value_t* self);
///
// Removes all values. Returns true (1) on success.
///
int (CEF_CALLBACK *clear)(struct _cef_list_value_t* self);
int(CEF_CALLBACK* clear)(struct _cef_list_value_t* self);
///
// Removes the value at the specified index.
///
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, size_t index);
int(CEF_CALLBACK* remove)(struct _cef_list_value_t* self, size_t index);
///
// Returns the value type at the specified index.
///
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,
size_t index);
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_list_value_t* self,
size_t index);
///
// Returns the value at the specified index. For simple types the returned
@@ -596,54 +607,55 @@ typedef struct _cef_list_value_t {
// returned value will reference existing data and modifications to the value
// will modify this object.
///
struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,
size_t index);
struct _cef_value_t*(CEF_CALLBACK* get_value)(struct _cef_list_value_t* self,
size_t index);
///
// Returns the value at the specified index as type bool.
///
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, size_t index);
int(CEF_CALLBACK* get_bool)(struct _cef_list_value_t* self, size_t index);
///
// Returns the value at the specified index as type int.
///
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, size_t index);
int(CEF_CALLBACK* get_int)(struct _cef_list_value_t* self, size_t index);
///
// Returns the value at the specified index as type double.
///
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self,
size_t index);
double(CEF_CALLBACK* get_double)(struct _cef_list_value_t* self,
size_t index);
///
// Returns the value at the specified index as type string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_string)(
struct _cef_list_value_t* self, size_t index);
cef_string_userfree_t(
CEF_CALLBACK* get_string)(struct _cef_list_value_t* self, size_t index);
///
// Returns the value at the specified index as type binary. The returned value
// will reference existing data.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
struct _cef_list_value_t* self, size_t index);
struct _cef_binary_value_t*(
CEF_CALLBACK* get_binary)(struct _cef_list_value_t* self, size_t index);
///
// Returns the value at the specified index as type dictionary. The returned
// value will reference existing data and modifications to the value will
// modify this object.
///
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
struct _cef_list_value_t* self, size_t index);
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
struct _cef_list_value_t* self,
size_t index);
///
// Returns the value at the specified index as type list. The returned value
// will reference existing data and modifications to the value will modify
// this object.
///
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
struct _cef_list_value_t* self, size_t index);
struct _cef_list_value_t*(
CEF_CALLBACK* get_list)(struct _cef_list_value_t* self, size_t index);
///
// Sets the value at the specified index. Returns true (1) if the value was
@@ -653,42 +665,47 @@ typedef struct _cef_list_value_t {
// then the underlying data will be referenced and modifications to |value|
// will modify this object.
///
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, size_t index,
struct _cef_value_t* value);
int(CEF_CALLBACK* set_value)(struct _cef_list_value_t* self,
size_t index,
struct _cef_value_t* value);
///
// Sets the value at the specified index as type null. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, size_t index);
int(CEF_CALLBACK* set_null)(struct _cef_list_value_t* self, size_t index);
///
// Sets the value at the specified index as type bool. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, size_t index,
int value);
int(CEF_CALLBACK* set_bool)(struct _cef_list_value_t* self,
size_t index,
int value);
///
// Sets the value at the specified index as type int. Returns true (1) if the
// value was set successfully.
///
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, size_t index,
int value);
int(CEF_CALLBACK* set_int)(struct _cef_list_value_t* self,
size_t index,
int value);
///
// Sets the value at the specified index as type double. Returns true (1) if
// the value was set successfully.
///
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, size_t index,
double value);
int(CEF_CALLBACK* set_double)(struct _cef_list_value_t* self,
size_t index,
double value);
///
// Sets the value at the specified index as type string. Returns true (1) if
// the value was set successfully.
///
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, size_t index,
const cef_string_t* value);
int(CEF_CALLBACK* set_string)(struct _cef_list_value_t* self,
size_t index,
const cef_string_t* value);
///
// Sets the value at the specified index as type binary. Returns true (1) if
@@ -697,8 +714,9 @@ typedef struct _cef_list_value_t {
// change. Otherwise, ownership will be transferred to this object and the
// |value| reference will be invalidated.
///
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, size_t index,
struct _cef_binary_value_t* value);
int(CEF_CALLBACK* set_binary)(struct _cef_list_value_t* self,
size_t index,
struct _cef_binary_value_t* value);
///
// Sets the value at the specified index as type dict. Returns true (1) if the
@@ -707,8 +725,9 @@ typedef struct _cef_list_value_t {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self,
size_t index, struct _cef_dictionary_value_t* value);
int(CEF_CALLBACK* set_dictionary)(struct _cef_list_value_t* self,
size_t index,
struct _cef_dictionary_value_t* value);
///
// Sets the value at the specified index as type list. Returns true (1) if the
@@ -717,17 +736,16 @@ typedef struct _cef_list_value_t {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, size_t index,
struct _cef_list_value_t* value);
int(CEF_CALLBACK* set_list)(struct _cef_list_value_t* self,
size_t index,
struct _cef_list_value_t* value);
} cef_list_value_t;
///
// Creates a new object that is not owned by any other object.
///
CEF_EXPORT cef_list_value_t* cef_list_value_create();
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a8fdbd327fff7769353b0aba47c74cba61333144$
//
#ifndef CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// WaitableEvent is a thread synchronization tool that allows one thread to wait
// for another thread to finish some work. This is equivalent to using a
@@ -65,27 +66,27 @@ typedef struct _cef_waitable_event_t {
///
// Put the event in the un-signaled state.
///
void (CEF_CALLBACK *reset)(struct _cef_waitable_event_t* self);
void(CEF_CALLBACK* reset)(struct _cef_waitable_event_t* self);
///
// Put the event in the signaled state. This causes any thread blocked on Wait
// to be woken up.
///
void (CEF_CALLBACK *signal)(struct _cef_waitable_event_t* self);
void(CEF_CALLBACK* signal)(struct _cef_waitable_event_t* self);
///
// Returns true (1) if the event is in the signaled state, else false (0). If
// the event was created with |automatic_reset| set to true (1) then calling
// this function will also cause a reset.
///
int (CEF_CALLBACK *is_signaled)(struct _cef_waitable_event_t* self);
int(CEF_CALLBACK* is_signaled)(struct _cef_waitable_event_t* self);
///
// Wait indefinitely for the event to be signaled. This function will not
// return until after the call to signal() has completed. This function cannot
// be called on the browser process UI or IO threads.
///
void (CEF_CALLBACK *wait)(struct _cef_waitable_event_t* self);
void(CEF_CALLBACK* wait)(struct _cef_waitable_event_t* self);
///
// Wait up to |max_ms| milliseconds for the event to be signaled. Returns true
@@ -94,11 +95,10 @@ typedef struct _cef_waitable_event_t {
// until after the call to signal() has completed. This function cannot be
// called on the browser process UI or IO threads.
///
int (CEF_CALLBACK *timed_wait)(struct _cef_waitable_event_t* self,
int64 max_ms);
int(CEF_CALLBACK* timed_wait)(struct _cef_waitable_event_t* self,
int64 max_ms);
} cef_waitable_event_t;
///
// Create a new waitable event. If |automatic_reset| is true (1) then the event
// state is automatically reset to un-signaled after a single waiting thread has
@@ -106,10 +106,10 @@ typedef struct _cef_waitable_event_t {
// manually. If |initially_signaled| is true (1) then the event will start in
// the signaled state.
///
CEF_EXPORT cef_waitable_event_t* cef_waitable_event_create(int automatic_reset,
CEF_EXPORT cef_waitable_event_t* cef_waitable_event_create(
int automatic_reset,
int initially_signaled);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=95dbecaa1c2b67c99e32d29e7bcd3aff4d126baf$
//
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
@@ -59,32 +61,31 @@ typedef struct _cef_web_plugin_info_t {
// Returns the plugin name (i.e. Flash).
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_name)(
cef_string_userfree_t(CEF_CALLBACK* get_name)(
struct _cef_web_plugin_info_t* self);
///
// Returns the plugin file path (DLL/bundle/library).
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_path)(
cef_string_userfree_t(CEF_CALLBACK* get_path)(
struct _cef_web_plugin_info_t* self);
///
// Returns the version of the plugin (may be OS-specific).
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_version)(
cef_string_userfree_t(CEF_CALLBACK* get_version)(
struct _cef_web_plugin_info_t* self);
///
// Returns a description of the plugin from the version information.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_description)(
cef_string_userfree_t(CEF_CALLBACK* get_description)(
struct _cef_web_plugin_info_t* self);
} cef_web_plugin_info_t;
///
// Structure to implement for visiting web plugin information. The functions of
// this structure will be called on the browser process UI thread.
@@ -101,11 +102,12 @@ typedef struct _cef_web_plugin_info_visitor_t {
// Return false (0) to stop visiting plugins. This function may never be
// called if no plugins are found.
///
int (CEF_CALLBACK *visit)(struct _cef_web_plugin_info_visitor_t* self,
struct _cef_web_plugin_info_t* info, int count, int total);
int(CEF_CALLBACK* visit)(struct _cef_web_plugin_info_visitor_t* self,
struct _cef_web_plugin_info_t* info,
int count,
int total);
} cef_web_plugin_info_visitor_t;
///
// Structure to implement for receiving unstable plugin information. The
// functions of this structure will be called on the browser process IO thread.
@@ -121,12 +123,12 @@ typedef struct _cef_web_plugin_unstable_callback_t {
// true (1) if the plugin has reached the crash count threshold of 3 times in
// 120 seconds.
///
void (CEF_CALLBACK *is_unstable)(
void(CEF_CALLBACK* is_unstable)(
struct _cef_web_plugin_unstable_callback_t* self,
const cef_string_t* path, int unstable);
const cef_string_t* path,
int unstable);
} cef_web_plugin_unstable_callback_t;
///
// Implement this structure to receive notification when CDM registration is
// complete. The functions of this structure will be called on the browser
@@ -144,12 +146,12 @@ typedef struct _cef_register_cdm_callback_t {
// Otherwise, |result| and |error_message| will contain additional information
// about why registration failed.
///
void (CEF_CALLBACK *on_cdm_registration_complete)(
void(CEF_CALLBACK* on_cdm_registration_complete)(
struct _cef_register_cdm_callback_t* self,
cef_cdm_registration_error_t result, const cef_string_t* error_message);
cef_cdm_registration_error_t result,
const cef_string_t* error_message);
} cef_register_cdm_callback_t;
///
// Visit web plugin information. Can be called on any thread in the browser
// process.
@@ -181,7 +183,8 @@ CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path);
// Query if a plugin is unstable. Can be called on any thread in the browser
// process.
///
CEF_EXPORT void cef_is_web_plugin_unstable(const cef_string_t* path,
CEF_EXPORT void cef_is_web_plugin_unstable(
const cef_string_t* path,
cef_web_plugin_unstable_callback_t* callback);
///
@@ -229,7 +232,8 @@ CEF_EXPORT void cef_is_web_plugin_unstable(const cef_string_t* path,
// |callback| will receive a |result| value of
// CEF_CDM_REGISTRATION_ERROR_NOT_SUPPORTED.
///
CEF_EXPORT void cef_register_widevine_cdm(const cef_string_t* path,
CEF_EXPORT void cef_register_widevine_cdm(
const cef_string_t* path,
cef_register_cdm_callback_t* callback);
#ifdef __cplusplus

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=9eccfa7e4ebd9ccd0d3d7e0424a9595053e6febe$
//
#ifndef CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Structure representing the issuer or subject field of an X.509 certificate.
///
@@ -61,63 +62,66 @@ typedef struct _cef_x509cert_principal_t {
// (OU) and returns the first non-NULL one found.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_display_name)(
cef_string_userfree_t(CEF_CALLBACK* get_display_name)(
struct _cef_x509cert_principal_t* self);
///
// Returns the common name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_common_name)(
cef_string_userfree_t(CEF_CALLBACK* get_common_name)(
struct _cef_x509cert_principal_t* self);
///
// Returns the locality name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_locality_name)(
cef_string_userfree_t(CEF_CALLBACK* get_locality_name)(
struct _cef_x509cert_principal_t* self);
///
// Returns the state or province name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_state_or_province_name)(
cef_string_userfree_t(CEF_CALLBACK* get_state_or_province_name)(
struct _cef_x509cert_principal_t* self);
///
// Returns the country name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_country_name)(
cef_string_userfree_t(CEF_CALLBACK* get_country_name)(
struct _cef_x509cert_principal_t* self);
///
// Retrieve the list of street addresses.
///
void (CEF_CALLBACK *get_street_addresses)(
struct _cef_x509cert_principal_t* self, cef_string_list_t addresses);
void(CEF_CALLBACK* get_street_addresses)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t addresses);
///
// Retrieve the list of organization names.
///
void (CEF_CALLBACK *get_organization_names)(
struct _cef_x509cert_principal_t* self, cef_string_list_t names);
void(CEF_CALLBACK* get_organization_names)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t names);
///
// Retrieve the list of organization unit names.
///
void (CEF_CALLBACK *get_organization_unit_names)(
struct _cef_x509cert_principal_t* self, cef_string_list_t names);
void(CEF_CALLBACK* get_organization_unit_names)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t names);
///
// Retrieve the list of domain components.
///
void (CEF_CALLBACK *get_domain_components)(
struct _cef_x509cert_principal_t* self, cef_string_list_t components);
void(CEF_CALLBACK* get_domain_components)(
struct _cef_x509cert_principal_t* self,
cef_string_list_t components);
} cef_x509cert_principal_t;
///
// Structure representing a X.509 certificate.
///
@@ -132,53 +136,53 @@ typedef struct _cef_x509certificate_t {
// this represents the web server. The common name of the subject should
// match the host name of the web server.
///
struct _cef_x509cert_principal_t* (CEF_CALLBACK *get_subject)(
struct _cef_x509cert_principal_t*(CEF_CALLBACK* get_subject)(
struct _cef_x509certificate_t* self);
///
// Returns the issuer of the X.509 certificate.
///
struct _cef_x509cert_principal_t* (CEF_CALLBACK *get_issuer)(
struct _cef_x509cert_principal_t*(CEF_CALLBACK* get_issuer)(
struct _cef_x509certificate_t* self);
///
// Returns the DER encoded serial number for the X.509 certificate. The value
// possibly includes a leading 00 byte.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_serial_number)(
struct _cef_binary_value_t*(CEF_CALLBACK* get_serial_number)(
struct _cef_x509certificate_t* self);
///
// Returns the date before which the X.509 certificate is invalid.
// CefTime.GetTimeT() will return 0 if no date was specified.
///
cef_time_t (CEF_CALLBACK *get_valid_start)(
cef_time_t(CEF_CALLBACK* get_valid_start)(
struct _cef_x509certificate_t* self);
///
// Returns the date after which the X.509 certificate is invalid.
// CefTime.GetTimeT() will return 0 if no date was specified.
///
cef_time_t (CEF_CALLBACK *get_valid_expiry)(
cef_time_t(CEF_CALLBACK* get_valid_expiry)(
struct _cef_x509certificate_t* self);
///
// Returns the DER encoded data for the X.509 certificate.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_derencoded)(
struct _cef_binary_value_t*(CEF_CALLBACK* get_derencoded)(
struct _cef_x509certificate_t* self);
///
// Returns the PEM encoded data for the X.509 certificate.
///
struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)(
struct _cef_binary_value_t*(CEF_CALLBACK* get_pemencoded)(
struct _cef_x509certificate_t* self);
///
// Returns the number of certificates in the issuer chain. If 0, the
// certificate is self-signed.
///
size_t (CEF_CALLBACK *get_issuer_chain_size)(
size_t(CEF_CALLBACK* get_issuer_chain_size)(
struct _cef_x509certificate_t* self);
///
@@ -186,8 +190,9 @@ typedef struct _cef_x509certificate_t {
// to encode a certificate in the chain it is still present in the array but
// is an NULL string.
///
void (CEF_CALLBACK *get_derencoded_issuer_chain)(
struct _cef_x509certificate_t* self, size_t* chainCount,
void(CEF_CALLBACK* get_derencoded_issuer_chain)(
struct _cef_x509certificate_t* self,
size_t* chainCount,
struct _cef_binary_value_t** chain);
///
@@ -195,12 +200,12 @@ typedef struct _cef_x509certificate_t {
// to encode a certificate in the chain it is still present in the array but
// is an NULL string.
///
void (CEF_CALLBACK *get_pemencoded_issuer_chain)(
struct _cef_x509certificate_t* self, size_t* chainCount,
void(CEF_CALLBACK* get_pemencoded_issuer_chain)(
struct _cef_x509certificate_t* self,
size_t* chainCount,
struct _cef_binary_value_t** chain);
} cef_x509certificate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=8356c87c40363434391cc18f509b580860db4404$
//
#ifndef CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Structure that supports the reading of XML data via the libxml streaming API.
// The functions of this structure should only be called on the thread that
@@ -62,46 +63,45 @@ typedef struct _cef_xml_reader_t {
// called at least once to set the current cursor position. Returns true (1)
// if the cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_next_node)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* move_to_next_node)(struct _cef_xml_reader_t* self);
///
// Close the document. This should be called directly to ensure that cleanup
// occurs on the correct thread.
///
int (CEF_CALLBACK *close)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* close)(struct _cef_xml_reader_t* self);
///
// Returns true (1) if an error has been reported by the XML parser.
///
int (CEF_CALLBACK *has_error)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* has_error)(struct _cef_xml_reader_t* self);
///
// Returns the error string.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_error)(
cef_string_userfree_t(CEF_CALLBACK* get_error)(
struct _cef_xml_reader_t* self);
// The below functions retrieve data for the node at the current cursor
// position.
///
// Returns the node type.
///
cef_xml_node_type_t (CEF_CALLBACK *get_type)(struct _cef_xml_reader_t* self);
cef_xml_node_type_t(CEF_CALLBACK* get_type)(struct _cef_xml_reader_t* self);
///
// Returns the node depth. Depth starts at 0 for the root node.
///
int (CEF_CALLBACK *get_depth)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* get_depth)(struct _cef_xml_reader_t* self);
///
// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT-
// LocalPart for additional details.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_local_name)(
cef_string_userfree_t(CEF_CALLBACK* get_local_name)(
struct _cef_xml_reader_t* self);
///
@@ -109,7 +109,7 @@ typedef struct _cef_xml_reader_t {
// additional details.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_prefix)(
cef_string_userfree_t(CEF_CALLBACK* get_prefix)(
struct _cef_xml_reader_t* self);
///
@@ -117,7 +117,7 @@ typedef struct _cef_xml_reader_t {
// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_qualified_name)(
cef_string_userfree_t(CEF_CALLBACK* get_qualified_name)(
struct _cef_xml_reader_t* self);
///
@@ -125,7 +125,7 @@ typedef struct _cef_xml_reader_t {
// http://www.w3.org/TR/REC-xml-names/ for additional details.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_namespace_uri)(
cef_string_userfree_t(CEF_CALLBACK* get_namespace_uri)(
struct _cef_xml_reader_t* self);
///
@@ -133,7 +133,7 @@ typedef struct _cef_xml_reader_t {
// additional details.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_base_uri)(
cef_string_userfree_t(CEF_CALLBACK* get_base_uri)(
struct _cef_xml_reader_t* self);
///
@@ -141,79 +141,81 @@ typedef struct _cef_xml_reader_t {
// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_xml_lang)(
cef_string_userfree_t(CEF_CALLBACK* get_xml_lang)(
struct _cef_xml_reader_t* self);
///
// Returns true (1) if the node represents an NULL element. <a/> is considered
// NULL but <a></a> is not.
///
int (CEF_CALLBACK *is_empty_element)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* is_empty_element)(struct _cef_xml_reader_t* self);
///
// Returns true (1) if the node has a text value.
///
int (CEF_CALLBACK *has_value)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* has_value)(struct _cef_xml_reader_t* self);
///
// Returns the text value.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_value)(
cef_string_userfree_t(CEF_CALLBACK* get_value)(
struct _cef_xml_reader_t* self);
///
// Returns true (1) if the node has attributes.
///
int (CEF_CALLBACK *has_attributes)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* has_attributes)(struct _cef_xml_reader_t* self);
///
// Returns the number of attributes.
///
size_t (CEF_CALLBACK *get_attribute_count)(struct _cef_xml_reader_t* self);
size_t(CEF_CALLBACK* get_attribute_count)(struct _cef_xml_reader_t* self);
///
// Returns the value of the attribute at the specified 0-based index.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_attribute_byindex)(
struct _cef_xml_reader_t* self, int index);
cef_string_userfree_t(CEF_CALLBACK* get_attribute_byindex)(
struct _cef_xml_reader_t* self,
int index);
///
// Returns the value of the attribute with the specified qualified name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_attribute_byqname)(
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName);
cef_string_userfree_t(CEF_CALLBACK* get_attribute_byqname)(
struct _cef_xml_reader_t* self,
const cef_string_t* qualifiedName);
///
// Returns the value of the attribute with the specified local name and
// namespace URI.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_attribute_bylname)(
struct _cef_xml_reader_t* self, const cef_string_t* localName,
cef_string_userfree_t(CEF_CALLBACK* get_attribute_bylname)(
struct _cef_xml_reader_t* self,
const cef_string_t* localName,
const cef_string_t* namespaceURI);
///
// Returns an XML representation of the current node's children.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_inner_xml)(
cef_string_userfree_t(CEF_CALLBACK* get_inner_xml)(
struct _cef_xml_reader_t* self);
///
// Returns an XML representation of the current node including its children.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_outer_xml)(
cef_string_userfree_t(CEF_CALLBACK* get_outer_xml)(
struct _cef_xml_reader_t* self);
///
// Returns the line number for the current node.
///
int (CEF_CALLBACK *get_line_number)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* get_line_number)(struct _cef_xml_reader_t* self);
// Attribute nodes are not traversed by default. The below functions can be
// used to move the cursor to an attribute node. move_to_carrying_element()
@@ -224,14 +226,15 @@ typedef struct _cef_xml_reader_t {
// Moves the cursor to the attribute at the specified 0-based index. Returns
// true (1) if the cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_attribute_byindex)(struct _cef_xml_reader_t* self,
int index);
int(CEF_CALLBACK* move_to_attribute_byindex)(struct _cef_xml_reader_t* self,
int index);
///
// Moves the cursor to the attribute with the specified qualified name.
// Returns true (1) if the cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_attribute_byqname)(struct _cef_xml_reader_t* self,
int(CEF_CALLBACK* move_to_attribute_byqname)(
struct _cef_xml_reader_t* self,
const cef_string_t* qualifiedName);
///
@@ -239,38 +242,39 @@ typedef struct _cef_xml_reader_t {
// namespace URI. Returns true (1) if the cursor position was set
// successfully.
///
int (CEF_CALLBACK *move_to_attribute_bylname)(struct _cef_xml_reader_t* self,
const cef_string_t* localName, const cef_string_t* namespaceURI);
int(CEF_CALLBACK* move_to_attribute_bylname)(
struct _cef_xml_reader_t* self,
const cef_string_t* localName,
const cef_string_t* namespaceURI);
///
// Moves the cursor to the first attribute in the current element. Returns
// true (1) if the cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_first_attribute)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* move_to_first_attribute)(struct _cef_xml_reader_t* self);
///
// Moves the cursor to the next attribute in the current element. Returns true
// (1) if the cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_next_attribute)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* move_to_next_attribute)(struct _cef_xml_reader_t* self);
///
// Moves the cursor back to the carrying element. Returns true (1) if the
// cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_carrying_element)(struct _cef_xml_reader_t* self);
int(CEF_CALLBACK* move_to_carrying_element)(struct _cef_xml_reader_t* self);
} cef_xml_reader_t;
///
// Create a new cef_xml_reader_t object. The returned object's functions can
// only be called from the thread that created the object.
///
CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(
struct _cef_stream_reader_t* stream, cef_xml_encoding_type_t encodingType,
struct _cef_stream_reader_t* stream,
cef_xml_encoding_type_t encodingType,
const cef_string_t* URI);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=fec66a36497e467f3da1d2b86d0ae66b8cf709b7$
//
#ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// Structure that supports the reading of zip archives via the zlib unzip API.
// The functions of this structure should only be called on the thread that
@@ -61,28 +62,28 @@ typedef struct _cef_zip_reader_t {
// Moves the cursor to the first file in the archive. Returns true (1) if the
// cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_first_file)(struct _cef_zip_reader_t* self);
int(CEF_CALLBACK* move_to_first_file)(struct _cef_zip_reader_t* self);
///
// Moves the cursor to the next file in the archive. Returns true (1) if the
// cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_next_file)(struct _cef_zip_reader_t* self);
int(CEF_CALLBACK* move_to_next_file)(struct _cef_zip_reader_t* self);
///
// Moves the cursor to the specified file in the archive. If |caseSensitive|
// is true (1) then the search will be case sensitive. Returns true (1) if the
// cursor position was set successfully.
///
int (CEF_CALLBACK *move_to_file)(struct _cef_zip_reader_t* self,
const cef_string_t* fileName, int caseSensitive);
int(CEF_CALLBACK* move_to_file)(struct _cef_zip_reader_t* self,
const cef_string_t* fileName,
int caseSensitive);
///
// Closes the archive. This should be called directly to ensure that cleanup
// occurs on the correct thread.
///
int (CEF_CALLBACK *close)(struct _cef_zip_reader_t* self);
int(CEF_CALLBACK* close)(struct _cef_zip_reader_t* self);
// The below functions act on the file at the current cursor position.
@@ -90,51 +91,51 @@ typedef struct _cef_zip_reader_t {
// Returns the name of the file.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_file_name)(
cef_string_userfree_t(CEF_CALLBACK* get_file_name)(
struct _cef_zip_reader_t* self);
///
// Returns the uncompressed size of the file.
///
int64 (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self);
int64(CEF_CALLBACK* get_file_size)(struct _cef_zip_reader_t* self);
///
// Returns the last modified timestamp for the file.
///
cef_time_t (CEF_CALLBACK *get_file_last_modified)(
cef_time_t(CEF_CALLBACK* get_file_last_modified)(
struct _cef_zip_reader_t* self);
///
// Opens the file for reading of uncompressed data. A read password may
// optionally be specified.
///
int (CEF_CALLBACK *open_file)(struct _cef_zip_reader_t* self,
const cef_string_t* password);
int(CEF_CALLBACK* open_file)(struct _cef_zip_reader_t* self,
const cef_string_t* password);
///
// Closes the file.
///
int (CEF_CALLBACK *close_file)(struct _cef_zip_reader_t* self);
int(CEF_CALLBACK* close_file)(struct _cef_zip_reader_t* self);
///
// Read uncompressed file contents into the specified buffer. Returns < 0 if
// an error occurred, 0 if at the end of file, or the number of bytes read.
///
int (CEF_CALLBACK *read_file)(struct _cef_zip_reader_t* self, void* buffer,
size_t bufferSize);
int(CEF_CALLBACK* read_file)(struct _cef_zip_reader_t* self,
void* buffer,
size_t bufferSize);
///
// Returns the current offset in the uncompressed file contents.
///
int64 (CEF_CALLBACK *tell)(struct _cef_zip_reader_t* self);
int64(CEF_CALLBACK* tell)(struct _cef_zip_reader_t* self);
///
// Returns true (1) if at end of the file contents.
///
int (CEF_CALLBACK *eof)(struct _cef_zip_reader_t* self);
int(CEF_CALLBACK* eof)(struct _cef_zip_reader_t* self);
} cef_zip_reader_t;
///
// Create a new cef_zip_reader_t object. The returned object's functions can
// only be called from the thread that created the object.
@@ -142,7 +143,6 @@ typedef struct _cef_zip_reader_t {
CEF_EXPORT cef_zip_reader_t* cef_zip_reader_create(
struct _cef_stream_reader_t* stream);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ec043910c391a84dda3b85cf01ea11cd44f37c1f$
//
#ifndef CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
#define CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
@@ -67,88 +69,87 @@ typedef struct _cef_translator_test_t {
///
cef_base_ref_counted_t base;
// PRIMITIVE VALUES
///
// Return a void value.
///
void (CEF_CALLBACK *get_void)(struct _cef_translator_test_t* self);
void(CEF_CALLBACK* get_void)(struct _cef_translator_test_t* self);
///
// Return a bool value.
///
int (CEF_CALLBACK *get_bool)(struct _cef_translator_test_t* self);
int(CEF_CALLBACK* get_bool)(struct _cef_translator_test_t* self);
///
// Return an int value.
///
int (CEF_CALLBACK *get_int)(struct _cef_translator_test_t* self);
int(CEF_CALLBACK* get_int)(struct _cef_translator_test_t* self);
///
// Return a double value.
///
double (CEF_CALLBACK *get_double)(struct _cef_translator_test_t* self);
double(CEF_CALLBACK* get_double)(struct _cef_translator_test_t* self);
///
// Return a long value.
///
long (CEF_CALLBACK *get_long)(struct _cef_translator_test_t* self);
long(CEF_CALLBACK* get_long)(struct _cef_translator_test_t* self);
///
// Return a size_t value.
///
size_t (CEF_CALLBACK *get_sizet)(struct _cef_translator_test_t* self);
size_t(CEF_CALLBACK* get_sizet)(struct _cef_translator_test_t* self);
///
// Set a void value.
///
int (CEF_CALLBACK *set_void)(struct _cef_translator_test_t* self);
int(CEF_CALLBACK* set_void)(struct _cef_translator_test_t* self);
///
// Set a bool value.
///
int (CEF_CALLBACK *set_bool)(struct _cef_translator_test_t* self, int val);
int(CEF_CALLBACK* set_bool)(struct _cef_translator_test_t* self, int val);
///
// Set an int value.
///
int (CEF_CALLBACK *set_int)(struct _cef_translator_test_t* self, int val);
int(CEF_CALLBACK* set_int)(struct _cef_translator_test_t* self, int val);
///
// Set a double value.
///
int (CEF_CALLBACK *set_double)(struct _cef_translator_test_t* self,
double val);
int(CEF_CALLBACK* set_double)(struct _cef_translator_test_t* self,
double val);
///
// Set a long value.
///
int (CEF_CALLBACK *set_long)(struct _cef_translator_test_t* self, long val);
int(CEF_CALLBACK* set_long)(struct _cef_translator_test_t* self, long val);
///
// Set a size_t value.
///
int (CEF_CALLBACK *set_sizet)(struct _cef_translator_test_t* self,
size_t val);
int(CEF_CALLBACK* set_sizet)(struct _cef_translator_test_t* self, size_t val);
///
// Set a int list value.
///
int (CEF_CALLBACK *set_int_list)(struct _cef_translator_test_t* self,
size_t valCount, int const* val);
int(CEF_CALLBACK* set_int_list)(struct _cef_translator_test_t* self,
size_t valCount,
int const* val);
///
// Return an int list value by out-param.
///
int (CEF_CALLBACK *get_int_list_by_ref)(struct _cef_translator_test_t* self,
size_t* valCount, int* val);
int(CEF_CALLBACK* get_int_list_by_ref)(struct _cef_translator_test_t* self,
size_t* valCount,
int* val);
///
// Return the number of points that will be output above.
///
size_t (CEF_CALLBACK *get_int_list_size)(struct _cef_translator_test_t* self);
size_t(CEF_CALLBACK* get_int_list_size)(struct _cef_translator_test_t* self);
// STRING VALUES
@@ -156,119 +157,121 @@ typedef struct _cef_translator_test_t {
// Return a string value.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_string)(
cef_string_userfree_t(CEF_CALLBACK* get_string)(
struct _cef_translator_test_t* self);
///
// Set a string value.
///
int (CEF_CALLBACK *set_string)(struct _cef_translator_test_t* self,
const cef_string_t* val);
int(CEF_CALLBACK* set_string)(struct _cef_translator_test_t* self,
const cef_string_t* val);
///
// Return a string value by out-param.
///
void (CEF_CALLBACK *get_string_by_ref)(struct _cef_translator_test_t* self,
cef_string_t* val);
void(CEF_CALLBACK* get_string_by_ref)(struct _cef_translator_test_t* self,
cef_string_t* val);
///
// Set a string list value.
///
int (CEF_CALLBACK *set_string_list)(struct _cef_translator_test_t* self,
cef_string_list_t val);
int(CEF_CALLBACK* set_string_list)(struct _cef_translator_test_t* self,
cef_string_list_t val);
///
// Return a string list value by out-param.
///
int (CEF_CALLBACK *get_string_list_by_ref)(
struct _cef_translator_test_t* self, cef_string_list_t val);
int(CEF_CALLBACK* get_string_list_by_ref)(struct _cef_translator_test_t* self,
cef_string_list_t val);
///
// Set a string map value.
///
int (CEF_CALLBACK *set_string_map)(struct _cef_translator_test_t* self,
cef_string_map_t val);
int(CEF_CALLBACK* set_string_map)(struct _cef_translator_test_t* self,
cef_string_map_t val);
///
// Return a string map value by out-param.
///
int (CEF_CALLBACK *get_string_map_by_ref)(struct _cef_translator_test_t* self,
cef_string_map_t val);
int(CEF_CALLBACK* get_string_map_by_ref)(struct _cef_translator_test_t* self,
cef_string_map_t val);
///
// Set a string multimap value.
///
int (CEF_CALLBACK *set_string_multimap)(struct _cef_translator_test_t* self,
cef_string_multimap_t val);
int(CEF_CALLBACK* set_string_multimap)(struct _cef_translator_test_t* self,
cef_string_multimap_t val);
///
// Return a string multimap value by out-param.
///
int (CEF_CALLBACK *get_string_multimap_by_ref)(
struct _cef_translator_test_t* self, cef_string_multimap_t val);
int(CEF_CALLBACK* get_string_multimap_by_ref)(
struct _cef_translator_test_t* self,
cef_string_multimap_t val);
// STRUCT VALUES
///
// Return a point value.
///
cef_point_t (CEF_CALLBACK *get_point)(struct _cef_translator_test_t* self);
cef_point_t(CEF_CALLBACK* get_point)(struct _cef_translator_test_t* self);
///
// Set a point value.
///
int (CEF_CALLBACK *set_point)(struct _cef_translator_test_t* self,
const cef_point_t* val);
int(CEF_CALLBACK* set_point)(struct _cef_translator_test_t* self,
const cef_point_t* val);
///
// Return a point value by out-param.
///
void (CEF_CALLBACK *get_point_by_ref)(struct _cef_translator_test_t* self,
cef_point_t* val);
void(CEF_CALLBACK* get_point_by_ref)(struct _cef_translator_test_t* self,
cef_point_t* val);
///
// Set a point list vlaue.
///
int (CEF_CALLBACK *set_point_list)(struct _cef_translator_test_t* self,
size_t valCount, cef_point_t const* val);
int(CEF_CALLBACK* set_point_list)(struct _cef_translator_test_t* self,
size_t valCount,
cef_point_t const* val);
///
// Return a point list value by out-param.
///
int (CEF_CALLBACK *get_point_list_by_ref)(struct _cef_translator_test_t* self,
size_t* valCount, cef_point_t* val);
int(CEF_CALLBACK* get_point_list_by_ref)(struct _cef_translator_test_t* self,
size_t* valCount,
cef_point_t* val);
///
// Return the number of points that will be output above.
///
size_t (CEF_CALLBACK *get_point_list_size)(
size_t(CEF_CALLBACK* get_point_list_size)(
struct _cef_translator_test_t* self);
// LIBRARY-SIDE REFPTR VALUES
///
// Return an new library-side object.
///
struct _cef_translator_test_ref_ptr_library_t* (
CEF_CALLBACK *get_ref_ptr_library)(struct _cef_translator_test_t* self,
int val);
struct _cef_translator_test_ref_ptr_library_t*(
CEF_CALLBACK* get_ref_ptr_library)(struct _cef_translator_test_t* self,
int val);
///
// Set an object. Returns the value from
// cef_translator_test_ref_ptr_library_t::get_value(). This tests input and
// execution of a library-side object type.
///
int (CEF_CALLBACK *set_ref_ptr_library)(struct _cef_translator_test_t* self,
int(CEF_CALLBACK* set_ref_ptr_library)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_t* val);
///
// Set an object. Returns the object passed in. This tests input and output of
// a library-side object type.
///
struct _cef_translator_test_ref_ptr_library_t* (
CEF_CALLBACK *set_ref_ptr_library_and_return)(
struct _cef_translator_test_ref_ptr_library_t*(
CEF_CALLBACK* set_ref_ptr_library_and_return)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_t* val);
@@ -277,7 +280,7 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_ref_ptr_library_t::get_value(). This tests input of a
// library- side child object type and execution as the parent type.
///
int (CEF_CALLBACK *set_child_ref_ptr_library)(
int(CEF_CALLBACK* set_child_ref_ptr_library)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_child_t* val);
@@ -285,34 +288,37 @@ typedef struct _cef_translator_test_t {
// Set a child object. Returns the object as the parent type. This tests input
// of a library-side child object type and return as the parent type.
///
struct _cef_translator_test_ref_ptr_library_t* (
CEF_CALLBACK *set_child_ref_ptr_library_and_return_parent)(
struct _cef_translator_test_ref_ptr_library_t*(
CEF_CALLBACK* set_child_ref_ptr_library_and_return_parent)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_library_child_t* val);
///
// Set an object list vlaue.
///
int (CEF_CALLBACK *set_ref_ptr_library_list)(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_ref_ptr_library_t* const* val, int val1,
int(CEF_CALLBACK* set_ref_ptr_library_list)(
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_ref_ptr_library_t* const* val,
int val1,
int val2);
///
// Return an object list value by out-param.
///
int (CEF_CALLBACK *get_ref_ptr_library_list_by_ref)(
struct _cef_translator_test_t* self, size_t* valCount,
struct _cef_translator_test_ref_ptr_library_t** val, int val1,
int(CEF_CALLBACK* get_ref_ptr_library_list_by_ref)(
struct _cef_translator_test_t* self,
size_t* valCount,
struct _cef_translator_test_ref_ptr_library_t** val,
int val1,
int val2);
///
// Return the number of object that will be output above.
///
size_t (CEF_CALLBACK *get_ref_ptr_library_list_size)(
size_t(CEF_CALLBACK* get_ref_ptr_library_list_size)(
struct _cef_translator_test_t* self);
// CLIENT-SIDE REFPTR VALUES
///
@@ -320,15 +326,16 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_ref_ptr_client_t::get_value(). This tests input and
// execution of a client-side object type.
///
int (CEF_CALLBACK *set_ref_ptr_client)(struct _cef_translator_test_t* self,
int(CEF_CALLBACK* set_ref_ptr_client)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_client_t* val);
///
// Set an object. Returns the handler passed in. This tests input and output
// of a client-side object type.
///
struct _cef_translator_test_ref_ptr_client_t* (
CEF_CALLBACK *set_ref_ptr_client_and_return)(
struct _cef_translator_test_ref_ptr_client_t*(
CEF_CALLBACK* set_ref_ptr_client_and_return)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_client_t* val);
@@ -337,7 +344,7 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_ref_ptr_client_t::get_value(). This tests input of a
// client- side child object type and execution as the parent type.
///
int (CEF_CALLBACK *set_child_ref_ptr_client)(
int(CEF_CALLBACK* set_child_ref_ptr_client)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_client_child_t* val);
@@ -345,24 +352,27 @@ typedef struct _cef_translator_test_t {
// Set a child object. Returns the object as the parent type. This tests input
// of a client-side child object type and return as the parent type.
///
struct _cef_translator_test_ref_ptr_client_t* (
CEF_CALLBACK *set_child_ref_ptr_client_and_return_parent)(
struct _cef_translator_test_ref_ptr_client_t*(
CEF_CALLBACK* set_child_ref_ptr_client_and_return_parent)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_ref_ptr_client_child_t* val);
///
// Set an object list vlaue.
///
int (CEF_CALLBACK *set_ref_ptr_client_list)(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_ref_ptr_client_t* const* val, int val1,
int(CEF_CALLBACK* set_ref_ptr_client_list)(
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_ref_ptr_client_t* const* val,
int val1,
int val2);
///
// Return an object list value by out-param.
///
int (CEF_CALLBACK *get_ref_ptr_client_list_by_ref)(
struct _cef_translator_test_t* self, size_t* valCount,
int(CEF_CALLBACK* get_ref_ptr_client_list_by_ref)(
struct _cef_translator_test_t* self,
size_t* valCount,
struct _cef_translator_test_ref_ptr_client_t** val,
struct _cef_translator_test_ref_ptr_client_t* val1,
struct _cef_translator_test_ref_ptr_client_t* val2);
@@ -370,33 +380,33 @@ typedef struct _cef_translator_test_t {
///
// Return the number of object that will be output above.
///
size_t (CEF_CALLBACK *get_ref_ptr_client_list_size)(
size_t(CEF_CALLBACK* get_ref_ptr_client_list_size)(
struct _cef_translator_test_t* self);
// LIBRARY-SIDE OWNPTR VALUES
///
// Return an new library-side object.
///
struct _cef_translator_test_scoped_library_t* (
CEF_CALLBACK *get_own_ptr_library)(struct _cef_translator_test_t* self,
int val);
struct _cef_translator_test_scoped_library_t*(
CEF_CALLBACK* get_own_ptr_library)(struct _cef_translator_test_t* self,
int val);
///
// Set an object. Returns the value from
// cef_translator_test_scoped_library_t::get_value(). This tests input and
// execution of a library-side object type.
///
int (CEF_CALLBACK *set_own_ptr_library)(struct _cef_translator_test_t* self,
int(CEF_CALLBACK* set_own_ptr_library)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_t* val);
///
// Set an object. Returns the object passed in. This tests input and output of
// a library-side object type.
///
struct _cef_translator_test_scoped_library_t* (
CEF_CALLBACK *set_own_ptr_library_and_return)(
struct _cef_translator_test_scoped_library_t*(
CEF_CALLBACK* set_own_ptr_library_and_return)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_t* val);
@@ -405,7 +415,7 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_library_t::get_value(). This tests input of a
// library- side child object type and execution as the parent type.
///
int (CEF_CALLBACK *set_child_own_ptr_library)(
int(CEF_CALLBACK* set_child_own_ptr_library)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_child_t* val);
@@ -413,12 +423,11 @@ typedef struct _cef_translator_test_t {
// Set a child object. Returns the object as the parent type. This tests input
// of a library-side child object type and return as the parent type.
///
struct _cef_translator_test_scoped_library_t* (
CEF_CALLBACK *set_child_own_ptr_library_and_return_parent)(
struct _cef_translator_test_scoped_library_t*(
CEF_CALLBACK* set_child_own_ptr_library_and_return_parent)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_child_t* val);
// CLIENT-SIDE OWNPTR VALUES
///
@@ -426,15 +435,16 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_client_t::get_value(). This tests input and
// execution of a client-side object type.
///
int (CEF_CALLBACK *set_own_ptr_client)(struct _cef_translator_test_t* self,
int(CEF_CALLBACK* set_own_ptr_client)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_t* val);
///
// Set an object. Returns the handler passed in. This tests input and output
// of a client-side object type.
///
struct _cef_translator_test_scoped_client_t* (
CEF_CALLBACK *set_own_ptr_client_and_return)(
struct _cef_translator_test_scoped_client_t*(
CEF_CALLBACK* set_own_ptr_client_and_return)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_t* val);
@@ -443,7 +453,7 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_client_t::get_value(). This tests input of a
// client- side child object type and execution as the parent type.
///
int (CEF_CALLBACK *set_child_own_ptr_client)(
int(CEF_CALLBACK* set_child_own_ptr_client)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_child_t* val);
@@ -451,12 +461,11 @@ typedef struct _cef_translator_test_t {
// Set a child object. Returns the object as the parent type. This tests input
// of a client-side child object type and return as the parent type.
///
struct _cef_translator_test_scoped_client_t* (
CEF_CALLBACK *set_child_own_ptr_client_and_return_parent)(
struct _cef_translator_test_scoped_client_t*(
CEF_CALLBACK* set_child_own_ptr_client_and_return_parent)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_child_t* val);
// LIBRARY-SIDE RAWPTR VALUES
///
@@ -464,7 +473,8 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_library_t::get_value(). This tests input and
// execution of a library-side object type.
///
int (CEF_CALLBACK *set_raw_ptr_library)(struct _cef_translator_test_t* self,
int(CEF_CALLBACK* set_raw_ptr_library)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_t* val);
///
@@ -472,19 +482,20 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_library_t::get_value(). This tests input of a
// library- side child object type and execution as the parent type.
///
int (CEF_CALLBACK *set_child_raw_ptr_library)(
int(CEF_CALLBACK* set_child_raw_ptr_library)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_library_child_t* val);
///
// Set an object list vlaue.
///
int (CEF_CALLBACK *set_raw_ptr_library_list)(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_scoped_library_t* const* val, int val1,
int(CEF_CALLBACK* set_raw_ptr_library_list)(
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_scoped_library_t* const* val,
int val1,
int val2);
// CLIENT-SIDE RAWPTR VALUES
///
@@ -492,7 +503,8 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_client_t::get_value(). This tests input and
// execution of a client-side object type.
///
int (CEF_CALLBACK *set_raw_ptr_client)(struct _cef_translator_test_t* self,
int(CEF_CALLBACK* set_raw_ptr_client)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_t* val);
///
@@ -500,26 +512,26 @@ typedef struct _cef_translator_test_t {
// cef_translator_test_scoped_client_t::get_value(). This tests input of a
// client- side child object type and execution as the parent type.
///
int (CEF_CALLBACK *set_child_raw_ptr_client)(
int(CEF_CALLBACK* set_child_raw_ptr_client)(
struct _cef_translator_test_t* self,
struct _cef_translator_test_scoped_client_child_t* val);
///
// Set an object list vlaue.
///
int (CEF_CALLBACK *set_raw_ptr_client_list)(
struct _cef_translator_test_t* self, size_t valCount,
struct _cef_translator_test_scoped_client_t* const* val, int val1,
int(CEF_CALLBACK* set_raw_ptr_client_list)(
struct _cef_translator_test_t* self,
size_t valCount,
struct _cef_translator_test_scoped_client_t* const* val,
int val1,
int val2);
} cef_translator_test_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_t* cef_translator_test_create();
///
// Library-side test object for RefPtr.
///
@@ -532,23 +544,22 @@ typedef struct _cef_translator_test_ref_ptr_library_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_value)(
int(CEF_CALLBACK* get_value)(
struct _cef_translator_test_ref_ptr_library_t* self);
///
// Set a value.
///
void (CEF_CALLBACK *set_value)(
struct _cef_translator_test_ref_ptr_library_t* self, int value);
void(CEF_CALLBACK* set_value)(
struct _cef_translator_test_ref_ptr_library_t* self,
int value);
} cef_translator_test_ref_ptr_library_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_ref_ptr_library_t* cef_translator_test_ref_ptr_library_create(
int value);
CEF_EXPORT cef_translator_test_ref_ptr_library_t*
cef_translator_test_ref_ptr_library_create(int value);
///
// Library-side child test object for RefPtr.
@@ -562,23 +573,22 @@ typedef struct _cef_translator_test_ref_ptr_library_child_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_other_value)(
int(CEF_CALLBACK* get_other_value)(
struct _cef_translator_test_ref_ptr_library_child_t* self);
///
// Set a value.
///
void (CEF_CALLBACK *set_other_value)(
struct _cef_translator_test_ref_ptr_library_child_t* self, int value);
void(CEF_CALLBACK* set_other_value)(
struct _cef_translator_test_ref_ptr_library_child_t* self,
int value);
} cef_translator_test_ref_ptr_library_child_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_ref_ptr_library_child_t* cef_translator_test_ref_ptr_library_child_create(
int value, int other_value);
CEF_EXPORT cef_translator_test_ref_ptr_library_child_t*
cef_translator_test_ref_ptr_library_child_create(int value, int other_value);
///
// Another library-side child test object for RefPtr.
@@ -592,24 +602,24 @@ typedef struct _cef_translator_test_ref_ptr_library_child_child_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_other_other_value)(
int(CEF_CALLBACK* get_other_other_value)(
struct _cef_translator_test_ref_ptr_library_child_child_t* self);
///
// Set a value.
///
void (CEF_CALLBACK *set_other_other_value)(
void(CEF_CALLBACK* set_other_other_value)(
struct _cef_translator_test_ref_ptr_library_child_child_t* self,
int value);
} cef_translator_test_ref_ptr_library_child_child_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_ref_ptr_library_child_child_t* cef_translator_test_ref_ptr_library_child_child_create(
int value, int other_value, int other_other_value);
CEF_EXPORT cef_translator_test_ref_ptr_library_child_child_t*
cef_translator_test_ref_ptr_library_child_child_create(int value,
int other_value,
int other_other_value);
///
// Client-side test object for RefPtr.
@@ -623,11 +633,10 @@ typedef struct _cef_translator_test_ref_ptr_client_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_value)(
int(CEF_CALLBACK* get_value)(
struct _cef_translator_test_ref_ptr_client_t* self);
} cef_translator_test_ref_ptr_client_t;
///
// Client-side child test object for RefPtr.
///
@@ -640,11 +649,10 @@ typedef struct _cef_translator_test_ref_ptr_client_child_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_other_value)(
int(CEF_CALLBACK* get_other_value)(
struct _cef_translator_test_ref_ptr_client_child_t* self);
} cef_translator_test_ref_ptr_client_child_t;
///
// Library-side test object for OwnPtr/RawPtr.
///
@@ -657,23 +665,22 @@ typedef struct _cef_translator_test_scoped_library_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_value)(
int(CEF_CALLBACK* get_value)(
struct _cef_translator_test_scoped_library_t* self);
///
// Set a value.
///
void (CEF_CALLBACK *set_value)(
struct _cef_translator_test_scoped_library_t* self, int value);
void(CEF_CALLBACK* set_value)(
struct _cef_translator_test_scoped_library_t* self,
int value);
} cef_translator_test_scoped_library_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_scoped_library_t* cef_translator_test_scoped_library_create(
int value);
CEF_EXPORT cef_translator_test_scoped_library_t*
cef_translator_test_scoped_library_create(int value);
///
// Library-side child test object for OwnPtr/RawPtr.
@@ -687,23 +694,22 @@ typedef struct _cef_translator_test_scoped_library_child_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_other_value)(
int(CEF_CALLBACK* get_other_value)(
struct _cef_translator_test_scoped_library_child_t* self);
///
// Set a value.
///
void (CEF_CALLBACK *set_other_value)(
struct _cef_translator_test_scoped_library_child_t* self, int value);
void(CEF_CALLBACK* set_other_value)(
struct _cef_translator_test_scoped_library_child_t* self,
int value);
} cef_translator_test_scoped_library_child_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_scoped_library_child_t* cef_translator_test_scoped_library_child_create(
int value, int other_value);
CEF_EXPORT cef_translator_test_scoped_library_child_t*
cef_translator_test_scoped_library_child_create(int value, int other_value);
///
// Another library-side child test object for OwnPtr/RawPtr.
@@ -717,24 +723,24 @@ typedef struct _cef_translator_test_scoped_library_child_child_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_other_other_value)(
int(CEF_CALLBACK* get_other_other_value)(
struct _cef_translator_test_scoped_library_child_child_t* self);
///
// Set a value.
///
void (CEF_CALLBACK *set_other_other_value)(
void(CEF_CALLBACK* set_other_other_value)(
struct _cef_translator_test_scoped_library_child_child_t* self,
int value);
} cef_translator_test_scoped_library_child_child_t;
///
// Create the test object.
///
CEF_EXPORT cef_translator_test_scoped_library_child_child_t* cef_translator_test_scoped_library_child_child_create(
int value, int other_value, int other_other_value);
CEF_EXPORT cef_translator_test_scoped_library_child_child_t*
cef_translator_test_scoped_library_child_child_create(int value,
int other_value,
int other_other_value);
///
// Client-side test object for OwnPtr/RawPtr.
@@ -748,11 +754,10 @@ typedef struct _cef_translator_test_scoped_client_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_value)(
int(CEF_CALLBACK* get_value)(
struct _cef_translator_test_scoped_client_t* self);
} cef_translator_test_scoped_client_t;
///
// Client-side child test object for OwnPtr/RawPtr.
///
@@ -765,11 +770,10 @@ typedef struct _cef_translator_test_scoped_client_child_t {
///
// Return a value.
///
int (CEF_CALLBACK *get_other_value)(
int(CEF_CALLBACK* get_other_value)(
struct _cef_translator_test_scoped_client_child_t* self);
} cef_translator_test_scoped_client_child_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=acbfe00533fba6a55e9a0d0d0c6a317f54dbf887$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
@@ -67,18 +69,18 @@ typedef struct _cef_box_layout_t {
// space is subtracted in these ratios. A flex of 0 means this view is not
// resized. Flex values must not be negative.
///
void (CEF_CALLBACK *set_flex_for_view)(struct _cef_box_layout_t* self,
struct _cef_view_t* view, int flex);
void(CEF_CALLBACK* set_flex_for_view)(struct _cef_box_layout_t* self,
struct _cef_view_t* view,
int flex);
///
// Clears the flex for the given |view|, causing it to use the default flex
// specified via cef_box_layout_tSettings.default_flex.
///
void (CEF_CALLBACK *clear_flex_for_view)(struct _cef_box_layout_t* self,
struct _cef_view_t* view);
void(CEF_CALLBACK* clear_flex_for_view)(struct _cef_box_layout_t* self,
struct _cef_view_t* view);
} cef_box_layout_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0ba6628b63ed6641097a1714d4facf5343cf2252$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// A View hosting a cef_browser_t instance. Methods must be called on the
// browser process UI thread unless otherwise indicated.
@@ -61,7 +62,7 @@ typedef struct _cef_browser_view_t {
// Returns the cef_browser_t hosted by this BrowserView. Will return NULL if
// the browser has not yet been created or has already been destroyed.
///
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
struct _cef_browser_t*(CEF_CALLBACK* get_browser)(
struct _cef_browser_view_t* self);
///
@@ -73,17 +74,17 @@ typedef struct _cef_browser_view_t {
// only be triggered if the event is not handled by web content or by
// cef_keyboard_handler_t. The default value is false (0).
///
void (CEF_CALLBACK *set_prefer_accelerators)(struct _cef_browser_view_t* self,
int prefer_accelerators);
void(CEF_CALLBACK* set_prefer_accelerators)(struct _cef_browser_view_t* self,
int prefer_accelerators);
} cef_browser_view_t;
///
// Create a new BrowserView. The underlying cef_browser_t will not be created
// until this view is added to the views hierarchy.
///
CEF_EXPORT cef_browser_view_t* cef_browser_view_create(
struct _cef_client_t* client, const cef_string_t* url,
struct _cef_client_t* client,
const cef_string_t* url,
const struct _cef_browser_settings_t* settings,
struct _cef_request_context_t* request_context,
struct _cef_browser_view_delegate_t* delegate);
@@ -94,7 +95,6 @@ CEF_EXPORT cef_browser_view_t* cef_browser_view_create(
CEF_EXPORT cef_browser_view_t* cef_browser_view_get_for_browser(
struct _cef_browser_t* browser);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=08193b1ef781224bf7664c5bf407af8674ad2362$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
@@ -65,7 +67,7 @@ typedef struct _cef_browser_view_delegate_t {
// is called for |browser| and before on_popup_browser_view_created() is
// called for |browser|'s parent delegate if |browser| is a popup.
///
void (CEF_CALLBACK *on_browser_created)(
void(CEF_CALLBACK* on_browser_created)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
struct _cef_browser_t* browser);
@@ -76,7 +78,7 @@ typedef struct _cef_browser_view_delegate_t {
// |browser| after this callback returns. This function will be called before
// cef_life_span_handler_t::on_before_close() is called for |browser|.
///
void (CEF_CALLBACK *on_browser_destroyed)(
void(CEF_CALLBACK* on_browser_destroyed)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
struct _cef_browser_t* browser);
@@ -88,12 +90,13 @@ typedef struct _cef_browser_view_delegate_t {
// if the popup will be a DevTools browser. Return the delegate that will be
// used for the new popup BrowserView.
///
struct _cef_browser_view_delegate_t* (
CEF_CALLBACK *get_delegate_for_popup_browser_view)(
struct _cef_browser_view_delegate_t*(
CEF_CALLBACK* get_delegate_for_popup_browser_view)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
const struct _cef_browser_settings_t* settings,
struct _cef_client_t* client, int is_devtools);
struct _cef_client_t* client,
int is_devtools);
///
// Called after |popup_browser_view| is created. This function will be called
@@ -104,13 +107,13 @@ typedef struct _cef_browser_view_delegate_t {
// yourself and return true (1). Otherwise return false (0) and a default
// cef_window_t will be created for the popup.
///
int (CEF_CALLBACK *on_popup_browser_view_created)(
int(CEF_CALLBACK* on_popup_browser_view_created)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
struct _cef_browser_view_t* popup_browser_view, int is_devtools);
struct _cef_browser_view_t* popup_browser_view,
int is_devtools);
} cef_browser_view_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=f785be05a42d3490ac2e625470befa7d4f77befb$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_
@@ -60,41 +62,40 @@ typedef struct _cef_button_t {
///
// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
///
struct _cef_label_button_t* (CEF_CALLBACK *as_label_button)(
struct _cef_label_button_t*(CEF_CALLBACK* as_label_button)(
struct _cef_button_t* self);
///
// Sets the current display state of the Button.
///
void (CEF_CALLBACK *set_state)(struct _cef_button_t* self,
cef_button_state_t state);
void(CEF_CALLBACK* set_state)(struct _cef_button_t* self,
cef_button_state_t state);
///
// Returns the current display state of the Button.
///
cef_button_state_t (CEF_CALLBACK *get_state)(struct _cef_button_t* self);
cef_button_state_t(CEF_CALLBACK* get_state)(struct _cef_button_t* self);
///
// Sets the Button will use an ink drop effect for displaying state changes.
///
void (CEF_CALLBACK *set_ink_drop_enabled)(struct _cef_button_t* self,
int enabled);
void(CEF_CALLBACK* set_ink_drop_enabled)(struct _cef_button_t* self,
int enabled);
///
// Sets the tooltip text that will be displayed when the user hovers the mouse
// cursor over the Button.
///
void (CEF_CALLBACK *set_tooltip_text)(struct _cef_button_t* self,
const cef_string_t* tooltip_text);
void(CEF_CALLBACK* set_tooltip_text)(struct _cef_button_t* self,
const cef_string_t* tooltip_text);
///
// Sets the accessible name that will be exposed to assistive technology (AT).
///
void (CEF_CALLBACK *set_accessible_name)(struct _cef_button_t* self,
const cef_string_t* name);
void(CEF_CALLBACK* set_accessible_name)(struct _cef_button_t* self,
const cef_string_t* name);
} cef_button_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=eb5e428e07fbad33c7da94735969b0ff4dd6fb9f$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
@@ -60,17 +62,17 @@ typedef struct _cef_button_delegate_t {
///
// Called when |button| is pressed.
///
void (CEF_CALLBACK *on_button_pressed)(struct _cef_button_delegate_t* self,
struct _cef_button_t* button);
void(CEF_CALLBACK* on_button_pressed)(struct _cef_button_delegate_t* self,
struct _cef_button_t* button);
///
// Called when the state of |button| changes.
///
void (CEF_CALLBACK *on_button_state_changed)(
struct _cef_button_delegate_t* self, struct _cef_button_t* button);
void(CEF_CALLBACK* on_button_state_changed)(
struct _cef_button_delegate_t* self,
struct _cef_button_t* button);
} cef_button_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=20e9f8cdab0325b3d860128a946f3120563fa08e$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// This structure typically, but not always, corresponds to a physical display
// connected to the system. A fake Display may exist on a headless system, or a
@@ -62,7 +63,7 @@ typedef struct _cef_display_t {
///
// Returns the unique identifier for this Display.
///
int64 (CEF_CALLBACK *get_id)(struct _cef_display_t* self);
int64(CEF_CALLBACK* get_id)(struct _cef_display_t* self);
///
// Returns this Display's device pixel scale factor. This specifies how much
@@ -70,40 +71,39 @@ typedef struct _cef_display_t {
// standard displays (which is around 100~120dpi). The potential return values
// differ by platform.
///
float (CEF_CALLBACK *get_device_scale_factor)(struct _cef_display_t* self);
float(CEF_CALLBACK* get_device_scale_factor)(struct _cef_display_t* self);
///
// Convert |point| from density independent pixels (DIP) to pixel coordinates
// using this Display's device scale factor.
///
void (CEF_CALLBACK *convert_point_to_pixels)(struct _cef_display_t* self,
cef_point_t* point);
void(CEF_CALLBACK* convert_point_to_pixels)(struct _cef_display_t* self,
cef_point_t* point);
///
// Convert |point| from pixel coordinates to density independent pixels (DIP)
// using this Display's device scale factor.
///
void (CEF_CALLBACK *convert_point_from_pixels)(struct _cef_display_t* self,
cef_point_t* point);
void(CEF_CALLBACK* convert_point_from_pixels)(struct _cef_display_t* self,
cef_point_t* point);
///
// Returns this Display's bounds. This is the full size of the display.
///
cef_rect_t (CEF_CALLBACK *get_bounds)(struct _cef_display_t* self);
cef_rect_t(CEF_CALLBACK* get_bounds)(struct _cef_display_t* self);
///
// Returns this Display's work area. This excludes areas of the display that
// are occupied for window manager toolbars, etc.
///
cef_rect_t (CEF_CALLBACK *get_work_area)(struct _cef_display_t* self);
cef_rect_t(CEF_CALLBACK* get_work_area)(struct _cef_display_t* self);
///
// Returns this Display's rotation in degrees.
///
int (CEF_CALLBACK *get_rotation)(struct _cef_display_t* self);
int(CEF_CALLBACK* get_rotation)(struct _cef_display_t* self);
} cef_display_t;
///
// Returns the primary Display.
///
@@ -114,7 +114,8 @@ CEF_EXPORT cef_display_t* cef_display_get_primary();
// |point| is in pixel coordinates instead of density independent pixels (DIP).
///
CEF_EXPORT cef_display_t* cef_display_get_nearest_point(
const cef_point_t* point, int input_pixel_coords);
const cef_point_t* point,
int input_pixel_coords);
///
// Returns the Display that most closely intersects |bounds|. Set
@@ -122,7 +123,8 @@ CEF_EXPORT cef_display_t* cef_display_get_nearest_point(
// of density independent pixels (DIP).
///
CEF_EXPORT cef_display_t* cef_display_get_matching_bounds(
const cef_rect_t* bounds, int input_pixel_coords);
const cef_rect_t* bounds,
int input_pixel_coords);
///
// Returns the total number of Displays. Mirrored displays are excluded; this
@@ -135,8 +137,7 @@ CEF_EXPORT size_t cef_display_get_count();
// intended to return distinct, usable displays.
///
CEF_EXPORT void cef_display_get_alls(size_t* displaysCount,
cef_display_t** displays);
cef_display_t** displays);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=32d7f76955b00935902e954344c76efe864eabf4$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// A simple Layout that causes the associated Panel's one child to be sized to
// match the bounds of its parent. Methods must be called on the browser process
@@ -57,7 +58,6 @@ typedef struct _cef_fill_layout_t {
cef_layout_t base;
} cef_fill_layout_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ff20922a0e73fdb84b0cb1864f35911a1a725f8a$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_
@@ -62,21 +64,21 @@ typedef struct _cef_label_button_t {
// Returns this LabelButton as a MenuButton or NULL if this is not a
// MenuButton.
///
struct _cef_menu_button_t* (CEF_CALLBACK *as_menu_button)(
struct _cef_menu_button_t*(CEF_CALLBACK* as_menu_button)(
struct _cef_label_button_t* self);
///
// Sets the text shown on the LabelButton. By default |text| will also be used
// as the accessible name.
///
void (CEF_CALLBACK *set_text)(struct _cef_label_button_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* set_text)(struct _cef_label_button_t* self,
const cef_string_t* text);
///
// Returns the text shown on the LabelButton.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_text)(
cef_string_userfree_t(CEF_CALLBACK* get_text)(
struct _cef_label_button_t* self);
///
@@ -84,27 +86,30 @@ typedef struct _cef_label_button_t {
// image exists for the current state then the image for
// CEF_BUTTON_STATE_NORMAL, if any, will be shown.
///
void (CEF_CALLBACK *set_image)(struct _cef_label_button_t* self,
cef_button_state_t button_state, struct _cef_image_t* image);
void(CEF_CALLBACK* set_image)(struct _cef_label_button_t* self,
cef_button_state_t button_state,
struct _cef_image_t* image);
///
// Returns the image shown for |button_state|. If no image exists for that
// state then the image for CEF_BUTTON_STATE_NORMAL will be returned.
///
struct _cef_image_t* (CEF_CALLBACK *get_image)(
struct _cef_label_button_t* self, cef_button_state_t button_state);
struct _cef_image_t*(CEF_CALLBACK* get_image)(
struct _cef_label_button_t* self,
cef_button_state_t button_state);
///
// Sets the text color shown for the specified button |for_state| to |color|.
///
void (CEF_CALLBACK *set_text_color)(struct _cef_label_button_t* self,
cef_button_state_t for_state, cef_color_t color);
void(CEF_CALLBACK* set_text_color)(struct _cef_label_button_t* self,
cef_button_state_t for_state,
cef_color_t color);
///
// Sets the text colors shown for the non-disabled states to |color|.
///
void (CEF_CALLBACK *set_enabled_text_colors)(struct _cef_label_button_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_enabled_text_colors)(struct _cef_label_button_t* self,
cef_color_t color);
///
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
@@ -116,30 +121,30 @@ typedef struct _cef_label_button_t {
// Here are examples of valid font description strings: - "Arial, Helvetica,
// Bold Italic 14px" - "Arial, 14px"
///
void (CEF_CALLBACK *set_font_list)(struct _cef_label_button_t* self,
const cef_string_t* font_list);
void(CEF_CALLBACK* set_font_list)(struct _cef_label_button_t* self,
const cef_string_t* font_list);
///
// Sets the horizontal alignment; reversed in RTL. Default is
// CEF_HORIZONTAL_ALIGNMENT_CENTER.
///
void (CEF_CALLBACK *set_horizontal_alignment)(
struct _cef_label_button_t* self, cef_horizontal_alignment_t alignment);
void(CEF_CALLBACK* set_horizontal_alignment)(
struct _cef_label_button_t* self,
cef_horizontal_alignment_t alignment);
///
// Reset the minimum size of this LabelButton to |size|.
///
void (CEF_CALLBACK *set_minimum_size)(struct _cef_label_button_t* self,
const cef_size_t* size);
void(CEF_CALLBACK* set_minimum_size)(struct _cef_label_button_t* self,
const cef_size_t* size);
///
// Reset the maximum size of this LabelButton to |size|.
///
void (CEF_CALLBACK *set_maximum_size)(struct _cef_label_button_t* self,
const cef_size_t* size);
void(CEF_CALLBACK* set_maximum_size)(struct _cef_label_button_t* self,
const cef_size_t* size);
} cef_label_button_t;
///
// Create a new LabelButton. A |delegate| must be provided to handle the button
// click. |text| will be shown on the LabelButton and used as the default
@@ -150,10 +155,10 @@ typedef struct _cef_label_button_t {
// default minimum size.
///
CEF_EXPORT cef_label_button_t* cef_label_button_create(
struct _cef_button_delegate_t* delegate, const cef_string_t* text,
struct _cef_button_delegate_t* delegate,
const cef_string_t* text,
int with_frame);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0fd9d445840558956dbe281f1d5d20ec003684d1$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
@@ -61,22 +63,21 @@ typedef struct _cef_layout_t {
///
// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
///
struct _cef_box_layout_t* (CEF_CALLBACK *as_box_layout)(
struct _cef_box_layout_t*(CEF_CALLBACK* as_box_layout)(
struct _cef_layout_t* self);
///
// Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
///
struct _cef_fill_layout_t* (CEF_CALLBACK *as_fill_layout)(
struct _cef_fill_layout_t*(CEF_CALLBACK* as_fill_layout)(
struct _cef_layout_t* self);
///
// Returns true (1) if this Layout is valid.
///
int (CEF_CALLBACK *is_valid)(struct _cef_layout_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_layout_t* self);
} cef_layout_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=cf3b867dfc26e13b96f2e20fe8b974a38d28119e$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_
@@ -46,7 +48,6 @@
extern "C" {
#endif
///
// MenuButton is a button with optional text, icon and/or menu marker that shows
// a menu when clicked with the left mouse button. All size and position values
@@ -65,18 +66,18 @@ typedef struct _cef_menu_button_t {
// will be anchored relative to |screen_point|. This function should be called
// from cef_menu_button_delegate_t::on_menu_button_pressed().
///
void (CEF_CALLBACK *show_menu)(struct _cef_menu_button_t* self,
struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point,
cef_menu_anchor_position_t anchor_position);
void(CEF_CALLBACK* show_menu)(struct _cef_menu_button_t* self,
struct _cef_menu_model_t* menu_model,
const cef_point_t* screen_point,
cef_menu_anchor_position_t anchor_position);
///
// Show the menu for this button. Results in a call to
// cef_menu_button_delegate_t::on_menu_button_pressed().
///
void (CEF_CALLBACK *trigger_menu)(struct _cef_menu_button_t* self);
void(CEF_CALLBACK* trigger_menu)(struct _cef_menu_button_t* self);
} cef_menu_button_t;
///
// Create a new MenuButton. A |delegate| must be provided to call show_menu()
// when the button is clicked. |text| will be shown on the MenuButton and used
@@ -88,9 +89,10 @@ typedef struct _cef_menu_button_t {
// will be added to the button.
///
CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
struct _cef_menu_button_delegate_t* delegate, const cef_string_t* text,
int with_frame, int with_menu_marker);
struct _cef_menu_button_delegate_t* delegate,
const cef_string_t* text,
int with_frame,
int with_menu_marker);
#ifdef __cplusplus
}

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a2b3912f8188f19f3d5109aec1b1d03227e31429$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
@@ -61,13 +63,12 @@ typedef struct _cef_menu_button_delegate_t {
// Called when |button| is pressed. Call cef_menu_button_t::show_menu() to
// show the resulting menu at |screen_point|.
///
void (CEF_CALLBACK *on_menu_button_pressed)(
void(CEF_CALLBACK* on_menu_button_pressed)(
struct _cef_menu_button_delegate_t* self,
struct _cef_menu_button_t* menu_button,
const cef_point_t* screen_point);
} cef_menu_button_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=dd5ea19f73dcec3e4f229920f44c9de6599e4f36$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_
@@ -64,84 +66,84 @@ typedef struct _cef_panel_t {
///
// Returns this Panel as a Window or NULL if this is not a Window.
///
struct _cef_window_t* (CEF_CALLBACK *as_window)(struct _cef_panel_t* self);
struct _cef_window_t*(CEF_CALLBACK* as_window)(struct _cef_panel_t* self);
///
// Set this Panel's Layout to FillLayout and return the FillLayout object.
///
struct _cef_fill_layout_t* (CEF_CALLBACK *set_to_fill_layout)(
struct _cef_fill_layout_t*(CEF_CALLBACK* set_to_fill_layout)(
struct _cef_panel_t* self);
///
// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
///
struct _cef_box_layout_t* (CEF_CALLBACK *set_to_box_layout)(
struct _cef_box_layout_t*(CEF_CALLBACK* set_to_box_layout)(
struct _cef_panel_t* self,
const struct _cef_box_layout_settings_t* settings);
///
// Get the Layout.
///
struct _cef_layout_t* (CEF_CALLBACK *get_layout)(struct _cef_panel_t* self);
struct _cef_layout_t*(CEF_CALLBACK* get_layout)(struct _cef_panel_t* self);
///
// Lay out the child Views (set their bounds based on sizing heuristics
// specific to the current Layout).
///
void (CEF_CALLBACK *layout)(struct _cef_panel_t* self);
void(CEF_CALLBACK* layout)(struct _cef_panel_t* self);
///
// Add a child View.
///
void (CEF_CALLBACK *add_child_view)(struct _cef_panel_t* self,
struct _cef_view_t* view);
void(CEF_CALLBACK* add_child_view)(struct _cef_panel_t* self,
struct _cef_view_t* view);
///
// Add a child View at the specified |index|. If |index| matches the result of
// GetChildCount() then the View will be added at the end.
///
void (CEF_CALLBACK *add_child_view_at)(struct _cef_panel_t* self,
struct _cef_view_t* view, int index);
void(CEF_CALLBACK* add_child_view_at)(struct _cef_panel_t* self,
struct _cef_view_t* view,
int index);
///
// Move the child View to the specified |index|. A negative value for |index|
// will move the View to the end.
///
void (CEF_CALLBACK *reorder_child_view)(struct _cef_panel_t* self,
struct _cef_view_t* view, int index);
void(CEF_CALLBACK* reorder_child_view)(struct _cef_panel_t* self,
struct _cef_view_t* view,
int index);
///
// Remove a child View. The View can then be added to another Panel.
///
void (CEF_CALLBACK *remove_child_view)(struct _cef_panel_t* self,
struct _cef_view_t* view);
void(CEF_CALLBACK* remove_child_view)(struct _cef_panel_t* self,
struct _cef_view_t* view);
///
// Remove all child Views. The removed Views will be deleted if the client
// holds no references to them.
///
void (CEF_CALLBACK *remove_all_child_views)(struct _cef_panel_t* self);
void(CEF_CALLBACK* remove_all_child_views)(struct _cef_panel_t* self);
///
// Returns the number of child Views.
///
size_t (CEF_CALLBACK *get_child_view_count)(struct _cef_panel_t* self);
size_t(CEF_CALLBACK* get_child_view_count)(struct _cef_panel_t* self);
///
// Returns the child View at the specified |index|.
///
struct _cef_view_t* (CEF_CALLBACK *get_child_view_at)(
struct _cef_panel_t* self, int index);
struct _cef_view_t*(
CEF_CALLBACK* get_child_view_at)(struct _cef_panel_t* self, int index);
} cef_panel_t;
///
// Create a new Panel.
///
CEF_EXPORT cef_panel_t* cef_panel_create(
struct _cef_panel_delegate_t* delegate);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=c3aac051e19d368c3c7e415fcb160abb83060011$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// Implement this structure to handle Panel events. The functions of this
// structure will be called on the browser process UI thread unless otherwise
@@ -57,7 +58,6 @@ typedef struct _cef_panel_delegate_t {
cef_view_delegate_t base;
} cef_panel_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ec6ad7d358194b055c2c2b5bda3d6b9c6429185a$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_
@@ -44,7 +46,6 @@
extern "C" {
#endif
///
// A ScrollView will show horizontal and/or vertical scrollbars when necessary
// based on the size of the attached content view. Methods must be called on the
@@ -60,52 +61,50 @@ typedef struct _cef_scroll_view_t {
// Set the content View. The content View must have a specified size (e.g. via
// cef_view_t::SetBounds or cef_view_tDelegate::GetPreferredSize).
///
void (CEF_CALLBACK *set_content_view)(struct _cef_scroll_view_t* self,
struct _cef_view_t* view);
void(CEF_CALLBACK* set_content_view)(struct _cef_scroll_view_t* self,
struct _cef_view_t* view);
///
// Returns the content View.
///
struct _cef_view_t* (CEF_CALLBACK *get_content_view)(
struct _cef_view_t*(CEF_CALLBACK* get_content_view)(
struct _cef_scroll_view_t* self);
///
// Returns the visible region of the content View.
///
cef_rect_t (CEF_CALLBACK *get_visible_content_rect)(
cef_rect_t(CEF_CALLBACK* get_visible_content_rect)(
struct _cef_scroll_view_t* self);
///
// Returns true (1) if the horizontal scrollbar is currently showing.
///
int (CEF_CALLBACK *has_horizontal_scrollbar)(struct _cef_scroll_view_t* self);
int(CEF_CALLBACK* has_horizontal_scrollbar)(struct _cef_scroll_view_t* self);
///
// Returns the height of the horizontal scrollbar.
///
int (CEF_CALLBACK *get_horizontal_scrollbar_height)(
int(CEF_CALLBACK* get_horizontal_scrollbar_height)(
struct _cef_scroll_view_t* self);
///
// Returns true (1) if the vertical scrollbar is currently showing.
///
int (CEF_CALLBACK *has_vertical_scrollbar)(struct _cef_scroll_view_t* self);
int(CEF_CALLBACK* has_vertical_scrollbar)(struct _cef_scroll_view_t* self);
///
// Returns the width of the vertical scrollbar.
///
int (CEF_CALLBACK *get_vertical_scrollbar_width)(
int(CEF_CALLBACK* get_vertical_scrollbar_width)(
struct _cef_scroll_view_t* self);
} cef_scroll_view_t;
///
// Create a new ScrollView.
///
CEF_EXPORT cef_scroll_view_t* cef_scroll_view_create(
struct _cef_view_delegate_t* delegate);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0dbd10f061bf4d63be22d050b93f5231fd7fb677$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// A Textfield supports editing of text. This control is custom rendered with no
// platform-specific code. Methods must be called on the browser process UI
@@ -60,60 +61,60 @@ typedef struct _cef_textfield_t {
///
// Sets whether the text will be displayed as asterisks.
///
void (CEF_CALLBACK *set_password_input)(struct _cef_textfield_t* self,
int password_input);
void(CEF_CALLBACK* set_password_input)(struct _cef_textfield_t* self,
int password_input);
///
// Returns true (1) if the text will be displayed as asterisks.
///
int (CEF_CALLBACK *is_password_input)(struct _cef_textfield_t* self);
int(CEF_CALLBACK* is_password_input)(struct _cef_textfield_t* self);
///
// Sets whether the text will read-only.
///
void (CEF_CALLBACK *set_read_only)(struct _cef_textfield_t* self,
int read_only);
void(CEF_CALLBACK* set_read_only)(struct _cef_textfield_t* self,
int read_only);
///
// Returns true (1) if the text is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_textfield_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_textfield_t* self);
///
// Returns the currently displayed text.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_text)(struct _cef_textfield_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_text)(struct _cef_textfield_t* self);
///
// Sets the contents to |text|. The cursor will be moved to end of the text if
// the current position is outside of the text range.
///
void (CEF_CALLBACK *set_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* set_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Appends |text| to the previously-existing text.
///
void (CEF_CALLBACK *append_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* append_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Inserts |text| at the current cursor position replacing any selected text.
///
void (CEF_CALLBACK *insert_or_replace_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* insert_or_replace_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Returns true (1) if there is any selected text.
///
int (CEF_CALLBACK *has_selection)(struct _cef_textfield_t* self);
int(CEF_CALLBACK* has_selection)(struct _cef_textfield_t* self);
///
// Returns the currently selected text.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_selected_text)(
cef_string_userfree_t(CEF_CALLBACK* get_selected_text)(
struct _cef_textfield_t* self);
///
@@ -121,62 +122,63 @@ typedef struct _cef_textfield_t {
// logical beginning of the text; this generally shows the leading portion of
// text that overflows its display area.
///
void (CEF_CALLBACK *select_all)(struct _cef_textfield_t* self, int reversed);
void(CEF_CALLBACK* select_all)(struct _cef_textfield_t* self, int reversed);
///
// Clears the text selection and sets the caret to the end.
///
void (CEF_CALLBACK *clear_selection)(struct _cef_textfield_t* self);
void(CEF_CALLBACK* clear_selection)(struct _cef_textfield_t* self);
///
// Returns the selected logical text range.
///
cef_range_t (CEF_CALLBACK *get_selected_range)(struct _cef_textfield_t* self);
cef_range_t(CEF_CALLBACK* get_selected_range)(struct _cef_textfield_t* self);
///
// Selects the specified logical text range.
///
void (CEF_CALLBACK *select_range)(struct _cef_textfield_t* self,
const cef_range_t* range);
void(CEF_CALLBACK* select_range)(struct _cef_textfield_t* self,
const cef_range_t* range);
///
// Returns the current cursor position.
///
size_t (CEF_CALLBACK *get_cursor_position)(struct _cef_textfield_t* self);
size_t(CEF_CALLBACK* get_cursor_position)(struct _cef_textfield_t* self);
///
// Sets the text color.
///
void (CEF_CALLBACK *set_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
///
// Returns the text color.
///
cef_color_t (CEF_CALLBACK *get_text_color)(struct _cef_textfield_t* self);
cef_color_t(CEF_CALLBACK* get_text_color)(struct _cef_textfield_t* self);
///
// Sets the selection text color.
///
void (CEF_CALLBACK *set_selection_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_selection_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
///
// Returns the selection text color.
///
cef_color_t (CEF_CALLBACK *get_selection_text_color)(
cef_color_t(CEF_CALLBACK* get_selection_text_color)(
struct _cef_textfield_t* self);
///
// Sets the selection background color.
///
void (CEF_CALLBACK *set_selection_background_color)(
struct _cef_textfield_t* self, cef_color_t color);
void(CEF_CALLBACK* set_selection_background_color)(
struct _cef_textfield_t* self,
cef_color_t color);
///
// Returns the selection background color.
///
cef_color_t (CEF_CALLBACK *get_selection_background_color)(
cef_color_t(CEF_CALLBACK* get_selection_background_color)(
struct _cef_textfield_t* self);
///
@@ -189,16 +191,17 @@ typedef struct _cef_textfield_t {
// Here are examples of valid font description strings: - "Arial, Helvetica,
// Bold Italic 14px" - "Arial, 14px"
///
void (CEF_CALLBACK *set_font_list)(struct _cef_textfield_t* self,
const cef_string_t* font_list);
void(CEF_CALLBACK* set_font_list)(struct _cef_textfield_t* self,
const cef_string_t* font_list);
///
// Applies |color| to the specified |range| without changing the default
// color. If |range| is NULL the color will be set on the complete text
// contents.
///
void (CEF_CALLBACK *apply_text_color)(struct _cef_textfield_t* self,
cef_color_t color, const cef_range_t* range);
void(CEF_CALLBACK* apply_text_color)(struct _cef_textfield_t* self,
cef_color_t color,
const cef_range_t* range);
///
// Applies |style| to the specified |range| without changing the default
@@ -206,15 +209,17 @@ typedef struct _cef_textfield_t {
// will be removed. If |range| is NULL the style will be set on the complete
// text contents.
///
void (CEF_CALLBACK *apply_text_style)(struct _cef_textfield_t* self,
cef_text_style_t style, int add, const cef_range_t* range);
void(CEF_CALLBACK* apply_text_style)(struct _cef_textfield_t* self,
cef_text_style_t style,
int add,
const cef_range_t* range);
///
// Returns true (1) if the action associated with the specified command id is
// enabled. See additional comments on execute_command().
///
int (CEF_CALLBACK *is_command_enabled)(struct _cef_textfield_t* self,
int command_id);
int(CEF_CALLBACK* is_command_enabled)(struct _cef_textfield_t* self,
int command_id);
///
// Performs the action associated with the specified command id. Valid values
@@ -222,50 +227,48 @@ typedef struct _cef_textfield_t {
// IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and
// IDS_MOVE_*. See include/cef_pack_strings.h for definitions.
///
void (CEF_CALLBACK *execute_command)(struct _cef_textfield_t* self,
int command_id);
void(CEF_CALLBACK* execute_command)(struct _cef_textfield_t* self,
int command_id);
///
// Clears Edit history.
///
void (CEF_CALLBACK *clear_edit_history)(struct _cef_textfield_t* self);
void(CEF_CALLBACK* clear_edit_history)(struct _cef_textfield_t* self);
///
// Sets the placeholder text that will be displayed when the Textfield is
// NULL.
///
void (CEF_CALLBACK *set_placeholder_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* set_placeholder_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Returns the placeholder text that will be displayed when the Textfield is
// NULL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_placeholder_text)(
cef_string_userfree_t(CEF_CALLBACK* get_placeholder_text)(
struct _cef_textfield_t* self);
///
// Sets the placeholder text color.
///
void (CEF_CALLBACK *set_placeholder_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_placeholder_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
///
// Set the accessible name that will be exposed to assistive technology (AT).
///
void (CEF_CALLBACK *set_accessible_name)(struct _cef_textfield_t* self,
const cef_string_t* name);
void(CEF_CALLBACK* set_accessible_name)(struct _cef_textfield_t* self,
const cef_string_t* name);
} cef_textfield_t;
///
// Create a new Textfield.
///
CEF_EXPORT cef_textfield_t* cef_textfield_create(
struct _cef_textfield_delegate_t* delegate);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=542381be4ca1f8b31da984b8ba9a13696da3917c$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
@@ -62,19 +64,18 @@ typedef struct _cef_textfield_delegate_t {
// information about the keyboard event. Return true (1) if the keyboard event
// was handled or false (0) otherwise for default handling.
///
int (CEF_CALLBACK *on_key_event)(struct _cef_textfield_delegate_t* self,
struct _cef_textfield_t* textfield,
const struct _cef_key_event_t* event);
int(CEF_CALLBACK* on_key_event)(struct _cef_textfield_delegate_t* self,
struct _cef_textfield_t* textfield,
const struct _cef_key_event_t* event);
///
// Called after performing a user action that may change |textfield|.
///
void (CEF_CALLBACK *on_after_user_action)(
void(CEF_CALLBACK* on_after_user_action)(
struct _cef_textfield_delegate_t* self,
struct _cef_textfield_t* textfield);
} cef_textfield_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=de8c557cc87233b9d9caeccfaf426f14ee4b499a$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_
@@ -66,29 +68,29 @@ typedef struct _cef_view_t {
///
// Returns this View as a BrowserView or NULL if this is not a BrowserView.
///
struct _cef_browser_view_t* (CEF_CALLBACK *as_browser_view)(
struct _cef_browser_view_t*(CEF_CALLBACK* as_browser_view)(
struct _cef_view_t* self);
///
// Returns this View as a Button or NULL if this is not a Button.
///
struct _cef_button_t* (CEF_CALLBACK *as_button)(struct _cef_view_t* self);
struct _cef_button_t*(CEF_CALLBACK* as_button)(struct _cef_view_t* self);
///
// Returns this View as a Panel or NULL if this is not a Panel.
///
struct _cef_panel_t* (CEF_CALLBACK *as_panel)(struct _cef_view_t* self);
struct _cef_panel_t*(CEF_CALLBACK* as_panel)(struct _cef_view_t* self);
///
// Returns this View as a ScrollView or NULL if this is not a ScrollView.
///
struct _cef_scroll_view_t* (CEF_CALLBACK *as_scroll_view)(
struct _cef_scroll_view_t*(CEF_CALLBACK* as_scroll_view)(
struct _cef_view_t* self);
///
// Returns this View as a Textfield or NULL if this is not a Textfield.
///
struct _cef_textfield_t* (CEF_CALLBACK *as_textfield)(
struct _cef_textfield_t*(CEF_CALLBACK* as_textfield)(
struct _cef_view_t* self);
///
@@ -96,7 +98,7 @@ typedef struct _cef_view_t {
// purposes.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_type_string)(
cef_string_userfree_t(CEF_CALLBACK* get_type_string)(
struct _cef_view_t* self);
///
@@ -106,146 +108,146 @@ typedef struct _cef_view_t {
// purposes.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *to_string)(struct _cef_view_t* self,
int include_children);
cef_string_userfree_t(CEF_CALLBACK* to_string)(struct _cef_view_t* self,
int include_children);
///
// Returns true (1) if this View is valid.
///
int (CEF_CALLBACK *is_valid)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_valid)(struct _cef_view_t* self);
///
// Returns true (1) if this View is currently attached to another View. A View
// can only be attached to one View at a time.
///
int (CEF_CALLBACK *is_attached)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_attached)(struct _cef_view_t* self);
///
// Returns true (1) if this View is the same as |that| View.
///
int (CEF_CALLBACK *is_same)(struct _cef_view_t* self,
struct _cef_view_t* that);
int(CEF_CALLBACK* is_same)(struct _cef_view_t* self,
struct _cef_view_t* that);
///
// Returns the delegate associated with this View, if any.
///
struct _cef_view_delegate_t* (CEF_CALLBACK *get_delegate)(
struct _cef_view_delegate_t*(CEF_CALLBACK* get_delegate)(
struct _cef_view_t* self);
///
// Returns the top-level Window hosting this View, if any.
///
struct _cef_window_t* (CEF_CALLBACK *get_window)(struct _cef_view_t* self);
struct _cef_window_t*(CEF_CALLBACK* get_window)(struct _cef_view_t* self);
///
// Returns the ID for this View.
///
int (CEF_CALLBACK *get_id)(struct _cef_view_t* self);
int(CEF_CALLBACK* get_id)(struct _cef_view_t* self);
///
// Sets the ID for this View. ID should be unique within the subtree that you
// intend to search for it. 0 is the default ID for views.
///
void (CEF_CALLBACK *set_id)(struct _cef_view_t* self, int id);
void(CEF_CALLBACK* set_id)(struct _cef_view_t* self, int id);
///
// Returns the group id of this View, or -1 if not set.
///
int (CEF_CALLBACK *get_group_id)(struct _cef_view_t* self);
int(CEF_CALLBACK* get_group_id)(struct _cef_view_t* self);
///
// A group id is used to tag Views which are part of the same logical group.
// Focus can be moved between views with the same group using the arrow keys.
// The group id is immutable once it's set.
///
void (CEF_CALLBACK *set_group_id)(struct _cef_view_t* self, int group_id);
void(CEF_CALLBACK* set_group_id)(struct _cef_view_t* self, int group_id);
///
// Returns the View that contains this View, if any.
///
struct _cef_view_t* (CEF_CALLBACK *get_parent_view)(struct _cef_view_t* self);
struct _cef_view_t*(CEF_CALLBACK* get_parent_view)(struct _cef_view_t* self);
///
// Recursively descends the view tree starting at this View, and returns the
// first child that it encounters with the given ID. Returns NULL if no
// matching child view is found.
///
struct _cef_view_t* (CEF_CALLBACK *get_view_for_id)(struct _cef_view_t* self,
int id);
struct _cef_view_t*(CEF_CALLBACK* get_view_for_id)(struct _cef_view_t* self,
int id);
///
// Sets the bounds (size and position) of this View. Position is in parent
// coordinates.
///
void (CEF_CALLBACK *set_bounds)(struct _cef_view_t* self,
const cef_rect_t* bounds);
void(CEF_CALLBACK* set_bounds)(struct _cef_view_t* self,
const cef_rect_t* bounds);
///
// Returns the bounds (size and position) of this View. Position is in parent
// coordinates.
///
cef_rect_t (CEF_CALLBACK *get_bounds)(struct _cef_view_t* self);
cef_rect_t(CEF_CALLBACK* get_bounds)(struct _cef_view_t* self);
///
// Returns the bounds (size and position) of this View. Position is in screen
// coordinates.
///
cef_rect_t (CEF_CALLBACK *get_bounds_in_screen)(struct _cef_view_t* self);
cef_rect_t(CEF_CALLBACK* get_bounds_in_screen)(struct _cef_view_t* self);
///
// Sets the size of this View without changing the position.
///
void (CEF_CALLBACK *set_size)(struct _cef_view_t* self,
const cef_size_t* size);
void(CEF_CALLBACK* set_size)(struct _cef_view_t* self,
const cef_size_t* size);
///
// Returns the size of this View.
///
cef_size_t (CEF_CALLBACK *get_size)(struct _cef_view_t* self);
cef_size_t(CEF_CALLBACK* get_size)(struct _cef_view_t* self);
///
// Sets the position of this View without changing the size. |position| is in
// parent coordinates.
///
void (CEF_CALLBACK *set_position)(struct _cef_view_t* self,
const cef_point_t* position);
void(CEF_CALLBACK* set_position)(struct _cef_view_t* self,
const cef_point_t* position);
///
// Returns the position of this View. Position is in parent coordinates.
///
cef_point_t (CEF_CALLBACK *get_position)(struct _cef_view_t* self);
cef_point_t(CEF_CALLBACK* get_position)(struct _cef_view_t* self);
///
// Returns the size this View would like to be if enough space is available.
///
cef_size_t (CEF_CALLBACK *get_preferred_size)(struct _cef_view_t* self);
cef_size_t(CEF_CALLBACK* get_preferred_size)(struct _cef_view_t* self);
///
// Size this View to its preferred size.
///
void (CEF_CALLBACK *size_to_preferred_size)(struct _cef_view_t* self);
void(CEF_CALLBACK* size_to_preferred_size)(struct _cef_view_t* self);
///
// Returns the minimum size for this View.
///
cef_size_t (CEF_CALLBACK *get_minimum_size)(struct _cef_view_t* self);
cef_size_t(CEF_CALLBACK* get_minimum_size)(struct _cef_view_t* self);
///
// Returns the maximum size for this View.
///
cef_size_t (CEF_CALLBACK *get_maximum_size)(struct _cef_view_t* self);
cef_size_t(CEF_CALLBACK* get_maximum_size)(struct _cef_view_t* self);
///
// Returns the height necessary to display this View with the provided width.
///
int (CEF_CALLBACK *get_height_for_width)(struct _cef_view_t* self, int width);
int(CEF_CALLBACK* get_height_for_width)(struct _cef_view_t* self, int width);
///
// Indicate that this View and all parent Views require a re-layout. This
// ensures the next call to layout() will propagate to this View even if the
// bounds of parent Views do not change.
///
void (CEF_CALLBACK *invalidate_layout)(struct _cef_view_t* self);
void(CEF_CALLBACK* invalidate_layout)(struct _cef_view_t* self);
///
// Sets whether this View is visible. Windows are hidden by default and other
@@ -256,7 +258,7 @@ typedef struct _cef_view_t {
// scheduled as needed. If this View is a Window then calling this function is
// equivalent to calling the Window show() and hide() functions.
///
void (CEF_CALLBACK *set_visible)(struct _cef_view_t* self, int visible);
void(CEF_CALLBACK* set_visible)(struct _cef_view_t* self, int visible);
///
// Returns whether this View is visible. A view may be visible but still not
@@ -266,7 +268,7 @@ typedef struct _cef_view_t {
// is_drawn() to determine whether this View and all parent views are visible
// and will be drawn.
///
int (CEF_CALLBACK *is_visible)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_visible)(struct _cef_view_t* self);
///
// Returns whether this View is visible and drawn in a Window. A view is drawn
@@ -275,54 +277,54 @@ typedef struct _cef_view_t {
// determine if the containing Window is visible to the user on-screen call
// is_visible() on the Window.
///
int (CEF_CALLBACK *is_drawn)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_drawn)(struct _cef_view_t* self);
///
// Set whether this View is enabled. A disabled View does not receive keyboard
// or mouse inputs. If |enabled| differs from the current value the View will
// be repainted. Also, clears focus if the focused View is disabled.
///
void (CEF_CALLBACK *set_enabled)(struct _cef_view_t* self, int enabled);
void(CEF_CALLBACK* set_enabled)(struct _cef_view_t* self, int enabled);
///
// Returns whether this View is enabled.
///
int (CEF_CALLBACK *is_enabled)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_enabled)(struct _cef_view_t* self);
///
// Sets whether this View is capable of taking focus. It will clear focus if
// the focused View is set to be non-focusable. This is false (0) by default
// so that a View used as a container does not get the focus.
///
void (CEF_CALLBACK *set_focusable)(struct _cef_view_t* self, int focusable);
void(CEF_CALLBACK* set_focusable)(struct _cef_view_t* self, int focusable);
///
// Returns true (1) if this View is focusable, enabled and drawn.
///
int (CEF_CALLBACK *is_focusable)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_focusable)(struct _cef_view_t* self);
///
// Return whether this View is focusable when the user requires full keyboard
// access, even though it may not be normally focusable.
///
int (CEF_CALLBACK *is_accessibility_focusable)(struct _cef_view_t* self);
int(CEF_CALLBACK* is_accessibility_focusable)(struct _cef_view_t* self);
///
// Request keyboard focus. If this View is focusable it will become the
// focused View.
///
void (CEF_CALLBACK *request_focus)(struct _cef_view_t* self);
void(CEF_CALLBACK* request_focus)(struct _cef_view_t* self);
///
// Sets the background color for this View.
///
void (CEF_CALLBACK *set_background_color)(struct _cef_view_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_background_color)(struct _cef_view_t* self,
cef_color_t color);
///
// Returns the background color for this View.
///
cef_color_t (CEF_CALLBACK *get_background_color)(struct _cef_view_t* self);
cef_color_t(CEF_CALLBACK* get_background_color)(struct _cef_view_t* self);
///
// Convert |point| from this View's coordinate system to that of the screen.
@@ -331,8 +333,8 @@ typedef struct _cef_view_t {
// cef_display_t::convert_point_to_pixels() after calling this function if
// further conversion to display-specific pixel coordinates is desired.
///
int (CEF_CALLBACK *convert_point_to_screen)(struct _cef_view_t* self,
cef_point_t* point);
int(CEF_CALLBACK* convert_point_to_screen)(struct _cef_view_t* self,
cef_point_t* point);
///
// Convert |point| to this View's coordinate system from that of the screen.
@@ -341,24 +343,24 @@ typedef struct _cef_view_t {
// cef_display_t::convert_point_from_pixels() before calling this function if
// conversion from display-specific pixel coordinates is necessary.
///
int (CEF_CALLBACK *convert_point_from_screen)(struct _cef_view_t* self,
cef_point_t* point);
int(CEF_CALLBACK* convert_point_from_screen)(struct _cef_view_t* self,
cef_point_t* point);
///
// Convert |point| from this View's coordinate system to that of the Window.
// This View must belong to a Window when calling this function. Returns true
// (1) if the conversion is successful or false (0) otherwise.
///
int (CEF_CALLBACK *convert_point_to_window)(struct _cef_view_t* self,
cef_point_t* point);
int(CEF_CALLBACK* convert_point_to_window)(struct _cef_view_t* self,
cef_point_t* point);
///
// Convert |point| to this View's coordinate system from that of the Window.
// This View must belong to a Window when calling this function. Returns true
// (1) if the conversion is successful or false (0) otherwise.
///
int (CEF_CALLBACK *convert_point_from_window)(struct _cef_view_t* self,
cef_point_t* point);
int(CEF_CALLBACK* convert_point_from_window)(struct _cef_view_t* self,
cef_point_t* point);
///
// Convert |point| from this View's coordinate system to that of |view|.
@@ -366,19 +368,20 @@ typedef struct _cef_view_t {
// hierarchy. Returns true (1) if the conversion is successful or false (0)
// otherwise.
///
int (CEF_CALLBACK *convert_point_to_view)(struct _cef_view_t* self,
struct _cef_view_t* view, cef_point_t* point);
int(CEF_CALLBACK* convert_point_to_view)(struct _cef_view_t* self,
struct _cef_view_t* view,
cef_point_t* point);
///
// Convert |point| to this View's coordinate system from that |view|. |view|
// needs to be in the same Window but not necessarily the same view hierarchy.
// Returns true (1) if the conversion is successful or false (0) otherwise.
///
int (CEF_CALLBACK *convert_point_from_view)(struct _cef_view_t* self,
struct _cef_view_t* view, cef_point_t* point);
int(CEF_CALLBACK* convert_point_from_view)(struct _cef_view_t* self,
struct _cef_view_t* view,
cef_point_t* point);
} cef_view_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=982ad223be14ddf50a61b3cf803330397349b661$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
@@ -61,20 +63,21 @@ typedef struct _cef_view_delegate_t {
// Return the preferred size for |view|. The Layout will use this information
// to determine the display size.
///
cef_size_t (CEF_CALLBACK *get_preferred_size)(
struct _cef_view_delegate_t* self, struct _cef_view_t* view);
cef_size_t(CEF_CALLBACK* get_preferred_size)(
struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
///
// Return the minimum size for |view|.
///
cef_size_t (CEF_CALLBACK *get_minimum_size)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
cef_size_t(CEF_CALLBACK* get_minimum_size)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
///
// Return the maximum size for |view|.
///
cef_size_t (CEF_CALLBACK *get_maximum_size)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
cef_size_t(CEF_CALLBACK* get_maximum_size)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
///
// Return the height necessary to display |view| with the provided |width|. If
@@ -82,8 +85,9 @@ typedef struct _cef_view_delegate_t {
// default. Override if |view|'s preferred height depends upon the width (for
// example, with Labels).
///
int (CEF_CALLBACK *get_height_for_width)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view, int width);
int(CEF_CALLBACK* get_height_for_width)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view,
int width);
///
// Called when the parent of |view| has changed. If |view| is being added to
@@ -92,8 +96,10 @@ typedef struct _cef_view_delegate_t {
// remove notification will be sent before the add notification. Do not modify
// the view hierarchy in this callback.
///
void (CEF_CALLBACK *on_parent_view_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view, int added, struct _cef_view_t* parent);
void(CEF_CALLBACK* on_parent_view_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view,
int added,
struct _cef_view_t* parent);
///
// Called when a child of |view| has changed. If |child| is being added to
@@ -103,23 +109,24 @@ typedef struct _cef_view_delegate_t {
// notification is sent to the new parent. Do not modify the view hierarchy in
// this callback.
///
void (CEF_CALLBACK *on_child_view_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view, int added, struct _cef_view_t* child);
void(CEF_CALLBACK* on_child_view_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view,
int added,
struct _cef_view_t* child);
///
// Called when |view| gains focus.
///
void (CEF_CALLBACK *on_focus)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
void(CEF_CALLBACK* on_focus)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
///
// Called when |view| loses focus.
///
void (CEF_CALLBACK *on_blur)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
void(CEF_CALLBACK* on_blur)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
} cef_view_delegate_t;
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ef258af57aea577693ce52d61b630ca29bdd5ea0$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_
@@ -48,7 +50,6 @@
extern "C" {
#endif
///
// A Window is a top-level Window/widget in the Views hierarchy. By default it
// will have a non-client area with title bar, icon and buttons that supports
@@ -65,121 +66,120 @@ typedef struct _cef_window_t {
///
// Show the Window.
///
void (CEF_CALLBACK *show)(struct _cef_window_t* self);
void(CEF_CALLBACK* show)(struct _cef_window_t* self);
///
// Hide the Window.
///
void (CEF_CALLBACK *hide)(struct _cef_window_t* self);
void(CEF_CALLBACK* hide)(struct _cef_window_t* self);
///
// Sizes the Window to |size| and centers it in the current display.
///
void (CEF_CALLBACK *center_window)(struct _cef_window_t* self,
const cef_size_t* size);
void(CEF_CALLBACK* center_window)(struct _cef_window_t* self,
const cef_size_t* size);
///
// Close the Window.
///
void (CEF_CALLBACK *close)(struct _cef_window_t* self);
void(CEF_CALLBACK* close)(struct _cef_window_t* self);
///
// Returns true (1) if the Window has been closed.
///
int (CEF_CALLBACK *is_closed)(struct _cef_window_t* self);
int(CEF_CALLBACK* is_closed)(struct _cef_window_t* self);
///
// Activate the Window, assuming it already exists and is visible.
///
void (CEF_CALLBACK *activate)(struct _cef_window_t* self);
void(CEF_CALLBACK* activate)(struct _cef_window_t* self);
///
// Deactivate the Window, making the next Window in the Z order the active
// Window.
///
void (CEF_CALLBACK *deactivate)(struct _cef_window_t* self);
void(CEF_CALLBACK* deactivate)(struct _cef_window_t* self);
///
// Returns whether the Window is the currently active Window.
///
int (CEF_CALLBACK *is_active)(struct _cef_window_t* self);
int(CEF_CALLBACK* is_active)(struct _cef_window_t* self);
///
// Bring this Window to the top of other Windows in the Windowing system.
///
void (CEF_CALLBACK *bring_to_top)(struct _cef_window_t* self);
void(CEF_CALLBACK* bring_to_top)(struct _cef_window_t* self);
///
// Set the Window to be on top of other Windows in the Windowing system.
///
void (CEF_CALLBACK *set_always_on_top)(struct _cef_window_t* self,
int on_top);
void(CEF_CALLBACK* set_always_on_top)(struct _cef_window_t* self, int on_top);
///
// Returns whether the Window has been set to be on top of other Windows in
// the Windowing system.
///
int (CEF_CALLBACK *is_always_on_top)(struct _cef_window_t* self);
int(CEF_CALLBACK* is_always_on_top)(struct _cef_window_t* self);
///
// Maximize the Window.
///
void (CEF_CALLBACK *maximize)(struct _cef_window_t* self);
void(CEF_CALLBACK* maximize)(struct _cef_window_t* self);
///
// Minimize the Window.
///
void (CEF_CALLBACK *minimize)(struct _cef_window_t* self);
void(CEF_CALLBACK* minimize)(struct _cef_window_t* self);
///
// Restore the Window.
///
void (CEF_CALLBACK *restore)(struct _cef_window_t* self);
void(CEF_CALLBACK* restore)(struct _cef_window_t* self);
///
// Set fullscreen Window state.
///
void (CEF_CALLBACK *set_fullscreen)(struct _cef_window_t* self,
int fullscreen);
void(CEF_CALLBACK* set_fullscreen)(struct _cef_window_t* self,
int fullscreen);
///
// Returns true (1) if the Window is maximized.
///
int (CEF_CALLBACK *is_maximized)(struct _cef_window_t* self);
int(CEF_CALLBACK* is_maximized)(struct _cef_window_t* self);
///
// Returns true (1) if the Window is minimized.
///
int (CEF_CALLBACK *is_minimized)(struct _cef_window_t* self);
int(CEF_CALLBACK* is_minimized)(struct _cef_window_t* self);
///
// Returns true (1) if the Window is fullscreen.
///
int (CEF_CALLBACK *is_fullscreen)(struct _cef_window_t* self);
int(CEF_CALLBACK* is_fullscreen)(struct _cef_window_t* self);
///
// Set the Window title.
///
void (CEF_CALLBACK *set_title)(struct _cef_window_t* self,
const cef_string_t* title);
void(CEF_CALLBACK* set_title)(struct _cef_window_t* self,
const cef_string_t* title);
///
// Get the Window title.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_title)(struct _cef_window_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_title)(struct _cef_window_t* self);
///
// Set the Window icon. This should be a 16x16 icon suitable for use in the
// Windows's title bar.
///
void (CEF_CALLBACK *set_window_icon)(struct _cef_window_t* self,
struct _cef_image_t* image);
void(CEF_CALLBACK* set_window_icon)(struct _cef_window_t* self,
struct _cef_image_t* image);
///
// Get the Window icon.
///
struct _cef_image_t* (CEF_CALLBACK *get_window_icon)(
struct _cef_image_t*(CEF_CALLBACK* get_window_icon)(
struct _cef_window_t* self);
///
@@ -188,13 +188,13 @@ typedef struct _cef_window_t {
// Tab list and Windows taskbar. The Window icon will be used by default if no
// Window App icon is specified.
///
void (CEF_CALLBACK *set_window_app_icon)(struct _cef_window_t* self,
struct _cef_image_t* image);
void(CEF_CALLBACK* set_window_app_icon)(struct _cef_window_t* self,
struct _cef_image_t* image);
///
// Get the Window App icon.
///
struct _cef_image_t* (CEF_CALLBACK *get_window_app_icon)(
struct _cef_image_t*(CEF_CALLBACK* get_window_app_icon)(
struct _cef_window_t* self);
///
@@ -202,27 +202,27 @@ typedef struct _cef_window_t {
// position in screen coordinates. |anchor_position| specifies how the menu
// will be anchored relative to |screen_point|.
///
void (CEF_CALLBACK *show_menu)(struct _cef_window_t* self,
struct _cef_menu_model_t* menu_model, const cef_point_t* screen_point,
cef_menu_anchor_position_t anchor_position);
void(CEF_CALLBACK* show_menu)(struct _cef_window_t* self,
struct _cef_menu_model_t* menu_model,
const cef_point_t* screen_point,
cef_menu_anchor_position_t anchor_position);
///
// Cancel the menu that is currently showing, if any.
///
void (CEF_CALLBACK *cancel_menu)(struct _cef_window_t* self);
void(CEF_CALLBACK* cancel_menu)(struct _cef_window_t* self);
///
// Returns the Display that most closely intersects the bounds of this Window.
// May return NULL if this Window is not currently displayed.
///
struct _cef_display_t* (CEF_CALLBACK *get_display)(
struct _cef_window_t* self);
struct _cef_display_t*(CEF_CALLBACK* get_display)(struct _cef_window_t* self);
///
// Returns the bounds (size and position) of this Window's client area.
// Position is in screen coordinates.
///
cef_rect_t (CEF_CALLBACK *get_client_area_bounds_in_screen)(
cef_rect_t(CEF_CALLBACK* get_client_area_bounds_in_screen)(
struct _cef_window_t* self);
///
@@ -231,13 +231,15 @@ typedef struct _cef_window_t {
// the draggable regions. The draggable region bounds should be in window
// coordinates.
///
void (CEF_CALLBACK *set_draggable_regions)(struct _cef_window_t* self,
size_t regionsCount, cef_draggable_region_t const* regions);
void(CEF_CALLBACK* set_draggable_regions)(
struct _cef_window_t* self,
size_t regionsCount,
cef_draggable_region_t const* regions);
///
// Retrieve the platform window handle for this Window.
///
cef_window_handle_t (CEF_CALLBACK *get_window_handle)(
cef_window_handle_t(CEF_CALLBACK* get_window_handle)(
struct _cef_window_t* self);
///
@@ -247,16 +249,18 @@ typedef struct _cef_window_t {
// EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This function is exposed
// primarily for testing purposes.
///
void (CEF_CALLBACK *send_key_press)(struct _cef_window_t* self, int key_code,
uint32 event_flags);
void(CEF_CALLBACK* send_key_press)(struct _cef_window_t* self,
int key_code,
uint32 event_flags);
///
// Simulate a mouse move. The mouse cursor will be moved to the specified
// (screen_x, screen_y) position. This function is exposed primarily for
// testing purposes.
///
void (CEF_CALLBACK *send_mouse_move)(struct _cef_window_t* self, int screen_x,
int screen_y);
void(CEF_CALLBACK* send_mouse_move)(struct _cef_window_t* self,
int screen_x,
int screen_y);
///
// Simulate mouse down and/or mouse up events. |button| is the mouse button
@@ -267,8 +271,10 @@ typedef struct _cef_window_t {
// cursor position so make sure to call send_mouse_move() first to position
// the mouse. This function is exposed primarily for testing purposes.
///
void (CEF_CALLBACK *send_mouse_events)(struct _cef_window_t* self,
cef_mouse_button_type_t button, int mouse_down, int mouse_up);
void(CEF_CALLBACK* send_mouse_events)(struct _cef_window_t* self,
cef_mouse_button_type_t button,
int mouse_down,
int mouse_up);
///
// Set the keyboard accelerator for the specified |command_id|. |key_code| can
@@ -276,30 +282,31 @@ typedef struct _cef_window_t {
// will be called if the keyboard combination is triggered while this window
// has focus.
///
void (CEF_CALLBACK *set_accelerator)(struct _cef_window_t* self,
int command_id, int key_code, int shift_pressed, int ctrl_pressed,
int alt_pressed);
void(CEF_CALLBACK* set_accelerator)(struct _cef_window_t* self,
int command_id,
int key_code,
int shift_pressed,
int ctrl_pressed,
int alt_pressed);
///
// Remove the keyboard accelerator for the specified |command_id|.
///
void (CEF_CALLBACK *remove_accelerator)(struct _cef_window_t* self,
int command_id);
void(CEF_CALLBACK* remove_accelerator)(struct _cef_window_t* self,
int command_id);
///
// Remove all keyboard accelerators.
///
void (CEF_CALLBACK *remove_all_accelerators)(struct _cef_window_t* self);
void(CEF_CALLBACK* remove_all_accelerators)(struct _cef_window_t* self);
} cef_window_t;
///
// Create a new Window.
///
CEF_EXPORT cef_window_t* cef_window_create_top_level(
struct _cef_window_delegate_t* delegate);
#ifdef __cplusplus
}
#endif

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=e4957abc4c3b80b9f324d74d2c8c6aa2632c52d9$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
@@ -60,68 +62,69 @@ typedef struct _cef_window_delegate_t {
///
// Called when |window| is created.
///
void (CEF_CALLBACK *on_window_created)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
void(CEF_CALLBACK* on_window_created)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Called when |window| is destroyed. Release all references to |window| and
// do not attempt to execute any functions on |window| after this callback
// returns.
///
void (CEF_CALLBACK *on_window_destroyed)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
void(CEF_CALLBACK* on_window_destroyed)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return true (1) if |window| should be created without a frame or title bar.
// The window will be resizable if can_resize() returns true (1). Use
// cef_window_t::set_draggable_regions() to specify draggable regions.
///
int (CEF_CALLBACK *is_frameless)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
int(CEF_CALLBACK* is_frameless)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return true (1) if |window| can be resized.
///
int (CEF_CALLBACK *can_resize)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
int(CEF_CALLBACK* can_resize)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return true (1) if |window| can be maximized.
///
int (CEF_CALLBACK *can_maximize)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
int(CEF_CALLBACK* can_maximize)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return true (1) if |window| can be minimized.
///
int (CEF_CALLBACK *can_minimize)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
int(CEF_CALLBACK* can_minimize)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return true (1) if |window| can be closed. This will be called for user-
// initiated window close actions and when cef_window_t::close() is called.
///
int (CEF_CALLBACK *can_close)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
int(CEF_CALLBACK* can_close)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Called when a keyboard accelerator registered with
// cef_window_t::SetAccelerator is triggered. Return true (1) if the
// accelerator was handled or false (0) otherwise.
///
int (CEF_CALLBACK *on_accelerator)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window, int command_id);
int(CEF_CALLBACK* on_accelerator)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
int command_id);
///
// Called after all other controls in the window have had a chance to handle
// the event. |event| contains information about the keyboard event. Return
// true (1) if the keyboard event was handled or false (0) otherwise.
///
int (CEF_CALLBACK *on_key_event)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window, const struct _cef_key_event_t* event);
int(CEF_CALLBACK* on_key_event)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
const struct _cef_key_event_t* event);
} cef_window_delegate_t;
#ifdef __cplusplus
}
#endif