File: list.h

package info (click to toggle)
abook 0.5.3-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,084 kB
  • ctags: 759
  • sloc: ansic: 6,613; sh: 3,272; cpp: 956; python: 256; perl: 91; makefile: 89
file content (49 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _LIST_H
#define _LIST_H

#include "ui.h"

void		init_list();
void		close_list();
void            refresh_list();
void		print_list_line(int i, int line, int highlight);
void		list_headerline();
void            scroll_up();
void            scroll_down();
void		page_up();
void		page_down();
void            select_none();
void            select_all();
void            move_curitem(int direction);
void		goto_home();
void		goto_end();
void		highlight_line(WINDOW *win, int line);
int		selected_items();
void		invert_selection();
int		list_current_item();
int		list_is_empty();
int		duplicate_item();


enum {
	MOVE_ITEM_UP,
	MOVE_ITEM_DOWN
};

#define LIST_TOP        3
#define LIST_BOTTOM     (LINES-2)

#define LIST_LINES	(LIST_BOTTOM-LIST_TOP)
#define LIST_COLS	COLS

#define NAMEPOS		2
#define EMAILPOS        opt_get_int(INT_EMAILPOS)
#define EXTRAPOS	opt_get_int(INT_EXTRAPOS)

#define NAMELEN		(EMAILPOS-NAMEPOS -1)
#define EMAILLEN        (EXTRAPOS-EMAILPOS -1)
#define EXTRALEN	(COLS-EXTRAPOS)

#define LAST_LIST_ITEM	( first_list_item + LIST_LINES - 1 )

#endif