/*
  Testing atk_object_get_accessible_locale on a gtk application
*/

#include <gtk/gtk.h>

static void
_on_button_clicked (GtkButton *button,
                    gpointer data)
{
  AtkObject *accessible = NULL;

  accessible = gtk_widget_get_accessible (GTK_WIDGET(button));

  printf ("button locale is: %s\n", atk_object_get_accessible_locale (accessible));
}


int
main (int argc, char **argv)
{
  GtkWidget *window;
  GtkWidget *button;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

  button = gtk_button_new_with_label ("Press me!!");
  g_signal_connect (button, "clicked",
                    G_CALLBACK (_on_button_clicked), NULL);
  gtk_container_add (GTK_CONTAINER (window), button);

  g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), 0);
  gtk_widget_show_all (window);

  gtk_main ();

  return 0;
}
