1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=99: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 using nscolor from "nsColor.h";
12 [Comparable] struct LookAndFeelFont {
21 * The format allows for some compression compared with having fixed
22 * length arrays for each value type and some indication of whether
23 * a value is present. This is because not all values are present on
24 * a given platform, and because there is also substantial repetition
27 * Each of ints, floats, colors, and fonts is an array that stores the
28 * unique values that occur in the LookAndFeel. intMap, floatMap,
29 * colorMap, and fontMap map from value IDs (LookAndFeel::IntID, etc.)
30 * to indexes into the value arrays. The map arrays are of fixed
31 * length, determined by the maximum ID value. If a value for a
32 * particular ID is not present, the entry in the map is set to -1.
34 struct LookAndFeelTables {
37 LookAndFeelFont[] fonts;
38 nscolor[] lightColors;
44 uint8_t[] lightColorMap;
45 uint8_t[] darkColorMap;
47 uint16_t passwordChar;
51 struct LookAndFeelTheme {
59 * Stores the entirety of a LookAndFeel's data.
61 struct FullLookAndFeel {
62 LookAndFeelTables tables;
64 LookAndFeelTheme theme;
69 } // namespace mozilla