Add doc files to dist and fix version number in NEWS.
[mmediamanager.git] / test / clients / test-gtk.c
blob8c26fbbd4a22e5814f86f494cf5b40c7f04f8161
1 #include "mm-gtk.h"
2 #include <gtk/gtk.h>
4 static void
5 app_selected_cb (MMGtkApplicationView *view,
6 MMApplication *app,
7 gpointer unused)
9 g_debug ("application selected %p", app);
12 static void
13 mmtype_selected_cb (MMGtkApplicationView *view,
14 MMApplicationType type,
15 gpointer unused)
17 g_debug ("mmtype selected %d", type);
20 static void
21 cat_selected_cb (MMGtkApplicationView *view,
22 MMCategory *cat,
23 gpointer unused)
25 g_debug ("category selected %p", cat);
28 int main (int argc, char **argv)
30 GtkWidget *toplevel;
31 MMGtkApplicationView *view;
33 g_type_init ();
34 gtk_init (&argc, &argv);
36 toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
37 g_signal_connect (toplevel, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
38 view = mm_gtk_application_view_new ();
39 g_signal_connect (view, "application-selected",
40 G_CALLBACK (app_selected_cb), NULL);
41 g_signal_connect (view, "mmtype-selected",
42 G_CALLBACK (mmtype_selected_cb), NULL);
43 g_signal_connect (view, "category-selected",
44 G_CALLBACK (cat_selected_cb), NULL);
45 gtk_widget_show (GTK_WIDGET (view));
47 gtk_container_add (GTK_CONTAINER (toplevel), GTK_WIDGET (view));
49 gtk_widget_show (toplevel);
51 gtk_main ();
53 return 0;