From 92a3fe0e303c1c206c4fe4b5d1622f53c7c7b03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Mon, 28 Feb 2011 15:58:45 +0000 Subject: plugin for kiosk-modes currently targetted at running Pd on a WeTab (no keyboard...) svn path=/trunk/scripts/guiplugins/kiosk-plugin/; revision=14979 --- kiosk-plugin.tcl | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 kiosk-plugin.tcl (limited to 'kiosk-plugin.tcl') 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 zmölnig + + +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 { +# makekiosk %W; +#} + -- cgit v1.2.1