mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use nsACString to pass string params for bindings
This commit is contained in:
parent
eeada5ac51
commit
3303a978b9
3 changed files with 39 additions and 46 deletions
|
@ -233,7 +233,13 @@ COMPILATION_TARGETS = {
|
|||
# Generation of the ffi bindings.
|
||||
"bindings": {
|
||||
"target_dir": "../gecko_bindings",
|
||||
"raw_lines": [],
|
||||
"blacklist_types": [
|
||||
"nsACString_internal",
|
||||
],
|
||||
"raw_lines": [
|
||||
"pub use nsstring::nsACString;",
|
||||
"type nsACString_internal = nsACString;",
|
||||
],
|
||||
"flags": [
|
||||
"--ignore-methods",
|
||||
],
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* automatically generated by rust-bindgen */
|
||||
|
||||
pub use nsstring::nsACString;
|
||||
type nsACString_internal = nsACString;
|
||||
pub type ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowedOrNull<'a> = Option<&'a ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
|
||||
|
@ -837,10 +839,10 @@ extern "C" {
|
|||
pub fn Servo_Node_ClearNodeData(node: RawGeckoNodeBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_StyleSheet_FromUTF8Bytes(bytes: *const u8, length: u32,
|
||||
pub fn Servo_StyleSheet_FromUTF8Bytes(data: *const nsACString_internal,
|
||||
parsing_mode: SheetParsingMode,
|
||||
base_bytes: *const u8,
|
||||
base_length: u32,
|
||||
base_url:
|
||||
*const nsACString_internal,
|
||||
base: *mut ThreadSafeURIHolder,
|
||||
referrer: *mut ThreadSafeURIHolder,
|
||||
principal:
|
||||
|
@ -876,10 +878,9 @@ extern "C" {
|
|||
RawServoStyleSheetBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ParseProperty(property_bytes: *const u8,
|
||||
property_length: u32, value_bytes: *const u8,
|
||||
value_length: u32, base_bytes: *const u8,
|
||||
base_length: u32,
|
||||
pub fn Servo_ParseProperty(property: *const nsACString_internal,
|
||||
value: *const nsACString_internal,
|
||||
base_url: *const nsACString_internal,
|
||||
base: *mut ThreadSafeURIHolder,
|
||||
referrer: *mut ThreadSafeURIHolder,
|
||||
principal: *mut ThreadSafePrincipalHolder)
|
||||
|
@ -893,7 +894,7 @@ extern "C" {
|
|||
-> ServoComputedValuesStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ParseStyleAttribute(bytes: *const u8, length: u32)
|
||||
pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal)
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
|
@ -907,8 +908,8 @@ extern "C" {
|
|||
buffer: *mut nsString);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_CSSSupports(name: *const u8, name_length: u32,
|
||||
value: *const u8, value_length: u32) -> bool;
|
||||
pub fn Servo_CSSSupports(name: *const nsACString_internal,
|
||||
value: *const nsACString_internal) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ComputedValues_Get(node: RawGeckoNodeBorrowed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue