Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

html_tags.h 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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, /**< Unknown tag! */
  24. Tag_A, /**< A */
  25. Tag_ABBR, /**< ABBR */
  26. Tag_ACRONYM, /**< ACRONYM */
  27. Tag_ADDRESS, /**< ADDRESS */
  28. Tag_ALIGN, /**< ALIGN */
  29. Tag_APPLET, /**< APPLET */
  30. Tag_AREA, /**< AREA */
  31. Tag_B, /**< B */
  32. Tag_BASE, /**< BASE */
  33. Tag_BASEFONT, /**< BASEFONT */
  34. Tag_BDO, /**< BDO */
  35. Tag_BGSOUND, /**< BGSOUND */
  36. Tag_BIG, /**< BIG */
  37. Tag_BLINK, /**< BLINK */
  38. Tag_BLOCKQUOTE, /**< BLOCKQUOTE */
  39. Tag_BODY, /**< BODY */
  40. Tag_BR, /**< BR */
  41. Tag_BUTTON, /**< BUTTON */
  42. Tag_CAPTION, /**< CAPTION */
  43. Tag_CENTER, /**< CENTER */
  44. Tag_CITE, /**< CITE */
  45. Tag_CODE, /**< CODE */
  46. Tag_COL, /**< COL */
  47. Tag_COLGROUP, /**< COLGROUP */
  48. Tag_COMMENT, /**< COMMENT */
  49. Tag_DD, /**< DD */
  50. Tag_DEL, /**< DEL */
  51. Tag_DFN, /**< DFN */
  52. Tag_DIR, /**< DIR */
  53. Tag_DIV, /**< DIF */
  54. Tag_DL, /**< DL */
  55. Tag_DT, /**< DT */
  56. Tag_EM, /**< EM */
  57. Tag_EMBED, /**< EMBED */
  58. Tag_FIELDSET, /**< FIELDSET */
  59. Tag_FONT, /**< FONT */
  60. Tag_FORM, /**< FORM */
  61. Tag_FRAME, /**< FRAME */
  62. Tag_FRAMESET, /**< FRAMESET */
  63. Tag_H1, /**< H1 */
  64. Tag_H2, /**< H2 */
  65. Tag_H3, /**< H3 */
  66. Tag_H4, /**< H4 */
  67. Tag_H5, /**< H5 */
  68. Tag_H6, /**< H6 */
  69. Tag_HEAD, /**< HEAD */
  70. Tag_HR, /**< HR */
  71. Tag_HTML, /**< HTML */
  72. Tag_I, /**< I */
  73. Tag_IFRAME, /**< IFRAME */
  74. Tag_ILAYER, /**< ILAYER */
  75. Tag_IMG, /**< IMG */
  76. Tag_INPUT, /**< INPUT */
  77. Tag_INS, /**< INS */
  78. Tag_ISINDEX, /**< ISINDEX */
  79. Tag_KBD, /**< KBD */
  80. Tag_KEYGEN, /**< KEYGEN */
  81. Tag_LABEL, /**< LABEL */
  82. Tag_LAYER, /**< LAYER */
  83. Tag_LEGEND, /**< LEGEND */
  84. Tag_LI, /**< LI */
  85. Tag_LINK, /**< LINK */
  86. Tag_LISTING, /**< LISTING */
  87. Tag_MAP, /**< MAP */
  88. Tag_MARQUEE, /**< MARQUEE */
  89. Tag_MENU, /**< MENU */
  90. Tag_META, /**< META */
  91. Tag_MULTICOL, /**< MULTICOL */
  92. Tag_NOBR, /**< NOBR */
  93. Tag_NOEMBED, /**< NOEMBED */
  94. Tag_NOFRAMES, /**< NOFRAMES */
  95. Tag_NOLAYER, /**< NOLAYER */
  96. Tag_NOSAVE, /**< NOSAVE */
  97. Tag_NOSCRIPT, /**< NOSCRIPT */
  98. Tag_OBJECT, /**< OBJECT */
  99. Tag_OL, /**< OL */
  100. Tag_OPTGROUP, /**< OPTGROUP */
  101. Tag_OPTION, /**< OPTION */
  102. Tag_P, /**< P */
  103. Tag_PARAM, /**< PARAM */
  104. Tag_PLAINTEXT, /**< PLAINTEXT */
  105. Tag_PRE, /**< PRE */
  106. Tag_Q, /**< Q */
  107. Tag_RB, /**< RB */
  108. Tag_RBC, /**< RBC */
  109. Tag_RP, /**< RP */
  110. Tag_RT, /**< RT */
  111. Tag_RTC, /**< RTC */
  112. Tag_RUBY, /**< RUBY */
  113. Tag_S, /**< S */
  114. Tag_SAMP, /**< SAMP */
  115. Tag_SCRIPT, /**< SCRIPT */
  116. Tag_SELECT, /**< SELECT */
  117. Tag_SERVER, /**< SERVER */
  118. Tag_SERVLET, /**< SERVLET */
  119. Tag_SMALL, /**< SMALL */
  120. Tag_SPACER, /**< SPACER */
  121. Tag_SPAN, /**< SPAN */
  122. Tag_STRIKE, /**< STRIKE */
  123. Tag_STRONG, /**< STRONG */
  124. Tag_STYLE, /**< STYLE */
  125. Tag_SUB, /**< SUB */
  126. Tag_SUP, /**< SUP */
  127. Tag_TABLE, /**< TABLE */
  128. Tag_TBODY, /**< TBODY */
  129. Tag_TD, /**< TD */
  130. Tag_TEXTAREA, /**< TEXTAREA */
  131. Tag_TFOOT, /**< TFOOT */
  132. Tag_TH, /**< TH */
  133. Tag_THEAD, /**< THEAD */
  134. Tag_TITLE, /**< TITLE */
  135. Tag_TR, /**< TR */
  136. Tag_TT, /**< TT */
  137. Tag_U, /**< U */
  138. Tag_UL, /**< UL */
  139. Tag_VAR, /**< VAR */
  140. Tag_WBR, /**< WBR */
  141. Tag_XMP, /**< XMP */
  142. Tag_XML, /**< XML */
  143. Tag_NEXTID, /**< NEXTID */
  144. N_TAGS /**< Must be last */
  145. } tag_id_t;
  146. #define CM_UNKNOWN 0
  147. /* Elements with no content. Map to HTML specification. */
  148. #define CM_EMPTY (1 << 0)
  149. /* Elements that appear outside of "BODY". */
  150. #define CM_HTML (1 << 1)
  151. /* Elements that can appear within HEAD. */
  152. #define CM_HEAD (1 << 2)
  153. /* HTML "block" elements. */
  154. #define CM_BLOCK (1 << 3)
  155. /* HTML "inline" elements. */
  156. #define CM_INLINE (1 << 4)
  157. /* Elements that mark list item ("LI"). */
  158. #define CM_LIST (1 << 5)
  159. /* Elements that mark definition list item ("DL", "DT"). */
  160. #define CM_DEFLIST (1 << 6)
  161. /* Elements that can appear inside TABLE. */
  162. #define CM_TABLE (1 << 7)
  163. /* Used for "THEAD", "TFOOT" or "TBODY". */
  164. #define CM_ROWGRP (1 << 8)
  165. /* Used for "TD", "TH" */
  166. #define CM_ROW (1 << 9)
  167. /* Elements whose content must be protected against white space movement.
  168. Includes some elements that can found in forms. */
  169. #define CM_FIELD (1 << 10)
  170. /* Used to avoid propagating inline emphasis inside some elements
  171. such as OBJECT or APPLET. */
  172. #define CM_OBJECT (1 << 11)
  173. /* Elements that allows "PARAM". */
  174. #define CM_PARAM (1 << 12)
  175. /* "FRAME", "FRAMESET", "NOFRAMES". Used in ParseFrameSet. */
  176. #define CM_FRAMES (1 << 13)
  177. /* Heading elements (h1, h2, ...). */
  178. #define CM_HEADING (1 << 14)
  179. /* Elements with an optional end tag. */
  180. #define CM_OPT (1 << 15)
  181. /* Elements that use "align" attribute for vertical position. */
  182. #define CM_IMG (1 << 16)
  183. /* Elements with inline and block model. Used to avoid calling InlineDup. */
  184. #define CM_MIXED (1 << 17)
  185. /* Elements whose content needs to be indented only if containing one
  186. CM_BLOCK element. */
  187. #define CM_NO_INDENT (1 << 18)
  188. /* Elements that are obsolete (such as "dir", "menu"). */
  189. #define CM_OBSOLETE (1 << 19)
  190. /* User defined elements. Used to determine how attributes without value
  191. should be printed. */
  192. #define CM_NEW (1 << 20)
  193. /* Elements that cannot be omitted. */
  194. #define CM_OMITST (1 << 21)
  195. /* Unique elements */
  196. #define CM_UNIQUE (1 << 22)
  197. #ifdef __cplusplus
  198. }
  199. #endif
  200. #endif /* SRC_LIBSERVER_HTML_TAGS_H_ */