diff --git a/ports/cef/types.rs b/ports/cef/types.rs index b6abf2e7d38..6d3ff34033e 100644 --- a/ports/cef/types.rs +++ b/ports/cef/types.rs @@ -12,33 +12,21 @@ pub enum cef_text_input_context_t {} pub enum cef_event_handle_t {} //these all need to be done... -pub enum cef_binary_value_val {} -pub type cef_binary_value = *mut cef_binary_value_val; -pub enum cef_dictionary_value_val {} -pub type cef_dictionary_value = *mut cef_dictionary_value_val; +pub enum cef_binary_value_t {} +pub enum cef_dictionary_value_t {} pub enum cef_client_t {} pub enum cef_request_t {} pub enum cef_response_t {} pub enum cef_urlrequest_client_t {} -pub enum cef_frame_val {} -pub type cef_frame = *mut cef_frame_val; -pub enum cef_domnode_val {} -pub type cef_domnode = *mut cef_domnode_val; -pub enum cef_load_handler_val {} -pub type cef_load_handler = *mut cef_load_handler_val; -pub enum cef_request_val {} -pub type cef_request = *mut cef_request_val; -pub enum cef_navigation_type_val {} -pub type cef_navigation_type = *mut cef_navigation_type_val; +pub enum cef_frame_t {} +pub enum cef_domnode_t {} +pub enum cef_load_handler_t {} pub enum cef_request_context_t {} pub enum cef_window_info_t {} pub enum cef_browser_settings_t {} -pub enum cef_v8context_val {} -pub type cef_v8context = *mut cef_v8context_val; -pub enum cef_v8exception_val {} -pub type cef_v8exception = *mut cef_v8exception_val; -pub enum cef_v8stack_trace_val {} -pub type cef_v8stack_trace = *mut cef_v8stack_trace_val; +pub enum cef_v8context_t {} +pub enum cef_v8exception_t {} +pub enum cef_v8stack_trace_t {} pub enum cef_window_handle_t {} //FIXME: wtf is this pub type cef_string_t = cef_string_utf8; //FIXME: this is #defined... @@ -534,7 +522,7 @@ pub struct cef_process_message { /// // Returns the list of arguments. /// - pub get_argument_list: Option *mut cef_list_value>, + pub get_argument_list: Option *mut cef_list_value_t>, } /// @@ -984,7 +972,7 @@ pub struct cef_resource_bundle_handler { // string and return true (1). To use the default translation return false // (0). Supported message IDs are listed in cef_pack_strings.h. /// - pub get_localized_string: Option c_int>, /// @@ -995,7 +983,7 @@ pub struct cef_resource_bundle_handler { // resident in memory. Supported resource IDs are listed in // cef_pack_resources.h. /// - pub get_data_resource: Option c_int>, } @@ -1015,115 +1003,115 @@ pub struct cef_list_value { // Returns true (1) if this object is valid. Do not call any other functions // if this function returns false (0). /// - pub is_valid: Option c_int>, + pub is_valid: Option c_int>, /// // Returns true (1) if this object is currently owned by another object. /// - pub is_owned: Option c_int>, + pub is_owned: Option c_int>, /// // Returns true (1) if the values of this object are read-only. Some APIs may // expose read-only objects. /// - pub is_read_only: Option c_int>, + pub is_read_only: Option c_int>, /// // Returns a writable copy of this object. /// - pub copy: Option *mut cef_list_value>, + pub copy: Option *mut cef_list_value_t>, /// // 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. /// - pub set_size: Option c_int>, + pub set_size: Option c_int>, /// // Returns the number of values. /// - pub get_size: Option size_t>, + pub get_size: Option size_t>, /// // Removes all values. Returns true (1) on success. /// - pub clear: Option c_int>, + pub clear: Option c_int>, /// // Removes the value at the specified index. /// - pub remove: Option c_int>, + pub remove: Option c_int>, /// // Returns the value type at the specified index. /// - pub get_type: Option cef_value_type_t>, + pub get_type: Option cef_value_type_t>, /// // Returns the value at the specified index as type bool. /// - pub get_bool: Option c_int>, + pub get_bool: Option c_int>, /// // Returns the value at the specified index as type int. /// - pub get_int: Option c_int>, + pub get_int: Option c_int>, /// // Returns the value at the specified index as type double. /// - pub get_double: Option c_double>, + pub get_double: Option c_double>, /// // Returns the value at the specified index as type string. /// // The resulting string must be freed by calling cef_string_userfree_free(). - pub get_string: Option *mut cef_string_userfree_t>, + pub get_string: Option *mut cef_string_userfree_t>, /// // Returns the value at the specified index as type binary. /// - pub get_binary: Option *mut cef_binary_value>, + pub get_binary: Option *mut cef_binary_value_t>, /// // Returns the value at the specified index as type dictionary. /// - pub get_dictionary: Option *mut cef_dictionary_value>, + pub get_dictionary: Option *mut cef_dictionary_value_t>, /// // Returns the value at the specified index as type list. /// - pub get_list: Option *mut cef_list_value>, + pub get_list: Option *mut cef_list_value_t>, /// // Sets the value at the specified index as type null. Returns true (1) if the // value was set successfully. /// - pub set_null: Option c_int>, + pub set_null: Option c_int>, /// // Sets the value at the specified index as type bool. Returns true (1) if the // value was set successfully. /// - pub set_bool: Option c_int>, + pub set_bool: Option c_int>, /// // Sets the value at the specified index as type int. Returns true (1) if the // value was set successfully. /// - pub set_int: Option c_int>, + pub set_int: Option c_int>, /// // Sets the value at the specified index as type double. Returns true (1) if // the value was set successfully. /// - pub set_double: Option c_int>, + pub set_double: Option c_int>, /// // Sets the value at the specified index as type string. Returns true (1) if // the value was set successfully. /// - pub set_string: Option c_int>, + pub set_string: Option c_int>, /// // Sets the value at the specified index as type binary. Returns true (1) if @@ -1133,7 +1121,7 @@ pub struct cef_list_value { // change. Otherwise, ownership will be transferred to this object and the // |value| reference will be invalidated. /// - pub set_binary: Option c_int>, + pub set_binary: Option c_int>, /// // Sets the value at the specified index as type dict. Returns true (1) if the @@ -1143,7 +1131,7 @@ pub struct cef_list_value { // Otherwise, ownership will be transferred to this object and the |value| // reference will be invalidated. /// - pub set_dictionary: Option c_int>, + pub set_dictionary: Option c_int>, /// // Sets the value at the specified index as type list. Returns true (1) if the @@ -1153,7 +1141,7 @@ pub struct cef_list_value { // Otherwise, ownership will be transferred to this object and the |value| // reference will be invalidated. /// - pub set_list: Option c_int>, + pub set_list: Option c_int>, } /// @@ -1190,7 +1178,7 @@ pub struct cef_browser_process_handler { // 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. /// - pub on_render_process_thread_created: Option, + pub on_render_process_thread_created: Option, } @@ -1232,7 +1220,7 @@ pub struct cef_browser_host { /// // Returns the hosted browser object. /// - pub get_browser: Option *mut cef_browser>, + pub get_browser: Option *mut cef_browser_t>, /// // Call this function before destroying a contained browser window. This @@ -1480,111 +1468,111 @@ pub struct cef_browser { // Returns the browser host object. This function can only be called in the // browser process. /// - pub get_host: Option *mut cef_browser_host>, + pub get_host: Option *mut cef_browser_host>, /// // Returns true (1) if the browser can navigate backwards. /// - pub can_go_back: Option c_int>, + pub can_go_back: Option c_int>, /// // Navigate backwards. /// - pub go_back: Option, + pub go_back: Option, /// // Returns true (1) if the browser can navigate forwards. /// - pub can_go_forward: Option c_int>, + pub can_go_forward: Option c_int>, /// // Navigate forwards. /// - pub go_forward: Option, + pub go_forward: Option, /// // Returns true (1) if the browser is currently loading. /// - pub is_loading: Option c_int>, + pub is_loading: Option c_int>, /// // Reload the current page. /// - pub reload: Option, + pub reload: Option, /// // Reload the current page ignoring any cached data. /// - pub reload_ignore_cache: Option, + pub reload_ignore_cache: Option, /// // Stop loading the page. /// - pub stop_load: Option, + pub stop_load: Option, /// // Returns the globally unique identifier for this browser. /// - pub get_identifier: Option c_int>, + pub get_identifier: Option c_int>, /// // Returns true (1) if this object is pointing to the same handle as |that| // object. /// - pub is_same: Option c_int>, + pub is_same: Option c_int>, /// // Returns true (1) if the window is a popup window. /// - pub is_popup: Option c_int>, + pub is_popup: Option c_int>, /// // Returns true (1) if a document has been loaded in the browser. /// - pub has_document: Option c_int>, + pub has_document: Option c_int>, /// // Returns the main (top-level) frame for the browser window. /// - pub get_main_frame: Option *mut cef_frame>, + pub get_main_frame: Option *mut cef_frame_t>, /// // Returns the focused frame for the browser window. /// - pub get_focused_frame: Option *mut cef_frame>, + pub get_focused_frame: Option *mut cef_frame_t>, /// // Returns the frame with the specified identifier, or NULL if not found. /// - pub get_frame_byident: Option *mut cef_frame>, + pub get_frame_byident: Option *mut cef_frame_t>, /// // Returns the frame with the specified name, or NULL if not found. /// - pub get_frame: Option *mut cef_frame>, + pub get_frame: Option *mut cef_frame_t>, /// // Returns the number of frames that currently exist. /// - pub get_frame_count: Option size_t>, + pub get_frame_count: Option size_t>, /// // Returns the identifiers of all existing frames. /// - pub get_frame_identifiers: Option, /// // Returns the names of all existing frames. /// - pub get_frame_names: Option, + pub get_frame_names: Option, // // Send a message to the specified |target_process|. Returns true (1) if the // message was sent successfully. /// - pub send_process_message: Option c_int>, } @@ -1606,40 +1594,40 @@ pub struct cef_render_process_handler { // cef_browser_process_handler_t::on_render_process_thread_created(). Do not // keep a reference to |extra_info| outside of this function. /// - pub on_render_thread_created: Option, + pub on_render_thread_created: Option, /// // Called after WebKit has been initialized. /// - pub on_web_kit_initialized: Option, + pub on_web_kit_initialized: Option, /// // Called after a browser has been created. When browsing cross-origin a new // browser will be created before the old browser with the same identifier is // destroyed. /// - pub on_browser_created: Option, + pub on_browser_created: Option, /// // Called before a browser is destroyed. /// - pub on_browser_destroyed: Option, + pub on_browser_destroyed: Option, /// // Return the handler for browser load status events. /// - pub get_load_handler: Option *mut cef_load_handler>, + pub get_load_handler: Option *mut cef_load_handler_t>, /// // Called before browser navigation. Return true (1) to cancel the navigation // or false (0) to allow the navigation to proceed. The |request| object // cannot be modified in this callback. /// - pub on_before_navigation: Option c_int>, /// @@ -1650,31 +1638,31 @@ pub struct cef_render_process_handler { // on the associated thread can be retrieved via the // cef_v8context_t::get_task_runner() function. /// - pub on_context_created: Option, + pub on_context_created: Option, /// // Called immediately before the V8 context for a frame is released. No // references to the context should be kept after this function is called. /// - pub on_context_released: Option, + pub on_context_released: Option, /// // Called for global uncaught exceptions in a frame. Execution of this // callback is disabled by default. To enable set // CefSettings.uncaught_exception_stack_size 0. /// - pub on_uncaught_exception: Option, + pub on_uncaught_exception: Option, /// // Called when a new node in the the browser gets focus. The |node| value may @@ -1684,18 +1672,18 @@ pub struct cef_render_process_handler { // keep references to or attempt to access any DOM objects outside the scope // of this function. /// - pub on_focused_node_changed: Option, + pub on_focused_node_changed: Option, /// // Called when a new message is received from a different process. Return true // (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. /// - pub on_process_message_received: Optionc_int>, } @@ -1738,7 +1726,7 @@ pub struct cef_app { // 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. /// - pub get_resource_bundle_handler: Option *mut cef_resource_bundle_handler>, + pub get_resource_bundle_handler: Option *mut cef_resource_bundle_handler_t>, /// // Return the handler for functionality specific to the browser process. This @@ -1750,7 +1738,7 @@ pub struct cef_app { // Return the handler for functionality specific to the render process. This // function is called on the render process main thread. /// - pub get_render_process_handler: Option *mut cef_render_process_handler>, + pub get_render_process_handler: Option *mut cef_render_process_handler_t>, } @@ -1877,34 +1865,34 @@ pub struct cef_post_data { /// // Returns true (1) if this object is read-only. /// - pub is_read_only: Option c_int>, + pub is_read_only: Option c_int>, /// // Returns the number of existing post data elements. /// - pub get_element_count: Option size_t>, + pub get_element_count: Option size_t>, /// // Retrieve the post data elements. /// - pub get_elements: Option, /// // Remove the specified post data element. Returns true (1) if the removal // succeeds. /// - pub remove_element: Option c_int>, /// // Add the specified post data element. Returns true (1) if the add succeeds. /// - pub add_element: Option c_int>, /// // Remove all existing post data elements. /// - pub remove_elements: Option, + pub remove_elements: Option, }