OSDN Git Service

update version number.
[bbk/bchanl.git] / src / extbbslist.h
1 /*
2  * extbbslist.h
3  *
4  * Copyright (c) 2012 project bchan
5  *
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.
9  *
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:
13  *
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.
18  *
19  * 2. Altered source versions must be plainly marked as such, and must not be
20  *    misrepresented as being the original software.
21  *
22  * 3. This notice may not be removed or altered from any source
23  *    distribution.
24  *
25  */
26
27 #include        <basic.h>
28 #include        <btron/dp.h>
29
30 #ifndef __EXTBBSLIST_H__
31 #define __EXTBBSLIST_H__
32
33 typedef struct extbbslist_t_ extbbslist_t;
34 typedef struct extbbslist_readcontext_t_ extbbslist_readcontext_t;
35 typedef struct extbbslist_editcontext_t_ extbbslist_editcontext_t;
36
37 IMPORT extbbslist_t* extbbslist_new(LINK *db_link, W rectype, UH subtype);
38 IMPORT VOID extbbslist_delete(extbbslist_t *list);
39 IMPORT W extbbslist_appenditem(extbbslist_t *list, TC *title, W title_len, UB *url, W url_len);
40 IMPORT W extbbslist_deleteitem(extbbslist_t *list, TC *title, W title_len);
41 IMPORT W extbbslist_number(extbbslist_t *list);
42 IMPORT W extbbslist_writefile(extbbslist_t *list);
43 IMPORT W extbbslist_readfile(extbbslist_t *list);
44
45 IMPORT extbbslist_readcontext_t* extbbslist_startread(extbbslist_t *list);
46 IMPORT VOID extbbslist_endread(extbbslist_t *list, extbbslist_readcontext_t *ctx);
47 IMPORT Bool extbbslist_readcontext_getnext(extbbslist_readcontext_t *ctx, TC **title, W *title_len, UB **url, W *url_len);
48
49 IMPORT extbbslist_editcontext_t* extbbslist_startedit(extbbslist_t *list);
50 IMPORT VOID extbbslist_endedit(extbbslist_t *list, extbbslist_editcontext_t *ctx, Bool update);
51 IMPORT W extbbslist_editcontext_append(extbbslist_editcontext_t *ctx, CONST TC *title, W title_len, CONST TC *url, W url_len);
52 IMPORT W extbbslist_editcontext_update(extbbslist_editcontext_t *ctx, W i, CONST TC *title, W title_len, CONST TC *url, W url_len);
53 IMPORT W extbbslist_editcontext_draw(extbbslist_editcontext_t *ctx, GID target, RECT *r);
54 IMPORT Bool extbbslist_editcontext_finditem(extbbslist_editcontext_t *ctx, PNT rel_pos, W *index);
55 IMPORT W extbbslist_editcontext_swapitem(extbbslist_editcontext_t *ctx, W i0, W i1);
56 IMPORT W extbbslist_editcontext_deleteitem(extbbslist_editcontext_t *ctx, W i);
57 IMPORT VOID extbbslist_editcontext_setselect(extbbslist_editcontext_t *ctx, W i);
58 IMPORT W extbbslist_editcontext_getselect(extbbslist_editcontext_t *ctx);
59 IMPORT Bool extbbslist_editcontext_ischanged(extbbslist_editcontext_t *ctx);
60 IMPORT VOID extbbslist_editcontext_setviewrect(extbbslist_editcontext_t *ctx, W l, W t, W r, W b);
61 IMPORT VOID extbbslist_editcontext_getviewrect(extbbslist_editcontext_t *ctx, W *l, W *t, W *r, W *b);
62 IMPORT VOID extbbslist_editcontext_scrollviewrect(extbbslist_editcontext_t *ctx, W dh, W dv);
63 IMPORT VOID extbbslist_editcontext_getdrawrect(extbbslist_editcontext_t *ctx, GID gid, W *l, W *t, W *r, W *b);
64
65 #endif