Removed 'anonymous' from namespace, added whitespace in thread_restrictions.cc
[chromium-blink-merge.git] / ppapi / c / ppb_fullscreen.h
blob7f22f6b821612cbe79853de7b57215fab761a256
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.
4 */
6 /* From ppb_fullscreen.idl modified Wed Dec 21 19:08:34 2011. */
8 #ifndef PPAPI_C_PPB_FULLSCREEN_H_
9 #define PPAPI_C_PPB_FULLSCREEN_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_size.h"
15 #include "ppapi/c/pp_stdint.h"
17 #define PPB_FULLSCREEN_INTERFACE_1_0 "PPB_Fullscreen;1.0"
18 #define PPB_FULLSCREEN_INTERFACE PPB_FULLSCREEN_INTERFACE_1_0
20 /**
21 * @file
22 * This file defines the <code>PPB_Fullscreen</code> interface for
23 * handling transitions of a module instance to and from fullscreen mode.
27 /**
28 * @addtogroup Interfaces
29 * @{
31 /**
32 * The <code>PPB_Fullscreen</code> interface is implemented by the browser.
33 * This interface provides a way of checking the current screen mode and
34 * toggling fullscreen mode.
36 struct PPB_Fullscreen_1_0 {
37 /**
38 * IsFullscreen() checks whether the module instance is currently in
39 * fullscreen mode.
41 * @param[in] instance A <code>PP_Instance</code> identifying one instance
42 * of a module.
44 * @return <code>PP_TRUE</code> if the module instance is in fullscreen mode,
45 * <code>PP_FALSE</code> if the module instance is not in fullscreen mode.
47 PP_Bool (*IsFullscreen)(PP_Instance instance);
48 /**
49 * SetFullscreen() switches the module instance to and from fullscreen
50 * mode.
52 * The transition to and from fullscreen mode is asynchronous. During the
53 * transition, IsFullscreen() will return the previous value and
54 * no 2D or 3D device can be bound. The transition ends at DidChangeView()
55 * when IsFullscreen() returns the new value. You might receive other
56 * DidChangeView() calls while in transition.
58 * The transition to fullscreen mode can only occur while the browser is
59 * processing a user gesture, even if <code>PP_TRUE</code> is returned.
61 * @param[in] instance A <code>PP_Instance</code> identifying one instance
62 * of a module.
63 * @param[in] fullscreen <code>PP_TRUE</code> to enter fullscreen mode, or
64 * <code>PP_FALSE</code> to exit fullscreen mode.
66 * @return <code>PP_TRUE</code> on success or <code>PP_FALSE</code> on
67 * failure.
69 PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen);
70 /**
71 * GetScreenSize() gets the size of the screen in pixels. The module instance
72 * will be resized to this size when SetFullscreen() is called to enter
73 * fullscreen mode.
75 * @param[in] instance A <code>PP_Instance</code> identifying one instance
76 * of a module.
77 * @param[out] size The size of the entire screen in pixels.
79 * @return <code>PP_TRUE</code> on success or <code>PP_FALSE</code> on
80 * failure.
82 PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size);
85 typedef struct PPB_Fullscreen_1_0 PPB_Fullscreen;
86 /**
87 * @}
90 #endif /* PPAPI_C_PPB_FULLSCREEN_H_ */