Gtk.TargetList¶
Fields¶
None
Methods¶
| class | new(targets) | 
| add(target, flags, info) | |
| add_image_targets(info, writable) | |
| add_rich_text_targets(info, deserializable, buffer) | |
| add_table(targets) | |
| add_text_targets(info) | |
| add_uri_targets(info) | |
| find(target) | |
| ref() | |
| remove(target) | |
| unref() | 
Details¶
- 
class Gtk.TargetList¶
- A - Gtk.TargetList-struct is a reference counted list of- Gtk.TargetPairand should be treated as opaque.- 
classmethod new(targets)[source]¶
- Parameters: - targets ([ - Gtk.TargetEntry] or- None) – Pointer to an array of- Gtk.TargetEntry- Returns: - the new - Gtk.TargetList.- Return type: - Gtk.TargetList- Creates a new - Gtk.TargetListfrom an array of- Gtk.TargetEntry.
 - 
add(target, flags, info)[source]¶
- Parameters: - Appends another target to a - Gtk.TargetList.
 - 
add_image_targets(info, writable)[source]¶
- Parameters: - Appends the image targets supported by - Gtk.SelectionDatato the target list. All targets are added with the same info.- New in version 2.6. 
 - 
add_rich_text_targets(info, deserializable, buffer)[source]¶
- Parameters: - info (int) – an ID that will be passed back to the application
- deserializable (bool) – ifTrue, then deserializable rich text formats will be added, serializable formats otherwise.
- buffer (Gtk.TextBuffer) – aGtk.TextBuffer.
 - Appends the rich text targets registered with - Gtk.TextBuffer.register_serialize_format() or- Gtk.TextBuffer.register_deserialize_format() to the target list. All targets are added with the same info.- New in version 2.10. 
- info (
 - 
add_table(targets)[source]¶
- Parameters: - targets ([ - Gtk.TargetEntry]) – the table of- Gtk.TargetEntry- Prepends a table of - Gtk.TargetEntryto a target list.
 - 
add_text_targets(info)[source]¶
- Parameters: - info ( - int) – an ID that will be passed back to the application- Appends the text targets supported by - Gtk.SelectionDatato the target list. All targets are added with the same info.- New in version 2.6. 
 - 
add_uri_targets(info)[source]¶
- Parameters: - info ( - int) – an ID that will be passed back to the application- Appends the URI targets supported by - Gtk.SelectionDatato the target list. All targets are added with the same info.- New in version 2.6. 
 - 
find(target)[source]¶
- Parameters: - target ( - Gdk.Atom) – an interned atom representing the target to search for- Returns: - Trueif the target was found, otherwise- False- info: - a pointer to the location to store application info for target, or - None- Return type: - ( - bool, info:- int)- Looks up a given target in a - Gtk.TargetList.
 - 
ref()[source]¶
- Returns: - the passed in - Gtk.TargetList.- Return type: - Gtk.TargetList- Increases the reference count of a - Gtk.TargetListby one.
 - 
remove(target)[source]¶
- Parameters: - target ( - Gdk.Atom) – the interned atom representing the target- Removes a target from a target list. 
 - 
unref()[source]¶
- Decreases the reference count of a - Gtk.TargetListby one. If the resulting reference count is zero, frees the list.
 
- 
classmethod