2011-06-17 03:13:38 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_type (GType t)
|
|
|
|
{
|
|
|
|
GtkWidget *w;
|
|
|
|
AtkObject *a;
|
|
|
|
|
|
|
|
if (g_type_is_a (t, GTK_TYPE_WIDGET))
|
|
|
|
{
|
|
|
|
w = (GtkWidget *)g_object_new (t, NULL);
|
|
|
|
a = gtk_widget_get_accessible (w);
|
|
|
|
|
|
|
|
g_assert (GTK_IS_ACCESSIBLE (a));
|
|
|
|
g_assert (gtk_accessible_get_widget (GTK_ACCESSIBLE (a)) == w);
|
|
|
|
|
|
|
|
g_object_unref (w);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2013-05-15 13:25:05 +00:00
|
|
|
const GType *tp;
|
|
|
|
guint i, n;
|
2011-06-17 03:13:38 +00:00
|
|
|
|
|
|
|
gtk_init (&argc, &argv);
|
|
|
|
|
2013-05-15 13:25:05 +00:00
|
|
|
tp = gtk_test_list_all_types (&n);
|
2011-06-17 03:13:38 +00:00
|
|
|
|
2013-09-03 20:51:03 +00:00
|
|
|
for (i = 0; i < n; i++)
|
2011-06-17 03:13:38 +00:00
|
|
|
test_type (tp[i]);
|
2013-01-08 11:23:52 +00:00
|
|
|
|
|
|
|
return 0;
|
2011-06-17 03:13:38 +00:00
|
|
|
}
|