| 1 |
/* |
| 2 |
* Copyright (C) 2024 Biswapriyo Nath |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "asyncinfo.idl"; |
| 25 |
import "eventtoken.idl"; |
| 26 |
import "windowscontracts.idl"; |
| 27 |
import "windows.foundation.idl"; |
| 28 |
import "windows.graphics.imaging.idl"; |
| 29 |
import "windows.media.idl"; |
| 30 |
|
| 31 |
namespace Windows.Media.FaceAnalysis { |
| 32 |
interface IDetectedFace; |
| 33 |
interface IFaceDetector; |
| 34 |
interface IFaceDetectorStatics; |
| 35 |
|
| 36 |
runtimeclass DetectedFace; |
| 37 |
runtimeclass FaceDetector; |
| 38 |
|
| 39 |
declare { |
| 40 |
interface Windows.Foundation.Collections.IIterable<Windows.Media.FaceAnalysis.DetectedFace *>; |
| 41 |
interface Windows.Foundation.Collections.IIterator<Windows.Media.FaceAnalysis.DetectedFace *>; |
| 42 |
interface Windows.Foundation.Collections.IVectorView<Windows.Media.FaceAnalysis.DetectedFace *>; |
| 43 |
interface Windows.Foundation.Collections.IVector<Windows.Media.FaceAnalysis.DetectedFace *>; |
| 44 |
interface Windows.Foundation.IAsyncOperation<Windows.Media.FaceAnalysis.FaceDetector *>; |
| 45 |
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Media.FaceAnalysis.FaceDetector *>; |
| 46 |
interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVector<Windows.Media.FaceAnalysis.DetectedFace *> *>; |
| 47 |
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVector<Windows.Media.FaceAnalysis.DetectedFace *> *>; |
| 48 |
} |
| 49 |
|
| 50 |
[ |
| 51 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 52 |
exclusiveto(Windows.Media.FaceAnalysis.DetectedFace), |
| 53 |
uuid(8200d454-66bc-34df-9410-e89400195414) |
| 54 |
] |
| 55 |
interface IDetectedFace : IInspectable |
| 56 |
{ |
| 57 |
[propget] HRESULT FaceBox([out, retval] Windows.Graphics.Imaging.BitmapBounds *return_value); |
| 58 |
} |
| 59 |
|
| 60 |
[ |
| 61 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 62 |
exclusiveto(Windows.Media.FaceAnalysis.FaceDetector), |
| 63 |
uuid(16b672dc-fe6f-3117-8d95-c3f04d51630c) |
| 64 |
] |
| 65 |
interface IFaceDetector : IInspectable |
| 66 |
{ |
| 67 |
[overload("DetectFacesAsync")] |
| 68 |
HRESULT DetectFacesAsync( |
| 69 |
[in] Windows.Graphics.Imaging.SoftwareBitmap *image, |
| 70 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVector<Windows.Media.FaceAnalysis.DetectedFace *> *> **return_value); |
| 71 |
[overload("DetectFacesAsync")] |
| 72 |
HRESULT DetectFacesWithSearchAreaAsync( |
| 73 |
[in] Windows.Graphics.Imaging.SoftwareBitmap *image, |
| 74 |
[in] Windows.Graphics.Imaging.BitmapBounds search_area, |
| 75 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVector<Windows.Media.FaceAnalysis.DetectedFace *> *> **return_value); |
| 76 |
[propget] HRESULT MinDetectableFaceSize([out, retval] Windows.Graphics.Imaging.BitmapSize *return_value); |
| 77 |
[propput] HRESULT MinDetectableFaceSize([in] Windows.Graphics.Imaging.BitmapSize value); |
| 78 |
[propget] HRESULT MaxDetectableFaceSize([out, retval] Windows.Graphics.Imaging.BitmapSize *return_value); |
| 79 |
[propput] HRESULT MaxDetectableFaceSize([in] Windows.Graphics.Imaging.BitmapSize value); |
| 80 |
} |
| 81 |
|
| 82 |
[ |
| 83 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 84 |
exclusiveto(Windows.Media.FaceAnalysis.FaceDetector), |
| 85 |
uuid(bc042d67-9047-33f6-881b-6746c1b218b8) |
| 86 |
] |
| 87 |
interface IFaceDetectorStatics : IInspectable |
| 88 |
{ |
| 89 |
HRESULT CreateAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Media.FaceAnalysis.FaceDetector *> **return_value); |
| 90 |
HRESULT GetSupportedBitmapPixelFormats([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Imaging.BitmapPixelFormat> **result); |
| 91 |
HRESULT IsBitmapPixelFormatSupported([in] Windows.Graphics.Imaging.BitmapPixelFormat bitmap_pixel_format, [out, retval] boolean *result); |
| 92 |
[propget] HRESULT IsSupported([out, retval] boolean *return_value); |
| 93 |
} |
| 94 |
|
| 95 |
[ |
| 96 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 97 |
marshaling_behavior(agile), |
| 98 |
threading(both) |
| 99 |
] |
| 100 |
runtimeclass DetectedFace |
| 101 |
{ |
| 102 |
[default] interface Windows.Media.FaceAnalysis.IDetectedFace; |
| 103 |
} |
| 104 |
|
| 105 |
[ |
| 106 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 107 |
marshaling_behavior(agile), |
| 108 |
static(Windows.Media.FaceAnalysis.IFaceDetectorStatics, Windows.Foundation.UniversalApiContract, 1.0), |
| 109 |
threading(both) |
| 110 |
] |
| 111 |
runtimeclass FaceDetector |
| 112 |
{ |
| 113 |
[default] interface Windows.Media.FaceAnalysis.IFaceDetector; |
| 114 |
} |
| 115 |
} |