clipboard enhancement request-for-discussion

Robert Collins robert.collins@itdomain.com.au
Thu May 31 07:03:00 GMT 2001


----- Original Message -----
From: "Dario Alcocer" <alcocer@helixdigital.com>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <cygwin@cygwin.com>
Sent: Thursday, May 31, 2001 11:58 PM
Subject: Re: clipboard enhancement request-for-discussion


> >>>>> "Robert" == Robert Collins <robert.collins@itdomain.com.au>
writes:
>
>     Robert> I'm finding more and more often, that being able to
>     Robert> redirect things to /dev/clipboard isn't quite enough.
>
>     Robert> <-- snip -->
>
>     Robert> create a new device /dev/clipfile which when written to
>     Robert> places a "file" (specifically a CFSTR_FILEDESCRIPTOR
>     Robert> format object) on the clipboard, consisting of the
>     Robert> contents written to /dev/clipfile.
>
>     Robert> The upshot of that is that
>
>     Robert> ---
>     Robert> cvs diff -up foo > /dev/clipfile
>     Robert> [switch to some application that understands file copy and
>     Robert> paste - ie outlook]
>     Robert> shift-insert
>     Robert> ---
>
> Robert,
>
> I wonder: could be accomplished without having to add another device
> in Cygwin?  Could a separate program, say, 'fmtclip', format or
> process the input data such that it's in the right format for the
> clipboard?

Uhmm no. The WIN32 API call to place data on the clipboard changes. -
It's not a input data format issue :[.

It could be done via FCNTL calls I suppose. (change the behaviour of the
fd and then write). However the overhead in cygwin of another device
would be minimal: the extra device will be a userland visibility issue,
not an actual copy of the device handling code.

> The usage would be a little different than you proposed:
>
>     cvs diff -up foo | fmtclip --file-descriptor > /dev/clipboard
>
> Regardless of the final syntax that is used, your idea sounds like a
> good idea.

Performance wise, I suspect a single step is more efficient. Also it's
more flexible for non-redirect-friendly packages to provide a different
filename. (I know how often does that happen ;])

Thanks for the feedback.
Rob

>
> --
> Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
> alcocer@helixdigital.com -- http://www.helixdigital.com
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list