Get source code for copy/paste [closed]
Every operation performed by operating system have a source code. So for coping operation there should be source code. So I need a file's name having source code for copy operation.So I can add some code to it so that Multiple copy operation may be performed. In multiple copy I can copy 2 or more text strings or files one after other from different location and paste after every thing is copied.(I want to avoid paste operation after every single copy operation.) Can anyone help me to find file containing Copy and Paste code? Thank you.
31 Answer
There's a single method of doing copy and paste in an X window system environment (GNOME, KDE .etc), namely Ctrl+C and Ctrl+V.
How this 'copy and paste' works?
The whole scenario involves two parties: client applications and clipboard manager.
their behavior is specified in the freedesktop standard:
1.
2.
see for a general introduction.
For the clients, the required code is implemented in toolkits such as GTK and Qt. the clipboard manager typically is a daemon program. In GNOME, the clipboard manager is a component of gnome-settings-daemon.
At the core of the clipboard implementation is a notion called "Selections" which is a X11-specific concept.
If you want to understand how clipboard works in a Linux environment, you need to learn how to program with low-level toolkit X11 first and get yourself familiar with concepts like Window, Property, Selection, Atom .etc.
You can get started with xclip source code.