mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[USETUP] Additions for generic lists.
- Allow retrieving the number of items existing in the list; - Fix the name of some function parameters. svn path=/branches/setup_improvements/; revision=74547
This commit is contained in:
parent
2521d3c478
commit
199fb91939
2 changed files with 24 additions and 8 deletions
|
@ -45,6 +45,7 @@ typedef struct _GENERIC_LIST_ENTRY
|
|||
typedef struct _GENERIC_LIST
|
||||
{
|
||||
LIST_ENTRY ListHead;
|
||||
ULONG NumOfEntries;
|
||||
|
||||
PLIST_ENTRY FirstShown;
|
||||
PLIST_ENTRY LastShown;
|
||||
|
@ -70,6 +71,7 @@ CreateGenericList(VOID)
|
|||
return NULL;
|
||||
|
||||
InitializeListHead(&List->ListHead);
|
||||
List->NumOfEntries = 0;
|
||||
|
||||
List->Left = 0;
|
||||
List->Top = 0;
|
||||
|
@ -78,6 +80,7 @@ CreateGenericList(VOID)
|
|||
List->Redraw = TRUE;
|
||||
|
||||
List->CurrentEntry = NULL;
|
||||
List->BackupEntry = NULL;
|
||||
|
||||
return List;
|
||||
}
|
||||
|
@ -131,6 +134,7 @@ AppendGenericListEntry(
|
|||
|
||||
InsertTailList(&List->ListHead,
|
||||
&Entry->Entry);
|
||||
List->NumOfEntries++;
|
||||
|
||||
if (Current || List->CurrentEntry == NULL)
|
||||
{
|
||||
|
@ -609,17 +613,25 @@ GetNextListEntry(
|
|||
|
||||
PVOID
|
||||
GetListEntryUserData(
|
||||
PGENERIC_LIST_ENTRY List)
|
||||
PGENERIC_LIST_ENTRY Entry)
|
||||
{
|
||||
return List->UserData;
|
||||
return Entry->UserData;
|
||||
}
|
||||
|
||||
|
||||
LPCSTR
|
||||
GetListEntryText(
|
||||
PGENERIC_LIST_ENTRY List)
|
||||
PGENERIC_LIST_ENTRY Entry)
|
||||
{
|
||||
return List->Text;
|
||||
return Entry->Text;
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
GetNumberOfListEntries(
|
||||
PGENERIC_LIST List)
|
||||
{
|
||||
return List->NumOfEntries;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -98,11 +98,15 @@ GetNextListEntry(
|
|||
|
||||
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 @@ RestoreGenericListState(
|
|||
|
||||
VOID
|
||||
GenericListKeyPress(
|
||||
PGENERIC_LIST List,
|
||||
CHAR AsciChar);
|
||||
PGENERIC_LIST GenericList,
|
||||
CHAR AsciiChar);
|
||||
|
||||
BOOL
|
||||
GenericListHasSingleEntry(
|
||||
|
|
Loading…
Reference in a new issue