stratum-rs-overlay 4.0.0 → 4.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +24 -2
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,18 +12,39 @@ export interface TargetConfig {
|
|
|
12
12
|
mode: Mode
|
|
13
13
|
}
|
|
14
14
|
export interface OverlayEvent {
|
|
15
|
+
/** "focus" | "move" | "blur" | "cursor" | "cursor-leave" | "error" */
|
|
15
16
|
eventType: string
|
|
17
|
+
/** 매칭된 대상 이름. "error" 이벤트에서는 실패 사유 */
|
|
16
18
|
targetName: string
|
|
19
|
+
/** DWMWA_EXTENDED_FRAME_BOUNDS 기준 창 좌표 (타이틀바/테두리 포함). cursor 이벤트에서는 창 기준 커서 좌표 */
|
|
17
20
|
x: number
|
|
18
21
|
y: number
|
|
19
22
|
width: number
|
|
20
23
|
height: number
|
|
24
|
+
/** 대상 창의 프로세스 ID (focus/move/cursor, 그 외 0) */
|
|
25
|
+
pid: number
|
|
26
|
+
/** 대상 창 핸들 (focus/move/cursor, 그 외 0) */
|
|
27
|
+
hwnd: number
|
|
28
|
+
/**
|
|
29
|
+
* 클라이언트 영역 화면 좌표 (GetClientRect + ClientToScreen, 타이틀바/테두리 제외).
|
|
30
|
+
* cursor 이벤트에서는 클라이언트 영역 기준 커서 좌표 (clientWidth/clientHeight = 0)
|
|
31
|
+
*/
|
|
32
|
+
clientX: number
|
|
33
|
+
clientY: number
|
|
34
|
+
clientWidth: number
|
|
35
|
+
clientHeight: number
|
|
36
|
+
/** focus 이벤트에만 존재. SHQueryUserNotificationState == QUNS_RUNNING_D3D_FULL_SCREEN */
|
|
37
|
+
fullscreenExclusive?: boolean
|
|
21
38
|
}
|
|
22
39
|
export interface MouseTrackingOptions {
|
|
23
40
|
cursorPollIntervalMs?: number
|
|
24
41
|
cursorEmitIntervalMs?: number
|
|
25
42
|
idlePollIntervalMs?: number
|
|
26
43
|
}
|
|
44
|
+
export interface TrackingOptions {
|
|
45
|
+
/** 대상 창이 포그라운드를 잃은 뒤 blur 를 보내기 전 유예 시간(ms). 기본 0 = 즉시 blur */
|
|
46
|
+
blurGraceMs?: number
|
|
47
|
+
}
|
|
27
48
|
/**
|
|
28
49
|
* License Key Verification
|
|
29
50
|
* @param License Key
|
|
@@ -41,6 +62,7 @@ export declare function stopTracking(): boolean
|
|
|
41
62
|
* Start Tracking
|
|
42
63
|
* @param targets: Vec<TargetConfig>
|
|
43
64
|
* @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::CalleeHandled>
|
|
44
|
-
* @
|
|
65
|
+
* @param options: TrackingOptions (optional, blurGraceMs)
|
|
66
|
+
* @return Result<()> - 훅 등록 실패 시 Err
|
|
45
67
|
*/
|
|
46
|
-
export declare function startTracking(targets: Array<TargetConfig>, callback: (err: Error | null, event?: OverlayEvent) => void): void
|
|
68
|
+
export declare function startTracking(targets: Array<TargetConfig>, callback: (err: Error | null, event?: OverlayEvent) => void, options?: TrackingOptions | undefined | null): void
|
|
Binary file
|