4 * Copyright (c) 2009-2010 project bchan
6 * This software is provided 'as-is', without any express or implied
7 * warranty. In no event will the authors be held liable for any damages
8 * arising from the use of this software.
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software
16 * in a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
19 * 2. Altered source versions must be plainly marked as such, and must not be
20 * misrepresented as being the original software.
22 * 3. This notice may not be removed or altered from any source
34 typedef struct actionlist_t_ actionlist_t;
36 #define ACTIONLIST_ACTIONTYPE_ANCHOR 0
37 #define ACTIONLIST_ACTIONTYPE_URL 1
38 #define ACTIONLIST_ACTIONTYPE_NUMBER 2
39 #define ACTIONLIST_ACTIONTYPE_RESID 3
40 IMPORT actionlist_t* actionlist_new();
41 IMPORT VOID actionlist_delete(actionlist_t *alist);
42 IMPORT W actionlist_findboard(actionlist_t *alist, PNT pos, RECT *r, W *type, UB **start, W *len);
44 IMPORT W tadlib_calcdrawsize(TC *str, W len, GID gid, SIZE *sz, actionlist_t **alist);
45 IMPORT W tadlib_drawtext(TC *str, W len, GID gid, W dh, W dv);
46 IMPORT W tadlib_remove_TA_APPL_calcsize(TC *str, W len);
47 IMPORT W tadlib_remove_TA_APPL(TC *str, W len, TC *dest, W dest_len);
48 IMPORT W tadlib_UW_to_str(UW val, TC *dest, W dest_len);
49 IMPORT VOID tadlib_separete_datepart(TC *str, W len, TC **date, W *date_len, TC **id, W *id_len, TC **beid, W *beid_len);
51 struct taditerator_t_ {
56 typedef struct taditerator_t_ taditerator_t;
58 enum TADITERATOR_RESULT_T_ {
59 TADITERATOR_RESULT_CHARCTOR,
60 TADITERATOR_RESULT_SEGMENT,
61 TADITERATOR_RESULT_END,
63 typedef enum TADITERATOR_RESULT_T_ TADITERATOR_RESULT_T;
65 IMPORT VOID taditerator_initialize(taditerator_t *iterator, TC *bin, W strlen);
66 IMPORT VOID taditerator_finalize(taditerator_t *iterator);
67 IMPORT W taditerator_next(taditerator_t *iterator, TC **pos, TC *segment, LTADSEG **seg, W *segsize, UB **data);
69 typedef struct tctokenchecker_valuetuple_t_ tctokenchecker_valuetuple_t;
70 struct tctokenchecker_valuetuple_t_ {
75 typedef struct tctokenchecker_t_ tctokenchecker_t;
76 struct tctokenchecker_t_ {
77 tctokenchecker_valuetuple_t *namelist;
87 TCTOKENCHECKER_CONTINUE,
88 TCTOKENCHECKER_CONTINUE_NOMATCH,
89 TCTOKENCHECKER_DETERMINE,
90 TCTOKENCHECKER_NOMATCH,
91 TCTOKENCHECKER_AFTER_END
94 IMPORT VOID tctokenchecker_initialize(tctokenchecker_t *checker, tctokenchecker_valuetuple_t *namelist, W namelistnum, TC *endchars);
95 IMPORT VOID tctokenchecker_finalize(tctokenchecker_t *checker);
96 IMPORT VOID tctokenchecker_clear(tctokenchecker_t *checker);
97 IMPORT W tctokenchecker_inputchar(tctokenchecker_t *checker, TC c, W *val);
98 IMPORT VOID tctokenchecker_getlastmatchedstring(tctokenchecker_t *checker, TC **str, W *len);
111 #define TT_BCHAN_SUBID_ANCHOR_START 1
112 #define TT_BCHAN_SUBID_ANCHOR_END 2
113 #define TT_BCHAN_SUBID_URL_START 3
114 #define TT_BCHAN_SUBID_URL_END 4