Add prof.get_current_window to Retrieve Current Window Title (API change) #35
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/api/get_current_window"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR introduces the
prof.get_current_windowAPI to the plugin interface, allowing plugins to retrieve the title of the currently active window as displayed in the titlebar. This addresses a key gap for context-aware plugins and is especially useful for plugin windows, where the title equals the tag used for API communication (e.g., in prof_win_show). Plugins use window tags to target operations like displaying messages. By retrieving the title, plugins can dynamically get the tag for the active plugin window and interact with it directly. Additionally, this PR suggests (but does not yet implement) extendingapi_win_showto support non-plugin window types, e.g., by falling back to cons_show if the tag matches a console window, for broader compatibility (including in forks like cproof).Changes
prof.get_current_window() -> strin the Python API, backed by the C function prof_get_current_window.prof.get_current_windowin the Python API reference, including special cases for MUC configuration and vCard windowschar* prof_get_current_window(void)to return the window titleWhy
title=tag, enabling dynamic communication via functions likeprof_win_show.Testing
Related Issue
Closes #34
Checklist:
valgrind).899f4eced8toe36f7d5964e36f7d5964to266f5aa046