Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: ppapi/c/dev/ppb_buffer_dev.h

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/dev/ppb_audio_dev.h ('k') | ppapi/c/dev/ppb_char_set_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_C_DEV_PPB_BUFFER_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_BUFFER_DEV_H_
6 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_ 6 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h"
8 #include "ppapi/c/pp_module.h" 9 #include "ppapi/c/pp_module.h"
9 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
10 #include "ppapi/c/pp_stdint.h" 11 #include "ppapi/c/pp_stdint.h"
11 12
12 #define PPB_BUFFER_DEV_INTERFACE "PPB_Buffer(Dev);0.1" 13 #define PPB_BUFFER_DEV_INTERFACE "PPB_Buffer(Dev);0.2"
13 14
14 struct PPB_Buffer_Dev { 15 struct PPB_Buffer_Dev {
15 // Allocates a buffer of the given size in bytes. The return value will have 16 // Allocates a buffer of the given size in bytes. The return value will have
16 // a non-zero ID on success, or zero on failure. Failure means the module 17 // a non-zero ID on success, or zero on failure. Failure means the module
17 // handle was invalid. The buffer will be initialized to contain zeroes. 18 // handle was invalid. The buffer will be initialized to contain zeroes.
18 PP_Resource (*Create)(PP_Module module, int32_t size_in_bytes); 19 PP_Resource (*Create)(PP_Module module, int32_t size_in_bytes);
19 20
20 // Returns true if the given resource is a Buffer. Returns false if the 21 // Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the
21 // resource is invalid or some type other than a Buffer. 22 // resource is invalid or some type other than a Buffer.
22 bool (*IsBuffer)(PP_Resource resource); 23 PP_Bool (*IsBuffer)(PP_Resource resource);
23 24
24 // Gets the size of the buffer. Returns true on success, false 25 // Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE
25 // if the resource is not a buffer. On failure, |*size_in_bytes| is not set. 26 // if the resource is not a buffer. On failure, |*size_in_bytes| is not set.
26 bool (*Describe)(PP_Resource resource, int32_t* size_in_bytes); 27 PP_Bool (*Describe)(PP_Resource resource, int32_t* size_in_bytes);
27 28
28 // Maps this buffer into the plugin address space and returns a pointer to the 29 // Maps this buffer into the plugin address space and returns a pointer to the
29 // beginning of the data. 30 // beginning of the data.
30 void* (*Map)(PP_Resource resource); 31 void* (*Map)(PP_Resource resource);
31 32
32 void (*Unmap)(PP_Resource resource); 33 void (*Unmap)(PP_Resource resource);
33 }; 34 };
34 35
35 #endif // PPAPI_C_DEV_PPB_BUFFER_DEV_H_ 36 #endif // PPAPI_C_DEV_PPB_BUFFER_DEV_H_
36
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_audio_dev.h ('k') | ppapi/c/dev/ppb_char_set_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698