################################################################### # Minidisc Toc Editor # Copyright (C) 2001 ... ... # # $Id: template.tcl,v 1.2 2002/02/18 15:29:23 rathmann Exp $ # # Template for mdtoceditor plugins # ################################################################### set option proc pluginName {} { # Return the name of the plugin. It will be used for # information purposes only, so any name is allowed. return "" } proc pluginOptions {} { # Some decks of the same company differ only in very few commands. # To handle all of them in one plugin, the plugin can return # an optionlist (stringlist). If the optionlist is not empty # pluginOpen will be called with one of these options. # If no options are necessairy, remove the proc completely return "" } proc pluginOpen { opt } { # pluginOpen will be called when pluginOptions is implemented # and returns a nonempty list. opt will be one of the option list. # If no options are necessairy, remove the proc completely # The following lines show how to access a global variable in Tcl. # You can access it from everywhere, if you declare it # using the "global" command. global option set option $opt } proc timing {} { # The deck will need some time to process an IR signal and # to be able to accept the following one. Timing is a delay # in miliseconds that will be inserted after each IR signal. return 100 } proc delay {} { # The deck will need some time to process an IR signal and # to be able to accept the following one. There will be # operations that require more than the normal timing delay. # In these situations it is necessary to insert explicite # delay commands into the command sequences. # delay commands might be absolute or better relative time values. # Relative values are multiples of this delay value (miliseconds). # The idea behind this delay value is to have a easy way to adjust # delays in case of trouble. return 800 } proc reset {} { # sets the deck and its menus into an initial state # if there is nothing to reset, remove the proc completely } proc power {} { # set the command of the power button of your lirc remote file # If your deck has no power button, remove the proc completely ircmd REMOTE power } proc eject {} { # set the command of the eject button of your lirc remote file # If your deck has no eject button, remove the proc completely ircmd REMOTE eject } proc play {track} { # return the sequence of the buttons of your lirc remote file # to play track } proc stop {} { # set the command of the stop button of your lirc remote file # If your deck has no stop button, remove the proc completely ircmd REMOTE stop } proc pause {} { # set the command of the pause button of your lirc remote file # If your deck has no pause button, remove the proc completely ircmd REMOTE pause } proc forward {} { # set the command of the forward button of your lirc remote file # Normally it must be pushed some amount of time. # If your deck has no forward button, remove the proc completely ircmd REMOTE forw 1s } proc backward {} { # set the command of the backward button of your lirc remote file # Normally it must be pushed some amount of time. # If your deck has no backward button, remove the proc completely ircmd REMOTE back 1s } proc nextTrack {} { # set the command of the next button of your lirc remote file # If your deck has no next button, remove the proc completely ircmd REMOTE skip_forw } proc previousTrack {} { # set the command of the previous button of your lirc remote file # If your deck has no previous button, remove the proc completely ircmd REMOTE skip_back } proc setTitle {track title} { # return the sequence of commands # to label track with the title } proc setToc args { # return the sequence of commands # to label a complete disc with the stringlist in args. The first # argument in args will be the disc title, the second one the title # of track 1 ... } proc rescueDisc {} { # As writing to disc is quite slow, some decks write all changes # to memory first and synchronize memory and disc later. This # happens normally while power off, or eject. If your # deck offers a way to suppress synchronization, return the # sequence of buttons for this operation. # If not remove the proc completely. } proc writeToDisc {} { # As writing to disc is quite slow, many decks write all changes # to memory first and synchronize memory and disc later. This # happens normally while power off, or eject. If your # deck offers a way to process this synchronization, return the # sequence of buttons for this operation. # If not remove the proc completely. } proc user {dialogname} { # if it is necessary to do something while processing sequences, # user commands can be inserted, that will call this user proc. # user procs can add additional commands that will be inserted # in the original sequence directly behind the user command. # If this plugin doesn't need this mechanism remove the proc # completely. }