<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<resources>
    <attr name="broadcast" format="boolean"/>
    <attr name="icon" format="reference"/>
    <attr name="selectedIcon" format="reference"/>
    <attr name="intent" format="string"/>
    <attr name="longIntent" format="string"/>
    <attr name="componentNames" format="string" />
    <attr name="highlightWhenSelected" format="boolean" />
    <attr name="categories" format="string"/>
    <attr name="packages" format="string" />
    <attr name="clearBackStack" format="boolean" />
    <attr name="unselectedAlpha" format="float"/>

    <!-- Custom attributes to configure hvac values -->
    <declare-styleable name="AnimatedTemperatureView">
        <attr name="hvacAreaId" format="integer"/>
        <attr name="hvacPropertyId" format="integer"/>
        <attr name="hvacTempFormat" format="string"/>
        <!-- how far away the animations should center around -->
        <attr name="hvacPivotOffset" format="dimension"/>
        <attr name="hvacMinValue" format="float"/>
        <attr name="hvacMaxValue" format="float"/>
        <attr name="hvacMinText" format="string|reference"/>
        <attr name="hvacMaxText" format="string|reference"/>
        <attr name="android:gravity"/>
        <attr name="android:minEms"/>
        <attr name="android:textAppearance"/>
    </declare-styleable>

    <declare-styleable name="Clock">
        <attr name="amPmStyle" format="enum">
            <enum name="normal" value="0" />
            <enum name="small" value="1" />
            <enum name="gone" value="2" />
        </attr>
        <attr name="showDark" format="boolean" />
    </declare-styleable>

    <declare-styleable name="DateView">
        <attr name="datePattern" format="string" />
    </declare-styleable>

    <!-- Custom attribute for the CarSystemBarElement interface - implementing classes must opt in
         to consuming these attributes within their constructor and applying appropriately. -->
    <declare-styleable name="CarSystemBarElement">
        <!-- Class name of the CarSystemBarElementController that should be attached to this view -->
        <attr name="controller" format="string"/>
        <!-- Attribute for specifying the system bar disable flag of a supporting element view.
             This corresponds to the StatusBarManager.DisableFlags. -->
        <attr name="systemBarDisableFlags" format="integer">
            <flag name="none" value="0"/>
            <flag name="expand" value="1"/>
            <flag name="notificationIcons" value="2"/>
            <flag name="notificationAlerts" value="4"/>
            <flag name="systemInfo" value="8"/>
            <flag name="home" value="16"/>
            <flag name="recent" value="32"/>
            <flag name="back" value="64"/>
            <flag name="clock" value="128"/>
            <flag name="search" value="256"/>
            <flag name="ongoingCallChip" value="512"/>
        </attr>
        <!-- Attribute for specifying the system bar disable flag of a supporting element view.
             This corresponds to the StatusBarManager.Disable2Flags. -->
        <attr name="systemBarDisable2Flags" format="integer">
            <flag name="none" value="0"/>
            <flag name="quickSettings" value="1"/>
            <flag name="systemIcons" value="2"/>
            <flag name="notificationShade" value="4"/>
            <flag name="globalActions" value="8"/>
            <flag name="rotateSuggestions" value="16"/>
        </attr>
        <!-- Attribute for specifying if this element should be disabled when in the
             LOCK_TASK_MODE_LOCKED state -->
        <attr name="disableForLockTaskModeLocked" format="boolean"/>
    </declare-styleable>

    <declare-styleable name="CarSystemBarPanelButtonView">
        <!-- REQUIRED: Layout resource for the panel -->
        <attr name="panelLayoutRes" format="reference"/>
        <!--  Width of the panel. If not specified, will use default width value -->
        <attr name="panelWidthRes" format="reference"/>
        <!-- X Offset value for the panel location relative to the anchor view -->
        <attr name="xOffset" format="integer"/>
        <!-- Y Offset value for the panel location relative to the anchor view -->
        <attr name="yOffset" format="integer"/>
        <!-- Gravity of the panel relative to the anchor view - uses same flag format as android:gravity -->
        <attr name="gravity" format="integer">
            <flag name="top" value="0x30" />
            <flag name="bottom" value="0x50" />
            <flag name="left" value="0x03" />
            <flag name="right" value="0x05" />
            <flag name="center_vertical" value="0x10" />
            <flag name="fill_vertical" value="0x70" />
            <flag name="center_horizontal" value="0x01" />
            <flag name="fill_horizontal" value="0x07" />
            <flag name="center" value="0x11" />
            <flag name="fill" value="0x77" />
            <flag name="clip_vertical" value="0x80" />
            <flag name="clip_horizontal" value="0x08" />
            <flag name="start" value="0x00800003" />
            <flag name="end" value="0x00800005" />
        </attr>
        <!-- Whether the panel should be disabled while driving - defaults to false -->
        <attr name="disabledWhileDriving" format="boolean"/>
        <!-- Whether the panel should be disabled while unprovisioned - defaults to false -->
        <attr name="disabledWhileUnprovisioned" format="boolean"/>
        <!-- Whether the panel should be shown as a dropdown relative to the anchor view or not
             (making it relative to the screen with offsets and gravity) - defaults to true -->
        <attr name="showAsDropDown" format="boolean"/>
    </declare-styleable>

    <declare-styleable name="SystemUIQCView">
        <attr name="remoteQCProvider" format="string"/>
        <attr name="localQCProvider" format="string"/>
    </declare-styleable>
</resources>
