/* SPDX-License-Identifier: LGPL-2.1-only OR BSD-3-Clause */
/******************************************************************************
 *
 * This file is provided under a dual license.  When you use or
 * distribute this software, you may choose to be licensed under
 * version 2.1 of the GNU Lesser General Public License
 * ("LGPLv2.1 License") or BSD License.
 *
 * LGPLv2.1 License
 *
 * Copyright(C) 2019 MediaTek Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html for more
 * details.
 *
 * BSD LICENSE
 *
 * Copyright(C) 2019 MediaTek Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/



 /*----------------------------------------------------------------------------*/
/*! @addtogroup groupMW_STRM_MNGR_MM_SBTL_HDLR
 *  @{ 
 */
/*----------------------------------------------------------------------------*/
#ifndef _U_SBTL_IPCC_WGT_H_
#define _U_SBTL_IPCC_WGT_H_
#ifndef __KERNEL__

/*-----------------------------------------------------------------------------
                    include files
-----------------------------------------------------------------------------*/
#include "x_lnk_list.h"
#include "u_handle.h"
#include "x_wgl.h"
#include "x_os.h"
#include "u_wgl.h"
#include "u_wgl_cc.h"


/*-----------------------------------------------------------------------------
                macros, defines, enums
-----------------------------------------------------------------------------*/
#define IPCC_MAX_WGT_NUM        ((UINT32) 8)
#define IPCC_MAX_PEN_STL_NUM    ((UINT32) 8)

/* Default colors                A      R       G       B                    */
#define CC_COLOR_BLACK         { 0xFF, {0x00}, {0x00}, {0x00} }
#define CC_COLOR_BLACK_TLC     { 0x7F, {0x00}, {0x00}, {0x00} }
#define CC_COLOR_WHITE         { 0xFF, {0xFF}, {0xFF}, {0xFF} }
#define CC_COLOR_WHITE_TLC     { 0x7F, {0xFF}, {0xFF}, {0xFF} }
#define CC_COLOR_GREEN         { 0xFF, {0x00}, {0xFF}, {0x00} }
#define CC_COLOR_GREEN_TLC     { 0x7F, {0x00}, {0xFF}, {0x00} }
#define CC_COLOR_BLUE          { 0xFF, {0x00}, {0x00}, {0xFF} }
#define CC_COLOR_BLUE_TLC      { 0x7F, {0x00}, {0x00}, {0xFF} }
#define CC_COLOR_RED           { 0xFF, {0xFF}, {0x00}, {0x00} }
#define CC_COLOR_RED_TLC       { 0x7F, {0xFF}, {0x00}, {0x00} }
#define CC_COLOR_CYAN          { 0xFF, {0x00}, {0xFF}, {0xFF} }
#define CC_COLOR_CYAN_TLC      { 0x7F, {0x00}, {0xFF}, {0xFF} }
#define CC_COLOR_YELLOW        { 0xFF, {0xFF}, {0xFF}, {0x00} }
#define CC_COLOR_YELLOW_TLC    { 0x7F, {0xFF}, {0xFF}, {0x00} }
#define CC_COLOR_MAGENTA       { 0xFF, {0xFF}, {0x00}, {0xFF} }
#define CC_COLOR_MAGENTA_TLC   { 0x7F, {0xFF}, {0x00}, {0xFF} }
#define CC_COLOR_GRAY          { 0xFF, {0x20}, {0x20}, {0x20} }
#define CC_COLOR_GRAY_TLC      { 0x7F, {0x20}, {0x20}, {0x20} }
#define CC_COLOR_TRANSPARENT   { 0x00, {0x00}, {0x00}, {0x00} }


/* Command - set pen color ***************************************************/
typedef struct _CAP_CMD_SET_PEN_LOC_T
{
    UINT8    ui1_b1;
    
#define CAP_CMD_SPL_RSRV1( pt_cmd )        ((UINT8)( pt_cmd->ui1_b1 & 0xF0 ) >> 4)
#define CAP_CMD_SPL_ROW( pt_cmd )          ((UINT8)( pt_cmd->ui1_b1 & 0x0F ))

    UINT8    ui1_b2;
    
#define CAP_CMD_SPL_RSRV2( pt_cmd )        ((UINT8)( pt_cmd->ui1_b2 & 0xC0 ) >> 6)
#define CAP_CMD_SPL_COLUMN( pt_cmd )       ((UINT8)( pt_cmd->ui1_b2 & 0x3F ))

} CAP_CMD_SET_PEN_LOC_T;



/* Border type */
#define CAP_CMD_TEXT_TAG_DIALOG             ((UINT8) 0 )
#define CAP_CMD_TEXT_TAG_SRC_SPEAKER_ID     ((UINT8) 1 )
#define CAP_CMD_TEXT_TAG_ELEC_REPROD_VOICE  ((UINT8) 2 )
#define CAP_CMD_TEXT_TAG_DIALOG_NOT_PRIM    ((UINT8) 3 )
#define CAP_CMD_TEXT_TAG_VOICEOVER          ((UINT8) 4 )
#define CAP_CMD_TEXT_TAG_AUDIBLE_TRANSLATE  ((UINT8) 5 )
#define CAP_CMD_TEXT_TAG_SUBTITLE_TRANSLATE ((UINT8) 6 )
#define CAP_CMD_TEXT_TAG_VOICE_QA_DESC      ((UINT8) 7 )
#define CAP_CMD_TEXT_TAG_SONG_LYRICS        ((UINT8) 8 )
#define CAP_CMD_TEXT_TAG_SND_EFF_DESC       ((UINT8) 9 )
#define CAP_CMD_TEXT_TAG_MUSICAL_SCORE_DESC ((UINT8) 10 )
#define CAP_CMD_TEXT_TAG_EXPLETIVE          ((UINT8) 11 )
#define CAP_CMD_TEXT_TAG_NOT_TO_BE_DISP     ((UINT8) 15 )



/*-----------------------------------------------------------------------------
                            struct
-----------------------------------------------------------------------------*/


#endif

#endif
