pub enum HarmonyHostCommand {
SetWindowTitle(String),
SetWindowMode(HarmonyWindowMode),
SetWindowSize {
width: u32,
height: u32,
},
SetDecorations(bool),
SetAlwaysOnTop(bool),
SetCursor(CursorIcon),
SetIme {
enabled: bool,
rect: Rect,
},
SetClipboard(String),
VibrateShort,
CloseWindow(WindowId),
}Expand description
Outbound ArkTS / N-API host command emitted by HarmonyPlatform for PC desktop windowing, cursor, IME, and OS bridges.
Variants§
SetWindowTitle(String)
Updates the HarmonyOS PC/Tablet window title (win.setWindowTitle).
SetWindowMode(HarmonyWindowMode)
Transitions the HarmonyOS PC/Tablet window mode (maximize / minimize / recover / setWindowLayoutFullScreen).
SetWindowSize
Requests a freeform window resize on HarmonyOS PC (win.resize).
SetDecorations(bool)
Shows or hides native HarmonyOS PC window titlebar decorations (win.setWindowDecorVisible).
SetAlwaysOnTop(bool)
Pins or unpins a HarmonyOS PC window above sibling windows (win.setWindowTopmost).
SetCursor(CursorIcon)
Updates the desktop pointer cursor style (pointer.setPointerStyle).
SetIme
Shows or hides the HarmonyOS soft keyboard / IME (@ohos.inputMethod).
Fields
SetClipboard(String)
Writes UTF-8 text to @ohos.pasteboard.
VibrateShort
Triggers short haptic feedback via @ohos.vibrator.
CloseWindow(WindowId)
Requests closing a HarmonyOS window (win.destroyWindow).
Trait Implementations§
Source§impl Clone for HarmonyHostCommand
impl Clone for HarmonyHostCommand
Source§fn clone(&self) -> HarmonyHostCommand
fn clone(&self) -> HarmonyHostCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more