mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Add FFI API to use SharedMemoryBuilder.
Differential Revision: https://phabricator.services.mozilla.com/D17198
This commit is contained in:
parent
40248ae5fd
commit
7aac260c5d
2 changed files with 22 additions and 0 deletions
21
components/style/gecko/boxed_types.rs
Normal file
21
components/style/gecko/boxed_types.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! FFI implementations for types listed in ServoBoxedTypeList.h.
|
||||
|
||||
use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||
use to_shmem::SharedMemoryBuilder;
|
||||
|
||||
// TODO(heycam): The FFI impls for most of the types in ServoBoxedTypeList.h are spread across
|
||||
// various files at the moment, but should probably all move here, and use macros to define
|
||||
// them more succinctly, like we do in arc_types.rs.
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
unsafe impl HasFFI for SharedMemoryBuilder {
|
||||
type FFIType = crate::gecko_bindings::bindings::RawServoSharedMemoryBuilder;
|
||||
}
|
||||
#[cfg(feature = "gecko")]
|
||||
unsafe impl HasSimpleFFI for SharedMemoryBuilder {}
|
||||
#[cfg(feature = "gecko")]
|
||||
unsafe impl HasBoxFFI for SharedMemoryBuilder {}
|
|
@ -8,6 +8,7 @@
|
|||
mod non_ts_pseudo_class_list;
|
||||
|
||||
pub mod arc_types;
|
||||
pub mod boxed_types;
|
||||
pub mod conversions;
|
||||
pub mod data;
|
||||
pub mod media_features;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue