summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Techet <techet@gmail.com>2011-03-27 17:53:24 +0200
committerJiří Techet <techet@gmail.com>2011-03-27 18:13:08 +0200
commit9a0ebe6371f9beb0ba9e64e599583ac6beab246c (patch)
tree4881df4bcc697d505258039efca521330579d31c
parent45c41386036ba27924d602f1540b9a12389fb292 (diff)
downloadlibchamplain-9a0ebe6371f9beb0ba9e64e599583ac6beab246c.tar.gz
Add minimal python demo
-rw-r--r--demos/Makefile.am2
-rwxr-xr-xdemos/minimal.py20
2 files changed, 21 insertions, 1 deletions
diff --git a/demos/Makefile.am b/demos/Makefile.am
index 97201f9..2540250 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -46,5 +46,5 @@ local_rendering_LDADD = $(GTK_LIBS) $(MEMPHIS_LIBS) $(DEPS_LIBS) \
endif
endif
-EXTRA_DIST = markers.h launcher.js default-rules.xml high-contrast.xml las_palmas.osm schaffhausen.osm
+EXTRA_DIST = markers.h launcher.js minimal.py default-rules.xml high-contrast.xml las_palmas.osm schaffhausen.osm
diff --git a/demos/minimal.py b/demos/minimal.py
new file mode 100755
index 0000000..9c7fef4
--- /dev/null
+++ b/demos/minimal.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+from gi.repository import GtkClutter
+GtkClutter.init([])
+from gi.repository import GObject, Gtk, GtkChamplain
+
+GObject.threads_init()
+GtkClutter.init([])
+
+window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL)
+window.connect("destroy", Gtk.main_quit)
+
+widget = GtkChamplain.Embed()
+widget.set_size_request(640, 480)
+
+window.add(widget)
+window.show_all()
+
+Gtk.main()
+