Commit 1649b5b0 authored by brettw@chromium.org's avatar brettw@chromium.org

Add IDL for the fullscreen dev API and automatically generate the .h file.

Review URL: http://codereview.chromium.org/7740052

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98465 0039d316-1c4b-4281-b951-d872f2087c98
parent 814127cb
/* Copyright (c) 2011 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_Fullscreen</code> interface.
*/
label Chrome {
M14 = 0.4
};
interface PPB_Fullscreen_Dev {
/**
* Checks whether the plugin instance is currently in fullscreen mode.
*/
PP_Bool IsFullscreen(
[in] PP_Instance instance);
/**
* Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
* success, PP_FALSE on failure.
*
* This unbinds the current Graphics2D or Surface3D. 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 Surface3D can be bound. The transition ends at the
* next DidChangeView.
*
* Note: when switching to and from fullscreen, Context3D and Surface3D
* resources need to be re-created. This is a current limitation that will be
* lifted in a later revision.
*/
PP_Bool SetFullscreen(
[in] PP_Instance instance,
[in] PP_Bool fullscreen);
/**
* Gets the size of the screen. When going fullscreen, the instance will be
* resized to that size.
*/
PP_Bool GetScreenSize(
[in] PP_Instance instance,
[out] PP_Size size);
};
/* Copyright (c) 2010 The Chromium Authors. All rights reserved. /* Copyright (c) 2011 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be * Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. * found in the LICENSE file.
*/ */
/* From dev/ppb_fullscreen_dev.idl modified Fri Aug 26 10:51:16 2011. */
#ifndef PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_ #ifndef PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_
#define PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_ #define PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_
#include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_size.h" #include "ppapi/c/pp_size.h"
#include "ppapi/c/pp_stdint.h" #include "ppapi/c/pp_stdint.h"
#define PPB_FULLSCREEN_DEV_INTERFACE_0_4 "PPB_Fullscreen(Dev);0.4" #define PPB_FULLSCREEN_DEV_INTERFACE_0_4 "PPB_Fullscreen(Dev);0.4"
#define PPB_FULLSCREEN_DEV_INTERFACE PPB_FULLSCREEN_DEV_INTERFACE_0_4 #define PPB_FULLSCREEN_DEV_INTERFACE PPB_FULLSCREEN_DEV_INTERFACE_0_4
// Use this interface to change a plugin instance to fullscreen mode. /**
* @file
* This file defines the <code>PPB_Fullscreen</code> interface.
*/
/**
* @addtogroup Interfaces
* @{
*/
struct PPB_Fullscreen_Dev { struct PPB_Fullscreen_Dev {
// Checks whether the plugin instance is currently in fullscreen mode. /**
* Checks whether the plugin instance is currently in fullscreen mode.
*/
PP_Bool (*IsFullscreen)(PP_Instance instance); PP_Bool (*IsFullscreen)(PP_Instance instance);
/**
// Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
// success, PP_FALSE on failure. * success, PP_FALSE on failure.
// This unbinds the current Graphics2D or Surface3D. Pending flushes and *
// swapbuffers will execute as if the resource was off-screen. The transition * This unbinds the current Graphics2D or Surface3D. Pending flushes and
// is asynchronous. During the transition, IsFullscreen will return PP_False, * swapbuffers will execute as if the resource was off-screen. The transition
// and no Graphics2D or Surface3D can be bound. The transition ends at the * is asynchronous. During the transition, IsFullscreen will return PP_False,
// next DidChangeView. * and no Graphics2D or Surface3D can be bound. The transition ends at the
// Note: when switching to and from fullscreen, Context3D and Surface3D * next DidChangeView.
// resources need to be re-created. This is a current limitation that will be *
// lifted in a later revision. * Note: when switching to and from fullscreen, Context3D and Surface3D
* resources need to be re-created. This is a current limitation that will be
* lifted in a later revision.
*/
PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen); PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen);
/**
// Gets the size of the screen. When going fullscreen, the instance will be * Gets the size of the screen. When going fullscreen, the instance will be
// resized to that size. * resized to that size.
*/
PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size); PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size);
}; };
/**
* @}
*/
#endif /* PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_ */ #endif /* PPAPI_C_DEV_PPB_FULLSCREEN_DEV_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment