#!/usr/bin/python
# Test Clipboard.wait_for_targets() return values.

from gi.repository import Gtk, Gdk, GdkX11


def main():
    #atom = Gdk.Atom.intern("CLIPBOARD", False)
    #clippy = Gtk.Clipboard.get(selection=atom)
    clippy = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)


    targets = clippy.wait_for_targets_names()
#    for target in targets:
#        print target, GdkX11.x11_get_xatom_name(GdkX11.x11_atom_to_xatom(Gdk.Atom(target)))
    print(targets)

    #real_strings = ['TARGETS', 'MULTIPLE', 'SAVE_TARGETS']
    #for atom_name in real_strings:
    #    print GdkX11.x11_get_xatom_by_name(atom_name)

if __name__ == '__main__':
    main()

