+#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+ #include <gtk/gtk.h>
+ extern GtkIconSize wxArtClientToIconSize(const wxArtClient& client);
+#endif // __WXGTK__
+
+/*static*/ wxSize wxArtProvider::GetSize(const wxArtClient& client,
+ bool platform_dependent)
+{
+ if (!platform_dependent)
+ {
+ wxArtProvidersList::compatibility_iterator node = sm_providers->GetFirst();
+ if (node)
+ return node->GetData()->DoGetSize(client);
+
+ // else return platform dependent size
+ }
+
+#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+ GtkIconSize gtk_size = wxArtClientToIconSize(client);
+ gint width, height;
+ gtk_icon_size_lookup( gtk_size, &width, &height);
+ return wxSize(width, height);
+#else // !GTK+ 2
+ if (client == wxART_TOOLBAR)
+ return wxSize(32, 32);
+ else if (client == wxART_MENU)
+ return wxSize(16, 15);
+ else if (client == wxART_CMN_DIALOG || client == wxART_MESSAGE_BOX)
+ return wxSize(32, 32);
+ else if (client == wxART_BUTTON)
+ return wxSize(16, 15);
+ else
+ return wxSize(16, 15); // this is arbitrary
+#endif // GTK+ 2/else
+}
+