Subject: | |
From: | |
Reply To: | |
Date: | Thu, 9 Mar 2017 20:21:37 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Have a look at the XmeClipboardSource function inside Transfer.c in the
Motif source code on SourceForge.
It uses Atoms and XConvertSelection.
IIRC, this is the correct mechanism. I remember once using XInternAtom
on the root X11 windows for cross-program data sharing.
Steve
On 03/09/17 15:37, ToddAndMargo wrote:
> On 03/09/2017 10:18 AM, Stephen Isard wrote:
>> On Thu, 9 Mar 2017 00:10:33 -0800, ToddAndMargo
>> <[log in to unmask]> wrote:
>>
>> <snip>
>>>> there are also more formal references like:
>>>> https://en.wikipedia.org/wiki/X_Window_selection
>>>> https://tronche.com/gui/x/xlib/utilities/using-cut-buffers.html
>>>> https://tronche.com/gui/x/xlib/window-information/selection.html
>>>>
>>>> Sorry I pointed you in the wrong direction to start with.
>>>>
>>>
>>> Hi Andrew,
>>>
>>> https://tronche.com/gui/x/xlib/utilities/using-cut-buffers.html
>>> is the ctrl-c/v/x clipboard.
>>>
>>> But, looking at
>>> https://tronche.com/gui/x/xlib/window-information/selection.html
>>>
>>> He talks a lot about changing the ownership. Is the the mouse over and
>>> middle click clipboard (primary)? I may still have the wrong
>>> clipboard.
>>> Am I missing something?
>>
>> Yes, mouse over and middle click is primary. xclip will let you
>> transfer text between
>> primary and clipboard.
>>
>> For instance,
>> xclip -o -sel clip |xclip -sel p
>> will put the clipboard selection into the primary, from which you can
>> paste it with
>> the middle button, and
>> xclip -o -sel p |xclip -sel clip
>> will put the selection that you have highlighted with the mouse into
>> the clipboard,
>> from which you can ctrl-v it into an openoffice document or whatever.
>>
>> Obviously, you want to give these incantations names or bind them to
>> keys if you
>> intend to use them a lot.
>>
>> Hope that's useful.
>>
>> Stephen Isard
>>
>
> Hi Stephen,
>
> I am trying to write a module in Perl 6 to do it myself
> without using xclip. I have the source code for xclip,
> but I don't read C, so it is a hair puller.
>
> What I really need is the right "man pages" for "clipboard"
> and "primary", so I can write my own inline code. Andrew
> has pointed me in the right direction.
>
> One thing I did get from xclip's code is that he
> is only checking the first letter of is command line
> parameters.
>
>
>
> -T
>
|
|
|