Re: clipboard





Issue is that I can't seem to wrap my head around 'clipboard'.

I am not looking for code, per se, but if someone would be kind enough to 
tell me what I need to know to get going... I haven't a clue

Just have a look at the following code:

#! /usr/bin/perl

use strict;
use warnings;
use utf8;

use Gtk2 '-init';

my $clipboard = Gtk2::Clipboard->get( Gtk2::Gdk->SELECTION_CLIPBOARD );

my $clipboard_string = $clipboard->wait_for_text;

if ($clipboard_string){
        print "Content of clipboard is: $clipboard_string\n";
}else{
        print "Content of clipboard is: empty\n";       
}



Regards
Mario




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]