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