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 Thu Aug 7 23:28:34 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 several functions for establishing image capture configuration within the |
| 38 * browser. The new configuration will take effect after <code> |
| 39 * PPB_ImageCapture_Private.SetConfig</code> is called. |
| 40 */ |
| 41 struct PPB_ImageCaptureConfig_Private_0_1 { |
| 42 /** |
| 43 * IsImageCaptureConfig() determines if the given resource is a |
| 44 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 45 * |
| 46 * @param[in] resource A <code>PP_Resource</code> corresponding to an image |
| 47 * capture config resource. |
| 48 * |
| 49 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given |
| 50 * resource is an <code>ImageCaptureConfig_Private</code> resource, otherwise |
| 51 * <code>PP_FALSE</code>. |
| 52 */ |
| 53 PP_Bool (*IsImageCaptureConfig)(PP_Resource resource); |
| 54 /** |
| 55 * GetPreviewSize() returns the preview image size in pixels for the given |
| 56 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 57 * |
| 58 * @param[in] config A <code>PP_Resource</code> corresponding to an image |
| 59 * capture config resource. |
| 60 * @param[out] preview_size A <code>PP_Size</code> that indicates the |
| 61 * requested preview image size. |
| 62 */ |
| 63 void (*GetPreviewSize)(PP_Resource config, struct PP_Size* preview_size); |
| 64 /** |
| 65 * SetPreviewSize() sets the preview image size for the given <code> |
| 66 * PPB_ImageCaptureConfig_Private</code>. |
| 67 * |
| 68 * @param[in] config A <code>PP_Resource</code> corresponding to a |
| 69 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 70 * @param[in] preview_size A <code>PP_Size</code> that indicates the requested |
| 71 * preview image size. |
| 72 */ |
| 73 void (*SetPreviewSize)(PP_Resource config, |
| 74 const struct PP_Size* preview_size); |
| 75 /** |
| 76 * GetJpegSize() returns the JPEG image size in pixels for the given |
| 77 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 78 * |
| 79 * @param[in] config A <code>PP_Resource</code> corresponding to an image |
| 80 * capture config resource. |
| 81 * @param[out] jpeg_size A <code>PP_Size</code> that indicates the current |
| 82 * JPEG image size. |
| 83 */ |
| 84 void (*GetJpegSize)(PP_Resource config, struct PP_Size* jpeg_size); |
| 85 /** |
| 86 * SetJpegSize() sets the JPEG image size for the given |
| 87 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 88 * |
| 89 * @param[in] config A <code>PP_Resource</code> corresponding to a |
| 90 * <code>PPB_ImageCaptureConfig_Private</code>. |
| 91 * @param[in] jpeg_size A <code>PP_Size</code> that indicates the requested |
| 92 * JPEG image size. |
| 93 */ |
| 94 void (*SetJpegSize)(PP_Resource config, const struct PP_Size* jpeg_size); |
| 95 }; |
| 96 |
| 97 typedef struct PPB_ImageCaptureConfig_Private_0_1 |
| 98 PPB_ImageCaptureConfig_Private; |
| 99 /** |
| 100 * @} |
| 101 */ |
| 102 |
| 103 #endif /* PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */ |
| 104 |
OLD | NEW |