// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'WinInfo.pas' rev: 6.00

#ifndef WinInfoHPP
#define WinInfoHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Forms.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Wininfo
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TWindowKind { wkWindow, wkControl };
#pragma option pop

class DELPHICLASS TWindow;
class PASCALIMPLEMENTATION TWindow : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	HWND FHandle;
	bool __fastcall Valid(void);
	TWindowKind __fastcall GetWindowKind(void);
	AnsiString __fastcall GetText();
	void __fastcall SetText(const AnsiString Value);
	unsigned __fastcall GetResourceID(void);
	Forms::TWindowState __fastcall GetWindowState(void);
	void __fastcall SetWindowState(const Forms::TWindowState Value);
	bool __fastcall GetVisible(void);
	void __fastcall SetVisible(const bool Value);
	bool __fastcall GetEnabled(void);
	void __fastcall SetEnabled(const bool Value);
	bool __fastcall GetStayOnTop(void);
	void __fastcall SetStayOnTop(const bool Value);
	Graphics::TBitmap* __fastcall GetImage(void);
	unsigned __fastcall GetProcessID(void);
	int __fastcall GetAppInstance(void);
	HWND __fastcall GetParentHandle(void);
	void __fastcall SetParentHandle(const HWND Value);
	unsigned __fastcall GetControlID(void);
	unsigned __fastcall GetWindowFunction(void);
	HMENU __fastcall GetMenuHandle(void);
	Types::TRect __fastcall GetScreenRect();
	void __fastcall SetScreenRect(const Types::TRect &Value);
	Types::TRect __fastcall GetBoundsRect();
	void __fastcall SetBoundsRect(const Types::TRect &Value);
	int __fastcall GetLeft(void);
	void __fastcall SetLeft(const int Value);
	int __fastcall GetTop(void);
	void __fastcall SetTop(const int Value);
	int __fastcall GetWidth(void);
	void __fastcall SetWidth(const int Value);
	int __fastcall GetHeight(void);
	void __fastcall SetHeight(const int Value);
	unsigned __fastcall GetStyle(void);
	unsigned __fastcall GetExStyle(void);
	AnsiString __fastcall GetWindowClassName();
	int __fastcall GetClassFunction(void);
	HICON __fastcall GetIconHandle(void);
	HICON __fastcall GetSmallIconHandle(void);
	HICON __fastcall GetCursorHandle(void);
	HBRUSH __fastcall GetBrushHandle(void);
	int __fastcall GetClassStyle(void);
	
public:
	__fastcall TWindow(HWND AHandle);
	__property HWND Handle = {read=FHandle, write=FHandle, nodefault};
	__property TWindowKind WindowKind = {read=GetWindowKind, nodefault};
	__property AnsiString Text = {read=GetText, write=SetText};
	__property unsigned ResourceID = {read=GetResourceID, nodefault};
	__property Forms::TWindowState WindowState = {read=GetWindowState, write=SetWindowState, nodefault};
	__property bool Visible = {read=GetVisible, write=SetVisible, nodefault};
	__property bool Enabled = {read=GetEnabled, write=SetEnabled, nodefault};
	__property bool StayOnTop = {read=GetStayOnTop, write=SetStayOnTop, nodefault};
	__property Graphics::TBitmap* Image = {read=GetImage};
	__property unsigned ProcessID = {read=GetProcessID, nodefault};
	__property int AppInstance = {read=GetAppInstance, nodefault};
	__property HWND ParentHandle = {read=GetParentHandle, write=SetParentHandle, nodefault};
	__property unsigned ControlID = {read=GetControlID, nodefault};
	__property unsigned WindowFunction = {read=GetWindowFunction, nodefault};
	__property HMENU MenuHandle = {read=GetMenuHandle, nodefault};
	__property Types::TRect ScreenRect = {read=GetScreenRect, write=SetScreenRect};
	__property Types::TRect BoundsRect = {read=GetBoundsRect, write=SetBoundsRect};
	__property int Left = {read=GetLeft, write=SetLeft, nodefault};
	__property int Top = {read=GetTop, write=SetTop, nodefault};
	__property int Width = {read=GetWidth, write=SetWidth, nodefault};
	__property int Height = {read=GetHeight, write=SetHeight, nodefault};
	__property unsigned Style = {read=GetStyle, nodefault};
	__property unsigned ExStyle = {read=GetExStyle, nodefault};
	__property AnsiString WindowClassName = {read=GetWindowClassName};
	__property int ClassFunction = {read=GetClassFunction, nodefault};
	__property HICON IconHandle = {read=GetIconHandle, nodefault};
	__property HICON SmallIconHandle = {read=GetSmallIconHandle, nodefault};
	__property HICON CursorHandle = {read=GetCursorHandle, nodefault};
	__property HBRUSH BrushHandle = {read=GetBrushHandle, nodefault};
	__property int ClassStyle = {read=GetClassStyle, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TWindow(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TSearchFilter { sfKind, sfClass, sfText, sfExact };
#pragma option pop

typedef Set<TSearchFilter, sfKind, sfExact>  TSearchFilters;

typedef void __fastcall (__closure *TWindowNotifyEvent)(System::TObject* Sender, TWindow* Window);

typedef void __fastcall (__closure *TWindowAllowEvent)(System::TObject* Sender, TWindow* Window, bool &Allow);

class DELPHICLASS TCustomWindowInformation;
class PASCALIMPLEMENTATION TCustomWindowInformation : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Classes::TList* FWindows;
	TSearchFilters FSearchFilters;
	TWindowKind FSearchKind;
	AnsiString FSearchClass;
	AnsiString FSearchText;
	TWindowAllowEvent FOnAllowAdd;
	TWindowNotifyEvent FOnAdd;
	int __fastcall GetWindowCount(void);
	TWindow* __fastcall GetWindows(int Index);
	void __fastcall SetSearchFilters(const TSearchFilters Value);
	void __fastcall SetSearchKind(const TWindowKind Value);
	void __fastcall SetSearchClass(const AnsiString Value);
	void __fastcall SetSearchText(const AnsiString Value);
	void __fastcall ClearList(void);
	bool __fastcall AddHandle(HWND H);
	
protected:
	virtual bool __fastcall AllowAdd(TWindow* Window);
	virtual void __fastcall Added(TWindow* Window);
	__property TSearchFilters SearchFilters = {read=FSearchFilters, write=SetSearchFilters, nodefault};
	__property TWindowKind SearchKind = {read=FSearchKind, write=SetSearchKind, nodefault};
	__property AnsiString SearchClass = {read=FSearchClass, write=SetSearchClass};
	__property AnsiString SearchText = {read=FSearchText, write=SetSearchText};
	__property TWindowAllowEvent OnAllowAdd = {read=FOnAllowAdd, write=FOnAllowAdd};
	__property TWindowNotifyEvent OnAdd = {read=FOnAdd, write=FOnAdd};
	
public:
	__fastcall virtual TCustomWindowInformation(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomWindowInformation(void);
	void __fastcall Refresh(void);
	__property int WindowCount = {read=GetWindowCount, nodefault};
	__property TWindow* Windows[int Index] = {read=GetWindows};
};


class DELPHICLASS TWindowInformation;
class PASCALIMPLEMENTATION TWindowInformation : public TCustomWindowInformation 
{
	typedef TCustomWindowInformation inherited;
	
__published:
	__property SearchFilters ;
	__property SearchKind ;
	__property SearchClass ;
	__property SearchText ;
	__property OnAllowAdd ;
	__property OnAdd ;
public:
	#pragma option push -w-inl
	/* TCustomWindowInformation.Create */ inline __fastcall virtual TWindowInformation(Classes::TComponent* AOwner) : TCustomWindowInformation(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomWindowInformation.Destroy */ inline __fastcall virtual ~TWindowInformation(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Register(void);

}	/* namespace Wininfo */
using namespace Wininfo;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// WinInfo
