mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 12:53:42 +02:00
Perl updates. Lots of updates to perl documentation :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1081 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d108026a37
commit
341cd55587
13 changed files with 748 additions and 459 deletions
|
|
@ -17,6 +17,14 @@ CODE:
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Irssi::Channel
|
||||
channel_create(chat_type, name, automatic)
|
||||
int chat_type
|
||||
char *name
|
||||
int automatic
|
||||
CODE:
|
||||
channel_create(chat_type, NULL, name, automatic);
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Server
|
||||
#*******************************
|
||||
|
|
@ -31,12 +39,21 @@ PPCODE:
|
|||
XPUSHs(sv_2mortal(irssi_bless((CHANNEL_REC *) tmp->data)));
|
||||
}
|
||||
|
||||
void
|
||||
channels_join(server, channels, automatic)
|
||||
Irssi::Server server
|
||||
char *channels
|
||||
int automatic
|
||||
CODE:
|
||||
server->channels_join(server, channels, automatic);
|
||||
|
||||
Irssi::Channel
|
||||
channel_create(chat_type, server, name, automatic)
|
||||
int chat_type
|
||||
channel_create(server, name, automatic)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
int automatic
|
||||
CODE:
|
||||
channel_create(server->chat_type, server, name, automatic);
|
||||
|
||||
Irssi::Channel
|
||||
channel_find(server, name)
|
||||
|
|
@ -44,7 +61,7 @@ channel_find(server, name)
|
|||
char *name
|
||||
|
||||
void
|
||||
nicklist_get_same(server, nick)
|
||||
nicks_get_same(server, nick)
|
||||
Irssi::Server server
|
||||
char *nick
|
||||
PREINIT:
|
||||
|
|
|
|||
|
|
@ -318,12 +318,11 @@ PPCODE:
|
|||
}
|
||||
|
||||
void
|
||||
command_bind(cmd, category, func)
|
||||
command_bind(cmd, func, category = "Perl scripts' commands")
|
||||
char *cmd
|
||||
char *category
|
||||
char *func
|
||||
CODE:
|
||||
if (*category == '\0') category = "Perl scripts' commands";
|
||||
perl_command_bind(cmd, category, func);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -13,7 +13,15 @@ require Exporter;
|
|||
require DynaLoader;
|
||||
|
||||
@ISA = qw(Exporter DynaLoader);
|
||||
@EXPORT = qw(INPUT_READ INPUT_WRITE);
|
||||
@EXPORT = qw(INPUT_READ INPUT_WRITE
|
||||
MSGLEVEL_CRAP MSGLEVEL_MSGS MSGLEVEL_PUBLIC MSGLEVEL_NOTICES
|
||||
MSGLEVEL_SNOTES MSGLEVEL_CTCPS MSGLEVEL_ACTIONS MSGLEVEL_JOINS
|
||||
MSGLEVEL_PARTS MSGLEVEL_QUITS MSGLEVEL_KICKS MSGLEVEL_MODES
|
||||
MSGLEVEL_TOPICS MSGLEVEL_WALLOPS MSGLEVEL_INVITES MSGLEVEL_NICKS
|
||||
MSGLEVEL_DCC MSGLEVEL_DCCMSGS MSGLEVEL_CLIENTNOTICE MSGLEVEL_CLIENTCRAP
|
||||
MSGLEVEL_CLIENTERROR MSGLEVEL_HILIGHT MSGLEVEL_ALL MSGLEVEL_NOHILIGHT
|
||||
MSGLEVEL_NO_ACT MSGLEVEL_NEVER MSGLEVEL_LASTLOG
|
||||
);
|
||||
@EXPORT_OK = qw();
|
||||
|
||||
bootstrap Irssi $VERSION;
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ log_item_add(log, type, name, server)
|
|||
void
|
||||
log_item_destroy(log, item)
|
||||
Irssi::Log log
|
||||
Irssi::LogItem item
|
||||
Irssi::Logitem item
|
||||
|
||||
Irssi::LogItem
|
||||
Irssi::Logitem
|
||||
log_item_find(log, type, item, server)
|
||||
Irssi::Log log
|
||||
int type
|
||||
|
|
|
|||
|
|
@ -11,6 +11,21 @@ PPCODE:
|
|||
XPUSHs(sv_2mortal(irssi_bless(rec)));
|
||||
}
|
||||
|
||||
Irssi::Query
|
||||
query_create(chat_type, server_tag, nick, automatic)
|
||||
int chat_type
|
||||
char *server_tag
|
||||
char *nick
|
||||
int automatic
|
||||
|
||||
Irssi::Query
|
||||
query_find(nick)
|
||||
char *nick
|
||||
CODE:
|
||||
RETVAL = query_find(NULL, nick);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Server
|
||||
#*******************************
|
||||
|
|
@ -27,13 +42,6 @@ PPCODE:
|
|||
XPUSHs(sv_2mortal(irssi_bless(rec)));
|
||||
}
|
||||
|
||||
Irssi::Query
|
||||
query_create(chat_type, server_tag, nick, automatic)
|
||||
int chat_type
|
||||
char *server_tag
|
||||
char *nick
|
||||
int automatic
|
||||
|
||||
Irssi::Query
|
||||
query_find(server, nick)
|
||||
Irssi::Server server
|
||||
|
|
|
|||
|
|
@ -7,26 +7,6 @@ rawlog_set_size(lines)
|
|||
Irssi::Rawlog
|
||||
rawlog_create()
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Server
|
||||
#*******************************
|
||||
|
||||
void
|
||||
rawlog_input(rawlog, str)
|
||||
Irssi::Rawlog rawlog
|
||||
char *str
|
||||
|
||||
void
|
||||
rawlog_output(rawlog, str)
|
||||
Irssi::Rawlog rawlog
|
||||
char *str
|
||||
|
||||
void
|
||||
rawlog_redirect(rawlog, str)
|
||||
Irssi::Rawlog rawlog
|
||||
char *str
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Rawlog PREFIX = rawlog_
|
||||
#*******************************
|
||||
|
|
|
|||
|
|
@ -88,14 +88,6 @@ CODE:
|
|||
(char *) SvPV(ST(n), n_a), (char *) SvPV(ST(n+1), n_a), (int) SvIV(ST(n+2)));
|
||||
}
|
||||
|
||||
void
|
||||
channels_join(server, data, automatic)
|
||||
Irssi::Server server
|
||||
char *data
|
||||
int automatic
|
||||
CODE:
|
||||
server->channels_join(server, data, automatic);
|
||||
|
||||
int
|
||||
isnickflag(server, flag)
|
||||
Irssi::Server server
|
||||
|
|
|
|||
|
|
@ -50,24 +50,6 @@ CODE:
|
|||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
||||
void
|
||||
printformat_window(window, level, format, ...)
|
||||
Irssi::Window window
|
||||
int level
|
||||
char *format
|
||||
PREINIT:
|
||||
TEXT_DEST_REC dest;
|
||||
char *arglist[MAX_FORMAT_PARAMS];
|
||||
int n;
|
||||
CODE:
|
||||
format_create_dest(&dest, NULL, NULL, level, window);
|
||||
memset(arglist, 0, sizeof(arglist));
|
||||
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
||||
arglist[n-3] = n < items ? SvPV(ST(n), PL_na) : "";
|
||||
}
|
||||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Server
|
||||
#*******************************
|
||||
|
|
@ -91,6 +73,28 @@ CODE:
|
|||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Window
|
||||
#*******************************
|
||||
|
||||
void
|
||||
printformat(window, level, format, ...)
|
||||
Irssi::Window window
|
||||
int level
|
||||
char *format
|
||||
PREINIT:
|
||||
TEXT_DEST_REC dest;
|
||||
char *arglist[MAX_FORMAT_PARAMS];
|
||||
int n;
|
||||
CODE:
|
||||
format_create_dest(&dest, NULL, NULL, level, window);
|
||||
memset(arglist, 0, sizeof(arglist));
|
||||
for (n = 3; n < 3+MAX_FORMAT_PARAMS; n++) {
|
||||
arglist[n-3] = n < items ? SvPV(ST(n), PL_na) : "";
|
||||
}
|
||||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
||||
#*******************************
|
||||
|
|
|
|||
|
|
@ -34,19 +34,10 @@ CODE:
|
|||
printtext_string(NULL, NULL, level, str);
|
||||
|
||||
void
|
||||
print_window(str, level=MSGLEVEL_CLIENTNOTICE)
|
||||
char *str
|
||||
int level;
|
||||
CODE:
|
||||
printtext_window(active_win, level, str);
|
||||
|
||||
void
|
||||
command(cmd, server=active_win->active_server, item=active_win->active)
|
||||
command(cmd)
|
||||
char *cmd
|
||||
Irssi::Server server
|
||||
Irssi::Windowitem item
|
||||
CODE:
|
||||
perl_command(cmd, server, item);
|
||||
perl_command(cmd, active_win->active_server, active_win->active);
|
||||
|
||||
Irssi::Window
|
||||
window_find_name(name)
|
||||
|
|
@ -77,6 +68,14 @@ CODE:
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Irssi::Window
|
||||
window_find_item(name)
|
||||
char *name
|
||||
CODE:
|
||||
RETVAL = window_find_item(NULL, name);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Irssi::Window
|
||||
window_find_closest(name, level)
|
||||
char *name
|
||||
|
|
@ -86,20 +85,25 @@ CODE:
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Irssi::Windowitem
|
||||
window_item_find(name)
|
||||
char *name
|
||||
CODE:
|
||||
RETVAL = window_item_find(NULL, name);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Server
|
||||
#*******************************
|
||||
|
||||
void
|
||||
command(server, cmd, item=active_win->active)
|
||||
command(server, cmd)
|
||||
Irssi::Server server
|
||||
char *cmd
|
||||
Irssi::Windowitem item
|
||||
CODE:
|
||||
if (item != NULL && item->server != SERVER(server))
|
||||
item = NULL;
|
||||
perl_command(cmd, server, item);
|
||||
perl_command(cmd, server, active_win->active);
|
||||
|
||||
void
|
||||
print(server, channel, str, level)
|
||||
|
|
@ -107,18 +111,19 @@ print(server, channel, str, level)
|
|||
char *channel
|
||||
char *str
|
||||
int level
|
||||
PREINIT:
|
||||
char *fixed;
|
||||
CODE:
|
||||
fixed = perl_fix_formats(str);
|
||||
printtext(server, channel, level, fixed);
|
||||
g_free(fixed);
|
||||
printtext_string(server, channel, level, str);
|
||||
|
||||
Irssi::Windowitem
|
||||
window_item_find(server, name)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
|
||||
Irssi::Window
|
||||
window_find_item(server, name)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
|
||||
Irssi::Window
|
||||
window_find_level(server, level)
|
||||
Irssi::Server server
|
||||
|
|
@ -148,13 +153,19 @@ PPCODE:
|
|||
}
|
||||
|
||||
void
|
||||
command(window, cmd, server=window->active_server, item=window->active)
|
||||
print(window, str, level=MSGLEVEL_CLIENTNOTICE)
|
||||
Irssi::Window window
|
||||
char *str
|
||||
int level;
|
||||
CODE:
|
||||
printtext_window(window, level, str);
|
||||
|
||||
void
|
||||
command(window, cmd)
|
||||
Irssi::Window window
|
||||
char *cmd
|
||||
Irssi::Server server
|
||||
Irssi::Windowitem item
|
||||
CODE:
|
||||
perl_command(cmd, server, item);
|
||||
perl_command(cmd, window->active_server, window->active);
|
||||
|
||||
void
|
||||
window_item_add(window, item, automatic)
|
||||
|
|
@ -163,18 +174,11 @@ window_item_add(window, item, automatic)
|
|||
int automatic
|
||||
|
||||
void
|
||||
window_item_remove(window, item)
|
||||
Irssi::Window window
|
||||
window_item_remove(item)
|
||||
Irssi::Windowitem item
|
||||
|
||||
void
|
||||
window_item_destroy(window, item)
|
||||
Irssi::Window window
|
||||
Irssi::Windowitem item
|
||||
|
||||
void
|
||||
window_item_set_active(window, item)
|
||||
Irssi::Window window
|
||||
window_item_destroy(item)
|
||||
Irssi::Windowitem item
|
||||
|
||||
void
|
||||
|
|
@ -217,11 +221,6 @@ char *
|
|||
window_get_active_name(window)
|
||||
Irssi::Window window
|
||||
|
||||
Irssi::Window
|
||||
window_find_item(server, name)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
|
||||
Irssi::Windowitem
|
||||
window_item_find(window, server, name)
|
||||
Irssi::Window window
|
||||
|
|
@ -233,9 +232,17 @@ OUTPUT:
|
|||
RETVAL
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
||||
MODULE = Irssi PACKAGE = Irssi::Windowitem PREFIX = window_item_
|
||||
#*******************************
|
||||
|
||||
void
|
||||
print(item, str, level=MSGLEVEL_CLIENTNOTICE)
|
||||
Irssi::Windowitem item
|
||||
int level
|
||||
char *str
|
||||
CODE:
|
||||
printtext_string(item->server, item->name, level, str);
|
||||
|
||||
void
|
||||
command(item, cmd)
|
||||
Irssi::Windowitem item
|
||||
|
|
@ -248,11 +255,6 @@ window_create(item, automatic)
|
|||
Irssi::Windowitem item
|
||||
int automatic
|
||||
|
||||
void
|
||||
window_item_create(item, automatic)
|
||||
Irssi::Windowitem item
|
||||
int automatic
|
||||
|
||||
Irssi::Window
|
||||
window(item)
|
||||
Irssi::Windowitem item
|
||||
|
|
@ -270,19 +272,8 @@ int
|
|||
window_item_is_active(item)
|
||||
Irssi::Windowitem item
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
||||
#*******************************
|
||||
|
||||
void
|
||||
print(item, str, level=MSGLEVEL_CLIENTNOTICE)
|
||||
window_item_set_active(item)
|
||||
Irssi::Windowitem item
|
||||
int level
|
||||
char *str
|
||||
PREINIT:
|
||||
char *fixed;
|
||||
CODE:
|
||||
fixed = perl_fix_formats(str);
|
||||
printtext(item->server, item->name, level, fixed);
|
||||
g_free(fixed);
|
||||
window_item_set_active(window_item_window(item), item);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
typedef COMMAND_REC *Irssi__Command;
|
||||
typedef LOG_REC *Irssi__Log;
|
||||
typedef LOG_ITEM_REC *Irssi__LogItem;
|
||||
typedef LOG_ITEM_REC *Irssi__Logitem;
|
||||
typedef RAWLOG_REC *Irssi__Rawlog;
|
||||
typedef IGNORE_REC *Irssi__Ignore;
|
||||
typedef MODULE_REC *Irssi__Module;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Irssi::Command T_PlainObj
|
|||
Irssi::Nick T_IrssiObj
|
||||
Irssi::Ignore T_PlainObj
|
||||
Irssi::Log T_PlainObj
|
||||
Irssi::LogItem T_PlainObj
|
||||
Irssi::Logitem T_PlainObj
|
||||
Irssi::Rawlog T_PlainObj
|
||||
Irssi::Module T_PlainObj
|
||||
Irssi::Theme T_PlainObj
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue