--- rxvt-unicode/src/perl/xim-onthespot 2006/01/25 00:42:21 1.1 +++ rxvt-unicode/src/perl/xim-onthespot 2012/06/10 17:31:53 1.6 @@ -1,10 +1,27 @@ #! perl +=head1 NAME + + xim-onthespot - implement XIM "on-the-spot" behaviour + +=head1 DESCRIPTION + +This perl extension implements OnTheSpot editing. It does not work +perfectly, and some input methods don't seem to work well with OnTheSpot +editing in general, but it seems to work at least for SCIM and kinput2. + +You enable it by specifying this extension and a preedit style of +C, i.e.: + + urxvt -pt OnTheSpot -pe xim-onthespot + +=cut + # # problems with this implementation include -# -# - primary, secondary, teriary is NOT different to other hilighting -# - if rend values are missing, they are not interpolated +# +# - primary, secondary, tertiary are NO different to other highlighting styles +# - if rend values are missing, they are not being interpolated # my $SIZEOF_LONG = length pack "l!", 0; @@ -27,7 +44,7 @@ $rstyle |= urxvt::RS_Uline if $_ & (urxvt::XIMUnderline | urxvt::XIMPrimary); $rstyle |= urxvt::RS_RVid if $_ & (urxvt::XIMReverse | urxvt::XIMSecondary); - $rstyle |= urxvt::RS_Blink if $_ & (urxvt::XIMHighlight | urxvt::XIMTertiary); + $rstyle |= urxvt::RS_Italic if $_ & (urxvt::XIMHighlight | urxvt::XIMTertiary); ($rstyle) x ($self->strwidth (substr $text, $idx++, 1)) } unpack "l!*", $self->{rend}; @@ -57,12 +74,6 @@ () } -sub on_xim_preedit_caret { - my ($self, $pos, $dir, $style) = @_; - warn "preedit_caret(@_)\n"; - () -} - sub on_xim_preedit_draw { my ($self, $caret, $pos, $len, $feedback, $chars) = @_;