Author: hbelusca
Date: Mon May 15 01:43:28 2017
New Revision: 74547
URL:
http://svn.reactos.org/svn/reactos?rev=74547&view=rev
Log:
[USETUP]: GenList modifications:
- Allow retrieving the number of items existing in the list;
- Fix the name of some function parameters.
Modified:
branches/setup_improvements/base/setup/usetup/genlist.c
branches/setup_improvements/base/setup/usetup/genlist.h
Modified: branches/setup_improvements/base/setup/usetup/genlist.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/genlist.c [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/usetup/genlist.c [iso-8859-1] Mon May 15
01:43:28 2017
@@ -45,6 +45,7 @@
typedef struct _GENERIC_LIST
{
LIST_ENTRY ListHead;
+ ULONG NumOfEntries;
PLIST_ENTRY FirstShown;
PLIST_ENTRY LastShown;
@@ -70,6 +71,7 @@
return NULL;
InitializeListHead(&List->ListHead);
+ List->NumOfEntries = 0;
List->Left = 0;
List->Top = 0;
@@ -78,6 +80,7 @@
List->Redraw = TRUE;
List->CurrentEntry = NULL;
+ List->BackupEntry = NULL;
return List;
}
@@ -131,6 +134,7 @@
InsertTailList(&List->ListHead,
&Entry->Entry);
+ List->NumOfEntries++;
if (Current || List->CurrentEntry == NULL)
{
@@ -609,17 +613,25 @@
PVOID
GetListEntryUserData(
- PGENERIC_LIST_ENTRY List)
-{
- return List->UserData;
+ PGENERIC_LIST_ENTRY Entry)
+{
+ return Entry->UserData;
}
LPCSTR
GetListEntryText(
- PGENERIC_LIST_ENTRY List)
-{
- return List->Text;
+ PGENERIC_LIST_ENTRY Entry)
+{
+ return Entry->Text;
+}
+
+
+ULONG
+GetNumberOfListEntries(
+ PGENERIC_LIST List)
+{
+ return List->NumOfEntries;
}
Modified: branches/setup_improvements/base/setup/usetup/genlist.h
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/genlist.h [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/usetup/genlist.h [iso-8859-1] Mon May 15
01:43:28 2017
@@ -98,11 +98,15 @@
PVOID
GetListEntryUserData(
- PGENERIC_LIST_ENTRY List);
+ PGENERIC_LIST_ENTRY Entry);
LPCSTR
GetListEntryText(
- PGENERIC_LIST_ENTRY List);
+ PGENERIC_LIST_ENTRY Entry);
+
+ULONG
+GetNumberOfListEntries(
+ PGENERIC_LIST List);
VOID
SaveGenericListState(
@@ -114,8 +118,8 @@
VOID
GenericListKeyPress(
- PGENERIC_LIST List,
- CHAR AsciChar);
+ PGENERIC_LIST GenericList,
+ CHAR AsciiChar);
BOOL
GenericListHasSingleEntry(