asclass G22WatchTarget { void mainWindow(Window window) {} abstract void configureScreenCamStream(ScreenCamStream stream); S toolTip() { null; } } // screenNr: 1 = screen 1 etc srecord WatchScreen(int screenNr) > G22WatchTarget { toString { ret "Screen " + screenNr; } void configureScreenCamStream(ScreenCamStream stream) { stream.useScreen(screenNr-1); } } srecord WatchMouse(int width, int height) > G22WatchTarget { WatchMouse() { height = 256; width = iround(height*16.0/9); } toString { ret "Mouse"; } void configureScreenCamStream(ScreenCamStream stream) { stream.area(mouseArea(width, height)); } @Override S toolTip() { ret "Watch an area of " + str_px(width, height) + " around the mouse pointer"; } } srecord WatchScreenWithMouse > G22WatchTarget { toString { ret "Screen w/mouse"; } void configureScreenCamStream(ScreenCamStream stream) { stream.useScreen(screenNrContaining(mouseLocationPt())); } @Override S toolTip() { ret "Watch the screen the mouse pointer is in"; } } // Screen where Gazelle window is not srecord WatchOtherScreen > G22WatchTarget { toString { ret "Other Screen"; } transient void settable Window mainWindow; void configureScreenCamStream(ScreenCamStream stream) { stream.useScreen(mod(screenNrOfWindow(mainWindow)+1, numberOfScreens())); } @Override S toolTip() { ret "Watch the first screen the Gazelle window is NOT in"; } }