ScreenCaptureSourceInfo
Information about shareable windows or screens.
class ScreenCaptureSourceInfo {
const ScreenCaptureSourceInfo(
{this.type,
this.sourceId,
this.sourceName,
this.thumbImage,
this.iconImage,
this.processPath,
this.sourceTitle,
this.primaryMonitor,
this.position,
this.minimizeWindow,
this.sourceDisplayId});
@JsonKey(name: 'type')
final ScreenCaptureSourceType? type;
@JsonKey(name: 'sourceId')
final int? sourceId;
@JsonKey(name: 'sourceName')
final String? sourceName;
@JsonKey(name: 'thumbImage')
final ThumbImageBuffer? thumbImage;
@JsonKey(name: 'iconImage')
final ThumbImageBuffer? iconImage;
@JsonKey(name: 'processPath')
final String? processPath;
@JsonKey(name: 'sourceTitle')
final String? sourceTitle;
@JsonKey(name: 'primaryMonitor')
final bool? primaryMonitor;
@JsonKey(name: 'position')
final Rectangle? position;
@JsonKey(name: 'minimizeWindow')
final bool? minimizeWindow;
@JsonKey(name: 'sourceDisplayId')
final int? sourceDisplayId;
factory ScreenCaptureSourceInfo.fromJson(Map<String, dynamic> json) =>
_$ScreenCaptureSourceInfoFromJson(json);
Map<String, dynamic> toJson() => _$ScreenCaptureSourceInfoToJson(this);
}
Properties
- type
- Type of the sharing target. See ScreenCaptureSourceType.
- sourceId
- For windows, represents the Window ID; for screens, represents the Display ID.
- sourceName
- Name of the window or screen. UTF-8 encoded.
- thumbImage
- Image content of the thumbnail. See ThumbImageBuffer.
- iconImage
- Image content of the icon. See ThumbImageBuffer.
- processPath
- Process to which the window belongs. UTF-8 encoded.
- sourceTitle
- Window title. UTF-8 encoded.
- primaryMonitor
- Whether the screen is the primary display:
- true: The screen is the primary display.
- false: The screen is not the primary display.
- position
- Position of the window relative to the entire screen space (including all shareable screens). See Rectangle.
- minimizeWindow
- (Windows only) Whether the window is minimized:
- true: The window is minimized.
- false: The window is not minimized.
- sourceDisplayId
- (Windows only) ID of the screen where the window is located. If the window spans multiple screens, this indicates the screen with the largest intersection area. If the window is outside the visible screen area, the value is -2.