NetSurf
corestringlist.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 * Core string lists
22 *
23 * three macros must be defined to use this header
24 * CORESTRING_LWC_VALUE - wapcaplet strings with a value not derived from name
25 * CORESTRING_DOM_VALUE - dom strings with a value not derived from name
26 * CORESTRING_NSURL - nsurl from given url
27 *
28 * two helper macros are defined that allow simple mapping strings
29 * CORESTRING_LWC_STRING - libwapcaplet strings with a simple name value mapping
30 * CORESTRING_DOM_STRING - dom strings with a simple name value mapping
31 *
32 * \note This header is specificaly intented to be included multiple
33 * times with different macro definitions so there is no guard.
34 */
35
36#if !defined(CORESTRING_LWC_VALUE) | !defined(CORESTRING_DOM_VALUE) | !defined(CORESTRING_NSURL)
37#error "missing macro definition. This header must not be directly included"
38#endif
39
40#undef CORESTRING_LWC_STRING
41#define CORESTRING_LWC_STRING(NAME) CORESTRING_LWC_VALUE(NAME, #NAME)
42
43#undef CORESTRING_DOM_STRING
44#define CORESTRING_DOM_STRING(NAME) CORESTRING_DOM_VALUE(NAME, #NAME);
45
46/* lwc_string strings */
90CORESTRING_LWC_STRING(includesubdomains);
143
144/* unusual lwc strings */
145CORESTRING_LWC_VALUE(shortcut_icon, "shortcut icon");
147CORESTRING_LWC_VALUE(max_age, "max-age");
148CORESTRING_LWC_VALUE(no_cache, "no-cache");
149CORESTRING_LWC_VALUE(no_store, "no-store");
150CORESTRING_LWC_VALUE(query_auth, "query/auth");
151CORESTRING_LWC_VALUE(query_ssl, "query/ssl");
152CORESTRING_LWC_VALUE(query_timeout, "query/timeout");
153CORESTRING_LWC_VALUE(query_fetcherror, "query/fetcherror");
154CORESTRING_LWC_VALUE(x_ns_css, "x-ns-css");
155
156/* mime types */
157CORESTRING_LWC_VALUE(multipart_form_data, "multipart/form-data");
158CORESTRING_LWC_VALUE(text_css, "text/css");
159CORESTRING_LWC_VALUE(unknown_unknown, "unknown/unknown");
160CORESTRING_LWC_VALUE(application_unknown, "application/unknown");
162CORESTRING_LWC_VALUE(text_xml, "text/xml");
163CORESTRING_LWC_VALUE(application_xml, "application/xml");
164CORESTRING_LWC_VALUE(text_html, "text/html");
165CORESTRING_LWC_VALUE(text_plain, "text/plain");
166CORESTRING_LWC_VALUE(application_octet_stream, "application/octet-stream");
167CORESTRING_LWC_VALUE(image_gif, "image/gif");
168CORESTRING_LWC_VALUE(image_png, "image/png");
169CORESTRING_LWC_VALUE(image_jpeg, "image/jpeg");
170CORESTRING_LWC_VALUE(image_jxl, "image/jxl");
171CORESTRING_LWC_VALUE(image_bmp, "image/bmp");
172CORESTRING_LWC_VALUE(image_vnd_microsoft_icon, "image/vnd.microsoft.icon");
173CORESTRING_LWC_VALUE(image_webp, "image/webp");
174CORESTRING_LWC_VALUE(application_rss_xml, "application/rss+xml");
175CORESTRING_LWC_VALUE(application_atom_xml, "application/atom+xml");
176CORESTRING_LWC_VALUE(audio_wave, "audio/wave");
177CORESTRING_LWC_VALUE(application_ogg, "application/ogg");
178CORESTRING_LWC_VALUE(video_webm, "video/webm");
179CORESTRING_LWC_VALUE(application_x_rar_compressed, "application/x-rar-compressed");
180CORESTRING_LWC_VALUE(application_zip, "application/zip");
181CORESTRING_LWC_VALUE(application_x_gzip, "application/x-gzip");
182CORESTRING_LWC_VALUE(application_postscript, "application/postscript");
183CORESTRING_LWC_VALUE(application_pdf, "application/pdf");
184CORESTRING_LWC_VALUE(video_mp4, "video/mp4");
185CORESTRING_LWC_VALUE(image_svg, "image/svg+xml");
186
187
188/* DOM strings */
209CORESTRING_DOM_STRING(canplaythrough);
229CORESTRING_DOM_STRING(DOMAttrModified);
230CORESTRING_DOM_STRING(DOMNodeInserted);
231CORESTRING_DOM_STRING(DOMNodeInsertedIntoDocument);
232CORESTRING_DOM_STRING(DOMSubtreeModified);
240CORESTRING_DOM_STRING(durationchange);
254/* http-equiv: see below */
262CORESTRING_DOM_STRING(languagechange);
265CORESTRING_DOM_STRING(loadedmetadata);
294CORESTRING_DOM_STRING(readystatechange);
332/* DOM node names, not really CSS */
342/* DOM input types, not really CSS */
348/* DOM event prefix */
350/* DOM events forwarded from body to window */
357/* Corestrings used by DOM event registration */
359CORESTRING_DOM_STRING(autocompleteerror);
366/* DOM userdata keys, not really CSS */
367CORESTRING_DOM_STRING(__ns_key_box_node_data);
368CORESTRING_DOM_STRING(__ns_key_libcss_node_data);
369CORESTRING_DOM_STRING(__ns_key_file_name_node_data);
370CORESTRING_DOM_STRING(__ns_key_image_coords_node_data);
371CORESTRING_DOM_STRING(__ns_key_html_content_data);
372CORESTRING_DOM_STRING(__ns_key_canvas_node_data);
373
374/* unusual DOM strings */
375CORESTRING_DOM_VALUE(text_javascript, "text/javascript");
376CORESTRING_DOM_VALUE(http_equiv, "http-equiv");
377CORESTRING_DOM_VALUE(html_namespace, "http://www.w3.org/1999/xhtml");
378
379CORESTRING_NSURL(about_blank, "about:blank");
380CORESTRING_NSURL(about_query_ssl, "about:query/ssl");
381CORESTRING_NSURL(about_query_auth, "about:query/auth");
382CORESTRING_NSURL(about_query_timeout, "about:query/timeout");
383CORESTRING_NSURL(about_query_fetcherror, "about:query/fetcherror");
384
385#undef CORESTRING_LWC_STRING
386#undef CORESTRING_DOM_STRING
CORESTRING_NSURL(about_blank, "about:blank")
CORESTRING_DOM_VALUE(text_javascript, "text/javascript")
#define CORESTRING_DOM_STRING(NAME)
CORESTRING_LWC_VALUE(shortcut_icon, "shortcut icon")
#define CORESTRING_LWC_STRING(NAME)
const char * type
Definition: filetype.cpp:44
@ base
Definition: punycode.c:19
int width
Definition: gui.c:160
int height
Definition: gui.c:161
Container for border values during table border calculations.
Definition: table.c:42
Content which corresponds to a single URL.
Rectangle coordinates.
Definition: types.h:40
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
Definition: plot.c:978
static nserror rectangle(const struct redraw_context *ctx, const plot_style_t *style, const struct rect *rect)
Plots a rectangle.
Definition: plot.c:648
static nserror polygon(const struct redraw_context *ctx, const plot_style_t *style, const int *p, unsigned int n)
Plot a polygon.
Definition: plot.c:733