Gtk::Selection.owner_set(widget, selection, time)
- Claims ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.
Gtk::Selection.add_target(widget, selection, target, info)
- Adds specified target to the list of supported targets for a given widget and selection.
Gtk::Selection.add_targets(widget, selection, targets)
- Adds a table of targets to the list of supported targets for a given widget and selection.
- Remove all targets registered for the given selection for the widget.
Gtk::Selection.convert(widget, selection, target, time)
Requests the contents of a selection. When received, a "selection_received" signal will be generated.
- widget: The Gtk::Widget which acts as requestor
- selection: Which selection to get(Gdk::Atom)
- target: an Gdk::Atom which form of information desired (e.g., STRING)
- time: Time of request (Integer: usually of triggering event). In emergency, you could use Gdk::Event::CURRENT_TIME
- Returns : true if requested succeeded. false if we could not process request. (e.g., there was already a request in process for this widget).
Removes all handlers and unsets ownership of all selections for a widget. Called when widget is being destroyed. This function will not generally be called by applications.
- widget: a Gtk::Widget
- Returns: self
Gtk::Widget - Much of the operation of selections happens via signals for Gtk::Widget. In particular, if you are using the methods in this section, you may need to pay attention to ::selection_get, ::selection_received, and :selection_clear_event signals.