/* 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.
 *
 */

#include "IWidget.idl"

module NMM {
  
  interface IWidget;
  
  /**
   * Window interface.
   * A window is a container for a widget in an OSDManager.
   * This interface can be retrieved through an IWidget or IOSDManager interface.
   */
  interface IWindow {
    
    /** Get window ID. */
    nmm_int32 getWindowID() const;
    
    /**
     * Set position of the window.
     * @param x x position of the upper left corner
     * @param y y position of the upper left corner
     */
    void setPosition(in nmm_uint32 x, in nmm_uint32 y);
    
    /**
     * Get x and y position of the window.
     * @param x x position of the upper left corner
     * @param y y position of the upper left corner
     */
    void getPosition(out nmm_uint32 x, out nmm_uint32 y) const;
    
    /** Set width and height of the window. */
    void setDimension(in nmm_uint32 w, in nmm_uint32 h);
    
    /** Get width and height of the window. */
    void getDimension(out nmm_uint32 w, out nmm_uint32 h) const;
    
    
    /**
     * Redraw the window with help of the widget.
     * Sets updateflag to true.
     */
    void update();
    
    /**
     * Check if window is visible
     * @return true if window is visible
     */
    nmm_bool getVisible() const;
    
    /**
     * Set window visibility
     * @param show true to make window visible
     */
    void setVisible(in nmm_bool value);
    
    /**
     * Set window scale factor.
     */
    void setScaleFactor(in nmm_double x, in nmm_double y);
    
    
    /**
     * Set content.
     * Set the widget that this window contains.
     */
    void setContent(in IWidget value);
    
    /**
     * Get content.
     * Get the widget that this window contains.
     */
    IWidget* getContent() const;
  };
}
