mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
stylo: generate bindings with bitfield accessors.
This commit is contained in:
parent
12fcb7a2e7
commit
df44ba40a4
3 changed files with 593 additions and 15 deletions
|
@ -24,7 +24,7 @@ COMPILATION_TARGETS = {
|
|||
COMMON_BUILD_KEY: {
|
||||
"flags": [
|
||||
"-x", "c++", "-std=c++14",
|
||||
"-allow-unknown-types", "-no-bitfield-methods",
|
||||
"-allow-unknown-types", "-no-unstable-rust",
|
||||
"-no-type-renaming", "-no-namespaced-constants",
|
||||
"-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
|
||||
"-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN",
|
||||
|
|
|
@ -2172,6 +2172,32 @@ pub struct nsTArrayHeader {
|
|||
pub mLength: u32,
|
||||
pub _bitfield_1: u32,
|
||||
}
|
||||
impl nsTArrayHeader {
|
||||
#[inline]
|
||||
pub fn mCapacity(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483647usize as u32)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mCapacity(&mut self, val: u32) {
|
||||
self._bitfield_1 &= !(2147483647usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 0usize) & (2147483647usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mIsAutoArray(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483648usize as u32)) >> 31usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsAutoArray(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2147483648usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 31usize) & (2147483648usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mCapacity: u32, mIsAutoArray: bool) -> u32 {
|
||||
0 | ((mCapacity as u32) << 0u32) | ((mIsAutoArray as u32) << 31u32)
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsTArrayHeader {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -2467,6 +2493,32 @@ pub struct nsIAtom {
|
|||
pub struct _vftable_nsIAtom {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl nsIAtom {
|
||||
#[inline]
|
||||
pub fn mLength(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483647usize as u32)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mLength(&mut self, val: u32) {
|
||||
self._bitfield_1 &= !(2147483647usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 0usize) & (2147483647usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mIsStatic(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483648usize as u32)) >> 31usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsStatic(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2147483648usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 31usize) & (2147483648usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mLength: u32, mIsStatic: bool) -> u32 {
|
||||
0 | ((mLength as u32) << 0u32) | ((mIsStatic as u32) << 31u32)
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsIAtom {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -4728,7 +4780,91 @@ pub struct nsCSSValue_nsCSSValue_h_unnamed_13 {
|
|||
pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsCSSValue_nsCSSValue_h_unnamed_13 { }
|
||||
impl nsCSSValue_nsCSSValue_h_unnamed_13 {
|
||||
pub unsafe fn mInt(&mut self) -> *mut i32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFloat(&mut self) -> *mut f32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mString(&mut self) -> *mut *mut nsStringBuffer {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mColor(&mut self) -> *mut nscolor {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mArray(&mut self) -> *mut *mut Array {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mURL(&mut self) -> *mut *mut URLValue {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mImage(&mut self) -> *mut *mut ImageValue {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mGridTemplateAreas(&mut self)
|
||||
-> *mut *mut GridTemplateAreasValue {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mGradient(&mut self) -> *mut *mut nsCSSValueGradient {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mTokenStream(&mut self) -> *mut *mut nsCSSValueTokenStream {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPair(&mut self) -> *mut *mut nsCSSValuePair_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mRect(&mut self) -> *mut *mut nsCSSRect_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mTriplet(&mut self) -> *mut *mut nsCSSValueTriplet_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mList(&mut self) -> *mut *mut nsCSSValueList_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mListDependent(&mut self) -> *mut *mut nsCSSValueList {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mSharedList(&mut self) -> *mut *mut nsCSSValueSharedList {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPairList(&mut self) -> *mut *mut nsCSSValuePairList_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPairListDependent(&mut self)
|
||||
-> *mut *mut nsCSSValuePairList {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFloatColor(&mut self) -> *mut *mut nsCSSValueFloatColor {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFontFamilyList(&mut self)
|
||||
-> *mut *mut FontFamilyListRefCnt {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_13 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -5190,7 +5326,20 @@ pub struct nsStyleCoord_h_unnamed_18 {
|
|||
pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleCoord_h_unnamed_18 { }
|
||||
impl nsStyleCoord_h_unnamed_18 {
|
||||
pub unsafe fn mInt(&mut self) -> *mut i32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFloat(&mut self) -> *mut f32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPointer(&mut self) -> *mut *mut ::std::os::raw::c_void {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleCoord_h_unnamed_18 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -5468,7 +5617,21 @@ pub struct nsStyleImage_nsStyleStruct_h_unnamed_21 {
|
|||
pub mElementId: __BindgenUnionField<*mut ::std::os::raw::c_ushort>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleImage_nsStyleStruct_h_unnamed_21 { }
|
||||
impl nsStyleImage_nsStyleStruct_h_unnamed_21 {
|
||||
pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mGradient(&mut self) -> *mut *mut nsStyleGradient {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mElementId(&mut self)
|
||||
-> *mut *mut ::std::os::raw::c_ushort {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_21 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -5821,6 +5984,30 @@ pub struct nsStyleGridTemplate {
|
|||
pub mRepeatAutoIndex: i16,
|
||||
pub _bitfield_1: u8,
|
||||
}
|
||||
impl nsStyleGridTemplate {
|
||||
#[inline]
|
||||
pub fn mIsAutoFill(&self) -> u8 {
|
||||
(self._bitfield_1 & (1usize as u8)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsAutoFill(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(1usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mIsSubgrid(&self) -> u8 {
|
||||
(self._bitfield_1 & (2usize as u8)) >> 1usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsSubgrid(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mIsAutoFill: bool, mIsSubgrid: bool) -> u8 {
|
||||
0 | ((mIsAutoFill as u8) << 0u32) | ((mIsSubgrid as u8) << 1u32)
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleGridTemplate() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize);
|
||||
|
@ -5942,6 +6129,64 @@ pub struct nsStyleText {
|
|||
pub mTextShadow: RefPtr<nsCSSShadowArray>,
|
||||
pub mTextEmphasisStyleString: nsString,
|
||||
}
|
||||
impl nsStyleText {
|
||||
#[inline]
|
||||
pub fn mTextAlignTrue(&self) -> u8 {
|
||||
(self._bitfield_1 & (1usize as u8)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mTextAlignTrue(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(1usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mTextAlignLastTrue(&self) -> u8 {
|
||||
(self._bitfield_1 & (2usize as u8)) >> 1usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mTextAlignLastTrue(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mTextEmphasisColorForeground(&self) -> u8 {
|
||||
(self._bitfield_1 & (4usize as u8)) >> 2usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mTextEmphasisColorForeground(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(4usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 2usize) & (4usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mWebkitTextFillColorForeground(&self) -> u8 {
|
||||
(self._bitfield_1 & (8usize as u8)) >> 3usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mWebkitTextFillColorForeground(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(8usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 3usize) & (8usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mWebkitTextStrokeColorForeground(&self) -> u8 {
|
||||
(self._bitfield_1 & (16usize as u8)) >> 4usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mWebkitTextStrokeColorForeground(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(16usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 4usize) & (16usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mTextAlignTrue: bool, mTextAlignLastTrue: bool,
|
||||
mTextEmphasisColorForeground: bool,
|
||||
mWebkitTextFillColorForeground: bool,
|
||||
mWebkitTextStrokeColorForeground: bool) -> u8 {
|
||||
0 | ((mTextAlignTrue as u8) << 0u32) |
|
||||
((mTextAlignLastTrue as u8) << 1u32) |
|
||||
((mTextEmphasisColorForeground as u8) << 2u32) |
|
||||
((mWebkitTextFillColorForeground as u8) << 3u32) |
|
||||
((mWebkitTextStrokeColorForeground as u8) << 4u32)
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleText() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize);
|
||||
|
@ -6019,7 +6264,20 @@ pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23 {
|
|||
pub nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>,
|
||||
pub _bindgen_data_: [u32; 4usize],
|
||||
}
|
||||
impl nsTimingFunction_nsStyleStruct_h_unnamed_23 { }
|
||||
impl nsTimingFunction_nsStyleStruct_h_unnamed_23 {
|
||||
pub unsafe fn mFunc(&mut self)
|
||||
->
|
||||
*mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25(&mut self)
|
||||
->
|
||||
*mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_23 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -6255,7 +6513,20 @@ pub struct nsStyleContentData_nsStyleStruct_h_unnamed_27 {
|
|||
pub mCounters: __BindgenUnionField<*mut Array>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleContentData_nsStyleStruct_h_unnamed_27 { }
|
||||
impl nsStyleContentData_nsStyleStruct_h_unnamed_27 {
|
||||
pub unsafe fn mString(&mut self) -> *mut *mut ::std::os::raw::c_ushort {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mCounters(&mut self) -> *mut *mut Array {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_27 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -6408,7 +6679,16 @@ pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 {
|
|||
pub mPaintServer: __BindgenUnionField<*mut FragmentOrURL>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { }
|
||||
impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 {
|
||||
pub unsafe fn mColor(&mut self) -> *mut nscolor {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPaintServer(&mut self) -> *mut *mut FragmentOrURL {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -6479,7 +6759,16 @@ pub struct nsStyleFilter_nsStyleStruct_h_unnamed_30 {
|
|||
pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleFilter_nsStyleStruct_h_unnamed_30 { }
|
||||
impl nsStyleFilter_nsStyleStruct_h_unnamed_30 {
|
||||
pub unsafe fn mURL(&mut self) -> *mut *mut FragmentOrURL {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mDropShadow(&mut self) -> *mut *mut nsCSSShadowArray {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_30 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
|
|
@ -2172,6 +2172,32 @@ pub struct nsTArrayHeader {
|
|||
pub mLength: u32,
|
||||
pub _bitfield_1: u32,
|
||||
}
|
||||
impl nsTArrayHeader {
|
||||
#[inline]
|
||||
pub fn mCapacity(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483647usize as u32)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mCapacity(&mut self, val: u32) {
|
||||
self._bitfield_1 &= !(2147483647usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 0usize) & (2147483647usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mIsAutoArray(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483648usize as u32)) >> 31usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsAutoArray(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2147483648usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 31usize) & (2147483648usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mCapacity: u32, mIsAutoArray: bool) -> u32 {
|
||||
0 | ((mCapacity as u32) << 0u32) | ((mIsAutoArray as u32) << 31u32)
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsTArrayHeader {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -2468,6 +2494,32 @@ pub struct nsIAtom {
|
|||
pub struct _vftable_nsIAtom {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl nsIAtom {
|
||||
#[inline]
|
||||
pub fn mLength(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483647usize as u32)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mLength(&mut self, val: u32) {
|
||||
self._bitfield_1 &= !(2147483647usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 0usize) & (2147483647usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mIsStatic(&self) -> u32 {
|
||||
(self._bitfield_1 & (2147483648usize as u32)) >> 31usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsStatic(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2147483648usize as u32);
|
||||
self._bitfield_1 |=
|
||||
((val as u32) << 31usize) & (2147483648usize as u32);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mLength: u32, mIsStatic: bool) -> u32 {
|
||||
0 | ((mLength as u32) << 0u32) | ((mIsStatic as u32) << 31u32)
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsIAtom {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -4707,7 +4759,91 @@ pub struct nsCSSValue_nsCSSValue_h_unnamed_13 {
|
|||
pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsCSSValue_nsCSSValue_h_unnamed_13 { }
|
||||
impl nsCSSValue_nsCSSValue_h_unnamed_13 {
|
||||
pub unsafe fn mInt(&mut self) -> *mut i32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFloat(&mut self) -> *mut f32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mString(&mut self) -> *mut *mut nsStringBuffer {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mColor(&mut self) -> *mut nscolor {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mArray(&mut self) -> *mut *mut Array {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mURL(&mut self) -> *mut *mut URLValue {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mImage(&mut self) -> *mut *mut ImageValue {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mGridTemplateAreas(&mut self)
|
||||
-> *mut *mut GridTemplateAreasValue {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mGradient(&mut self) -> *mut *mut nsCSSValueGradient {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mTokenStream(&mut self) -> *mut *mut nsCSSValueTokenStream {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPair(&mut self) -> *mut *mut nsCSSValuePair_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mRect(&mut self) -> *mut *mut nsCSSRect_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mTriplet(&mut self) -> *mut *mut nsCSSValueTriplet_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mList(&mut self) -> *mut *mut nsCSSValueList_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mListDependent(&mut self) -> *mut *mut nsCSSValueList {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mSharedList(&mut self) -> *mut *mut nsCSSValueSharedList {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPairList(&mut self) -> *mut *mut nsCSSValuePairList_heap {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPairListDependent(&mut self)
|
||||
-> *mut *mut nsCSSValuePairList {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFloatColor(&mut self) -> *mut *mut nsCSSValueFloatColor {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFontFamilyList(&mut self)
|
||||
-> *mut *mut FontFamilyListRefCnt {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_13 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -5169,7 +5305,20 @@ pub struct nsStyleCoord_h_unnamed_18 {
|
|||
pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleCoord_h_unnamed_18 { }
|
||||
impl nsStyleCoord_h_unnamed_18 {
|
||||
pub unsafe fn mInt(&mut self) -> *mut i32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mFloat(&mut self) -> *mut f32 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPointer(&mut self) -> *mut *mut ::std::os::raw::c_void {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleCoord_h_unnamed_18 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -5446,7 +5595,21 @@ pub struct nsStyleImage_nsStyleStruct_h_unnamed_21 {
|
|||
pub mElementId: __BindgenUnionField<*mut ::std::os::raw::c_ushort>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleImage_nsStyleStruct_h_unnamed_21 { }
|
||||
impl nsStyleImage_nsStyleStruct_h_unnamed_21 {
|
||||
pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mGradient(&mut self) -> *mut *mut nsStyleGradient {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mElementId(&mut self)
|
||||
-> *mut *mut ::std::os::raw::c_ushort {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_21 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -5799,6 +5962,30 @@ pub struct nsStyleGridTemplate {
|
|||
pub mRepeatAutoIndex: i16,
|
||||
pub _bitfield_1: u8,
|
||||
}
|
||||
impl nsStyleGridTemplate {
|
||||
#[inline]
|
||||
pub fn mIsAutoFill(&self) -> u8 {
|
||||
(self._bitfield_1 & (1usize as u8)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsAutoFill(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(1usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mIsSubgrid(&self) -> u8 {
|
||||
(self._bitfield_1 & (2usize as u8)) >> 1usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mIsSubgrid(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mIsAutoFill: bool, mIsSubgrid: bool) -> u8 {
|
||||
0 | ((mIsAutoFill as u8) << 0u32) | ((mIsSubgrid as u8) << 1u32)
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleGridTemplate() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize);
|
||||
|
@ -5920,6 +6107,64 @@ pub struct nsStyleText {
|
|||
pub mTextShadow: RefPtr<nsCSSShadowArray>,
|
||||
pub mTextEmphasisStyleString: nsString,
|
||||
}
|
||||
impl nsStyleText {
|
||||
#[inline]
|
||||
pub fn mTextAlignTrue(&self) -> u8 {
|
||||
(self._bitfield_1 & (1usize as u8)) >> 0usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mTextAlignTrue(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(1usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mTextAlignLastTrue(&self) -> u8 {
|
||||
(self._bitfield_1 & (2usize as u8)) >> 1usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mTextAlignLastTrue(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(2usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mTextEmphasisColorForeground(&self) -> u8 {
|
||||
(self._bitfield_1 & (4usize as u8)) >> 2usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mTextEmphasisColorForeground(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(4usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 2usize) & (4usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mWebkitTextFillColorForeground(&self) -> u8 {
|
||||
(self._bitfield_1 & (8usize as u8)) >> 3usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mWebkitTextFillColorForeground(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(8usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 3usize) & (8usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn mWebkitTextStrokeColorForeground(&self) -> u8 {
|
||||
(self._bitfield_1 & (16usize as u8)) >> 4usize
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_mWebkitTextStrokeColorForeground(&mut self, val: bool) {
|
||||
self._bitfield_1 &= !(16usize as u8);
|
||||
self._bitfield_1 |= ((val as u8) << 4usize) & (16usize as u8);
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(mTextAlignTrue: bool, mTextAlignLastTrue: bool,
|
||||
mTextEmphasisColorForeground: bool,
|
||||
mWebkitTextFillColorForeground: bool,
|
||||
mWebkitTextStrokeColorForeground: bool) -> u8 {
|
||||
0 | ((mTextAlignTrue as u8) << 0u32) |
|
||||
((mTextAlignLastTrue as u8) << 1u32) |
|
||||
((mTextEmphasisColorForeground as u8) << 2u32) |
|
||||
((mWebkitTextFillColorForeground as u8) << 3u32) |
|
||||
((mWebkitTextStrokeColorForeground as u8) << 4u32)
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsStyleText() {
|
||||
assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize);
|
||||
|
@ -5997,7 +6242,20 @@ pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23 {
|
|||
pub nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>,
|
||||
pub _bindgen_data_: [u32; 4usize],
|
||||
}
|
||||
impl nsTimingFunction_nsStyleStruct_h_unnamed_23 { }
|
||||
impl nsTimingFunction_nsStyleStruct_h_unnamed_23 {
|
||||
pub unsafe fn mFunc(&mut self)
|
||||
->
|
||||
*mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25(&mut self)
|
||||
->
|
||||
*mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_23 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -6232,7 +6490,20 @@ pub struct nsStyleContentData_nsStyleStruct_h_unnamed_27 {
|
|||
pub mCounters: __BindgenUnionField<*mut Array>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleContentData_nsStyleStruct_h_unnamed_27 { }
|
||||
impl nsStyleContentData_nsStyleStruct_h_unnamed_27 {
|
||||
pub unsafe fn mString(&mut self) -> *mut *mut ::std::os::raw::c_ushort {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mCounters(&mut self) -> *mut *mut Array {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_27 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -6385,7 +6656,16 @@ pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 {
|
|||
pub mPaintServer: __BindgenUnionField<*mut FragmentOrURL>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { }
|
||||
impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 {
|
||||
pub unsafe fn mColor(&mut self) -> *mut nscolor {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mPaintServer(&mut self) -> *mut *mut FragmentOrURL {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
@ -6456,7 +6736,16 @@ pub struct nsStyleFilter_nsStyleStruct_h_unnamed_30 {
|
|||
pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>,
|
||||
pub _bindgen_data_: u64,
|
||||
}
|
||||
impl nsStyleFilter_nsStyleStruct_h_unnamed_30 { }
|
||||
impl nsStyleFilter_nsStyleStruct_h_unnamed_30 {
|
||||
pub unsafe fn mURL(&mut self) -> *mut *mut FragmentOrURL {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
pub unsafe fn mDropShadow(&mut self) -> *mut *mut nsCSSShadowArray {
|
||||
let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
|
||||
::std::mem::transmute(raw.offset(0))
|
||||
}
|
||||
}
|
||||
impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_30 {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue