### Example Plugin ID: Guifications Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_ids.md An example of a well-chosen plugin ID for the Guifications 2.x plugin, following the 'gtk-username-pluginname' format. ```text gtk-amc_grim-guifications ``` -------------------------------- ### Libpurple C Plugin Hello World Example Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/tut_c_plugins.md A basic 'Hello World' plugin demonstrating the essential functions required for a Libpurple C plugin. ```c #include static GPluginPluginInfo * hello_world_query(GError **error) { const gchar * const authors[] = { "Author Name ", NULL }; /* For specific notes on the meanings of each of these members, consult the C Plugin Howto on the website. */ return purple_plugin_info_new ( "name", "Hello World!", "version", VERSION, "category", "Example", "summary", "Hello World Plugin", "description", "Hello World Plugin", "authors", authors, "website", "http://helloworld.tld", "abi-version", PURPLE_ABI_VERSION, NULL ); } static gboolean hello_world_load(GPluginPlugin *plugin, GError **error) { purple_notify_message(plugin, PURPLE_NOTIFY_MSG_INFO, "Hello World!", "This is the Hello World! plugin :)", NULL, NULL, NULL, NULL); return TRUE; } static gboolean hello_world_unload(GPluginPlugin *plugin, gboolean shutdown, GError **error) { return TRUE; } GPLUGIN_NATIVE_PLUGIN_DECLARE(hello_world) ``` -------------------------------- ### Example Plugin ID: Album (Purple Plugin Pack) Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_ids.md An example of a plugin ID for the Album plugin, which originated before its inclusion in the Purple Plugin Pack. It follows the standard format with a username. ```text gtk-rlaager-album ``` -------------------------------- ### Example Plugin ID: IRC Helper (Purple Plugin Pack) Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_ids.md An example of a plugin ID for the IRC Helper plugin, which originated before its inclusion in the Purple Plugin Pack. It follows the standard format with a username. ```text core-rlaager-irchelper ``` -------------------------------- ### Check for intltool in autogen.sh Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Ensures that intltool is installed before proceeding with the build process. This script should be added to your plugin's autogen.sh. ```bash (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo; echo "You must have intltool installed to compile "; echo; exit; } ``` -------------------------------- ### buddy-typing Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when a buddy starts typing in a conversation window. It includes the account and the buddy's name. ```APIDOC ## buddy-typing ### Description Emitted when a buddy starts typing in a conversation window. ### Parameters * **account** (PurpleAccount *) - The account of the user which is typing. * **name** (const gchar *) - The name of the user which is typing. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### Configure intltool and gettext in configure.ac Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Sets up the build system to use intltool for translations and defines the gettext package name. These macros should be added to your configure.ac file. ```m4 AC_PROG_INTLTOOL GETTEXT_PACKAGE= AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used]) ALL_LINGUAS="" AM_GLIB_GNU_GETTEXT ``` -------------------------------- ### Initialize translation domain and set strings Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Sets up the text domain for translations and marks strings for translation within the plugin_load function. This ensures strings are correctly translated by libpurple. ```c bindtextdomain(GETTEXT_PACKAGE, PURPLE_LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); info.name = _(""); info.summary = _(""); info.description = _(""); ``` -------------------------------- ### Pidgin Connection 'signing-on' Signal Handler Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Use this signature for a handler connected to the 'signing-on' signal. This signal is emitted just before a connection signs on. ```c void user_function(PurpleConnection *gc, gpointer user_data); ``` -------------------------------- ### signing-on Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when a connection is about to sign on. ```APIDOC ## signing-on ### Description Emitted when a connection is about to sign on. ### Parameters * **gc** (PurpleConnection *) - The connection that is about to sign on. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### gtkblist-created Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/pidgin/signals_gtkblist.md Emitted when the buddy list is created. This signal allows for custom actions upon buddy list initialization. ```APIDOC ## gtkblist-created ### Description Emitted when the buddy list is created. ### Parameters #### Path Parameters - **blist** (PurpleBuddyList) - Description: The buddy list. - **user_data** (gpointer) - Description: User data set when the signal handler was connected. ``` -------------------------------- ### account-signed-on Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account successfully signs on. ```APIDOC ## account-signed-on ### Description Emitted when an account successfully signs on. ### Parameters * **account** (PurpleAccount *) - The account that signed on. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Update POT file with intltool-update Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Generates or updates the Portable Object Template (POT) file, which contains all translatable strings. Execute this command in the 'po' directory. ```bash intltool-update --pot ``` -------------------------------- ### online Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when the first connection has connected when all connections were previously not connected. ```APIDOC ## online ### Description Emitted when the first connection has connected when all connections were previously not connected. ### Parameters * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### Callback for Buddy Joining Chat (Pre-Update) Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Callback emitted when a buddy is joining a chat, before the user list updates. Can be used to hide the join event. ```c gboolean user_function(PurpleChatConversation *chat, const gchar *name, PurpleChatUserFlags flags, gpointer user_data); ``` -------------------------------- ### signed-on Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when a connection has signed on. ```APIDOC ## signed-on ### Description Emitted when a connection has signed on. ### Parameters * **gc** (PurpleConnection *) - The connection that has signed on. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-connecting Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md This is emitted when an account is in the process of connecting. ```APIDOC ## account-connecting ### Description This is emitted when an account is in the process of connecting. ### Parameters * **account** (PurpleAccount *) - The account in the process of connecting. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### buddy-signed-on Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddy successfully signs on to the service. ```APIDOC ## buddy-signed-on ### Description Emitted when a buddy on your buddy list signs on. ### Signal Signature ```c void user_function(PurpleBuddy *buddy, gpointer user_data); ``` ### Parameters * **buddy** (PurpleBuddy *) - The buddy that signed on. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### C: Account Created Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is created using purple_account_new. Use this to perform actions immediately after an account is initialized. ```c void user_function(PurpleAccount *account, gpointer user_data); ``` -------------------------------- ### gtkblist-created Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/pidgin/signals_gtkblist.md Emitted when the buddy list is created. Connect a callback function to handle this signal. ```c void user_function(PurpleBuddyList *blist, gpointer user_data); ``` -------------------------------- ### account-setting-info Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when a user is about to send his new user info, or profile, to the server. ```APIDOC ## account-setting-info ### Description Emitted when a user is about to send his new user info, or profile, to the server. ### Parameters * **account** (PurpleAccount *) - The account that the info will be set on. * **new_info** (const gchar *) - The new information to set. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### blist-node-extended-menu Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddylist menu is being constructed, allowing plugins to add menu items. ```APIDOC ## blist-node-extended-menu ### Description Emitted when a buddylist menu is being constructed. `menu` is a pointer to a GList of PurpleMenuAction's, allowing a plugin to add menu items. ### Signal Signature ```c void user_function(PurpleBlistNode *node, GList **menu, gpointer user_data); ``` ### Parameters * **node** (PurpleBlistNode *) - The buddylist node for which the menu is being constructed. * **menu** (GList **) - A pointer to a GList of PurpleMenuAction's to which new menu items can be added. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### Callback for Buddy Joined Chat (Post-Update) Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Callback emitted after a buddy has joined a chat and the user list has been updated. Provides details about the joining user. ```c void user_function(PurpleChatConversation *chat, const gchar *name, PurpleChatUserFlags flags, gboolean new_arrival, gpointer user_data); ``` -------------------------------- ### Pidgin Connection 'autojoin' Signal Handler Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Use this signature for a handler connected to the 'autojoin' signal. This signal is emitted after a connection signs on to prompt UIs to autojoin chats. Connect with PURPLE_SIGNAL_PRIORITY_HIGHEST. ```c gboolean user_function(PurpleConnection *gc, gpointer user_data); ``` -------------------------------- ### account-created Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is created by calling purple_account_new. ```APIDOC ## account-created ### Description Emitted when an account is created by calling purple_account_new. ### Parameters * **account** (PurpleAccount *) - The account. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Force intltoolize in autogen.sh Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Integrates intltool into the build system by forcing intltoolize. Add this line before the call to aclocal in your autogen.sh. ```bash intltoolize --force --copy ``` -------------------------------- ### account-added Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is added. ```APIDOC ## account-added ### Description Emitted when an account is added. ### Parameters * **account** (PurpleAccount *) - The account that was added. See `purple_accounts_add()`. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### account-set-info Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when a user sent his new user info, or profile, to the server. ```APIDOC ## account-set-info ### Description Emitted when a user sent his new user info, or profile, to the server. ### Parameters * **account** (PurpleAccount *) - The account that the info was set on. * **new_info** (const gchar *) - The new information set. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### account-signed-on Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account has successfully signed on. This signal is typically used to trigger actions after a successful account login. ```APIDOC ## account-signed-on ### Description Emitted when an account has signed on. This signal is typically used to trigger actions after a successful account login. ### Signal Signature ```c void user_function(PurpleAccount *account, gpointer user_data); ``` ### Parameters * **account** (PurpleAccount *) - The account that has signed on. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### account-enabled Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is enabled. ```APIDOC ## account-enabled ### Description Emitted when an account is enabled. ### Parameters * **account** (PurpleAccount *) - The account that was enabled. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Include gi18n-lib.h for translations Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Includes the necessary header for internationalization functions. This should be added to your plugin's source files, after config.h. ```c #include ``` -------------------------------- ### C: Account Setting Info Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted before new user information or profile data is sent to the server. Useful for validation or modification. ```c void user_function(PurpleAccount *account, const gchar *new_info, gpointer user_data); ``` -------------------------------- ### conversation-displayed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/pidgin/signals_gtkconv.md Emitted right after the Pidgin UI is attached to a new conversation. ```APIDOC ## conversation-displayed ### Description Emitted right after the Pidgin UI is attached to a new conversation. ### Parameters * **gtkconv** (PidginConversation *) - The PidginConversation. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### account-authorization-requested Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when authorization is requested for an account. ```APIDOC ## account-authorization-requested ### Description Emitted when authorization is requested for an account. ### Parameters * **account** (PurpleAccount *) - The account requesting authorization. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Add po directory to SUBDIRS in Makefile.am Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Includes the 'po' directory in the build process. Add 'po' to the SUBDIRS variable in your top-level Makefile.am. ```makefile SUBDIRS = po src ``` -------------------------------- ### Add po/Makefile.in to AC_OUTPUT Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Ensures that the translation Makefile is generated during the build process. Add 'po/Makefile.in' to the AC_OUTPUT command in configure.ac. ```m4 AC_OUTPUT([Makefile.in po/Makefile.in]) ``` -------------------------------- ### signing-off Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when a connection is about to sign off. ```APIDOC ## signing-off ### Description Emitted when a connection is about to sign off. ### Parameters * **gc** (PurpleConnection *) - The connection that is about to sign off. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-authorization-denied Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when authorization for an account is denied. ```APIDOC ## account-authorization-denied ### Description Emitted when authorization for an account is denied. ### Parameters * **account** (PurpleAccount *) - The account for which authorization was denied. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### account-actions-changed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when the account actions are changed after initial connection. ```APIDOC ## account-actions-changed ### Description Emitted when the account actions are changed after initial connection. ### Parameters * **account** (PurpleAccount *) - The account whose actions changed. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### chat-user-joining Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when a buddy is joining a chat, before the user list updates. Callbacks can hide the join by returning TRUE. ```APIDOC ## chat-user-joining ### Description Emitted when a buddy is joining a chat, before the list of users in the chat updates to include the new user. ### Parameters * **chat** (PurpleChatConversation *) - The chat conversation. * **name** (const gchar *) - The name of the user that is joining the conversation. * **flags** (PurpleChatUserFlags) - The flags of the user that is joining the conversation. * **user_data** (gpointer) - user data set when the signal handler was connected. ### Returns * `TRUE` if the join should be hidden, or `FALSE` otherwise. ``` -------------------------------- ### Plugin ID Format Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_ids.md The standard format for third-party plugin IDs is 'type-username-pluginname'. Ensure the type is one of the defined categories, the username is unique, and the plugin name is descriptive. Do not include spaces or version information. ```text type-username-pluginname ``` -------------------------------- ### Libpurple Notify User Info Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_notify.md Callback for when user info is about to be displayed. Allows manipulation of user info before it's shown to the UI. ```c void user_function(PurpleAccount *account, const gchar *who, PurpleNotifyUserInfo *user_info, gpointer user_data); ``` -------------------------------- ### displaying-userinfo Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_notify.md Emitted before userinfo is handed to the UI to display. The user_info can be manipulated via the PurpleNotifyUserInfo API. ```APIDOC ## displaying-userinfo ### Description Emitted before userinfo is handed to the UI to display. `user_info` can be manipulated via the PurpleNotifyUserInfo API in notify.c. > If adding a PurpleNotifyUserInfoEntry, be sure not to free it -- PurpleNotifyUserInfo assumes responsibility for its objects. ### Parameters * **account** (PurpleAccount *) - The account on which the info was obtained. * **who** (const gchar *) - The name of the buddy whose info is to be displayed. * **user_info** (PurpleNotifyUserInfo *) - The information to be displayed, as PurpleNotifyUserInfoEntry objects. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-signed-off Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account signs off. ```APIDOC ## account-signed-off ### Description Emitted when an account signs off. ### Parameters * **account** (PurpleAccount *) - The account that signed off. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### buddy-caps-changed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddy's media capabilities are updated. ```APIDOC ## buddy-caps-changed ### Description Emitted when updating a buddy's media capabilities. ### Signal Signature ```c void user_function(PurpleBuddy *buddy, PurpleMediaCaps newcaps, PurpleMediaCaps oldcaps, gpointer user_data); ``` ### Parameters * **buddy** (PurpleBuddy *) - The buddy whose capabilities are changing. * **newcaps** (PurpleMediaCaps) - The new media capabilities. * **oldcaps** (PurpleMediaCaps) - The old media capabilities. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-authorization-granted Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when authorization for an account is granted. ```APIDOC ## account-authorization-granted ### Description Emitted when authorization for an account is granted. ### Parameters * **account** (PurpleAccount *) - The account for which authorization was granted. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### account-connection-error Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account encounters a connection error. ```APIDOC ## account-connection-error ### Description Emitted when an account encounters a connection error. ### Parameters * **account** (PurpleAccount *) - The account that encountered a connection error. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### C Signal: chat-invited Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when an account receives an invitation to a chat. The return value determines acceptance or rejection; zero prompts the user. ```c gint user_function(PurpleAccount *account, const gchar *inviter, const gchar *chat, const gchar *invite_message, GHashTable *components, gpointer user_data); ``` -------------------------------- ### chat-inviting-user Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when a user is being invited to a chat. The callback can modify the invite message. ```APIDOC ## chat-inviting-user ### Description Emitted when a user is being invited to the chat. The callback can replace the invite message to the invitee by modifying the pointer to the invite message. ### Parameters * **chat** (PurpleChatConversation*) - The chat conversation. * **name** (const gchar*) - The name of the user being invited. * **invite_message** (gchar**) - A pointer to the reason why a user is being invited. Make sure to free `*invite_message` before you replace it! * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-destroying Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is about to be destroyed. ```APIDOC ## account-destroying ### Description Emitted when an account is about to be destroyed. ### Parameters * **account** (PurpleAccount *) - The account. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Core URI Handler Signal Callback Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_core.md Callback function signature for the 'core-uri-handler' signal. This signal is emitted when libpurple processes a registered URI. ```c gboolean user_function(const gchar *proto, const gchar *cmd, GHashTable *params, gpointer user_data); ``` -------------------------------- ### autojoin Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when a connection has signed on, after the signed-on signal, to signal UIs to autojoin chats if they wish. ```APIDOC ## autojoin ### Description Emitted when a connection has signed on, after the signed-on signal, to signal UIs to autojoin chats if they wish. UIs should connect to this with `PURPLE_SIGNAL_PRIORITY_HIGHEST` to allow plugins to block this signal before the UI sees it and then re-emit it later. ### Parameters * **gc** (PurpleConnection *) - The connection that has signed on. * **user_data** (gpointer) - user data set when the signal handler was connected. ### Returns `TRUE` if the signal was handled or `FALSE` otherwise. In practice, the return value is irrelevant, as it really only exists so plugins can block the UI's autojoin. ``` -------------------------------- ### Pidgin Connection 'connection-error' Signal Handler Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Use this signature for a handler connected to the 'connection-error' signal. This signal is emitted when a connection error occurs before the 'signed-off' signal. ```c void user_function(PurpleConnection *gc, PurpleConnectionError err, const gchar *desc, gpointer user_data); ``` -------------------------------- ### blist-node-extended-menu Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddylist menu is constructed. Allows plugins to add custom menu items by modifying the provided GList. ```c void user_function(PurpleBlistNode *node, GList **menu, gpointer user_data); ``` -------------------------------- ### quitting Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_core.md Emitted when libpurple is quitting. This signal allows users to perform cleanup actions before the library terminates. ```APIDOC ## quitting ### Description Emitted when libpurple is quitting. ### Parameters #### User Data - **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Mark strings for translation Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/plugin_i18n.md Uses the _() macro to mark strings for translation. This should be applied to all user-visible strings in your plugin's code. ```c info.name = _(""); ``` -------------------------------- ### Jabber Register Namespace Watcher Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_jabber.md Emit this signal to register for specific IQ stanzas to be emitted via the jabber-watched-iq signal. ```c void user_function(const gchar *node, const gchar *namespace, gpointer user_data) ``` -------------------------------- ### Account Connection Error Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when a connection error occurs before the account signs off. Provides the account, error code, error description, and user data. ```c void user_function(PurpleAccount *account, PurpleConnectionError err, const gchar *desc, gpointer user_data) ``` -------------------------------- ### Pidgin Conversation Displayed Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/pidgin/signals_gtkconv.md Emitted immediately after the Pidgin UI is associated with a new conversation. Useful for initializing UI elements specific to the newly displayed conversation. ```c void user_function(PidginConversation *gtkconv, gpointer user_data); ``` -------------------------------- ### Add Key Action Listener for Key Press Source: https://github.com/cacticouncil/pidgin/blob/main/doc/funniest_home_convos.txt This snippet demonstrates how to add a KeyActionListener to handle key press events, specifically checking for the UP_ARROW key to retrieve a history item. It appears to be a custom implementation for input handling. ```Java new KeyActionListener() onKeyPress() {if (event.geyKeyPresss().equals(Key.UP_ARROW) { inputbox.text = history.pop() }}}}}}}); ``` -------------------------------- ### buddy-icon-changed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddy's icon has been set or updated. ```APIDOC ## buddy-icon-changed ### Description Emitted when a buddy's icon is set or changed. ### Signal Signature ```c void user_function(PurpleBuddy *buddy, gpointer user_data); ``` ### Parameters * **buddy** (PurpleBuddy *) - The buddy whose icon changed. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### Core Quitting Signal Callback Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_core.md Callback function signature for the 'core-quitting' signal. This signal is emitted when libpurple is shutting down. ```c void user_function(gpointer user_data); ``` -------------------------------- ### Handle Incoming File Transfer Request Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_xfer.md Emitted before the user is prompted for an incoming file transfer. Plugins can intercept this signal to auto-accept or auto-reject requests. Use purple_xfer_request_accepted() to auto-accept or set the xfer status to PURPLE_XFER_STATUS_CANCEL_LOCAL to auto-reject. ```c void user_function(PurpleXfer *xfer, gpointer data); ``` -------------------------------- ### account-authorization-denied Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when the authorization request for a buddy is denied. This signal provides information about the denied request and the message to be sent to the denied user. ```APIDOC ## account-authorization-denied ### Description Emitted when the authorization request for a buddy is denied. This signal provides information about the denied request and the message to be sent to the denied user. ### Signal Signature ```c void user_function(PurpleAccount *account, const gchar *user, const gchar *message, gpointer user_data); ``` ### Parameters * **account** (PurpleAccount *) - The account. * **user** (const gchar *) - The name of the user requesting authorization. * **message** (const gchar *) - The message to tell the buddy who was denied. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### Callback for Buddy Typing Notification Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when a buddy begins typing in a conversation window. Provides the account and the buddy's name. ```c void user_function(PurpleAccount *account, const gchar *name, gpointer user_data); ``` -------------------------------- ### displaying-emails-notification Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_notify.md Emitted before notification of multiple emails is handed to the UI to display. ```APIDOC ## displaying-emails-notification ### Description Emitted before notification of multiple emails is handed to the UI to display. ### Parameters * **subjects** (const gchar **) - Subjects of emails being notified of. * **froms** (const gchar **) - Who the emails are from. * **tos** (const gchar **) - Who the emails are to. * **urls** (const gchar **) - The urls to view the emails. * **count** (guint) - Number of emails being notified of. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-connection-error Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when a connection error occurs on an account, prior to the account signing off. This signal provides details about the error and its description. ```APIDOC ## account-connection-error ### Description Emitted when a connection error occurs, before "signed"-off. This signal provides details about the error and its description. ### Signal Signature ```c void user_function(PurpleAccount *account, PurpleConnectionError err, const gchar *desc, gpointer user_data) ``` ### Parameters * **account** (PurpleAccount *) - The account on which the error has occurred. * **err** (PurpleConnectionError) - The error that occurred. * **desc** (const gchar *) - A description of the error, giving more information. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### drawing-tooltip Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/pidgin/signals_gtkblist.md Emitted just before a tooltip is displayed for a buddy list node. Plugins can modify the tooltip text. ```APIDOC ## drawing-tooltip ### Description Emitted just before a tooltip is displayed. `text` is a standard GString, so the plugin can modify the text that will be displayed. ### Parameters #### Path Parameters - **node** (PurpleBlistNode) - Description: The blist node for the tooltip. - **text** (GString) - Description: A pointer to the text that will be displayed. - **full** (gboolean) - Description: Whether we're doing a full tooltip for the priority buddy or a compact tooltip for a non-priority buddy. - **user_data** (gpointer) - Description: User data set when the signal handler was connected. ``` -------------------------------- ### conversation-extended-menu Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when the UI requests a list of plugin actions for a conversation. Provides the conversation, a list of actions, and user data. ```APIDOC ## conversation-extended-menu ### Description Emitted when the UI requests a list of plugin actions for a conversation. ### Parameters - **conv** (PurpleConversation*) - The conversation. - **list** (GList **) - A pointer to the list of actions. - **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### signed-off Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when a connection has signed off. ```APIDOC ## signed-off ### Description Emitted when a connection has signed off. ### Parameters * **gc** (PurpleConnection *) - The connection that has signed off. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### chat-invited Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when an account is invited to a chat. It provides details about the account, inviter, chat, and an optional invite message, along with components for joining. ```APIDOC ## chat-invited ### Description Emitted when an account was invited to a chat. ### Parameters * **account** (PurpleAccount*) - The account being invited. * **inviter** (const gchar*) - The username of the person inviting the account. * **chat** (const gchar*) - The name of the chat you're being invited to. * **invite_message** (const gchar*) - The optional invite message. * **components** (GHashTable*) - The components necessary if you want to call purple_serv_join_chat(). * **user_data** (gpointer) - user data set when the signal handler was connected. ### Returns Less than zero if the invitation should be rejected, greater than zero if the invitation should be accepted. If zero is returned, the default behavior will be maintained: the user will be prompted. ``` -------------------------------- ### chat-joined Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when an account joins a chat room. This signal provides information about the conversation and user data. ```APIDOC ## chat-joined ### Description Emitted when an account joins a chat room. ### Parameters - **chat** (PurpleChatConversation*) - The conversation that joined the chat room. - **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### jabber-register-namespace-watcher Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_jabber.md Emit this signal to register your desire to have specific IQ stanzas to be emitted via the jabber-watched-iq signal when received. ```APIDOC ## jabber-register-namespace-watcher ### Description Emit this signal to register your desire to have specific IQ stanzas to be emitted via the jabber-watched-iq signal when received. ### Parameters * **node** (const gchar *) - The IQ child name to longer watch. * **namespace** (const gchar *) - The IQ child namespace to longer watch. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### chat-user-joined Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when a buddy joined a chat, after the user list has been updated. It includes chat, user name, flags, and arrival status. ```APIDOC ## chat-user-joined ### Description Emitted when a buddy joined a chat, after the users list is updated. ### Parameters * **chat** (PurpleChatConversation *) - The chat conversation. * **name** (const gchar *) - The name of the user that has joined the conversation. * **flags** (PurpleChatUserFlags) - The flags of the user that has joined the conversation. * **new_arrival** (gboolean) - If the buddy is a new arrival. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-removed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is removed. ```APIDOC ## account-removed ### Description Emitted when an account is removed. ### Parameters * **account** (PurpleAccount *) - The account that was removed. See `purple_accounts_remove()`. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### C Signal: chat-inviting-user Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when a user is about to be invited to a chat. The callback can modify the invite message. Remember to free the original message if replacing it. ```c void user_function(PurpleChatConversation *chat, const gchar *name, gchar **invite_message, gpointer user_data); ``` -------------------------------- ### buddy-signed-on Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddy signs on to the service. Use this to update UI elements or perform actions when a contact becomes available. ```c void user_function(PurpleBuddy *buddy, gpointer user_data); ``` -------------------------------- ### connection-error Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when a connection error occurs, before "signed"-off. ```APIDOC ## connection-error ### Description Emitted when a connection error occurs, before "signed"-off. ### Parameters * **gc** (PurpleConnection *) - The connection on which the error has occurred. * **err** (PurpleConnectionError) - The error that occurred. * **desc** (const gchar *) - A description of the error, giving more information. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### ui-caps-changed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when the media capabilities of the user interface are updated. ```APIDOC ## ui-caps-changed ### Description Emitted when updating the media capabilities of the UI. ### Signal Signature ```c void user_function(PurpleMediaCaps newcaps, PurpleMediaCaps oldcaps, gpointer user_data); ``` ### Parameters * **newcaps** (PurpleMediaCaps) - The new media capabilities of the UI. * **oldcaps** (PurpleMediaCaps) - The old media capabilities of the UI. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-authorization-granted Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when the authorization request for a buddy is granted. This signal informs about a granted authorization request and the message to be sent to the authorized user. ```APIDOC ## account-authorization-granted ### Description Emitted when the authorization request for a buddy is granted. This signal informs about a granted authorization request and the message to be sent to the authorized user. ### Signal Signature ```c void user_function(PurpleAccount *account, const gchar *user, const gchar *message, gpointer user_data); ``` ### Parameters * **account** (PurpleAccount *) - The account. * **user** (const gchar *) - The name of the user requesting authorization. * **message** (const gchar *) - The message to tell the buddy who was granted authorization. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### chat-invited-user Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when one user invites another user to a chat. It includes the conversation, the invited user's name, and the invite message. ```APIDOC ## chat-invited-user ### Description Emitted when a user invited another user to a chat. ### Parameters * **conv** (PurpleChatConversation*) - The chat conversation. * **name** (const gchar*) - The name of the user that was invited. * **invite_message** (const gchar*) - The message to be sent to the user when invited. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### account-authorization-requested Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when a user requests authorization. This signal allows handling authorization requests, including specifying a response message. ```APIDOC ## account-authorization-requested ### Description Emitted when a user requests authorization. This signal allows handling authorization requests, including specifying a response message. ### Signal Signature ```c int user_function(PurpleAccount *account, const gchar *user, const gchar *message, gchar **response, gpointer user_data); ``` ### Parameters * **account** (PurpleAccount *) - The account. * **user** (const gchar *) - The name of the user requesting authorization. * **message** (const gchar *) - The authorization request message. * **response** (gchar **) - The message to send in the response. * **user_data** (gpointer) - User data set when the signal handler was connected. ### Return Values * **PURPLE_ACCOUNT_RESPONSE_IGNORE** - To silently ignore the request. * **PURPLE_ACCOUNT_RESPONSE_DENY** - To block the request (the sender might get informed). * **PURPLE_ACCOUNT_RESPONSE_ACCEPT** - If the request should be granted. * **PURPLE_ACCOUNT_RESPONSE_PASS** - The user will be prompted with the request. ``` -------------------------------- ### update-idle Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when the buddy list is refreshed and idle times are updated. ```APIDOC ## update-idle ### Description Emitted when the buddy list is refreshed and the idle times are updated. ### Signal Signature ```c void user_function(gpointer user_data); ``` ### Parameters * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### Callback for Writing Chat Messages Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted before a message is written in a chat conversation. The callback can modify the message before it is displayed and logged. Ensure to free the original message pointer if replacing it. ```c gboolean user_function(PurpleAccount *account, const gchar *who, gchar **message, PurpleChatConversation *chat, PurpleMessageFlags flags, gpointer user_data); ``` -------------------------------- ### buddy-signed-off Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddy signs off from the service. ```APIDOC ## buddy-signed-off ### Description Emitted when a buddy on your buddy list signs off. ### Signal Signature ```c void user_function(PurpleBuddy *buddy, gpointer user_data); ``` ### Parameters * **buddy** (PurpleBuddy *) - The buddy that signed off. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### blist-node-added Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a new buddylist node (buddy, chat, or contact) is added to the buddy list. ```APIDOC ## blist-node-added ### Description Emitted when a new blist node is added to the buddy list. ### Signal Signature ```c void user_function(PurpleBlistNode *node, gpointer user_data); ``` ### Parameters * **node** (PurpleBlistNode *) - The new blist node that was added. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### offline Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_connection.md Emitted when the last connected connection has disconnected. ```APIDOC ## offline ### Description Emitted when the last connected connection has disconnected. ### Parameters * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### blist-node-added Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a new node is added to the buddy list. Use this to perform actions when a new buddy, chat, or contact is added. ```c void user_function(PurpleBlistNode *node, gpointer user_data); ``` -------------------------------- ### C Signal: chat-invite-blocked Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when an invitation to join a chat is blocked. It includes details about the account, inviter, chat name, message, and associated data. ```c void user_function(PurpleAccount *account, const gchar *inviter, const gchar *name, const gchar *message, GHashTable *data); ``` -------------------------------- ### uri-handler Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_core.md Emitted when handling a registered URI. This signal is used to process URIs that have been registered with libpurple. ```APIDOC ## uri-handler ### Description Emitted when handling a registered URI. ### Parameters #### Protocol - **proto** (const gchar *) - The protocol of the URI. #### Command - **cmd** (const gchar *) - The 'command' of the URI. #### Parameters - **params** (GHashTable *) - Any key/value parameters from the URI. #### User Data - **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### chat-join-failed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when an account fails to join a chat room. It provides information about the connection and the original data used for joining. ```APIDOC ## chat-join-failed ### Description Emitted when an account fails to join a chat room. ### Parameters * **gc** (PurpleConnection*) - The PurpleConnection of the account which failed to join the chat. * **components** (GHashTable*) - The components passed to purple_serv_join_chat() originally. The hash function should be g_str_hash() and the equal function should be g_str_equal(). * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### chat-invite-blocked Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when an invitation to join a chat is blocked. It includes the account, inviter, chat name, message, and associated data. ```APIDOC ## chat-invite-blocked ### Description Emitted when an invitation to join a chat is blocked. ### Parameters * **account** (PurpleAccount*) - The account the invitation was sent to. * **inviter** (const gchar*) - The name of the person sending the invitation. * **name** (const gchar*) - The name of the chat invited to. * **message** (const gchar*) - The invitation message sent. * **data** (GHashTable*) - Hashtable containing data about the invited chat. ``` -------------------------------- ### Callback for Sending Chat Messages Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted before sending a message to a chat. The callback can modify the message string before it is sent. Ensure to free the original message pointer if replacing it. ```c void user_function(PurpleAccount *account, gchar **message, gint id, gpointer user_data); ``` -------------------------------- ### account-disabled Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when an account is disabled. ```APIDOC ## account-disabled ### Description Emitted when an account is disabled. ### Parameters * **account** (PurpleAccount *) - The account that was disabled. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### displaying-email-notification Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_notify.md Emitted before notification of a single email is handed to the UI to display. ```APIDOC ## displaying-email-notification ### Description Emitted before notification of a single email is handed to the UI to display. ### Parameters * **subject** (const gchar *) - Subject of email being notified of. * **from** (const gchar *) - Who the email is from. * **to** (const gchar *) - Who the email is to. * **url** (const gchar *) - A url to view the email. * **user_data** (gpointer) - user data set when the signal handler was connected. ``` -------------------------------- ### C Signal: chat-invited-user Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when one user invites another to a chat. It provides the conversation, the invited user's name, and the invite message. ```c void user_function(PurpleChatConversation *conv, const gchar *name, const gchar *invite_message, gpointer user_data); ``` -------------------------------- ### buddy-caps-changed Signal Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_blist.md Emitted when a buddy's media capabilities are updated. Use this to determine what media features a buddy supports. ```c void user_function(PurpleBuddy *buddy, PurpleMediaCaps newcaps, PurpleMediaCaps oldcaps, gpointer user_data); ``` -------------------------------- ### account-alias-changed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when the alias of an account changes (after the change). ```APIDOC ## account-alias-changed ### Description Emitted when the alias of an account changes (after the change). ### Parameters * **account** (PurpleAccount *) - The account for which the alias was changed. * **old** (const gchar *) - The alias before change. * **user_data** (gpointer) - User data set when the signal handler was connected. ``` -------------------------------- ### C Signal: chat-join-failed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Emitted when an account fails to join a chat room. This signal provides the connection object and original components passed to the join function. ```c void user_function(PurpleConnection *gc, GHashTable *components, gpointer user_data); ``` -------------------------------- ### Callback for Conversation Update Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_conversation.md Signal emitted when a conversation's properties are updated. The callback receives the conversation, the type of update, and user data. ```c void user_function(PurpleConversation *conv, PurpleConvUpdateType type, gpointer user_data); ``` -------------------------------- ### cmd-added Signal Signature Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_cmd.md Signature for the signal emitted when a new command is added. It includes the command name, priority, flags, and user data. ```c void user_function(const gchar *command, PurpleCmdPriority priority, PurpleCmdFlag flag, gpointer user_data); ``` -------------------------------- ### account-status-changed Source: https://github.com/cacticouncil/pidgin/blob/main/doc/reference/libpurple/signals_account.md Emitted when the status of an account changes (after the change). ```APIDOC ## account-status-changed ### Description Emitted when the status of an account changes (after the change). ### Parameters * **account** (PurpleAccount *) - The account that changed status. * **old** (PurpleStatus *) - The status before change. * **new** (PurpleStatus *) - The status after change. * **user_data** (gpointer) - User data set when the signal handler was connected. ```