gtk-sharp 0.0.0.0 neutral Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. An object that stores clipboard data. The object represents a clipboard of data shared between different processes or between different widgets in the same process. Each clipboard is identified by a name encoded as a . (Conversion to and from strings can be done with and .) The default clipboard corresponds to the "CLIPBOARD" atom; another commonly used clipboard is the "PRIMARY" clipboard, which, in X, traditionally contains the currently selected text. To support having a number of different formats on the clipboard at the same time, the clipboard mechanism allows providing callbacks instead of the actual data. When you set the contents of the clipboard, you can either supply the data directly (via methods like ), or you can supply a callback to be called at a later time when the data is needed (via or .) Providing a callback also avoids having to make copies of the data when it is not needed. and are quite similar; the choice between the two depends mostly on which is more convenient in a particular situation. The former is most useful when you want to have a blob of data with callbacks to convert it into the various data types that you advertise. When the clear_func you provided is called, you simply free the data blob. The latter is more useful when the contents of clipboard reflect the internal state of a (As an example, for the PRIMARY clipboard, when an entry widget provides the contents for the clipboar the contents are simply the text within the selected region.) If the contents change, the entry widget can call to update the timestamp for clipboard ownership, without having to worry about clear_func being called. Requesting the data from the clipboard is essentially asynchronous. If the contents of the clipboard are provided within the same process, then a direct function call will be made to retrieve the data, but if they are provided by another process, then the data needs to be retrieved from the other process, which may take some time. To avoid blocking the user interface, the call to request the selection, takes a callback that will be called when the contents are received (or when the request fails.) If you do not want to deal with providing a separate callback, you can also use . What this does is run the GLib main loop recursively waiting for the contents. This can simplify the code flow, but you still have to be aware that other callbacks in your program can be called while this recursive mainloop is running. Along with the functions to get the clipboard contents as an arbitrary data chunk, there are also functions to retrieve it as text, and . These functions take care of determining which formats are advertised by the clipboard provider, asking for the clipboard in the best available format and converting the results into the UTF-8 encoding. (The standard form for representing strings in Gtk#.) GLib.Opaque GLib.IWrapper Method Gtk.Clipboard Returns the clipboard object for the given selection. an object of type an object of type See for complete details. Method System.Void Clears the contents of the clipboard. Generally this should only be called between the time you call or , and when the clear_func you supplied is called. Otherwise, the clipboard may be owned by someone else. Method System.Boolean Test to see if there is text available to be pasted. an object of type This is done by requesting the TARGETS atom and checking if it contains any of the names: STRING, TEXT, COMPOUND_TEXT, UTF8_STRING. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait. This function is a little faster than calling since it does not need to retrieve the actual text. Method Gtk.SelectionData Requests the contents of the clipboard using the given target. an object of type an object of type This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait. Method System.String Requests the contents of the clipboard as text and converts the result to UTF-8 if necessary. an object of type This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait. Constructor Internal constructor Pointer to the C object. An instance of Clipboard, wrapping the C object. This is an internal constructor, and should not be used by user code. Constructor Internal constructor an object of type This is an internal constructor, and should not be used by user code. Property GLib.Object The owner of the clipboard, if any; otherwise . an object of type If the clipboard contents callbacks were set with , and the or has not been subsequently called, it will return the owner set by . Method System.Void Sets the contents of the clipboard to the given UTF-8 string. an object of type Gtk# will make a copy of the text and take responsibility for responding for requests for the text, and for converting the text into the requested format. Property Gdk.Display The associated with the clipboard. a Method Gtk.Clipboard Returns the clipboard object for the given selection. a a a Cut/copy/paste menu items and keyboard shortcuts should use the default clipboard, returned by passing GDK_SELECTION_CLIPBOARD for selection. (GDK_NONE is supported as a synonym for GDK_SELECTION_CLIPBOARD for backwards compatibility reasons.) The currently-selected object or text should be provided on the clipboard identified by GDK_SELECTION_PRIMARY. Cut/copy/paste menu items conceptually copy the contents of the GDK_SELECTION_PRIMARY clipboard to the default clipboard, i.e. they copy the selection to what the user sees as the clipboard. (Passing GDK_NONE is the same as using gdk_atom_intern ("CLIPBOARD", ). See http://www.freedesktop.org/standards/clipboards.txt for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY" selections under the X window system. On Win32 the GDK_SELECTION_PRIMARY clipboard is essentially ignored.) It is possible to have arbitrary named clipboards; if you do invent new clipboards, you should prefix the selection name with an underscore (because the ICCCM requires that nonstandard atoms are underscore-prefixed), and namespace it as well. For example, if your application called "Foo" has a special-purpose clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD". Method System.Void Disposes the resources associated with the object. Method System.Boolean Virtually sets the contents of the specified clipboard by providing a list of supported formats for the clipboard data and a function to call to get the actual data when it is requested. a a a a Method System.Boolean Virtually sets the contents of the specified clipboard by providing a list of supported formats for the clipboard data and a function to call to get the actual data when it is requested. a a a a a The difference between this function and is that a is passed in. Property GLib.GType To be added a To be added Method System.Void To be added a a To be added Method System.Void To be added a To be added Constructor To be added a a To be added