From 5adbc2fce142182cdb4265e3054d0629c1faae17 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Jan 2006 01:36:56 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 17 ++++++----- doc/rxvt.1.html | 14 +++++++-- doc/rxvt.1.man.in | 13 ++++++--- doc/rxvt.1.pod | 4 +++ doc/rxvt.1.txt | 9 ++++-- doc/rxvtperl.3.html | 66 ++++++++++++++++++++++++++++++++++--------- doc/rxvtperl.3.man.in | 54 +++++++++++++++++++++++++---------- doc/rxvtperl.3.txt | 41 ++++++++++++++++++++------- src/rxvtperl.xs | 2 +- src/urxvt.pm | 33 ++++++++++++++++++---- 10 files changed, 191 insertions(+), 62 deletions(-) diff --git a/Changes b/Changes index 1e4f5f0e..81d12f9b 100644 --- a/Changes +++ b/Changes @@ -9,20 +9,19 @@ WISH: OnTheSpot editing, or maybe switch to miiiiiiif WISH: just for fun, do shade and tint with XRender. WISH: support tex fonts -TODO: document transient_for, vt and the grab etc. functionality - - - perl: implement additional hook: line_update, add_lines. + - selection, selection-popup and option-popup extensions + enabled by default. + - perl: much increased functionality, better overlays, popup support + and much much more. - perl: urxvt::line now can set via ->t and ->r. - perl: changed interpretation of --perl-ext-common and -pe. - perl: finally implemented --perl-eval. - - perl: much increased functionality, better overlays, popup support - and much much more. - - perl: anyevent support. - - perl: run tainted and ignore perl-eval/perl-lib if installed + - perl: non-blocking anyevent support. + - perl: run tainted and ignore perl-eval/perl-lib if started setuid/setgid. - - free the resource database: this plugs a massive memory hole. as a + - free the resource database: this plugs a massive memory leak. As a side effect, it also gets rid of XGetDefault calls. - - free one of the cursors, fixes a small memory leaks. + - free one of the cursors, fixes a small memory leak. 6.3 Wed Jan 4 22:37:10 CET 2006 - SECURITY FIX: on systems using openpty, permissions were diff --git a/doc/rxvt.1.html b/doc/rxvt.1.html index 503dea3d..322a8983 100644 --- a/doc/rxvt.1.html +++ b/doc/rxvt.1.html @@ -1479,8 +1479,9 @@ all instances, while perl-ext is used for specific instances.perl-eval: string
-Perl code to be evaluated when all extensions have been registered. See the -rxvtperl(3) manpage. +Perl code to be evaluated when all extensions have been registered. See +the rxvtperl(3) manpage. Due to security reasons, this resource +will be ignored when running setuid/setgid.

perl-lib: path
@@ -1489,11 +1490,18 @@ Perl code to be evaluated when all extensions have been registered. See the Colon-separated list of additional directories that hold extension scripts. When looking for extensions specified by the perl resource, rxvt will first look in these directories and then in -/opt/rxvt/lib/urxvt/perl/. +/opt/rxvt/lib/urxvt/perl/. Due to security reasons, this resource +will be ignored when running setuid/setgid.

See the rxvtperl(3) manpage.

+

+
transient-for: windowid
+
+
+Sets the WM_TRANSIENT_FOR property to the given window iw. +

diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in index 6ca90217..27119dd0 100644 --- a/doc/rxvt.1.man.in +++ b/doc/rxvt.1.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 1" -.TH rxvt 1 "2006-01-08" "6.3" "RXVT-UNICODE" +.TH rxvt 1 "2006-01-09" "6.3" "RXVT-UNICODE" .SH "NAME" rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system) .SH "SYNOPSIS" @@ -1130,16 +1130,21 @@ interpreter will not be initialized. The idea behind two options is that all instances, while \fBperl-ext\fR is used for specific instances. .IP "\fBperl-eval\fR: \fIstring\fR" 4 .IX Item "perl-eval: string" -Perl code to be evaluated when all extensions have been registered. See the -@@RXVT_NAME@@\fIperl\fR\|(3) manpage. +Perl code to be evaluated when all extensions have been registered. See +the @@RXVT_NAME@@\fIperl\fR\|(3) manpage. Due to security reasons, this resource +will be ignored when running setuid/setgid. .IP "\fBperl-lib\fR: \fIpath\fR" 4 .IX Item "perl-lib: path" Colon-separated list of additional directories that hold extension scripts. When looking for extensions specified by the \f(CW\*(C`perl\*(C'\fR resource, @@RXVT_NAME@@ will first look in these directories and then in -\&\fI@@RXVT_LIBDIR@@/urxvt/perl/\fR. +\&\fI@@RXVT_LIBDIR@@/urxvt/perl/\fR. Due to security reasons, this resource +will be ignored when running setuid/setgid. .Sp See the @@RXVT_NAME@@\fIperl\fR\|(3) manpage. +.IP "\fBtransient-for\fR: \fIwindowid\fR" 4 +.IX Item "transient-for: windowid" +Sets the \s-1WM_TRANSIENT_FOR\s0 property to the given window iw. .SH "THE SCROLLBAR" .IX Header "THE SCROLLBAR" Lines of text that scroll off the top of the \fB@@RXVT_NAME@@\fR window diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 665a003a..b3d1bb9f 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -1119,6 +1119,10 @@ will be ignored when running setuid/setgid. See the @@RXVT_NAME@@perl(3) manpage. +=item B: I + +Sets the WM_TRANSIENT_FOR property to the given window iw. + =back =head1 THE SCROLLBAR diff --git a/doc/rxvt.1.txt b/doc/rxvt.1.txt index f034ab62..45438d79 100644 --- a/doc/rxvt.1.txt +++ b/doc/rxvt.1.txt @@ -963,16 +963,21 @@ RESOURCES (available also as long-options) perl-eval: *string* Perl code to be evaluated when all extensions have been registered. - See the rxvtperl(3) manpage. + See the rxvtperl(3) manpage. Due to security reasons, this resource + will be ignored when running setuid/setgid. perl-lib: *path* Colon-separated list of additional directories that hold extension scripts. When looking for extensions specified by the "perl" resource, rxvt will first look in these directories and then in - /opt/rxvt/lib/urxvt/perl/. + /opt/rxvt/lib/urxvt/perl/. Due to security reasons, this resource + will be ignored when running setuid/setgid. See the rxvtperl(3) manpage. + transient-for: *windowid* + Sets the WM_TRANSIENT_FOR property to the given window iw. + THE SCROLLBAR Lines of text that scroll off the top of the rxvt window (resource: saveLines) and can be scrolled back using the scrollbar or by diff --git a/doc/rxvtperl.3.html b/doc/rxvtperl.3.html index de4247a9..8cd590b5 100644 --- a/doc/rxvtperl.3.html +++ b/doc/rxvtperl.3.html @@ -105,10 +105,17 @@ Rot-13 the selection when activated. Used via keyboard trigger:
option-popup (enabled by default)
-Binds a popup menu to Ctrl-Button3 that lets you toggle (some) options at +Binds a popup menu to Ctrl-Button2 that lets you toggle (some) options at runtime.

+
selection-popup (enabled by default)
+
+
+Binds a popup menu to Ctrl-Button3 that lets you convert the selection +text into various other formats/action. +
+

digital-clock
@@ -271,12 +278,6 @@ $nrow - 1) represent the lines to be scrolled out). $saved is the t number of lines that will be in the scrollback buffer.

-
on_tty_activity $term *NYI*
-
-
-Called whenever the program(s) running in the urxvt window send output. -
-

on_osc_seq $term, $string
@@ -850,7 +851,7 @@ that substr and similar functions work on screen cells and not on characters.

-

The methods $term->special_encode and $term->special_decode +

The methods $term->special_encode and $term->special_decode can be used to convert normal strings into this encoding and vice versa.

@@ -932,8 +933,7 @@ line. Translates a string offset into terminal coordinates again.

-
($row, $col) = $line->coord_of ($offset) -=item $text = $term->special_encode $string
+
$text = $term->special_encode $string
Converts a perl string into the special encoding used by rxvt-unicode, @@ -947,6 +947,46 @@ where one character corresponds to one screen cell. See Converts rxvt-unicodes text reprsentation into a perl string. See $term->ROW_t for details.
+

+
$success = $term->grab_button ($button, $modifiermask)
+
+
+Registers a synchronous button grab. See XGrabButton. +
+

+
$success = $term->grab ($eventtime[, $sync])
+
+
+Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or +synchronous ($sync is true). Also remembers the grab timestampe. +
+

+
$term->allow_events_async
+
+
+Calls XAllowEvents with AsyncBoth for the most recent grab. +
+

+
$term->allow_events_sync
+
+
+Calls XAllowEvents with SyncBoth for the most recent grab. +
+

+
$term->allow_events_replay
+
+
+Calls XAllowEvents with both ReplayPointer and ReplayKeyboard for the most +recent grab. +
+

+
$term->ungrab
+
+
+Calls XUngrab for the most recent grab. Is called automatically on +evaluation errors, as it is better to lose the grab in the error case as +the session. +

@@ -1083,11 +1123,11 @@ Stop watching for events on the given filehandle.

This variable controls the verbosity level of the perl extension. Higher numbers indicate more verbose output.

-
=0 - only fatal messages
+
== 0 - fatal messages
-
=3 - script loading and management
+
>= 3 - script loading and management
-
=10 - all events received
+
>=10 - all events received

diff --git a/doc/rxvtperl.3.man.in b/doc/rxvtperl.3.man.in index ff55a652..4feb99a7 100644 --- a/doc/rxvtperl.3.man.in +++ b/doc/rxvtperl.3.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 3" -.TH rxvt 3 "2006-01-08" "6.3" "RXVT-UNICODE" +.TH rxvt 3 "2006-01-09" "6.3" "RXVT-UNICODE" .SH "NAME" @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter .SH "SYNOPSIS" @@ -193,8 +193,12 @@ Rot\-13 the selection when activated. Used via keyboard trigger: .RE .IP "option-popup (enabled by default)" 4 .IX Item "option-popup (enabled by default)" -Binds a popup menu to Ctrl\-Button3 that lets you toggle (some) options at +Binds a popup menu to Ctrl\-Button2 that lets you toggle (some) options at runtime. +.IP "selection-popup (enabled by default)" 4 +.IX Item "selection-popup (enabled by default)" +Binds a popup menu to Ctrl\-Button3 that lets you convert the selection +text into various other formats/action. .IP "digital-clock" 4 .IX Item "digital-clock" Displays a digital clock using the built-in overlay. @@ -317,10 +321,6 @@ than the scroll back buffer or the terminal. It is called before lines are scrolled out (so rows 0 .. min ($lines \- 1, \&\f(CW$nrow\fR \- 1) represent the lines to be scrolled out). \f(CW$saved\fR is the total number of lines that will be in the scrollback buffer. -.ie n .IP "on_tty_activity $term *NYI*" 4 -.el .IP "on_tty_activity \f(CW$term\fR *NYI*" 4 -.IX Item "on_tty_activity $term *NYI*" -Called whenever the program(s) running in the urxvt window send output. .ie n .IP "on_osc_seq $term\fR, \f(CW$string" 4 .el .IP "on_osc_seq \f(CW$term\fR, \f(CW$string\fR" 4 .IX Item "on_osc_seq $term, $string" @@ -862,9 +862,9 @@ Translates a string offset into terminal coordinates again. .RE .RS 4 .RE -.ie n .IP "($row, $col\fR) = \f(CW$line\fR\->coord_of ($offset) =item \f(CW$text\fR = \f(CW$term\fR\->special_encode \f(CW$string" 4 -.el .IP "($row, \f(CW$col\fR) = \f(CW$line\fR\->coord_of ($offset) =item \f(CW$text\fR = \f(CW$term\fR\->special_encode \f(CW$string\fR" 4 -.IX Item "($row, $col) = $line->coord_of ($offset) =item $text = $term->special_encode $string" +.ie n .IP "$text = $term\fR\->special_encode \f(CW$string" 4 +.el .IP "$text = \f(CW$term\fR\->special_encode \f(CW$string\fR" 4 +.IX Item "$text = $term->special_encode $string" Converts a perl string into the special encoding used by rxvt\-unicode, where one character corresponds to one screen cell. See \&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details. @@ -873,6 +873,30 @@ where one character corresponds to one screen cell. See .IX Item "$string = $term->special_decode $text" Converts rxvt-unicodes text reprsentation into a perl string. See \&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details. +.ie n .IP "$success = $term\fR\->grab_button ($button, \f(CW$modifiermask)" 4 +.el .IP "$success = \f(CW$term\fR\->grab_button ($button, \f(CW$modifiermask\fR)" 4 +.IX Item "$success = $term->grab_button ($button, $modifiermask)" +Registers a synchronous button grab. See XGrabButton. +.ie n .IP "$success = $term\fR\->grab ($eventtime[, \f(CW$sync])" 4 +.el .IP "$success = \f(CW$term\fR\->grab ($eventtime[, \f(CW$sync\fR])" 4 +.IX Item "$success = $term->grab ($eventtime[, $sync])" +Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or +synchronous (\f(CW$sync\fR is true). Also remembers the grab timestampe. +.IP "$term\->allow_events_async" 4 +.IX Item "$term->allow_events_async" +Calls XAllowEvents with AsyncBoth for the most recent grab. +.IP "$term\->allow_events_sync" 4 +.IX Item "$term->allow_events_sync" +Calls XAllowEvents with SyncBoth for the most recent grab. +.IP "$term\->allow_events_replay" 4 +.IX Item "$term->allow_events_replay" +Calls XAllowEvents with both ReplayPointer and ReplayKeyboard for the most +recent grab. +.IP "$term\->ungrab" 4 +.IX Item "$term->ungrab" +Calls XUngrab for the most recent grab. Is called automatically on +evaluation errors, as it is better to lose the grab in the error case as +the session. .ie n .Sh "The ""urxvt::popup"" Class" .el .Sh "The \f(CWurxvt::popup\fP Class" .IX Subsection "The urxvt::popup Class" @@ -981,13 +1005,13 @@ Stop watching for events on the given filehandle. .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" +.IP "== 0 \- fatal messages" 4 +.IX Item "== 0 - 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" +.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" .RE .RS 4 .PD diff --git a/doc/rxvtperl.3.txt b/doc/rxvtperl.3.txt index 342d6401..83ee95c2 100644 --- a/doc/rxvtperl.3.txt +++ b/doc/rxvtperl.3.txt @@ -45,9 +45,13 @@ DESCRIPTION URxvt.keysym.C-M-r: perl:selection:rot13 option-popup (enabled by default) - Binds a popup menu to Ctrl-Button3 that lets you toggle (some) + Binds a popup menu to Ctrl-Button2 that lets you toggle (some) options at runtime. + selection-popup (enabled by default) + Binds a popup menu to Ctrl-Button3 that lets you convert the + selection text into various other formats/action. + digital-clock Displays a digital clock using the built-in overlay. @@ -168,10 +172,6 @@ DESCRIPTION - 1, $nrow - 1) represent the lines to be scrolled out). $saved is the total number of lines that will be in the scrollback buffer. - on_tty_activity $term *NYI* - Called whenever the program(s) running in the urxvt window send - output. - on_osc_seq $term, $string Called whenever the ESC ] 777 ; string ST command sequence (OSC = operating system command) is processed. Cursor position and other @@ -591,8 +591,7 @@ DESCRIPTION ($row, $col) = $line->coord_of ($offset) Translates a string offset into terminal coordinates again. - ($row, $col) = $line->coord_of ($offset) =item $text = - $term->special_encode $string + $text = $term->special_encode $string Converts a perl string into the special encoding used by rxvt-unicode, where one character corresponds to one screen cell. See "$term->ROW_t" for details. @@ -601,6 +600,28 @@ DESCRIPTION Converts rxvt-unicodes text reprsentation into a perl string. See "$term->ROW_t" for details. + $success = $term->grab_button ($button, $modifiermask) + Registers a synchronous button grab. See XGrabButton. + + $success = $term->grab ($eventtime[, $sync]) + Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or + synchronous ($sync is true). Also remembers the grab timestampe. + + $term->allow_events_async + Calls XAllowEvents with AsyncBoth for the most recent grab. + + $term->allow_events_sync + Calls XAllowEvents with SyncBoth for the most recent grab. + + $term->allow_events_replay + Calls XAllowEvents with both ReplayPointer and ReplayKeyboard for + the most recent grab. + + $term->ungrab + Calls XUngrab for the most recent grab. Is called automatically on + evaluation errors, as it is better to lose the grab in the error + case as the session. + The "urxvt::popup" Class The "urxvt::timer" Class This class implements timer watchers/events. Time is represented as @@ -683,9 +704,9 @@ ENVIRONMENT This variable controls the verbosity level of the perl extension. Higher numbers indicate more verbose output. - =0 - only fatal messages - =3 - script loading and management - =10 - all events received + == 0 - fatal messages + >= 3 - script loading and management + >=10 - all events received AUTHOR Marc Lehmann diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 4e9e05dc..52d8d8c0 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -1238,7 +1238,7 @@ rxvt_term::option (U32 optval, int set = -1) RETVAL void -rxvt_term::cur (...) +rxvt_term::screen_cur (...) PROTOTYPE: $;$$ ALIAS: screen_cur = 0 diff --git a/src/urxvt.pm b/src/urxvt.pm index 6b908ec7..9a31f0ad 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -207,10 +207,6 @@ It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total number of lines that will be in the scrollback buffer. -=item on_tty_activity $term *NYI* - -Called whenever the program(s) running in the urxvt window send output. - =item on_osc_seq $term, $string Called whenever the B command sequence (OSC = @@ -1102,7 +1098,6 @@ sub urxvt::line::coord_of { ) } -=item ($row, $col) = $line->coord_of ($offset) =item $text = $term->special_encode $string Converts a perl string into the special encoding used by rxvt-unicode, @@ -1114,6 +1109,34 @@ C<< $term->ROW_t >> for details. Converts rxvt-unicodes text reprsentation into a perl string. See C<< $term->ROW_t >> for details. +=item $success = $term->grab_button ($button, $modifiermask) + +Registers a synchronous button grab. See XGrabButton. + +=item $success = $term->grab ($eventtime[, $sync]) + +Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or +synchronous (C<$sync> is true). Also remembers the grab timestampe. + +=item $term->allow_events_async + +Calls XAllowEvents with AsyncBoth for the most recent grab. + +=item $term->allow_events_sync + +Calls XAllowEvents with SyncBoth for the most recent grab. + +=item $term->allow_events_replay + +Calls XAllowEvents with both ReplayPointer and ReplayKeyboard for the most +recent grab. + +=item $term->ungrab + +Calls XUngrab for the most recent grab. Is called automatically on +evaluation errors, as it is better to lose the grab in the error case as +the session. + =back =cut -- 2.34.1