{"version":"1.0","type":"rich","title":"Get the active window in Gtk using the wnck library.","description":"This example demonstrates a simple text-based monitoring loop that continuously prints the name of the active window on a Gtk desktop. It shows the current window title every half second, updating as the user switches between applications. The code uses the wnck library’s `screen_get_default()` and `get_active_window()` APIs to query window information, while Gtk’s `events_pending()` and `main_iteration()` keep the GUI event loop responsive. The output is a raw console stream of window names, with no visual rendering or data aggregation.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-6960581?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}