Initial commit
[lnanohtmltiledmap.git] / html.h
blob1d8f2805e8626408072afd19b755c2e8f8e3960d
1 #ifndef LNANOHTMLTILEDMAP_HTML_H
2 #define LNANOHTMLTILEDMAP_HTML_H
3 #include <ulinux/compiler_types.h>
4 #include <ulinux/types.h>
5 /*============================================================================*/
6 #include "namespace/ulinux.h"
7 /*============================================================================*/
8 constant_u32 {
9 HTML_QUERY_NAV_CMD_GEO_MODIFY,
10 HTML_QUERY_NAV_CMD_TRANSLATION_NORTH,
11 HTML_QUERY_NAV_CMD_TRANSLATION_SOUTH,
12 HTML_QUERY_NAV_CMD_TRANSLATION_WEST,
13 HTML_QUERY_NAV_CMD_TRANSLATION_EAST,
14 HTML_QUERY_NAV_CMD_ZOOM_MODIFY,
15 HTML_QUERY_NAV_CMD_ZOOM_PLUS,
16 HTML_QUERY_NAV_CMD_ZOOM_MINUS
18 struct html_query_t {
19 f64 lo;
20 f64 la;
21 u8 zoom;
22 u32 x;
23 u32 y;
24 /* ---- */
25 u8 nav_cmd;
27 struct html_ctx_t {
28 f64 lo;
29 f64 la;
30 u8 zoom;
31 u64 x;
32 u64 y;
33 /* ---- */
34 u8 *p;
35 u64 urandom;
36 u8 verts_n;
37 u8 horizs_n;
39 static void html_query_init(struct html_query_t *q);
40 static void html_gen_ctx_init_from_query(struct html_ctx_t *c,
41 struct html_query_t *q, u8 *buf, u64 urandom);
42 static void html_majortbl_gen(struct html_ctx_t *c);
43 static u32 html_sz_max(void);
44 static void html_query_decode(struct html_query_t *q, u8 *s, u8 *e);
45 /*============================================================================*/
46 #define CLEANUP
47 #include "namespace/ulinux.h"
48 #undef CLEANUP
49 /*============================================================================*/
50 #endif