about summary refs log tree commit diff stats
path: root/src/plugins/c_plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/c_plugins.c')
-rw-r--r--src/plugins/c_plugins.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/c_plugins.c b/src/plugins/c_plugins.c
index 2c555689..fb99765f 100644
--- a/src/plugins/c_plugins.c
+++ b/src/plugins/c_plugins.c
@@ -105,6 +105,7 @@ c_plugin_create(const char *const filename)
     plugin->on_iq_stanza_receive = c_on_iq_stanza_receive_hook;
     plugin->on_contact_offline = c_on_contact_offline_hook;
     plugin->on_contact_presence = c_on_contact_presence_hook;
+    plugin->on_chat_win_focus = c_on_chat_win_focus_hook;
 
     g_string_free(path, TRUE);
     g_free(module_name);
@@ -473,6 +474,20 @@ c_on_contact_presence_hook(ProfPlugin *plugin, const char *const barejid, const
 }
 
 void
+c_on_chat_win_focus_hook(ProfPlugin *plugin, const char *const barejid)
+{
+    void *f = NULL;
+    void (*func)(const char *const __barejid);
+    assert(plugin && plugin->module);
+
+    if (NULL == (f = dlsym(plugin->module, "prof_on_chat_win_focus")))
+        return;
+
+    func = (void (*)(const char *const))f;
+    func(barejid);
+}
+
+void
 c_plugin_destroy(ProfPlugin *plugin)
 {
     assert (plugin && plugin->module);