OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2014 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 */ |
| 5 |
| 6 /* From private/ppb_image_capture_config_private.idl, |
| 7 * modified Wed Aug 6 16:01:40 2014. |
| 8 */ |
| 9 |
| 10 #ifndef PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ |
| 11 #define PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ |
| 12 |
| 13 #include "ppapi/c/pp_bool.h" |
| 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_size.h" |
| 17 #include "ppapi/c/pp_stdint.h" |
| 18 |
| 19 #define PPB_IMAGECAPTURECONFIG_PRIVATE_INTERFACE_0_1 \ |
| 20 "PPB_ImageCaptureConfig_Private;0.1" |
| 21 #define PPB_IMAGECAPTURECONFIG_PRIVATE_INTERFACE \ |
| 22 PPB_IMAGECAPTURECONFIG_PRIVATE_INTERFACE_0_1 |
| 23 |
| 24 /** |
| 25 * @file |
| 26 * This file defines the PPB_ImageCaptureConfig_Private interface for |
| 27 * establishing an image capture configuration resource within the browser. |
| 28 */ |
| 29 |
| 30 |
| 31 /** |
| 32 * @addtogroup Interfaces |
| 33 * @{ |
| 34 */ |
| 35 /** |
| 36 * The <code>PPB_ImageCaptureConfig_Private</code> interface contains pointers |
| 37 to |
| 38 * several functions for establishing image capture configuration within the |
| 39 * browser. The new configuration will take effect after |
| 40 * <code>PPB_ImageCapture_Private.SetConfig</code> is called. |
| 41 */ |
| 42 struct PPB_ImageCaptureConfig_Private_0_1 { |
| 43 /** |
| 44 * IsImageCaptureConfig() determines if the given resource is a |
| 45 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 46 * |
| 47 * @param[in] resource A <code>PP_Resource</code> corresponding to an image |
| 48 * capture config resource. |
| 49 * |
| 50 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given |
| 51 * resource is an <code>ImageCaptureConfig_Private</code> resource, otherwise |
| 52 * <code>PP_FALSE</code>. |
| 53 */ |
| 54 PP_Bool (*IsImageCaptureConfig)(PP_Resource resource); |
| 55 /** |
| 56 * GetPreviewSize() returns the preview image size in pixels for the given |
| 57 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 58 * |
| 59 * @param[in] config A <code>PP_Resource</code> corresponding to an image |
| 60 * capture config resource. |
| 61 * @param[out] preview_size A <code>PP_Size</code> that indicates the |
| 62 requested |
| 63 * preview image size. |
| 64 */ |
| 65 void (*GetPreviewSize)(PP_Resource config, struct PP_Size* preview_size); |
| 66 /** |
| 67 * SetPreviewSize() sets the preview image size for the given |
| 68 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 69 * |
| 70 * @param[in] config A <code>PP_Resource</code> corresponding to a |
| 71 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 72 * @param[in] preview_size A <code>PP_Size</code> that indicates the requested |
| 73 * preview image size. |
| 74 */ |
| 75 void (*SetPreviewSize)(PP_Resource config, |
| 76 const struct PP_Size* preview_size); |
| 77 /** |
| 78 * GetJPEGSize() returns the JPEG image size in pixels for the given |
| 79 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 80 * |
| 81 * @param[in] config A <code>PP_Resource</code> corresponding to an image |
| 82 * capture config resource. |
| 83 * @param[out] jpeg_size A <code>PP_Size</code> that indicates the requested |
| 84 * JPEG image size. |
| 85 */ |
| 86 void (*GetJPEGSize)(PP_Resource config, struct PP_Size* jpeg_size); |
| 87 /** |
| 88 * SetJPEGSize() sets the JPEG image size for the given |
| 89 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 90 * |
| 91 * @param[in] config A <code>PP_Resource</code> corresponding to a |
| 92 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 93 * @param[in] jpeg_size A <code>PP_Size</code> that indicates the requested |
| 94 * JPEG image size. |
| 95 */ |
| 96 void (*SetJPEGSize)(PP_Resource config, const struct PP_Size* jpeg_size); |
| 97 }; |
| 98 |
| 99 typedef struct PPB_ImageCaptureConfig_Private_0_1 |
| 100 PPB_ImageCaptureConfig_Private; |
| 101 /** |
| 102 * @} |
| 103 */ |
| 104 |
| 105 #endif /* PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */ |
| 106 |
OLD | NEW |