mirror of
https://github.com/lexborisov/Modest
synced 2024-11-26 23:49:36 +03:00
162 lines
9.9 KiB
C
162 lines
9.9 KiB
C
/*
|
|
Copyright (C) 2016 Alexander Borisov
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
This library 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 the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
Author: lex.borisov@gmail.com (Alexander Borisov)
|
|
*/
|
|
|
|
#ifndef MyHTML_MyCSS_SELECTORS_PSEUDO_RESOURCE_H
|
|
#define MyHTML_MyCSS_SELECTORS_PSEUDO_RESOURCE_H
|
|
#pragma once
|
|
|
|
#define MyCSS_SELECTORS_PSEUDO_CLASS_NAME_STATIC_SIZE 73
|
|
#define MyCSS_SELECTORS_PSEUDO_ELEMENT_NAME_STATIC_SIZE 41
|
|
|
|
static const mycss_selectots_pseudo_begin_entry_t mycss_selectors_pseudo_class_begin_map_index[] =
|
|
{
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"placeholder-shown", 17, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_PLACEHOLDER_SHOWN, 0, 4},
|
|
{"empty", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_EMPTY, 74, 5},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"last-of-type", 12, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_LAST_OF_TYPE, 0, 8},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"user-error", 10, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_USER_ERROR, 0, 10},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"in-range", 8, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_IN_RANGE, 0, 15},
|
|
{"link", 4, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_LINK, 75, 16},
|
|
{"blank", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_BLANK, 76, 17},
|
|
{"active", 6, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_ACTIVE, 0, 18},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"read-write", 10, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_READ_WRITE, 0, 20},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"checked", 7, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_CHECKED, 77, 24},
|
|
{"default", 7, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_DEFAULT, 0, 25},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"focus", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_FOCUS, 78, 32},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"last-child", 10, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_LAST_CHILD, 0, 34},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"enabled", 7, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_ENABLED, 0, 37},
|
|
{"visited", 7, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_VISITED, 0, 38},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"scope", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_SCOPE, 79, 41},
|
|
{"indeterminate", 13, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_INDETERMINATE, 0, 42},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"root", 4, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_ROOT, 80, 45},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"read-only", 9, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_READ_ONLY, 0, 47},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"drop", 4, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_DROP, 0, 52},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"future", 6, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_FUTURE, 0, 55},
|
|
{"optional", 8, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_OPTIONAL, 0, 56},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"invalid", 7, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_INVALID, 0, 63},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"past", 4, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_PAST, 81, 66},
|
|
{"only-of-type", 12, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_ONLY_OF_TYPE, 82, 67},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_UNDEF, 0, 0},
|
|
{"target", 6, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_TARGET, 0, 72},
|
|
{"first-child", 11, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_FIRST_CHILD, 0, 73},
|
|
{"hover", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_HOVER, 0, 74},
|
|
{"current", 7, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_CURRENT, 0, 75},
|
|
{"valid", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_VALID, 0, 76},
|
|
{"required", 8, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_REQUIRED, 0, 77},
|
|
{"any-link", 8, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_ANY_LINK, 0, 78},
|
|
{"only-child", 10, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_ONLY_CHILD, 0, 79},
|
|
{"first-of-type", 13, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_FIRST_OF_TYPE, 0, 80},
|
|
{"disabled", 8, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_DISABLED, 0, 81},
|
|
{"out-of-range", 12, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_OUT_OF_RANGE, 0, 82},
|
|
};
|
|
|
|
static const mycss_selectots_pseudo_begin_entry_t mycss_selectors_pseudo_element_begin_map_index[] =
|
|
{
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"grammar-error", 13, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_GRAMMAR_ERROR, 0, 4},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"first-letter", 12, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_FIRST_LETTER, 0, 14},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"marker", 6, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_MARKER, 0, 19},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"before", 6, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_BEFORE, 0, 21},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"after", 5, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_AFTER, 0, 23},
|
|
{"placeholder", 11, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_PLACEHOLDER, 0, 24},
|
|
{"spelling-error", 14, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_SPELLING_ERROR, 0, 25},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"backdrop", 8, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_BACKDROP, 0, 28},
|
|
{"first-line", 10, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_FIRST_LINE, 0, 29},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{"selection", 9, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_SELECTION, 0, 35},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
{NULL, 0, MyCSS_SELECTORS_SUB_TYPE_PSEUDO_ELEMENT_UNDEF, 0, 0},
|
|
};
|
|
|
|
#endif /* MyHTML_MyCSS_SELECTORS_PSEUDO_RESOURCE_H */
|