class
Tessell::Platform::FakeHost
- Tessell::Platform::FakeHost
- Tessell::Platform::Host
- Reference
- Object
Defined in:
tessell/platform/fake_host.crConstructors
Instance Method Summary
-
#clipboard : Platform::Clipboard
X1 契约实现:MemoryClipboard + committed text 能力如实上报。
- #clock_ms : Int64
- #close : Nil
- #closed? : Bool
- #event_log : Array(Tessell::Input::Event)
- #frame_interval_ms : Int64
- #frame_interval_ms=(frame_interval_ms : Int64)
- #frames : Int32
- #ime : Platform::ImeSupport
- #inject(event : Tessell::Input::Event) : Nil
- #key(code : Tessell::Input::KeyCode, modifiers : Tessell::Input::Modifiers = Tessell::Input::Modifiers.none) : Nil
- #panic_on_unsupported : Bool
- #panic_on_unsupported=(panic_on_unsupported : Bool)
-
#poll_events(sink : Array(Tessell::Input::Event)) : Bool
泵一批输入事件进 sink(复用调用方缓冲);返回 false = 宿主要求退出。
-
#present : Nil
呈现当前帧(swap buffers / 位块传输)。
- #presents : Int32
-
#pump_frame : Array(Tessell::Input::Event)
泵一帧:推进虚拟时钟并返回本帧事件(合成帧步进,绝不 sleep)。
- #pump_log : Array(Int32)
- #scale : Float32
- #scale=(scale : Float32)
-
#screenshot(path : String) : Nil
未实现能力显式 panic(真实宿主无法应用的 op 不许静默成功)。
-
#tap(x : Float32, y : Float32) : Nil
按用户所见驱动:tap = 完整按压/抬起对(间隔 30ms 虚拟时钟内)。
- #text_input(text : String) : Nil
- #title : String
- #viewport : Tessell::Rect
Instance methods inherited from class Tessell::Platform::Host
clipboard : Clipboard
clipboard,
close : Nil
close,
delay(ms : Int32) : Nil
delay,
ime : ImeSupport
ime,
poll_events(sink : Array(Tessell::Input::Event)) : Bool
poll_events,
present : Nil
present,
resized? : Bool
resized?,
scale : Float32
scale,
ticks_ms : Int64
ticks_ms,
title : String
title,
viewport : Tessell::Rect
viewport
Constructor Detail
def self.new(width : Float32 = 800.0_f32, height : Float32 = 600.0_f32, scale : Float32 = 1.0_f32)
#
Instance Method Detail
def key(code : Tessell::Input::KeyCode, modifiers : Tessell::Input::Modifiers = Tessell::Input::Modifiers.none) : Nil
#
def poll_events(sink : Array(Tessell::Input::Event)) : Bool
#
Description copied from class Tessell::Platform::Host
泵一批输入事件进 sink(复用调用方缓冲);返回 false = 宿主要求退出。
def present : Nil
#
Description copied from class Tessell::Platform::Host
呈现当前帧(swap buffers / 位块传输)。