1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
MODULE = Irssi PACKAGE = Irssi
void
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()
CODE:
RETVAL = active_win;
OUTPUT:
RETVAL
Irssi::Server
active_server()
CODE:
RETVAL = active_win->active_server;
OUTPUT:
RETVAL
void
print(str, level=MSGLEVEL_CLIENTNOTICE)
char *str
int level;
CODE:
printtext(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)
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
#*******************************
void
command(server, cmd, item=active_win->active)
Irssi::Server server
char *cmd
Irssi::Windowitem item
CODE:
if (item != NULL && item->server != SERVER(server))
item = NULL;
signal_emit("send command", 3, cmd, server, item);
void
print(server, channel, str, level)
Irssi::Server server
char *channel
int level
char *str
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
#*******************************
void
values(window)
Irssi::Window window
PREINIT:
HV *hv;
PPCODE:
hv = newHV();
hv_store(hv, "refnum", 6, newSViv(window->refnum), 0);
hv_store(hv, "name", 4, new_pv(window->name), 0);
if (window->active) {
hv_store(hv, "active", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(window->active))),
irssi_get_stash(window->active)), 0);
}
if (window->active_server) {
hv_store(hv, "active_server", 13, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(window->active_server))),
irssi_get_stash(window->active_server)), 0);
}
hv_store(hv, "lines", 5, newSViv(window->lines), 0);
hv_store(hv, "level", 5, newSViv(window->level), 0);
hv_store(hv, "new_data", 8, newSViv(window->new_data), 0);
hv_store(hv, "last_color", 10, newSViv(window->last_color), 0);
hv_store(hv, "last_timestamp", 14, newSViv(window->last_timestamp), 0);
hv_store(hv, "last_line", 9, newSViv(window->last_line), 0);
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
void
items(window)
Irssi::Window window
PREINIT:
GSList *tmp;
PPCODE:
for (tmp = window->items; tmp != NULL; tmp = tmp->next) {
CHANNEL_REC *rec = tmp->data;
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
irssi_get_stash(rec))));
}
void
command(window, cmd, server=window->active_server, item=window->active)
Irssi::Window window
char *cmd
Irssi::Server server
Irssi::Windowitem item
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
#*******************************
void
values(item)
Irssi::Windowitem item
PREINIT:
HV *hv;
PPCODE:
hv = newHV();
hv_store(hv, "server", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(item->server))),
irssi_get_stash(item->server)), 0);
hv_store(hv, "name", 4, new_pv(item->name), 0);
hv_store(hv, "new_data", 8, newSViv(item->new_data), 0);
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
void
command(item, cmd)
Irssi::Windowitem item
char *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::Windowitem
#*******************************
void
print(item, str, level=MSGLEVEL_CLIENTNOTICE)
Irssi::Windowitem item
int level
char *str
CODE:
printtext(item->server, item->name, level, str);
|