[libchamplain] Add minimal python demo



commit 9a0ebe6371f9beb0ba9e64e599583ac6beab246c
Author: JiÅ?í Techet <techet gmail com>
Date:   Sun Mar 27 17:53:24 2011 +0200

    Add minimal python demo

 demos/Makefile.am |    2 +-
 demos/minimal.py  |   20 ++++++++++++++++++++
 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()
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]