mirror of
https://github.com/irssi/irssi.git
synced 2025-04-26 04:51:11 -05:00
Added TEXT_DEST_REC to perl, fixed "print text..." signal declarations.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1453 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
463d5fbd2f
commit
014c07d71c
@ -9,7 +9,6 @@ core
|
||||
"gui exit"
|
||||
"gui dialog", char *type, char *text
|
||||
"send command", char *command, SERVER_REC, WI_ITEM_REC
|
||||
"print text stripped", WINDOW_REC, SERVER_REC, char *channel, int level, char *text
|
||||
|
||||
* Provides signals:
|
||||
|
||||
@ -254,8 +253,8 @@ keyboard.c:
|
||||
"keyinfo destroyed", KEYINFO_REC
|
||||
|
||||
printtext.c:
|
||||
"print text", WINDOW_REC, SERVER_REC, char *channel, int level, char *text
|
||||
"print text stripped", WINDOW_REC, SERVER_REC, char *channel, int level, char *text
|
||||
"print text", TEXT_DEST_REC *dest, char *text
|
||||
"print text stripped", TEXT_DEST_REC *dest, char *text
|
||||
|
||||
themes.c:
|
||||
"theme created", THEME_REC
|
||||
|
@ -53,3 +53,4 @@ typedef THEME_REC *Irssi__Theme;
|
||||
typedef KEYINFO_REC *Irssi__Keyinfo;
|
||||
typedef WINDOW_REC *Irssi__Window;
|
||||
typedef WI_ITEM_REC *Irssi__Windowitem;
|
||||
typedef TEXT_DEST_REC *Irssi__TextDest;
|
||||
|
@ -16,6 +16,7 @@ Irssi::Theme T_PlainObj
|
||||
Irssi::Keyinfo T_PlainObj
|
||||
Irssi::Window T_PlainObj
|
||||
Irssi::Windowitem T_IrssiObj
|
||||
Irssi::TextDest T_PlainObj
|
||||
|
||||
INPUT
|
||||
|
||||
|
@ -44,6 +44,7 @@ while (<STDIN>) {
|
||||
s/THEME_REC[^,]*/Irssi::Theme/g;
|
||||
s/KEYINFO_REC[^,]*/Irssi::Keyinfo/g;
|
||||
s/PROCESS_REC[^,]*/Irssi::Process/g;
|
||||
s/TEXT_DEST_REC[^,]*/Irssi::TextDest/g;
|
||||
s/WINDOW_REC[^,]*/Irssi::Window/g;
|
||||
s/WI_ITEM_REC[^,]*/iobject/g;
|
||||
|
||||
|
@ -64,6 +64,20 @@ static void perl_window_fill_hash(HV *hv, WINDOW_REC *window)
|
||||
hv_store(hv, "last_line", 9, newSViv(window->last_line), 0);
|
||||
}
|
||||
|
||||
static void perl_text_dest_fill_hash(HV *hv, TEXT_DEST_REC *dest)
|
||||
{
|
||||
HV *stash;
|
||||
|
||||
stash = gv_stashpv("Irssi::Window", 0);
|
||||
hv_store(hv, "window", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(dest->window))), stash), 0);
|
||||
hv_store(hv, "server", 6, irssi_bless(dest->server), 0);
|
||||
hv_store(hv, "target", 6, new_pv(dest->target), 0);
|
||||
hv_store(hv, "level", 5, newSViv(dest->level), 0);
|
||||
|
||||
hv_store(hv, "hilight_priority", 16, newSViv(dest->hilight_priority), 0);
|
||||
hv_store(hv, "hilight_color", 13, new_pv(dest->hilight_color), 0);
|
||||
}
|
||||
|
||||
void printformat_perl(TEXT_DEST_REC *dest, char *format, char **arglist)
|
||||
{
|
||||
THEME_REC *theme;
|
||||
@ -126,6 +140,7 @@ void fe_perl_init(void)
|
||||
static PLAIN_OBJECT_INIT_REC fe_plains[] = {
|
||||
{ "Irssi::Process", (PERL_OBJECT_FUNC) perl_process_fill_hash },
|
||||
{ "Irssi::Window", (PERL_OBJECT_FUNC) perl_window_fill_hash },
|
||||
{ "Irssi::TextDest", (PERL_OBJECT_FUNC) perl_text_dest_fill_hash },
|
||||
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user