public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* clipboard details
@ 2012-03-24 23:28 Thomas Wolff
  2012-03-26 10:15 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Wolff @ 2012-03-24 23:28 UTC (permalink / raw)
  To: cygwin

2 comments about accessing the Windows clipboard:

* Does the Windows clipboard maintain a timestamp? If so, it would be 
useful to propagate it to /dev/clipboard as its virtual last 
modification time.

* The tools getclip and putclip do not handle non-ASCII character 
properly, while /dev/clipboard does.
   So I'd suggest to replace them with a wrapper:
#! /bin/sh

case "`basename $0`" in
get*)   redir="<";;
put*)   redir=">";;
*)      if [ -t 0 ]
         then    redir="<"
         else    redir=">"
         fi;;
esac

eval cat $redir /dev/clipboard

----------------------------------
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: clipboard details
  2012-03-24 23:28 clipboard details Thomas Wolff
@ 2012-03-26 10:15 ` Corinna Vinschen
  2012-03-26 11:38   ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2012-03-26 10:15 UTC (permalink / raw)
  To: cygwin

On Mar 25 00:28, Thomas Wolff wrote:
> 2 comments about accessing the Windows clipboard:
> 
> * Does the Windows clipboard maintain a timestamp? If so, it would
> be useful to propagate it to /dev/clipboard as its virtual last
> modification time.

It doesn't.  The clipboard only supports a sequence number.  It
would be possible to convert that to a virtual modification timestamp,
but it's tricky.  I have an idea how to do it, but I have to test it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: clipboard details
  2012-03-26 10:15 ` Corinna Vinschen
@ 2012-03-26 11:38   ` Corinna Vinschen
  0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2012-03-26 11:38 UTC (permalink / raw)
  To: cygwin

On Mar 26 12:15, Corinna Vinschen wrote:
> On Mar 25 00:28, Thomas Wolff wrote:
> > 2 comments about accessing the Windows clipboard:
> > 
> > * Does the Windows clipboard maintain a timestamp? If so, it would
> > be useful to propagate it to /dev/clipboard as its virtual last
> > modification time.
> 
> It doesn't.  The clipboard only supports a sequence number.  It
> would be possible to convert that to a virtual modification timestamp,
> but it's tricky.  I have an idea how to do it, but I have to test it.

I've just implemented a simple method to store the timestamp in the
clipboard data itself.  Since there's no way to modify stored data, only
one timestamp is stored and then used as modification and access time.
This only works within Cygwin.  If you change the clipboard from outside
Cygwin, the timestamps will be very likely reset because the
Cygwin-specific clipboard data will be deleted, so this is not reliable.
The problem is that the clipboard is window station specific and there's
no way to store window station specific, persistent data somewhere else.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-26 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-24 23:28 clipboard details Thomas Wolff
2012-03-26 10:15 ` Corinna Vinschen
2012-03-26 11:38   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).