summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-17 20:45:57 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-17 20:45:57 +0000
commit49aa13876dd02aeea1b22443a127796c9a3bfebd (patch)
tree9a5a1ecc878359f21e5fe97a9bdc6ac94fdfae3c
parent51e2f797693a966fca67779eb67475184be2c24d (diff)
downloadchromium_src-49aa13876dd02aeea1b22443a127796c9a3bfebd.zip
chromium_src-49aa13876dd02aeea1b22443a127796c9a3bfebd.tar.gz
chromium_src-49aa13876dd02aeea1b22443a127796c9a3bfebd.tar.bz2
Update placement of interface 'Define'
A minor change to the way we output the headers. This change moves the defines which are used to name the interfaces and thier versions to the top of the header, moving out of the @file block. This prevents them from being 'spewed' in the documentation. BUG= none TEST= none Review URL: http://codereview.chromium.org/7669001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97201 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/c/ppb_audio.h10
-rw-r--r--ppapi/c/ppb_audio_config.h10
-rw-r--r--ppapi/c/ppb_core.h6
-rw-r--r--ppapi/c/ppb_file_io.h15
-rw-r--r--ppapi/c/ppb_file_ref.h8
-rw-r--r--ppapi/c/ppb_file_system.h8
-rw-r--r--ppapi/c/ppb_graphics_2d.h8
-rw-r--r--ppapi/c/ppb_image_data.h10
-rw-r--r--ppapi/c/ppb_input_event.h28
-rw-r--r--ppapi/c/ppb_instance.h10
-rw-r--r--ppapi/c/ppb_messaging.h8
-rw-r--r--ppapi/c/ppb_url_loader.h8
-rw-r--r--ppapi/c/ppb_url_request_info.h10
-rw-r--r--ppapi/c/ppb_url_response_info.h10
-rw-r--r--ppapi/c/ppb_var.h8
-rw-r--r--ppapi/c/ppp_input_event.h8
-rw-r--r--ppapi/c/ppp_instance.h8
-rw-r--r--ppapi/c/ppp_messaging.h10
-rw-r--r--ppapi/c/trusted/ppb_audio_trusted.h6
-rw-r--r--ppapi/c/trusted/ppb_broker_trusted.h6
-rw-r--r--ppapi/c/trusted/ppb_buffer_trusted.h6
-rw-r--r--ppapi/c/trusted/ppb_file_io_trusted.h6
-rw-r--r--ppapi/c/trusted/ppb_image_data_trusted.h6
-rw-r--r--ppapi/c/trusted/ppb_url_loader_trusted.h6
-rw-r--r--ppapi/generators/idl_c_header.py8
-rw-r--r--ppapi/generators/idl_c_proto.py33
26 files changed, 134 insertions, 126 deletions
diff --git a/ppapi/c/ppb_audio.h b/ppapi/c/ppb_audio.h
index 32286df..0712b30 100644
--- a/ppapi/c/ppb_audio.h
+++ b/ppapi/c/ppb_audio.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_audio.idl modified Tue Aug 16 10:08:09 2011. */
+/* From ppb_audio.idl modified Wed Aug 17 11:16:34 2011. */
#ifndef PPAPI_C_PPB_AUDIO_H_
#define PPAPI_C_PPB_AUDIO_H_
@@ -14,6 +14,10 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_AUDIO_INTERFACE_0_6 "PPB_Audio;0.6"
+#define PPB_AUDIO_INTERFACE_1_0 "PPB_Audio;1.0"
+#define PPB_AUDIO_INTERFACE PPB_AUDIO_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_Audio</code> interface, which provides
@@ -72,10 +76,6 @@ typedef void (*PPB_Audio_Callback)(void* sample_buffer,
* ...audio_callback() will now be periodically invoked on a seperate thread...
* @endcode
*/
-#define PPB_AUDIO_INTERFACE_0_6 "PPB_Audio;0.6"
-#define PPB_AUDIO_INTERFACE_1_0 "PPB_Audio;1.0"
-#define PPB_AUDIO_INTERFACE PPB_AUDIO_INTERFACE_1_0
-
struct PPB_Audio {
/**
* Create is a pointer to a function that creates an audio resource.
diff --git a/ppapi/c/ppb_audio_config.h b/ppapi/c/ppb_audio_config.h
index 73fdb63..1e503e7 100644
--- a/ppapi/c/ppb_audio_config.h
+++ b/ppapi/c/ppb_audio_config.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_audio_config.idl modified Tue Aug 16 10:08:33 2011. */
+/* From ppb_audio_config.idl modified Wed Aug 17 11:16:34 2011. */
#ifndef PPAPI_C_PPB_AUDIO_CONFIG_H_
#define PPAPI_C_PPB_AUDIO_CONFIG_H_
@@ -14,6 +14,10 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_AUDIO_CONFIG_INTERFACE_0_5 "PPB_AudioConfig;0.5"
+#define PPB_AUDIO_CONFIG_INTERFACE_1_0 "PPB_AudioConfig;1.0"
+#define PPB_AUDIO_CONFIG_INTERFACE PPB_AUDIO_CONFIG_INTERFACE_1_0
+
/**
* @file
* This file defines the PPB_AudioConfig interface for establishing an
@@ -65,10 +69,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_AudioSampleRate, 4);
* <a href="/chrome/nativeclient/docs/audio.html">Pepper
* Audio API</a> for information on using this interface.
*/
-#define PPB_AUDIO_CONFIG_INTERFACE_0_5 "PPB_AudioConfig;0.5"
-#define PPB_AUDIO_CONFIG_INTERFACE_1_0 "PPB_AudioConfig;1.0"
-#define PPB_AUDIO_CONFIG_INTERFACE PPB_AUDIO_CONFIG_INTERFACE_1_0
-
struct PPB_AudioConfig {
/**
* CreateStereo16bit() creates a 16 bit audio configuration resource. The
diff --git a/ppapi/c/ppb_core.h b/ppapi/c/ppb_core.h
index 58a8d071..e49ca92 100644
--- a/ppapi/c/ppb_core.h
+++ b/ppapi/c/ppb_core.h
@@ -15,6 +15,9 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
+#define PPB_CORE_INTERFACE_1_0 "PPB_Core;1.0"
+#define PPB_CORE_INTERFACE PPB_CORE_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_Core</code> interface defined by the browser
@@ -32,9 +35,6 @@
* to memory management, time, and threads on the browser.
*
*/
-#define PPB_CORE_INTERFACE_1_0 "PPB_Core;1.0"
-#define PPB_CORE_INTERFACE PPB_CORE_INTERFACE_1_0
-
struct PPB_Core {
/**
*
diff --git a/ppapi/c/ppb_file_io.h b/ppapi/c/ppb_file_io.h
index ca23b95..928da63 100644
--- a/ppapi/c/ppb_file_io.h
+++ b/ppapi/c/ppb_file_io.h
@@ -17,6 +17,10 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
+#define PPB_FILEIO_INTERFACE_0_5 "PPB_FileIO;0.5"
+#define PPB_FILEIO_INTERFACE_1_0 "PPB_FileIO;1.0"
+#define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_1_0
+
/**
* @file
* This file defines the API to create a file i/o object.
@@ -70,10 +74,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileOpenFlags, 4);
* The <code>PPB_FileIO</code> struct is used to operate on a regular file
* (PP_FileType_Regular).
*/
-#define PPB_FILEIO_INTERFACE_0_5 "PPB_FileIO;0.5"
-#define PPB_FILEIO_INTERFACE_1_0 "PPB_FileIO;1.0"
-#define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_1_0
-
struct PPB_FileIO {
/**
* Create() creates a new FileIO object.
@@ -164,7 +164,7 @@ struct PPB_FileIO {
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of Read().
*
- * @return An The number of bytes read or an error code from
+ * @return An The number of bytes read an error code from
* <code>pp_errors.h</code>. If the return value is 0, then end-of-file was
* reached. It is valid to call Read() multiple times with a completion
* callback to queue up parallel reads from the file at different offsets.
@@ -190,9 +190,7 @@ struct PPB_FileIO {
* @return An The number of bytes written or an error code from
* <code>pp_errors.h</code>. If the return value is 0, then end-of-file was
* reached. It is valid to call Write() multiple times with a completion
- * callback to queue up parallel writes to the file at different offsets. If
- * bytes_to_write is less than or equal to zero, return value is
- * PP_ERROR_FAILED.
+ * callback to queue up parallel writes to the file at different offsets.
*/
int32_t (*Write)(PP_Resource file_io,
int64_t offset,
@@ -245,3 +243,4 @@ struct PPB_FileIO {
*/
#endif /* PPAPI_C_PPB_FILE_IO_H_ */
+
diff --git a/ppapi/c/ppb_file_ref.h b/ppapi/c/ppb_file_ref.h
index 98c181e..26bb97f 100644
--- a/ppapi/c/ppb_file_ref.h
+++ b/ppapi/c/ppb_file_ref.h
@@ -17,6 +17,10 @@
#include "ppapi/c/pp_time.h"
#include "ppapi/c/pp_var.h"
+#define PPB_FILEREF_INTERFACE_0_9 "PPB_FileRef;0.9"
+#define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0"
+#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_0
+
/**
* @file
* This file defines the API to create a file reference or "weak pointer" to a
@@ -33,10 +37,6 @@
* a file system. This struct contains a <code>PP_FileSystemType</code>
* identifier and a file path string.
*/
-#define PPB_FILEREF_INTERFACE_0_9 "PPB_FileRef;0.9"
-#define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0"
-#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_0
-
struct PPB_FileRef {
/**
* Create() creates a weak pointer to a file in the given file system. File
diff --git a/ppapi/c/ppb_file_system.h b/ppapi/c/ppb_file_system.h
index b7baf75..6d9c336 100644
--- a/ppapi/c/ppb_file_system.h
+++ b/ppapi/c/ppb_file_system.h
@@ -16,6 +16,10 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_FILESYSTEM_INTERFACE_0_7 "PPB_FileSystem;0.7"
+#define PPB_FILESYSTEM_INTERFACE_1_0 "PPB_FileSystem;1.0"
+#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_1_0
+
/**
* @file
* This file defines the API to create a file system associated with a file.
@@ -30,10 +34,6 @@
* The <code>PPB_FileSystem</code> struct identifies the file system type
* associated with a file.
*/
-#define PPB_FILESYSTEM_INTERFACE_0_7 "PPB_FileSystem;0.7"
-#define PPB_FILESYSTEM_INTERFACE_1_0 "PPB_FileSystem;1.0"
-#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_1_0
-
struct PPB_FileSystem {
/** Create() creates a file system object of the given type.
*
diff --git a/ppapi/c/ppb_graphics_2d.h b/ppapi/c/ppb_graphics_2d.h
index 068a720..2ef71f2 100644
--- a/ppapi/c/ppb_graphics_2d.h
+++ b/ppapi/c/ppb_graphics_2d.h
@@ -18,6 +18,10 @@
#include "ppapi/c/pp_size.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_GRAPHICS_2D_INTERFACE_0_4 "PPB_Graphics2D;0.4"
+#define PPB_GRAPHICS_2D_INTERFACE_1_0 "PPB_Graphics2D;1.0"
+#define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_1_0
+
/**
* @file
* Defines the <code>PPB_Graphics2D</code> struct representing a 2D graphics
@@ -32,10 +36,6 @@
/**
* <code>PPB_Graphics2D</code> defines the interface for a 2D graphics context.
*/
-#define PPB_GRAPHICS_2D_INTERFACE_0_4 "PPB_Graphics2D;0.4"
-#define PPB_GRAPHICS_2D_INTERFACE_1_0 "PPB_Graphics2D;1.0"
-#define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_1_0
-
struct PPB_Graphics2D {
/**
* Create() creates a 2D graphics context. The returned graphics context will
diff --git a/ppapi/c/ppb_image_data.h b/ppapi/c/ppb_image_data.h
index d06602e..d81a97b 100644
--- a/ppapi/c/ppb_image_data.h
+++ b/ppapi/c/ppb_image_data.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_image_data.idl modified Sat Jul 16 16:50:26 2011. */
+/* From ppb_image_data.idl modified Mon Aug 15 11:01:06 2011. */
#ifndef PPAPI_C_PPB_IMAGE_DATA_H_
#define PPAPI_C_PPB_IMAGE_DATA_H_
@@ -15,6 +15,10 @@
#include "ppapi/c/pp_size.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_IMAGEDATA_INTERFACE_0_3 "PPB_ImageData;0.3"
+#define PPB_IMAGEDATA_INTERFACE_1_0 "PPB_ImageData;1.0"
+#define PPB_IMAGEDATA_INTERFACE PPB_IMAGEDATA_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_ImageData</code> struct for determining how
@@ -102,10 +106,6 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_ImageDataDesc, 16);
* The <code>PPB_ImageData</code> interface contains pointers to several
* functions for determining the browser's treatment of image data.
*/
-#define PPB_IMAGEDATA_INTERFACE_0_3 "PPB_ImageData;0.3"
-#define PPB_IMAGEDATA_INTERFACE_1_0 "PPB_ImageData;1.0"
-#define PPB_IMAGEDATA_INTERFACE PPB_IMAGEDATA_INTERFACE_1_0
-
struct PPB_ImageData {
/**
* GetNativeImageDataFormat() returns the browser's preferred format for
diff --git a/ppapi/c/ppb_input_event.h b/ppapi/c/ppb_input_event.h
index 5542335..2ad6741e 100644
--- a/ppapi/c/ppb_input_event.h
+++ b/ppapi/c/ppb_input_event.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_input_event.idl modified Tue Aug 16 09:56:44 2011. */
+/* From ppb_input_event.idl modified Wed Aug 17 11:16:34 2011. */
#ifndef PPAPI_C_PPB_INPUT_EVENT_H_
#define PPAPI_C_PPB_INPUT_EVENT_H_
@@ -17,6 +17,19 @@
#include "ppapi/c/pp_time.h"
#include "ppapi/c/pp_var.h"
+#define PPB_INPUT_EVENT_INTERFACE_1_0 "PPB_InputEvent;1.0"
+#define PPB_INPUT_EVENT_INTERFACE PPB_INPUT_EVENT_INTERFACE_1_0
+
+#define PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0 "PPB_MouseInputEvent;1.0"
+#define PPB_MOUSE_INPUT_EVENT_INTERFACE PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0
+
+#define PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 "PPB_WheelInputEvent;1.0"
+#define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0
+
+#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0"
+#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \
+ PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0
+
/**
* @file
* This file defines the Input Event interfaces.
@@ -210,9 +223,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_InputEvent_Class, 4);
* The <code>PPB_InputEvent</code> interface contains pointers to several
* functions related to generic input events on the browser.
*/
-#define PPB_INPUT_EVENT_INTERFACE_1_0 "PPB_InputEvent;1.0"
-#define PPB_INPUT_EVENT_INTERFACE PPB_INPUT_EVENT_INTERFACE_1_0
-
struct PPB_InputEvent {
/**
* RequestInputEvent() requests that input events corresponding to the given
@@ -374,9 +384,6 @@ struct PPB_InputEvent {
* The <code>PPB_MouseInputEvent</code> interface contains pointers to several
* functions related to mouse input events.
*/
-#define PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0 "PPB_MouseInputEvent;1.0"
-#define PPB_MOUSE_INPUT_EVENT_INTERFACE PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0
-
struct PPB_MouseInputEvent {
/**
* Create() creates a mouse input event with the given parameters. Normally
@@ -454,9 +461,6 @@ struct PPB_MouseInputEvent {
* The <code>PPB_WheelIputEvent</code> interface contains pointers to several
* functions related to wheel input events.
*/
-#define PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0 "PPB_WheelInputEvent;1.0"
-#define PPB_WHEEL_INPUT_EVENT_INTERFACE PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0
-
struct PPB_WheelInputEvent {
/**
* Create() creates a wheel input event with the given parameters. Normally
@@ -564,10 +568,6 @@ struct PPB_WheelInputEvent {
* The <code>PPB_KeyboardInputEvent</code> interface contains pointers to
* several functions related to keyboard input events.
*/
-#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0 "PPB_KeyboardInputEvent;1.0"
-#define PPB_KEYBOARD_INPUT_EVENT_INTERFACE \
- PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0
-
struct PPB_KeyboardInputEvent {
/**
* Creates a keyboard input event with the given parameters. Normally you
diff --git a/ppapi/c/ppb_instance.h b/ppapi/c/ppb_instance.h
index 669225b..ae14853 100644
--- a/ppapi/c/ppb_instance.h
+++ b/ppapi/c/ppb_instance.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_instance.idl modified Wed Jul 20 11:13:48 2011. */
+/* From ppb_instance.idl modified Mon Aug 15 11:01:06 2011. */
#ifndef PPAPI_C_PPB_INSTANCE_H_
#define PPAPI_C_PPB_INSTANCE_H_
@@ -15,6 +15,10 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
+#define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5"
+#define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0"
+#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0
+
/**
* @file
* This file defines the PPB_Instance interface implemented by the
@@ -31,10 +35,6 @@
* The PPB_Instance interface contains pointers to functions
* related to the module instance on a web page.
*/
-#define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5"
-#define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0"
-#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0
-
struct PPB_Instance {
/**
* BindGraphics() binds the given graphics as the current display surface.
diff --git a/ppapi/c/ppb_messaging.h b/ppapi/c/ppb_messaging.h
index e98cf46..4d9fc1a 100644
--- a/ppapi/c/ppb_messaging.h
+++ b/ppapi/c/ppb_messaging.h
@@ -14,6 +14,10 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
+#define PPB_MESSAGING_INTERFACE_0_1 "PPB_Messaging;0.1"
+#define PPB_MESSAGING_INTERFACE_1_0 "PPB_Messaging;1.0"
+#define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_Messaging</code> interface implemented
@@ -31,10 +35,6 @@
* and is related to sending messages to JavaScript message event listeners on
* the DOM element associated with specific module instance.
*/
-#define PPB_MESSAGING_INTERFACE_0_1 "PPB_Messaging;0.1"
-#define PPB_MESSAGING_INTERFACE_1_0 "PPB_Messaging;1.0"
-#define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_1_0
-
struct PPB_Messaging {
/**
* PostMessage() asynchronously invokes any listeners for message events on
diff --git a/ppapi/c/ppb_url_loader.h b/ppapi/c/ppb_url_loader.h
index ce60c91..86a7776 100644
--- a/ppapi/c/ppb_url_loader.h
+++ b/ppapi/c/ppb_url_loader.h
@@ -15,6 +15,10 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_URLLOADER_INTERFACE_0_2 "PPB_URLLoader;0.2"
+#define PPB_URLLOADER_INTERFACE_1_0 "PPB_URLLoader;1.0"
+#define PPB_URLLOADER_INTERFACE PPB_URLLOADER_INTERFACE_1_0
+
/**
* @file
* This file defines the <strong>PPB_URLLoader</strong> interface for loading
@@ -45,10 +49,6 @@
* - Then, access the downloaded file using the GetBodyAsFileRef() function of
* the <code>URLResponseInfo</code> returned in step #4.
*/
-#define PPB_URLLOADER_INTERFACE_0_2 "PPB_URLLoader;0.2"
-#define PPB_URLLOADER_INTERFACE_1_0 "PPB_URLLoader;1.0"
-#define PPB_URLLOADER_INTERFACE PPB_URLLOADER_INTERFACE_1_0
-
struct PPB_URLLoader {
/**
* Create() creates a new <code>URLLoader</code> object. The
diff --git a/ppapi/c/ppb_url_request_info.h b/ppapi/c/ppb_url_request_info.h
index e2e8bbe..e6c7301 100644
--- a/ppapi/c/ppb_url_request_info.h
+++ b/ppapi/c/ppb_url_request_info.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_url_request_info.idl modified Thu Aug 11 14:19:23 2011. */
+/* From ppb_url_request_info.idl modified Mon Aug 15 11:01:06 2011. */
#ifndef PPAPI_C_PPB_URL_REQUEST_INFO_H_
#define PPAPI_C_PPB_URL_REQUEST_INFO_H_
@@ -16,6 +16,10 @@
#include "ppapi/c/pp_time.h"
#include "ppapi/c/pp_var.h"
+#define PPB_URLREQUESTINFO_INTERFACE_0_2 "PPB_URLRequestInfo;0.2"
+#define PPB_URLREQUESTINFO_INTERFACE_1_0 "PPB_URLRequestInfo;1.0"
+#define PPB_URLREQUESTINFO_INTERFACE PPB_URLREQUESTINFO_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_URLRequestInfo</code> API for creating and
@@ -159,10 +163,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLRequestProperty, 4);
* <code>PPB_URLLoader</code>. Refer to <code>PPB_URLLoader</code> for further
* information.
*/
-#define PPB_URLREQUESTINFO_INTERFACE_0_2 "PPB_URLRequestInfo;0.2"
-#define PPB_URLREQUESTINFO_INTERFACE_1_0 "PPB_URLRequestInfo;1.0"
-#define PPB_URLREQUESTINFO_INTERFACE PPB_URLREQUESTINFO_INTERFACE_1_0
-
struct PPB_URLRequestInfo {
/**
* Create() creates a new <code>URLRequestInfo</code> object.
diff --git a/ppapi/c/ppb_url_response_info.h b/ppapi/c/ppb_url_response_info.h
index 1f0020e..2df1acf 100644
--- a/ppapi/c/ppb_url_response_info.h
+++ b/ppapi/c/ppb_url_response_info.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_url_response_info.idl modified Fri Aug 12 14:54:32 2011. */
+/* From ppb_url_response_info.idl modified Mon Aug 15 11:01:06 2011. */
#ifndef PPAPI_C_PPB_URL_RESPONSE_INFO_H_
#define PPAPI_C_PPB_URL_RESPONSE_INFO_H_
@@ -14,6 +14,10 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
+#define PPB_URLRESPONSEINFO_INTERFACE_0_1 "PPB_URLResponseInfo;0.1"
+#define PPB_URLRESPONSEINFO_INTERFACE_1_0 "PPB_URLResponseInfo;1.0"
+#define PPB_URLRESPONSEINFO_INTERFACE PPB_URLRESPONSEINFO_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_URLResponseInfo</code> API for examining URL
@@ -93,10 +97,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLResponseProperty, 4);
* examining URL responses. Refer to <code>PPB_URLLoader</code> for further
* information.
*/
-#define PPB_URLRESPONSEINFO_INTERFACE_0_1 "PPB_URLResponseInfo;0.1"
-#define PPB_URLRESPONSEINFO_INTERFACE_1_0 "PPB_URLResponseInfo;1.0"
-#define PPB_URLRESPONSEINFO_INTERFACE PPB_URLRESPONSEINFO_INTERFACE_1_0
-
struct PPB_URLResponseInfo {
/**
* IsURLResponseInfo() determines if a response is a
diff --git a/ppapi/c/ppb_var.h b/ppapi/c/ppb_var.h
index 2351536..66920ad 100644
--- a/ppapi/c/ppb_var.h
+++ b/ppapi/c/ppb_var.h
@@ -14,6 +14,10 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
+#define PPB_VAR_INTERFACE_0_5 "PPB_Var;0.5"
+#define PPB_VAR_INTERFACE_1_0 "PPB_Var;1.0"
+#define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPB_Var</code> struct.
@@ -27,10 +31,6 @@
/**
* PPB_Var API
*/
-#define PPB_VAR_INTERFACE_0_5 "PPB_Var;0.5"
-#define PPB_VAR_INTERFACE_1_0 "PPB_Var;1.0"
-#define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_0
-
struct PPB_Var {
/**
* AddRef() adds a reference to the given var. If this is not a refcounted
diff --git a/ppapi/c/ppp_input_event.h b/ppapi/c/ppp_input_event.h
index dec8f23..1abf5ab 100644
--- a/ppapi/c/ppp_input_event.h
+++ b/ppapi/c/ppp_input_event.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppp_input_event.idl modified Thu Aug 11 16:06:41 2011. */
+/* From ppp_input_event.idl modified Wed Aug 17 11:16:34 2011. */
#ifndef PPAPI_C_PPP_INPUT_EVENT_H_
#define PPAPI_C_PPP_INPUT_EVENT_H_
@@ -14,6 +14,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPP_INPUT_EVENT_INTERFACE_0_1 "PPP_InputEvent;0.1"
+#define PPP_INPUT_EVENT_INTERFACE PPP_INPUT_EVENT_INTERFACE_0_1
+
/**
* @file
* This file defines the API for receiving input events from the browser.
@@ -24,9 +27,6 @@
* @addtogroup Interfaces
* @{
*/
-#define PPP_INPUT_EVENT_INTERFACE_0_1 "PPP_InputEvent;0.1"
-#define PPP_INPUT_EVENT_INTERFACE PPP_INPUT_EVENT_INTERFACE_0_1
-
struct PPP_InputEvent {
/**
* Function for receiving input events from the browser.
diff --git a/ppapi/c/ppp_instance.h b/ppapi/c/ppp_instance.h
index 86a14eb..5a907bc 100644
--- a/ppapi/c/ppp_instance.h
+++ b/ppapi/c/ppp_instance.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppp_instance.idl modified Tue Aug 9 09:58:45 2011. */
+/* From ppp_instance.idl modified Mon Aug 15 11:01:06 2011. */
#ifndef PPAPI_C_PPP_INSTANCE_H_
#define PPAPI_C_PPP_INSTANCE_H_
@@ -17,6 +17,9 @@
#include "ppapi/c/pp_size.h"
#include "ppapi/c/pp_stdint.h"
+#define PPP_INSTANCE_INTERFACE_1_0 "PPP_Instance;1.0"
+#define PPP_INSTANCE_INTERFACE PPP_INSTANCE_INTERFACE_1_0
+
/**
* @file
* This file defines the <code>PPP_Instance</code> structure - a series of
@@ -35,9 +38,6 @@
* to handle events such as change of focus or input events (keyboard/mouse)
* events.
*/
-#define PPP_INSTANCE_INTERFACE_1_0 "PPP_Instance;1.0"
-#define PPP_INSTANCE_INTERFACE PPP_INSTANCE_INTERFACE_1_0
-
struct PPP_Instance {
/**
* DidCreate() is a creation handler that is called when a new instance is
diff --git a/ppapi/c/ppp_messaging.h b/ppapi/c/ppp_messaging.h
index 97f2745..7d5a26a 100644
--- a/ppapi/c/ppp_messaging.h
+++ b/ppapi/c/ppp_messaging.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppp_messaging.idl modified Mon Jul 18 10:06:08 2011. */
+/* From ppp_messaging.idl modified Wed Jul 13 16:51:47 2011. */
#ifndef PPAPI_C_PPP_MESSAGING_H_
#define PPAPI_C_PPP_MESSAGING_H_
@@ -14,6 +14,10 @@
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
+#define PPP_MESSAGING_INTERFACE_0_1 "PPP_Messaging;0.1"
+#define PPP_MESSAGING_INTERFACE_1_0 "PPP_Messaging;1.0"
+#define PPP_MESSAGING_INTERFACE PPP_MESSAGING_INTERFACE_1_0
+
/**
* @file
* This file defines the PPP_Messaging interface containing pointers to
@@ -32,10 +36,6 @@
* that you must implement to handle postMessage events on the associated
* DOM element.
*/
-#define PPP_MESSAGING_INTERFACE_0_1 "PPP_Messaging;0.1"
-#define PPP_MESSAGING_INTERFACE_1_0 "PPP_Messaging;1.0"
-#define PPP_MESSAGING_INTERFACE PPP_MESSAGING_INTERFACE_1_0
-
struct PPP_Messaging {
/**
* HandleMessage() is a function that the browser calls when PostMessage()
diff --git a/ppapi/c/trusted/ppb_audio_trusted.h b/ppapi/c/trusted/ppb_audio_trusted.h
index 92076d3..152a850 100644
--- a/ppapi/c/trusted/ppb_audio_trusted.h
+++ b/ppapi/c/trusted/ppb_audio_trusted.h
@@ -14,6 +14,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_AUDIO_TRUSTED_INTERFACE_0_6 "PPB_AudioTrusted;0.6"
+#define PPB_AUDIO_TRUSTED_INTERFACE PPB_AUDIO_TRUSTED_INTERFACE_0_6
+
/**
* @file
* This file defines the trusted audio interface.
@@ -30,9 +33,6 @@
* resource returned is an Audio resource; most of the PPB_Audio
* interface is also usable on this resource.
*/
-#define PPB_AUDIO_TRUSTED_INTERFACE_0_6 "PPB_AudioTrusted;0.6"
-#define PPB_AUDIO_TRUSTED_INTERFACE PPB_AUDIO_TRUSTED_INTERFACE_0_6
-
struct PPB_AudioTrusted {
/** Returns an audio resource. */
PP_Resource (*CreateTrusted)(PP_Instance instance);
diff --git a/ppapi/c/trusted/ppb_broker_trusted.h b/ppapi/c/trusted/ppb_broker_trusted.h
index ed4e372..9acd9cd 100644
--- a/ppapi/c/trusted/ppb_broker_trusted.h
+++ b/ppapi/c/trusted/ppb_broker_trusted.h
@@ -15,6 +15,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_BROKER_TRUSTED_INTERFACE_0_2 "PPB_BrokerTrusted;0.2"
+#define PPB_BROKER_TRUSTED_INTERFACE PPB_BROKER_TRUSTED_INTERFACE_0_2
+
/**
* @file
* This file defines the PPB_BrokerTrusted interface, which provides
@@ -37,9 +40,6 @@
* handle is closed. The handle should be closed before the resource is
* released.
*/
-#define PPB_BROKER_TRUSTED_INTERFACE_0_2 "PPB_BrokerTrusted;0.2"
-#define PPB_BROKER_TRUSTED_INTERFACE PPB_BROKER_TRUSTED_INTERFACE_0_2
-
struct PPB_BrokerTrusted {
/**
* Returns a trusted broker resource.
diff --git a/ppapi/c/trusted/ppb_buffer_trusted.h b/ppapi/c/trusted/ppb_buffer_trusted.h
index 5cd1b3a..b81f8d6 100644
--- a/ppapi/c/trusted/ppb_buffer_trusted.h
+++ b/ppapi/c/trusted/ppb_buffer_trusted.h
@@ -12,6 +12,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_BUFFER_TRUSTED_INTERFACE_0_1 "PPB_BufferTrusted;0.1"
+#define PPB_BUFFER_TRUSTED_INTERFACE PPB_BUFFER_TRUSTED_INTERFACE_0_1
+
/**
* @file
* This file defines the trusted buffer interface.
@@ -22,9 +25,6 @@
* @addtogroup Interfaces
* @{
*/
-#define PPB_BUFFER_TRUSTED_INTERFACE_0_1 "PPB_BufferTrusted;0.1"
-#define PPB_BUFFER_TRUSTED_INTERFACE PPB_BUFFER_TRUSTED_INTERFACE_0_1
-
struct PPB_BufferTrusted {
/**
* Returns the internal shared memory pointer associated with the given
diff --git a/ppapi/c/trusted/ppb_file_io_trusted.h b/ppapi/c/trusted/ppb_file_io_trusted.h
index 6e684c3..877c157 100644
--- a/ppapi/c/trusted/ppb_file_io_trusted.h
+++ b/ppapi/c/trusted/ppb_file_io_trusted.h
@@ -13,6 +13,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4"
+#define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_4
+
/**
* @file
*
@@ -25,9 +28,6 @@
* @{
*/
/* Available only to trusted implementations. */
-#define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4"
-#define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_4
-
struct PPB_FileIOTrusted {
/**
* Returns a file descriptor corresponding to the given FileIO object. On
diff --git a/ppapi/c/trusted/ppb_image_data_trusted.h b/ppapi/c/trusted/ppb_image_data_trusted.h
index 00bef7d..824fb9e 100644
--- a/ppapi/c/trusted/ppb_image_data_trusted.h
+++ b/ppapi/c/trusted/ppb_image_data_trusted.h
@@ -12,6 +12,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4 "PPB_ImageDataTrusted;0.4"
+#define PPB_IMAGEDATA_TRUSTED_INTERFACE PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4
+
/**
* @file
* This file defines the trusted ImageData interface.
@@ -23,9 +26,6 @@
* @{
*/
/** Trusted interface */
-#define PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4 "PPB_ImageDataTrusted;0.4"
-#define PPB_IMAGEDATA_TRUSTED_INTERFACE PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4
-
struct PPB_ImageDataTrusted {
/**
* Returns the internal shared memory pointer associated with the given
diff --git a/ppapi/c/trusted/ppb_url_loader_trusted.h b/ppapi/c/trusted/ppb_url_loader_trusted.h
index e5ced68..8d1a248 100644
--- a/ppapi/c/trusted/ppb_url_loader_trusted.h
+++ b/ppapi/c/trusted/ppb_url_loader_trusted.h
@@ -13,6 +13,9 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#define PPB_URLLOADERTRUSTED_INTERFACE_0_3 "PPB_URLLoaderTrusted;0.3"
+#define PPB_URLLOADERTRUSTED_INTERFACE PPB_URLLOADERTRUSTED_INTERFACE_0_3
+
/**
* @file
* URL loader trusted interfaces. */
@@ -42,9 +45,6 @@ typedef void (*PP_URLLoaderTrusted_StatusCallback)(
* @{
*/
/* Available only to trusted implementations. */
-#define PPB_URLLOADERTRUSTED_INTERFACE_0_3 "PPB_URLLoaderTrusted;0.3"
-#define PPB_URLLOADERTRUSTED_INTERFACE PPB_URLLOADERTRUSTED_INTERFACE_0_3
-
struct PPB_URLLoaderTrusted {
/**
* Grant this URLLoader the capability to make unrestricted cross-origin
diff --git a/ppapi/generators/idl_c_header.py b/ppapi/generators/idl_c_header.py
index d95a7c2..72fbf2a 100644
--- a/ppapi/generators/idl_c_header.py
+++ b/ppapi/generators/idl_c_header.py
@@ -86,8 +86,14 @@ def GenerateHeader(filenode, pref, inline=True):
if include == cur_include: continue
out.Write('#include "%s"\n' % include)
+ # Generate all interface defines
+ release = 'M14'
+ out.Write('\n')
+ for node in filenode.GetListOf('Interface'):
+ out.Write( cgen.InterfaceDefs(node) )
+
# Generate the @file comment
- out.Write('\n%s\n' % cgen.Comment(fileinfo, prefix='*\n @file'))
+ out.Write('%s\n' % cgen.Comment(fileinfo, prefix='*\n @file'))
# Generate definitions.
last_group = None
diff --git a/ppapi/generators/idl_c_proto.py b/ppapi/generators/idl_c_proto.py
index f92bf14..7147bbb 100644
--- a/ppapi/generators/idl_c_proto.py
+++ b/ppapi/generators/idl_c_proto.py
@@ -383,24 +383,27 @@ class CGen(object):
self.LogExit('Exit DefineMember')
return out
+ def InterfaceDefs(self, node):
+ out = ''
+ release = 'M14'
+ name = node.GetName()
+ macro = node.GetProperty('macro')
+ if not macro:
+ macro = self.GetMacro(node)
+ label = node.GetLabel()
+ if label:
+ for vers in label.versions:
+ strver = str(vers).replace('.', '_')
+ out += self.GetDefine('%s_%s' % (macro, strver),
+ '"%s;%s"' % (name, vers))
+ if label.GetRelease(vers) == release:
+ out += self.GetDefine(macro, '%s_%s' % (macro, strver))
+ out += '\n'
+ return out
+
# Define a Struct.
def DefineStruct(self, node, prefix='', comment=False):
out = ''
- if node.IsA('Interface'):
- release = 'M14'
- name = node.GetName()
- macro = node.GetProperty('macro')
- if not macro:
- macro = self.GetMacro(node)
- label = node.GetLabel()
- if label:
- for vers in label.versions:
- strver = str(vers).replace('.', '_')
- out += self.GetDefine('%s_%s' % (macro, strver),
- '"%s;%s"' % (name, vers))
- if label.GetRelease(vers) == release:
- out += self.GetDefine(macro, '%s_%s' % (macro, strver))
- out += '\n'
self.LogEnter('DefineStruct %s' % node)
if node.GetProperty('union'):