GNOME Clipboard Manager - Documentation
Introduction
Index
About
GNOME Clipboard Manager is an application to manage your selections a.k.a. clipboards.
Short: GNOME Clipboard Manager for Gnome 2.0 desktops (Gcm-2) is an application for managing
selections a.k.a. clipboards and their available targets. It autocollects selections and their
targets on a shelf and also has the option to choose which selection is to be pasted when an application
sends a request for the selection (a.k.a. the clipboard) in a specific target. Selections can be edited,
manually created, merged, deleted, saved to files, loaded from files, copied, and pasted. The available
selection types are clipboard, primary, secondary or a custom atom.
Details
(This information might be or might not be correct, please send corrections
if you think something is wrong here. I am not an X-specialist :)
Because the clipboard in X uses a few names and words that are
not the same in the Microsoft Windows world, I've made a small
data-dictionnary. Not all of these words are used on this webpage
but it's good to understand a few basics about X before starting
to use the GNOME Clipboard Manager :
- A widget: A widget is a (graphical) object (in X). For example
a textbox, button and label are all .. widgets. Your entire
screen is also a widget. A window (as in; a window that is managed
by your windowmanager) is also a widget and will most likely contain other
widgets. Generally spoken, you can say that
most X-applications are a collection of widgets. Each of those
widgets have a few properties, signals and possible methods that you
can use on them. You can compare them with objects in Object Orientated-programming.
Signals occur for example on an event like "clicked" or "mouse over". But also on
less obvious things like "selection received" or "I got a request from a widget
to give the selection that I am owning" and "I have lost the selectionownership".
When such a signal occurs, a function (a block of code) in your application
will be executed. We, programmers, call this a "callback"-function.
If you ever saw the name GtkWidget, then you know now that this is the Gtk-abstraction
of a widget. A GtkWidget is an undefined widget, most of the times it must be casted
to a real widget like a GtkButton or a GtkLabel. These widgets can be anything, like
custom GtkWidgets that are coded by the programmer. A widget in X is sometimes also
called a Window. A Window in X is a very abstract definition of an object
in X, a Window that is managed by your WindowManager will become dragable on your
screen using the mouse and can function as a container for other Windows. Generally
spoken you can say that a Window is a Widget.
- A selection: A selection is "what you selected" in your session. So, in case you
selected some text in an application, the selection is the text
that you selected.
- The selectionowner: The selectionowner is the widget (Window) that
holds the selection. For example if a textbox holds the selected
text, this textbox is the selectionowner. Note that there are a few
selections available in X : The CLIPBOARD, PRIMARY and SECONDARY selection.
The CLIPBOARD is the property used when typing CTRL+C after selecting something,
the PRIMARY is the selection that is used when only selecting something and the
SECONDARY is the selection that got lost last time (the gray selected text).
- The parent of a widget: Most widgets have a parent. That is
the container widget that holds the widget. Of course a parent itself can
also have a parent. So it is like a tree of Widgets.
- Some of you guys/girls probably already noticed that the "clipboard"
in X works with owners and requests. Microsoft Windows has a
seperated mechanism for the clipboard. They hold the last selection
for you in some allocated memory and claim selectionownership on an
object that never dies and that is part of the Operating System.
That is not how X handles clipboards. In X a Widget must claim the ownership of
the selection. This means that from that point on, that widget decides
what it will give when another widget requests the selectiondata.
So, actually, your application is more in control when other applications
request the clipboard (a.k.a the selection). That is also the reason why you cannot
keep your clipboard when you closed the application of which are copying from.
Some windowmanagers have tried to solve this by passing the selection to
an object that does exist. When using GNOME Clipboard Manager, you will never
loose your selections as long as you don't quit GNOME Clipboard Manager because it
automagically takes over the selection once it has been set by another application.
(*) One problem with the way X handles the clipboard is that you don't
know when something {an application, a widget or an object} claimed ownership of the selection. You
can only know when you "lost" ownership. GNOME Clipboard Manager will
claim ownership, and when it loses that ownership.. it gets the
(new) selection from the new selectionowner and reclaims selectionownership. I don't know if that is
the "best" solution but it's "a" solution, and it currently works perfectly.
Help programming and other contributions
- Yes, you can help me :). I am looking for people who want to help develop GCM.
Of course documentation contributions, packages and suggestions are also more than welcome.
CVS
Reference