Adding cursor example program
[platform/upstream/evolution-data-server.git] / tests / cursor-example / main.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2013 Intel Corporation
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU Lesser General Public
7  * License as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  *
19  * Author: Tristan Van Berkom <tristanvb@openismus.com>
20  */
21
22 #include "cursor-example.h"
23
24 int
25 main (int argc, char *argv[])
26 {
27   GtkWidget *example;
28
29   gtk_init (&argc, &argv);
30
31   if (argc < 2)
32     example = cursor_example_new ("./data");
33   else
34     example = cursor_example_new (argv[1]);
35
36   g_signal_connect (example, "destroy",
37                     G_CALLBACK (gtk_main_quit), NULL);
38
39   gtk_widget_show (example);
40   gtk_main ();
41
42   return 0;
43 }