mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:39:28 +02:00
Implements threading synchronize on wince.
git-svn-id: trunk@13005 -
This commit is contained in:
parent
1d3c957dcb
commit
f30565766c
@ -165,6 +165,8 @@ type
|
||||
function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc) : THandle; override;
|
||||
function DestroyTimer(TimerHandle: THandle) : boolean; override;
|
||||
|
||||
// thread synchronize support
|
||||
procedure HandleWakeMainThread(Sender: TObject);
|
||||
|
||||
|
||||
{$I wincewinapih.inc}
|
||||
|
@ -142,7 +142,7 @@ begin
|
||||
FMessageFont := Windows.CreateFontIndirect(@FMetrics.lfMessageFont);
|
||||
end;
|
||||
|
||||
// Create parent of all windows, `button on taskbar'
|
||||
// Create parent of all windows, 'button on taskbar'
|
||||
//does this work on wince?!
|
||||
FAppHandle := CreateWindow(@ClsName, StringToPWideChar(Application.Title),
|
||||
WS_POPUP or WS_CLIPSIBLINGS or WS_CAPTION or WS_SYSMENU or WS_MINIMIZEBOX,
|
||||
@ -173,9 +173,8 @@ begin
|
||||
ScreenInfo.ColorDepth := GetDeviceCaps(DC, BITSPIXEL);
|
||||
ReleaseDC(Handle, DC);
|
||||
|
||||
//roozbeh:what is this?!!
|
||||
// Thread.Synchronize support
|
||||
//WakeMainThread := @HandleWakeMainThread;
|
||||
WakeMainThread := @HandleWakeMainThread;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -494,7 +493,11 @@ begin
|
||||
Assert(False,'Trace:Destroy timer Result: '+ BOOL_RESULT[result]);
|
||||
end;
|
||||
|
||||
|
||||
procedure TWinCEWidgetSet.HandleWakeMainThread(Sender: TObject);
|
||||
begin
|
||||
// wake up GUI thread by sending a message to it
|
||||
Windows.PostMessage(AppHandle, WM_NULL, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TWinCEWidgetSet.AttachMenuToWindow(AMenuObject: TComponent);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user