mirror of
https://github.com/reactos/reactos.git
synced 2025-05-13 06:18:17 +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
|
typedef struct _GENERIC_LIST
|
||||||
{
|
{
|
||||||
LIST_ENTRY ListHead;
|
LIST_ENTRY ListHead;
|
||||||
|
ULONG NumOfEntries;
|
||||||
|
|
||||||
PLIST_ENTRY FirstShown;
|
PLIST_ENTRY FirstShown;
|
||||||
PLIST_ENTRY LastShown;
|
PLIST_ENTRY LastShown;
|
||||||
|
@ -70,6 +71,7 @@ CreateGenericList(VOID)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
InitializeListHead(&List->ListHead);
|
InitializeListHead(&List->ListHead);
|
||||||
|
List->NumOfEntries = 0;
|
||||||
|
|
||||||
List->Left = 0;
|
List->Left = 0;
|
||||||
List->Top = 0;
|
List->Top = 0;
|
||||||
|
@ -78,6 +80,7 @@ CreateGenericList(VOID)
|
||||||
List->Redraw = TRUE;
|
List->Redraw = TRUE;
|
||||||
|
|
||||||
List->CurrentEntry = NULL;
|
List->CurrentEntry = NULL;
|
||||||
|
List->BackupEntry = NULL;
|
||||||
|
|
||||||
return List;
|
return List;
|
||||||
}
|
}
|
||||||
|
@ -131,6 +134,7 @@ AppendGenericListEntry(
|
||||||
|
|
||||||
InsertTailList(&List->ListHead,
|
InsertTailList(&List->ListHead,
|
||||||
&Entry->Entry);
|
&Entry->Entry);
|
||||||
|
List->NumOfEntries++;
|
||||||
|
|
||||||
if (Current || List->CurrentEntry == NULL)
|
if (Current || List->CurrentEntry == NULL)
|
||||||
{
|
{
|
||||||
|
@ -609,17 +613,25 @@ GetNextListEntry(
|
||||||
|
|
||||||
PVOID
|
PVOID
|
||||||
GetListEntryUserData(
|
GetListEntryUserData(
|
||||||
PGENERIC_LIST_ENTRY List)
|
PGENERIC_LIST_ENTRY Entry)
|
||||||
{
|
{
|
||||||
return List->UserData;
|
return Entry->UserData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LPCSTR
|
LPCSTR
|
||||||
GetListEntryText(
|
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
|
PVOID
|
||||||
GetListEntryUserData(
|
GetListEntryUserData(
|
||||||
PGENERIC_LIST_ENTRY List);
|
PGENERIC_LIST_ENTRY Entry);
|
||||||
|
|
||||||
LPCSTR
|
LPCSTR
|
||||||
GetListEntryText(
|
GetListEntryText(
|
||||||
PGENERIC_LIST_ENTRY List);
|
PGENERIC_LIST_ENTRY Entry);
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
GetNumberOfListEntries(
|
||||||
|
PGENERIC_LIST List);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
SaveGenericListState(
|
SaveGenericListState(
|
||||||
|
@ -114,8 +118,8 @@ RestoreGenericListState(
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
GenericListKeyPress(
|
GenericListKeyPress(
|
||||||
PGENERIC_LIST List,
|
PGENERIC_LIST GenericList,
|
||||||
CHAR AsciChar);
|
CHAR AsciiChar);
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
GenericListHasSingleEntry(
|
GenericListHasSingleEntry(
|
||||||
|
|
Loading…
Reference in a new issue