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
3 * found in the LICENSE file.
6 /* From private/ppb_image_capture_config_private.idl,
7 * modified Wed Aug 13 17:43:55 2014.
10 #ifndef PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_
13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_size.h"
18 #include "ppapi/c/pp_stdint.h"
20 #define PPB_IMAGECAPTURECONFIG_PRIVATE_INTERFACE_0_1 \
21 "PPB_ImageCaptureConfig_Private;0.1"
22 #define PPB_IMAGECAPTURECONFIG_PRIVATE_INTERFACE \
23 PPB_IMAGECAPTURECONFIG_PRIVATE_INTERFACE_0_1
27 * This file defines the PPB_ImageCaptureConfig_Private interface for
28 * establishing an image capture configuration resource within the browser.
33 * @addtogroup Interfaces
37 * The <code>PPB_ImageCaptureConfig_Private</code> interface contains pointers
38 * to several functions for establishing image capture configuration within the
39 * browser. The new configuration will take effect after <code>
40 * PPB_ImageCapture_Private.SetConfig</code> is called.
42 struct PPB_ImageCaptureConfig_Private_0_1
{
44 * Creates a PPB_ImageCaptureConfig_Private resource.
46 * @param[in] instance A <code>PP_Instance</code> identifying one instance of
49 * @return A <code>PP_Resource</code> corresponding to a
50 * PPB_ImageCaptureConfig_Private resource if successful, 0 if failed.
52 PP_Resource (*Create
)(PP_Instance instance
);
54 * IsImageCaptureConfig() determines if the given resource is a
55 * <code>PPB_ImageCaptureConfig_Private</code>.
57 * @param[in] resource A <code>PP_Resource</code> corresponding to an image
58 * capture config resource.
60 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given
61 * resource is an <code>ImageCaptureConfig_Private</code> resource, otherwise
62 * <code>PP_FALSE</code>.
64 PP_Bool (*IsImageCaptureConfig
)(PP_Resource resource
);
66 * GetPreviewSize() returns the preview image size in pixels for the given
67 * <code>PPB_ImageCaptureConfig_Private</code>.
69 * @param[in] config A <code>PP_Resource</code> corresponding to an image
70 * capture config resource.
71 * @param[out] preview_size A <code>PP_Size</code> that indicates the
72 * requested preview image size.
74 void (*GetPreviewSize
)(PP_Resource config
, struct PP_Size
* preview_size
);
76 * SetPreviewSize() sets the preview image size for the given <code>
77 * PPB_ImageCaptureConfig_Private</code>.
79 * @param[in] config A <code>PP_Resource</code> corresponding to a
80 * <code>PPB_ImageCaptureConfig_Private</code>.
81 * @param[in] preview_size A <code>PP_Size</code> that indicates the requested
84 void (*SetPreviewSize
)(PP_Resource config
,
85 const struct PP_Size
* preview_size
);
87 * GetJpegSize() returns the JPEG image size in pixels for the given
88 * <code>PPB_ImageCaptureConfig_Private</code>.
90 * @param[in] config A <code>PP_Resource</code> corresponding to an image
91 * capture config resource.
92 * @param[out] jpeg_size A <code>PP_Size</code> that indicates the current
95 void (*GetJpegSize
)(PP_Resource config
, struct PP_Size
* jpeg_size
);
97 * SetJpegSize() sets the JPEG image size for the given
98 * <code>PPB_ImageCaptureConfig_Private</code>.
100 * @param[in] config A <code>PP_Resource</code> corresponding to a
101 * <code>PPB_ImageCaptureConfig_Private</code>.
102 * @param[in] jpeg_size A <code>PP_Size</code> that indicates the requested
105 void (*SetJpegSize
)(PP_Resource config
, const struct PP_Size
* jpeg_size
);
108 typedef struct PPB_ImageCaptureConfig_Private_0_1
109 PPB_ImageCaptureConfig_Private
;
114 #endif /* PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */