update cef interfaces from upstream

This commit is contained in:
zmike 2015-09-14 14:02:35 -04:00
parent f749fe4125
commit 5f9aac6c1a
11 changed files with 364 additions and 35 deletions

View file

@ -68,6 +68,18 @@ pub struct _cef_drag_handler_t {
dragData: *mut interfaces::cef_drag_data_t,
mask: types::cef_drag_operations_mask_t) -> libc::c_int>,
//
// Called whenever draggable regions for the browser window change. These can
// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
// draggable regions are never defined in a document this function will also
// never be called. If the last draggable region is removed from a document
// this function will be called with an NULL vector.
//
pub on_draggable_regions_changed: Option<extern "C" fn(
this: *mut cef_drag_handler_t, browser: *mut interfaces::cef_browser_t,
regions_count: libc::size_t,
regions: *const types::cef_draggable_region_t) -> ()>,
//
// The reference count. This will only be present for Rust instances!
//
@ -175,6 +187,30 @@ impl CefDragHandler {
CefWrap::to_c(mask)))
}
}
//
// Called whenever draggable regions for the browser window change. These can
// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
// draggable regions are never defined in a document this function will also
// never be called. If the last draggable region is removed from a document
// this function will be called with an NULL vector.
//
pub fn on_draggable_regions_changed(&self, browser: interfaces::CefBrowser,
regions_count: libc::size_t,
regions: *const types::cef_draggable_region_t) -> () {
if self.c_object.is_null() ||
self.c_object as usize == mem::POST_DROP_USIZE {
panic!("called a CEF method on a null object")
}
unsafe {
CefWrap::to_rust(
((*self.c_object).on_draggable_regions_changed.unwrap())(
self.c_object,
CefWrap::to_c(browser),
CefWrap::to_c(regions_count),
CefWrap::to_c(regions)))
}
}
}
impl CefWrap<*mut cef_drag_handler_t> for CefDragHandler {