From: root Date: Sat, 18 Jul 2009 05:59:49 +0000 (+0000) Subject: riddify us of meta.yml garbage in manifest X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=985c40241281d63a48aef64157880857bc75cef1;p=dana%2Furxvt.git riddify us of meta.yml garbage in manifest --- diff --git a/Changes b/Changes index 4cac7037..1f6f92e1 100644 --- a/Changes +++ b/Changes @@ -24,6 +24,8 @@ TODO: exg-- patch TODO: selection_beg/end should set screen, or so TODO: - upgrade to libev-xx TODO: -rv interacts badly with popups. +TODO: idle/interval timer implementation für anyevent +TODO: perl-shell-window? - port to glibc-2.10 changes (strchr etc. returning const char * in C++), based on patches by Milos Jakubicek and Oliver Mader. - the binary search algorithm to find precomposed characters @@ -51,6 +53,7 @@ TODO: -rv interacts badly with popups. - replace maxosc-pastebin by a nicer version by Reza Jelveh, and move the old version to macosx-pastebin-native. - document the -uc option (exg). + - assertions in libev are now enabled depending on frills. 9.06 Sat Nov 8 17:47:18 CET 2008 - NOTICE: this release updates terminfo/termcap. diff --git a/src/ev_cpp.h b/src/ev_cpp.h index 2f1940f8..1ad9172f 100644 --- a/src/ev_cpp.h +++ b/src/ev_cpp.h @@ -1,4 +1,4 @@ -#define EV_MINIMAL 1 +#define EV_MINIMAL 2 #define EV_USE_POLL 0 #define EV_USE_INOTIFY 0 #define EV_USE_EVENTFD 0 @@ -13,4 +13,10 @@ #define EV_MAXPRI 0 #define EV_USE_STDEXCEPT 0 +#include + +#if !ENABLE_FRILLS +# define NDEBUG +#endif + #include "ev++.h" diff --git a/src/iom_perl.xs b/src/iom_perl.xs index c32f0f3b..b083faf6 100644 --- a/src/iom_perl.xs +++ b/src/iom_perl.xs @@ -214,6 +214,20 @@ pw::stop () OUTPUT: RETVAL +int +pw::rpid () + CODE: + RETVAL = THIS->rpid; + OUTPUT: + RETVAL + +int +pw::rstatus () + CODE: + RETVAL = THIS->rstatus; + OUTPUT: + RETVAL + void pw::DESTROY () diff --git a/src/urxvt.pm b/src/urxvt.pm index a01b0865..3b685b74 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -1138,8 +1138,11 @@ sub timer { urxvt::timer ->new - ->start (urxvt::NOW + $arg{after}) + ->after ($arg{after}) + ->interval ($arg{interval}) + ->start ->cb (sub { + #TODO interval? $_[0]->stop; # need to cancel manually $cb->(); }) @@ -1149,18 +1152,47 @@ sub io { my ($class, %arg) = @_; my $cb = $arg{cb}; + my $fd = fileno $arg{fh}; + defined $fd or $fd = $arg{fh}; bless [$arg{fh}, urxvt::iow ->new - ->fd (fileno $arg{fh}) + ->fd (defined fileno $arg{fh}) ->events (($arg{poll} =~ /r/ ? 1 : 0) | ($arg{poll} =~ /w/ ? 2 : 0)) ->start - ->cb (sub { - $cb->(($_[1] & 1 ? 'r' : '') - . ($_[1] & 2 ? 'w' : '')); - })], - urxvt::anyevent:: + ->cb ($cb) + ], urxvt::anyevent:: +} + +sub idle { + my ($class, %arg) = @_; + + my $cb = $arg{cb}; + + urxvt::iw + ->new + ->start + ->cb (sub { + #TODO really cancel? + $_[0]->stop; # need to cancel manually + $cb->(); + }) +} + +sub child { + my ($class, %arg) = @_; + + my $cb = $arg{cb}; + + urxvt::pw + ->new + ->start ($arg{pid}) + ->cb (sub { + #TODO really cancel? + $_[0]->stop; # need to cancel manually + $cb->($_[0]->rpid, $_[0]->rstatus); + }) } sub DESTROY {