added Timer patch from Vincent Snijders

git-svn-id: trunk@1374 -
This commit is contained in:
mattias 2002-02-09 01:48:21 +00:00
parent 5e9a551598
commit f3288b80b4
4 changed files with 17 additions and 35 deletions

View File

@ -603,7 +603,7 @@ end;
procedure TApplication.HandleMessage;
begin
InterfaceObject.HandleEvents; // process all events
Idle;
if not FTerminate then Idle;
end;
{------------------------------------------------------------------------------
@ -647,8 +647,7 @@ procedure TApplication.Run;
begin
if FMainForm <> nil
then FMainForm.Show;
repeat
repeat
HandleMessage;
if Assigned(FMainForm) and (FMainForm.ModalResult = mrCancel)
then Terminate;
@ -850,6 +849,9 @@ end;
{ =============================================================================
$Log$
Revision 1.39 2002/11/23 13:48:43 mattias
added Timer patch from Vincent Snijders
Revision 1.38 2002/11/21 18:49:52 mattias
started OnMouseEnter and OnMouseLeave

View File

@ -968,11 +968,6 @@ begin
Result := false;
end;
function TInterfaceBase.KillTimer (hWnd : HWND; uIDEvent : cardinal) : boolean;
begin
Result := false;
end;
function TInterfaceBase.LineTo(DC: HDC; X, Y: Integer): Boolean;
begin
Result := False;
@ -1395,12 +1390,6 @@ begin
Result := CLR_INVALID;
end;
function TInterfaceBase.SetTimer(hWnd: HWND; nIDEvent, uElapse: integer;
lpTimerFunc: TFNTimerProc) : integer;
begin
Result := 0;
end;
function TInterfacebase.SetWindowLong(Handle: HWND;
Idx: Integer; NewLong : Longint): LongInt;
begin
@ -1471,6 +1460,9 @@ end;
{ =============================================================================
$Log$
Revision 1.68 2002/11/23 13:48:44 mattias
added Timer patch from Vincent Snijders
Revision 1.67 2002/11/12 10:16:16 lazarus
MG: fixed TMainMenu creation

View File

@ -63,7 +63,6 @@ type
constructor Create;
destructor Destroy; override;
procedure AppTerminate; virtual; abstract;
procedure DoEvents; virtual; abstract;
procedure HandleEvents; virtual; abstract;
procedure WaitMessage; virtual; abstract;
procedure Init; virtual; abstract;
@ -72,7 +71,9 @@ type
function UpdateHint(Sender: TObject): Integer; virtual; abstract;
function RecreateWnd(Sender: TObject): Integer; virtual; abstract;
function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc) : integer; virtual; abstract;
function DestroyTimer(TimerHandle: integer) : boolean; virtual; abstract;
{$DEFINE IF_BASE_MEMBER}
{$I winapih.inc}
{$UNDEF IF_BASE_MEMBER}
@ -115,6 +116,9 @@ end.
{
$Log$
Revision 1.25 2002/11/23 13:48:43 mattias
added Timer patch from Vincent Snijders
Revision 1.24 2002/10/26 15:15:46 lazarus
MG: broke LCL<->interface circles

View File

@ -204,25 +204,6 @@ begin
SetComboBoxText(ComboWidget,PChar(ComboBox.Items[Index]));
end;
{------------------------------------------------------------------------------
function IndexOfTimer(Handle: HWnd; uIDEvent: integer): integer;
------------------------------------------------------------------------------}
function IndexOfTimer(Handle: HWnd; uIDEvent: integer): integer;
var
PTimerInfo: PGtkITimerinfo;
begin
if (FTimerData<>nil) and (Handle<>0) then begin
Result:=FTimerData.Count-1;
while Result>=0 do begin
PTimerInfo:=PGtkITimerinfo(FTimerData[Result]);
if (PTimerInfo^.Handle=Handle) and (PTimerInfo^.IDEvent=uIDEvent) then
break;
end;
end else begin
Result:=-1;
end;
end;
{------------------------------------------------------------------------------
function GtkPaintMessageToPaintMessage(GtkPaintMsg: TLMGtkPaint): TLMPaint;
@ -3950,6 +3931,9 @@ end;
{ =============================================================================
$Log$
Revision 1.150 2002/11/23 13:48:46 mattias
added Timer patch from Vincent Snijders
Revision 1.149 2002/11/09 18:13:35 lazarus
MG: fixed gdkwindow checks