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

C++ signal_add_first函数代码示例

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

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



在下文中一共展示了signal_add_first函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: event_command

static void event_command(const char *data)
{
    const char *cmdchar;

    /* save current command line */
    current_cmdline = data;

    /* for detecting if we're pasting text */
    time_command_last = time_command_now;
    last_command_cmd = command_cmd;

    g_get_current_time(&time_command_now);
    command_cmd = *data != '\0' &&
                  strchr(settings_get_str("cmdchars"), *data) != NULL;

    /* /^command hides the output of the command */
    cmdchar = *data == '\0' ? NULL :
              strchr(settings_get_str("cmdchars"), *data);
    if (cmdchar != NULL && (data[1] == '^' ||
                            (data[1] == *cmdchar && data[2] == '^'))
            && !command_hide_output++) {
        signal_add_first("print starting", (SIGNAL_FUNC) sig_stop);
        signal_add_first("print format", (SIGNAL_FUNC) sig_stop);
        signal_add_first("print text", (SIGNAL_FUNC) sig_stop);
    }
}
开发者ID:NChief,项目名称:irssi,代码行数:26,代码来源:fe-core-commands.c


示例2: netsplit_init

void netsplit_init(void)
{
	split_tag = g_timeout_add(1000, (GSourceFunc) split_check_old, NULL);
	signal_add_first("event join", (SIGNAL_FUNC) event_join);
	signal_add_first("event quit", (SIGNAL_FUNC) event_quit);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected);
}
开发者ID:svn2github,项目名称:irssi,代码行数:7,代码来源:netsplit.c


示例3: chatnets_init

void chatnets_init(void)
{
	chatnets = NULL;

	signal_add_first("event connected", (SIGNAL_FUNC) sig_connected);
	signal_add("setup reread", (SIGNAL_FUNC) read_chatnets);
        signal_add_first("irssi init read settings", (SIGNAL_FUNC) read_chatnets);
}
开发者ID:x3ro,项目名称:macirssi-irrsi,代码行数:8,代码来源:chatnets.c


示例4: gui_window_activities_init

void gui_window_activities_init(void)
{
	signal_add_first("window hilight", (SIGNAL_FUNC) sig_activity);
	signal_add_first("window activity", (SIGNAL_FUNC) sig_activity);

	signal_add("window hilight", (SIGNAL_FUNC) sig_activity_update);
	/* we need to use "window changed", so we can clear activity in
	   all split windows in tab. */
	signal_add("window changed", (SIGNAL_FUNC) sig_activity_update);
}
开发者ID:irssi-import,项目名称:xirssi,代码行数:10,代码来源:gui-window-activity.c


示例5: core_init

void core_init(void)
{
	dialog_type_queue = NULL;
	dialog_text_queue = NULL;
	client_start_time = time(NULL);

	modules_init();
	pidwait_init();

	net_disconnect_init();
	signals_init();

	signal_add_first("gui dialog", (SIGNAL_FUNC) sig_gui_dialog);
	signal_add_first("irssi init finished", (SIGNAL_FUNC) sig_init_finished);

	settings_init();
	commands_init();
	nickmatch_cache_init();
        session_init();
#ifdef HAVE_CAPSICUM
	capsicum_init();
#endif

	chat_protocols_init();
	chatnets_init();
        expandos_init();
	ignore_init();
	servers_init();
        write_buffer_init();
	log_init();
	log_away_init();
	rawlog_init();
	recode_init();

	channels_init();
	queries_init();
	nicklist_init();

	chat_commands_init();
	wcwidth_wrapper_init();

	settings_add_str("misc", "ignore_signals", "");
	settings_add_bool("misc", "override_coredump_limit", FALSE);

#ifdef HAVE_SYS_RESOURCE_H
	getrlimit(RLIMIT_CORE, &orig_core_rlimit);
#endif
	read_settings();
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	signal_add("irssi init finished", (SIGNAL_FUNC) sig_irssi_init_finished);

	settings_check();

        module_register("core", "core");
}
开发者ID:ailin-nemui,项目名称:irssi,代码行数:55,代码来源:core.c


示例6: channel_rejoin_init

void channel_rejoin_init(void)
{
	rejoin_tag = g_timeout_add(REJOIN_TIMEOUT,
				   (GSourceFunc) sig_rejoin, NULL);

	command_bind("rmrejoins", NULL, (SIGNAL_FUNC) cmd_rmrejoins);
	signal_add_first("event 437", (SIGNAL_FUNC) event_target_unavailable);
	signal_add_first("channel joined", (SIGNAL_FUNC) sig_remove_rejoin);
	signal_add_first("channel destroyed", (SIGNAL_FUNC) sig_remove_rejoin);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected);
}
开发者ID:svn2github,项目名称:irssi,代码行数:11,代码来源:channel-rejoin.c


示例7: fe_xmpp_messages_init

void
fe_xmpp_messages_init(void)
{
	signal_add("message xmpp history", sig_history);
	signal_add("message xmpp history action", sig_history_action);
	signal_add("message xmpp action", sig_action);
	signal_add("message xmpp own_action", sig_own_action);
	signal_add("message xmpp error", sig_error);
	signal_add_first("message xmpp own_public", sig_message_own_public);
	signal_add_first("message own_public", sig_message_ignore);
}
开发者ID:fschlich,项目名称:irssi-xmpp,代码行数:11,代码来源:fe-xmpp-messages.c


示例8: core_init

void core_init(int argc, char *argv[])
{
	dialog_type_queue = NULL;
	dialog_text_queue = NULL;

	modules_init();
#ifndef WIN32
	pidwait_init();
#endif

	net_disconnect_init();
	net_sendbuffer_init();
	signals_init();

	signal_add_first("gui dialog", (SIGNAL_FUNC) sig_gui_dialog);
	signal_add_first("irssi init finished", (SIGNAL_FUNC) sig_init_finished);

	settings_init();
	commands_init();
	nickmatch_cache_init();
        session_init();

	chat_protocols_init();
	chatnets_init();
        expandos_init();
	ignore_init();
	servers_init();
        write_buffer_init();
	log_init();
	log_away_init();
	rawlog_init();
	recode_init();

	channels_init();
	queries_init();
	nicklist_init();

	chat_commands_init();

	settings_add_str("misc", "ignore_signals", "");
	settings_add_bool("misc", "override_coredump_limit", TRUE);

#ifdef HAVE_SYS_RESOURCE_H
	getrlimit(RLIMIT_CORE, &orig_core_rlimit);
#endif
	read_settings();
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	signal_add("irssi init finished", (SIGNAL_FUNC) sig_irssi_init_finished);

	settings_check();

        module_register("core", "core");
}
开发者ID:svn2github,项目名称:irssi,代码行数:53,代码来源:core.c


示例9: fe_ignore_messages_init

void fe_ignore_messages_init(void)
{
	signal_add_first("message public", (SIGNAL_FUNC) sig_message_public);
	signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
	signal_add_first("message join", (SIGNAL_FUNC) sig_message_join);
	signal_add_first("message part", (SIGNAL_FUNC) sig_message_part);
	signal_add_first("message quit", (SIGNAL_FUNC) sig_message_quit);
	signal_add_first("message kick", (SIGNAL_FUNC) sig_message_kick);
	signal_add_first("message nick", (SIGNAL_FUNC) sig_message_nick);
	signal_add_first("message own_nick", (SIGNAL_FUNC) sig_message_own_nick);
	signal_add_first("message invite", (SIGNAL_FUNC) sig_message_invite);
	signal_add_first("message topic", (SIGNAL_FUNC) sig_message_topic);
}
开发者ID:Brijen,项目名称:MacIrssi,代码行数:13,代码来源:fe-ignore-messages.c


示例10: channel_rejoin_init

void channel_rejoin_init(void)
{
	settings_add_bool("servers", "channels_rejoin_unavailable", TRUE);

	rejoin_tag = g_timeout_add(REJOIN_TIMEOUT,
				   (GSourceFunc) sig_rejoin, NULL);

	command_bind_irc("rmrejoins", NULL, (SIGNAL_FUNC) cmd_rmrejoins);
	signal_add_first("event 407", (SIGNAL_FUNC) event_duplicate_channel);
	signal_add_first("event 437", (SIGNAL_FUNC) event_target_unavailable);
	signal_add_first("channel joined", (SIGNAL_FUNC) sig_remove_rejoin);
	signal_add_first("channel destroyed", (SIGNAL_FUNC) sig_remove_rejoin);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected);
}
开发者ID:Liaf,项目名称:irssi,代码行数:14,代码来源:channel-rejoin.c


示例11: ctcp_init

void ctcp_init(void)
{
	settings_add_str("misc", "ctcp_version_reply", PACKAGE" v$J - running on $sysname");
	settings_add_int("flood", "max_ctcp_queue", 5);

	signal_add("server disconnected", (SIGNAL_FUNC) ctcp_deinit_server);
	signal_add_first("event privmsg", (SIGNAL_FUNC) event_privmsg);
	signal_add_first("event notice", (SIGNAL_FUNC) event_notice);
	signal_add("ctcp msg", (SIGNAL_FUNC) ctcp_msg);
	signal_add("ctcp reply", (SIGNAL_FUNC) ctcp_reply);
	signal_add("ctcp msg ping", (SIGNAL_FUNC) ctcp_ping);
	signal_add("ctcp msg version", (SIGNAL_FUNC) ctcp_version);
	signal_add("ctcp msg time", (SIGNAL_FUNC) ctcp_time);
}
开发者ID:svn2github,项目名称:irssi,代码行数:14,代码来源:ctcp.c


示例12: sasl_init

void sasl_init(void)
{
	signal_add_first("server cap ack sasl", (SIGNAL_FUNC) sasl_start);
	signal_add_first("event authenticate", (SIGNAL_FUNC) sasl_step);
	signal_add_first("event 903", (SIGNAL_FUNC) sasl_success);
	signal_add_first("event 902", (SIGNAL_FUNC) sasl_fail);
	signal_add_first("event 904", (SIGNAL_FUNC) sasl_fail);
	signal_add_first("event 905", (SIGNAL_FUNC) sasl_fail);
	signal_add_first("event 906", (SIGNAL_FUNC) sasl_fail);
	signal_add_first("event 907", (SIGNAL_FUNC) sasl_already);
	signal_add_first("server disconnected", (SIGNAL_FUNC) sasl_disconnected);
}
开发者ID:Liaf,项目名称:irssi,代码行数:12,代码来源:sasl.c


示例13: fe_common_core_finish_init

void fe_common_core_finish_init(void)
{
	int setup_changed;

	signal_emit("irssi init read settings", 0);

#ifdef SIGPIPE
	signal(SIGPIPE, SIG_IGN);
#endif

        setup_changed = FALSE;
	if (cmdline_nick != NULL && *cmdline_nick != '\0') {
		/* override nick found from setup */
		settings_set_str("nick", cmdline_nick);
		setup_changed = TRUE;
	}

	if (cmdline_hostname != NULL) {
		/* override host name found from setup */
		settings_set_str("hostname", cmdline_hostname);
		setup_changed = TRUE;
	}

	sig_setup_changed();
	signal_add_first("setup changed", (SIGNAL_FUNC) sig_setup_changed);

        /* _after_ windows are created.. */
	g_log_set_default_handler((GLogFunc) glog_func, NULL);

	if (setup_changed)
                signal_emit("setup changed", 0);

	autorun_startup();
	autoconnect_servers();
}
开发者ID:rrebello,项目名称:irssi,代码行数:35,代码来源:fe-common-core.c


示例14: fe_queries_init

void fe_queries_init(void)
{
	settings_add_level("lookandfeel", "autocreate_query_level", "MSGS DCCMSGS");
	settings_add_bool("lookandfeel", "autocreate_own_query", TRUE);
	settings_add_time("lookandfeel", "autoclose_query", "0");

	queryclose_tag = -1;
	read_settings();

	signal_add("query created", (SIGNAL_FUNC) signal_query_created);
	signal_add("query destroyed", (SIGNAL_FUNC) signal_query_destroyed);
	signal_add("query server changed", (SIGNAL_FUNC) signal_query_server_changed);
	signal_add("query nick changed", (SIGNAL_FUNC) signal_query_nick_changed);
        signal_add("window item server changed", (SIGNAL_FUNC) signal_window_item_server_changed);
	signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
	signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
	signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);

	command_bind("query", NULL, (SIGNAL_FUNC) cmd_query);
	command_bind("unquery", NULL, (SIGNAL_FUNC) cmd_unquery);
	command_bind("window server", NULL, (SIGNAL_FUNC) cmd_window_server);

	command_set_options("query", "window");
}
开发者ID:Brijen,项目名称:MacIrssi,代码行数:25,代码来源:fe-queries.c


示例15: fe_log_init

void fe_log_init(void)
{
    autoremove_tag = g_timeout_add(60000, (GSourceFunc) sig_autoremove, NULL);

    settings_add_str("log", "autolog_path", "~/irclogs/$tag/$0.log");
    settings_add_str("log", "autolog_level", "all");
    settings_add_bool("log", "autolog", FALSE);

    autolog_level = 0;
    read_settings();

    command_bind("log", NULL, (SIGNAL_FUNC) cmd_log);
    command_bind("log open", NULL, (SIGNAL_FUNC) cmd_log_open);
    command_bind("log close", NULL, (SIGNAL_FUNC) cmd_log_close);
    command_bind("log start", NULL, (SIGNAL_FUNC) cmd_log_start);
    command_bind("log stop", NULL, (SIGNAL_FUNC) cmd_log_stop);
    command_bind("log ", NULL, (SIGNAL_FUNC) cmd_log_list);
    command_bind("window log", NULL, (SIGNAL_FUNC) cmd_window_log);
    command_bind("window logfile", NULL, (SIGNAL_FUNC) cmd_window_logfile);
    signal_add_first("print text stripped", (SIGNAL_FUNC) sig_printtext_stripped);
    signal_add("window item remove", (SIGNAL_FUNC) sig_window_item_remove);
    signal_add("window refnum changed", (SIGNAL_FUNC) sig_window_refnum_changed);
    signal_add("log locked", (SIGNAL_FUNC) sig_log_locked);
    signal_add("log create failed", (SIGNAL_FUNC) sig_log_create_failed);
    signal_add("awaylog show", (SIGNAL_FUNC) sig_awaylog_show);
    signal_add("setup changed", (SIGNAL_FUNC) read_settings);
}
开发者ID:svn2github,项目名称:irssi,代码行数:27,代码来源:fe-log.c


示例16: channel_events_init

void channel_events_init(void)
{
    settings_add_bool("misc", "join_auto_chans_on_invite", TRUE);

    signal_add_last("server event", (SIGNAL_FUNC) irc_server_event);
    signal_add_first("event 403", (SIGNAL_FUNC) event_no_such_channel); /* no such channel */
    signal_add_first("event 407", (SIGNAL_FUNC) event_duplicate_channel); /* duplicate channel */

    signal_add("event topic", (SIGNAL_FUNC) event_topic);
    signal_add_first("event join", (SIGNAL_FUNC) event_join);
    signal_add("event part", (SIGNAL_FUNC) event_part);
    signal_add("event kick", (SIGNAL_FUNC) event_kick);
    signal_add("event invite", (SIGNAL_FUNC) event_invite);
    signal_add("event 332", (SIGNAL_FUNC) event_topic_get);
    signal_add("event 333", (SIGNAL_FUNC) event_topic_info);
}
开发者ID:carriercomm,项目名称:irssi,代码行数:16,代码来源:channel-events.c


示例17: channel_rejoin_init

void channel_rejoin_init(void)
{
	rejoin_tag = g_timeout_add(REJOIN_TIMEOUT, (GSourceFunc) sig_rejoin, NULL);

	signal_add_first("event 437", (SIGNAL_FUNC) event_target_unavailable);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected);
}
开发者ID:svn2github,项目名称:irssi,代码行数:7,代码来源:channel-rejoin.c


示例18: irc_servers_init

void irc_servers_init(void)
{
	settings_add_str("misc", "usermode", DEFAULT_USER_MODE);
	settings_add_time("flood", "cmd_queue_speed", DEFAULT_CMD_QUEUE_SPEED);
	settings_add_int("flood", "cmds_max_at_once", DEFAULT_CMDS_MAX_AT_ONCE);

	cmd_tag = -1;

	signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
	signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
	signal_add_last("server quit", (SIGNAL_FUNC) sig_server_quit);
	signal_add("event 001", (SIGNAL_FUNC) event_connected);
	signal_add("event 004", (SIGNAL_FUNC) event_server_info);
	signal_add("event 005", (SIGNAL_FUNC) event_isupport);
	signal_add("event 375", (SIGNAL_FUNC) event_motd);
	signal_add_last("event 376", (SIGNAL_FUNC) event_end_of_motd);
	signal_add_last("event 422", (SIGNAL_FUNC) event_end_of_motd); /* no motd */
	signal_add("event 254", (SIGNAL_FUNC) event_channels_formed);
	signal_add("event 396", (SIGNAL_FUNC) event_hosthidden);
	signal_add("event 465", (SIGNAL_FUNC) event_server_banned);
	signal_add("event error", (SIGNAL_FUNC) event_error);
	signal_add("event ping", (SIGNAL_FUNC) event_ping);
	signal_add("event empty", (SIGNAL_FUNC) event_empty);

	irc_servers_setup_init();
	irc_servers_reconnect_init();
	servers_redirect_init();
	servers_idle_init();
}
开发者ID:dgl,项目名称:irssi,代码行数:29,代码来源:irc-servers.c


示例19: xmpp_servers_reconnect_init

void
xmpp_servers_reconnect_init(void)
{
	signal_add_first("server connect copy", sig_server_connect_copy);
	signal_add("server reconnect save status", sig_save_status);
	signal_add_last("server connected", sig_connected);
}
开发者ID:jahrome,项目名称:irssi-xmpp-android,代码行数:7,代码来源:xmpp-servers-reconnect.c


示例20: proxy_listen_init

void proxy_listen_init(void)
{
	if (enabled) {
		return;
	}
	enabled = TRUE;

	next_line = g_string_new(NULL);

	proxy_clients = NULL;
	proxy_listens = NULL;
	read_settings();

	signal_add("server incoming", (SIGNAL_FUNC) sig_incoming);
	signal_add("server event", (SIGNAL_FUNC) sig_server_event);
	signal_add("event connected", (SIGNAL_FUNC) event_connected);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
	signal_add_first("event nick", (SIGNAL_FUNC) event_nick);
	signal_add("message own_public", (SIGNAL_FUNC) sig_message_own_public);
	signal_add("message own_private", (SIGNAL_FUNC) sig_message_own_private);
	signal_add("message irc own_action", (SIGNAL_FUNC) sig_message_own_action);
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);

	signal_add("proxy client dump", (SIGNAL_FUNC) sig_dump);
}
开发者ID:Manishearth,项目名称:irssi,代码行数:25,代码来源:listen.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ signal_emit函数代码示例发布时间:2022-05-30
下一篇:
C++ signal_add函数代码示例发布时间: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