---
name: "Gtk2::SelectionData"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::SelectionData"
---

# Gtk2::SelectionData(3pm)

wrapper for GtkSelectionData

## NAME

Gtk2::SelectionData - wrapper for GtkSelectionData

## HIERARCHY

```
  Glib::Boxed
  +----Gtk2::SelectionData
```

## METHODS

### scalar = $d-\>get\_data

### scalar = $d-\>get\_data\_type

### scalar = $d-\>get\_display

### scalar = $d-\>get\_format

### $selection\_data-\>set ($type, $format, $data)

- •

  `$type` (Gtk2::Gdk::Atom)

- •

  `$format` (integer)

- •

  `$data` (Glib::UChar)

### scalar = $d-\>get\_length

### pixbuf or undef = $selection\_data-\>get\_pixbuf

Since: gtk+ 2.6

### boolean = $selection\_data-\>set\_pixbuf ($pixbuf)

- •

  `$pixbuf` (Gtk2::Gdk::Pixbuf)

Since: gtk+ 2.6

### (tree\_model, path) = $selection\_data-\>get\_row\_drag\_data

If `$selection_data` is not of target type GTK\_TREE\_MODEL\_ROW then the return is an empty list.

### boolean = $selection\_data-\>set\_row\_drag\_data ($tree\_model, $path)

- •

  `$tree_model` (Gtk2::TreeModel)

- •

  `$path` (Gtk2::TreePath)

### scalar = $d-\>get\_selection

### scalar = $d-\>get\_target

### list = $selection\_data-\>get\_targets

Gets the contents of selection\_data as an array of targets. This can be used to interpret the results of getting the standard TARGETS target that is always supplied for any selection.

Returns a list of GdkAtoms, the targets.

### boolean = $selection\_data-\>targets\_include\_image ($writable)

- •

  `$writable` (boolean)

Since: gtk+ 2.6

### boolean = $selection\_data-\>targets\_include\_rich\_text ($buffer)

- •

  `$buffer` (Gtk2::TextBuffer)

Since: gtk+ 2.10

### boolean = $selection\_data-\>targets\_include\_text

### boolean = $selection\_data-\>targets\_include\_uri

Since: gtk+ 2.10

### string = $selection\_data-\>get\_text

### boolean = $selection\_data-\>set\_text ($str, $len=-1)

- •

  `$str` (string)

- •

  `$len` (integer)

### list = $selection\_data-\>get\_uris

Since: gtk+ 2.6

### boolean = $selection\_data-\>set\_uris (...)

- •

  ... (list) of strings

Since: gtk+ 2.6

## SEE ALSO

Gtk2, Glib::Boxed

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
