WebKit roll 98705:98715
[chromium-blink-merge.git] / ppapi / c / ppb_fullscreen.h
blob18d52ba9ec71c19243c13ed0f9440d90df986a95
1 /* Copyright (c) 2011 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 Sun Oct 16 22:32:54 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.
26 /**
27 * @addtogroup Interfaces
28 * @{
30 struct PPB_Fullscreen {
31 /**
32 * Checks whether the plugin instance is currently in fullscreen mode.
34 PP_Bool (*IsFullscreen)(PP_Instance instance);
35 /**
36 * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
37 * success, PP_FALSE on failure.
39 * The transition to and from fullscreen is asynchronous.
40 * During the transition, IsFullscreen will return the original value, and
41 * no 2D or 3D device can be bound. The transition ends at DidChangeView
42 * when IsFullscreen returns the new value. You might receive other
43 * DidChangeView calls while in transition.
45 * The transition to fullscreen can only occur while the browser is
46 * processing a user gesture, even if PP_TRUE is returned.
48 PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen);
49 /**
50 * Gets the size of the screen in pixels. When going fullscreen, the instance
51 * will be resized to that size.
53 PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size);
55 /**
56 * @}
59 #endif /* PPAPI_C_PPB_FULLSCREEN_H_ */