mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 10:19:17 +02:00
refactor(scrcpy): rewrite option classes to improve tree-shaking
This commit is contained in:
parent
92472007db
commit
cc5d52912e
63 changed files with 595 additions and 325 deletions
|
@ -6,17 +6,19 @@ import type {
|
|||
AndroidKeyEventAction,
|
||||
AndroidKeyEventMeta,
|
||||
} from "../android/index.js";
|
||||
import { ScrcpyControlMessageType } from "../base/index.js";
|
||||
|
||||
export const ScrcpyInjectKeyCodeControlMessage = struct(
|
||||
{
|
||||
type: u8,
|
||||
action: u8<AndroidKeyEventAction>(),
|
||||
keyCode: u32<AndroidKeyCode>(),
|
||||
repeat: u32,
|
||||
metaState: u32<AndroidKeyEventMeta>(),
|
||||
},
|
||||
{ littleEndian: false },
|
||||
);
|
||||
export const ScrcpyInjectKeyCodeControlMessage = /* #__PURE__ */ (() =>
|
||||
struct(
|
||||
{
|
||||
type: u8(ScrcpyControlMessageType.InjectKeyCode),
|
||||
action: u8<AndroidKeyEventAction>(),
|
||||
keyCode: u32<AndroidKeyCode>(),
|
||||
repeat: u32,
|
||||
metaState: u32<AndroidKeyEventMeta>(),
|
||||
},
|
||||
{ littleEndian: false },
|
||||
))();
|
||||
|
||||
export type ScrcpyInjectKeyCodeControlMessage = StructInit<
|
||||
typeof ScrcpyInjectKeyCodeControlMessage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue