ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/macosx-clipboard
(Generate patch)

Comparing rxvt-unicode/src/perl/macosx-clipboard (file contents):
Revision 1.4 by sf-exg, Sun Nov 20 11:09:22 2011 UTC vs.
Revision 1.7 by root, Sun Jun 10 17:39:54 2012 UTC

21# You should have received a copy of the GNU General Public License 21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software 22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24# ---------------------------------------------------------------------- 24# ----------------------------------------------------------------------
25 25
26# Usage: 26=head1 NAME
27 27
28 macosx-clipboard and macosx-clipboard-native
29
30=head1 DESCRIPTION
31
32These two modules implement an extended clipboard for Mac OS X. They are
33used like this:
34
28# URxvt.perl-ext-common: macosx-clipboard 35 URxvt.perl-ext-common: default,macosx-clipboard
29# URxvt.keysym.M-c: perl:macosx-clipboard:copy 36 URxvt.keysym.M-c: perl:macosx-clipboard:copy
30# URxvt.keysym.M-v: perl:macosx-clipboard:paste 37 URxvt.keysym.M-v: perl:macosx-clipboard:paste
38
39The difference between them is that the native variant requires a
40perl from apple's devkit or so, and C<macosx-clipboard> requires the
41C<Mac::Pasteboard> module, works with other perls, has fewer bugs, is
42simpler etc. etc.
43
44=cut
31 45
32use Mac::Pasteboard; 46use Mac::Pasteboard;
33 47
34my $pasteboard = new Mac::Pasteboard; 48my $pasteboard = new Mac::Pasteboard;
35 49
43} 57}
44 58
45sub paste { 59sub paste {
46 my ($self) = @_; 60 my ($self) = @_;
47 61
48 # $str = $pasteboard->stringForType_($type)->UTF8String;
49 my $str = $pasteboard->paste; 62 my $str = $pasteboard->paste;
50 utf8::decode $str; 63 utf8::decode $str;
51 $self->tt_write ($self->locale_encode ($str)); 64 $self->tt_write ($self->locale_encode ($str));
52 65
53 () 66 ()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines