Files
2026-06-12 23:18:12 +08:00

99 lines
3.8 KiB
C++

// CodeGear C++Builder
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'uCEFSentinel.pas' rev: 37.00 (Windows)
#ifndef uCEFSentinelHPP
#define uCEFSentinelHPP
#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <System.SysUtils.hpp>
#include <System.SyncObjs.hpp>
#include <System.Math.hpp>
#include <uCEFTypes.hpp>
#include <uCEFInterfaces.hpp>
#include <uCEFConstants.hpp>
//-- user supplied -----------------------------------------------------------
namespace Ucefsentinel
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TCEFSentinel;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TSentinelStatus : unsigned int { ssIdle, ssInitialDelay, ssCheckingChildren, ssClosing };
class PASCALIMPLEMENTATION TCEFSentinel : public System::Classes::TComponent
{
typedef System::Classes::TComponent inherited;
protected:
HWND FCompHandle;
TSentinelStatus FStatus;
System::Syncobjs::TCriticalSection* FStatusCS;
unsigned FDelayPerProcMs;
unsigned FMinInitDelayMs;
unsigned FFinalDelayMs;
int FMinChildProcs;
int FMaxCheckCount;
int FCheckCount;
System::Classes::TNotifyEvent FOnClose;
Vcl::Extctrls::TTimer* FTimer;
TSentinelStatus __fastcall GetStatus();
int __fastcall GetChildProcCount();
void __fastcall WndProc(Winapi::Messages::TMessage &aMessage);
virtual void __fastcall doStartMsg(Winapi::Messages::TMessage &aMessage);
virtual void __fastcall doCloseMsg(Winapi::Messages::TMessage &aMessage);
bool __fastcall SendCompMessage(unsigned aMsg);
virtual bool __fastcall CanClose();
virtual void __fastcall Timer_OnTimer(System::TObject* Sender);
public:
__fastcall virtual TCEFSentinel(System::Classes::TComponent* AOwner);
__fastcall virtual ~TCEFSentinel();
virtual void __fastcall AfterConstruction();
virtual void __fastcall Start();
__property TSentinelStatus Status = {read=GetStatus, nodefault};
__property int ChildProcCount = {read=GetChildProcCount, nodefault};
__published:
__property unsigned DelayPerProcMs = {read=FDelayPerProcMs, write=FDelayPerProcMs, default=200};
__property unsigned MinInitDelayMs = {read=FMinInitDelayMs, write=FMinInitDelayMs, default=1500};
__property unsigned FinalDelayMs = {read=FFinalDelayMs, write=FFinalDelayMs, default=100};
__property int MinChildProcs = {read=FMinChildProcs, write=FMinChildProcs, default=2};
__property int MaxCheckCount = {read=FMaxCheckCount, write=FMaxCheckCount, default=10};
__property System::Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
};
//-- var, const, procedure ---------------------------------------------------
static _DELPHI_CONST System::Byte CEFSENTINEL_DEFAULT_DELAYPERPROCMS = System::Byte(0xc8);
static _DELPHI_CONST System::Word CEFSENTINEL_DEFAULT_MININITDELAYMS = System::Word(0x5dc);
static _DELPHI_CONST System::Int8 CEFSENTINEL_DEFAULT_FINALDELAYMS = System::Int8(0x64);
static _DELPHI_CONST System::Int8 CEFSENTINEL_DEFAULT_MINCHILDPROCS = System::Int8(0x2);
static _DELPHI_CONST System::Int8 CEFSENTINEL_DEFAULT_MAXCHECKCOUNTS = System::Int8(0xa);
} /* namespace Ucefsentinel */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_UCEFSENTINEL)
using namespace Ucefsentinel;
#endif
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // uCEFSentinelHPP