/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


/**
 * This file defines the <code>PPB_FlashFullscreen</code> interface.
 */

label Chrome {
  M16 = 0.1,
  M23 = 1.0
};

interface PPB_FlashFullscreen {
  /**
   * Checks whether the plugin instance is currently in fullscreen mode.
   */
  PP_Bool IsFullscreen(
      [in] PP_Instance instance);

  /*
   * This older version required that graphics contexts be recreated after the
   * transition.
   */
  [version=0.1, deprecate=1.0]
  PP_Bool SetFullscreen(
      [in] PP_Instance instance,
      [in] PP_Bool fullscreen);

  /**
   * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
   * success, PP_FALSE on failure.
   *
   * This does not unbind the current Graphics2D or Graphics3D. Pending flushes
   * and swapbuffers will execute as if the resource was off-screen. The
   * transition is asynchronous. During the transition, IsFullscreen will
   * return PP_FALSE, and no Graphics2D or Graphics3D can be bound. The
   * transition ends at the next DidChangeView when going into fullscreen mode.
   * The transition out of fullscreen mode is synchronous.
   */
  [version=1.0]
  PP_Bool SetFullscreen(
      [in] PP_Instance instance,
      [in] PP_Bool fullscreen);

  /**
   * Gets the size of the screen in pixels. When going fullscreen, the instance
   * will be resized to that size.
   */
  PP_Bool GetScreenSize(
      [in] PP_Instance instance,
      [out] PP_Size size);
};