aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2011-02-28 15:58:45 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2011-02-28 15:58:45 +0000
commit92a3fe0e303c1c206c4fe4b5d1622f53c7c7b03c (patch)
tree3b1c35c1d70b408e2692b5cbc8f9c71d8e000d17
plugin for kiosk-modessvn2git-root
currently targetted at running Pd on a WeTab (no keyboard...) svn path=/trunk/scripts/guiplugins/kiosk-plugin/; revision=14979
-rw-r--r--kiosk-plugin.tcl68
1 files changed, 68 insertions, 0 deletions
diff --git a/kiosk-plugin.tcl b/kiosk-plugin.tcl
new file mode 100644
index 0000000..b684a11
--- /dev/null
+++ b/kiosk-plugin.tcl
@@ -0,0 +1,68 @@
+# META NAME Kiosk
+# META DESCRIPTION all windows in fullscreen mode
+# META DESCRIPTION main window invisible
+# META DESCRIPTION no keybindings
+
+# META AUTHOR IOhannes m zmlnig <zmoelnig@iem.at>
+
+
+package require Tcl 8.5
+package require Tk
+package require pdwindow 0.1
+
+namespace eval ::kiosk:: {
+ variable showmenu False
+ variable fullscreen True
+ variable hidemain True
+ variable windowtitle "FOO"
+}
+
+
+## hide the Pd window
+if { $::kiosk::hidemain } {
+ set ::stderr 1
+ wm state .pdwindow withdraw
+}
+
+
+# this is just an empty menu
+menu .kioskmenu
+
+
+proc ::kiosk::makekiosk {mywin} {
+puts "makekiosk $mywin"
+#remove menu
+ if { $::kiosk::showmenu } { } {
+ $mywin configure -menu .kioskmenu;
+ }
+
+# make fullscreen
+ if { $::kiosk::fullscreen } {
+ wm attributes $mywin -fullscreen 1
+ }
+
+
+ if { info exists ::kiosk::windowtitle $::kiosk::windowtitle } {
+}
+
+# it seems like this is getting not called for initially opened windows
+# i guess it is like that:
+# pd starts up
+# pd sends initial data to the GUI
+# the guiplugins are invoked (too late to do anything with existing windows)
+
+#proc ::pd_bindings::patch_bindings {mytoplevel} {
+#puts "foo $mytoplevel"
+# wm attributes $mytoplevel -fullscreen 1
+#}
+
+
+
+foreach kioskwin [array names ::loaded] {
+ ::kiosk::makekiosk $kioskwin
+}
+
+#bind PatchWindow <FocusIn> {
+# makekiosk %W;
+#}
+