mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 14:39:24 +02:00
fix pointer type conversions
git-svn-id: trunk@10039 -
This commit is contained in:
parent
2f4f4bf6fa
commit
a4bd9f7713
@ -143,8 +143,8 @@ begin
|
||||
l:=length(s);
|
||||
SetLength(Result,l);
|
||||
if l>0 then begin
|
||||
pDest:=@Result[1];
|
||||
pSrc:=@s[1];
|
||||
pDest:=PWord(@Result[1]);
|
||||
pSrc:=PWord(@s[1]);
|
||||
l2:=(l shr 1)-1;
|
||||
for i:=0 to l2 do
|
||||
pDest[i]:=UpWords[pSrc[i]];
|
||||
|
@ -4125,7 +4125,7 @@ var
|
||||
// read all property infos of current class
|
||||
TypeData:=GetTypeData(TypeInfo);
|
||||
// skip unitname
|
||||
PropInfo:=(@TypeData^.UnitName+Length(TypeData^.UnitName)+1);
|
||||
PropInfo:=PPropInfo(@TypeData^.UnitName+Length(TypeData^.UnitName)+1);
|
||||
// read property count
|
||||
CurCount:=PWord(PropInfo)^;
|
||||
inc(PtrInt(PropInfo),SizeOf(Word));
|
||||
|
@ -154,7 +154,7 @@ begin
|
||||
{$IFdef MSWindows}
|
||||
var
|
||||
PipeHandle: Integer;
|
||||
TotalBytesAvailable: integer;
|
||||
TotalBytesAvailable: dword;
|
||||
R: LongBool;
|
||||
n: integer;
|
||||
begin
|
||||
|
@ -1356,7 +1356,7 @@ procedure TGDBMIDebugger.InterruptTarget;
|
||||
if hThread = 0
|
||||
then begin
|
||||
E := GetLastError;
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_ALLOCATE_BUFFER, nil, E, 0, @Emsg, 0, nil);
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_ALLOCATE_BUFFER, nil, E, 0, PChar(@Emsg), 0, nil);
|
||||
DebugLN('Error creating remote thread: ' + String(EMsg));
|
||||
// Yuck !
|
||||
// mixing handles and pointers, but it is how MS documented it
|
||||
|
@ -447,7 +447,7 @@ begin
|
||||
Result:=Result+' UnitName="'+TypeData^.UnitName+'"';
|
||||
|
||||
// skip unitname
|
||||
PropInfo:=(@TypeData^.UnitName+Length(TypeData^.UnitName)+1);
|
||||
PropInfo:=PPropInfo(@TypeData^.UnitName+Length(TypeData^.UnitName)+1);
|
||||
// read property count
|
||||
CurCount:=PWord(PropInfo)^;
|
||||
Result:=Result+' CurPropCnt='+IntToStr(CurCount);
|
||||
@ -488,14 +488,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
Result:=Result+'}';
|
||||
FieldInfo := @FieldTable^.Fields;
|
||||
FieldInfo := @FieldTable^.Fields[0];
|
||||
Result := Result + ' Fields={';
|
||||
for i := 0 to FieldTable^.FieldCount-1 do begin
|
||||
if i > 0 then Result:=Result+',';
|
||||
Result := Result + IntToStr(i)
|
||||
+ ':Name="' + FieldInfo^.Name + '"'
|
||||
+ ':Offset=' +IntToStr(FieldInfo^.FieldOffset);
|
||||
FieldInfo := @FieldInfo^.Name + 1 + Length(FieldInfo^.Name);
|
||||
FieldInfo := PFieldInfo(@FieldInfo^.Name + 1 + Length(FieldInfo^.Name));
|
||||
{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||
FieldInfo := Align(FieldInfo, SizeOf(Pointer));
|
||||
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||
|
@ -1478,7 +1478,7 @@ begin
|
||||
// read all property infos of current class
|
||||
TypeData:=GetTypeData(TypeInfo);
|
||||
// skip unitname
|
||||
PropInfo:=(@TypeData^.UnitName+Length(TypeData^.UnitName)+1);
|
||||
PropInfo:=PPropInfo(@TypeData^.UnitName+Length(TypeData^.UnitName)+1);
|
||||
// read property count
|
||||
CurCount:=PWord(PropInfo)^;
|
||||
inc(PtrInt(PropInfo),SizeOf(Word));
|
||||
@ -1610,7 +1610,7 @@ begin
|
||||
PropData:=AlignToPtr(Pointer(@TypeData^.UnitName)+Length(TypeData^.UnitName)+1);
|
||||
// read property count
|
||||
CurCount:=PropData^.PropCount;
|
||||
PropInfo:=@PropData^.PropList;
|
||||
PropInfo:=PPropInfo(@PropData^.PropList);
|
||||
|
||||
{writeln('TPropInfoList.Create D ',CurCount,' TypeData^.ClassType=',DbgS(TypeData^.ClassType));
|
||||
writeln('TPropInfoList.Create E ClassName="',TypeData^.ClassType.ClassName,'"',
|
||||
|
@ -194,7 +194,7 @@ begin
|
||||
Move(TrimmedXPM[1],Result[LineCount+1],DestPos);
|
||||
|
||||
// calculate the array of PChar
|
||||
LineStart:=@Result[LineCount+1];
|
||||
LineStart:=PChar(@Result[LineCount+1]);
|
||||
for CurLine:=0 to LineCount-1 do begin
|
||||
LineLen:=StrLen(LineStart)+1;
|
||||
Result[CurLine]:=LineStart;
|
||||
|
@ -2171,7 +2171,8 @@ end;
|
||||
procedure TTreeNodes.ReadData(Stream: TStream);
|
||||
var
|
||||
I, NewCount, MagicNumber: Integer;
|
||||
NodeInfo: TDelphiNodeInfo;
|
||||
NodeInfo: TTreeNodeInfo;
|
||||
DelphiNodeInfo: TDelphiNodeInfo;
|
||||
StreamVersion: word;
|
||||
begin
|
||||
Clear;
|
||||
@ -2188,14 +2189,14 @@ begin
|
||||
// delphi stream
|
||||
NewCount:=MagicNumber;
|
||||
for I := 0 to NewCount - 1 do
|
||||
Add(nil, '').ReadDelphiData(Stream, @NodeInfo);
|
||||
Add(nil, '').ReadDelphiData(Stream, @DelphiNodeInfo);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTreeNodes.WriteData(Stream: TStream);
|
||||
var
|
||||
ANode: TTreeNode;
|
||||
NodeInfo: TDelphiNodeInfo;
|
||||
NodeInfo: TTreeNodeInfo;
|
||||
MagicNumber: integer;
|
||||
begin
|
||||
// -7 for lcl stream
|
||||
|
@ -948,7 +948,7 @@ begin
|
||||
lfClipPrecision := ClipPrecision;
|
||||
lfQuality := Quality;
|
||||
lfPitchAndFamily := PitchAndFamily;
|
||||
StrLCopy(@lfFaceName, FaceName, SizeOf(lfFaceName)-1);
|
||||
StrLCopy(@lfFaceName[0], FaceName, SizeOf(lfFaceName)-1);
|
||||
end;
|
||||
|
||||
Result := CreateFontIndirect(LogFont);
|
||||
@ -1374,4 +1374,4 @@ begin
|
||||
Result := not IsRectEmpty(DestRect);
|
||||
end;
|
||||
|
||||
//##apiwiz##epi## // Do not remove
|
||||
//##apiwiz##epi## // Do not remove
|
||||
|
@ -36,7 +36,7 @@ begin
|
||||
else
|
||||
PaintMsg:=TLMPaint(TheMessage);
|
||||
Result := DeliverMessage(Target,PaintMsg) = 0;
|
||||
FinalizePaintMessage(@PaintMsg);
|
||||
FinalizePaintMessage(PLMessage(@PaintMsg));
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
@ -3049,7 +3049,7 @@ begin
|
||||
BufLength:=0;
|
||||
gdk_string_to_compound_text(P,
|
||||
@SelectionData^.{$ifdef GTK2}_Type{$ELSE}theType{$ENDIF},
|
||||
@SelectionData^.Format,@Buffer,@BufLength);
|
||||
@SelectionData^.Format,pguchar(@Buffer),@BufLength);
|
||||
StrDispose(P);
|
||||
gtk_selection_data_set(SelectionData,SelectionData^.Target,
|
||||
SelectionData^.Format,Buffer,BufLength);
|
||||
|
@ -1160,7 +1160,7 @@ begin
|
||||
GetMem(CS, CSize);
|
||||
FillChar(CS^, sizeof(TCSArr), 0);
|
||||
StrPCopy(CS^.Str, S);
|
||||
CS^.Arr[0] := @CS^.Str;
|
||||
CS^.Arr[0] := @CS^.Str[0];
|
||||
for K := 1 to 15 do begin
|
||||
CS^.Arr[K] := StrScan(CS^.Arr[K-1], #9);
|
||||
if Assigned(CS^.Arr[K])
|
||||
|
@ -55,7 +55,7 @@ begin
|
||||
NM.hdr.code := LVN_COLUMNCLICK;
|
||||
NM.iItem := -1;
|
||||
NM.iSubItem := AColumn;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AData, msg) = 0;
|
||||
end;
|
||||
|
||||
|
@ -707,7 +707,7 @@ begin
|
||||
begin
|
||||
if (List^.Data <> nil)
|
||||
then begin
|
||||
gdk_window_get_user_data(PGDKWindow(List^.Data), @Window);
|
||||
gdk_window_get_user_data(PGDKWindow(List^.Data), Pgpointer(@Window));
|
||||
if GtkWidgetIsA(PGtkWidget(Window), GTK_TYPE_WINDOW)
|
||||
and gtk_widget_visible(PGtkWidget(Window))
|
||||
then begin
|
||||
@ -2535,7 +2535,7 @@ begin
|
||||
|
||||
If (GDKWindow <> nil) then begin
|
||||
{$IFDEF Gtk1}
|
||||
if GDKWindow<>@gdk_root_window then begin
|
||||
if GDKWindow<>PGdkWindow(@gdk_root_window) then begin
|
||||
GDK_Window_Get_Size(GDKWindow,@Width,@Height);
|
||||
Visual:=gdk_window_get_visual(GDKWindow);
|
||||
end else begin
|
||||
@ -5030,7 +5030,7 @@ begin
|
||||
{$IFDEF DebugGDK}BeginGDKErrorTrap;{$ENDIF}
|
||||
Drag_Icon := gdk_pixmap_colormap_create_from_xpm_d (nil,
|
||||
gtk_widget_get_colormap (Result), Drag_Mask,
|
||||
nil, @IMGDrag_Icon);
|
||||
nil, @IMGDrag_Icon[0]);
|
||||
{$IFDEF DebugGDK}EndGDKErrorTrap;{$ENDIF}
|
||||
end;
|
||||
end else begin
|
||||
@ -5604,7 +5604,7 @@ begin
|
||||
else
|
||||
P:= gtk_radio_button_new_with_label(nil, AccelText);
|
||||
AccelKey:=gtk_label_parse_uline(
|
||||
pGtkLabel(gtk_bin_get_child(@PGTKToggleButton(P)^.Button)),
|
||||
pGtkLabel(gtk_bin_get_child(PGtkBin(@PGTKToggleButton(P)^.Button))),
|
||||
AccelText);
|
||||
Accelerate(TComponent(Sender),PGtkWidget(P),AccelKey,0,'clicked');
|
||||
StrDispose(AccelText);
|
||||
|
@ -1021,7 +1021,7 @@ begin
|
||||
XEvent.data.l[0] := Ord(AValue);// 0=Remove 1=Add 2=Toggle
|
||||
XEvent.data.l[1] := _NET_WM_STATE_ATOMS[I];
|
||||
|
||||
XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, @XEvent);
|
||||
XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, PXEvent(@XEvent));
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
@ -7375,7 +7375,7 @@ Function GetSysGCValues(Color: TColorRef;
|
||||
Result:=Widget;
|
||||
if Result=nil then exit;
|
||||
if Result^.window=nil then exit;
|
||||
gdk_window_get_user_data(Result^.window,@WindowOwnerWidget);
|
||||
gdk_window_get_user_data(Result^.window,PGPointer(@WindowOwnerWidget));
|
||||
Result:=WindowOwnerWidget;
|
||||
if Result=nil then exit;
|
||||
end;
|
||||
|
@ -1146,7 +1146,7 @@ begin
|
||||
XEvent.format := 32;
|
||||
XEvent.data.l[0] := Desktop;
|
||||
|
||||
XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, @XEvent);
|
||||
XSendEvent(XDisplay, XRootWindow, False, SubstructureNotifyMask, PXEvent(@XEvent));
|
||||
end;
|
||||
|
||||
|
||||
@ -1180,7 +1180,7 @@ begin
|
||||
XEvent.data.l[1] := CurrentTime;
|
||||
XEvent.data.l[2] := 0; // Applications current active window
|
||||
|
||||
XSendEvent(XDisplay, aXRootWindow, False, SubstructureNotifyMask, @XEvent);
|
||||
XSendEvent(XDisplay, aXRootWindow, False, SubstructureNotifyMask, PXEvent(@XEvent));
|
||||
end;
|
||||
|
||||
procedure GDK_WINDOW_MAXIMIZE(Window: PGdkWindowPrivate);
|
||||
@ -1216,7 +1216,7 @@ begin
|
||||
XEvent.data.l[1] := _NET_WM_STATE_MAXIMIZED_HORZ;
|
||||
XEvent.data.l[2] := _NET_WM_STATE_MAXIMIZED_VERT;
|
||||
|
||||
XSendEvent(XDisplay, aXRootWindow, False, SubstructureNotifyMask, @XEvent);
|
||||
XSendEvent(XDisplay, aXRootWindow, False, SubstructureNotifyMask, PXEvent(@XEvent));
|
||||
end;
|
||||
|
||||
|
||||
@ -1236,7 +1236,7 @@ var
|
||||
format: gint;
|
||||
nitems: gulong;
|
||||
bytes_after: gulong;
|
||||
windowstates: Pgint;
|
||||
windowstates: Pcuchar;
|
||||
X: Integer;
|
||||
|
||||
begin
|
||||
|
@ -1037,22 +1037,22 @@ begin
|
||||
case lbHatch of
|
||||
HS_BDIAGONAL:
|
||||
GObject^.GDIBrushPixmap := gdk_bitmap_create_from_data(
|
||||
nil, @HATCH_BDIAGONAL, 8, 8);
|
||||
nil, pgchar(@HATCH_BDIAGONAL[0]), 8, 8);
|
||||
HS_CROSS:
|
||||
GObject^.GDIBrushPixmap := gdk_bitmap_create_from_data(
|
||||
nil, @HATCH_CROSS, 8, 8);
|
||||
nil, pgchar(@HATCH_CROSS[0]), 8, 8);
|
||||
HS_DIAGCROSS:
|
||||
GObject^.GDIBrushPixmap := gdk_bitmap_create_from_data(
|
||||
nil, @HATCH_DIAGCROSS, 8, 8);
|
||||
nil, pgchar(@HATCH_DIAGCROSS[0]), 8, 8);
|
||||
HS_FDIAGONAL:
|
||||
GObject^.GDIBrushPixmap := gdk_bitmap_create_from_data(
|
||||
nil, @HATCH_FDIAGONAL, 8, 8);
|
||||
nil, pgchar(@HATCH_FDIAGONAL[0]), 8, 8);
|
||||
HS_HORIZONTAL:
|
||||
GObject^.GDIBrushPixmap := gdk_bitmap_create_from_data(
|
||||
nil, @HATCH_HORIZONTAL, 8, 8);
|
||||
nil, pgchar(@HATCH_HORIZONTAL[0]), 8, 8);
|
||||
HS_VERTICAL:
|
||||
GObject^.GDIBrushPixmap := gdk_bitmap_create_from_data(
|
||||
nil, @HATCH_VERTICAL, 8, 8);
|
||||
nil, pgchar(@HATCH_VERTICAL[0]), 8, 8);
|
||||
else
|
||||
RaiseGDBException('invalid lbHatch');
|
||||
end;
|
||||
@ -2991,7 +2991,7 @@ var
|
||||
Points[1].cY := Points[0].cY;
|
||||
|
||||
{Draw prefix line}
|
||||
Polyline(DC, @Points[0], 2);
|
||||
Polyline(DC, PPoint(@Points[0]), 2);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -4184,7 +4184,7 @@ begin
|
||||
begin
|
||||
if (List^.Data <> nil)
|
||||
then begin
|
||||
gdk_window_get_user_data(PGDKWindow(List^.Data), @Window);
|
||||
gdk_window_get_user_data(PGDKWindow(List^.Data), Pgpointer(@Window));
|
||||
if gtk_is_window(Window)
|
||||
then begin
|
||||
Widget := Window^.focus_widget;
|
||||
@ -4710,7 +4710,7 @@ function TGtkWidgetSet.GetCursorPos(var lpPoint: TPoint ): Boolean;
|
||||
{$IFDEF unix}
|
||||
var
|
||||
dpy: PDisplay;
|
||||
root, child: pointer;
|
||||
root, child: twindow;
|
||||
winx, winy: Integer;
|
||||
xmask: Cardinal;
|
||||
|
||||
@ -4721,7 +4721,7 @@ begin
|
||||
{$ENDIF}
|
||||
try
|
||||
dpy := gdk_display;
|
||||
XQueryPointer(dpy, RootWindow(dpy, DefaultScreen(dpy)), @root,@child,
|
||||
XQueryPointer(dpy, RootWindow(dpy, DefaultScreen(dpy)), @root, @child,
|
||||
@lpPoint.X,@lpPoint.Y,@winx,@winy,@xmask);
|
||||
Result := True;
|
||||
finally
|
||||
@ -4984,7 +4984,7 @@ begin
|
||||
begin
|
||||
if (List^.Data <> nil)
|
||||
then begin
|
||||
gdk_window_get_user_data(PGDKWindow(List^.Data), @Window);
|
||||
gdk_window_get_user_data(PGDKWindow(List^.Data), Pgpointer(@Window));
|
||||
|
||||
if gtk_is_window(Window)
|
||||
then begin
|
||||
@ -9552,13 +9552,13 @@ begin
|
||||
Points[0].cY := Y + 2 + DCTextMetric.TextMetric.tmHeight -
|
||||
DCTextMetric.TextMetric.tmDescent;
|
||||
Points[1].cY := Points[0].cY;
|
||||
Polyline(DC, @Points[0], 2);
|
||||
Polyline(DC, PPoint(@Points[0]), 2);
|
||||
end;
|
||||
|
||||
If StrikeOut then begin
|
||||
Points[0].cY := Y + 2 + (TxtPt.Y - Y) div 2;
|
||||
Points[1].cY := Points[0].cY;
|
||||
Polyline(DC, @Points[0], 2);
|
||||
Polyline(DC, PPoint(@Points[0]), 2);
|
||||
end;
|
||||
|
||||
DeleteObject(SelectObject(DC, TempPen));
|
||||
|
@ -67,7 +67,7 @@ end;
|
||||
|
||||
class function TGtkWSCustomCalendar.GetDateTime(const ACalendar: TCustomCalendar): TDateTime;
|
||||
var
|
||||
Year, Month, Day: word; //used for csCalendar
|
||||
Year, Month, Day: guint; //used for csCalendar
|
||||
begin
|
||||
gtk_calendar_get_date(GetGtkCalendar(ACalendar), @Year, @Month, @Day);
|
||||
//For some reason, the month is zero based.
|
||||
@ -135,4 +135,4 @@ initialization
|
||||
////////////////////////////////////////////////////
|
||||
RegisterWSComponent(TCustomCalendar, TGtkWSCustomCalendar);
|
||||
////////////////////////////////////////////////////
|
||||
end.
|
||||
end.
|
||||
|
@ -581,9 +581,9 @@ begin
|
||||
aLabel := Ampersands2Underscore(PLabel);
|
||||
Try
|
||||
gtk_label_set_text(
|
||||
pGtkLabel(gtk_bin_get_child(@PGTKToggleButton(p)^.Button)),
|
||||
pGtkLabel(gtk_bin_get_child(PGtkBin(@PGTKToggleButton(p)^.Button))),
|
||||
aLabel);
|
||||
gtk_label_parse_uline(pGtkLabel(gtk_bin_get_child(@PGTKToggleButton(p)^.Button)),
|
||||
gtk_label_parse_uline(pGtkLabel(gtk_bin_get_child(PGtkBin(@PGTKToggleButton(p)^.Button))),
|
||||
aLabel);
|
||||
Finally
|
||||
StrDispose(aLabel);
|
||||
|
@ -69,7 +69,7 @@ begin
|
||||
NM.hdr.code := LVN_COLUMNCLICK;
|
||||
NM.iItem := -1;
|
||||
NM.iSubItem := AColumn;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
end;
|
||||
|
||||
@ -89,7 +89,7 @@ begin
|
||||
NM.hdr.hwndfrom := PtrInt(AList);
|
||||
NM.hdr.code := LVN_DELETEITEM;
|
||||
NM.iItem := AnOldIdx;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
r := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
|
||||
NM.hdr.code := LVN_INSERTITEM;
|
||||
@ -114,7 +114,7 @@ begin
|
||||
NM.iSubItem := AColumn;
|
||||
NM.uNewState := LVIS_SELECTED;
|
||||
NM.uChanged := LVIF_STATE;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
end;
|
||||
|
||||
@ -132,7 +132,7 @@ begin
|
||||
NM.iSubItem := AColumn;
|
||||
NM.uOldState := LVIS_SELECTED;
|
||||
NM.uChanged := LVIF_STATE;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
end;
|
||||
|
||||
@ -152,7 +152,7 @@ begin
|
||||
NM.iSubItem := 0;
|
||||
NM.uNewState := LVIS_FOCUSED;
|
||||
NM.uChanged := LVIF_STATE;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
end;
|
||||
|
||||
@ -178,7 +178,7 @@ begin
|
||||
NM.iSubItem := -1;
|
||||
NM.uNewState := LVIS_SELECTED;
|
||||
NM.uChanged := LVIF_STATE;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
end;
|
||||
end;
|
||||
@ -205,7 +205,7 @@ begin
|
||||
NM.iSubItem := -1;
|
||||
NM.uOldState := LVIS_SELECTED;
|
||||
NM.uChanged := LVIF_STATE;
|
||||
msg.NMHdr := @NM;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AInfo^.LCLObject, msg) = 0;
|
||||
end;
|
||||
end;
|
||||
@ -625,7 +625,7 @@ var
|
||||
Mask: PGdkBitmap;
|
||||
Spacing: guint8;
|
||||
Text: PChar;
|
||||
Dummy1, Dummy2: Pointer;
|
||||
Dummy1, Dummy2: PGdkBitmap;
|
||||
CellType: TGtkCellType;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ALV, 'ItemSetImage')
|
||||
@ -768,7 +768,7 @@ var
|
||||
Pixmap: PGdkPixmap;
|
||||
Mask: PGdkBitmap;
|
||||
Spacing: guint8;
|
||||
Dummy: Pointer;
|
||||
Dummy: pgchar;
|
||||
CellType: TGtkCellType;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ALV, 'ItemSetText')
|
||||
|
@ -982,7 +982,7 @@ class procedure TGtkWSCustomMemo.AppendText(const ACustomMemo: TCustomMemo;
|
||||
const AText: string);
|
||||
var
|
||||
Widget: PGtkWidget;
|
||||
CurMemoLen: cardinal;
|
||||
CurMemoLen: gint;
|
||||
begin
|
||||
if Length(AText) = 0 then
|
||||
exit;
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
Unit Win32Int;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$mode objfpc}{$H+}{$T-}{$message warning Fix implicit pointer conversions}
|
||||
|
||||
Interface
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ begin
|
||||
if Window = PDisableWindowsInfo(Data)^.NewModalWindow then exit;
|
||||
|
||||
// Don't disable any ComboBox listboxes
|
||||
if (GetClassName(Window, @Buffer, sizeof(Buffer))<sizeof(Buffer))
|
||||
if (GetClassName(Window, @Buffer[0], sizeof(Buffer))<sizeof(Buffer))
|
||||
and (StrIComp(Buffer, 'ComboLBox')=0) then exit;
|
||||
|
||||
if not IsWindowVisible(Window) or not IsWindowEnabled(Window) then exit;
|
||||
|
@ -280,7 +280,7 @@ begin
|
||||
// customization of Params
|
||||
with Params do
|
||||
begin
|
||||
pClassName := @ClsName;
|
||||
pClassName := @ClsName[0];
|
||||
WindowTitle := StrCaption;
|
||||
SubClassWndProc := nil;
|
||||
end;
|
||||
|
@ -128,7 +128,7 @@ begin
|
||||
|
||||
// Fetch old column values
|
||||
oldlvc.lvc.Mask := LVCF_FMT or LVCF_IMAGE or LVCF_TEXT or LVCF_WIDTH;
|
||||
oldlvc.lvc.pszText := @oldbuf;
|
||||
oldlvc.lvc.pszText := @oldbuf[0];
|
||||
oldlvc.lvc.cchTextMax := SizeOF(oldbuf);
|
||||
ListView_GetColumn(ALV.Handle, AOldIndex, oldlvc.lvc);
|
||||
|
||||
@ -141,7 +141,7 @@ begin
|
||||
else Dec(idx);
|
||||
// and data
|
||||
lvc.lvc.Mask := LVCF_FMT or LVCF_IMAGE or LVCF_TEXT or LVCF_WIDTH;
|
||||
lvc.lvc.pszText := @buf;
|
||||
lvc.lvc.pszText := @buf[0];
|
||||
lvc.lvc.cchTextMax := SizeOF(buf);
|
||||
ListView_GetColumn(ALV.Handle, idx, lvc.lvc);
|
||||
// set data
|
||||
@ -557,7 +557,7 @@ var
|
||||
dwStyle: PtrInt;
|
||||
rc: TRect;
|
||||
hdLayout: THDLAYOUT;
|
||||
wpos: TWINDOWPOS;
|
||||
wpos: Windows.TWINDOWPOS;
|
||||
begin
|
||||
dwStyle := GetWindowLong(AHandle, GWL_STYLE);
|
||||
|
||||
|
@ -178,7 +178,7 @@ begin
|
||||
LStructSize := sizeof(TChooseColor);
|
||||
HWndOwner := GetOwnerHandle(ACommonDialog);
|
||||
RGBResult := ColorToRGB(TColorDialog(ACommonDialog).Color);
|
||||
LPCustColors := @CustomColors;
|
||||
LPCustColors := @CustomColors[1];
|
||||
Flags := CC_FULLOPEN or CC_RGBINIT;
|
||||
end;
|
||||
UserResult := ChooseColor(@CC);
|
||||
@ -490,7 +490,7 @@ begin
|
||||
begin
|
||||
LStructSize := sizeof(TChooseFont);
|
||||
HWndOwner := GetOwnerHandle(ACommonDialog);
|
||||
LPLogFont := @LF;
|
||||
LPLogFont := Windows.LPLOGFONT(@LF);
|
||||
Flags := GetFlagsFromOptions(Options);
|
||||
Flags := Flags or CF_INITTOLOGFONTSTRUCT or CF_BOTH;
|
||||
RGBColors := Font.Color;
|
||||
|
@ -297,7 +297,7 @@ begin
|
||||
// customization of Params
|
||||
with Params do
|
||||
begin
|
||||
pClassName := @ClsName;
|
||||
pClassName := @ClsName[0];
|
||||
Flags := Flags and not WS_VISIBLE;
|
||||
SubClassWndProc := nil;
|
||||
end;
|
||||
@ -580,7 +580,7 @@ begin
|
||||
// customization of Params
|
||||
with Params do
|
||||
begin
|
||||
pClassName := @ClsName;
|
||||
pClassName := @ClsName[0];
|
||||
SubClassWndProc := nil;
|
||||
end;
|
||||
// create window
|
||||
|
@ -147,7 +147,7 @@ begin
|
||||
begin
|
||||
//TODO: Make control respond to user scroll request
|
||||
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;
|
||||
pClassName := @ClsName;
|
||||
pClassName := @ClsName[0];
|
||||
Flags := Flags or WS_HSCROLL or WS_VSCROLL;
|
||||
SubClassWndProc := nil;
|
||||
end;
|
||||
@ -215,7 +215,7 @@ begin
|
||||
begin
|
||||
lForm := TCustomForm(AWinControl);
|
||||
CalcFormWindowFlags(lForm, Flags, FlagsEx);
|
||||
pClassName := @ClsName;
|
||||
pClassName := @ClsName[0];
|
||||
WindowTitle := StrCaption;
|
||||
Left := LongInt(CW_USEDEFAULT);
|
||||
Top := LongInt(CW_USEDEFAULT);
|
||||
@ -322,7 +322,7 @@ begin
|
||||
// customization of Params
|
||||
with Params do
|
||||
begin
|
||||
pClassName := @ClsName;
|
||||
pClassName := @ClsName[0];
|
||||
WindowTitle := StrCaption;
|
||||
Flags := dword(WS_POPUP);
|
||||
FlagsEx := FlagsEx or WS_EX_TOOLWINDOW;
|
||||
|
@ -359,7 +359,7 @@ begin
|
||||
// the bug is hidden. Use 'ParentPanel' property of groupbox window
|
||||
// to determine reference to this parent panel
|
||||
// do not use 'ParentPanel' property for other controls!
|
||||
Buddy := CreateWindowEx(0, @ClsName, nil, WS_CHILD or WS_CLIPCHILDREN or
|
||||
Buddy := CreateWindowEx(0, @ClsName[0], nil, WS_CHILD or WS_CLIPCHILDREN or
|
||||
WS_CLIPSIBLINGS or (Flags and WS_VISIBLE),
|
||||
Left, Top, Width, Height, Parent, 0, HInstance, nil);
|
||||
Left := 0;
|
||||
|
Loading…
Reference in New Issue
Block a user