*** empty log message ***
authorroot <root>
Mon, 2 Jan 2006 17:17:02 +0000 (17:17 +0000)
committerroot <root>
Mon, 2 Jan 2006 17:17:02 +0000 (17:17 +0000)
MANIFEST
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
reconf
src/Makefile.in
src/rsinc.h [new file with mode: 0644]
src/rxvt.h
src/rxvtperl.xs
src/urxvt.pm

index f3a6b1f6498918f055f95c773ae91abd3f9c37bc..25be7362e241d7d98007144cef9e2c2d71a72031 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -98,6 +98,7 @@ src/rxvtfont.C
 src/rxvtfont.h
 src/rxvt.C
 src/rxvt.h
+src/rsinc.h
 src/rxvtc.C
 src/rxvtd.C
 src/rxvtdaemon.C
index bb91b270b6144c69ba37688a195a582fffe4a309..f23d159f9ce836ee75d5f9908da8935f029541c2 100644 (file)
                <li><a href="#the_urxvt__iow_class">The <code>urxvt::iow</code> Class</a></li>
        </ul>
 
+       <li><a href="#environment">ENVIRONMENT</a></li>
+       <ul>
+
+               <li><a href="#urxvt_perl_verbosity">URXVT_PERL_VERBOSITY</a></li>
+       </ul>
+
        <li><a href="#author">AUTHOR</a></li>
 </ul>
 <!-- INDEX END -->
@@ -205,6 +211,48 @@ Returns the ``current time'' (as per the event loop).
 </p>
 <h2><a name="the_urxvt__term_class">The <code>urxvt::term</code> Class</a></h2>
 <dl>
+<dt><strong><a name="item_resource">$value = $term-&gt;resource ($name[, $newval])</a></strong><br />
+</dt>
+<dd>
+Returns the current resource value associated with a given name and
+optionally sets a new value. Setting values is most useful in the <code>init</code>
+hook. Unset resources are returned and accepted as <code>undef</code>.
+</dd>
+<dd>
+<p>The new value must be properly encoded to a suitable character encoding
+before passing it to this method. Similarly, the returned value may need
+to be converted from the used encoding to text.</p>
+</dd>
+<dd>
+<p>Resource names are as defined in <em>src/rsinc.h</em>. Colours can be specified
+as resource names of the form <code>color+&lt;index&gt;</code>, e.g. <code>color+5</code>. (will
+likely change).</p>
+</dd>
+<dd>
+<p>Please note that resource strings will currently only be freed when the
+terminal is destroyed, so changing options frequently will eat memory.</p>
+</dd>
+<dd>
+<p>Here is a a likely non-exhaustive list of resource names, not all of which
+are supported in every build, please see the source to see the actual
+list:</p>
+</dd>
+<dd>
+<pre>
+  answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont
+  borderLess color cursorBlink cursorUnderline cutchars delete_key
+  display_name embed ext_bwidth fade font geometry hold iconName
+  imFont imLocale inputMethod insecure int_bwidth intensityStyles
+  italicFont jumpScroll lineSpace loginShell mapAlert menu meta8
+  modifier mouseWheelScrollPage name pastableTabs path pointerBlank
+  pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines
+  scrollBar scrollBar_align scrollBar_floating scrollBar_right
+  scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer
+  scrollstyle secondaryScreen secondaryScroll selectstyle shade term_name
+  title transparent transparent_all tripleclickwords utmpInhibit
+  visualBell</pre>
+</dd>
+<p></p>
 <dt><strong><a name="item_selection_mark">($row, $col) = $term-&gt;selection_mark ([$row, $col])</a></strong><br />
 </dt>
 <dt><strong><a name="item_selection_beg">($row, $col) = $term-&gt;selection_beg ([$row, $col])</a></strong><br />
@@ -382,6 +430,23 @@ Stop watching for events on the given filehandle.
 <p>
 </p>
 <hr />
+<h1><a name="environment">ENVIRONMENT</a></h1>
+<p>
+</p>
+<h2><a name="urxvt_perl_verbosity">URXVT_PERL_VERBOSITY</a></h2>
+<p>This variable controls the verbosity level of the perl extension. Higher
+numbers indicate more verbose output.</p>
+<ol>
+<li><strong><a name="item__2d_only_fatal_messages">- only fatal messages</a></strong><br />
+</li>
+<li><strong><a name="item__2d_script_loading_and_management">- script loading and management</a></strong><br />
+</li>
+<li><strong><a name="item__2d_all_events_received">- all events received</a></strong><br />
+</li>
+</ol>
+<p>
+</p>
+<hr />
 <h1><a name="author">AUTHOR</a></h1>
 <pre>
  Marc Lehmann &lt;pcg@goof.com&gt;
index e607e05515525edb5724992093dbdd8d39f4669b..df2fc6e93f08a83481af472e3170d25b1c225cb5 100644 (file)
@@ -267,6 +267,42 @@ Returns the \*(L"current time\*(R" (as per the event loop).
 .ie n .Sh "The ""urxvt::term"" Class"
 .el .Sh "The \f(CWurxvt::term\fP Class"
 .IX Subsection "The urxvt::term Class"
+.ie n .IP "$value = $term\fR\->resource ($name[, \f(CW$newval])" 4
+.el .IP "$value = \f(CW$term\fR\->resource ($name[, \f(CW$newval\fR])" 4
+.IX Item "$value = $term->resource ($name[, $newval])"
+Returns the current resource value associated with a given name and
+optionally sets a new value. Setting values is most useful in the \f(CW\*(C`init\*(C'\fR
+hook. Unset resources are returned and accepted as \f(CW\*(C`undef\*(C'\fR.
+.Sp
+The new value must be properly encoded to a suitable character encoding
+before passing it to this method. Similarly, the returned value may need
+to be converted from the used encoding to text.
+.Sp
+Resource names are as defined in \fIsrc/rsinc.h\fR. Colours can be specified
+as resource names of the form \f(CW\*(C`color+<index>\*(C'\fR, e.g. \f(CW\*(C`color+5\*(C'\fR. (will
+likely change).
+.Sp
+Please note that resource strings will currently only be freed when the
+terminal is destroyed, so changing options frequently will eat memory.
+.Sp
+Here is a a likely non-exhaustive list of resource names, not all of which
+are supported in every build, please see the source to see the actual
+list:
+.Sp
+.Vb 12
+\&  answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont
+\&  borderLess color cursorBlink cursorUnderline cutchars delete_key
+\&  display_name embed ext_bwidth fade font geometry hold iconName
+\&  imFont imLocale inputMethod insecure int_bwidth intensityStyles
+\&  italicFont jumpScroll lineSpace loginShell mapAlert menu meta8
+\&  modifier mouseWheelScrollPage name pastableTabs path pointerBlank
+\&  pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines
+\&  scrollBar scrollBar_align scrollBar_floating scrollBar_right
+\&  scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer
+\&  scrollstyle secondaryScreen secondaryScroll selectstyle shade term_name
+\&  title transparent transparent_all tripleclickwords utmpInhibit
+\&  visualBell
+.Ve
 .ie n .IP "($row, $col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col])" 4
 .el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col\fR])" 4
 .IX Item "($row, $col) = $term->selection_mark ([$row, $col])"
@@ -402,6 +438,20 @@ Start watching for requested events on the given handle.
 .el .IP "$iow = \f(CW$iow\fR\->stop" 4
 .IX Item "$iow = $iow->stop"
 Stop watching for events on the given filehandle.
+.SH "ENVIRONMENT"
+.IX Header "ENVIRONMENT"
+.Sh "\s-1URXVT_PERL_VERBOSITY\s0"
+.IX Subsection "URXVT_PERL_VERBOSITY"
+This variable controls the verbosity level of the perl extension. Higher
+numbers indicate more verbose output.
+.IP "0 \- only fatal messages" 4
+.IX Item "0 - only fatal messages"
+.PD 0
+.IP "3 \- script loading and management" 4
+.IX Item "3 - script loading and management"
+.IP "10 \- all events received" 4
+.IX Item "10 - all events received"
+.PD
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 .Vb 2
diff --git a/reconf b/reconf
index fb5bed9f37cb332fc7d3a024f6d4a46ad9376304..a561e7ad676323e5a9ff08dc4498850f66fe43b1 100755 (executable)
--- a/reconf
+++ b/reconf
@@ -10,6 +10,6 @@ if [ "x$HOSTNAME" = xcerebro -o "x$HOSTNAME" = xfuji ]; then
    export CC CXX
 fi
 
-./configure --prefix=/opt/rxvt --with-name=rxvt \
+./configure --prefix=/opt/rxvt --with-name=rxvt --enable-perl \
             --enable-transparency --enable-menubar --enable-xpm-background --enable-xgetdefault \
             "$@"
index e404bb99a288d8c10a42f3102d629f261117beaa..695c01689a3d08b9c7bf8f106b6304151e47e9a4 100644 (file)
@@ -123,7 +123,8 @@ depend:
 
 command.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 command.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-command.o: salloc.h menubar.h rxvtperl.h version.h command.h keyboard.h
+command.o: salloc.h rsinc.h menubar.h rxvtperl.h version.h command.h
+command.o: keyboard.h
 encoding.o: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
 encoding.o: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
 encoding.o: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
@@ -141,82 +142,83 @@ encoding.o: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
 encoding.o: table/compose.h table/category.h
 fdpass.o: ../config.h fdpass.h
 init.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h rxvtfont.h
-init.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+init.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h rsinc.h
 init.o: menubar.h init.h
 iom.o: iom.h iom_conf.h rxvtutil.h callback.h
 keyboard.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 keyboard.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-keyboard.o: salloc.h menubar.h keyboard.h command.h
+keyboard.o: salloc.h rsinc.h menubar.h keyboard.h command.h
 logging.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 logging.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-logging.o: salloc.h menubar.h logging.h
+logging.o: salloc.h rsinc.h menubar.h logging.h
 main.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h rxvtfont.h
-main.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+main.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h rsinc.h
 main.o: menubar.h keyboard.h rxvtperl.h
 menubar.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 menubar.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-menubar.o: salloc.h menubar.h version.h
+menubar.o: salloc.h rsinc.h menubar.h version.h
 misc.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h rxvtfont.h
-misc.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+misc.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h rsinc.h
 misc.o: menubar.h
 netdisp.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 netdisp.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-netdisp.o: salloc.h menubar.h
+netdisp.o: salloc.h rsinc.h menubar.h
 ptytty.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 ptytty.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-ptytty.o: salloc.h menubar.h
+ptytty.o: salloc.h rsinc.h menubar.h
 rxvt.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h rxvtfont.h
-rxvt.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+rxvt.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h rsinc.h
 rxvt.o: menubar.h
 rxvtc.o: ../config.h rxvtdaemon.h rxvtutil.h fdpass.h rxvt.h rxvtlib.h
 rxvtc.o: ptytty.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
-rxvtc.o: iom_conf.h callback.h salloc.h menubar.h
+rxvtc.o: iom_conf.h callback.h salloc.h rsinc.h menubar.h
 rxvtd.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvtd.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtd.o: salloc.h menubar.h rxvtdaemon.h fdpass.h
+rxvtd.o: salloc.h rsinc.h menubar.h rxvtdaemon.h fdpass.h
 rxvtdaemon.o: rxvtdaemon.h rxvtutil.h
 rxvtfont.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvtfont.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtfont.o: salloc.h menubar.h table/linedraw.h
+rxvtfont.o: salloc.h rsinc.h menubar.h table/linedraw.h
 rxvtperl.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvtperl.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtperl.o: salloc.h menubar.h rxvtperl.h perlxsi.c
+rxvtperl.o: salloc.h rsinc.h menubar.h rxvtperl.h perlxsi.c
 rxvttoolkit.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvttoolkit.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-rxvttoolkit.o: callback.h salloc.h menubar.h
+rxvttoolkit.o: callback.h salloc.h rsinc.h menubar.h
 rxvtutil.o: rxvtutil.h
 salloc.o: salloc.h
 screen.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 screen.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-screen.o: salloc.h menubar.h rxvtperl.h salloc.C
+screen.o: salloc.h rsinc.h menubar.h rxvtperl.h salloc.C
 scrollbar-next.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar-next.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-next.o: callback.h salloc.h menubar.h
+scrollbar-next.o: callback.h salloc.h rsinc.h menubar.h
 scrollbar-plain.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar-plain.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-plain.o: callback.h salloc.h menubar.h
+scrollbar-plain.o: callback.h salloc.h rsinc.h menubar.h
 scrollbar-rxvt.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar-rxvt.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-rxvt.o: callback.h salloc.h menubar.h
+scrollbar-rxvt.o: callback.h salloc.h rsinc.h menubar.h
 scrollbar-xterm.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar-xterm.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-xterm.o: callback.h salloc.h menubar.h
+scrollbar-xterm.o: callback.h salloc.h rsinc.h menubar.h
 scrollbar.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-scrollbar.o: salloc.h menubar.h
+scrollbar.o: salloc.h rsinc.h menubar.h
 strings.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 strings.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-strings.o: salloc.h menubar.h
+strings.o: salloc.h rsinc.h menubar.h
 xdefaults.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 xdefaults.o: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-xdefaults.o: salloc.h menubar.h version.h keyboard.h
+xdefaults.o: salloc.h rsinc.h menubar.h version.h keyboard.h
 xpm.o: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h rxvtfont.h
-xpm.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+xpm.o: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h rsinc.h
 xpm.o: menubar.h
 
 command.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 command.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-command.lo: salloc.h menubar.h rxvtperl.h version.h command.h keyboard.h
+command.lo: salloc.h rsinc.h menubar.h rxvtperl.h version.h command.h
+command.lo: keyboard.h
 encoding.lo: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
 encoding.lo: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
 encoding.lo: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
@@ -235,74 +237,74 @@ encoding.lo: table/compose.h table/category.h
 fdpass.lo: ../config.h fdpass.h
 init.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 init.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-init.lo: salloc.h menubar.h init.h
+init.lo: salloc.h rsinc.h menubar.h init.h
 iom.lo: iom.h iom_conf.h rxvtutil.h callback.h
 keyboard.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 keyboard.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-keyboard.lo: salloc.h menubar.h keyboard.h command.h
+keyboard.lo: salloc.h rsinc.h menubar.h keyboard.h command.h
 logging.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 logging.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-logging.lo: salloc.h menubar.h logging.h
+logging.lo: salloc.h rsinc.h menubar.h logging.h
 main.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 main.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-main.lo: salloc.h menubar.h keyboard.h rxvtperl.h
+main.lo: salloc.h rsinc.h menubar.h keyboard.h rxvtperl.h
 menubar.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 menubar.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-menubar.lo: salloc.h menubar.h version.h
+menubar.lo: salloc.h rsinc.h menubar.h version.h
 misc.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 misc.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-misc.lo: salloc.h menubar.h
+misc.lo: salloc.h rsinc.h menubar.h
 netdisp.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 netdisp.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-netdisp.lo: salloc.h menubar.h
+netdisp.lo: salloc.h rsinc.h menubar.h
 ptytty.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 ptytty.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-ptytty.lo: salloc.h menubar.h
+ptytty.lo: salloc.h rsinc.h menubar.h
 rxvt.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvt.lo: salloc.h menubar.h
+rxvt.lo: salloc.h rsinc.h menubar.h
 rxvtc.lo: ../config.h rxvtdaemon.h rxvtutil.h fdpass.h rxvt.h rxvtlib.h
 rxvtc.lo: ptytty.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
-rxvtc.lo: iom_conf.h callback.h salloc.h menubar.h
+rxvtc.lo: iom_conf.h callback.h salloc.h rsinc.h menubar.h
 rxvtd.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvtd.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtd.lo: salloc.h menubar.h rxvtdaemon.h fdpass.h
+rxvtd.lo: salloc.h rsinc.h menubar.h rxvtdaemon.h fdpass.h
 rxvtdaemon.lo: rxvtdaemon.h rxvtutil.h
 rxvtfont.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvtfont.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtfont.lo: salloc.h menubar.h table/linedraw.h
+rxvtfont.lo: salloc.h rsinc.h menubar.h table/linedraw.h
 rxvtperl.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvtperl.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-rxvtperl.lo: salloc.h menubar.h rxvtperl.h perlxsi.c
+rxvtperl.lo: salloc.h rsinc.h menubar.h rxvtperl.h perlxsi.c
 rxvttoolkit.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 rxvttoolkit.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-rxvttoolkit.lo: callback.h salloc.h menubar.h
+rxvttoolkit.lo: callback.h salloc.h rsinc.h menubar.h
 rxvtutil.lo: rxvtutil.h
 salloc.lo: salloc.h
 screen.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 screen.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-screen.lo: salloc.h menubar.h rxvtperl.h salloc.C
+screen.lo: salloc.h rsinc.h menubar.h rxvtperl.h salloc.C
 scrollbar-next.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar-next.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-next.lo: callback.h salloc.h menubar.h
+scrollbar-next.lo: callback.h salloc.h rsinc.h menubar.h
 scrollbar-plain.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h
 scrollbar-plain.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-plain.lo: iom_conf.h callback.h salloc.h menubar.h
+scrollbar-plain.lo: iom_conf.h callback.h salloc.h rsinc.h menubar.h
 scrollbar-rxvt.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar-rxvt.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-rxvt.lo: callback.h salloc.h menubar.h
+scrollbar-rxvt.lo: callback.h salloc.h rsinc.h menubar.h
 scrollbar-xterm.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h
 scrollbar-xterm.lo: encoding.h rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h
-scrollbar-xterm.lo: iom_conf.h callback.h salloc.h menubar.h
+scrollbar-xterm.lo: iom_conf.h callback.h salloc.h rsinc.h menubar.h
 scrollbar.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 scrollbar.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-scrollbar.lo: salloc.h menubar.h
+scrollbar.lo: salloc.h rsinc.h menubar.h
 strings.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 strings.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-strings.lo: salloc.h menubar.h
+strings.lo: salloc.h rsinc.h menubar.h
 xdefaults.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h
 xdefaults.lo: rxvtfont.h rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h
-xdefaults.lo: salloc.h menubar.h version.h keyboard.h
+xdefaults.lo: salloc.h rsinc.h menubar.h version.h keyboard.h
 xpm.lo: ../config.h rxvt.h rxvtlib.h ptytty.h feature.h encoding.h rxvtfont.h
-xpm.lo: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h
+xpm.lo: rxvtutil.h rxvttoolkit.h iom.h iom_conf.h callback.h salloc.h rsinc.h
 xpm.lo: menubar.h
diff --git a/src/rsinc.h b/src/rsinc.h
new file mode 100644 (file)
index 0000000..b66b36b
--- /dev/null
@@ -0,0 +1,105 @@
+// all resource indices, used by rxvt.h anf rxvtperl.xs
+
+  Rs_def(display_name)
+  Rs_def(term_name)
+  Rs_def(iconName)
+  Rs_def(geometry)
+  Rs_def(reverseVideo)
+  Rs_def(color)
+  Rs_reserve(color, NRS_COLORS)
+  Rs_def(font)
+#if ENABLE_STYLES
+  Rs_def(boldFont)
+  Rs_def(italicFont)
+  Rs_def(boldItalicFont)
+  Rs_def(intensityStyles)
+#endif
+  Rs_def(name)
+  Rs_def(title)
+#if defined (XPM_BACKGROUND) || (MENUBAR_MAX)
+  Rs_def(path)
+#endif
+#ifdef XPM_BACKGROUND
+  Rs_def(backgroundPixmap)
+#endif
+#if (MENUBAR_MAX)
+  Rs_def(menu)
+#endif
+  Rs_def(loginShell)
+  Rs_def(jumpScroll)
+#ifdef HAVE_SCROLLBARS
+  Rs_def(scrollBar)
+  Rs_def(scrollBar_right)
+  Rs_def(scrollBar_floating)
+  Rs_def(scrollBar_align)
+  Rs_def(scrollstyle)
+  Rs_def(scrollBar_thickness)
+#endif
+  Rs_def(scrollTtyOutput)
+  Rs_def(scrollTtyKeypress)
+  Rs_def(scrollWithBuffer)
+  Rs_def(saveLines)
+  Rs_def(utmpInhibit)
+  Rs_def(visualBell)
+#if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION)
+  Rs_def(mapAlert)
+#endif
+#ifdef META8_OPTION
+  Rs_def(meta8)
+#endif
+#ifdef MOUSE_WHEEL
+  Rs_def(mouseWheelScrollPage)
+#endif
+#ifndef NO_BACKSPACE_KEY
+  Rs_def(backspace_key)
+#endif
+#ifndef NO_DELETE_KEY
+  Rs_def(delete_key)
+#endif
+  Rs_def(selectstyle)
+#ifdef PRINTPIPE
+  Rs_def(print_pipe)
+#endif
+#ifdef USE_XIM
+  Rs_def(preeditType)
+  Rs_def(inputMethod)
+#endif
+#ifdef TRANSPARENT
+  Rs_def(transparent)
+  Rs_def(transparent_all)
+#endif
+#if ENABLE_FRILLS
+  Rs_def(pty_fd)
+  Rs_def(hold)
+  Rs_def(ext_bwidth)
+  Rs_def(int_bwidth)
+  Rs_def(borderLess)
+  Rs_def(lineSpace)
+  Rs_def(cursorUnderline)
+#endif
+#if CURSOR_BLINK
+  Rs_def(cursorBlink)
+#endif
+#if ENABLE_XEMBED
+  Rs_def(embed)
+#endif
+  Rs_def(cutchars)
+  Rs_def(modifier)
+  Rs_def(answerbackstring)
+  Rs_def(tripleclickwords)
+  Rs_def(insecure)
+  Rs_def(pointerBlank)
+  Rs_def(pointerBlankDelay)
+  Rs_def(imLocale)
+  Rs_def(imFont)
+  Rs_def(pastableTabs)
+#ifndef NO_SECONDARY_SCREEN
+  Rs_def(secondaryScreen)
+  Rs_def(secondaryScroll)
+#endif
+#ifdef OFF_FOCUS_FADING
+  Rs_def(fade)
+#endif
+#ifdef TINTING
+  Rs_def(shade)
+#endif
index 6610d48f09dbcdca327b0a8e2131621bd8496037..9f91482f675a21f8d3dc675915e6b651d676581e 100644 (file)
@@ -557,109 +557,11 @@ enum colour_list {
  * Resource list
  */
 enum {
-  Rs_display_name = 0,
-  Rs_term_name,
-  Rs_iconName,
-  Rs_geometry,
-  Rs_reverseVideo,
-  Rs_color,
-  _Rs_color = Rs_color + NRS_COLORS - 1,
-  Rs_font,
-#if ENABLE_STYLES
-  Rs_boldFont,
-  Rs_italicFont,
-  Rs_boldItalicFont,
-  Rs_intensityStyles,
-#endif
-  Rs_name,
-  Rs_title,
-#if defined (XPM_BACKGROUND) || (MENUBAR_MAX)
-  Rs_path,
-#endif
-#ifdef XPM_BACKGROUND
-  Rs_backgroundPixmap,
-#endif
-#if (MENUBAR_MAX)
-  Rs_menu,
-#endif
-  Rs_loginShell,
-  Rs_jumpScroll,
-#ifdef HAVE_SCROLLBARS
-  Rs_scrollBar,
-  Rs_scrollBar_right,
-  Rs_scrollBar_floating,
-  Rs_scrollBar_align,
-  Rs_scrollstyle,     /* Rs_scrollBar_style */
-  Rs_scrollBar_thickness,
-#endif
-  Rs_scrollTtyOutput,
-  Rs_scrollTtyKeypress,
-  Rs_scrollWithBuffer,
-  Rs_saveLines,
-  Rs_utmpInhibit,
-  Rs_visualBell,
-#if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION)
-  Rs_mapAlert,
-#endif
-#ifdef META8_OPTION
-  Rs_meta8,
-#endif
-#ifdef MOUSE_WHEEL
-  Rs_mouseWheelScrollPage,
-#endif
-#ifndef NO_BACKSPACE_KEY
-  Rs_backspace_key,
-#endif
-#ifndef NO_DELETE_KEY
-  Rs_delete_key,
-#endif
-  Rs_selectstyle,
-#ifdef PRINTPIPE
-  Rs_print_pipe,
-#endif
-#ifdef USE_XIM
-  Rs_preeditType,
-  Rs_inputMethod,
-#endif
-#ifdef TRANSPARENT
-  Rs_transparent,
-  Rs_transparent_all,
-#endif
-#if ENABLE_FRILLS
-  Rs_pty_fd,
-  Rs_hold,
-  Rs_ext_bwidth,
-  Rs_int_bwidth,
-  Rs_borderLess,
-  Rs_lineSpace,
-  Rs_cursorUnderline,
-#endif
-#if CURSOR_BLINK
-  Rs_cursorBlink,
-#endif
-#if ENABLE_XEMBED
-  Rs_embed,
-#endif
-  Rs_cutchars,
-  Rs_modifier,
-  Rs_answerbackstring,
-  Rs_tripleclickwords,
-  Rs_insecure,
-  Rs_pointerBlank,
-  Rs_pointerBlankDelay,
-  Rs_imLocale,
-  Rs_imFont,
-  Rs_pastableTabs,
-#ifndef NO_SECONDARY_SCREEN
-  Rs_secondaryScreen,
-  Rs_secondaryScroll,
-#endif
-#ifdef OFF_FOCUS_FADING
-  Rs_fade,
-#endif
-#ifdef TINTING
-  Rs_shade,
-#endif
+#define Rs_def(name) Rs_ ## name,
+#define Rs_reserve(name,count) Rs_ ## name ## _ = Rs_ ## name + (count) - 1,
+#include "rsinc.h"
+#undef Rs_def
+#undef Rs_reserve
   NUM_RESOURCES
 };
 
index 8ebd07908d4aa53e10c7c5d94f9730b94d22ff73..23945bd59600cf0570adbc2d74086f31279f7129 100644 (file)
@@ -346,6 +346,46 @@ NOW ()
 
 MODULE = urxvt             PACKAGE = urxvt::term
 
+void
+rxvt_term::_resource (char *name, int index, SV *newval = 0)
+       PPCODE:
+{
+       struct resval { const char *name; int value; } rslist [] = {
+#        define Rs_def(name) { # name, Rs_ ## name },
+#        define Rs_reserve(name,count)
+#        include "rsinc.h"
+#        undef Rs_def
+#        undef Rs_reserve
+        };
+
+        struct resval *rs = rslist + sizeof (rslist) / sizeof (rslist [0]);
+
+        do {
+          if (rs-- == rslist)
+            croak ("no such resource '%s', requested", name);
+        } while (strcmp (name, rs->name));
+
+        index += rs->value;
+
+        if (!IN_RANGE_EXC (index, 0, NUM_RESOURCES))
+          croak ("requested out-of-bound resource %s+%d,", name, index - rs->value);
+
+        if (GIMME_V != G_VOID)
+          XPUSHs (THIS->rs [index] ? sv_2mortal (newSVpv (THIS->rs [index], 0)) : &PL_sv_undef);
+
+        if (newval)
+          {
+            if (SvOK (newval))
+              {
+                char *str = strdup (SvPVbyte_nolen (newval));
+                THIS->rs [index] = str;
+                THIS->allocated.push_back (str);
+              }
+            else
+              THIS->rs [index] = 0;
+          }
+}
+
 void
 rxvt_term::selection_mark (...)
        PROTOTYPE: $;$$
index 3eb2c4416923cbf60f0793616eb4bdbe33095e99..5f20d721f56094aa0f5ab616d02e6becd504adeb 100644 (file)
@@ -252,6 +252,23 @@ likely change).
 Please note that resource strings will currently only be freed when the
 terminal is destroyed, so changing options frequently will eat memory.
 
+Here is a a likely non-exhaustive list of resource names, not all of which
+are supported in every build, please see the source to see the actual
+list:
+
+  answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont
+  borderLess color cursorBlink cursorUnderline cutchars delete_key
+  display_name embed ext_bwidth fade font geometry hold iconName
+  imFont imLocale inputMethod insecure int_bwidth intensityStyles
+  italicFont jumpScroll lineSpace loginShell mapAlert menu meta8
+  modifier mouseWheelScrollPage name pastableTabs path pointerBlank
+  pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines
+  scrollBar scrollBar_align scrollBar_floating scrollBar_right
+  scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer
+  scrollstyle secondaryScreen secondaryScroll selectstyle shade term_name
+  title transparent transparent_all tripleclickwords utmpInhibit
+  visualBell
+
 =cut
 
 sub urxvt::term::resource($$;$) {