mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:50:43 +00:00
feat: add macOS screen snapshots for monitor preview (#67954) thanks @BunsDev
Co-authored-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +1,34 @@
|
||||
import Foundation
|
||||
|
||||
public enum OpenClawScreenCommand: String, Codable, Sendable {
|
||||
case snapshot = "screen.snapshot"
|
||||
case record = "screen.record"
|
||||
}
|
||||
|
||||
public enum OpenClawScreenSnapshotFormat: String, Codable, Sendable {
|
||||
case jpeg
|
||||
case png
|
||||
}
|
||||
|
||||
public struct OpenClawScreenSnapshotParams: Codable, Sendable, Equatable {
|
||||
public var screenIndex: Int?
|
||||
public var maxWidth: Int?
|
||||
public var quality: Double?
|
||||
public var format: OpenClawScreenSnapshotFormat?
|
||||
|
||||
public init(
|
||||
screenIndex: Int? = nil,
|
||||
maxWidth: Int? = nil,
|
||||
quality: Double? = nil,
|
||||
format: OpenClawScreenSnapshotFormat? = nil)
|
||||
{
|
||||
self.screenIndex = screenIndex
|
||||
self.maxWidth = maxWidth
|
||||
self.quality = quality
|
||||
self.format = format
|
||||
}
|
||||
}
|
||||
|
||||
public struct OpenClawScreenRecordParams: Codable, Sendable, Equatable {
|
||||
public var screenIndex: Int?
|
||||
public var durationMs: Int?
|
||||
|
||||
Reference in New Issue
Block a user