!7 module MiniVNC > DynImageSurface { bool enabled, usePossiblyBrokenVersion; S computerID; int width = 256; double videoInterval = 2.0; S switchableFields() { ret "usePossiblyBrokenVersion videoInterval"; } start { doEvery(videoInterval, r grab); } visualize { JComponent c = super.visualize(); enableDoubleBuffering(); ret northAndCenterWithMargins(vstackWithSpacing( centerAndEastWithMargins( withLabel("Computer to control:", dm_onlineComputerSelectorComboBox(dm_fieldLiveValue('computerID))), dm_fieldCheckBox('enabled)), jRightAlignedLine(jLabel("Resize to width (pixels):"), jMinWidth(100, jLiveValueIntTextField(dm_fieldLiveValue('width))))), c); } void grab enter { if (enabled && possibleComputerID(computerID) && dm_isVisible()) { setImage(dm_scaledDownScreenshotFromOtherMachine(computerID, width)); } } }