mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
added functions from fe-windows.h and window-items.h
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@868 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
2e96f68445
commit
746bd9b4f0
@ -41,6 +41,26 @@ channel_find(server, name)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
|
||||
void
|
||||
nicklist_get_same(server, nick)
|
||||
Irssi::Server server
|
||||
char *nick
|
||||
PREINIT:
|
||||
GSList *list, *tmp;
|
||||
HV *nickstash;
|
||||
PPCODE:
|
||||
list = nicklist_get_same(server, nick);
|
||||
|
||||
nickstash = gv_stashpv("Irssi::Nick", 0);
|
||||
for (tmp = list; tmp != NULL; tmp = tmp->next->next) {
|
||||
CHANNEL_REC *channel = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(channel))),
|
||||
irssi_get_stash(channel))));
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->next->data))), nickstash)));
|
||||
}
|
||||
g_slist_free(list);
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Channel PREFIX = channel_
|
||||
#*******************************
|
||||
@ -107,26 +127,6 @@ PPCODE:
|
||||
}
|
||||
g_slist_free(list);
|
||||
|
||||
void
|
||||
nicklist_get_same(server, nick)
|
||||
Irssi::Server server
|
||||
char *nick
|
||||
PREINIT:
|
||||
GSList *list, *tmp;
|
||||
HV *nickstash;
|
||||
PPCODE:
|
||||
list = nicklist_get_same(server, nick);
|
||||
|
||||
nickstash = gv_stashpv("Irssi::Nick", 0);
|
||||
for (tmp = list; tmp != NULL; tmp = tmp->next->next) {
|
||||
CHANNEL_REC *channel = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(channel))),
|
||||
irssi_get_stash(channel))));
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->next->data))), nickstash)));
|
||||
}
|
||||
g_slist_free(list);
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Nick
|
||||
#*******************************
|
||||
|
@ -91,6 +91,196 @@ input_remove(tag)
|
||||
CODE:
|
||||
perl_source_remove(tag);
|
||||
|
||||
# maybe there's some easier way than this..? :)
|
||||
int
|
||||
MSGLEVEL_CRAP()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_CRAP;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_MSGS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_MSGS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_PUBLIC()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_PUBLIC;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_NOTICES()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_NOTICES;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_SNOTES()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_SNOTES;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_CTCPS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_CTCPS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_ACTIONS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_ACTIONS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_JOINS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_JOINS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_PARTS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_PARTS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_QUITS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_QUITS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_KICKS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_KICKS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_MODES()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_MODES;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_TOPICS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_TOPICS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_WALLOPS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_WALLOPS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_INVITES()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_INVITES;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_NICKS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_NICKS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_DCC()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_DCC;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_DCCMSGS()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_DCCMSGS;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_CLIENTNOTICE()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_CLIENTNOTICE;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_CLIENTCRAP()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_CLIENTCRAP;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_CLIENTERROR()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_CLIENTERROR;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_HILIGHT()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_HILIGHT;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_ALL()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_ALL;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_NOHILIGHT()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_NOHILIGHT;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_NO_ACT()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_NO_ACT;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_NEVER()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_NEVER;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
MSGLEVEL_LASTLOG()
|
||||
CODE:
|
||||
RETVAL = MSGLEVEL_LASTLOG;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
int
|
||||
level2bits(str)
|
||||
char *str
|
||||
|
@ -18,5 +18,8 @@ require DynaLoader;
|
||||
|
||||
bootstrap Irssi $VERSION;
|
||||
|
||||
@Irssi::Channel::ISA = qw(Irssi::Windowitem);
|
||||
@Irssi::Query::ISA = qw(Irssi::Windowitem);
|
||||
|
||||
1;
|
||||
|
||||
|
@ -1,12 +1,18 @@
|
||||
MODULE = Irssi PACKAGE = Irssi
|
||||
|
||||
void
|
||||
command(cmd, server=active_win->active_server, item=active_win->active)
|
||||
char *cmd
|
||||
Irssi::Server server
|
||||
Irssi::Windowitem item
|
||||
CODE:
|
||||
signal_emit("send command", 3, cmd, server, item);
|
||||
windows()
|
||||
PREINIT:
|
||||
GSList *tmp;
|
||||
HV *stash;
|
||||
PPCODE:
|
||||
stash = gv_stashpv("Irssi::Window", 0);
|
||||
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
||||
WINDOW_REC *rec = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))), stash)));
|
||||
}
|
||||
|
||||
|
||||
Irssi::Window
|
||||
active_win()
|
||||
@ -36,6 +42,52 @@ print_window(str, level=MSGLEVEL_CLIENTNOTICE)
|
||||
CODE:
|
||||
printtext_window(active_win, level, str);
|
||||
|
||||
void
|
||||
command(cmd, server=active_win->active_server, item=active_win->active)
|
||||
char *cmd
|
||||
Irssi::Server server
|
||||
Irssi::Windowitem item
|
||||
CODE:
|
||||
signal_emit("send command", 3, cmd, server, item);
|
||||
|
||||
Irssi::Window
|
||||
window_find_name(name)
|
||||
char *name
|
||||
|
||||
Irssi::Window
|
||||
window_find_refnum(refnum)
|
||||
int refnum
|
||||
|
||||
int
|
||||
window_refnum_prev(refnum, wrap)
|
||||
int refnum
|
||||
int wrap
|
||||
|
||||
int
|
||||
window_refnum_next(refnum, wrap)
|
||||
int refnum
|
||||
int wrap
|
||||
|
||||
int
|
||||
windows_refnum_last()
|
||||
|
||||
Irssi::Window
|
||||
window_find_level(level)
|
||||
int level
|
||||
CODE:
|
||||
RETVAL = window_find_level(NULL, level);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Irssi::Window
|
||||
window_find_closest(name, level)
|
||||
char *name
|
||||
int level
|
||||
CODE:
|
||||
RETVAL = window_find_closest(NULL, name, level);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Server
|
||||
@ -52,7 +104,7 @@ CODE:
|
||||
signal_emit("send command", 3, cmd, server, item);
|
||||
|
||||
void
|
||||
printtext(server, channel, str, level)
|
||||
print(server, channel, str, level)
|
||||
Irssi::Server server
|
||||
char *channel
|
||||
int level
|
||||
@ -60,6 +112,23 @@ printtext(server, channel, str, level)
|
||||
CODE:
|
||||
printtext(server, channel, level, str);
|
||||
|
||||
Irssi::Windowitem
|
||||
window_item_find(server, name)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
|
||||
Irssi::Window
|
||||
window_find_level(server, level)
|
||||
Irssi::Server server
|
||||
int level
|
||||
|
||||
Irssi::Window
|
||||
window_find_closest(server, name, level)
|
||||
Irssi::Server server
|
||||
char *name
|
||||
int level
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Window
|
||||
#*******************************
|
||||
@ -114,6 +183,68 @@ command(window, cmd, server=window->active_server, item=window->active)
|
||||
CODE:
|
||||
signal_emit("send command", 3, cmd, server, item);
|
||||
|
||||
void
|
||||
window_add_item(window, item, automatic)
|
||||
Irssi::Window window
|
||||
Irssi::Windowitem item
|
||||
int automatic
|
||||
|
||||
void
|
||||
window_remove_item(window, item)
|
||||
Irssi::Window window
|
||||
Irssi::Windowitem item
|
||||
|
||||
void
|
||||
window_item_set_active(window, item)
|
||||
Irssi::Window window
|
||||
Irssi::Windowitem item
|
||||
|
||||
void
|
||||
window_item_prev(window)
|
||||
Irssi::Window window
|
||||
|
||||
void
|
||||
window_item_next(window)
|
||||
Irssi::Window window
|
||||
|
||||
void
|
||||
window_destroy(window)
|
||||
Irssi::Window window
|
||||
|
||||
void
|
||||
window_set_active(window)
|
||||
Irssi::Window window
|
||||
|
||||
void
|
||||
window_change_server(window, server)
|
||||
Irssi::Window window
|
||||
Irssi::Server server
|
||||
|
||||
void
|
||||
window_set_refnum(window, refnum)
|
||||
Irssi::Window window
|
||||
int refnum
|
||||
|
||||
void
|
||||
window_set_name(window, name)
|
||||
Irssi::Window window
|
||||
char *name
|
||||
|
||||
void
|
||||
window_set_level(window, level)
|
||||
Irssi::Window window
|
||||
int level
|
||||
|
||||
char *
|
||||
window_get_active_name(window)
|
||||
Irssi::Window window
|
||||
|
||||
Irssi::Window
|
||||
window_find_item(window, name)
|
||||
Irssi::Window window
|
||||
char *name
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
||||
#*******************************
|
||||
@ -138,6 +269,34 @@ command(item, cmd)
|
||||
CODE:
|
||||
signal_emit("send command", 3, cmd, item->server, item);
|
||||
|
||||
Irssi::Window
|
||||
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
|
||||
CODE:
|
||||
RETVAL = window_item_window(item);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
window_item_change_server(item, server)
|
||||
Irssi::Windowitem item
|
||||
Irssi::Server server
|
||||
|
||||
int
|
||||
window_item_is_active(item)
|
||||
Irssi::Windowitem item
|
||||
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Channel
|
||||
#*******************************
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "perl/perl-common.h"
|
||||
|
||||
#include "fe-common/core/fe-windows.h"
|
||||
#include "fe-common/core/window-items.h"
|
||||
#include "fe-common/core/themes.h"
|
||||
#include "fe-common/core/keyboard.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user