… | |
… | |
332 | newline. The module also overwrites the C<warn> builtin with a function |
332 | newline. The module also overwrites the C<warn> builtin with a function |
333 | that calls this function. |
333 | that calls this function. |
334 | |
334 | |
335 | Using this function has the advantage that its output ends up in the |
335 | Using this function has the advantage that its output ends up in the |
336 | correct place, e.g. on stderr of the connecting urxvtc client. |
336 | correct place, e.g. on stderr of the connecting urxvtc client. |
|
|
337 | |
|
|
338 | =item $is_safe = urxvt::safe |
|
|
339 | |
|
|
340 | Returns true when it is safe to do potentially unsafe things, such as |
|
|
341 | evaluating perl code specified by the user. This is true when urxvt was |
|
|
342 | started setuid or setgid. |
337 | |
343 | |
338 | =item $time = urxvt::NOW |
344 | =item $time = urxvt::NOW |
339 | |
345 | |
340 | Returns the "current time" (as per the event loop). |
346 | Returns the "current time" (as per the event loop). |
341 | |
347 | |
… | |
… | |
1109 | Converts rxvt-unicodes text reprsentation into a perl string. See |
1115 | Converts rxvt-unicodes text reprsentation into a perl string. See |
1110 | C<< $term->ROW_t >> for details. |
1116 | C<< $term->ROW_t >> for details. |
1111 | |
1117 | |
1112 | =item $success = $term->grab_button ($button, $modifiermask) |
1118 | =item $success = $term->grab_button ($button, $modifiermask) |
1113 | |
1119 | |
1114 | Registers a synchronous button grab. See XGrabButton. |
1120 | Registers a synchronous button grab. See the XGrabButton manpage. |
1115 | |
1121 | |
1116 | =item $success = $term->grab ($eventtime[, $sync]) |
1122 | =item $success = $term->grab ($eventtime[, $sync]) |
1117 | |
1123 | |
1118 | Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or |
1124 | Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or |
1119 | synchronous (C<$sync> is true). Also remembers the grab timestampe. |
1125 | synchronous (C<$sync> is true). Also remembers the grab timestampe. |
… | |
… | |
1185 | } |
1191 | } |
1186 | |
1192 | |
1187 | sub add_button { |
1193 | sub add_button { |
1188 | my ($self, $text, $cb) = @_; |
1194 | my ($self, $text, $cb) = @_; |
1189 | |
1195 | |
1190 | $self->add_item ({ type => "button", text => "[ $text ]", activate => $cb}); |
1196 | $self->add_item ({ type => "button", text => $text, activate => $cb}); |
1191 | } |
1197 | } |
1192 | |
1198 | |
1193 | sub add_toggle { |
1199 | sub add_toggle { |
1194 | my ($self, $text, $cb, $value) = @_; |
1200 | my ($self, $text, $cb, $value) = @_; |
1195 | |
1201 | |
… | |
… | |
1209 | |
1215 | |
1210 | local $urxvt::popup::self = $self; |
1216 | local $urxvt::popup::self = $self; |
1211 | |
1217 | |
1212 | urxvt->new ("--perl-lib" => "", "--perl-ext-common" => "", "-pty-fd" => -1, "-sl" => 0, "-b" => 0, |
1218 | urxvt->new ("--perl-lib" => "", "--perl-ext-common" => "", "-pty-fd" => -1, "-sl" => 0, "-b" => 0, |
1213 | "--transient-for" => $self->{term}->parent, |
1219 | "--transient-for" => $self->{term}->parent, |
|
|
1220 | "-display" => $self->{term}->display_id, |
1214 | "-pe" => "urxvt-popup") |
1221 | "-pe" => "urxvt-popup") |
1215 | or die "unable to create popup window\n"; |
1222 | or die "unable to create popup window\n"; |
1216 | } |
1223 | } |
1217 | |
1224 | |
1218 | sub DESTROY { |
1225 | sub DESTROY { |