Skip to main content

VeloxEmbedSession

Struct VeloxEmbedSession 

Source
pub struct VeloxEmbedSession {
    pub engine: VeloxEngine,
    /* private fields */
}
Expand description

单个可多实例并行的宿主嵌入会话(统一承载 VeloxEngine + GPU 共享导出器或软件缓冲回退)。

Fields§

§engine: VeloxEngine

Implementations§

Source§

impl VeloxEmbedSession

Source

pub fn new<V: View>( root_view: V, logical_width: i16, logical_height: i16, scale_factor: f32, config: VeloxHostAdapterConfig, ) -> Self

创建一个挂载指定根视图的跨框架嵌入会话。

Source

pub fn backend_is_gpu(&self) -> bool

返回当前会话是否激活了 GPU 硬件共享导出后端。

Source

pub fn gpu_exporter_mut(&mut self) -> Option<&mut WgpuSharedExportRenderer>

返回底层 GPU 共享导出器可变引用(供 Rust 宿主直接注册外部零拷贝纹理或检查句柄)。

Source

pub fn resize( &mut self, logical_width: i16, logical_height: i16, scale_factor: f32, )

调整嵌入视口的逻辑尺寸与缩放因子。

Source

pub fn step_frame(&mut self, dt_ms: u16) -> bool

推进一帧动画与布局求解,并将有变化的画面提交至 GPU 共享槽或软件回退缓冲;返回是否有新帧产出。

Source

pub fn acquire_shared_frame(&mut self) -> VeloxSharedFrameDesc

宿主获取最新共享帧描述(GPU 模式返回零拷贝句柄,软件模式返回 CPU RGBA 缓冲指针)。

Source

pub fn release_shared_frame(&mut self, generation_id: u32, slot_index: u8)

宿主归还已完成采样的共享帧租约(驱动旧 Resize 显存池安全回收)。

Source

pub fn inject_pointer(&mut self, phase: u8, x: i16, y: i16) -> bool

注入指针事件(phase: 0=Down, 1=Move, 2=Up, 3=Cancel)。

Source

pub fn inject_wheel(&mut self, x: i16, y: i16, delta_y: i16) -> bool

注入滚轮事件(正值向下、负值向上)。

Source

pub fn inject_key(&mut self, code: u32, is_char: bool) -> bool

注入键盘事件(is_char == 1 时按 Unicode 码点派发字符键;否则按标准键码派发导航键)。

Auto Trait Implementations§

§

impl !Freeze for VeloxEmbedSession

§

impl !RefUnwindSafe for VeloxEmbedSession

§

impl !Send for VeloxEmbedSession

§

impl !Sync for VeloxEmbedSession

§

impl !UnwindSafe for VeloxEmbedSession

§

impl Forget for VeloxEmbedSession

§

impl Move for VeloxEmbedSession

§

impl Unpin for VeloxEmbedSession
where *const u8 is !null: Unpin, &'static PodVTable: Unpin, *const Element<'static>: Unpin, *mut u8: Unpin, *mut (): Unpin, *const ChunkFooter is !null: Unpin, *const CoreTheme: Unpin, *const PodPool: Unpin, &'static StaticCatalog: Unpin, Arc<DynamicCatalog>: Unpin, Arc<ForegroundShared>: Unpin, Rc<RefCell<ForegroundLocal>>: Unpin, &'static str: Unpin, &'static [u8]: Unpin, &'static dyn Fn(&mut dyn SurfacePainter): Unpin, &'static StyledQuad<'static>: Unpin, &'static LayerSpec<'static>: Unpin, &'static ExternalTextureSpec: Unpin, &'static RichTextSpec<'static>: Unpin, &'static DecodedImageSpec: Unpin, &'static VectorDrawSpec<'static>: Unpin, &'static SceneCanvasSpec<'static>: Unpin, &'static DivInteractivity<'static>: Unpin, *const DrawOp<'static>: Unpin, *const HitRegion<'static>: Unpin, *mut LayoutNode<'static, 'static>: Unpin, Arc<CoreRenderPipeline>: Unpin, Arc<CoreBindGroupLayout>: Unpin, Arc<CoreBindGroup>: Unpin, Arc<CoreBuffer>: Unpin, Arc<Mutex<MapContext>>: Unpin, InternalBitFlags: Unpin, Arc<CoreSampler>: Unpin, Arc<CoreTexture>: Unpin, InternalBitFlags: Unpin, &'static [TextureFormat]: Unpin, Arc<CoreTextureView>: Unpin, Arc<DiskPipelineCache>: Unpin, *mut Counter<Channel<GpuEffectsEngine>>: Unpin, *mut Counter<Channel<GpuEffectsEngine>>: Unpin, *mut Counter<Channel<GpuEffectsEngine>>: Unpin, *mut Counter<Channel<CanvasGpuEngine>>: Unpin, *mut Counter<Channel<CanvasGpuEngine>>: Unpin, *mut Counter<Channel<CanvasGpuEngine>>: Unpin, Arc<CachedTextLayout>: Unpin, Arc<CoreQueue>: Unpin, Arc<CoreDevice>: Unpin, Arc<CoreAdapter>: Unpin, Arc<ContextWgpuCore>: Unpin, Align8<u64>: Unpin, Align1<u8>: Unpin,

§

impl UnsafeUnpin for VeloxEmbedSession
where *const u8 is !null: UnsafeUnpin, PhantomData<PodSlot>: UnsafeUnpin, PhantomData<PodId>: UnsafeUnpin, PhantomData<*mut ()>: UnsafeUnpin, *const ChunkFooter is !null: UnsafeUnpin, *const CoreTheme: UnsafeUnpin, *const PodPool: UnsafeUnpin, &'static StaticCatalog: UnsafeUnpin, *const ArcInner<DynamicCatalog> is !null: UnsafeUnpin, PhantomData<ArcInner<DynamicCatalog>>: UnsafeUnpin, *const ArcInner<ForegroundShared> is !null: UnsafeUnpin, PhantomData<ArcInner<ForegroundShared>>: UnsafeUnpin, *const RcInner<RefCell<ForegroundLocal>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<ForegroundLocal>>>: UnsafeUnpin, PhantomData<ActiveTransition>: UnsafeUnpin, PhantomData<ScrollEntry>: UnsafeUnpin, PhantomData<GhostEntry>: UnsafeUnpin, PhantomData<Region>: UnsafeUnpin, PhantomData<DrawOpSnapshot>: UnsafeUnpin, PhantomData<DrawOp<'static>>: UnsafeUnpin, PhantomData<HitRegion<'static>>: UnsafeUnpin, *const DrawOp<'static>: UnsafeUnpin, *const HitRegion<'static>: UnsafeUnpin, *mut LayoutNode<'static, 'static>: UnsafeUnpin, PhantomData<PathBuf>: UnsafeUnpin, PhantomData<KeyBinding>: UnsafeUnpin, *const ArcInner<CoreRenderPipeline> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreRenderPipeline>>: UnsafeUnpin, *const ArcInner<CoreBindGroupLayout> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreBindGroupLayout>>: UnsafeUnpin, *const ArcInner<CoreBindGroup> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreBindGroup>>: UnsafeUnpin, *const ArcInner<CoreBuffer> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreBuffer>>: UnsafeUnpin, *const ArcInner<Mutex<MapContext>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<MapContext>>>: UnsafeUnpin, InternalBitFlags: UnsafeUnpin, PhantomData<AlignedViewportSlot>: UnsafeUnpin, *const ArcInner<CoreSampler> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreSampler>>: UnsafeUnpin, *const ArcInner<CoreTexture> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreTexture>>: UnsafeUnpin, &'static str: UnsafeUnpin, InternalBitFlags: UnsafeUnpin, &'static [TextureFormat]: UnsafeUnpin, *const ArcInner<CoreTextureView> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreTextureView>>: UnsafeUnpin, PhantomData<[u32; 4]>: UnsafeUnpin, PhantomData<((char, u16), GlyphAtlasEntry)>: UnsafeUnpin, PhantomData<(SpriteCacheKey, [f32; 4])>: UnsafeUnpin, PhantomData<(u64, u32)>: UnsafeUnpin, PhantomData<((u64, u64, u64, u64), BindGroup)>: UnsafeUnpin, PhantomData<((u64, u64, u64), BindGroup)>: UnsafeUnpin, PhantomData<PooledTarget>: UnsafeUnpin, PhantomData<(u64, CachedPathMask)>: UnsafeUnpin, PhantomData<EffectUniform>: UnsafeUnpin, PhantomData<GpuPassStep>: UnsafeUnpin, PhantomData<CanvasUniformData>: UnsafeUnpin, PhantomData<(StaticSceneId, CachedGpuScene)>: UnsafeUnpin, PhantomData<SlugCurve>: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, PhantomData<SlugBand>: UnsafeUnpin, PhantomData<SlugGlyphInstance>: UnsafeUnpin, PhantomData<((u64, u16, u64), CachedSlugGlyph)>: UnsafeUnpin, PhantomData<(u32, u32, u32, u32)>: UnsafeUnpin, *const ArcInner<DiskPipelineCache> is !null: UnsafeUnpin, PhantomData<ArcInner<DiskPipelineCache>>: UnsafeUnpin, *mut Counter<Channel<GpuEffectsEngine>>: UnsafeUnpin, *mut Counter<Channel<GpuEffectsEngine>>: UnsafeUnpin, *mut Counter<Channel<GpuEffectsEngine>>: UnsafeUnpin, *mut Counter<Channel<CanvasGpuEngine>>: UnsafeUnpin, *mut Counter<Channel<CanvasGpuEngine>>: UnsafeUnpin, *mut Counter<Channel<CanvasGpuEngine>>: UnsafeUnpin, PhantomData<(ExternalTextureId, ExternalTextureEntry)>: UnsafeUnpin, PhantomData<GpuPrimitive>: UnsafeUnpin, PhantomData<Rgba8888>: UnsafeUnpin, PhantomData<(TextLayoutKey, Arc<CachedTextLayout>)>: UnsafeUnpin, *const ArcInner<CoreQueue> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreQueue>>: UnsafeUnpin, *const ArcInner<CoreDevice> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreDevice>>: UnsafeUnpin, *const ArcInner<CoreAdapter> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreAdapter>>: UnsafeUnpin, *const ArcInner<ContextWgpuCore> is !null: UnsafeUnpin, PhantomData<ArcInner<ContextWgpuCore>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, Align8<u64>: UnsafeUnpin, Align1<u8>: UnsafeUnpin, PhantomData<RetiredPool>: UnsafeUnpin, PhantomData<CDirtyRect>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> FluentBuilder for T

Source§

fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self

当 condition 为 true 时执行闭包修饰自身,否则原样返回。
Source§

fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self

根据 condition 在两个修饰分支之间二选一。
Source§

fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self

当 option 为 Some(value) 时执行闭包修饰自身,否则原样返回。
Source§

fn when_none<O>( self, option: &Option<O>, then: impl FnOnce(Self) -> Self, ) -> Self

当 option 为 None 时执行闭包修饰自身,否则原样返回。
Source§

fn apply<U>(self, f: impl FnOnce(Self) -> U) -> U

通用管道映射变换(避免与 Iterator::map / Option::map 重名)。
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.