Use intelligent screen refresh only in split regions.
[screen-lua.git] / src / list_generic.h
blob234f6de5820f67edbc950693a1336649f6ad275d
1 /* Copyright (c) 2010
2 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
3 * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program (see the file COPYING); if not, see
17 * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
20 ****************************************************************
23 struct ListData;
25 struct ListRow
27 void *data; /* Some data relevant to this row */
28 struct ListRow *next, *prev; /* doubly linked list */
29 int y; /* -1 if not on display */
32 struct GenericList
34 int (*gl_printheader) __P((struct ListData *)); /* Print the header */
35 int (*gl_printfooter) __P((struct ListData *)); /* Print the footer */
36 int (*gl_printrow) __P((struct ListData *, struct ListRow *)); /* Print one row */
37 int (*gl_pinput) __P((struct ListData *, char **inp, int *len)); /* Process input */
38 int (*gl_freerow) __P((struct ListData *, struct ListRow *)); /* Free data for a row */
39 int (*gl_free) __P((struct ListData *)); /* Free data for the list */
40 int (*gl_matchrow) __P((struct ListData *, struct ListRow *, const char *));
43 struct ListData
45 const char *name; /* An identifier for the list */
46 struct ListRow *root; /* The first item in the list */
47 struct ListRow *selected; /* The selected row */
48 struct ListRow *top; /* The topmost visible row */
50 struct GenericList *list_fn; /* The functions that deal with the list */
52 char *search; /* The search term, if any */
54 void *data; /* List specific data */
57 extern struct LayFuncs ListLf;
60 struct ListRow * glist_add_row __P((struct ListData *ldata, void *data, struct ListRow *after));
62 void glist_remove_rows __P((struct ListData *ldata));
64 void glist_display_all __P((struct ListData *list));
66 struct ListData * glist_display __P((struct GenericList *list, const char *name));
68 void glist_abort __P((void));
70 void display_displays __P((void));
72 void display_windows __P((int onblank, int order, struct win *group));