feat(api): add get_current_window call

Add prof_get_current_window API to retrieve the title of the currently active window, matching the titlebar display.

The feature is especially useful to track currently used plugin window.
This commit is contained in:
2025-09-30 16:40:02 +02:00
parent 3738be4af1
commit 266f5aa046
8 changed files with 112 additions and 57 deletions

View File

@@ -54,6 +54,7 @@
#include "plugins/settings.h"
#include "plugins/disco.h"
#include "ui/ui.h"
#include "ui/win_types.h"
#include "ui/window_list.h"
#include "xmpp/roster_list.h"
@@ -205,6 +206,13 @@ api_get_current_recipient(void)
}
}
gchar*
api_get_current_window(void)
{
ProfWin* current = wins_get_current();
return win_get_title(current);
}
char*
api_get_current_muc(void)
{