/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *
 * This file is part of NMM. 
 * 
 * NMM 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; only version 2 of the License.      
 * 
 * NMM 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 NMM; if not, write to the Free Software Foundation,    
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

module NMM {
  
  /**
   * Subtitle Picture Unit (SPU) decoder.
   * Interface that defines the events that control a SPU decoder. These events
   * are sent for example by the DVD reader.
   */
  interface ISPUDecoder {
    
    /**
     * Instream event to set colorpalette item.
     * Assigns an RGBA color value to a color palette index.
     * @param index color palette index
     * @param color_y Y color value
     * @param color_u U color value
     * @param color_v V color value
     * @param alpha alpha value
     */
    Result setPaletteItem(in nmm_int32 index, in nmm_int32 color_y, in nmm_int32 color_u, in nmm_int32 color_v, in nmm_int32 alpha) instream;
    
    /**
     * Instream event to init color sheme.
     * Initialize the colors of a color scheme. Assigns the colors (palette entries) for the
     * selection and activation state of a button that has this scheme.
     * @param scheme_nr index of color scheme
     * @param selection palette index of selection color
     * @param activation color palette index of activation color
     */
    Result initColorScheme(in nmm_int32 scheme_nr, in nmm_int32 selection, in nmm_int32 activation) instream;
    
    /**
     * Instream event to set selected button.
     * Sent by the DVD reader if a new menu button was selected.
     * @param button the button number
     */
    Result setDVDSelectedButton(in nmm_int32 button) instream;
    
    /**
     * Instream event to set the number of buttons.
     * Sent by the DVD reader to inform the SPU decoder about the number of buttons.
     * @param buttons number of buttons
     */
    Result setDVDButtonCount(in nmm_int32 buttons) instream;
    
    /**
     * Instream event to set button coordinates.
     * Sent by the DVD reader to set the coordinates of the current button.
     * @param start_x left X coordinate of button
     * @param start_y upper Y coordinate of button
     * @param end_x right X coordinate of button
     * @param end_y lower Y coordinate of button
     */
    Result setDVDButtonCoords(in nmm_int32 start_x, in nmm_int32 start_y, in nmm_int32 end_x, in nmm_int32 end_y) instream;
    
    /**
     * Instream event to set button color scheme.
     * Sent by the DVD reader to set the color scheme of the current button.
     * @param scheme color scheme index
     */
    Result setDVDButtonScheme(in nmm_int32 scheme) instream;
  };
  
}

