新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Gtk::Selection

Module Functions

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.
  • widget: a Gtk::Widget, or nil.
  • selection: an interned atom(Gdk::Atom) representing the selection to claim
  • time: the time stamp for claiming the selection
  • Returns: true if the operation succeeded
Gtk::Selection.add_target(widget, selection, target, info)
Adds specified target to the list of supported targets for a given widget and selection.
  • widget: a Gtk::Widget
  • selection: the selection(Gdk::Atom)
  • target: target to add(Gdk::Atom)
  • info: an unsigned integer which will be passed back to the application
  • Returns: self
Gtk::Selection.add_targets(widget, selection, targets)
Adds a table of targets to the list of supported targets for a given widget and selection.
  • widget: a Gtk::Widget
  • selection: the selection(Gdk::Atom)
  • targets: [[target1, flags1, info1], [target2, flags2, info2], ...]: a table of targets to add
    • target: the drag type (String)
    • flags: GtkTargetFlags
    • info: an application assigned integer ID.
  • Returns: self
Gtk::Selection.clear_targets(widget, 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).
Gtk::Selection.remove_all(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.

See Also

Gtk::TargetList, Gtk::SelectionData.

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.

- Masao?

更新日時:2006/02/01 19:09:13
キーワード:
参照:[Gtk::Selection] [Gtk::TargetList] [Gtk::SelectionData] [Gdk::Selection]