Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ppapi / c / private / ppb_image_capture_config_private.h
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.
4  */
5
6 /* From private/ppb_image_capture_config_private.idl,
7  *   modified Wed Aug 13 17:43:55 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_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"
19
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
24
25 /**
26  * @file
27  * This file defines the PPB_ImageCaptureConfig_Private interface for
28  * establishing an image capture configuration resource within the browser.
29  */
30
31
32 /**
33  * @addtogroup Interfaces
34  * @{
35  */
36 /**
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.
41  */
42 struct PPB_ImageCaptureConfig_Private_0_1 {
43   /**
44    * Creates a PPB_ImageCaptureConfig_Private resource.
45    *
46    * @param[in] instance A <code>PP_Instance</code> identifying one instance of
47    * a module.
48    *
49    * @return A <code>PP_Resource</code> corresponding to a
50    * PPB_ImageCaptureConfig_Private resource if successful, 0 if failed.
51    */
52   PP_Resource (*Create)(PP_Instance instance);
53   /**
54    * IsImageCaptureConfig() determines if the given resource is a
55    * <code>PPB_ImageCaptureConfig_Private</code>.
56    *
57    * @param[in] resource A <code>PP_Resource</code> corresponding to an image
58    * capture config resource.
59    *
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>.
63    */
64   PP_Bool (*IsImageCaptureConfig)(PP_Resource resource);
65   /**
66    * GetPreviewSize() returns the preview image size in pixels for the given
67    * <code>PPB_ImageCaptureConfig_Private</code>.
68    *
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.
73    */
74   void (*GetPreviewSize)(PP_Resource config, struct PP_Size* preview_size);
75   /**
76    * SetPreviewSize() sets the preview image size for the given <code>
77    * PPB_ImageCaptureConfig_Private</code>.
78    *
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
82    * preview image size.
83    */
84   void (*SetPreviewSize)(PP_Resource config,
85                          const struct PP_Size* preview_size);
86   /**
87    * GetJpegSize() returns the JPEG image size in pixels for the given
88    * <code>PPB_ImageCaptureConfig_Private</code>.
89    *
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
93    * JPEG image size.
94    */
95   void (*GetJpegSize)(PP_Resource config, struct PP_Size* jpeg_size);
96   /**
97    * SetJpegSize() sets the JPEG image size for the given
98    * <code>PPB_ImageCaptureConfig_Private</code>.
99    *
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
103    * JPEG image size.
104    */
105   void (*SetJpegSize)(PP_Resource config, const struct PP_Size* jpeg_size);
106 };
107
108 typedef struct PPB_ImageCaptureConfig_Private_0_1
109     PPB_ImageCaptureConfig_Private;
110 /**
111  * @}
112  */
113
114 #endif  /* PPAPI_C_PRIVATE_PPB_IMAGE_CAPTURE_CONFIG_PRIVATE_H_ */
115