Sync with trunk r63270.
[reactos.git] / 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 /*
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 #pragma once
28
29 struct _GENERIC_LIST_ENTRY;
30 typedef struct _GENERIC_LIST_ENTRY *PGENERIC_LIST_ENTRY;
31 struct _GENERIC_LIST;
32 typedef struct _GENERIC_LIST *PGENERIC_LIST;
33
34 PGENERIC_LIST
35 CreateGenericList(VOID);
36
37 VOID
38 DestroyGenericList(
39 PGENERIC_LIST List,
40 BOOLEAN FreeUserData);
41
42 BOOLEAN
43 AppendGenericListEntry(
44 PGENERIC_LIST List,
45 PCHAR Text,
46 PVOID UserData,
47 BOOLEAN Current);
48
49 VOID
50 DrawGenericList(
51 PGENERIC_LIST List,
52 SHORT Left,
53 SHORT Top,
54 SHORT Right,
55 SHORT Bottom);
56
57 VOID
58 DrawScrollBarGenericLis(
59 PGENERIC_LIST List);
60
61 VOID
62 ScrollDownGenericList(
63 PGENERIC_LIST List);
64
65 VOID
66 ScrollUpGenericList(
67 PGENERIC_LIST List);
68
69 VOID
70 ScrollPageDownGenericList(
71 PGENERIC_LIST List);
72
73 VOID
74 ScrollPageUpGenericList(
75 PGENERIC_LIST List);
76
77 VOID
78 ScrollToPositionGenericList(
79 PGENERIC_LIST List,
80 ULONG uIndex);
81
82 VOID
83 RedrawGenericList(
84 PGENERIC_LIST List);
85
86 VOID
87 SetCurrentListEntry(
88 PGENERIC_LIST List,
89 PGENERIC_LIST_ENTRY Entry);
90
91 PGENERIC_LIST_ENTRY
92 GetCurrentListEntry(
93 PGENERIC_LIST List);
94
95 PGENERIC_LIST_ENTRY
96 GetFirstListEntry(
97 PGENERIC_LIST List);
98
99 PGENERIC_LIST_ENTRY
100 GetNextListEntry(
101 PGENERIC_LIST_ENTRY Entry);
102
103 PVOID
104 GetListEntryUserData(
105 PGENERIC_LIST_ENTRY List);
106
107 LPCSTR
108 GetListEntryText(
109 PGENERIC_LIST_ENTRY List);
110
111 VOID
112 SaveGenericListState(
113 PGENERIC_LIST List);
114
115 VOID
116 RestoreGenericListState(
117 PGENERIC_LIST List);
118
119 VOID
120 GenericListKeyPress(
121 PGENERIC_LIST List,
122 CHAR AsciChar);
123
124 /* EOF */