编辑器
优化查找体验
This commit is contained in:
@@ -6148,11 +6148,32 @@ begin
|
||||
@param(maxm)(integer) 最大消息值 默认为空 %%
|
||||
@return(integer)0表示WM_QUIT ,-1表示错误,其他返回大于0 %%
|
||||
**}
|
||||
API := gettswin32api();
|
||||
{$ifdef linux}
|
||||
dg := API.g_main_context_default();
|
||||
if dg then
|
||||
begin
|
||||
ct := 5;
|
||||
while ct>0 do
|
||||
begin
|
||||
if API.g_main_context_pending(dg) and ct>0 then
|
||||
begin
|
||||
API.g_main_context_iteration(dg,false);
|
||||
end
|
||||
ct--;
|
||||
end
|
||||
end
|
||||
tslprocessmessages(false);
|
||||
RunWorkerThreadLoop();
|
||||
return;
|
||||
{$endif}
|
||||
|
||||
FMSG := new TTagMSG();
|
||||
ptr := FMSG._getptr_();
|
||||
API := gettswin32api();
|
||||
|
||||
///////////////////////////////////////////////
|
||||
if(API.PeekMessageA(ptr,0,0,0,0x1))then
|
||||
ct:=5;
|
||||
if(API.PeekMessageA(ptr,0,0,0,0x1)) and ct>0 then
|
||||
begin
|
||||
if FMSG.message=0x12 then
|
||||
begin
|
||||
@@ -6162,11 +6183,15 @@ begin
|
||||
API.TranslateMessage(ptr);
|
||||
API.DispatchMessageA(ptr);
|
||||
end
|
||||
ct--;
|
||||
end else
|
||||
begin
|
||||
tslprocessmessages(false);
|
||||
RunWorkerThreadLoop();
|
||||
API.WaitMessage();
|
||||
if ct>3 then
|
||||
begin
|
||||
tslprocessmessages(false);
|
||||
RunWorkerThreadLoop();
|
||||
API.WaitMessage();
|
||||
end
|
||||
end
|
||||
return -1;
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
@@ -3754,6 +3754,8 @@ type tgtkapis = class() //gtk
|
||||
function gtk_get_micro_version ():integer;cdecl;external 'libgtk-3.so';
|
||||
function gtk_get_binary_age ():integer;cdecl;external 'libgtk-3.so';
|
||||
function g_main_context_default():pointer;cdecl;external 'libgtk-3.so';
|
||||
function g_main_context_pending(gc:pointer):integer;cdecl;external 'libgtk-3.so';
|
||||
function g_main_context_iteration(gc:pointer;bk:integer):integer;cdecl;external 'libgtk-3.so';
|
||||
function g_main_context_get_poll_func(d:pointer):pointer;cdecl;external 'libgtk-3.so';
|
||||
|
||||
function gtk_main_level():integer;external 'libgtk-3.so';
|
||||
|
||||
@@ -637,6 +637,10 @@ type tcustomcheckbtn=class(tcustombtn) //checkbtn
|
||||
1:选中。
|
||||
@param(leftText)(bool)文本是否在左%%
|
||||
**}
|
||||
protected
|
||||
function PaintMouseDown();override;
|
||||
begin
|
||||
end
|
||||
private
|
||||
FleftText;
|
||||
FcheckState;
|
||||
|
||||
Reference in New Issue
Block a user