mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Generate debug and release Gecko bindings.
This commit is contained in:
parent
2adc9abe13
commit
1a25467cea
5 changed files with 6508 additions and 217 deletions
|
@ -11,6 +11,14 @@ extern crate heapsize;
|
|||
#[allow(dead_code, non_camel_case_types)]
|
||||
pub mod bindings;
|
||||
pub mod ptr;
|
||||
pub mod sugar;
|
||||
#[cfg(debug_assertions)]
|
||||
#[allow(dead_code, non_camel_case_types, non_snake_case, non_upper_case_globals)]
|
||||
pub mod structs;
|
||||
pub mod structs {
|
||||
include!("structs_debug.rs");
|
||||
}
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[allow(dead_code, non_camel_case_types, non_snake_case, non_upper_case_globals)]
|
||||
pub mod structs {
|
||||
include!("structs_release.rs");
|
||||
}
|
||||
pub mod sugar;
|
||||
|
|
|
@ -2720,6 +2720,10 @@ extern "C" {
|
|||
pub struct nsTArray_CopyWithConstructors<ElemType> {
|
||||
pub _phantom0: ::std::marker::PhantomData<ElemType>,
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "_ZN29nsTArray_CopyWithConstructors12allowReallocE"]
|
||||
pub static nsTArray_CopyWithConstructors_consts_allowRealloc: bool;
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct nsTArray_CopyChooser<E> {
|
||||
|
@ -2906,7 +2910,6 @@ pub struct piecewise_construct_t;
|
|||
impl ::std::clone::Clone for piecewise_construct_t {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub enum tuple { }
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct pair<_T1, _T2> {
|
||||
|
@ -3179,12 +3182,6 @@ pub struct tuple_size<_Tp> {
|
|||
pub struct tuple_element<_Tp> {
|
||||
pub _phantom0: ::std::marker::PhantomData<_Tp>,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct _Itup_cat<_Itup1, _Itup2> {
|
||||
pub _phantom0: ::std::marker::PhantomData<_Itup1>,
|
||||
pub _phantom1: ::std::marker::PhantomData<_Itup2>,
|
||||
}
|
||||
pub type nscoord = i32;
|
||||
#[repr(C)]
|
||||
pub struct nsIntPoint {
|
||||
|
@ -3848,63 +3845,64 @@ pub enum nsCSSProperty {
|
|||
eCSSPropertyAlias_MozBorderStartStyle = 382,
|
||||
eCSSPropertyAlias_MozBorderStartWidth = 383,
|
||||
eCSSPropertyAlias_MozHyphens = 384,
|
||||
eCSSPropertyAlias_WebkitAnimation = 385,
|
||||
eCSSPropertyAlias_WebkitAnimationDelay = 386,
|
||||
eCSSPropertyAlias_WebkitAnimationDirection = 387,
|
||||
eCSSPropertyAlias_WebkitAnimationDuration = 388,
|
||||
eCSSPropertyAlias_WebkitAnimationFillMode = 389,
|
||||
eCSSPropertyAlias_WebkitAnimationIterationCount = 390,
|
||||
eCSSPropertyAlias_WebkitAnimationName = 391,
|
||||
eCSSPropertyAlias_WebkitAnimationPlayState = 392,
|
||||
eCSSPropertyAlias_WebkitAnimationTimingFunction = 393,
|
||||
eCSSPropertyAlias_WebkitFilter = 394,
|
||||
eCSSPropertyAlias_WebkitTextSizeAdjust = 395,
|
||||
eCSSPropertyAlias_WebkitTransform = 396,
|
||||
eCSSPropertyAlias_WebkitTransformOrigin = 397,
|
||||
eCSSPropertyAlias_WebkitTransformStyle = 398,
|
||||
eCSSPropertyAlias_WebkitBackfaceVisibility = 399,
|
||||
eCSSPropertyAlias_WebkitPerspective = 400,
|
||||
eCSSPropertyAlias_WebkitPerspectiveOrigin = 401,
|
||||
eCSSPropertyAlias_WebkitTransition = 402,
|
||||
eCSSPropertyAlias_WebkitTransitionDelay = 403,
|
||||
eCSSPropertyAlias_WebkitTransitionDuration = 404,
|
||||
eCSSPropertyAlias_WebkitTransitionProperty = 405,
|
||||
eCSSPropertyAlias_WebkitTransitionTimingFunction = 406,
|
||||
eCSSPropertyAlias_WebkitBorderRadius = 407,
|
||||
eCSSPropertyAlias_WebkitBorderTopLeftRadius = 408,
|
||||
eCSSPropertyAlias_WebkitBorderTopRightRadius = 409,
|
||||
eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 410,
|
||||
eCSSPropertyAlias_WebkitBorderBottomRightRadius = 411,
|
||||
eCSSPropertyAlias_WebkitBackgroundClip = 412,
|
||||
eCSSPropertyAlias_WebkitBackgroundOrigin = 413,
|
||||
eCSSPropertyAlias_WebkitBackgroundSize = 414,
|
||||
eCSSPropertyAlias_WebkitBorderImage = 415,
|
||||
eCSSPropertyAlias_WebkitBoxShadow = 416,
|
||||
eCSSPropertyAlias_WebkitBoxSizing = 417,
|
||||
eCSSPropertyAlias_WebkitBoxFlex = 418,
|
||||
eCSSPropertyAlias_WebkitBoxOrdinalGroup = 419,
|
||||
eCSSPropertyAlias_WebkitBoxOrient = 420,
|
||||
eCSSPropertyAlias_WebkitBoxDirection = 421,
|
||||
eCSSPropertyAlias_WebkitBoxAlign = 422,
|
||||
eCSSPropertyAlias_WebkitBoxPack = 423,
|
||||
eCSSPropertyAlias_WebkitFlexDirection = 424,
|
||||
eCSSPropertyAlias_WebkitFlexWrap = 425,
|
||||
eCSSPropertyAlias_WebkitFlexFlow = 426,
|
||||
eCSSPropertyAlias_WebkitOrder = 427,
|
||||
eCSSPropertyAlias_WebkitFlex = 428,
|
||||
eCSSPropertyAlias_WebkitFlexGrow = 429,
|
||||
eCSSPropertyAlias_WebkitFlexShrink = 430,
|
||||
eCSSPropertyAlias_WebkitFlexBasis = 431,
|
||||
eCSSPropertyAlias_WebkitJustifyContent = 432,
|
||||
eCSSPropertyAlias_WebkitAlignItems = 433,
|
||||
eCSSPropertyAlias_WebkitAlignSelf = 434,
|
||||
eCSSPropertyAlias_WebkitAlignContent = 435,
|
||||
eCSSPropertyAlias_WebkitUserSelect = 436,
|
||||
eCSSProperty_COUNT_with_aliases = 437,
|
||||
eCSSPropertyExtra_all_properties = 438,
|
||||
eCSSPropertyExtra_x_none_value = 439,
|
||||
eCSSPropertyExtra_x_auto_value = 440,
|
||||
eCSSPropertyExtra_variable = 441,
|
||||
eCSSPropertyAlias_MozTextAlignLast = 385,
|
||||
eCSSPropertyAlias_WebkitAnimation = 386,
|
||||
eCSSPropertyAlias_WebkitAnimationDelay = 387,
|
||||
eCSSPropertyAlias_WebkitAnimationDirection = 388,
|
||||
eCSSPropertyAlias_WebkitAnimationDuration = 389,
|
||||
eCSSPropertyAlias_WebkitAnimationFillMode = 390,
|
||||
eCSSPropertyAlias_WebkitAnimationIterationCount = 391,
|
||||
eCSSPropertyAlias_WebkitAnimationName = 392,
|
||||
eCSSPropertyAlias_WebkitAnimationPlayState = 393,
|
||||
eCSSPropertyAlias_WebkitAnimationTimingFunction = 394,
|
||||
eCSSPropertyAlias_WebkitFilter = 395,
|
||||
eCSSPropertyAlias_WebkitTextSizeAdjust = 396,
|
||||
eCSSPropertyAlias_WebkitTransform = 397,
|
||||
eCSSPropertyAlias_WebkitTransformOrigin = 398,
|
||||
eCSSPropertyAlias_WebkitTransformStyle = 399,
|
||||
eCSSPropertyAlias_WebkitBackfaceVisibility = 400,
|
||||
eCSSPropertyAlias_WebkitPerspective = 401,
|
||||
eCSSPropertyAlias_WebkitPerspectiveOrigin = 402,
|
||||
eCSSPropertyAlias_WebkitTransition = 403,
|
||||
eCSSPropertyAlias_WebkitTransitionDelay = 404,
|
||||
eCSSPropertyAlias_WebkitTransitionDuration = 405,
|
||||
eCSSPropertyAlias_WebkitTransitionProperty = 406,
|
||||
eCSSPropertyAlias_WebkitTransitionTimingFunction = 407,
|
||||
eCSSPropertyAlias_WebkitBorderRadius = 408,
|
||||
eCSSPropertyAlias_WebkitBorderTopLeftRadius = 409,
|
||||
eCSSPropertyAlias_WebkitBorderTopRightRadius = 410,
|
||||
eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 411,
|
||||
eCSSPropertyAlias_WebkitBorderBottomRightRadius = 412,
|
||||
eCSSPropertyAlias_WebkitBackgroundClip = 413,
|
||||
eCSSPropertyAlias_WebkitBackgroundOrigin = 414,
|
||||
eCSSPropertyAlias_WebkitBackgroundSize = 415,
|
||||
eCSSPropertyAlias_WebkitBorderImage = 416,
|
||||
eCSSPropertyAlias_WebkitBoxShadow = 417,
|
||||
eCSSPropertyAlias_WebkitBoxSizing = 418,
|
||||
eCSSPropertyAlias_WebkitBoxFlex = 419,
|
||||
eCSSPropertyAlias_WebkitBoxOrdinalGroup = 420,
|
||||
eCSSPropertyAlias_WebkitBoxOrient = 421,
|
||||
eCSSPropertyAlias_WebkitBoxDirection = 422,
|
||||
eCSSPropertyAlias_WebkitBoxAlign = 423,
|
||||
eCSSPropertyAlias_WebkitBoxPack = 424,
|
||||
eCSSPropertyAlias_WebkitFlexDirection = 425,
|
||||
eCSSPropertyAlias_WebkitFlexWrap = 426,
|
||||
eCSSPropertyAlias_WebkitFlexFlow = 427,
|
||||
eCSSPropertyAlias_WebkitOrder = 428,
|
||||
eCSSPropertyAlias_WebkitFlex = 429,
|
||||
eCSSPropertyAlias_WebkitFlexGrow = 430,
|
||||
eCSSPropertyAlias_WebkitFlexShrink = 431,
|
||||
eCSSPropertyAlias_WebkitFlexBasis = 432,
|
||||
eCSSPropertyAlias_WebkitJustifyContent = 433,
|
||||
eCSSPropertyAlias_WebkitAlignItems = 434,
|
||||
eCSSPropertyAlias_WebkitAlignSelf = 435,
|
||||
eCSSPropertyAlias_WebkitAlignContent = 436,
|
||||
eCSSPropertyAlias_WebkitUserSelect = 437,
|
||||
eCSSProperty_COUNT_with_aliases = 438,
|
||||
eCSSPropertyExtra_all_properties = 439,
|
||||
eCSSPropertyExtra_x_none_value = 440,
|
||||
eCSSPropertyExtra_x_auto_value = 441,
|
||||
eCSSPropertyExtra_variable = 442,
|
||||
}
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
|
@ -6095,7 +6093,7 @@ pub enum nsStyleSVGPaintType {
|
|||
eStyleSVGPaintType_ContextFill = 4,
|
||||
eStyleSVGPaintType_ContextStroke = 5,
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum nsStyleSVGOpacitySource {
|
||||
eStyleSVGOpacitySource_Normal = 0,
|
||||
|
@ -6149,13 +6147,12 @@ pub struct nsStyleSVG {
|
|||
pub mMarkerEnd: nsCOMPtr<nsIURI>,
|
||||
pub mMarkerMid: nsCOMPtr<nsIURI>,
|
||||
pub mMarkerStart: nsCOMPtr<nsIURI>,
|
||||
pub mStrokeDasharray: *mut nsStyleCoord,
|
||||
pub mStrokeDasharray: nsTArray<nsStyleCoord>,
|
||||
pub mStrokeDashoffset: nsStyleCoord,
|
||||
pub mStrokeWidth: nsStyleCoord,
|
||||
pub mFillOpacity: f32,
|
||||
pub mStrokeMiterlimit: f32,
|
||||
pub mStrokeOpacity: f32,
|
||||
pub mStrokeDasharrayLength: u32,
|
||||
pub mClipRule: u8,
|
||||
pub mColorInterpolation: u8,
|
||||
pub mColorInterpolationFilters: u8,
|
||||
|
@ -6165,44 +6162,22 @@ pub struct nsStyleSVG {
|
|||
pub mStrokeLinecap: u8,
|
||||
pub mStrokeLinejoin: u8,
|
||||
pub mTextAnchor: u8,
|
||||
pub _bitfield_1: u32,
|
||||
pub mContextFlags: u8,
|
||||
}
|
||||
impl nsStyleSVG {
|
||||
pub fn set_mFillOpacitySource(&mut self, val: u8) {
|
||||
self._bitfield_1 &= !(((1 << (3u32 as u32)) - 1) << 0usize);
|
||||
self._bitfield_1 |= (val as u32) << 0usize;
|
||||
}
|
||||
pub fn set_mStrokeOpacitySource(&mut self, val: u8) {
|
||||
self._bitfield_1 &= !(((1 << (3u32 as u32)) - 1) << 3usize);
|
||||
self._bitfield_1 |= (val as u32) << 3usize;
|
||||
}
|
||||
pub fn set_mStrokeDasharrayFromObject(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 6usize);
|
||||
self._bitfield_1 |= (val as u32) << 6usize;
|
||||
}
|
||||
pub fn set_mStrokeDashoffsetFromObject(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 7usize);
|
||||
self._bitfield_1 |= (val as u32) << 7usize;
|
||||
}
|
||||
pub fn set_mStrokeWidthFromObject(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(((1 << (1u32 as u32)) - 1) << 8usize);
|
||||
self._bitfield_1 |= (val as u32) << 8usize;
|
||||
}
|
||||
pub const fn new_bitfield_1(mFillOpacitySource: u8,
|
||||
mStrokeOpacitySource: u8,
|
||||
mStrokeDasharrayFromObject: bool,
|
||||
mStrokeDashoffsetFromObject: bool,
|
||||
mStrokeWidthFromObject: bool) -> u32 {
|
||||
0 | ((mFillOpacitySource as u32) << 0u32) |
|
||||
((mStrokeOpacitySource as u32) << 3u32) |
|
||||
((mStrokeDasharrayFromObject as u32) << 6u32) |
|
||||
((mStrokeDashoffsetFromObject as u32) << 7u32) |
|
||||
((mStrokeWidthFromObject as u32) << 8u32)
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum nsStyleSVG_nsStyleStruct_h_unnamed_25 {
|
||||
FILL_OPACITY_SOURCE_MASK = 3,
|
||||
STROKE_OPACITY_SOURCE_MASK = 12,
|
||||
STROKE_DASHARRAY_CONTEXT = 16,
|
||||
STROKE_DASHOFFSET_CONTEXT = 32,
|
||||
STROKE_WIDTH_CONTEXT = 64,
|
||||
FILL_OPACITY_SOURCE_SHIFT = 0,
|
||||
STROKE_OPACITY_SOURCE_SHIFT = 2,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleSVG() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleSVG>() , 128usize);
|
||||
assert_eq!(::std::mem::size_of::<nsStyleSVG>() , 120usize);
|
||||
assert_eq!(::std::mem::align_of::<nsStyleSVG>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
|
@ -6233,17 +6208,17 @@ fn bindgen_test_layout_nsStyleBasicShape() {
|
|||
#[derive(Debug)]
|
||||
pub struct nsStyleClipPath {
|
||||
pub mType: i32,
|
||||
pub nsStyleClipPath_nsStyleStruct_h_unnamed_25: nsStyleClipPath_nsStyleStruct_h_unnamed_25,
|
||||
pub nsStyleClipPath_nsStyleStruct_h_unnamed_26: nsStyleClipPath_nsStyleStruct_h_unnamed_26,
|
||||
pub mSizingBox: u8,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
|
||||
pub struct nsStyleClipPath_nsStyleStruct_h_unnamed_26 {
|
||||
pub mBasicShape: __BindgenUnionField<*mut nsStyleBasicShape>,
|
||||
pub mURL: __BindgenUnionField<*mut nsIURI>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
|
||||
impl nsStyleClipPath_nsStyleStruct_h_unnamed_26 {
|
||||
pub unsafe fn mBasicShape(&mut self) -> *mut *mut nsStyleBasicShape {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
|
@ -6253,14 +6228,14 @@ impl nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
|
|||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleClipPath_nsStyleStruct_h_unnamed_25 {
|
||||
impl ::std::clone::Clone for nsStyleClipPath_nsStyleStruct_h_unnamed_26 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleClipPath_nsStyleStruct_h_unnamed_25() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_25>()
|
||||
fn bindgen_test_layout_nsStyleClipPath_nsStyleStruct_h_unnamed_26() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_26>()
|
||||
, 8usize);
|
||||
assert_eq!(::std::mem::align_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_25>()
|
||||
assert_eq!(::std::mem::align_of::<nsStyleClipPath_nsStyleStruct_h_unnamed_26>()
|
||||
, 8usize);
|
||||
}
|
||||
#[test]
|
||||
|
@ -6273,16 +6248,16 @@ fn bindgen_test_layout_nsStyleClipPath() {
|
|||
pub struct nsStyleFilter {
|
||||
pub mType: i32,
|
||||
pub mFilterParameter: nsStyleCoord,
|
||||
pub nsStyleFilter_nsStyleStruct_h_unnamed_26: nsStyleFilter_nsStyleStruct_h_unnamed_26,
|
||||
pub nsStyleFilter_nsStyleStruct_h_unnamed_27: nsStyleFilter_nsStyleStruct_h_unnamed_27,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsStyleFilter_nsStyleStruct_h_unnamed_26 {
|
||||
pub struct nsStyleFilter_nsStyleStruct_h_unnamed_27 {
|
||||
pub mURL: __BindgenUnionField<*mut nsIURI>,
|
||||
pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleFilter_nsStyleStruct_h_unnamed_26 {
|
||||
impl nsStyleFilter_nsStyleStruct_h_unnamed_27 {
|
||||
pub unsafe fn mURL(&mut self) -> *mut *mut nsIURI {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
|
@ -6292,14 +6267,14 @@ impl nsStyleFilter_nsStyleStruct_h_unnamed_26 {
|
|||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_26 {
|
||||
impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_27 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleFilter_nsStyleStruct_h_unnamed_26() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleFilter_nsStyleStruct_h_unnamed_26>()
|
||||
fn bindgen_test_layout_nsStyleFilter_nsStyleStruct_h_unnamed_27() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleFilter_nsStyleStruct_h_unnamed_27>()
|
||||
, 8usize);
|
||||
assert_eq!(::std::mem::align_of::<nsStyleFilter_nsStyleStruct_h_unnamed_26>()
|
||||
assert_eq!(::std::mem::align_of::<nsStyleFilter_nsStyleStruct_h_unnamed_27>()
|
||||
, 8usize);
|
||||
}
|
||||
#[test]
|
6303
ports/geckolib/gecko_bindings/structs_release.rs
Normal file
6303
ports/geckolib/gecko_bindings/structs_release.rs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -38,106 +38,110 @@ fi
|
|||
|
||||
export RUST_BACKTRACE=1
|
||||
|
||||
./rust-bindgen/target/debug/bindgen \
|
||||
-o ../structs.rs \
|
||||
-x c++ -std=gnu++0x \
|
||||
-allow-unknown-types \
|
||||
"-I$DIST_INCLUDE" "-I$DIST_INCLUDE/nspr" \
|
||||
"-I$1/../nsprpub/pr/include" \
|
||||
$PLATFORM_DEPENDENT_DEFINES \
|
||||
-ignore-functions \
|
||||
-no-type-renaming \
|
||||
-DMOZILLA_INTERNAL_API \
|
||||
-DMOZ_STYLO_BINDINGS=1 \
|
||||
-DJS_DEBUG=1 \
|
||||
-DDEBUG=1 -DTRACING=1 -DOS_POSIX=1 \
|
||||
-DIMPL_LIBXUL \
|
||||
-include "nsThemeConstants.h" \
|
||||
-match "RefCountType.h" \
|
||||
-match "nscore.h" \
|
||||
-match "nsError.h" \
|
||||
-match "nsID.h" \
|
||||
-match "nsString" \
|
||||
-match "nsAString" \
|
||||
-match "nsSubstring" \
|
||||
-match "nsTSubstring" \
|
||||
-match "nsTString" \
|
||||
-match "nsISupportsBase.h" \
|
||||
-match "nsCOMPtr.h" \
|
||||
-match "nsIAtom.h" \
|
||||
-match "nsIURI.h" \
|
||||
-match "nsAutoPtr.h" \
|
||||
-match "nsColor.h" \
|
||||
-match "nsCoord.h" \
|
||||
-match "nsPoint.h" \
|
||||
-match "nsRect.h" \
|
||||
-match "nsMargin.h" \
|
||||
-match "nsThemeConstants.h" \
|
||||
-match "nsCSSProperty.h" \
|
||||
-match "CSSVariableValues.h" \
|
||||
-match "nsFont.h" \
|
||||
-match "nsTHashtable.h" \
|
||||
-match "PLDHashTable.h" \
|
||||
-match "nsColor.h" \
|
||||
-match "nsStyleStruct.h" \
|
||||
-match "nsStyleCoord.h" \
|
||||
-match "RefPtr.h" \
|
||||
-match "nsISupportsImpl.h" \
|
||||
-match "gfxFontConstants.h" \
|
||||
-match "gfxFontFamilyList.h" \
|
||||
-match "gfxFontFeatures.h" \
|
||||
-match "imgRequestProxy.h" \
|
||||
-match "nsIRequest.h" \
|
||||
-match "imgIRequest.h" \
|
||||
-match "CounterStyleManager.h" \
|
||||
-match "nsStyleConsts.h" \
|
||||
-match "nsCSSValue.h" \
|
||||
-match "SheetType.h" \
|
||||
-match "nsIPrincipal.h" \
|
||||
-match "nsDataHashtable.h" \
|
||||
-match "nsCSSScanner.h" \
|
||||
-match "Types.h" \
|
||||
-match "utility" \
|
||||
-match "nsTArray" \
|
||||
-match "pair" \
|
||||
-match "SheetParsingMode.h" \
|
||||
-match "StaticPtr.h" \
|
||||
-match "nsProxyRelease.h" \
|
||||
-blacklist-type "IsDestructibleFallbackImpl" \
|
||||
-blacklist-type "IsDestructibleFallback" \
|
||||
-blacklist-type "nsProxyReleaseEvent" \
|
||||
-blacklist-type "FallibleTArray" \
|
||||
-blacklist-type "nsTArray_Impl" \
|
||||
-blacklist-type "__is_tuple_like_impl" \
|
||||
-opaque-type "nsIntMargin" \
|
||||
-opaque-type "nsIntPoint" \
|
||||
-opaque-type "nsIntRect" \
|
||||
-opaque-type "nsCOMArray" \
|
||||
-opaque-type "nsDependentString" \
|
||||
-opaque-type "EntryStore" \
|
||||
-opaque-type "gfxFontFeatureValueSet" \
|
||||
-opaque-type "imgRequestProxy" \
|
||||
-opaque-type "imgRequestProxyStatic" \
|
||||
-opaque-type "CounterStyleManager" \
|
||||
-opaque-type "ImageValue" \
|
||||
-opaque-type "URLValue" \
|
||||
-opaque-type "URLValueData" \
|
||||
-opaque-type "nsIPrincipal" \
|
||||
-opaque-type "nsDataHashtable" \
|
||||
-opaque-type "imgIRequest" \
|
||||
-include "$1/mozilla-config.h" \
|
||||
"$DIST_INCLUDE/nsStyleStruct.h"
|
||||
for target in debug release; do
|
||||
./rust-bindgen/target/debug/bindgen \
|
||||
-o ../structs_${target}.rs \
|
||||
-x c++ -std=gnu++0x \
|
||||
-allow-unknown-types \
|
||||
"-I$DIST_INCLUDE" "-I$DIST_INCLUDE/nspr" \
|
||||
"-I$1/../nsprpub/pr/include" \
|
||||
$PLATFORM_DEPENDENT_DEFINES \
|
||||
-ignore-functions \
|
||||
-no-type-renaming \
|
||||
-DMOZILLA_INTERNAL_API \
|
||||
-DMOZ_STYLO_BINDINGS=1 \
|
||||
`[ "$target" = debug ] && echo "-DDEBUG=1 -DJS_DEBUG=1"` \
|
||||
-DTRACING=1 -DOS_POSIX=1 \
|
||||
-DIMPL_LIBXUL \
|
||||
-include "nsThemeConstants.h" \
|
||||
-match "RefCountType.h" \
|
||||
-match "nscore.h" \
|
||||
-match "nsError.h" \
|
||||
-match "nsID.h" \
|
||||
-match "nsString" \
|
||||
-match "nsAString" \
|
||||
-match "nsSubstring" \
|
||||
-match "nsTSubstring" \
|
||||
-match "nsTString" \
|
||||
-match "nsISupportsBase.h" \
|
||||
-match "nsCOMPtr.h" \
|
||||
-match "nsIAtom.h" \
|
||||
-match "nsIURI.h" \
|
||||
-match "nsAutoPtr.h" \
|
||||
-match "nsColor.h" \
|
||||
-match "nsCoord.h" \
|
||||
-match "nsPoint.h" \
|
||||
-match "nsRect.h" \
|
||||
-match "nsMargin.h" \
|
||||
-match "nsThemeConstants.h" \
|
||||
-match "nsCSSProperty.h" \
|
||||
-match "CSSVariableValues.h" \
|
||||
-match "nsFont.h" \
|
||||
-match "nsTHashtable.h" \
|
||||
-match "PLDHashTable.h" \
|
||||
-match "nsColor.h" \
|
||||
-match "nsStyleStruct.h" \
|
||||
-match "nsStyleCoord.h" \
|
||||
-match "RefPtr.h" \
|
||||
-match "nsISupportsImpl.h" \
|
||||
-match "gfxFontConstants.h" \
|
||||
-match "gfxFontFamilyList.h" \
|
||||
-match "gfxFontFeatures.h" \
|
||||
-match "imgRequestProxy.h" \
|
||||
-match "nsIRequest.h" \
|
||||
-match "imgIRequest.h" \
|
||||
-match "CounterStyleManager.h" \
|
||||
-match "nsStyleConsts.h" \
|
||||
-match "nsCSSValue.h" \
|
||||
-match "SheetType.h" \
|
||||
-match "nsIPrincipal.h" \
|
||||
-match "nsDataHashtable.h" \
|
||||
-match "nsCSSScanner.h" \
|
||||
-match "Types.h" \
|
||||
-match "utility" \
|
||||
-match "nsTArray" \
|
||||
-match "pair" \
|
||||
-match "SheetParsingMode.h" \
|
||||
-match "StaticPtr.h" \
|
||||
-match "nsProxyRelease.h" \
|
||||
-blacklist-type "IsDestructibleFallbackImpl" \
|
||||
-blacklist-type "IsDestructibleFallback" \
|
||||
-blacklist-type "nsProxyReleaseEvent" \
|
||||
-blacklist-type "FallibleTArray" \
|
||||
-blacklist-type "nsTArray_Impl" \
|
||||
-blacklist-type "__is_tuple_like_impl" \
|
||||
-opaque-type "nsIntMargin" \
|
||||
-opaque-type "nsIntPoint" \
|
||||
-opaque-type "nsIntRect" \
|
||||
-opaque-type "nsCOMArray" \
|
||||
-opaque-type "nsDependentString" \
|
||||
-opaque-type "EntryStore" \
|
||||
-opaque-type "gfxFontFeatureValueSet" \
|
||||
-opaque-type "imgRequestProxy" \
|
||||
-opaque-type "imgRequestProxyStatic" \
|
||||
-opaque-type "CounterStyleManager" \
|
||||
-opaque-type "ImageValue" \
|
||||
-opaque-type "URLValue" \
|
||||
-opaque-type "URLValueData" \
|
||||
-opaque-type "nsIPrincipal" \
|
||||
-opaque-type "nsDataHashtable" \
|
||||
-opaque-type "imgIRequest" \
|
||||
-include "$1/mozilla-config.h" \
|
||||
"$DIST_INCLUDE/nsStyleStruct.h"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[91mwarning:\e[0m bindgen exited with nonzero exit status"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[91mwarning:\e[0m bindgen exited with nonzero exit status"
|
||||
else
|
||||
echo -e "\e[34minfo:\e[0m bindgen exited successfully, running tests"
|
||||
TESTS_FILE=$(mktemp)
|
||||
TESTS_SRC=$(mktemp)
|
||||
echo -e "\e[34minfo:\e[0m bindgen exited successfully, running tests"
|
||||
TESTS_FILE=$(mktemp)
|
||||
TESTS_SRC=$(mktemp)
|
||||
for target in debug release; do
|
||||
echo "#![feature(const_fn)]" > $TESTS_SRC
|
||||
cat ../structs.rs >> $TESTS_SRC
|
||||
cat ../structs_${target}.rs >> $TESTS_SRC
|
||||
multirust run nightly rustc $TESTS_SRC --test -o $TESTS_FILE
|
||||
$TESTS_FILE
|
||||
rm $TESTS_FILE
|
||||
rm $TESTS_SRC
|
||||
fi
|
||||
done
|
||||
rm $TESTS_FILE
|
||||
rm $TESTS_SRC
|
||||
|
|
|
@ -34,7 +34,8 @@ file_patterns_to_ignore = [
|
|||
ignored_files = [
|
||||
# Generated and upstream code combined with our own. Could use cleanup
|
||||
os.path.join(".", "ports", "geckolib", "gecko_bindings", "bindings.rs"),
|
||||
os.path.join(".", "ports", "geckolib", "gecko_bindings", "structs.rs"),
|
||||
os.path.join(".", "ports", "geckolib", "gecko_bindings", "structs_debug.rs"),
|
||||
os.path.join(".", "ports", "geckolib", "gecko_bindings", "structs_release.rs"),
|
||||
os.path.join(".", "ports", "geckolib", "string_cache", "atom_macro.rs"),
|
||||
os.path.join(".", "resources", "hsts_preload.json"),
|
||||
os.path.join(".", "tests", "wpt", "metadata", "MANIFEST.json"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue