Re: clipboard
- From: Harry Bennett <harry saltyshells com>
- To: Mario Kemper <mario kemper googlemail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: clipboard
- Date: Sun, 19 Jul 2009 14:29:23 -0400
Mario,
Thank you for the quick response. I was getting no where with it.
Seems I was grossly over-thinking the problem at hand.
After a trial run, I found that I actually wanted SELECTION_PRIMARY in place
of your suggestion of SELECTION_CLIPBOARD.
Thanks for the help!
Harry_
On Sunday 19 July 2009, Mario Kemper wrote:
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]