1
/*
2
 * Copyright (C) 2010-2012 Jiri Techet <techet@gmail.com>
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Lesser General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2.1 of the License, or (at your option) any later version.
8
 *
9
 * This library 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
 * Lesser 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 library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 */
18
19
#include <gtk/gtk.h>
20
21
/* include the libchamplain header */
22
#include <champlain-gtk/champlain-gtk.h>
23
24
#include <clutter-gtk/clutter-gtk.h>
25
26
int
27
main (int argc, char *argv[])
28
{
29
  GtkWidget *window, *widget;
30
31
  /* initialize clutter */
32
  if (gtk_clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
33
    return 1;
34
35
  /* create the top-level window and quit the main loop when it's closed */
36
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
37
  g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit),
38
      NULL);
39
40
  /* create the libchamplain widget and set its size */
41
  widget = gtk_champlain_embed_new ();
42
  gtk_widget_set_size_request (widget, 640, 480);
43
44
  /* insert it into the widget you wish */
45
  gtk_container_add (GTK_CONTAINER (window), widget);
46
47
  /* show everything */
48
  gtk_widget_show_all (window);
49
50
  /* start the main loop */
51
  gtk_main ();
52
53
  return 0;
54
}