title: How to listen for the clipboard "owner-change" event in gtk-rs?
body: <p>I am writing a application based on <code>gtk::Clipboard</code> in using the gtk-rs crate. I have already initialized a <code>Clipboard</code> like this:</p>
  
  <pre><code>let clipboard = gtk::Clipboard::get(&amp;gdk::SELECTION_PRIMARY);
  </code></pre>
  
  <p>It is able to print the selected text by using <code>clipboard.wait_for_text()</code> in loop.</p>
  
  <p>However, I only need the text when the selection changes. How can I connect a handling function to the <code>owner-change</code> event emitted from <code>clipboard</code>?</p>
  
  <p>In Python, it could be implemented like <a href="https://github.com/bianjp/popup-dict/blob/dbf9121aa63d65095bd848a582595e1b03327418/popupdict/ui/popup.py#L35" rel="nofollow noreferrer">this</a></p>
  
  <pre class="lang-py prettyprint-override"><code>clipboard = Gtk.Clipboard.get(Gdk.SELECTION_PRIMARY)
  clipboard.connect("owner-change", foo)
  </code></pre>