title: How do I obtain the Gtk3 selection color of a widget using GtkStyleContext
body: <p>I'm trying to obtain the selection color of a Gtk3 IconView in python but I'm confused how to interpret the existing C++ documentation and how it relates to Python.</p>
  
  <p>My current python code is as follows:</p>
  
  <pre><code>color = self.iconview.get_style().bg[Gtk.StateType.SELECTED]
  </code></pre>
  
  <p>This works ok in Ubuntu 12.04 - Gnome/Gtk 3.2 I think.</p>
  
  <p>However the documentation here says <code>get_style</code> is deprecated since 3.0</p>
  
  <ul>
  <li><a href="http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-style" rel="nofollow">http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-style</a></li>
  </ul>
  
  <p>In Ubuntu 12.10 which uses the latest GTK, the above does not work - I get an error:</p>
  
  <pre><code>CRITICAL **: StackOverflow protection.  Can't copy array element into GIArgument
  </code></pre>
  
  <p>The document says I should use GtkStyleContext - but how?</p>
  
  <p>Can anyone give me a concrete python example?</p>