- Update address of Free Software Foundation.
[reactos.git] / reactos / base / setup / usetup / genlist.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2004 ReactOS Team
4 *
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 2 of the License, or
8 * (at your option) any later version.
9 *
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.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /* $Id$
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/genlist.h
23 * PURPOSE: Generic list functions
24 * PROGRAMMER: Eric Kohl
25 */
26
27 #ifndef __GENLIST_H__
28 #define __GENLIST_H__
29
30 struct _GENERIC_LIST_ENTRY;
31 typedef struct _GENERIC_LIST_ENTRY *PGENERIC_LIST_ENTRY;
32 struct _GENERIC_LIST;
33 typedef struct _GENERIC_LIST *PGENERIC_LIST;
34
35 PGENERIC_LIST
36 CreateGenericList(VOID);
37
38 VOID
39 DestroyGenericList(PGENERIC_LIST List,
40 BOOLEAN FreeUserData);
41
42 BOOLEAN
43 AppendGenericListEntry(PGENERIC_LIST List,
44 PCHAR Text,
45 PVOID UserData,
46 BOOLEAN Current);
47
48 VOID
49 DrawGenericList(PGENERIC_LIST List,
50 SHORT Left,
51 SHORT Top,
52 SHORT Right,
53 SHORT Bottom);
54
55 VOID
56 DrawScrollBarGenericLis(PGENERIC_LIST List);
57
58 VOID
59 ScrollDownGenericList(PGENERIC_LIST List);
60
61 VOID
62 ScrollUpGenericList(PGENERIC_LIST List);
63
64 VOID
65 ScrollPageDownGenericList(PGENERIC_LIST List);
66
67 VOID
68 ScrollPageUpGenericList(PGENERIC_LIST List);
69
70 VOID
71 ScrollToPositionGenericList (PGENERIC_LIST List, ULONG uIndex);
72
73 VOID
74 SetCurrentListEntry(PGENERIC_LIST List, PGENERIC_LIST_ENTRY Entry);
75
76 PGENERIC_LIST_ENTRY
77 GetCurrentListEntry(PGENERIC_LIST List);
78
79 PGENERIC_LIST_ENTRY
80 GetFirstListEntry(PGENERIC_LIST List);
81
82 PGENERIC_LIST_ENTRY
83 GetNextListEntry(PGENERIC_LIST_ENTRY Entry);
84
85 PVOID
86 GetListEntryUserData(PGENERIC_LIST_ENTRY List);
87
88 LPCSTR
89 GetListEntryText(PGENERIC_LIST_ENTRY List);
90
91 VOID
92 SaveGenericListState(PGENERIC_LIST List);
93
94 VOID
95 RestoreGenericListState(PGENERIC_LIST List);
96
97 VOID
98 GenericListKeyPress (PGENERIC_LIST List, CHAR AsciChar);
99
100 #endif /* __GENLIST_H__ */
101
102 /* EOF */