• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PURPLE_CALLBACK函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PURPLE_CALLBACK函数的典型用法代码示例。如果您正苦于以下问题:C++ PURPLE_CALLBACK函数的具体用法?C++ PURPLE_CALLBACK怎么用?C++ PURPLE_CALLBACK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PURPLE_CALLBACK函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:rgenoud,项目名称:purple-plugin-pack,代码行数:18,代码来源:splitter.c


示例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;
}
开发者ID:bf4,项目名称:pidgin-mac,代码行数:17,代码来源:gntgf.c


示例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;
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:46,代码来源:winprefs.c


示例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);

}
开发者ID:42ShadowsofAMan,项目名称:libpurple-android,代码行数:17,代码来源:PurpleAccountManager.c


示例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;
}
开发者ID:ArmoredPidgin,项目名称:pidgin-hardened,代码行数:17,代码来源:pidgininc.c


示例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;
}
开发者ID:Javran,项目名称:purple-plugin-pack,代码行数:8,代码来源:enhancedhist.c


示例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;
}
开发者ID:pcomputo,项目名称:Pidgin-plugins,代码行数:8,代码来源:sending-option.c


示例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;
}
开发者ID:strelok1111,项目名称:purple_ruby,代码行数:8,代码来源:purple_ruby.c


示例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;
}
开发者ID:Javran,项目名称:purple-plugin-pack,代码行数:26,代码来源:translate.c


示例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;
}
开发者ID:interskh,项目名称:Recent-Contacts-Plugin-for-Pidgin,代码行数:18,代码来源:recent_contacts.c


示例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 ;
}
开发者ID:jearls,项目名称:akaplugin,代码行数:12,代码来源:akaplugin.c


示例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);

}
开发者ID:saljs,项目名称:sndmsg,代码行数:9,代码来源:message.c


示例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);
}
开发者ID:KimCM,项目名称:Heliotrope,代码行数:10,代码来源:purple.c


示例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;
}
开发者ID:RebornSoldier,项目名称:Pidgin-Buzz-Autoreply,代码行数:10,代码来源:buzz_resp.c


示例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;
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:58,代码来源:unity.c


示例16: plugin_load

/* calling when plugin load */
static gboolean plugin_load(PurplePlugin *plugin)
{


	void *gtk_blist_handle = pidgin_blist_get_handle();
	
	purple_signal_connect(gtk_blist_handle, "drawing-tooltip", plugin, PURPLE_CALLBACK(gtk_buddy_tooltip), NULL);

	return TRUE;
}
开发者ID:munhyunsu,项目名称:pidgin_plugin_lol_chat,代码行数:11,代码来源:lol_chat_1.01b.c


示例17: plugin_unload

static gboolean plugin_unload(PurplePlugin *plugin)
{
	void *conv_handle;
	struct crazychat *extra;
	assert(plugin);
	extra = (struct crazychat*) plugin->info->extra_info;
	cc_destroy(extra);
	conv_handle = purple_conversations_get_handle();
	purple_signal_disconnect(PIDGIN_BLIST
			       (purple_get_blist()),
			       "drawing-menu", plugin,
			       PURPLE_CALLBACK(cc_buddy_menu));
	purple_signal_disconnect(conv_handle, "received-im", plugin,
			       PURPLE_CALLBACK(receive_im_cb));
	purple_signal_disconnect(conv_handle, "displaying-im-msg", plugin,
			       PURPLE_CALLBACK(display_im_cb));
	Debug("CrazyChat plugin unloaded.\n");
	return TRUE;
}
开发者ID:dylex,项目名称:pidgin,代码行数:19,代码来源:cc_pidgin_plugin.c


示例18: conv_menu_cb

static void
conv_menu_cb(PurpleConversation *conv, GList **list)
{
	PurpleConversationType type = purple_conversation_get_type(conv);
	gboolean enabled = ((type == PURPLE_CONV_TYPE_IM && purple_prefs_get_bool(PREF_IMS)) ||
		(type == PURPLE_CONV_TYPE_CHAT && purple_prefs_get_bool(PREF_CHATS)));
	PurpleMenuAction *action = purple_menu_action_new(_("Jump to markerline"),
			enabled ? PURPLE_CALLBACK(jump_to_markerline) : NULL, NULL, NULL);
	*list = g_list_append(*list, action);
}
开发者ID:gotomypc,项目名称:pidgin_whiteboard,代码行数:10,代码来源:markerline.c


示例19: set_chat_buddy_left

void set_chat_buddy_left(PurplePlugin *plugin, PyObject *func) {
  static PyObject *chat_buddy_left_cb = 0;

  Py_XINCREF(func);
  Py_XDECREF(chat_buddy_left_cb);
  chat_buddy_left_cb = func;

  purple_signal_connect(purple_conversations_get_handle(), "chat-buddy-left",
    plugin, PURPLE_CALLBACK(chat_buddy_left), chat_buddy_left_cb);
}
开发者ID:KimCM,项目名称:Heliotrope,代码行数:10,代码来源:purple.c


示例20: plugin_load

static gboolean plugin_load(PurplePlugin *plugin, GError **error) {

	purple_prefs_add_none("/plugins/gtk/win32");
	purple_prefs_add_none("/plugins/gtk/win32/wintrans");
	purple_prefs_add_bool(OPT_WINTRANS_IM_ENABLED, FALSE);
	purple_prefs_add_int(OPT_WINTRANS_IM_ALPHA, 255);
	purple_prefs_add_bool(OPT_WINTRANS_IM_SLIDER, FALSE);
	purple_prefs_add_bool(OPT_WINTRANS_IM_ONFOCUS, FALSE);
	purple_prefs_add_bool(OPT_WINTRANS_IM_ONTOP, FALSE);
	purple_prefs_add_bool(OPT_WINTRANS_BL_ENABLED, FALSE);
	purple_prefs_add_int(OPT_WINTRANS_BL_ALPHA, 255);
	purple_prefs_add_bool(OPT_WINTRANS_BL_ONFOCUS, FALSE);
	purple_prefs_add_bool(OPT_WINTRANS_BL_ONTOP, FALSE);

	purple_signal_connect(purple_conversations_get_handle(),
		"conversation-created", plugin,
		PURPLE_CALLBACK(new_conversation_cb), NULL);

	/* Set callback to remove window from the list, if the window is destroyed */
	purple_signal_connect(purple_conversations_get_handle(),
		"deleting-conversation", plugin,
		PURPLE_CALLBACK(conversation_delete_cb), NULL);

	purple_signal_connect(pidgin_conversations_get_handle(),
		"conversation-dragging", plugin,
		PURPLE_CALLBACK(set_conv_window_trans), NULL);

	purple_signal_connect(purple_conversations_get_handle(),
		"conversation-updated", plugin,
		PURPLE_CALLBACK(conv_updated_cb), NULL);

	update_existing_convs();

	if (blist)
		blist_created_cb(NULL, NULL);
	else
		purple_signal_connect(pidgin_blist_get_handle(),
			"gtkblist-created", plugin,
			PURPLE_CALLBACK(blist_created_cb), NULL);


	return TRUE;
}
开发者ID:N8Fear,项目名称:purple-facebook,代码行数:43,代码来源:win2ktrans.c



注:本文中的PURPLE_CALLBACK函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PURPLE_CONV_CHAT函数代码示例发布时间:2022-05-30
下一篇:
C++ PUNTOEXE_FUNCTION_START函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap