--- rxvt-unicode/src/rxvtperl.xs 2006/01/07 21:22:02 1.38 +++ rxvt-unicode/src/rxvtperl.xs 2006/01/08 00:07:18 1.40 @@ -586,15 +586,22 @@ BOOT: { - HV *stash = gv_stashpv ("urxvt", 1); -# define export_const_iv(name) newCONSTSUB (stash, # name, newSViv (name)); + sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1)); AV *hookname = get_av ("urxvt::HOOKNAME", 1); # define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0)); # include "hookinc.h" # undef def - + HV *option = get_hv ("urxvt::OPTION", 1); +# define def(name,val) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0); +# define nodef(name) +# include "optinc.h" +# undef nodef +# undef def + + HV *stash = gv_stashpv ("urxvt", 1); +# define export_const_iv(name) newCONSTSUB (stash, # name, newSViv (name)); export_const_iv (DEFAULT_RSTYLE); export_const_iv (OVERLAY_RSTYLE); export_const_iv (RS_Bold); @@ -618,8 +625,6 @@ export_const_iv (Button4Mask); export_const_iv (Button5Mask); export_const_iv (AnyModifier); - - sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1)); } SV * @@ -1153,6 +1158,42 @@ } } +bool +rxvt_term::option (U32 optval, int set = -1) + CODE: +{ + RETVAL = THIS->options & optval; + + if (set >= 0) + { + if (set) + THIS->options |= optval; + else + THIS->options &= ~optval; + + switch (optval) + { + case Opt_skipBuiltinGlyphs: + THIS->set_fonts (); + THIS->scr_remap_chars (); + THIS->scr_touch (true); + THIS->want_refresh = 1; + break; + + case Opt_cursorUnderline: + THIS->want_refresh = 1; + break; + +# case Opt_scrollBar_floating: +# case Opt_scrollBar_right: +# THIS->resize_all_windows (THIS->width, THIS->height, 1); +# break; + } + } +} + OUTPUT: + RETVAL + void rxvt_term::cur (...) PROTOTYPE: $;$$