Regenerate bindings.rs with new bindgen.

This commit is contained in:
Bobby Holley 2016-03-30 12:13:15 -07:00
parent f335586ff5
commit ce206dd4d6
3 changed files with 21 additions and 46 deletions

View file

@ -1,33 +1,5 @@
/* automatically generated by rust-bindgen */
pub type int64_t = i64;
pub type uint64_t = u64;
pub type int_least64_t = int64_t;
pub type uint_least64_t = uint64_t;
pub type int_fast64_t = int64_t;
pub type uint_fast64_t = uint64_t;
pub type int32_t = i32;
pub type uint32_t = u32;
pub type int_least32_t = int32_t;
pub type uint_least32_t = uint32_t;
pub type int_fast32_t = int32_t;
pub type uint_fast32_t = uint32_t;
pub type int16_t = i16;
pub type uint16_t = u16;
pub type int_least16_t = int16_t;
pub type uint_least16_t = uint16_t;
pub type int_fast16_t = int16_t;
pub type uint_fast16_t = uint16_t;
pub type int8_t = ::libc::c_char;
pub type uint8_t = u8;
pub type int_least8_t = int8_t;
pub type uint_least8_t = uint8_t;
pub type int_fast8_t = int8_t;
pub type uint_fast8_t = uint8_t;
pub type intptr_t = int64_t;
pub type uintptr_t = uint64_t;
pub type intmax_t = ::libc::c_long;
pub type uintmax_t = ::libc::c_ulong;
pub enum nsIAtom { }
pub enum nsINode { }
pub type RawGeckoNode = nsINode;
@ -40,7 +12,7 @@ pub enum ServoComputedValues { }
pub enum RawServoStyleSheet { }
pub enum RawServoStyleSet { }
extern "C" {
pub fn Gecko_ChildrenCount(node: *mut RawGeckoNode) -> uint32_t;
pub fn Gecko_ChildrenCount(node: *mut RawGeckoNode) -> u32;
pub fn Gecko_NodeIsElement(node: *mut RawGeckoNode) -> bool;
pub fn Gecko_GetParentNode(node: *mut RawGeckoNode) -> *mut RawGeckoNode;
pub fn Gecko_GetFirstChild(node: *mut RawGeckoNode) -> *mut RawGeckoNode;
@ -59,7 +31,7 @@ extern "C" {
-> *mut RawGeckoElement;
pub fn Gecko_GetDocumentElement(document: *mut RawGeckoDocument)
-> *mut RawGeckoElement;
pub fn Gecko_ElementState(element: *mut RawGeckoElement) -> uint8_t;
pub fn Gecko_ElementState(element: *mut RawGeckoElement) -> u8;
pub fn Gecko_IsHTMLElementInHTMLDocument(element: *mut RawGeckoElement)
-> bool;
pub fn Gecko_IsLink(element: *mut RawGeckoElement) -> bool;
@ -71,8 +43,7 @@ extern "C" {
pub fn Gecko_SetNodeData(node: *mut RawGeckoNode,
data: *mut ServoNodeData);
pub fn Servo_DropNodeData(data: *mut ServoNodeData);
pub fn Servo_StylesheetFromUTF8Bytes(bytes: *const uint8_t,
length: uint32_t)
pub fn Servo_StylesheetFromUTF8Bytes(bytes: *const u8, length: u32)
-> *mut RawServoStyleSheet;
pub fn Servo_AddRefStyleSheet(sheet: *mut RawServoStyleSheet);
pub fn Servo_ReleaseStyleSheet(sheet: *mut RawServoStyleSheet);
@ -85,20 +56,21 @@ extern "C" {
pub fn Servo_StyleSheetHasRules(sheet: *mut RawServoStyleSheet) -> bool;
pub fn Servo_InitStyleSet() -> *mut RawServoStyleSet;
pub fn Servo_DropStyleSet(set: *mut RawServoStyleSet);
pub fn Gecko_GetAttrAsUTF8(element: *mut RawGeckoElement, ns: *const u8,
name: *const u8, length: *mut u32)
-> *const ::std::os::raw::c_char;
pub fn Gecko_LocalName(element: *mut RawGeckoElement, length: *mut u32)
-> *const u16;
pub fn Gecko_Namespace(element: *mut RawGeckoElement, length: *mut u32)
-> *const u16;
pub fn Servo_GetComputedValues(element: *mut RawGeckoElement)
-> *mut ServoComputedValues;
pub fn Servo_GetComputedValuesForAnonymousBox(pseudoTag: *mut nsIAtom)
pub fn Servo_GetComputedValuesForAnonymousBox(parentStyleOrNull:
*mut ServoComputedValues,
pseudoTag: *mut nsIAtom)
-> *mut ServoComputedValues;
pub fn Servo_AddRefComputedValues(arg1: *mut ServoComputedValues);
pub fn Servo_ReleaseComputedValues(arg1: *mut ServoComputedValues);
pub fn Gecko_GetAttrAsUTF8(element: *mut RawGeckoElement,
ns: *const uint8_t, name: *const uint8_t,
length: *mut uint32_t)
-> *const ::libc::c_char;
pub fn Gecko_LocalName(element: *mut RawGeckoElement,
length: *mut uint32_t) -> *const uint16_t;
pub fn Gecko_Namespace(element: *mut RawGeckoElement,
length: *mut uint32_t) -> *const uint16_t;
pub fn Servo_RestyleDocument(doc: *mut RawGeckoDocument,
set: *mut RawServoStyleSet);
}

View file

@ -7,7 +7,7 @@
use app_units::Au;
use bindings::{RawGeckoDocument, RawGeckoElement};
use bindings::{RawServoStyleSet, RawServoStyleSheet, ServoComputedValues, ServoNodeData};
use bindings::{nsIAtom, uint8_t, uint32_t};
use bindings::{nsIAtom};
use data::PerDocumentStyleData;
use euclid::Size2D;
use properties::GeckoComputedValues;
@ -73,8 +73,8 @@ pub extern "C" fn Servo_DropNodeData(data: *mut ServoNodeData) -> () {
}
#[no_mangle]
pub extern "C" fn Servo_StylesheetFromUTF8Bytes(bytes: *const uint8_t,
length: uint32_t) -> *mut RawServoStyleSheet {
pub extern "C" fn Servo_StylesheetFromUTF8Bytes(bytes: *const u8,
length: u32) -> *mut RawServoStyleSheet {
let input = unsafe { from_utf8_unchecked(slice::from_raw_parts(bytes, length as usize)) };
@ -175,7 +175,8 @@ pub extern "C" fn Servo_GetComputedValues(element: *mut RawGeckoElement)
}
#[no_mangle]
pub extern "C" fn Servo_GetComputedValuesForAnonymousBox(_: *mut nsIAtom)
pub extern "C" fn Servo_GetComputedValuesForAnonymousBox(_parentStyleOrNull: *mut ServoComputedValues,
_pseudoTag: *mut nsIAtom)
-> *mut ServoComputedValues {
unimplemented!();
}

View file

@ -35,4 +35,6 @@ fi
-x c++ -std=gnu++0x \
"-I$DIST_INCLUDE" \
-o ../bindings.rs \
"$DIST_INCLUDE/mozilla/ServoBindings.h"
-no-type-renaming \
"$DIST_INCLUDE/mozilla/ServoBindings.h" \
-match "ServoBindings.h" \