### Copyright (C) 1995, 1996, 1997 Jeppe Buk (buk@imada.ou.dk) ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### This program is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with this program; if not, write to the Free Software ### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ### ### Mar. 9 1998 Japanized by Mashio Motoyama ### proc FvwmAudio {} { # モジュール / FvwmAudio Desc "FvwmAudio モジュールの設定" ShortDesc "FvwmAudio" Header h\ -text "FvwmAudio" -frame:relief flat \ -help "このページでは FvwmAudio モジュールの設定を行います。"\ "このモジュールはウインドウマネージャのイベントと音の関連付を行います。" Line l CheckBox spawn\ -text "起動時から利用" \ -help "これを選択すると、このモジュールは起動時、つまり"\ "'InitFunction' と 'RestartFunction' からその動作を開始します。" CheckBox explay\ -text "鳴音用外部プログラムを指定:"\ -help "FVWM が rplay 用組み込み関数を取り入れてコンパイルされていないのであれば、音を鳴らすための外部コマンドを設定できます。" Entry playcmd\ -help "FVWM が rplay 組み込み関数を取り入れずにコンパイルされている場合には、音を鳴らすための外部コマンドを設定できます。" Frame playF\ -entries { explay playcmd } CheckBox rplay\ -text "鳴音に rplay を利用する"\ -help "FVWM が rplay 組み込み関数を取り入れてコンパイルされている場合にはこれを利用します。外部プログラムを利用する場合よりも高速です。" Entry rplayhost\ -text " rplay ホストを指定:"\ -help "音を鳴らすためのホストを指定できます。環境変数の \$RPLAYHOST でも指定可能です。" Int rplaypriority\ -text " rplay の優先順位を指定:"\ -help "音を鳴らす際のそれらの優先順位を割り当てます。"\ "(ゴメン。俺、これ以上の事は知らないの。)" Int rplayvolume\ -text " rplay の音量を指定:"\ -help "音を鳴らす際の音量を指定します。" Dir-Browser dir -text "サウンド・ファイル検索ディレクトリ" foreach widget { dir com_dir } { Help $widget\ "ここでは FvwmAudio がサウンド・ファイルを検索するディレクトリを指定します。"\ "ここで指定したディレクトリは、下記のサウンド・ファイル用のファイル・ブラウザに反映されます。" } Int delay\ -text "サウンド・イベント間の最小遅延時間:"\ -textafter 秒\ -help \ "サウンド・イベント間の最小の遅延時間を指定します。"\ "例えば、これを 5 秒に設定すると、最初の音が鳴ってから"\ "5 秒間は他のサウンド・イベントは無視されます。"\ "やかましい程に音が鳴る様な場合には有効でしょう。" Label lab\ -text "音の設定"\ -help "この拡張エントリでは、全てのイベントに対する音を指定することができます。" Entry event\ -text "イベント"\ -help "まず \"Idx\" ボタンを押してイベントを選択し、続いてそのイベントにサウンド・ファイルを割当ます。" File-Browser file\ -text "サウンド・ファイル"\ -dir \$dir foreach widget { file com_file } { Help $widget "ファイル・ブラウザを用いて、上で指定したディレクトリ以下からサウンド・ファイルを指定します。もちろん直接入力することも可能です。" } ExtEntry events -entries { event frame_file } -default { startup shutdown unknown add_window raise_window lower_window focus_change destroy_window iconify deiconify toggle_paging new_page new_desk configure_window window_name icon_name res_class res_name end_windowlist } -maxentries 19 -index event -noscissor 1 Change { if { $changeElm == "rplay" } { if { $rplay == 1 } { set explay 0 Disable playcmd Enable rplayhost Enable rplaypriority Enable rplayvolume } else { Disable rplayhost Disable rplaypriority Disable rplayvolume } } if { $changeElm == "explay" } { if { $explay == 1 } { set rplay 0 Enable playcmd Disable rplayhost Disable rplaypriority Disable rplayvolume } else { Disable playcmd } } } Save { if {$explay == 1} {if {$playcmd != ""} {print "*FvwmAudioPlayCmd\t$playcmd" } else { error "Invalid external play command in FvwmAudio" }} if {$rplay == 1} {print "*FvwmAudioPlayCmd\tbuiltin-rplay"} if {$rplayhost != ""} {print "*FvwmAudioRplayHost\t$rplayhost"} if {$rplaypriority != ""} {print "*FvwmAudioRplayPriority\t$rplaypriority"} if {$rplayvolume != ""} {print "*FvwmAudioRplayVolume\t$rplayvolume"} if {$dir != ""} {print "*FvwmAudioDir\t$dir"} if {$delay != ""} {print "*FvwmAudioDelay\t$delay"} forevery events { if {$file != ""} {print "*FvwmAudio $event\t$file"} } if {$spawn == 1} { print "AddToFunc InitFunction \"I\" Module FvwmAudio" print "AddToFunc RestartFunction \"I\" Module FvwmAudio" } } }