Skip to content

Commit

Permalink
A: 增加扩展 窗口激活和未激活函数
Browse files Browse the repository at this point in the history
  • Loading branch information
sxmxta committed Aug 16, 2023
1 parent d7eb1f4 commit 62864c5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Energy_Extend.inc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,24 @@ begin
end;


procedure Ext_Form_Activate(AObj: TGoForm); extdecl;
begin
handleExceptionBegin
AObj.GoActivate;
handleExceptionEnd
end;

procedure Ext_Form_Deactivate(AObj: TGoForm); extdecl;
begin
handleExceptionBegin
AObj.GoDeactivate();
handleExceptionEnd
end;

exports
Ext_Panel_GetBevelColor,
Ext_Panel_SetBevelColor,
Ext_ReadStringProperty
Ext_ReadStringProperty,
Ext_Form_Activate,
Ext_Form_Deactivate
;
14 changes: 14 additions & 0 deletions src/ugoform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ TGoForm = class(TForm)
procedure ScaleForPPI(ANewPPI: Integer);
procedure ScaleForCurrentDpi;


procedure GoDeactivate();
procedure GoActivate();

procedure InheritedWndProc(var TheMessage: TLMessage);

// On Messages, 设置各类消息事件的函数api
Expand Down Expand Up @@ -89,6 +93,16 @@ constructor TGoForm.CreateNew(AOwner: TComponent; Num: Integer);
inherited CreateNew(AOwner, Num);
end;

procedure TGoForm.GoDeactivate();
begin
self.Deactivate;
end;

procedure TGoForm.GoActivate();
begin
self.Activate;
end;

procedure TGoForm.ScaleForPPI(ANewPPI: Integer);
begin
if ANewPPI < 30 then
Expand Down

0 comments on commit 62864c5

Please sign in to comment.