mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Handle RawGeckoElement and friends, add support for types which are used in both maybe-null and non-null forms
This commit is contained in:
parent
de90f5fce8
commit
0d4c5674ec
6 changed files with 260 additions and 256 deletions
|
@ -24,7 +24,7 @@ use gecko_bindings::bindings::{Gecko_EnsureImageLayersLength, Gecko_CreateGradie
|
|||
use gecko_bindings::bindings::{Gecko_CopyImageValueFrom, Gecko_CopyFontFamilyFrom};
|
||||
use gecko_bindings::bindings::{Gecko_FontFamilyList_AppendGeneric, Gecko_FontFamilyList_AppendNamed};
|
||||
use gecko_bindings::bindings::{Gecko_FontFamilyList_Clear, Gecko_InitializeImageLayer};
|
||||
use gecko_bindings::bindings::ServoComputedValuesBorrowed;
|
||||
use gecko_bindings::bindings::ServoComputedValuesMaybeBorrowed;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
|
||||
use gecko_values::{StyleCoordHelpers, GeckoStyleCoordConvertible, convert_nscolor_to_rgba};
|
||||
|
@ -1712,8 +1712,8 @@ fn static_assert() {
|
|||
<%def name="define_ffi_struct_accessor(style_struct)">
|
||||
#[no_mangle]
|
||||
#[allow(non_snake_case, unused_variables)]
|
||||
pub extern "C" fn Servo_GetStyle${style_struct.gecko_name}(computed_values: ServoComputedValuesBorrowed)
|
||||
-> *const ${style_struct.gecko_ffi_name} {
|
||||
pub extern "C" fn Servo_GetStyle${style_struct.gecko_name}(computed_values:
|
||||
ServoComputedValuesMaybeBorrowed) -> *const ${style_struct.gecko_ffi_name} {
|
||||
computed_values.as_arc::<ComputedValues>().get_${style_struct.name_lower}().get_gecko()
|
||||
as *const ${style_struct.gecko_ffi_name}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue