You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

html_tags.h 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*-
  2. * Copyright 2016 Vsevolod Stakhov
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef SRC_LIBSERVER_HTML_TAGS_H_
  17. #define SRC_LIBSERVER_HTML_TAGS_H_
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /* Known HTML tags */
  22. typedef enum {
  23. Tag_UNKNOWN = 0, /**< Unknown tag! */
  24. Tag_A, /**< A */
  25. Tag_ABBR, /**< ABBR */
  26. Tag_ACRONYM, /**< ACRONYM */
  27. Tag_ADDRESS, /**< ADDRESS */
  28. Tag_APPLET, /**< APPLET */
  29. Tag_AREA, /**< AREA */
  30. Tag_B, /**< B */
  31. Tag_BASE, /**< BASE */
  32. Tag_BASEFONT, /**< BASEFONT */
  33. Tag_BDO, /**< BDO */
  34. Tag_BIG, /**< BIG */
  35. Tag_BLOCKQUOTE, /**< BLOCKQUOTE */
  36. Tag_BODY, /**< BODY */
  37. Tag_BR, /**< BR */
  38. Tag_BUTTON, /**< BUTTON */
  39. Tag_CAPTION, /**< CAPTION */
  40. Tag_CENTER, /**< CENTER */
  41. Tag_CITE, /**< CITE */
  42. Tag_CODE, /**< CODE */
  43. Tag_COL, /**< COL */
  44. Tag_COLGROUP, /**< COLGROUP */
  45. Tag_DD, /**< DD */
  46. Tag_DEL, /**< DEL */
  47. Tag_DFN, /**< DFN */
  48. Tag_DIR, /**< DIR */
  49. Tag_DIV, /**< DIF */
  50. Tag_DL, /**< DL */
  51. Tag_DT, /**< DT */
  52. Tag_EM, /**< EM */
  53. Tag_FIELDSET, /**< FIELDSET */
  54. Tag_FONT, /**< FONT */
  55. Tag_FORM, /**< FORM */
  56. Tag_FRAME, /**< FRAME */
  57. Tag_FRAMESET, /**< FRAMESET */
  58. Tag_H1, /**< H1 */
  59. Tag_H2, /**< H2 */
  60. Tag_H3, /**< H3 */
  61. Tag_H4, /**< H4 */
  62. Tag_H5, /**< H5 */
  63. Tag_H6, /**< H6 */
  64. Tag_HEAD, /**< HEAD */
  65. Tag_HR, /**< HR */
  66. Tag_HTML, /**< HTML */
  67. Tag_I, /**< I */
  68. Tag_IFRAME, /**< IFRAME */
  69. Tag_IMG, /**< IMG */
  70. Tag_INPUT, /**< INPUT */
  71. Tag_INS, /**< INS */
  72. Tag_ISINDEX, /**< ISINDEX */
  73. Tag_KBD, /**< KBD */
  74. Tag_KEYGEN, /**< KEYGEN */
  75. Tag_LABEL, /**< LABEL */
  76. Tag_LEGEND, /**< LEGEND */
  77. Tag_LI, /**< LI */
  78. Tag_LINK, /**< LINK */
  79. Tag_LISTING, /**< LISTING */
  80. Tag_MAP, /**< MAP */
  81. Tag_MENU, /**< MENU */
  82. Tag_META, /**< META */
  83. Tag_NOFRAMES, /**< NOFRAMES */
  84. Tag_NOSCRIPT, /**< NOSCRIPT */
  85. Tag_OBJECT, /**< OBJECT */
  86. Tag_OL, /**< OL */
  87. Tag_OPTGROUP, /**< OPTGROUP */
  88. Tag_OPTION, /**< OPTION */
  89. Tag_P, /**< P */
  90. Tag_PARAM, /**< PARAM */
  91. Tag_PLAINTEXT, /**< PLAINTEXT */
  92. Tag_PRE, /**< PRE */
  93. Tag_Q, /**< Q */
  94. Tag_RB, /**< RB */
  95. Tag_RBC, /**< RBC */
  96. Tag_RP, /**< RP */
  97. Tag_RT, /**< RT */
  98. Tag_RTC, /**< RTC */
  99. Tag_RUBY, /**< RUBY */
  100. Tag_S, /**< S */
  101. Tag_SAMP, /**< SAMP */
  102. Tag_SCRIPT, /**< SCRIPT */
  103. Tag_SELECT, /**< SELECT */
  104. Tag_SMALL, /**< SMALL */
  105. Tag_SPAN, /**< SPAN */
  106. Tag_STRIKE, /**< STRIKE */
  107. Tag_STRONG, /**< STRONG */
  108. Tag_STYLE, /**< STYLE */
  109. Tag_SUB, /**< SUB */
  110. Tag_SUP, /**< SUP */
  111. Tag_TABLE, /**< TABLE */
  112. Tag_TBODY, /**< TBODY */
  113. Tag_TD, /**< TD */
  114. Tag_TEXTAREA, /**< TEXTAREA */
  115. Tag_TFOOT, /**< TFOOT */
  116. Tag_TH, /**< TH */
  117. Tag_THEAD, /**< THEAD */
  118. Tag_TITLE, /**< TITLE */
  119. Tag_TR, /**< TR */
  120. Tag_TT, /**< TT */
  121. Tag_U, /**< U */
  122. Tag_UL, /**< UL */
  123. Tag_VAR, /**< VAR */
  124. Tag_XMP, /**< XMP */
  125. Tag_NEXTID, /**< NEXTID */
  126. Tag_MAX,
  127. N_TAGS = -1 /**< Must be -1 */
  128. } tag_id_t;
  129. #define CM_UNKNOWN 0
  130. /* Elements with no content. Map to HTML specification. */
  131. #define CM_EMPTY (1 << 0)
  132. /* Elements that appear outside of "BODY". */
  133. #define CM_HTML (1 << 1)
  134. /* Elements that can appear within HEAD. */
  135. #define CM_HEAD (1 << 2)
  136. /* HTML "block" elements. */
  137. #define CM_BLOCK (1 << 3)
  138. /* HTML "inline" elements. */
  139. #define CM_INLINE (1 << 4)
  140. /* Elements that mark list item ("LI"). */
  141. #define CM_LIST (1 << 5)
  142. /* Elements that mark definition list item ("DL", "DT"). */
  143. #define CM_DEFLIST (1 << 6)
  144. /* Elements that can appear inside TABLE. */
  145. #define CM_TABLE (1 << 7)
  146. /* Used for "THEAD", "TFOOT" or "TBODY". */
  147. #define CM_ROWGRP (1 << 8)
  148. /* Used for "TD", "TH" */
  149. #define CM_ROW (1 << 9)
  150. /* Elements whose content must be protected against white space movement.
  151. Includes some elements that can found in forms. */
  152. #define CM_FIELD (1 << 10)
  153. #define CM_RAW (1 << 11)
  154. /* Elements that allows "PARAM". */
  155. #define CM_PARAM (1 << 12)
  156. /* Elements with an optional end tag. */
  157. #define CM_OPT (1 << 13)
  158. /* Elements that use "align" attribute for vertical position. */
  159. #define CM_IMG (1 << 14)
  160. #define CM_NO_INDENT (1 << 15)
  161. /* Elements that cannot be omitted. */
  162. #define CM_OMITST (1 << 16)
  163. /* Unique elements */
  164. #define CM_UNIQUE (1 << 17)
  165. #define CM_USER_SHIFT (18)
  166. #ifdef __cplusplus
  167. }
  168. #endif
  169. #endif /* SRC_LIBSERVER_HTML_TAGS_H_ */