… | |
… | |
1136 | |
1136 | |
1137 | my $cb = $arg{cb}; |
1137 | my $cb = $arg{cb}; |
1138 | |
1138 | |
1139 | urxvt::timer |
1139 | urxvt::timer |
1140 | ->new |
1140 | ->new |
1141 | ->start (urxvt::NOW + $arg{after}) |
1141 | ->after ($arg{after}) |
|
|
1142 | ->interval ($arg{interval}) |
|
|
1143 | ->start |
1142 | ->cb (sub { |
1144 | ->cb (sub { |
|
|
1145 | #TODO interval? |
1143 | $_[0]->stop; # need to cancel manually |
1146 | $_[0]->stop; # need to cancel manually |
1144 | $cb->(); |
1147 | $cb->(); |
1145 | }) |
1148 | }) |
1146 | } |
1149 | } |
1147 | |
1150 | |
1148 | sub io { |
1151 | sub io { |
1149 | my ($class, %arg) = @_; |
1152 | my ($class, %arg) = @_; |
1150 | |
1153 | |
1151 | my $cb = $arg{cb}; |
1154 | my $cb = $arg{cb}; |
|
|
1155 | my $fd = fileno $arg{fh}; |
|
|
1156 | defined $fd or $fd = $arg{fh}; |
1152 | |
1157 | |
1153 | bless [$arg{fh}, urxvt::iow |
1158 | bless [$arg{fh}, urxvt::iow |
1154 | ->new |
1159 | ->new |
1155 | ->fd (fileno $arg{fh}) |
1160 | ->fd ($fd) |
1156 | ->events (($arg{poll} =~ /r/ ? 1 : 0) |
1161 | ->events (($arg{poll} =~ /r/ ? 1 : 0) |
1157 | | ($arg{poll} =~ /w/ ? 2 : 0)) |
1162 | | ($arg{poll} =~ /w/ ? 2 : 0)) |
1158 | ->start |
1163 | ->start |
1159 | ->cb (sub { |
1164 | ->cb ($cb) |
1160 | $cb->(($_[1] & 1 ? 'r' : '') |
|
|
1161 | . ($_[1] & 2 ? 'w' : '')); |
|
|
1162 | })], |
|
|
1163 | urxvt::anyevent:: |
1165 | ], urxvt::anyevent:: |
|
|
1166 | } |
|
|
1167 | |
|
|
1168 | sub idle { |
|
|
1169 | my ($class, %arg) = @_; |
|
|
1170 | |
|
|
1171 | my $cb = $arg{cb}; |
|
|
1172 | |
|
|
1173 | urxvt::iw |
|
|
1174 | ->new |
|
|
1175 | ->start |
|
|
1176 | ->cb (sub { |
|
|
1177 | #TODO really cancel? |
|
|
1178 | $_[0]->stop; # need to cancel manually |
|
|
1179 | $cb->(); |
|
|
1180 | }) |
|
|
1181 | } |
|
|
1182 | |
|
|
1183 | sub child { |
|
|
1184 | my ($class, %arg) = @_; |
|
|
1185 | |
|
|
1186 | my $cb = $arg{cb}; |
|
|
1187 | |
|
|
1188 | urxvt::pw |
|
|
1189 | ->new |
|
|
1190 | ->start ($arg{pid}) |
|
|
1191 | ->cb (sub { |
|
|
1192 | #TODO really cancel? |
|
|
1193 | $_[0]->stop; # need to cancel manually |
|
|
1194 | $cb->($_[0]->rpid, $_[0]->rstatus); |
|
|
1195 | }) |
1164 | } |
1196 | } |
1165 | |
1197 | |
1166 | sub DESTROY { |
1198 | sub DESTROY { |
1167 | $_[0][1]->stop; |
1199 | $_[0][1]->stop; |
1168 | } |
1200 | } |
… | |
… | |
1298 | |
1330 | |
1299 | answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont |
1331 | answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont |
1300 | borderLess chdir color cursorBlink cursorUnderline cutchars delete_key |
1332 | borderLess chdir color cursorBlink cursorUnderline cutchars delete_key |
1301 | display_name embed ext_bwidth fade font geometry hold iconName |
1333 | display_name embed ext_bwidth fade font geometry hold iconName |
1302 | imFont imLocale inputMethod insecure int_bwidth intensityStyles |
1334 | imFont imLocale inputMethod insecure int_bwidth intensityStyles |
1303 | italicFont jumpScroll lineSpace loginShell mapAlert meta8 modifier |
1335 | italicFont jumpScroll lineSpace letterSpace loginShell mapAlert meta8 |
1304 | mouseWheelScrollPage name override_redirect pastableTabs path perl_eval |
1336 | modifier mouseWheelScrollPage name override_redirect pastableTabs path |
1305 | perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay |
1337 | perl_eval perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay |
1306 | preeditType print_pipe pty_fd reverseVideo saveLines scrollBar |
1338 | preeditType print_pipe pty_fd reverseVideo saveLines scrollBar |
1307 | scrollBar_align scrollBar_floating scrollBar_right scrollBar_thickness |
1339 | scrollBar_align scrollBar_floating scrollBar_right scrollBar_thickness |
1308 | scrollTtyKeypress scrollTtyOutput scrollWithBuffer scrollstyle |
1340 | scrollTtyKeypress scrollTtyOutput scrollWithBuffer scrollstyle |
1309 | secondaryScreen secondaryScroll shade term_name title |
1341 | secondaryScreen secondaryScroll shade term_name title |
1310 | transient_for transparent transparent_all tripleclickwords utmpInhibit |
1342 | transient_for transparent transparent_all tripleclickwords utmpInhibit |