1 /* 2 * Copyright (C) 2023 Alexander Borisov 3 * 4 * Author: Alexander Borisov <borisov@lexbor.com> 5 */ 6 7 /* 8 * Caution! 9 * This file generated by the script "utils/lexbor/css/names.py"! 10 * Do not change this file! 11 */ 12 13 14 #ifndef LXB_CSS_UNIT_RES_H 15 #define LXB_CSS_UNIT_RES_H 16 17 #include "lexbor/core/shs.h" 18 #include "lexbor/css/unit/const.h" 19 20 21 static const lxb_css_data_t lxb_css_unit_data[LXB_CSS_UNIT__LAST_ENTRY] = 22 { 23 {(lxb_char_t *) "#undef", 6, LXB_CSS_UNIT__UNDEF}, 24 {(lxb_char_t *) "Q", 1, LXB_CSS_UNIT_Q}, 25 {(lxb_char_t *) "cm", 2, LXB_CSS_UNIT_CM}, 26 {(lxb_char_t *) "in", 2, LXB_CSS_UNIT_IN}, 27 {(lxb_char_t *) "mm", 2, LXB_CSS_UNIT_MM}, 28 {(lxb_char_t *) "pc", 2, LXB_CSS_UNIT_PC}, 29 {(lxb_char_t *) "pt", 2, LXB_CSS_UNIT_PT}, 30 {(lxb_char_t *) "px", 2, LXB_CSS_UNIT_PX}, 31 {(lxb_char_t *) "cap", 3, LXB_CSS_UNIT_CAP}, 32 {(lxb_char_t *) "ch", 2, LXB_CSS_UNIT_CH}, 33 {(lxb_char_t *) "em", 2, LXB_CSS_UNIT_EM}, 34 {(lxb_char_t *) "ex", 2, LXB_CSS_UNIT_EX}, 35 {(lxb_char_t *) "ic", 2, LXB_CSS_UNIT_IC}, 36 {(lxb_char_t *) "lh", 2, LXB_CSS_UNIT_LH}, 37 {(lxb_char_t *) "rem", 3, LXB_CSS_UNIT_REM}, 38 {(lxb_char_t *) "rlh", 3, LXB_CSS_UNIT_RLH}, 39 {(lxb_char_t *) "vb", 2, LXB_CSS_UNIT_VB}, 40 {(lxb_char_t *) "vh", 2, LXB_CSS_UNIT_VH}, 41 {(lxb_char_t *) "vi", 2, LXB_CSS_UNIT_VI}, 42 {(lxb_char_t *) "vmax", 4, LXB_CSS_UNIT_VMAX}, 43 {(lxb_char_t *) "vmin", 4, LXB_CSS_UNIT_VMIN}, 44 {(lxb_char_t *) "vw", 2, LXB_CSS_UNIT_VW}, 45 {(lxb_char_t *) "deg", 3, LXB_CSS_UNIT_DEG}, 46 {(lxb_char_t *) "grad", 4, LXB_CSS_UNIT_GRAD}, 47 {(lxb_char_t *) "rad", 3, LXB_CSS_UNIT_RAD}, 48 {(lxb_char_t *) "turn", 4, LXB_CSS_UNIT_TURN}, 49 {(lxb_char_t *) "Hz", 2, LXB_CSS_UNIT_HZ}, 50 {(lxb_char_t *) "kHz", 3, LXB_CSS_UNIT_KHZ}, 51 {(lxb_char_t *) "dpcm", 4, LXB_CSS_UNIT_DPCM}, 52 {(lxb_char_t *) "dpi", 3, LXB_CSS_UNIT_DPI}, 53 {(lxb_char_t *) "dppx", 4, LXB_CSS_UNIT_DPPX}, 54 {(lxb_char_t *) "x", 1, LXB_CSS_UNIT_X}, 55 {(lxb_char_t *) "ms", 2, LXB_CSS_UNIT_MS}, 56 {(lxb_char_t *) "s", 1, LXB_CSS_UNIT_S} 57 }; 58 59 static const lexbor_shs_entry_t lxb_css_unit_absolute_relative_shs[84] = 60 { 61 {NULL, NULL, 83, 0}, 62 {NULL, NULL, 0, 0}, 63 {NULL, NULL, 0, 0}, 64 {NULL, NULL, 0, 0}, 65 {NULL, NULL, 0, 0}, 66 {NULL, NULL, 0, 0}, 67 {NULL, NULL, 0, 0}, 68 {"rem", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_REM], 3, 0}, 69 {NULL, NULL, 0, 0}, 70 {NULL, NULL, 0, 0}, 71 {NULL, NULL, 0, 0}, 72 {NULL, NULL, 0, 0}, 73 {"vmax", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VMAX], 4, 0}, 74 {"pc", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_PC], 2, 0}, 75 {"lh", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_LH], 2, 0}, 76 {NULL, NULL, 0, 0}, 77 {"rlh", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_RLH], 3, 0}, 78 {NULL, NULL, 0, 0}, 79 {NULL, NULL, 0, 0}, 80 {"cm", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_CM], 2, 0}, 81 {NULL, NULL, 0, 0}, 82 {NULL, NULL, 0, 0}, 83 {NULL, NULL, 0, 0}, 84 {NULL, NULL, 0, 0}, 85 {NULL, NULL, 0, 0}, 86 {NULL, NULL, 0, 0}, 87 {NULL, NULL, 0, 0}, 88 {"q", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_Q], 1, 0}, 89 {"ic", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_IC], 2, 0}, 90 {NULL, NULL, 0, 0}, 91 {"vw", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VW], 2, 0}, 92 {NULL, NULL, 0, 0}, 93 {NULL, NULL, 0, 0}, 94 {NULL, NULL, 0, 0}, 95 {"pt", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_PT], 2, 0}, 96 {"vb", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VB], 2, 0}, 97 {NULL, NULL, 0, 0}, 98 {NULL, NULL, 0, 0}, 99 {NULL, NULL, 0, 0}, 100 {"ex", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_EX], 2, 0}, 101 {"in", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_IN], 2, 0}, 102 {"cap", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_CAP], 3, 0}, 103 {NULL, NULL, 0, 0}, 104 {NULL, NULL, 0, 0}, 105 {"em", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_EM], 2, 0}, 106 {NULL, NULL, 0, 0}, 107 {"vmin", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VMIN], 4, 0}, 108 {NULL, NULL, 0, 0}, 109 {NULL, NULL, 0, 0}, 110 {NULL, NULL, 0, 0}, 111 {NULL, NULL, 0, 0}, 112 {NULL, NULL, 0, 0}, 113 {NULL, NULL, 0, 0}, 114 {NULL, NULL, 0, 0}, 115 {NULL, NULL, 0, 0}, 116 {NULL, NULL, 0, 0}, 117 {NULL, NULL, 0, 0}, 118 {NULL, NULL, 0, 0}, 119 {NULL, NULL, 0, 0}, 120 {NULL, NULL, 0, 0}, 121 {NULL, NULL, 0, 0}, 122 {"vi", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VI], 2, 0}, 123 {NULL, NULL, 0, 0}, 124 {NULL, NULL, 0, 0}, 125 {NULL, NULL, 0, 0}, 126 {NULL, NULL, 0, 0}, 127 {"mm", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_MM], 2, 0}, 128 {"ch", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_CH], 2, 0}, 129 {NULL, NULL, 0, 0}, 130 {NULL, NULL, 0, 0}, 131 {NULL, NULL, 0, 0}, 132 {NULL, NULL, 0, 0}, 133 {NULL, NULL, 0, 0}, 134 {NULL, NULL, 0, 0}, 135 {NULL, NULL, 0, 0}, 136 {NULL, NULL, 0, 0}, 137 {NULL, NULL, 0, 0}, 138 {NULL, NULL, 0, 0}, 139 {"px", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_PX], 2, 0}, 140 {NULL, NULL, 0, 0}, 141 {NULL, NULL, 0, 0}, 142 {"vh", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VH], 2, 0}, 143 {NULL, NULL, 0, 0}, 144 {NULL, NULL, 0, 0} 145 }; 146 147 static const lexbor_shs_entry_t lxb_css_unit_absolute_shs[30] = 148 { 149 {NULL, NULL, 29, 0}, 150 {NULL, NULL, 0, 0}, 151 {"in", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_IN], 2, 0}, 152 {"pt", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_PT], 2, 0}, 153 {"q", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_Q], 1, 0}, 154 {NULL, NULL, 0, 0}, 155 {NULL, NULL, 0, 0}, 156 {NULL, NULL, 0, 0}, 157 {"mm", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_MM], 2, 0}, 158 {"px", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_PX], 2, 0}, 159 {"cm", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_CM], 2, 0}, 160 {NULL, NULL, 0, 0}, 161 {NULL, NULL, 0, 0}, 162 {NULL, NULL, 0, 0}, 163 {NULL, NULL, 0, 0}, 164 {NULL, NULL, 0, 0}, 165 {NULL, NULL, 0, 0}, 166 {NULL, NULL, 0, 0}, 167 {NULL, NULL, 0, 0}, 168 {NULL, NULL, 0, 0}, 169 {NULL, NULL, 0, 0}, 170 {"pc", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_PC], 2, 0}, 171 {NULL, NULL, 0, 0}, 172 {NULL, NULL, 0, 0}, 173 {NULL, NULL, 0, 0}, 174 {NULL, NULL, 0, 0}, 175 {NULL, NULL, 0, 0}, 176 {NULL, NULL, 0, 0}, 177 {NULL, NULL, 0, 0}, 178 {NULL, NULL, 0, 0} 179 }; 180 181 static const lexbor_shs_entry_t lxb_css_unit_relative_shs[64] = 182 { 183 {NULL, NULL, 63, 0}, 184 {NULL, NULL, 0, 0}, 185 {NULL, NULL, 0, 0}, 186 {"ic", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_IC], 2, 0}, 187 {"cap", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_CAP], 3, 0}, 188 {NULL, NULL, 0, 0}, 189 {NULL, NULL, 0, 0}, 190 {NULL, NULL, 0, 0}, 191 {NULL, NULL, 0, 0}, 192 {NULL, NULL, 0, 0}, 193 {NULL, NULL, 0, 0}, 194 {NULL, NULL, 0, 0}, 195 {NULL, NULL, 0, 0}, 196 {"rem", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_REM], 3, 0}, 197 {NULL, NULL, 0, 0}, 198 {NULL, NULL, 0, 0}, 199 {NULL, NULL, 0, 0}, 200 {NULL, NULL, 0, 0}, 201 {NULL, NULL, 0, 0}, 202 {NULL, NULL, 0, 0}, 203 {NULL, NULL, 0, 0}, 204 {NULL, NULL, 0, 0}, 205 {NULL, NULL, 0, 0}, 206 {NULL, NULL, 0, 0}, 207 {NULL, NULL, 0, 0}, 208 {"em", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_EM], 2, 0}, 209 {NULL, NULL, 0, 0}, 210 {NULL, NULL, 0, 0}, 211 {NULL, NULL, 0, 0}, 212 {NULL, NULL, 0, 0}, 213 {"ch", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_CH], 2, 0}, 214 {NULL, NULL, 0, 0}, 215 {NULL, NULL, 0, 0}, 216 {"ex", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_EX], 2, 0}, 217 {NULL, NULL, 0, 0}, 218 {NULL, NULL, 0, 0}, 219 {NULL, NULL, 0, 0}, 220 {NULL, NULL, 0, 0}, 221 {"vb", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VB], 2, 0}, 222 {NULL, NULL, 0, 0}, 223 {NULL, NULL, 0, 0}, 224 {NULL, NULL, 0, 0}, 225 {NULL, NULL, 0, 0}, 226 {NULL, NULL, 0, 0}, 227 {"vh", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VH], 2, 0}, 228 {"vi", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VI], 2, 0}, 229 {NULL, NULL, 0, 0}, 230 {NULL, NULL, 0, 0}, 231 {NULL, NULL, 0, 0}, 232 {"rlh", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_RLH], 3, 0}, 233 {NULL, NULL, 0, 0}, 234 {NULL, NULL, 0, 0}, 235 {"vmin", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VMIN], 4, 0}, 236 {NULL, NULL, 0, 0}, 237 {NULL, NULL, 0, 0}, 238 {NULL, NULL, 0, 0}, 239 {NULL, NULL, 0, 0}, 240 {"lh", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_LH], 2, 0}, 241 {NULL, NULL, 0, 0}, 242 {"vw", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VW], 2, 0}, 243 {NULL, NULL, 0, 0}, 244 {NULL, NULL, 0, 0}, 245 {"vmax", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_VMAX], 4, 0}, 246 {NULL, NULL, 0, 0} 247 }; 248 249 static const lexbor_shs_entry_t lxb_css_unit_angel_shs[7] = 250 { 251 {NULL, NULL, 6, 0}, 252 {"turn", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_TURN], 4, 0}, 253 {"deg", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_DEG], 3, 0}, 254 {"grad", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_GRAD], 4, 0}, 255 {"rad", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_RAD], 3, 0}, 256 {NULL, NULL, 0, 0}, 257 {NULL, NULL, 0, 0} 258 }; 259 260 static const lexbor_shs_entry_t lxb_css_unit_frequency_shs[6] = 261 { 262 {NULL, NULL, 5, 0}, 263 {NULL, NULL, 0, 0}, 264 {"khz", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_KHZ], 3, 0}, 265 {NULL, NULL, 0, 0}, 266 {NULL, NULL, 0, 0}, 267 {"hz", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_HZ], 2, 0} 268 }; 269 270 static const lexbor_shs_entry_t lxb_css_unit_resolution_shs[7] = 271 { 272 {NULL, NULL, 6, 0}, 273 {NULL, NULL, 0, 0}, 274 {"x", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_X], 1, 0}, 275 {"dpcm", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_DPCM], 4, 0}, 276 {"dpi", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_DPI], 3, 0}, 277 {"dppx", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_DPPX], 4, 0}, 278 {NULL, NULL, 0, 0} 279 }; 280 281 static const lexbor_shs_entry_t lxb_css_unit_duration_shs[6] = 282 { 283 {NULL, NULL, 5, 0}, 284 {NULL, NULL, 0, 0}, 285 {"s", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_S], 1, 0}, 286 {"ms", (void *) &lxb_css_unit_data[LXB_CSS_UNIT_MS], 2, 0}, 287 {NULL, NULL, 0, 0}, 288 {NULL, NULL, 0, 0} 289 }; 290 291 292 293 294 #endif /* LXB_CSS_UNIT_RES_H */ 295