Files
systeminformer/phlib/include/searchbox.h
dmex e7fffcc8ee Improve UI theming and search control behavior
This changeset overhauls several UI infrastructure paths: it adds richer column drag/drop visuals, expands the search box with fuzzy matching and match-range APIs, and refactors theme handling (including Explorer-style palette support, buffered/non-client paint cleanup, and new theme file utilities). It also hardens core behavior with many reliability fixes, such as bounded HTTP download buffering, safer process/service enumeration and handle ownership updates, improved window/context lifecycle handling, DPI/layout fixes, and broader consistency updates across dialog/list-view drawing and helper APIs.
2026-10-02 13:27:30 +10:00

111 lines
2.1 KiB
C

/*
* Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
*
* This file is part of System Informer.
*
* Authors:
*
* dmex 2012-2023
* jxy-s 2023-2024
*
*/
#ifndef _PH_SEARCHBOX_H
#define _PH_SEARCHBOX_H
EXTERN_C_START
typedef _Function_class_(PH_SEARCHCONTROL_CALLBACK)
VOID NTAPI PH_SEARCHCONTROL_CALLBACK(
_In_ ULONG_PTR MatchHandle,
_In_opt_ PVOID Context
);
typedef PH_SEARCHCONTROL_CALLBACK* PPH_SEARCHCONTROL_CALLBACK;
PHLIBAPI
VOID
NTAPI
PhCreateSearchControlEx(
_In_ HWND ParentWindowHandle,
_In_ HWND SearchWindowHandle,
_In_opt_ PCWSTR BannerText,
_In_ PVOID ImageBaseAddress,
_In_ PCWSTR SearchButtonResource,
_In_ PCWSTR SearchButtonActiveResource,
_In_ PCWSTR CaseButtonResource,
_In_ PCWSTR RegexButtonResource,
_In_ PCWSTR RegexSetting,
_In_ PCWSTR CaseSetting,
_In_ PPH_SEARCHCONTROL_CALLBACK Callback,
_In_opt_ PVOID Context
);
PHLIBAPI
VOID
NTAPI
PhSearchControlClear(
_In_ HWND SearchWindowHandle
);
PHLIBAPI
BOOLEAN
NTAPI
PhSearchControlMatch(
_In_ ULONG_PTR MatchHandle,
_In_ PCPH_STRINGREF Text
);
typedef struct _PH_SEARCHCONTROL_MATCH_RANGE
{
ULONG Start; // WCHAR offset into the matched text
ULONG Length; // in WCHARs
} PH_SEARCHCONTROL_MATCH_RANGE, *PPH_SEARCHCONTROL_MATCH_RANGE;
PHLIBAPI
BOOLEAN
NTAPI
PhSearchControlMatchEx(
_In_ ULONG_PTR MatchHandle,
_In_ PCPH_STRINGREF Text,
_Out_writes_to_opt_(MaximumRanges, *RangeCount) PPH_SEARCHCONTROL_MATCH_RANGE Ranges,
_In_ ULONG MaximumRanges,
_Out_opt_ PULONG RangeCount
);
PHLIBAPI
BOOLEAN
NTAPI
PhSearchControlMatchZ(
_In_ ULONG_PTR MatchHandle,
_In_ PCWSTR Text
);
PHLIBAPI
BOOLEAN
NTAPI
PhSearchControlMatchLongHintZ(
_In_ ULONG_PTR MatchHandle,
_In_ PCWSTR Text
);
PHLIBAPI
BOOLEAN
NTAPI
PhSearchControlMatchPointer(
_In_ ULONG_PTR MatchHandle,
_In_ PVOID Pointer
);
PHLIBAPI
BOOLEAN
NTAPI
PhSearchControlMatchPointerRange(
_In_ ULONG_PTR MatchHandle,
_In_ PVOID Pointer,
_In_ SIZE_T Size
);
EXTERN_C_END
#endif