GtkIconView::path_is_selected

bool path_is_selected(GtkTreePath path);

Checks if an item with a certain path is selected.

A tree path is a string of numbers and colons, e.g. 0:1:0 which would point to the first child of the second child of the first item in a tree. As we won't have trees here, a simple

       $iconview->path_is_selected(15);
      

is enough to check if the fifteenth item is selected.