From 0ae91b7b8201daac99fe16874493963f785865e0 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Jan 2006 23:18:56 +0000 Subject: [PATCH] *** empty log message *** --- MANIFEST | 1 + src/optinc.h | 45 ++++++++++++++++++++++++++++++++++++++ src/perl/urxvt-popup | 2 -- src/rxvtlib.h.in | 51 ++++++-------------------------------------- src/rxvtperl.xs | 15 ++++++++----- 5 files changed, 63 insertions(+), 51 deletions(-) create mode 100644 src/optinc.h diff --git a/MANIFEST b/MANIFEST index f3eb8b49..fd2c0f0e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -91,6 +91,7 @@ src/menubar.h src/misc.C src/netdisp.C src/netdisp.h +src/optinc.h src/ptytty.h src/ptytty.C src/rxvtutil.C diff --git a/src/optinc.h b/src/optinc.h new file mode 100644 index 00000000..efd79eda --- /dev/null +++ b/src/optinc.h @@ -0,0 +1,45 @@ + def(console, 0) + def(loginShell, 1) + def(iconic, 2) + def(visualBell, 3) + def(mapAlert, 4) + def(reverseVideo, 5) + def(utmpInhibit, 6) + def(scrollBar, 7) + def(scrollBar_right, 8) + def(scrollBar_floating, 9) + def(meta8, 10) + def(scrollTtyOutput, 11) + def(scrollTtyKeypress, 12) + def(transparent, 13) + def(tripleclickwords, 14) + def(scrollWithBuffer, 15) + def(jumpScroll, 16) + def(mouseWheelScrollPage, 17) +#if POINTER_BLANK + def(pointerBlank, 18) +#else + nodef(pointerBlank) +#endif + def(cursorBlink, 19) + def(secondaryScreen, 20) + def(secondaryScroll, 21) + def(pastableTabs, 22) + def(cursorUnderline, 23) +#if ENABLE_FRILLS + def(insecure, 24) // insecure esc sequences + def(borderLess, 25) // mwm borderless hints + def(hold, 26) // hold window open after exit + def(skipBuiltinGlyphs, 27) // do not use internal glyphs +#else + nodef(insecure) + nodef(borderLess) + nodef(hold) + nodef(skipBuiltinGlyphs) +#endif +#if ENABLE_STYLES + def(intensityStyles, 28) // font styles imply intensity +#else + nodef(intensityStyles) +#endif + diff --git a/src/perl/urxvt-popup b/src/perl/urxvt-popup index 8a385bfd..5f7bde9a 100644 --- a/src/perl/urxvt-popup +++ b/src/perl/urxvt-popup @@ -3,8 +3,6 @@ # this extension implements popup-menu functionality for urxvt. it works # together with the urxvt::popup class. -use List::Util; - sub refresh { my ($self) = @_; diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in index a0801cec..de346347 100644 --- a/src/rxvtlib.h.in +++ b/src/rxvtlib.h.in @@ -206,50 +206,13 @@ typedef struct { #define Screen_DefaultFlags (Screen_VisibleCursor | Screen_Autowrap) /* rxvt_vars.options */ -#define Opt_console (1UL<<0) -#define Opt_loginShell (1UL<<1) -#define Opt_iconic (1UL<<2) -#define Opt_visualBell (1UL<<3) -#define Opt_mapAlert (1UL<<4) -#define Opt_reverseVideo (1UL<<5) -#define Opt_utmpInhibit (1UL<<6) -#define Opt_scrollBar (1UL<<7) -#define Opt_scrollBar_right (1UL<<8) -#define Opt_scrollBar_floating (1UL<<9) -#define Opt_meta8 (1UL<<10) -#define Opt_scrollTtyOutput (1UL<<11) -#define Opt_scrollTtyKeypress (1UL<<12) -#define Opt_transparent (1UL<<13) -#define Opt_tripleclickwords (1UL<<14) -#define Opt_scrollWithBuffer (1UL<<15) -#define Opt_jumpScroll (1UL<<16) -#define Opt_mouseWheelScrollPage (1UL<<17) -#if POINTER_BLANK -# define Opt_pointerBlank (1UL<<18) -#else -# define Opt_pointerBlank 0 -#endif -#define Opt_cursorBlink (1UL<<19) -#define Opt_secondaryScreen (1UL<<20) -#define Opt_secondaryScroll (1UL<<21) -#define Opt_pastableTabs (1UL<<22) -#define Opt_cursorUnderline (1UL<<23) -#if ENABLE_FRILLS -# define Opt_insecure (1UL<<24) // insecure esc sequences -# define Opt_borderLess (1UL<<25) // mwm borderless hints -# define Opt_hold (1UL<<26) // hold window open after exit -# define Opt_skipBuiltinGlyphs (1UL<<27) // do not use internal glyphs -#else -# define Opt_insecure 0 -# define Opt_borderLess 0 -# define Opt_hold 0 -# define Opt_skipBuiltinGlyphs 0 -#endif -#if ENABLE_STYLES -# define Opt_intensityStyles (1UL<<28) // font styles imply intensity -#else -# define Opt_intensityStyles 0 -#endif +enum { +# define def(name,idx) Opt_ ## name = 1UL << (idx), +# define nodef(name) Opt_ ## name = 0, +# include "optinc.h" +# undef nodef +# undef def +}; #define SET_OPTION(opt) (options |= (opt)) #define CLR_OPTION(opt) (options &= ~(opt)) diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index e8fab150..1ba83c3a 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -586,15 +586,22 @@ PROTOTYPES: ENABLE 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 @@ BOOT: 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 * -- 2.34.1