1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
8 * This file defines the <code>PPB_Fullscreen</code> interface for
9 * handling transitions of a module instance to and from fullscreen mode.
19 * The <code>PPB_Fullscreen</code> interface is implemented by the browser.
20 * This interface provides a way of checking the current screen mode and
21 * toggling fullscreen mode.
23 interface PPB_Fullscreen
{
25 * IsFullscreen() checks whether the module instance is currently in
28 * @param[in] instance A <code>PP_Instance</code> identifying one instance
31 * @return <code>PP_TRUE</code> if the module instance is in fullscreen mode,
32 * <code>PP_FALSE</code> if the module instance is not in fullscreen mode.
35 [in] PP_Instance instance
);
38 * SetFullscreen() switches the module instance to and from fullscreen
41 * The transition to and from fullscreen mode is asynchronous. During the
42 * transition, IsFullscreen() will return the previous value and
43 * no 2D or 3D device can be bound. The transition ends at DidChangeView()
44 * when IsFullscreen() returns the new value. You might receive other
45 * DidChangeView() calls while in transition.
47 * The transition to fullscreen mode can only occur while the browser is
48 * processing a user gesture, even if <code>PP_TRUE</code> is returned.
50 * @param[in] instance A <code>PP_Instance</code> identifying one instance
52 * @param[in] fullscreen <code>PP_TRUE</code> to enter fullscreen mode, or
53 * <code>PP_FALSE</code> to exit fullscreen mode.
55 * @return <code>PP_TRUE</code> on success or <code>PP_FALSE</code> on
58 PP_Bool SetFullscreen
(
59 [in] PP_Instance instance
,
60 [in] PP_Bool fullscreen
);
63 * GetScreenSize() gets the size of the screen in pixels. The module instance
64 * will be resized to this size when SetFullscreen() is called to enter
67 * @param[in] instance A <code>PP_Instance</code> identifying one instance
69 * @param[out] size The size of the entire screen in pixels.
71 * @return <code>PP_TRUE</code> on success or <code>PP_FALSE</code> on
74 PP_Bool GetScreenSize
(
75 [in] PP_Instance instance
,