161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci* Copyright (C) 2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci* Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci* you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci* You may obtain a copy of the License at
661847f8eSopenharmony_ci*
761847f8eSopenharmony_ci* http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci*
961847f8eSopenharmony_ci* Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci* distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci* See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci* limitations under the License.
1461847f8eSopenharmony_ci*/
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkGraphics2D
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport lang from '../arkts/@arkts.lang';
2261847f8eSopenharmony_ciimport collections from '../arkts/@arkts.collections';
2361847f8eSopenharmony_ciimport colorSpaceManager from '@ohos.graphics.colorSpaceManager';
2461847f8eSopenharmony_ci
2561847f8eSopenharmony_ci/**
2661847f8eSopenharmony_ci * Color space manager.
2761847f8eSopenharmony_ci *
2861847f8eSopenharmony_ci * @namespace sendableColorSpaceManager
2961847f8eSopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
3061847f8eSopenharmony_ci * @crossplatform
3161847f8eSopenharmony_ci * @since 12
3261847f8eSopenharmony_ci */
3361847f8eSopenharmony_cideclare namespace sendableColorSpaceManager {
3461847f8eSopenharmony_ci  /**
3561847f8eSopenharmony_ci   * Redefines ISendable for convenience.
3661847f8eSopenharmony_ci   *
3761847f8eSopenharmony_ci   * @typedef { lang.ISendable } ISendable
3861847f8eSopenharmony_ci   * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
3961847f8eSopenharmony_ci   * @crossplatform
4061847f8eSopenharmony_ci   * @since 12
4161847f8eSopenharmony_ci   */
4261847f8eSopenharmony_ci  type ISendable = lang.ISendable;
4361847f8eSopenharmony_ci  /**
4461847f8eSopenharmony_ci   * Defines a color space object and manages its key information
4561847f8eSopenharmony_ci   * @interface ColorSpaceManager
4661847f8eSopenharmony_ci   * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
4761847f8eSopenharmony_ci   * @crossplatform
4861847f8eSopenharmony_ci   * @since 12
4961847f8eSopenharmony_ci   */
5061847f8eSopenharmony_ci  interface ColorSpaceManager extends ISendable {
5161847f8eSopenharmony_ci    /**
5261847f8eSopenharmony_ci     * Get the name of color space type.
5361847f8eSopenharmony_ci     * @returns { colorSpaceManager.ColorSpace } Returns the name of color space type.
5461847f8eSopenharmony_ci     * @throws { BusinessError } 18600001 - The parameter value is abnormal.
5561847f8eSopenharmony_ci     * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
5661847f8eSopenharmony_ci     * @crossplatform
5761847f8eSopenharmony_ci     * @since 12
5861847f8eSopenharmony_ci     */
5961847f8eSopenharmony_ci    getColorSpaceName(): colorSpaceManager.ColorSpace;
6061847f8eSopenharmony_ci
6161847f8eSopenharmony_ci    /**
6261847f8eSopenharmony_ci     * Get white point(x, y) of color space.
6361847f8eSopenharmony_ci     * @returns { collections.Array<number> } Returns the white point value of color space.
6461847f8eSopenharmony_ci     * @throws { BusinessError } 18600001 - The parameter value is abnormal.
6561847f8eSopenharmony_ci     * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
6661847f8eSopenharmony_ci     * @crossplatform
6761847f8eSopenharmony_ci     * @since 12
6861847f8eSopenharmony_ci     */
6961847f8eSopenharmony_ci    getWhitePoint(): collections.Array<number>;
7061847f8eSopenharmony_ci
7161847f8eSopenharmony_ci    /**
7261847f8eSopenharmony_ci     * Get gamma value of color space.
7361847f8eSopenharmony_ci     * @returns { number } Returns the gamma value of color space.
7461847f8eSopenharmony_ci     * @throws { BusinessError } 18600001 - The parameter value is abnormal.
7561847f8eSopenharmony_ci     * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
7661847f8eSopenharmony_ci     * @crossplatform
7761847f8eSopenharmony_ci     * @since 12
7861847f8eSopenharmony_ci     */
7961847f8eSopenharmony_ci    getGamma(): number;
8061847f8eSopenharmony_ci  }
8161847f8eSopenharmony_ci
8261847f8eSopenharmony_ci  /**
8361847f8eSopenharmony_ci   * Create a color space manager by provided color space type.
8461847f8eSopenharmony_ci   * @param { colorSpaceManager.ColorSpace } colorSpaceName - Indicates the type of color space
8561847f8eSopenharmony_ci   * @returns { ColorSpaceManager } Returns a color space manager object created by provided type.
8661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Incorrect parameter type.
8761847f8eSopenharmony_ci   *                                 2.Parameter verification failed.
8861847f8eSopenharmony_ci   * @throws { BusinessError } 18600001 - The parameter value is abnormal.
8961847f8eSopenharmony_ci   * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
9061847f8eSopenharmony_ci   * @crossplatform
9161847f8eSopenharmony_ci   * @since 12
9261847f8eSopenharmony_ci   */
9361847f8eSopenharmony_ci  function create(colorSpaceName: colorSpaceManager.ColorSpace): ColorSpaceManager;
9461847f8eSopenharmony_ci
9561847f8eSopenharmony_ci  /**
9661847f8eSopenharmony_ci   * Create a customized color space manager by its color primaries and gamma value
9761847f8eSopenharmony_ci   * @param { colorSpaceManager.ColorSpacePrimaries } primaries - Indicates the customized color primaries
9861847f8eSopenharmony_ci   * @param { number } gamma - Indicates display gamma value
9961847f8eSopenharmony_ci   * @returns { ColorSpaceManager } Returns a color space manager object created by customized parameters.
10061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Incorrect parameter type.
10161847f8eSopenharmony_ci   *                                 2.Parameter verification failed.
10261847f8eSopenharmony_ci   * @throws { BusinessError } 18600001 - The parameter value is abnormal.
10361847f8eSopenharmony_ci   * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core
10461847f8eSopenharmony_ci   * @crossplatform
10561847f8eSopenharmony_ci   * @since 12
10661847f8eSopenharmony_ci   */
10761847f8eSopenharmony_ci  function create(primaries: colorSpaceManager.ColorSpacePrimaries, gamma: number): ColorSpaceManager;
10861847f8eSopenharmony_ci}
10961847f8eSopenharmony_ci
11061847f8eSopenharmony_ciexport default sendableColorSpaceManager;