… | |
… | |
296 | PROTOTYPES: ENABLE |
296 | PROTOTYPES: ENABLE |
297 | |
297 | |
298 | BOOT: |
298 | BOOT: |
299 | { |
299 | { |
300 | # define set_hookname(sym) av_store (hookname, PP_CONCAT(HOOK_, sym), newSVpv (PP_STRINGIFY(sym), 0)) |
300 | # define set_hookname(sym) av_store (hookname, PP_CONCAT(HOOK_, sym), newSVpv (PP_STRINGIFY(sym), 0)) |
|
|
301 | # define export_const(name) newCONSTSUB (gv_stashpv ("urxvt", 1), #name, newSViv (name)); |
301 | AV *hookname = get_av ("urxvt::HOOKNAME", 1); |
302 | AV *hookname = get_av ("urxvt::HOOKNAME", 1); |
302 | set_hookname (INIT); |
303 | set_hookname (INIT); |
303 | set_hookname (RESET); |
304 | set_hookname (RESET); |
304 | set_hookname (START); |
305 | set_hookname (START); |
305 | set_hookname (DESTROY); |
306 | set_hookname (DESTROY); |
… | |
… | |
314 | set_hookname (TTY_ACTIVITY); |
315 | set_hookname (TTY_ACTIVITY); |
315 | set_hookname (REFRESH_BEGIN); |
316 | set_hookname (REFRESH_BEGIN); |
316 | set_hookname (REFRESH_END); |
317 | set_hookname (REFRESH_END); |
317 | set_hookname (KEYBOARD_COMMAND); |
318 | set_hookname (KEYBOARD_COMMAND); |
318 | |
319 | |
319 | newCONSTSUB (gv_stashpv ("urxvt", 1), "DEFAULT_RSTYLE", newSViv (DEFAULT_RSTYLE)); |
320 | export_const (DEFAULT_RSTYLE); |
|
|
321 | export_const (OVERLAY_RSTYLE); |
|
|
322 | export_const (RS_Bold); |
|
|
323 | export_const (RS_Italic); |
|
|
324 | export_const (RS_Blink); |
|
|
325 | export_const (RS_RVid); |
|
|
326 | export_const (RS_Uline); |
320 | |
327 | |
321 | sv_setpv (get_sv ("urxvt::LIBDIR", 1), LIBDIR); |
328 | sv_setpv (get_sv ("urxvt::LIBDIR", 1), LIBDIR); |
322 | } |
329 | } |
323 | |
330 | |
324 | void |
331 | void |
… | |
… | |
339 | NV |
346 | NV |
340 | NOW () |
347 | NOW () |
341 | CODE: |
348 | CODE: |
342 | RETVAL = NOW; |
349 | RETVAL = NOW; |
343 | OUTPUT: |
350 | OUTPUT: |
|
|
351 | RETVAL |
|
|
352 | |
|
|
353 | int |
|
|
354 | GET_BASEFG (int rend) |
|
|
355 | CODE: |
|
|
356 | RETVAL = GET_BASEFG (rend); |
|
|
357 | OUTPUT: |
|
|
358 | RETVAL |
|
|
359 | |
|
|
360 | int |
|
|
361 | GET_BASEBG (int rend) |
|
|
362 | CODE: |
|
|
363 | RETVAL = GET_BASEBG (rend); |
|
|
364 | OUTPUT: |
|
|
365 | RETVAL |
|
|
366 | |
|
|
367 | int |
|
|
368 | SET_FGCOLOR (int rend, int new_color) |
|
|
369 | CODE: |
|
|
370 | RETVAL = SET_FGCOLOR (rend, new_color); |
|
|
371 | OUTPUT: |
|
|
372 | RETVAL |
|
|
373 | |
|
|
374 | int |
|
|
375 | SET_BGCOLOR (int rend, int new_color) |
|
|
376 | CODE: |
|
|
377 | RETVAL = SET_BGCOLOR (rend, new_color); |
|
|
378 | OUTPUT: |
|
|
379 | RETVAL |
|
|
380 | |
|
|
381 | int |
|
|
382 | GET_CUSTOM (int rend) |
|
|
383 | CODE: |
|
|
384 | RETVAL = (rend && RS_customMask) >> RS_customShift; |
|
|
385 | OUTPUT: |
|
|
386 | RETVAL |
|
|
387 | |
|
|
388 | int |
|
|
389 | SET_CUSTOM (int rend, int new_value) |
|
|
390 | CODE: |
|
|
391 | { |
|
|
392 | if (!IN_RANGE_EXC (new_value, 0, RS_customCount)) |
|
|
393 | croak ("custom value out of range, must be 0..%d", RS_customCount - 1); |
|
|
394 | |
|
|
395 | RETVAL = (rend & ~RS_customMask) |
|
|
396 | | ((new_value << RS_customShift) & RS_customMask); |
|
|
397 | } |
|
|
398 | OUTPUT: |
344 | RETVAL |
399 | RETVAL |
345 | |
400 | |
346 | MODULE = urxvt PACKAGE = urxvt::term |
401 | MODULE = urxvt PACKAGE = urxvt::term |
347 | |
402 | |
348 | int |
403 | int |