File: sumo/info.txt 1 sumo 2 3 SUspend MOnitor 4 5 This is a Windows-only program which puts the main monitor in its suspended 6 state, making it all black: moving the mouse or pressing anything on the 7 keyboard will bring the monitor's contents back. File: sumo/logo.ico <BINARY> File: sumo/logo.png <BINARY> File: sumo/main.c 1 /* 2 sumo 3 4 SUspend MOnitor 5 6 This is a Windows-only program which puts the main monitor in its suspended 7 state, making it all black: moving the mouse or pressing anything on the 8 keyboard will bring the monitor's contents back. 9 */ 10 11 #include <windows.h> 12 13 const UINT system_command = 0x0112; 14 const WPARAM monitor_power = 0xf170; 15 const LPARAM turn_monitor_on = -1; 16 const LPARAM turn_monitor_off = 2; 17 18 int WINAPI WinMain(HINSTANCE cur, HINSTANCE prev, LPSTR cl, int show_cmd) { 19 HWND desktop = GetShellWindow(); 20 SendMessageW(desktop, system_command, monitor_power, turn_monitor_off); 21 return 0; 22 } File: sumo/sumo.rc 1 // https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource 2 // windres -O coff -o sumo.res sumo.rc 3 4 IDI_ICON1 ICON "logo.ico"