本文整理汇总了C++中signal_add_first函数的典型用法代码示例。如果您正苦于以下问题:C++ signal_add_first函数的具体用法?C++ signal_add_first怎么用?C++ signal_add_first使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了signal_add_first函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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");
}
示例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);
}