Gtk.TargetList¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gtk.TargetList¶
A
Gtk.TargetList
-struct is a reference counted list ofGtk.TargetPair
and should be treated as opaque.- classmethod new(targets)[source]¶
- Parameters:
targets ([
Gtk.TargetEntry
] orNone
) – Pointer to an array ofGtk.TargetEntry
- Returns:
the new
Gtk.TargetList
.- Return type:
Creates a new
Gtk.TargetList
from an array ofGtk.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.SelectionData
to 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 applicationdeserializable (
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
() orGtk.TextBuffer.register_deserialize_format
() to the target list. All targets are added with the same info.New in version 2.10.
- add_table(targets)[source]¶
- Parameters:
targets ([
Gtk.TargetEntry
]) – the table ofGtk.TargetEntry
Prepends a table of
Gtk.TargetEntry
to 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.SelectionData
to 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.SelectionData
to the target list. All targets are added with the same info.Since 3.24.37, this includes the application/vnd.portal.files target when possible, to allow sending files between sandboxed apps via the FileTransfer portal.
New in version 2.6.
- find(target)[source]¶
- Parameters:
target (
Gdk.Atom
) – an interned atom representing the target to search for- Returns:
True
if the target was found, otherwiseFalse
- info:
a pointer to the location to store application info for target, or
None
- Return type:
Looks up a given target in a
Gtk.TargetList
.
- ref()[source]¶
- Returns:
the passed in
Gtk.TargetList
.- Return type:
Increases the reference count of a
Gtk.TargetList
by 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.TargetList
by one. If the resulting reference count is zero, frees the list.