| 1 | /* |
|---|
| 2 | * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. |
|---|
| 3 | * |
|---|
| 4 | * Redistribution and use in source and binary forms, with or without |
|---|
| 5 | * modification, are permitted provided that the following conditions |
|---|
| 6 | * are met: |
|---|
| 7 | * 1. Redistributions of source code must retain the above copyright |
|---|
| 8 | * notice, this list of conditions and the following disclaimer. |
|---|
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
|---|
| 10 | * notice, this list of conditions and the following disclaimer in the |
|---|
| 11 | * documentation and/or other materials provided with the distribution. |
|---|
| 12 | * |
|---|
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
|---|
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|---|
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|---|
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
|---|
| 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|---|
| 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|---|
| 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|---|
| 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
|---|
| 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|---|
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|---|
| 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 24 | */ |
|---|
| 25 | |
|---|
| 26 | #pragma once |
|---|
| 27 | |
|---|
| 28 | namespace WTF { |
|---|
| 29 | class TextStream; |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | namespace WebCore { |
|---|
| 33 | |
|---|
| 34 | // Must follow CSSValueKeywords.in order |
|---|
| 35 | enum ControlPart { |
|---|
| 36 | NoControlPart, |
|---|
| 37 | AutoPart, |
|---|
| 38 | CheckboxPart, |
|---|
| 39 | RadioPart, |
|---|
| 40 | PushButtonPart, |
|---|
| 41 | SquareButtonPart, |
|---|
| 42 | ButtonPart, |
|---|
| 43 | DefaultButtonPart, |
|---|
| 44 | ListboxPart, |
|---|
| 45 | MenulistPart, |
|---|
| 46 | MenulistButtonPart, |
|---|
| 47 | MeterPart, |
|---|
| 48 | ProgressBarPart, |
|---|
| 49 | SliderHorizontalPart, |
|---|
| 50 | SliderVerticalPart, |
|---|
| 51 | SearchFieldPart, |
|---|
| 52 | #if ENABLE(APPLE_PAY) |
|---|
| 53 | ApplePayButtonPart, |
|---|
| 54 | #endif |
|---|
| 55 | #if ENABLE(ATTACHMENT_ELEMENT) |
|---|
| 56 | AttachmentPart, |
|---|
| 57 | BorderlessAttachmentPart, |
|---|
| 58 | #endif |
|---|
| 59 | TextAreaPart, |
|---|
| 60 | TextFieldPart, |
|---|
| 61 | // Internal-only Values |
|---|
| 62 | CapsLockIndicatorPart, |
|---|
| 63 | #if ENABLE(INPUT_TYPE_COLOR) |
|---|
| 64 | ColorWellPart, |
|---|
| 65 | #endif |
|---|
| 66 | #if ENABLE(SERVICE_CONTROLS) |
|---|
| 67 | ImageControlsButtonPart, |
|---|
| 68 | #endif |
|---|
| 69 | InnerSpinButtonPart, |
|---|
| 70 | #if ENABLE(DATALIST_ELEMENT) |
|---|
| 71 | ListButtonPart, |
|---|
| 72 | #endif |
|---|
| 73 | SearchFieldDecorationPart, |
|---|
| 74 | SearchFieldResultsDecorationPart, |
|---|
| 75 | SearchFieldResultsButtonPart, |
|---|
| 76 | SearchFieldCancelButtonPart, |
|---|
| 77 | SliderThumbHorizontalPart, |
|---|
| 78 | SliderThumbVerticalPart |
|---|
| 79 | }; |
|---|
| 80 | |
|---|
| 81 | #if ENABLE(SERVICE_CONTROLS) |
|---|
| 82 | constexpr ControlPart largestControlPart = ImageControlsButtonPart; |
|---|
| 83 | #else |
|---|
| 84 | constexpr ControlPart largestControlPart = CapsLockIndicatorPart; |
|---|
| 85 | #endif |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | enum SelectionPart { |
|---|
| 89 | SelectionBackground, |
|---|
| 90 | SelectionForeground |
|---|
| 91 | }; |
|---|
| 92 | |
|---|
| 93 | enum ThemeFont { |
|---|
| 94 | CaptionFont, |
|---|
| 95 | IconFont, |
|---|
| 96 | MenuFont, |
|---|
| 97 | MessageBoxFont, |
|---|
| 98 | SmallCaptionFont, |
|---|
| 99 | StatusBarFont, |
|---|
| 100 | MiniControlFont, |
|---|
| 101 | SmallControlFont, |
|---|
| 102 | ControlFont |
|---|
| 103 | }; |
|---|
| 104 | |
|---|
| 105 | enum ThemeColor { |
|---|
| 106 | ActiveBorderColor, |
|---|
| 107 | ActiveCaptionColor, |
|---|
| 108 | ActiveTextColor, |
|---|
| 109 | AppWorkspaceColor, |
|---|
| 110 | BackgroundColor, |
|---|
| 111 | ButtonFaceColor, |
|---|
| 112 | ButtonHighlightColor, |
|---|
| 113 | ButtonShadowColor, |
|---|
| 114 | ButtonTextColor, |
|---|
| 115 | CanvasColor, |
|---|
| 116 | CanvasTextColor, |
|---|
| 117 | CaptionTextColor, |
|---|
| 118 | FieldColor, |
|---|
| 119 | FieldTextColor, |
|---|
| 120 | GrayTextColor, |
|---|
| 121 | HighlightColor, |
|---|
| 122 | HighlightTextColor, |
|---|
| 123 | InactiveBorderColor, |
|---|
| 124 | InactiveCaptionColor, |
|---|
| 125 | InactiveCaptionTextColor, |
|---|
| 126 | InfoBackgroundColor, |
|---|
| 127 | InfoTextColor, |
|---|
| 128 | LinkTextColor, |
|---|
| 129 | MatchColor, |
|---|
| 130 | MenuTextColor, |
|---|
| 131 | ScrollbarColor, |
|---|
| 132 | ThreeDDarkShadowColor, |
|---|
| 133 | ThreeDFaceColor, |
|---|
| 134 | ThreeDHighlightColor, |
|---|
| 135 | ThreeDLightShadowColor, |
|---|
| 136 | ThreeDShadowColor, |
|---|
| 137 | VisitedTextColor, |
|---|
| 138 | WindowColor, |
|---|
| 139 | WindowFrameColor, |
|---|
| 140 | WindowTextColor, |
|---|
| 141 | FocusRingColor |
|---|
| 142 | }; |
|---|
| 143 | |
|---|
| 144 | WTF::TextStream& operator<<(WTF::TextStream&, ControlPart); |
|---|
| 145 | WTF::TextStream& operator<<(WTF::TextStream&, SelectionPart); |
|---|
| 146 | WTF::TextStream& operator<<(WTF::TextStream&, ThemeFont); |
|---|
| 147 | WTF::TextStream& operator<<(WTF::TextStream&, ThemeColor); |
|---|
| 148 | |
|---|
| 149 | } // namespace WebCore |
|---|