mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add FFI for nsCSSFontFaceRule.
This commit is contained in:
parent
83badaa718
commit
e36b92507e
2 changed files with 16 additions and 4 deletions
|
@ -271,6 +271,7 @@ mod bindings {
|
||||||
.include(add_include("mozilla/dom/NameSpaceConstants.h"))
|
.include(add_include("mozilla/dom/NameSpaceConstants.h"))
|
||||||
.include(add_include("mozilla/LookAndFeel.h"))
|
.include(add_include("mozilla/LookAndFeel.h"))
|
||||||
.include(add_include("mozilla/ServoBindings.h"))
|
.include(add_include("mozilla/ServoBindings.h"))
|
||||||
|
.include(add_include("nsCSSFontFaceRule.h"))
|
||||||
.include(add_include("nsMediaFeatures.h"))
|
.include(add_include("nsMediaFeatures.h"))
|
||||||
.include(add_include("nsMediaList.h"))
|
.include(add_include("nsMediaList.h"))
|
||||||
// FIXME(emilio): Incrementally remove these "pub use"s. Probably
|
// FIXME(emilio): Incrementally remove these "pub use"s. Probably
|
||||||
|
@ -337,6 +338,7 @@ mod bindings {
|
||||||
"nsBorderColors",
|
"nsBorderColors",
|
||||||
"nscolor",
|
"nscolor",
|
||||||
"nsChangeHint",
|
"nsChangeHint",
|
||||||
|
"nsCSSFontFaceRule",
|
||||||
"nsCSSKeyword",
|
"nsCSSKeyword",
|
||||||
"nsCSSPropertyID",
|
"nsCSSPropertyID",
|
||||||
"nsCSSProps",
|
"nsCSSProps",
|
||||||
|
@ -609,6 +611,7 @@ mod bindings {
|
||||||
"StyleBasicShape",
|
"StyleBasicShape",
|
||||||
"StyleBasicShapeType",
|
"StyleBasicShapeType",
|
||||||
"StyleShapeSource",
|
"StyleShapeSource",
|
||||||
|
"nsCSSFontFaceRule",
|
||||||
"nsCSSKeyword",
|
"nsCSSKeyword",
|
||||||
"nsCSSPropertyID",
|
"nsCSSPropertyID",
|
||||||
"nsCSSShadowArray",
|
"nsCSSShadowArray",
|
||||||
|
|
|
@ -235,10 +235,7 @@ impl<T: RefCounted> PartialEq for RefPtr<T> {
|
||||||
unsafe impl<T: ThreadSafeRefCounted> Send for RefPtr<T> {}
|
unsafe impl<T: ThreadSafeRefCounted> Send for RefPtr<T> {}
|
||||||
unsafe impl<T: ThreadSafeRefCounted> Sync for RefPtr<T> {}
|
unsafe impl<T: ThreadSafeRefCounted> Sync for RefPtr<T> {}
|
||||||
|
|
||||||
// Companion of NS_DECL_THREADSAFE_FFI_REFCOUNTING.
|
macro_rules! impl_refcount {
|
||||||
//
|
|
||||||
// Gets you a free RefCounted impl implemented via FFI.
|
|
||||||
macro_rules! impl_threadsafe_refcount {
|
|
||||||
($t:ty, $addref:ident, $release:ident) => (
|
($t:ty, $addref:ident, $release:ident) => (
|
||||||
unsafe impl RefCounted for $t {
|
unsafe impl RefCounted for $t {
|
||||||
fn addref(&self) {
|
fn addref(&self) {
|
||||||
|
@ -248,6 +245,18 @@ macro_rules! impl_threadsafe_refcount {
|
||||||
::gecko_bindings::bindings::$release(self as *const _ as *mut _)
|
::gecko_bindings::bindings::$release(self as *const _ as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
impl_refcount!(::gecko_bindings::structs::nsCSSFontFaceRule,
|
||||||
|
Gecko_CSSFontFaceRule_AddRef, Gecko_CSSFontFaceRule_Release);
|
||||||
|
|
||||||
|
// Companion of NS_DECL_THREADSAFE_FFI_REFCOUNTING.
|
||||||
|
//
|
||||||
|
// Gets you a free RefCounted impl implemented via FFI.
|
||||||
|
macro_rules! impl_threadsafe_refcount {
|
||||||
|
($t:ty, $addref:ident, $release:ident) => (
|
||||||
|
impl_refcount!($t, $addref, $release);
|
||||||
unsafe impl ThreadSafeRefCounted for $t {}
|
unsafe impl ThreadSafeRefCounted for $t {}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue