本文整理汇总了C++中PURPLE_CALLBACK函数的典型用法代码示例。如果您正苦于以下问题:C++ PURPLE_CALLBACK函数的具体用法?C++ PURPLE_CALLBACK怎么用?C++ PURPLE_CALLBACK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PURPLE_CALLBACK函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: plugin_load
/* register "sending" message signal callback */
static gboolean
plugin_load(PurplePlugin *plugin) {
purple_signal_connect_priority(purple_conversations_get_handle(),
"sending-im-msg",
plugin,
PURPLE_CALLBACK(sending_im_msg_cb),
NULL,
PURPLE_SIGNAL_PRIORITY_HIGHEST);
purple_signal_connect_priority(purple_conversations_get_handle(),
"sending-chat-msg",
plugin,
PURPLE_CALLBACK(sending_chat_msg_cb),
NULL,
PURPLE_SIGNAL_PRIORITY_HIGHEST);
return TRUE;
}
示例2: plugin_load
static gboolean
plugin_load(PurplePlugin *plugin)
{
purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", plugin,
PURPLE_CALLBACK(buddy_signed_on), NULL);
purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", plugin,
PURPLE_CALLBACK(buddy_signed_off), NULL);
purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", plugin,
PURPLE_CALLBACK(received_im_msg), NULL);
purple_signal_connect(purple_conversations_get_handle(), "received-chat-msg", plugin,
PURPLE_CALLBACK(received_chat_msg), NULL);
memset(&gpsy, 0, sizeof(gpsy));
memset(&gpsw, 0, sizeof(gpsw));
return TRUE;
}
示例3: plugin_load
static gboolean plugin_load(PurplePlugin *plugin, GError **error) {
purple_prefs_add_none("/plugins/gtk");
purple_prefs_add_none("/plugins/gtk/win32");
purple_prefs_add_none("/plugins/gtk/win32/winprefs");
purple_prefs_add_bool(PREF_DBLIST_DOCKABLE, FALSE);
purple_prefs_add_bool(PREF_DBLIST_DOCKED, FALSE);
purple_prefs_add_int(PREF_DBLIST_HEIGHT, 0);
purple_prefs_add_int(PREF_DBLIST_SIDE, 0);
/* Convert old preferences */
if(purple_prefs_exists(PREF_DBLIST_ON_TOP)) {
gint blist_top = BLIST_TOP_NEVER;
if(purple_prefs_get_bool(PREF_BLIST_ON_TOP))
blist_top = BLIST_TOP_ALWAYS;
else if(purple_prefs_get_bool(PREF_DBLIST_ON_TOP))
blist_top = BLIST_TOP_DOCKED;
purple_prefs_remove(PREF_BLIST_ON_TOP);
purple_prefs_remove(PREF_DBLIST_ON_TOP);
purple_prefs_add_int(PREF_BLIST_ON_TOP, blist_top);
} else
purple_prefs_add_int(PREF_BLIST_ON_TOP, BLIST_TOP_NEVER);
purple_prefs_remove(PREF_CHAT_BLINK);
handle = plugin;
/* blist docking init */
if(purple_blist_get_buddy_list() && PIDGIN_BLIST(purple_blist_get_buddy_list())
&& PIDGIN_BLIST(purple_blist_get_buddy_list())->window) {
blist_create_cb(purple_blist_get_buddy_list(), NULL);
}
/* This really shouldn't happen anymore generally, but if for some strange
reason, the blist is recreated, we need to set it up again. */
purple_signal_connect(pidgin_blist_get_handle(), "gtkblist-created",
plugin, PURPLE_CALLBACK(blist_create_cb), NULL);
purple_signal_connect((void*)purple_get_core(), "quitting", plugin,
PURPLE_CALLBACK(purple_quit_cb), NULL);
purple_prefs_connect_callback(handle, PREF_BLIST_ON_TOP,
winprefs_set_blist_ontop, NULL);
purple_prefs_connect_callback(handle, PREF_DBLIST_DOCKABLE,
winprefs_set_blist_dockable, NULL);
return TRUE;
}
示例4: Java_im_pidgin_jpurple_account_PurpleAccountManager_register_1native
*/JNIEXPORT void JNICALL
Java_im_pidgin_jpurple_account_PurpleAccountManager_register_1native(
JNIEnv *env, jobject obj)
{
setJavaObject(&accountList, env, obj);
purple_accounts_set_ui_ops(&uiOps);
purple_signal_connect(purple_accounts_get_handle(), "account-added",
&accountList, PURPLE_CALLBACK(account_added_callback), NULL);
purple_signal_connect(purple_accounts_get_handle(), "account-removed",
&accountList, PURPLE_CALLBACK(account_removed_callback), NULL);
purple_signal_connect(purple_accounts_get_handle(), "account-disabled",
&accountList, PURPLE_CALLBACK(account_abled_callback), NULL);
purple_signal_connect(purple_accounts_get_handle(), "account-enabled",
&accountList, PURPLE_CALLBACK(account_abled_callback), NULL);
}
示例5: plugin_load
static gboolean
plugin_load(PurplePlugin *plugin)
{
/* this is for doing something fun when we sign on */
purple_signal_connect(purple_connections_get_handle(), "signed-on",
plugin, PURPLE_CALLBACK(echo_hi), NULL);
/* this is for doing something fun when we get a message */
purple_signal_connect(purple_conversations_get_handle(), "receiving-im-msg",
plugin, PURPLE_CALLBACK(reverse), NULL);
/* this is for doing something fun when a buddy comes online */
purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on",
plugin, PURPLE_CALLBACK(bud), NULL);
return TRUE;
}
示例6: plugin_load
static gboolean
plugin_load(PurplePlugin *plugin)
{
purple_signal_connect(purple_conversations_get_handle(),
"conversation-created", plugin, PURPLE_CALLBACK(historize), NULL);
return TRUE;
}
示例7: plugin_load
static gboolean
plugin_load (PurplePlugin * plugin)
{
purple_signal_connect(purple_blist_get_handle(), "blist-node-extended-menu",
plugin, PURPLE_CALLBACK(extended_menu_cb), NULL);
return TRUE;
}
示例8: watch_signed_off_event
static VALUE watch_signed_off_event(VALUE self)
{
set_callback(&signed_off_handler, "signed_off_handler");
int handle;
purple_signal_connect(purple_connections_get_handle(), "signed-off", &handle,
PURPLE_CALLBACK(signed_off), NULL);
return signed_off_handler;
}
示例9: plugin_unload
static gboolean
plugin_unload(PurplePlugin *plugin)
{
purple_signal_disconnect(purple_conversations_get_handle(),
"receiving-im-msg", plugin,
PURPLE_CALLBACK(translate_receiving_im_msg));
purple_signal_disconnect(purple_conversations_get_handle(),
"sending-im-msg", plugin,
PURPLE_CALLBACK(translate_sending_im_msg));
purple_signal_disconnect(purple_blist_get_handle(),
"blist-node-extended-menu", plugin,
PURPLE_CALLBACK(translate_blist_extended_menu));
purple_signal_disconnect(purple_conversations_get_handle(),
"blist-node-extended-menu", plugin,
PURPLE_CALLBACK(translate_conv_extended_menu));
purple_signal_disconnect(purple_conversations_get_handle(),
"conversation-created", plugin,
PURPLE_CALLBACK(translate_conversation_created));
purple_signal_disconnect(purple_conversations_get_handle(),
"receiving-chat-msg", plugin,
PURPLE_CALLBACK(translate_receiving_chat_msg));
purple_signal_disconnect(purple_conversations_get_handle(),
"sending-chat-msg", plugin,
PURPLE_CALLBACK(translate_sending_chat_msg));
return TRUE;
}
示例10: plugin_load
static gboolean
plugin_load (PurplePlugin * plugin)
{
trace("plugin loading");
recent_contacts_plugin = plugin; /* assign this here so we have a
valid handle later */
g_size = purple_prefs_get_int(PREF_SIZE);
void *handle = purple_prefs_get_handle();
purple_prefs_connect_callback(handle, PREF_SIZE, pref_size_on_change, NULL);
void *conv_handle = purple_conversations_get_handle();
purple_signal_connect(conv_handle, "conversation-created", plugin,
PURPLE_CALLBACK(rc_at_conversation_event), NULL);
purple_signal_connect(conv_handle, "deleting-conversation", plugin,
PURPLE_CALLBACK(rc_at_conversation_event), NULL);
return TRUE;
}
示例11: connect_signals
/* Connects signal handlers used by the plugin.
* Currently, this consists of only the receiving-chat-msg signal.
*/
static void
connect_signals(PurplePlugin *plugin) {
/* The conversation handle is used for conversation-related signals */
void *conv_handle = purple_conversations_get_handle() ;
/* Register the receiving-chat-msg signal handler */
purple_signal_connect(conv_handle, "receiving-chat-msg", plugin, PURPLE_CALLBACK(receiving_chat_msg_cb), NULL) ;
/* Done, nothing to return */
return ;
}
示例12: connect_to_signals
static void connect_to_signals(void)
{
static int handle;
purple_signal_connect(purple_connections_get_handle(), "signed-on", &handle,
PURPLE_CALLBACK(signed_on), NULL);
}
示例13: set_displaying_userinfo
void set_displaying_userinfo(PurplePlugin *plugin, PyObject *func) {
static PyObject *displaying_userinfo_cb = 0;
Py_XINCREF(func);
Py_XDECREF(displaying_userinfo_cb);
displaying_userinfo_cb = func;
purple_signal_connect(purple_notify_get_handle(), "displaying-userinfo",
plugin, PURPLE_CALLBACK(displaying_userinfo), displaying_userinfo_cb);
}
示例14: plugin_load
static gboolean plugin_load(PurplePlugin *plugin) {
void *conv = purple_conversations_get_handle();
buzz_plugin = plugin;
//Connect attention signal to our callback function
purple_signal_connect( conv, "got-attention", buzz_plugin, PURPLE_CALLBACK(buzz_cb), NULL );
return TRUE;
}
示例15: plugin_load
static gboolean
plugin_load(PurplePlugin *plugin, GError **error)
{
GList *convs = purple_conversations_get_all();
PurpleSavedStatus *saved_status;
void *conv_handle = purple_conversations_get_handle();
void *gtk_conv_handle = pidgin_conversations_get_handle();
void *savedstat_handle = purple_savedstatuses_get_handle();
purple_prefs_add_none("/plugins/gtk");
purple_prefs_add_none("/plugins/gtk/unity");
purple_prefs_add_int("/plugins/gtk/unity/launcher_count", LAUNCHER_COUNT_SOURCES);
purple_prefs_add_int("/plugins/gtk/unity/messaging_menu_text", MESSAGING_MENU_COUNT);
purple_prefs_add_bool("/plugins/gtk/unity/alert_chat_nick", TRUE);
alert_chat_nick = purple_prefs_get_bool("/plugins/gtk/unity/alert_chat_nick");
mmapp = messaging_menu_app_new("pidgin.desktop");
g_object_ref(mmapp);
messaging_menu_app_register(mmapp);
messaging_menu_text = purple_prefs_get_int("/plugins/gtk/unity/messaging_menu_text");
g_signal_connect(mmapp, "activate-source",
G_CALLBACK(message_source_activated), NULL);
g_signal_connect(mmapp, "status-changed",
G_CALLBACK(messaging_menu_status_changed), NULL);
saved_status = purple_savedstatus_get_current();
status_changed_cb(saved_status);
purple_signal_connect(savedstat_handle, "savedstatus-changed", plugin,
PURPLE_CALLBACK(status_changed_cb), NULL);
launcher = unity_launcher_entry_get_for_desktop_id("pidgin.desktop");
g_object_ref(launcher);
launcher_count = purple_prefs_get_int("/plugins/gtk/unity/launcher_count");
purple_signal_connect(gtk_conv_handle, "displayed-im-msg", plugin,
PURPLE_CALLBACK(message_displayed_cb), NULL);
purple_signal_connect(gtk_conv_handle, "displayed-chat-msg", plugin,
PURPLE_CALLBACK(message_displayed_cb), NULL);
purple_signal_connect(conv_handle, "sent-im-msg", plugin,
PURPLE_CALLBACK(im_sent_im), NULL);
purple_signal_connect(conv_handle, "sent-chat-msg", plugin,
PURPLE_CALLBACK(chat_sent_im), NULL);
purple_signal_connect(conv_handle, "conversation-created", plugin,
PURPLE_CALLBACK(conv_created), NULL);
purple_signal_connect(conv_handle, "deleting-conversation", plugin,
PURPLE_CALLBACK(deleting_conv), NULL);
while (convs) {
PurpleConversation *conv = (PurpleConversation *)convs->data;
attach_signals(conv);
convs = convs->next;
}
return TRUE;
}