* Fixed some syntax errors for the latest 1.0.5 compiler

git-svn-id: trunk@289 -
This commit is contained in:
lazarus 2001-06-14 23:13:30 +00:00
parent d175a3aca2
commit 1e8f005ddf
9 changed files with 65 additions and 38 deletions

View File

@ -352,10 +352,10 @@ end;
{$ENDIF}
{$IFNDEF HE_COMPAREMEM}
{$IFDEF FPC}
{$IFDEF SYN_LAZARUS}
function CompareMem(P1, P2: Pointer; Length: Integer): Boolean;
begin
Result:=CompareByte(P1^,P2^,Length)=0;
Result := CompareByte(P1^, P2^, Length) = 0;
end;
{$ELSE}
function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
@ -480,13 +480,8 @@ begin
for i := 0 to FFontsInfo.Count - 1 do
begin
Result := PheSharedFontsInfo(FFontsInfo[i]);
{$IFDEF FPC}
if CompareByte(Result^.BaseLF, LF, SizeOf(TLogFont))=0 then
Exit;
{$ELSE}
if CompareMem(@(Result^.BaseLF), @LF, SizeOf(TLogFont)) then
Exit;
{$ENDIF}
end;
Result := nil;
end;

View File

@ -2507,7 +2507,7 @@ begin
with DisplayPreview do begin
Name:='DisplayPreview';
Parent:=MainNoteBook.Page[1];
BorderStyle:=bsSizeable;
BorderStyle:=bsSingle;
Top:=EditorFontGroupBox.Top+EditorFontGroupBox.Height+5;
Left:=EditorFontGroupBox.Left+2;
Width:=EditorFontGroupBox.Width-2;

View File

@ -298,7 +298,7 @@ Begin
Result := True;
end;
function TInterfaceBase.ReleaseDC(hWnd: HWND; hDC: HDC): Integer;
function TInterfaceBase.ReleaseDC(hWnd: HWND; DC: HDC): Integer;
begin
Result := 0;
end;
@ -401,7 +401,7 @@ begin
Result := -1;
end;
Function TInterfaceBase.SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; Var lpPoint : TPoint) : Boolean;
Function TInterfaceBase.SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; var Point: TPoint) : Boolean;
Begin
Result := False;
end;
@ -448,6 +448,10 @@ end;
{ =============================================================================
$Log$
Revision 1.15 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.14 2001/04/06 22:25:14 lazarus
* TTimer uses winapi-interface now instead of sendmessage-interface, stoppok

View File

@ -512,7 +512,7 @@ end;
procedure TToolBar.UpdateButtons;
const
BlankButton: TTBButton = (iBitmap: 0; idCommand: 0; fsState: 0;
fsStyle: TBSTYLE_BUTTON; dwData: 0; iString: 0);
fsStyle: TBSTYLE_BUTTON; bReserved: (0, 0); dwData: 0; iString: 0);
var
I: Integer;
Count: Integer;
@ -1465,6 +1465,10 @@ end;
{ =============================================================================
$Log$
Revision 1.4 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.3 2001/06/14 14:57:58 lazarus
MG: small bugfixes and less notes

View File

@ -401,13 +401,12 @@ begin
Result := InterfaceObject.SetWindowLong(handle, Idx, NewLong);
end;
Function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; Var lpPoint : TPoint) : Boolean;
function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; var Point: TPoint) : Boolean;
begin
Result := InterfaceObject.SetWindowOrgEx(dc,NewX,NewY,lpPoint);
Result := InterfaceObject.SetWindowOrgEx(dc, NewX, NewY, Point);
end;
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND;
X, Y, cx, cy: Integer; uFlags: UINT): Boolean;
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND; X, Y, cx, cy: Integer; uFlags: UINT): Boolean;
begin
Result:=false;
end;
@ -981,6 +980,10 @@ end;
{ =============================================================================
$Log$
Revision 1.14 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.13 2001/04/06 22:25:14 lazarus
* TTimer uses winapi-interface now instead of sendmessage-interface, stoppok

View File

@ -100,7 +100,7 @@ function PostMessage(hWnd: HWND; Msg: Cardinal; wParam: LongInt; lParam: LongInt
function RealizePalette(DC: HDC): Cardinal; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function ReleaseCapture : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function ReleaseDC(hWnd: HWND; hDC: HDC): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function ReleaseDC(hWnd: HWND; DC: HDC): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function SaveDC(DC: HDC): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
@ -126,7 +126,7 @@ Function SetTextCharacterExtra(_hdc : hdc; nCharExtra : Integer):Integer; {$IFDE
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function SetTimer(hWnd: HWND; nIDEvent, uElapse: integer; lpTimerFunc: TFNTimerProc) : integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function SetWindowLong(Handle: HWND; Idx: Integer; NewLong : Longint): Longint;{$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; Var Point : TPoint): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; var Point: TPoint): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND;
X, Y, cx, cy: Integer; uFlags: UINT): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function ShowCaret(hWnd: HWND): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
@ -226,6 +226,10 @@ function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): Boolean
{ =============================================================================
$Log$
Revision 1.11 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.10 2001/04/06 22:25:14 lazarus
* TTimer uses winapi-interface now instead of sendmessage-interface, stoppok

View File

@ -3295,13 +3295,13 @@ begin
Assert(False, Format('Trace:< [TgtkObject.SETWINDOWLONG] HWND: 0x%x, idx: 0x%x(%d), Value: 0x%x(%d) --> 0x%x(%d)', [Handle, idx, idx, newlong, newlong, Result, Result]));
end;
Function TgtkObject.SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; Var lpPoint : TPoint) : Boolean;
Function TgtkObject.SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; var Point: TPoint) : Boolean;
begin
//writeln('[TgtkObject.SetWindowOrgEx] ',NewX,' ',NewY);
// ToDo: move origin
lpPoint.X := NewX;
lpPoint.Y := NewY;
Point.X := NewX;
Point.Y := NewY;
Result := True;
end;
@ -3520,6 +3520,10 @@ end;
{ =============================================================================
$Log$
Revision 1.37 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.36 2001/06/14 14:57:59 lazarus
MG: small bugfixes and less notes

View File

@ -73,7 +73,7 @@ function PostMessage(hWnd: HWND; Msg: Cardinal; wParam: LongInt; lParam: LongInt
function RealizePalette(DC: HDC): Cardinal; override;
function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; override;
Function ReleaseCapture : Boolean; override;
function ReleaseDC(hWnd: HWND; hDC: HDC): Integer; override;
function ReleaseDC(hWnd: HWND; DC: HDC): Integer; override;
function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; override;
function SaveDC(DC: HDC): Integer; override;
@ -94,7 +94,7 @@ Function SetTextCharacterExtra(_hdc : hdc; nCharExtra : Integer):Integer; overri
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
function SetTimer(hWnd: HWND; nIDEvent, uElapse: integer; lpTimerFunc: TFNTimerProc) : integer; override;
function SetWindowLong(Handle: HWND; Idx: Integer; NewLong : Longint): LongInt;
function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; Var lpPoint : TPoint) : Boolean; override;
function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; var Point: TPoint) : Boolean; override;
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND;
X, Y, cx, cy: Integer; uFlags: UINT): Boolean; override;
function ShowCaret(hWnd: HWND): Boolean; override;
@ -111,6 +111,10 @@ Function WindowFromPoint(Point : TPoint) : HWND; override;
{ =============================================================================
$Log$
Revision 1.15 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.14 2001/04/06 22:25:15 lazarus
* TTimer uses winapi-interface now instead of sendmessage-interface, stoppok

View File

@ -198,7 +198,8 @@ begin
Result := gtk_False;
end;
procedure GTKAPIWidgetClient_ClassInit(theClass: PGTKAPIWidgetClientClass);cdecl;
procedure GTKAPIWidgetClient_ClassInit(theClass: Pointer);cdecl;
// theClass: PGTKAPIWidgetClientClass
var
ObjectClass: PGTKObjectClass;
WidgetClass: PGTKWidgetClass;
@ -211,7 +212,7 @@ begin
'set_scroll_adjustments',
GTK_RUN_FIRST,
ObjectClass^.thetype,
(@theClass^.set_scroll_adjustments - Pointer(theClass)),
(@PGTKAPIWidgetClientClass(theClass)^.set_scroll_adjustments - Pointer(theClass)),
@gtk_marshal_NONE__POINTER_POINTER,
GTK_TYPE_NONE,
2,
@ -228,15 +229,17 @@ begin
focus_out_event := @GTKAPIWidgetClient_FocusOut;
end;
theClass^.set_scroll_adjustments := nil;
PGTKAPIWidgetClientClass(theClass)^.set_scroll_adjustments := nil;
end;
procedure GTKAPIWidgetClient_Init(Client: PGTKAPIWidgetClient;
theClass: PGTKAPIWidgetClientClass); cdecl;
procedure GTKAPIWidgetClient_Init(Client, theClass: Pointer); cdecl;
// Client: PGTKAPIWidgetClient
// theClass: PGTKAPIWidgetClientClass
begin
gtk_widget_set_flags(PGTKWidget(Client), GTK_CAN_FOCUS);
with Client^.Caret do begin
with PGTKAPIWidgetClient(Client)^.Caret do
begin
Visible := False;
IsDrawn := False;
Blinking := True;
@ -449,37 +452,39 @@ begin
end;
procedure GTKAPIWidget_ClassInit(wawClass: PGTKAPIWidgetClass); cdecl;
procedure GTKAPIWidget_ClassInit(wawClass: Pointer); cdecl;
//wawClass: PGTKAPIWidgetClass
var
// ObjectClass: PGTKObjectClass;
WidgetClass: PGTKWidgetClass;
begin
// ObjectClass := PGTKObjectClass(wawClass);
WidgetClass := PGTKWidgetClass(wawClass);
WidgetClass^.focus_in_event := @GTKAPIWidget_FocusIn;
WidgetClass^.focus_out_event := @GTKAPIWidget_FocusOut;
end;
procedure GTKAPIWidget_Init(waw: PGTKAPIWidget;
theClass: PGTKAPIWidgetClass); cdecl;
procedure GTKAPIWidget_Init(waw, theClass: Pointer); cdecl;
// waw: PGTKAPIWidget;
// theClass: PGTKAPIWidgetClass
var
Widget: PGTKWidget;
APIWidget: PGTKAPIWidget;
begin
Widget := PGTKWidget(waw);
APIWidget := PGTKAPIWidget(waw);
gtk_widget_set_flags(Widget, GTK_CAN_FOCUS);
waw^.Client := GTKAPIWidgetClient_New;
gtk_object_set_data(PGTKObject(Widget), 'Fixed', waw^.Client);
gtk_object_set_data(PGTKObject(waw^.Client), 'Main', Widget);
gtk_widget_show(waw^.Client);
APIWidget^.Client := GTKAPIWidgetClient_New;
gtk_object_set_data(PGTKObject(Widget), 'Fixed', APIWidget^.Client);
gtk_object_set_data(PGTKObject(APIWidget^.Client), 'Main', Widget);
gtk_widget_show(APIWidget^.Client);
writeln('(gtkwinapiwindow.pp) GTKAPIWidget_Init B check this:');
// MG: range check GTK-Critical warnings results possibly from
// function GTKAPIwidget_new.
// ToDo: check nil parameters
gtk_container_add(PGTKContainer(Widget), waw^.Client);
gtk_container_add(PGTKContainer(Widget), APIWidget^.Client);
writeln('GTKAPIWidget_Init END');
end;
@ -569,6 +574,10 @@ end.
{ =============================================================================
$Log$
Revision 1.9 2001/06/14 23:13:30 lazarus
MWE:
* Fixed some syntax errors for the latest 1.0.5 compiler
Revision 1.8 2001/06/12 18:31:01 lazarus
MG: small bugfixes