xref: /reactos/base/setup/usetup/genlist.h (revision c2c66aff)
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:            base/setup/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 ScrollDownGenericList(
59     PGENERIC_LIST List);
60 
61 VOID
62 ScrollUpGenericList(
63     PGENERIC_LIST List);
64 
65 VOID
66 ScrollPageDownGenericList(
67     PGENERIC_LIST List);
68 
69 VOID
70 ScrollPageUpGenericList(
71     PGENERIC_LIST List);
72 
73 VOID
74 ScrollToPositionGenericList(
75     PGENERIC_LIST List,
76     ULONG uIndex);
77 
78 VOID
79 RedrawGenericList(
80     PGENERIC_LIST List);
81 
82 VOID
83 SetCurrentListEntry(
84     PGENERIC_LIST List,
85     PGENERIC_LIST_ENTRY Entry);
86 
87 PGENERIC_LIST_ENTRY
88 GetCurrentListEntry(
89     PGENERIC_LIST List);
90 
91 PGENERIC_LIST_ENTRY
92 GetFirstListEntry(
93     PGENERIC_LIST List);
94 
95 PGENERIC_LIST_ENTRY
96 GetNextListEntry(
97     PGENERIC_LIST_ENTRY Entry);
98 
99 PVOID
100 GetListEntryUserData(
101     PGENERIC_LIST_ENTRY List);
102 
103 LPCSTR
104 GetListEntryText(
105     PGENERIC_LIST_ENTRY List);
106 
107 VOID
108 SaveGenericListState(
109     PGENERIC_LIST List);
110 
111 VOID
112 RestoreGenericListState(
113     PGENERIC_LIST List);
114 
115 VOID
116 GenericListKeyPress(
117     PGENERIC_LIST List,
118     CHAR AsciChar);
119 
120 BOOL
121 GenericListHasSingleEntry(
122     PGENERIC_LIST List);
123 
124 /* EOF */
125