Add binding functions for length and item getter of DeclarationBlock

This commit is contained in:
Xidorn Quan 2016-11-03 14:46:09 +11:00
parent 0b0ff2b152
commit 1af2edf190
3 changed files with 38 additions and 2 deletions

View file

@ -236,10 +236,12 @@ COMPILATION_TARGETS = {
"target_dir": "../gecko_bindings",
"blacklist_types": [
"nsACString_internal",
"nsAString_internal",
],
"raw_lines": [
"pub use nsstring::nsACString;",
"pub use nsstring::{nsACString, nsAString};",
"type nsACString_internal = nsACString;",
"type nsAString_internal = nsAString;"
],
"flags": [
"--ignore-methods",

View file

@ -1,7 +1,8 @@
/* automatically generated by rust-bindgen */
pub use nsstring::nsACString;
pub use nsstring::{nsACString, nsAString};
type nsACString_internal = nsACString;
type nsAString_internal = nsAString;
pub type ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
pub type ServoComputedValuesBorrowedOrNull<'a> = Option<&'a ServoComputedValues>;
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
@ -936,6 +937,19 @@ extern "C" {
RawServoDeclarationBlockBorrowed,
buffer: *mut nsString);
}
extern "C" {
pub fn Servo_DeclarationBlock_Count(declarations:
RawServoDeclarationBlockBorrowed)
-> u32;
}
extern "C" {
pub fn Servo_DeclarationBlock_GetNthProperty(declarations:
RawServoDeclarationBlockBorrowed,
index: u32,
result:
*mut nsAString_internal)
-> bool;
}
extern "C" {
pub fn Servo_CSSSupports(name: *const nsACString_internal,
value: *const nsACString_internal) -> bool;