OLD | NEW |
1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 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 | 5 |
6 /* From private/ppb_camera_capabilities_private.idl, | 6 /* From private/ppb_camera_capabilities_private.idl, |
7 * modified Fri Aug 22 11:08:14 2014. | 7 * modified Tue Feb 3 19:54:34 2015. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef PPAPI_C_PRIVATE_PPB_CAMERA_CAPABILITIES_PRIVATE_H_ | 10 #ifndef PPAPI_C_PRIVATE_PPB_CAMERA_CAPABILITIES_PRIVATE_H_ |
11 #define PPAPI_C_PRIVATE_PPB_CAMERA_CAPABILITIES_PRIVATE_H_ | 11 #define PPAPI_C_PRIVATE_PPB_CAMERA_CAPABILITIES_PRIVATE_H_ |
12 | 12 |
13 #include "ppapi/c/pp_bool.h" | 13 #include "ppapi/c/pp_bool.h" |
14 #include "ppapi/c/pp_instance.h" | |
15 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
16 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
17 #include "ppapi/c/pp_size.h" | 16 #include "ppapi/c/pp_size.h" |
18 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
19 | 18 |
20 #define PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE_0_1 \ | 19 #define PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE_0_1 \ |
21 "PPB_CameraCapabilities_Private;0.1" | 20 "PPB_CameraCapabilities_Private;0.1" |
22 #define PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE \ | 21 #define PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE \ |
23 PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE_0_1 | 22 PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE_0_1 |
24 | 23 |
25 /** | 24 /** |
26 * @file | 25 * @file |
27 * This file defines the PPB_CameraCapabilities_Private interface for | 26 * This file defines the PPB_CameraCapabilities_Private interface for |
28 * establishing an image capture configuration resource within the browser. | 27 * establishing an image capture configuration resource within the browser. |
29 */ | 28 */ |
30 | 29 |
31 | 30 |
32 /** | 31 /** |
33 * @addtogroup Interfaces | 32 * @addtogroup Interfaces |
34 * @{ | 33 * @{ |
35 */ | 34 */ |
36 /** | 35 /** |
37 * The <code>PPB_CameraCapabilities_Private</code> interface contains pointers | 36 * The <code>PPB_CameraCapabilities_Private</code> interface contains pointers |
38 * to several functions for getting the image capture capabilities within the | 37 * to several functions for getting the image capture capabilities within the |
39 * browser. | 38 * browser. |
40 */ | 39 */ |
41 struct PPB_CameraCapabilities_Private_0_1 { | 40 struct PPB_CameraCapabilities_Private_0_1 { |
42 /** | 41 /** |
43 * Creates a PPB_CameraCapabilities_Private resource. | |
44 * | |
45 * @param[in] instance A <code>PP_Instance</code> identifying one instance of | |
46 * a module. | |
47 * | |
48 * @return A <code>PP_Resource</code> corresponding to a | |
49 * PPB_CameraCapabilities_Private resource if successful, 0 if failed. | |
50 */ | |
51 PP_Resource (*Create)(PP_Instance instance); | |
52 /** | |
53 * IsCameraCapabilities() determines if the given resource is a | 42 * IsCameraCapabilities() determines if the given resource is a |
54 * <code>PPB_CameraCapabilities_Private</code>. | 43 * <code>PPB_CameraCapabilities_Private</code>. |
55 * | 44 * |
56 * @param[in] resource A <code>PP_Resource</code> corresponding to an image | 45 * @param[in] resource A <code>PP_Resource</code> corresponding to an image |
57 * capture capabilities resource. | 46 * capture capabilities resource. |
58 * | 47 * |
59 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given | 48 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given |
60 * resource is an <code>PP_CameraCapabilities_Private</code> resource, | 49 * resource is an <code>PP_CameraCapabilities_Private</code> resource, |
61 * otherwise <code>PP_FALSE</code>. | 50 * otherwise <code>PP_FALSE</code>. |
62 */ | 51 */ |
63 PP_Bool (*IsCameraCapabilities)(PP_Resource resource); | 52 PP_Bool (*IsCameraCapabilities)(PP_Resource resource); |
64 /** | 53 /** |
65 * GetSupportedPreviewSizes() returns the supported preview sizes for the | 54 * GetSupportedPreviewSizes() returns the supported preview sizes for the |
66 * given <code>PPB_CameraCapabilities_Private</code>. | 55 * given <code>PPB_CameraCapabilities_Private</code>. |
67 * | 56 * |
68 * @param[in] capabilities A <code>PP_Resource</code> corresponding to an | 57 * @param[in] capabilities A <code>PP_Resource</code> corresponding to an |
69 * image capture capabilities resource. | 58 * image capture capabilities resource. |
70 * @param[out] array_size The size of preview size array. | 59 * @param[out] array_size The size of preview size array. |
71 * @param[out] preview_sizes An array of <code>PP_Size</code> corresponding | 60 * @param[out] preview_sizes An array of <code>PP_Size</code> corresponding |
72 * to the supported preview sizes in pixels. The ownership of the array | 61 * to the supported preview sizes in pixels. The ownership of the array |
73 * belongs to <code>PPB_CameraCapabilities_Private</code> and the caller | 62 * belongs to <code>PPB_CameraCapabilities_Private</code> and the caller |
74 * should not free it. When a PPB_CameraCapabilities_Private is deleted, | 63 * should not free it. When a PPB_CameraCapabilities_Private is deleted, |
75 * the array returning from this is no longer valid. | 64 * the array returning from this is no longer valid. |
76 */ | 65 */ |
77 void (*GetSupportedPreviewSizes)(PP_Resource capabilities, | 66 void (*GetSupportedPreviewSizes)(PP_Resource capabilities, |
78 int32_t* array_size, | 67 int32_t* array_size, |
79 struct PP_Size** preview_sizes); | 68 struct PP_Size** preview_sizes); |
80 /** | |
81 * GetSupportedJpegSize() returns the supported JPEG sizes for the given | |
82 * <code>PPB_CameraCapabilities_Private</code>. | |
83 * | |
84 * @param[in] capabilities A <code>PP_Resource</code> corresponding to an | |
85 * image capture capabilities resource. | |
86 * @param[out] array_size The size of JPEG size array. If the output of this | |
87 * is 0, the camera has no support for generating JPEG images. | |
88 * @param[out] jpeg_sizes An array of <code>PP_Size</code> corresponding to | |
89 * the supported JPEG image sizes in pixels. The ownership of the array | |
90 * belongs to <code>PPB_CameraCapabilities_Private</code> and the caller | |
91 * should not free it. When a PPB_CameraCapabilities_Private is deleted, the | |
92 * array returning from this is no longer valid. | |
93 */ | |
94 void (*GetSupportedJpegSizes)(PP_Resource capabilities, | |
95 int32_t* array_size, | |
96 struct PP_Size** jpeg_sizes); | |
97 }; | 69 }; |
98 | 70 |
99 typedef struct PPB_CameraCapabilities_Private_0_1 | 71 typedef struct PPB_CameraCapabilities_Private_0_1 |
100 PPB_CameraCapabilities_Private; | 72 PPB_CameraCapabilities_Private; |
101 /** | 73 /** |
102 * @} | 74 * @} |
103 */ | 75 */ |
104 | 76 |
105 #endif /* PPAPI_C_PRIVATE_PPB_CAMERA_CAPABILITIES_PRIVATE_H_ */ | 77 #endif /* PPAPI_C_PRIVATE_PPB_CAMERA_CAPABILITIES_PRIVATE_H_ */ |
106 | 78 |
OLD | NEW |