目录

native_gcp_api.h

Overview

Declares the global color picker capability.

Library: libcolorpicker_ndk.z.so

File to include: <color_picker/native_gcp_api.h>

System capability: SystemCapability.Stylus.ColorPicker

Since: 5.0.0(12)

Related module: GlobalColorPicker

Summary

[h2]Structs

Name Description
struct HMS_GCP_Color Defines the struct of a color value.
struct HMS_GCP_PickedColorInfo Defines the struct of picked color information.

[h2]Types

Name Description
typedef void(* HMS_GCP_OnResult) (void *userData, HMS_GCP_PickedColorInfo colorInfo, const int32_t code) Callback called when the color picking operation is complete. The color information and result code are passed to the callback.

[h2]Enums

Name Description

HMS_GCP_ColorSpace {

HMS_GCP_UNKNOWN = 0,

HMS_GCP_ADOBE_RGB_1998 = 1,

HMS_GCP_DCI_P3 = 2,

HMS_GCP_DISPLAY_P3 = 3,

HMS_GCP_SRGB = 4,

HMS_GCP_BT709 = 6,

HMS_GCP_BT601_EBU = 7,

HMS_GCP_BT601_SMPTE_C = 8,

HMS_GCP_BT2020_HLG = 9,

HMS_GCP_BT2020_PQ = 10,

HMS_GCP_P3_HLG = 11,

HMS_GCP_P3_PQ = 12,

HMS_GCP_ADOBE_RGB_1998_LIMIT = 13,

HMS_GCP_DISPLAY_P3_LIMIT = 14,

HMS_GCP_SRGB_LIMIT = 15,

HMS_GCP_BT709_LIMIT = 16,

HMS_GCP_BT601_EBU_LIMIT = 17,

HMS_GCP_BT601_SMPTE_C_LIMIT = 18,

HMS_GCP_BT2020_HLG_LIMIT = 19,

HMS_GCP_BT2020_PQ_LIMIT = 20,

HMS_GCP_P3_HLG_LIMIT = 21,

HMS_GCP_P3_PQ_LIMIT = 22,

HMS_GCP_LINEAR_P3 = 23,

HMS_GCP_LINEAR_SRGB = 24,

HMS_GCP_LINEAR_BT2020 = 25,

CUSTOM = 5

}

Enumeration of color space.

[h2]Functions

Name Description
int32_t HMS_GCP_StartColorPicker (int32_t initialPosX, int32_t initialPosY, HMS_GCP_OnResult onResultCallback, void *userData) Starts the global color picker. This API is used to start the color picker. The color value is not displayed when the color picker is moved.
int32_t HMS_GCP_StartColorPickerWithColorValue (int32_t initialPosX, int32_t initialPosY, HMS_GCP_OnResult onResultCallback, void *userData) Starts the global color picker. This API is used to start the color picker. The color value is displayed when the color picker is moved.