From 917ea7a23c5a0e70e3c442c6fdde9a1eb99e6810 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 11 May 2015 02:45:32 +0200 Subject: [PATCH] added ICEProcInputHandler function to retrieve current process --- src/ce_interfaces.pas | 4 +++- src/ce_procinput.pas | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ce_interfaces.pas b/src/ce_interfaces.pas index bfe14f0f..85f9d687 100644 --- a/src/ce_interfaces.pas +++ b/src/ce_interfaces.pas @@ -218,8 +218,10 @@ type ICEProcInputHandler = interface(ICESingleService) // add an entry to the list of process which can receive an user input. procedure addProcess(aProcess: TProcess); - // remove an entry. + // removes an entry. procedure removeProcess(aProcess: TProcess); + // indicates the current process + function process(): TProcess; end; diff --git a/src/ce_procinput.pas b/src/ce_procinput.pas index f019ffe3..ca32a8a7 100644 --- a/src/ce_procinput.pas +++ b/src/ce_procinput.pas @@ -28,6 +28,7 @@ type function singleServiceName: string; procedure addProcess(aProcess: TProcess); procedure removeProcess(aProcess: TProcess); + function process(): TProcess; public constructor create(aOwner: TComponent); override; destructor destroy; override; @@ -103,6 +104,11 @@ begin if fProc = aProcess then addProcess(nil); end; + +function TCEProcInputWidget.process(): TProcess; +begin + exit(fProc); +end; {$ENDREGION} {$REGION Process input things --------------------------------------------------}