]> git.deb.at Git - pkg/abook.git/blob - list.h
Initial revision
[pkg/abook.git] / list.h
1 #ifndef _LIST_H
2 #define _LIST_H
3
4
5 void            init_list();
6 void            close_list();
7 void            refresh_list();
8 void            print_list_line(int i, int line);
9 void            list_headerline();
10 void            scroll_up();
11 void            scroll_down();
12 void            page_up();
13 void            page_down();
14 void            select_none();
15 void            select_all();
16 void            move_curitem(int direction);
17 void            goto_home();
18 void            goto_end();
19 void            highlight_line(WINDOW *win, int line);
20 int             selected_items();
21 void            invert_selection();
22
23
24 enum {
25         MOVE_ITEM_UP,
26         MOVE_ITEM_DOWN
27 };
28
29 #define LIST_TOP        3
30 #define LIST_BOTTOM     (LINES-3)
31
32 #define LIST_LINES      (LIST_BOTTOM-LIST_TOP)
33 #define LIST_COLS       COLS
34
35 #define NAMEPOS         2
36 #define EMAILPOS        options_get_int("emailpos")
37 #define EXTRAPOS        options_get_int("extrapos")
38
39 #define NAMELEN         (EMAILPOS-NAMEPOS -1)
40 #define EMAILLEN        (EXTRAPOS-EMAILPOS -1)
41 #define EXTRALEN        (COLS-EXTRAPOS)
42
43 #define LAST_LIST_ITEM  ( first_list_item + LIST_LINES - 1 )
44
45 #endif