mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 10:20:55 +02:00
* first 64bit changes
git-svn-id: trunk@6752 -
This commit is contained in:
parent
2618472530
commit
7c3a95c570
@ -34,6 +34,7 @@ unit ComCtrls;
|
||||
{$mode objfpc}
|
||||
{$H+}
|
||||
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@ -1896,7 +1897,6 @@ type
|
||||
//procedure EditWndProc(var Message: TLMessage);
|
||||
function GetAutoExpand: boolean;
|
||||
function GetBottomItem: TTreeNode;
|
||||
function GetChangeDelay: Integer;
|
||||
function GetDropTarget: TTreeNode;
|
||||
function GetHideSelection: boolean;
|
||||
function GetHotTrack: boolean;
|
||||
@ -1916,7 +1916,6 @@ type
|
||||
procedure SetAutoExpand(Value: Boolean);
|
||||
procedure SetBackgroundColor(Value: TColor);
|
||||
procedure SetBottomItem(Value: TTreeNode);
|
||||
procedure SetChangeDelay(Value: Integer);
|
||||
procedure SetDefaultItemHeight(Value: integer);
|
||||
procedure SetExpandSignType(Value: TTreeViewExpandSignType);
|
||||
procedure SetDropTarget(Value: TTreeNode);
|
||||
@ -2021,7 +2020,6 @@ type
|
||||
protected
|
||||
property AutoExpand: Boolean read GetAutoExpand write SetAutoExpand default False;
|
||||
property BorderStyle default bsSingle;
|
||||
property ChangeDelay: Integer read GetChangeDelay write SetChangeDelay default 0;
|
||||
property HideSelection: Boolean
|
||||
read GetHideSelection write SetHideSelection default True;
|
||||
property HotTrack: Boolean read GetHotTrack write SetHotTrack default False;
|
||||
@ -2133,7 +2131,6 @@ type
|
||||
property BackgroundColor;
|
||||
property BorderStyle;
|
||||
property BorderWidth;
|
||||
property ChangeDelay;
|
||||
property Color;
|
||||
property Ctl3D;
|
||||
property Constraints;
|
||||
@ -2297,6 +2294,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.162 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.161 2005/01/28 16:45:43 mattias
|
||||
added TTreeView.OnCustomCreateItem from Andre Haines
|
||||
|
||||
|
@ -180,7 +180,7 @@ type
|
||||
YPos: SmallInt);
|
||||
1: (
|
||||
Pos: TSmallPoint;
|
||||
Result: LongInt);
|
||||
Result: LRESULT);
|
||||
end;
|
||||
|
||||
TCMHitTest = TLMNCHitTest;
|
||||
@ -189,7 +189,7 @@ type
|
||||
Msg: Cardinal;
|
||||
Control: TControl;
|
||||
Inserting: Boolean;
|
||||
Result: Longint;
|
||||
Result: LRESULT;
|
||||
End;
|
||||
|
||||
TCMDialogChar = TLMKEY;
|
||||
@ -397,7 +397,7 @@ type
|
||||
Reserved1: Byte; // for Delphi compatibility
|
||||
Reserved2: Word; // for Delphi compatibility
|
||||
DragRec: PDragRec;
|
||||
Result: Longint;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TDragObject = class(TObject)
|
||||
@ -1158,7 +1158,7 @@ type
|
||||
function GetTextBuf(Buffer: PChar; BufSize: Integer): Integer; virtual;
|
||||
function GetTextLen: Integer; virtual;
|
||||
Procedure SetTextBuf(Buffer: PChar); virtual;
|
||||
Function Perform(Msg:Cardinal; WParam: WParam; LParam: LParam): LongInt;
|
||||
Function Perform(Msg:Cardinal; WParam: WParam; LParam: LParam): LRESULT;
|
||||
Function ScreenToClient(const APoint: TPoint): TPoint;
|
||||
Function ClientToScreen(const APoint: TPoint): TPoint;
|
||||
Function ScreenToControl(const APoint: TPoint): TPoint;
|
||||
@ -2899,6 +2899,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.280 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.279 2005/02/03 15:10:22 micha
|
||||
implement shortcut handling, tcustomlabel accelerator focuscontrol functionality
|
||||
|
||||
|
@ -71,7 +71,7 @@ type
|
||||
|
||||
TCommonDialog = class(TLCLComponent)
|
||||
private
|
||||
FHandle : integer;
|
||||
FHandle : THandle;
|
||||
FHeight: integer;
|
||||
FWidth: integer;
|
||||
FOnCanClose: TCloseQueryEvent;
|
||||
@ -79,7 +79,7 @@ type
|
||||
FTitle : string;
|
||||
FUserChoice: integer;
|
||||
FHelpContext: THelpContext;
|
||||
procedure SetHandle(const AValue: integer);
|
||||
procedure SetHandle(const AValue: THandle);
|
||||
procedure SetHeight(const AValue: integer);
|
||||
procedure SetWidth(const AValue: integer);
|
||||
protected
|
||||
@ -88,7 +88,7 @@ type
|
||||
FCompStyle : LongInt;
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
function Execute: boolean; virtual;
|
||||
property Handle: integer read FHandle write SetHandle;
|
||||
property Handle: THandle read FHandle write SetHandle;
|
||||
property Title: string read FTitle write FTitle;
|
||||
property UserChoice: integer read FUserChoice write FUserChoice;
|
||||
procedure Close; virtual;
|
||||
@ -423,6 +423,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.59 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.58 2005/01/27 19:03:51 mattias
|
||||
added QuestionDlg - a MessageDlg with custom buttons
|
||||
|
||||
|
10
lcl/forms.pp
10
lcl/forms.pp
@ -792,6 +792,8 @@ type
|
||||
TIdleEvent = procedure (Sender: TObject; var Done: Boolean) of object;
|
||||
TOnUserInputEvent = procedure(Sender: TObject; Msg: Cardinal) of object;
|
||||
|
||||
//TODO: move to LMessages ?
|
||||
|
||||
// application hint stuff
|
||||
PHintInfo = ^THintInfo;
|
||||
THintInfo = record
|
||||
@ -810,16 +812,16 @@ type
|
||||
|
||||
TCMHintShow = record
|
||||
Msg: Cardinal;
|
||||
Reserved: Integer;
|
||||
Reserved: WPARAM;
|
||||
HintInfo: PHintInfo;
|
||||
Result: Integer;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TCMHintShowPause = record
|
||||
Msg: Cardinal;
|
||||
WasActive: Integer;
|
||||
Pause: PInteger;
|
||||
Result: Integer;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TAppHintTimerType = (ahtNone, ahtShowHint, ahtHideHint, ahtReshowHint);
|
||||
@ -1261,7 +1263,7 @@ end;
|
||||
// anything, I just map the Integer to the TFocusState.
|
||||
function SaveFocusState: TFocusState;
|
||||
begin
|
||||
Result := TFocusState(FocusCount);
|
||||
Result := TFocusState(PtrInt(FocusCount));
|
||||
end;
|
||||
|
||||
procedure RestoreFocusState(FocusState: TFocusState);
|
||||
|
@ -1592,7 +1592,7 @@ procedure TCustomGrid.Setrowheights(Arow: Integer; Avalue: Integer);
|
||||
begin
|
||||
if AValue<0 then AValue:=-1;
|
||||
if AValue<>Integer(FRows[ARow]) then begin
|
||||
FRows[ARow]:=Pointer(AValue);
|
||||
FRows[ARow]:=Pointer(PtrInt(AValue));
|
||||
VisualChange;
|
||||
if (FEditor<>nil)and(Feditor.Visible)and(ARow<=FRow) then EditorPos;
|
||||
RowHeightsChanged;
|
||||
@ -1614,7 +1614,7 @@ end;
|
||||
|
||||
procedure TCustomGrid.SetRawColWidths(ACol: Integer; AValue: Integer);
|
||||
begin
|
||||
FCols[ACol]:=Pointer(Avalue);
|
||||
FCols[ACol]:=Pointer(PtrInt(Avalue));
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.AdjustCount(IsColumn: Boolean; OldValue, newValue: Integer);
|
||||
@ -1832,7 +1832,7 @@ var
|
||||
FGCache.GridWidth:=0;
|
||||
FGCache.FixedWidth:=0;
|
||||
For i:=0 To ColCount-1 do begin
|
||||
FGCache.AccumWidth[i]:=Pointer(FGCache.GridWidth);
|
||||
FGCache.AccumWidth[i]:=Pointer(PtrInt(FGCache.GridWidth));
|
||||
FGCache.GridWidth:=FGCache.GridWidth + GetColWidths(i);
|
||||
if i<FixedCols then FGCache.FixedWidth:=FGCache.GridWidth;
|
||||
{$IfDef dbgVisualChange}
|
||||
@ -1842,7 +1842,7 @@ var
|
||||
FGCache.Gridheight:=0;
|
||||
FGCache.FixedHeight:=0;
|
||||
For i:=0 To RowCount-1 do begin
|
||||
FGCache.AccumHeight[i]:=Pointer(FGCache.Gridheight);
|
||||
FGCache.AccumHeight[i]:=Pointer(PtrInt(FGCache.Gridheight));
|
||||
FGCache.Gridheight:=FGCache.Gridheight+GetRowHeights(i);
|
||||
if i<FixedRows then FGCache.FixedHeight:=FGCache.GridHeight;
|
||||
{$IfDef dbgVisualChange}
|
||||
@ -4118,8 +4118,12 @@ end;
|
||||
|
||||
procedure TCustomGrid.ProcessEditor(LastEditor: TWinControl; DCol, DRow: Integer; WasVis: Boolean);
|
||||
procedure RestoreEditor;
|
||||
var
|
||||
WC: TWinControl;
|
||||
begin
|
||||
SwapInt(Integer(FEditor),Integer(LastEditor));
|
||||
WC := FEditor;
|
||||
FEditor := LastEditor;
|
||||
LastEditor := WC;
|
||||
SwapInt(FCol,DCol);
|
||||
SwapInt(FRow,DRow);
|
||||
end;
|
||||
|
@ -968,10 +968,10 @@ var
|
||||
Form: TCustomForm;
|
||||
begin
|
||||
Form := Screen.ActiveForm;
|
||||
if (Form<>nil) and (Form.Perform(Msg, 0, Longint(Action)) = 1) then
|
||||
if (Form<>nil) and (Form.Perform(Msg, 0, PtrInt(Action)) = 1) then
|
||||
Result:=true
|
||||
else if (MainForm<>Form) and (MainForm<>nil)
|
||||
and (MainForm.Perform(Msg, 0, Longint(Action)) = 1)
|
||||
and (MainForm.Perform(Msg, 0, PtrInt(Action)) = 1)
|
||||
then
|
||||
Result:=true;
|
||||
// Disable action if no "user" handler is available
|
||||
@ -1356,6 +1356,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.97 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.96 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
|
@ -59,7 +59,7 @@ begin
|
||||
Result:=FHandle<>0;
|
||||
end;
|
||||
|
||||
procedure TCommonDialog.SetHandle(const AValue: integer);
|
||||
procedure TCommonDialog.SetHandle(const AValue: THandle);
|
||||
begin
|
||||
FHandle:=AValue;
|
||||
end;
|
||||
@ -97,6 +97,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.19 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.18 2004/09/24 21:34:14 micha
|
||||
convert LM_CREATE message to interface methods
|
||||
remove SendMsgToInterface, CNSendMessage and related methods
|
||||
|
@ -111,7 +111,7 @@ begin
|
||||
or ((ApplicationActionComponent<>nil)
|
||||
and ApplicationActionComponent.ExecuteAction(Self))
|
||||
or inherited Execute
|
||||
or (SendApplicationMessage(CM_ACTIONEXECUTE, 0, Longint(Self)) = 1);
|
||||
or (SendApplicationMessage(CM_ACTIONEXECUTE, 0, PtrInt(Self)) = 1);
|
||||
end;
|
||||
|
||||
function TContainedAction.Update: Boolean;
|
||||
@ -121,7 +121,7 @@ begin
|
||||
or ((ApplicationActionComponent<>nil)
|
||||
and ApplicationActionComponent.UpdateAction(Self))
|
||||
or inherited Update
|
||||
or (SendApplicationMessage(CM_ACTIONUPDATE, 0, Longint(Self)) = 1);
|
||||
or (SendApplicationMessage(CM_ACTIONUPDATE, 0, PtrInt(Self)) = 1);
|
||||
end;
|
||||
|
||||
// included by actnlist.pas
|
||||
|
@ -60,7 +60,7 @@ begin
|
||||
if csLButtonDown in ControlState then begin
|
||||
GetCursorPos(p);
|
||||
P := ScreenToClient(p);
|
||||
Perform(LM_LBUTTONUP, 0, LParam(PointToSmallPoint(p)));
|
||||
Perform(LM_LBUTTONUP, 0, Integer(PointToSmallPoint(p)));
|
||||
end;
|
||||
|
||||
if Threshold < 0 then
|
||||
@ -927,7 +927,7 @@ end;
|
||||
TControl.Perform
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
Function TControl.Perform(Msg:Cardinal; WParam: WParam; LParam: LParam): LongInt;
|
||||
Function TControl.Perform(Msg:Cardinal; WParam: WParam; LParam: LParam): LRESULT;
|
||||
var
|
||||
Message : TLMessage;
|
||||
begin
|
||||
@ -1054,7 +1054,7 @@ Begin
|
||||
case DragMsg.DragMessage of
|
||||
|
||||
dmFindTarget:
|
||||
DragMsg.Result := longint(Self);
|
||||
DragMsg.Result := PtrInt(Self);
|
||||
|
||||
dmDragEnter, dmDragLeave, dmDragMove:
|
||||
begin
|
||||
@ -3467,6 +3467,9 @@ end;
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.245 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.244 2005/02/05 15:57:45 mattias
|
||||
fixed dereferencing anchorsides
|
||||
|
||||
|
@ -57,7 +57,7 @@ end;
|
||||
Send a CM_DRAG (TCMDrag) message to MsgTarget.
|
||||
-------------------------------------------------------------------------------}
|
||||
Function SendDragMessage(MsgTarget: TControl; Msg: TDragMessage;
|
||||
Source: TDragObject; Target: TControl; const Position: TPoint): longint;
|
||||
Source: TDragObject; Target: TControl; const Position: TPoint): LRESULT;
|
||||
var
|
||||
DragRec: TDragRec;
|
||||
DragMsg: TCMDrag;
|
||||
@ -362,6 +362,9 @@ end;
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.8 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.7 2005/01/13 00:13:36 mattias
|
||||
fixed dragging over nil
|
||||
|
||||
|
@ -888,7 +888,7 @@ end;
|
||||
|
||||
function TWidgetSet.GetTextExtentExPoint(DC: HDC; Str: PChar;
|
||||
Count, MaxWidth: Integer; MaxCount, PartialWidths: PInteger;
|
||||
var Size: TSize): BOOL;
|
||||
var Size: TSize): Boolean;
|
||||
begin
|
||||
if MaxCount<>nil then MaxCount^:=Count;
|
||||
if PartialWidths<>nil then
|
||||
@ -1263,13 +1263,13 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
Function TWidgetSet.SetBkMode(DC: HDC; bkMode : Integer) : Integer;
|
||||
function TWidgetSet.SetBkMode(DC: HDC; bkMode : Integer): Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
Function TWidgetSet.SetCapture(value : Longint) : Longint;
|
||||
Begin
|
||||
function TWidgetSet.SetCapture(AHandle: HWND): HWND;
|
||||
begin
|
||||
Result := 0;
|
||||
End;
|
||||
|
||||
@ -1420,6 +1420,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.19 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.18 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
|
@ -21,14 +21,14 @@ var
|
||||
p: Pointer;
|
||||
begin
|
||||
Result := inherited Add(S);
|
||||
ShortCut:=TextToShortCut(S);
|
||||
p:=Pointer(Cardinal(ShortCut));
|
||||
ShortCut := TextToShortCut(S);
|
||||
p := Pointer(PtrUInt(ShortCut));
|
||||
Objects[Result] := TObject(p);
|
||||
end;
|
||||
|
||||
function TShortCutList.GetShortCuts(Index: Integer): TShortCut;
|
||||
begin
|
||||
Result := TShortCut(Cardinal(Objects[Index]));
|
||||
Result := TShortCut(PtrUInt(Objects[Index]));
|
||||
end;
|
||||
|
||||
function TShortCutList.IndexOfShortCut(const Shortcut: TShortCut): Integer;
|
||||
@ -37,7 +37,7 @@ var
|
||||
begin
|
||||
Result := -1;
|
||||
for I := 0 to Count - 1 do
|
||||
if TShortCut(Cardinal(Objects[I])) = ShortCut then
|
||||
if TShortCut(PtrUInt(Objects[I])) = ShortCut then
|
||||
begin
|
||||
Result := I;
|
||||
break;
|
||||
|
@ -310,7 +310,7 @@ begin
|
||||
then begin
|
||||
MSg.MSg := CM_ButtonPressed;
|
||||
Msg.WParam := FGroupIndex;
|
||||
Msg.LParam := Longint(self);
|
||||
Msg.LParam := PtrInt(self);
|
||||
Msg.Result := 0;
|
||||
Parent.Broadcast(Msg);
|
||||
end;
|
||||
@ -769,6 +769,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.63 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.62 2005/01/04 14:23:37 micha
|
||||
implement transparency (actually, non-transparency)
|
||||
|
||||
|
@ -1432,7 +1432,7 @@ var FMergedItems: TTreeNodeArray;
|
||||
begin
|
||||
if FCount>0 then begin
|
||||
if Owner<>nil then Owner.ClearCache;
|
||||
if SortProc=nil then SortProc:=@DefaultTreeViewSort;
|
||||
if not Assigned(SortProc) then SortProc:=@DefaultTreeViewSort;
|
||||
GetMem(FMergedItems,SizeOf(Pointer)*FCount);
|
||||
MergeSort(FItems,FMergedItems,0,FCount-1);
|
||||
{
|
||||
@ -1627,11 +1627,9 @@ end;
|
||||
procedure TTreeNode.WriteDebugReport(const Prefix: string; Recurse: boolean);
|
||||
var i: integer;
|
||||
begin
|
||||
DbgOut(Prefix);
|
||||
DbgOut('TTreeNode.WriteDebugReport Self=',HexStr(Cardinal(Self),8));
|
||||
DbgOut('%s%s.WriteDebugReport Self=%p',[Prefix, ClassName, Pointer(Self)]);
|
||||
ConsistencyCheck;
|
||||
DbgOut(' Text=',Text);
|
||||
DebugLn('');
|
||||
DebugLn(' Text=',Text);
|
||||
if Recurse then begin
|
||||
for i:=0 to FCount-1 do
|
||||
Items[i].WriteDebugReport(Prefix+' ',true);
|
||||
@ -2264,7 +2262,8 @@ begin
|
||||
RaiseGDBException('');
|
||||
if (i<FTopLvlCount-1) and (FTopLvlItems[i].FNextBrother<>FTopLvlItems[i+1])
|
||||
then begin
|
||||
DebugLn(' CONSISTENCY i=',dbgs(i),' FTopLvlCount=',dbgs(FTopLvlCount),' FTopLvlItems[i]=',HexStr(Cardinal(FTopLvlItems[i]),8),' FTopLvlItems[i].FNextBrother=',HexStr(Cardinal(FTopLvlItems[i].FNextBrother),8),' FTopLvlItems[i+1]=',HexStr(Cardinal(FTopLvlItems[i+1]),8));
|
||||
DebugLn(' CONSISTENCY i=%d FTopLvlCount=%d FTopLvlItems[i]=%p FTopLvlItems[i].FNextBrother=%p FTopLvlItems[i+1]=%p',
|
||||
[i, FTopLvlCount, Pointer(FTopLvlItems[i]), Pointer(FTopLvlItems[i].FNextBrother), Pointer(FTopLvlItems[i+1])]);
|
||||
RaiseGDBException('');
|
||||
end;
|
||||
if (i=FTopLvlCount-1) and (FTopLvlItems[i].FNextBrother<>nil) then
|
||||
@ -2281,8 +2280,7 @@ end;
|
||||
procedure TTreeNodes.WriteDebugReport(const Prefix: string; AllNodes: boolean);
|
||||
var Node: TTreeNode;
|
||||
begin
|
||||
write(Prefix);
|
||||
write('TTreeNodes.WriteDebugReport Self=',HexStr(Cardinal(Self),8));
|
||||
DbgOut('%s%s.WriteDebugReport Self=%p', [Prefix, ClassName, Pointer(Self)]);
|
||||
ConsistencyCheck;
|
||||
DebugLn('');
|
||||
if AllNodes then begin
|
||||
@ -2494,10 +2492,7 @@ end;
|
||||
|
||||
procedure TTreeStrings.WriteDebugReport(const Prefix: string);
|
||||
begin
|
||||
write(Prefix);
|
||||
write('TTreeStrings.WriteDebugReport Self=',HexStr(Cardinal(Self),8));
|
||||
write(' Consistency=',ConsistencyCheck);
|
||||
DebugLn('');
|
||||
DebugLn('%sTTreeStrings.WriteDebugReport Self=%p Consistency=%d', [Prefix, Pointer(Self), ConsistencyCheck]);
|
||||
end;
|
||||
|
||||
|
||||
@ -2544,7 +2539,6 @@ destructor TCustomTreeView.Destroy;
|
||||
begin
|
||||
Images:=nil;
|
||||
FreeThenNil(FTreeNodes);
|
||||
FreeThenNil(FChangeTimer);
|
||||
FreeThenNil(FSaveItems);
|
||||
FreeThenNil(FDragImage);
|
||||
FreeThenNil(FImageChangeLink);
|
||||
@ -3452,11 +3446,6 @@ begin
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.SetChangeDelay(Value: Integer);
|
||||
begin
|
||||
FChangeTimer.Interval := Value;
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.SetDefaultItemHeight(Value: integer);
|
||||
begin
|
||||
if (tvoAutoItemHeight in FOptions) and (not (csLoading in ComponentState))
|
||||
@ -3482,11 +3471,6 @@ begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TCustomTreeView.GetChangeDelay: Integer;
|
||||
begin
|
||||
Result := FChangeTimer.Interval;
|
||||
end;
|
||||
|
||||
function TCustomTreeView.GetDropTarget: TTreeNode;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
@ -4541,8 +4525,7 @@ end;
|
||||
procedure TCustomTreeView.WriteDebugReport(const Prefix: string;
|
||||
AllNodes: boolean);
|
||||
begin
|
||||
DbgOut(Prefix);
|
||||
DbgOut('TCustomTreeView.WriteDebugReport Self=',HexStr(Cardinal(Self),8));
|
||||
DbgOut('%s%s.WriteDebugReport Self=%p', [Prefix, ClassName, Pointer(Self)]);
|
||||
ConsistencyCheck;
|
||||
DebugLn('');
|
||||
if AllNodes then begin
|
||||
|
@ -666,9 +666,9 @@ begin
|
||||
Result := InterfaceObject.SetBkMode(DC, bkMode);
|
||||
end;
|
||||
|
||||
Function SetCapture(value : Longint): Longint;
|
||||
Begin
|
||||
Result := InterfaceObject.SetCapture(Value);
|
||||
function SetCapture(AHandle: HWND): HWND;
|
||||
begin
|
||||
Result := InterfaceObject.SetCapture(AHandle);
|
||||
end;
|
||||
|
||||
function SetCaretPos(X, Y: Integer): Boolean;
|
||||
@ -1330,6 +1330,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.118 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.117 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
|
@ -195,7 +195,7 @@ function SendMessage(HandleWnd: HWND; Msg: Cardinal; WParam: WParam; LParam: LPa
|
||||
function SetActiveWindow(Handle: HWND): HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function SetBkColor(DC: HDC; Color: TColorRef): TColorRef; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} //pbd
|
||||
Function SetBkMode(DC: HDC; bkMode : Integer): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
Function SetCapture (Value : LongInt): LongInt; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
Function SetCapture (AHandle: HWND): HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function SetCaretPos(X, Y: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function SetCaretPosEx(handle: HWnd; X, Y: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function SetCursor(hCursor: HICON): HCURSOR; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
@ -300,6 +300,9 @@ function RGB(R, G, B : Byte) : TColorRef;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.105 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.104 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
|
@ -923,7 +923,7 @@ begin
|
||||
{$IFDEF VerboseDrag}
|
||||
DebugLn('TWinControl.DoDragMsg dmFindTarget ',Name,':',ClassName,' End Result=',TargetControl.Name,':',TargetControl.ClassName);
|
||||
{$ENDIF}
|
||||
DragMsg.Result:=longint(TargetControl);
|
||||
DragMsg.Result := LRESULT(TargetControl);
|
||||
end;
|
||||
|
||||
else
|
||||
@ -1635,7 +1635,7 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
Control.Perform(TheMessage.Msg, WParam(TheMessage.Keys),
|
||||
LParam(PointToSmallPoint(P)));
|
||||
LParam(Integer(PointToSmallPoint(P))));
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
@ -1964,7 +1964,7 @@ var
|
||||
(Enabled or AllowDisabled)
|
||||
and
|
||||
(Perform(CM_HITTEST, 0,
|
||||
LParam(PointToSmallPoint(ControlPos))) <> 0)
|
||||
LParam(Integer(PointToSmallPoint(ControlPos)))) <> 0)
|
||||
)
|
||||
);
|
||||
{$IFDEF VerboseMouseBugfix}
|
||||
@ -4464,6 +4464,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.310 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.309 2005/02/03 15:10:23 micha
|
||||
implement shortcut handling, tcustomlabel accelerator focuscontrol functionality
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
{%MainUnit gtkproc.pp}
|
||||
{
|
||||
*****************************************************************************
|
||||
* *
|
||||
@ -2634,8 +2635,8 @@ var
|
||||
// Check for a toggle
|
||||
// If the remove was successfull, the key was on
|
||||
// else it was off so we should set the toggle flag
|
||||
if KeyStateList.Remove(Pointer(AVKeyCode or KEYMAP_TOGGLE)) < 0
|
||||
then KeyStateList.Add(Pointer(AVKeyCode or KEYMAP_TOGGLE));
|
||||
if KeyStateList.Remove(Pointer(PtrInt(AVKeyCode or KEYMAP_TOGGLE))) < 0
|
||||
then KeyStateList.Add(Pointer(PtrInt(AVKeyCode or KEYMAP_TOGGLE)));
|
||||
end;
|
||||
|
||||
procedure UpdateList(const AVKeyCode: Integer; const APressed: Boolean);
|
||||
@ -2643,11 +2644,11 @@ var
|
||||
if AVKeyCode = 0 then Exit;
|
||||
if APressed
|
||||
then begin
|
||||
if KeyStateList.IndexOf(Pointer(AVKeyCode)) < 0
|
||||
then KeyStateList.Add(Pointer(AVKeyCode));
|
||||
if KeyStateList.IndexOf(Pointer(PtrInt(AVKeyCode))) < 0
|
||||
then KeyStateList.Add(Pointer(PtrInt(AVKeyCode)));
|
||||
end
|
||||
else begin
|
||||
KeyStateList.Remove(Pointer(AVKeyCode));
|
||||
KeyStateList.Remove(Pointer(PtrInt(AVKeyCode)));
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2985,6 +2986,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.261 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.260 2005/01/22 23:53:43 mattias
|
||||
fixed gtk2 intf from Peter Vreman
|
||||
|
||||
|
@ -226,7 +226,7 @@ begin
|
||||
Result.LogFont:=LogFont;
|
||||
FDescriptors.Add(Result);
|
||||
if FindGDKFontDesc(LogFont,LongFontName)=nil then begin
|
||||
debugln('TGdkFontCache.Add Added: ',HexStr(Cardinal(Result),8),' LongFontName=',Result.LongFontName,' ',LogFontToString(Result.LogFont));
|
||||
DebugLn('TGdkFontCache.Add Added: %p LongFontName=%s LogFont=%s', [Pointer(Result), Result.LongFontName, LogFontToString(Result.LogFont)]);
|
||||
DumpDescriptors;
|
||||
RaiseGDBException('');
|
||||
end;
|
||||
@ -264,7 +264,7 @@ begin
|
||||
i:=1;
|
||||
while ANode<>nil do begin
|
||||
Desc:=TGdkFontCacheDescriptor(ANode.Data);
|
||||
debugln('TGdkFontCache.DumpDescriptors ',dbgs(i),' ',HexStr(Cardinal(Desc),8),' ',Desc.LongFontName,' ',LogFontToString(Desc.LogFont));
|
||||
DebugLn('TGdkFontCache.DumpDescriptors %d %p %s %s', [i, Pointer(Desc), Desc.LongFontName, LogFontToString(Desc.LogFont)]);
|
||||
ANode:=FDescriptors.FindSuccessor(ANode);
|
||||
inc(i);
|
||||
end;
|
||||
|
@ -319,11 +319,11 @@ type
|
||||
Rect: TRect;
|
||||
end;
|
||||
|
||||
TLMGtkPaint = packed record
|
||||
TLMGtkPaint = record
|
||||
Msg: Cardinal;
|
||||
Data: TLMGtkPaintData; // WParam
|
||||
Unused: longint; // LParam
|
||||
Result: longint;
|
||||
Unused: LPARAM; // LParam
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
var
|
||||
|
@ -1,3 +1,4 @@
|
||||
{%MainUnit gtkint.pp}
|
||||
{******************************************************************************
|
||||
gtklistsl.inc
|
||||
TGtkListStringList and TGtkCListStringList
|
||||
@ -938,9 +939,10 @@ begin
|
||||
CS^.Arr[0] := @CS^.Str;
|
||||
for K := 1 to 15 do begin
|
||||
CS^.Arr[K] := StrScan(CS^.Arr[K-1], #9);
|
||||
if Assigned(CS^.Arr[K]) then begin
|
||||
if Assigned(CS^.Arr[K])
|
||||
then begin
|
||||
CS^.Arr[K][0] := #0;
|
||||
inc(integer(CS^.Arr[K]));
|
||||
Inc(CS^.Arr[K]);
|
||||
end else
|
||||
break;
|
||||
end;
|
||||
@ -962,6 +964,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.28 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.27 2004/07/17 14:24:31 mattias
|
||||
fixed freeing synedit PrimarySelection and sending gtklist DrawItem msg for destroing controls
|
||||
|
||||
|
@ -989,11 +989,8 @@ procedure TGtkWidgetSet.SendCachedGtkMessages;
|
||||
|
||||
procedure RaiseInvalidLCLControl;
|
||||
begin
|
||||
RaiseException('SendCachedGtkResizeNotifications'
|
||||
+' FixWidget='+HexStr(Cardinal(FixWidget),8)
|
||||
+' MainWidget='+HexStr(Cardinal(MainWidget),8)
|
||||
+' LCLControl='+HexStr(Cardinal(LCLControl),8)
|
||||
);
|
||||
RaiseException('SendCachedGtkResizeNotifications FixWidget=%p MainWidget=%p LCLControl=%p',
|
||||
[FixWidget, MainWidget, Pointer(LCLControl)]);
|
||||
end;
|
||||
|
||||
begin
|
||||
@ -1587,14 +1584,14 @@ function TGtkWidgetSet.CreateTimer(Interval: integer;
|
||||
var
|
||||
TimerInfo: PGtkITimerinfo;
|
||||
begin
|
||||
if ((Interval < 1) or (TimerFunc = nil))
|
||||
if ((Interval < 1) or (not Assigned(TimerFunc)))
|
||||
then
|
||||
Result := 0
|
||||
else begin
|
||||
New(TimerInfo);
|
||||
TimerInfo^.TimerFunc := TimerFunc;
|
||||
{$IFDEF VerboseTimer}
|
||||
DebugLn('TGtkWidgetSet.SetTimer ',HexStr(Cardinal(TimerInfo),8),' CurTimerCount=',FTimerData.Count,' OldTimerCount=',FOldTimerData.Count);
|
||||
DebugLn('TGtkWidgetSet.SetTimer %p CurTimerCount=%d OldTimerCount=%d', [TimerInfo, FTimerData.Count, FOldTimerData.Count]);
|
||||
{$ENDIF}
|
||||
Result:= gtk_timeout_add(Interval, @gtkTimerCB, TimerInfo);
|
||||
if Result = 0 then
|
||||
@ -2775,12 +2772,12 @@ var
|
||||
|
||||
procedure RaiseSrcDrawableNil;
|
||||
begin
|
||||
RaiseException('TGtkWidgetSet.StretchCopyArea SrcDC='+HexStr(Cardinal(SrcDevContext),8)+' Drawable=nil');
|
||||
RaiseException('TGtkWidgetSet.StretchCopyArea SrcDC=%p Drawable=nil', [Pointer(SrcDevContext)]);
|
||||
end;
|
||||
|
||||
procedure RaiseDestDrawableNil;
|
||||
begin
|
||||
RaiseException('TGtkWidgetSet.StretchCopyArea DestDC='+HexStr(Cardinal(DestDevContext),8)+' Drawable=nil');
|
||||
RaiseException('TGtkWidgetSet.StretchCopyArea DestDC=%p Drawable=nil', [Pointer(DestDevContext)]);
|
||||
end;
|
||||
|
||||
var
|
||||
@ -6847,10 +6844,10 @@ begin
|
||||
|
||||
// find all line starts and line ends
|
||||
repeat
|
||||
LinesList.Add(Pointer(LineStart));
|
||||
LinesList.Add(Pointer(PtrInt(LineStart)));
|
||||
// find line end
|
||||
LineEnd:=FindLineEnd(LineStart);
|
||||
LinesList.Add(Pointer(LineEnd));
|
||||
LinesList.Add(Pointer(PtrInt(LineEnd)));
|
||||
// find next line start
|
||||
LineStart:=LineEnd;
|
||||
if AText[LineStart] in [#10,#13] then begin
|
||||
@ -7003,6 +7000,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.624 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.623 2005/02/05 14:53:35 mattias
|
||||
fixed for gtk TScrollBar from Andrew Haines
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// included by gtkproc.pp
|
||||
{%MainUnit gtkproc.pp}
|
||||
|
||||
{******************************************************************************
|
||||
Misc Support Functs
|
||||
@ -534,6 +534,11 @@ begin
|
||||
if (length(Msg) div (length(Msg) div 10000))=0 then ;
|
||||
end;
|
||||
|
||||
procedure RaiseException(const Msg: string; Args: array of const);
|
||||
begin
|
||||
RaiseException(Format(Msg, Args));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function CreatePChar(const s: string): PChar;
|
||||
|
||||
@ -636,12 +641,14 @@ var
|
||||
WinWidgetInfo: PWinWidgetInfo;
|
||||
FixedWidget: PGTKWidget;
|
||||
begin
|
||||
Result:=HexStr(Cardinal(Widget),8);
|
||||
if Widget=nil then exit;
|
||||
Result:=Result+'='+GetWidgetClassName(Widget);
|
||||
Result:=Result+' '+WidgetFlagsToString(Widget);
|
||||
if Widget = nil
|
||||
then begin
|
||||
Result := 'nil';
|
||||
exit;
|
||||
end;
|
||||
Result := Format('%p=%s %s', [Pointer(Widget), GetWidgetClassName(Widget), WidgetFlagsToString(Widget)]);
|
||||
LCLObject:=GetNearestLCLObject(Widget);
|
||||
Result:=Result+' LCLObject='+HexStr(Cardinal(LCLObject),8);
|
||||
Result := Result + Format(' LCLObject=%p', [Pointer(LCLObject)]);
|
||||
if LCLObject=nil then exit;
|
||||
if LCLObject is TControl then
|
||||
Result:=Result+'='+TControl(LCLObject).Name+':'+LCLObject.ClassName
|
||||
@ -651,12 +658,9 @@ begin
|
||||
AWinControl:=TWinControl(LCLObject);
|
||||
if AWinControl.HandleAllocated then begin
|
||||
MainWidget:=PGTKWidget(AWinControl.Handle);
|
||||
if MainWidget=Widget then begin
|
||||
Result:=Result+'<Is MainWidget>';
|
||||
end else begin
|
||||
Result:=Result+'<MainWidget='+HexStr(Cardinal(MainWidget),8)
|
||||
+'='+GetWidgetClassName(MainWidget)+'>';
|
||||
end;
|
||||
if MainWidget=Widget
|
||||
then Result:=Result+'<Is MainWidget>'
|
||||
else Result:=Result+Format('<MainWidget=%p=%s>', [Pointer(MainWidget), GetWidgetClassName(MainWidget)]);
|
||||
FixedWidget:=GetFixedWidget(MainWidget);
|
||||
if FixedWidget=Widget then
|
||||
Result:=Result+'<Is FixedWidget>';
|
||||
@ -665,7 +669,8 @@ begin
|
||||
if WinWidgetInfo^.CoreWidget = Widget then
|
||||
Result:=Result+'<Is CoreWidget>';
|
||||
end;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
Result:=Result+'<NOT HandleAllocated>'
|
||||
end;
|
||||
end;
|
||||
@ -1019,7 +1024,7 @@ begin
|
||||
end;
|
||||
end else
|
||||
if Msg^.Msg=LM_GtkPAINT then begin
|
||||
FreeThenNil(TLMGtkPaint(Msg^).Data);
|
||||
FreeThenNil(TLMGtkPaintData(Msg^.WParam));
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1421,7 +1426,7 @@ function CopyDCData(DestinationDC, SourceDC: TDeviceContext): Boolean;
|
||||
var
|
||||
GCValues: TGDKGCValues;
|
||||
begin
|
||||
Assert(False, Format('Trace:> [CopyDCData] DestDC:0x%x, SourceDC:0x%x', [Integer(DestinationDC), Integer(SourceDC)]));
|
||||
// Assert(False, Format('Trace:> [CopyDCData] DestDC:0x%x, SourceDC:0x%x', [Integer(DestinationDC), Integer(SourceDC)]));
|
||||
Result := (DestinationDC <> nil) and (SourceDC <> nil);
|
||||
if Result
|
||||
then begin
|
||||
@ -1466,7 +1471,7 @@ begin
|
||||
SavedContext := nil;
|
||||
end;
|
||||
end;
|
||||
Assert(False, Format('Trace:< [CopyDCData] DestDC:0x%x, SourceDC:0x%x --> %d', [Integer(DestinationDC), Integer(SourceDC), Integer(Result)]));
|
||||
// Assert(False, Format('Trace:< [CopyDCData] DestDC:0x%x, SourceDC:0x%x --> %d', [Integer(DestinationDC), Integer(SourceDC), Integer(Result)]));
|
||||
end;
|
||||
|
||||
Function RegionType(RGN: PGDKRegion) : Longint;
|
||||
@ -1874,19 +1879,18 @@ begin
|
||||
Result := RGBIndex^.Index;
|
||||
end;
|
||||
|
||||
Procedure InitializePalette(Pal : PGDIObject; Entries : PPALETTEENTRY; RGBCount : Longint);
|
||||
procedure InitializePalette(const Pal: PGDIObject; const Entries: PPaletteEntry; const RGBCount: Longint);
|
||||
var
|
||||
PalEntries : PPALETTEENTRY;
|
||||
I : Integer;
|
||||
RGBValue : Longint;
|
||||
I: Integer;
|
||||
RGBValue: Longint;
|
||||
begin
|
||||
PalEntries := Entries;
|
||||
For I := 0 to RGBCount - 1 do begin
|
||||
If PaletteIndexExists(Pal, I) then
|
||||
for I := 0 to RGBCount - 1 do
|
||||
begin
|
||||
if PaletteIndexExists(Pal, I) then
|
||||
PaletteDeleteIndex(Pal, I);
|
||||
With PalEntries[I] do
|
||||
with Entries[I] do
|
||||
RGBValue := RGB(peRed, peGreen, peBlue) {or (peFlags shl 32)??};
|
||||
If not PaletteRGBExists(Pal, RGBValue) then
|
||||
if not PaletteRGBExists(Pal, RGBValue) then
|
||||
PaletteAddIndex(Pal, I, RGBValue);
|
||||
end;
|
||||
end;
|
||||
@ -4352,7 +4356,7 @@ end;
|
||||
|
||||
procedure SetDesignSignalMask(Widget: PGtkWidget; NewMask: TDesignSignalMask);
|
||||
begin
|
||||
gtk_object_set_data(PGtkObject(Widget),'LCLDesignMask',Pointer(NewMask));
|
||||
gtk_object_set_data(PGtkObject(Widget),'LCLDesignMask',Pointer(PtrInt(NewMask)));
|
||||
end;
|
||||
|
||||
function GetDesignOnlySignalFlag(Widget: PGtkWidget;
|
||||
@ -7929,6 +7933,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.332 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.331 2005/02/03 21:10:07 vincents
|
||||
fixed compilation of gtk2 interface on windows
|
||||
|
||||
|
@ -286,6 +286,7 @@ var
|
||||
|
||||
// debugging
|
||||
procedure RaiseException(const Msg: string);
|
||||
procedure RaiseException(const Msg: string; Args: array of const);
|
||||
function GtkWidgetIsA(Widget: PGtkWidget; AType: TGtkType): boolean;
|
||||
function GetWidgetClassName(Widget: PGtkWidget): string;
|
||||
function GetWidgetDebugReport(Widget: PGtkWidget): string;
|
||||
@ -410,7 +411,7 @@ function PaletteAddIndex(Pal: PGDIObject; I, RGB: Longint): Boolean;
|
||||
function PaletteDeleteIndex(Pal: PGDIObject; I: Longint): Boolean;
|
||||
function PaletteIndexToRGB(Pal: PGDIObject; I: longint): longint;
|
||||
function PaletteRGBToIndex(Pal: PGDIObject; RGB: longint): longint;
|
||||
Procedure InitializePalette(Pal: PGDIObject; Entries: PPALETTEENTRY; RGBCount: Longint);
|
||||
procedure InitializePalette(const Pal: PGDIObject; const Entries: PPaletteEntry; const RGBCount: Longint);
|
||||
function GetIndexAsKey(p: pointer): pointer;
|
||||
function GetRGBAsKey(p: pointer): pointer;
|
||||
|
||||
|
@ -1744,38 +1744,32 @@ begin
|
||||
Assert(False, 'trace:[TGtkWidgetSet.CreatePalette]');
|
||||
GObject := NewGDIObject(gdiPalette);
|
||||
|
||||
with LogPalette, GObject^ do
|
||||
begin
|
||||
SystemPalette := False;
|
||||
GObject^.SystemPalette := False;
|
||||
GObject^.PaletteRealized := False;
|
||||
GObject^.VisualType := GDK_VISUAL_PSEUDO_COLOR;
|
||||
GObject^.PaletteVisual := nil;
|
||||
|
||||
PaletteRealized := False;
|
||||
{$IFDEF DebugGDKTraps}
|
||||
BeginGDKErrorTrap;
|
||||
{$ENDIF}
|
||||
|
||||
VisualType := GDK_VISUAL_PSEUDO_COLOR;
|
||||
|
||||
PaletteVisual := nil;
|
||||
|
||||
{$IFDEF DebugGDKTraps}
|
||||
BeginGDKErrorTrap;
|
||||
{$ENDIF}
|
||||
|
||||
PaletteVisual := gdk_visual_get_best_with_type(VisualType);
|
||||
If PaletteVisual = nil then begin
|
||||
PaletteVisual := GDK_Visual_Get_System;
|
||||
GDK_Visual_Ref(PaletteVisual);
|
||||
end;
|
||||
PaletteColormap := GDK_Colormap_new(PaletteVisual, GdkTrue);
|
||||
|
||||
{$IFDEF DebugGDKTraps}
|
||||
EndGDKErrorTrap;
|
||||
{$ENDIF}
|
||||
|
||||
RGBTable := TDynHashArray.Create(-1);
|
||||
RGBTable.OnGetKeyForHashItem:=@GetRGBAsKey;
|
||||
IndexTable := TDynHashArray.Create(-1);
|
||||
IndexTable.OnGetKeyForHashItem:=@GetIndexAsKey;
|
||||
InitializePalette(GObject, LogPalette.palPalEntry,
|
||||
MemSize(Pointer(LogPalette.palPalEntry)) div SizeOf(tagRGBQuad));
|
||||
GObject^.PaletteVisual := gdk_visual_get_best_with_type(GObject^.VisualType);
|
||||
if GObject^.PaletteVisual = nil
|
||||
then begin
|
||||
GObject^.PaletteVisual := GDK_Visual_Get_System;
|
||||
GDK_Visual_Ref(GObject^.PaletteVisual);
|
||||
end;
|
||||
GObject^.PaletteColormap := GDK_Colormap_new(GObject^.PaletteVisual, GdkTrue);
|
||||
|
||||
{$IFDEF DebugGDKTraps}
|
||||
EndGDKErrorTrap; e
|
||||
{$ENDIF}
|
||||
|
||||
GObject^.RGBTable := TDynHashArray.Create(-1);
|
||||
GObject^.RGBTable.OnGetKeyForHashItem:=@GetRGBAsKey;
|
||||
GObject^.IndexTable := TDynHashArray.Create(-1);
|
||||
GObject^.IndexTable.OnGetKeyForHashItem:=@GetIndexAsKey;
|
||||
InitializePalette(GObject, LogPalette.palPalEntry, LogPalette.palNumEntries);
|
||||
|
||||
Result := HPALETTE(GObject);
|
||||
end;
|
||||
@ -4523,7 +4517,7 @@ begin
|
||||
VK_LMENU: nVirtKey := VK_MENU;
|
||||
end;
|
||||
{$IFDEF Use_KeyStateList}
|
||||
Result := KEYSTATE[FKeyStateList_.IndexOf(Pointer(nVirtKey)) >=0];
|
||||
Result := KEYSTATE[FKeyStateList_.IndexOf(Pointer(PtrInt(nVirtKey))) >=0];
|
||||
{$ELSE}
|
||||
Implement this
|
||||
{$ENDIF}
|
||||
@ -4533,7 +4527,7 @@ begin
|
||||
then begin
|
||||
nVirtKey := nVirtKey or KEYMAP_EXTENDED;
|
||||
{$IFDEF Use_KeyStateList}
|
||||
Result := KEYSTATE[FKeyStateList_.IndexOf(Pointer(nVirtKey)) >=0];
|
||||
Result := KEYSTATE[FKeyStateList_.IndexOf(Pointer(PtrInt(nVirtKey))) >=0];
|
||||
{$ELSE}
|
||||
Implement this
|
||||
{$ENDIF}
|
||||
@ -4543,7 +4537,7 @@ begin
|
||||
// add toggle
|
||||
if Result <> 0 then
|
||||
Result := Result or TOGGLESTATE[FKeyStateList_.IndexOf(Pointer(
|
||||
nVirtKey or KEYMAP_TOGGLE)) >=0];
|
||||
PtrInt(nVirtKey or KEYMAP_TOGGLE))) >=0];
|
||||
{$ENDIF}
|
||||
//Assert(False, Format('Trace:[TGtkWidgetSet.GetKeyState] %d -> 0x%x', [nVirtKey, Result]));
|
||||
end;
|
||||
@ -6087,7 +6081,7 @@ var Dialog, ALabel : PGtkWidget;
|
||||
if RetValue = IDCANCEL then begin
|
||||
gtk_object_set_data(PGtkObject(Dialog), 'modal_result', Pointer(IDCANCEL));
|
||||
end;
|
||||
gtk_object_set_data(PGtkObject(AButton), 'modal_result', Pointer(RetValue));
|
||||
gtk_object_set_data(PGtkObject(AButton), 'modal_result', Pointer(PtrInt(RetValue)));
|
||||
g_signal_connect(PGtkObject(AButton), 'clicked', TGtkSignalFunc(@MessageButtonClicked), @ADialogResult);
|
||||
gtk_container_add (PGtkContainer(PGtkDialog(Dialog)^.action_area), AButton);
|
||||
end;
|
||||
@ -6841,7 +6835,7 @@ begin
|
||||
RadioGroup := GetGroup;
|
||||
|
||||
// Set new group
|
||||
gtk_object_set_data(Pointer(hndMenu), GROUPIDX_DATANAME, Pointer(GroupIndex));
|
||||
gtk_object_set_data(Pointer(hndMenu), GROUPIDX_DATANAME, Pointer(PtrInt(GroupIndex)));
|
||||
if RadioGroup = nil
|
||||
then begin
|
||||
// We're the only member, get a group
|
||||
@ -7714,12 +7708,12 @@ end;
|
||||
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtkWidgetSet.SetCapture(Value: Longint): Longint;
|
||||
function TGtkWidgetSet.SetCapture(AHandle: HWND): HWND;
|
||||
var
|
||||
Widget: PGtkWidget;
|
||||
begin
|
||||
Assert(False, Format('Trace:> [TGtkWidgetSet.SetCapture] 0x%x', [Value]));
|
||||
Widget:=PGtkWidget(Value);
|
||||
Assert(False, Format('Trace:> [TGtkWidgetSet.SetCapture] 0x%x', [AHandle]));
|
||||
Widget := PGtkWidget(AHandle);
|
||||
{$IfDef VerboseMouseCapture}
|
||||
DebugLn('TGtkWidgetSet.SetCapture NewValue=[',GetWidgetDebugReport(Widget),']');
|
||||
{$EndIf}
|
||||
@ -7728,7 +7722,7 @@ begin
|
||||
Result := GetCapture;
|
||||
|
||||
// capture
|
||||
CaptureMouseForWidget(Widget,mctLCL);
|
||||
CaptureMouseForWidget(Widget, mctLCL);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -8217,39 +8211,43 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtkWidgetSet.SetWindowLong(Handle: HWND; Idx: Integer;
|
||||
NewLong: Longint): LongInt;
|
||||
var
|
||||
Data: Pointer;
|
||||
WI: PWidgetInfo;
|
||||
begin
|
||||
//TODO: Finish this;
|
||||
Assert(False, Format('Trace:> [TGtkWidgetSet.SETWINDOWLONG] HWND: 0x%x, idx: 0x%x(%d), Value: 0x%x(%d)', [Handle, idx, idx, newlong, newlong]));
|
||||
Result:=0;
|
||||
Data := Pointer(PtrInt(NewLong));
|
||||
|
||||
case idx of
|
||||
GWL_WNDPROC :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'WNDPROC',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'WNDPROC',Data);
|
||||
end;
|
||||
GWL_HINSTANCE :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'HINSTANCE',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'HINSTANCE',Data);
|
||||
end;
|
||||
GWL_HWNDPARENT :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'HWNDPARENT',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'HWNDPARENT',Data);
|
||||
end;
|
||||
GWL_STYLE :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'Style',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'Style',Data);
|
||||
end;
|
||||
GWL_EXSTYLE :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'ExStyle',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'ExStyle',Data);
|
||||
end;
|
||||
GWL_USERDATA :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'Userdata',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'Userdata',Data);
|
||||
end;
|
||||
GWL_ID :
|
||||
begin
|
||||
gtk_object_set_data(pgtkobject(Handle),'ID',pointer(NewLong));
|
||||
gtk_object_set_data(pgtkobject(Handle),'ID',Data);
|
||||
end;
|
||||
end; //case
|
||||
Assert(False, Format('Trace:< [TGtkWidgetSet.SETWINDOWLONG] HWND: 0x%x, idx: 0x%x(%d), Value: 0x%x(%d) --> 0x%x(%d)', [Handle, idx, idx, newlong, newlong, Result, Result]));
|
||||
@ -8896,6 +8894,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.394 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.393 2005/02/05 13:33:05 mattias
|
||||
implemented gtkwidgetset.IsWindowEnabled
|
||||
|
||||
|
@ -180,7 +180,7 @@ function SetActiveWindow(Handle: HWND): HWND; override;
|
||||
function SetBkColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||
Function SetBkMode(DC: HDC; bkMode : Integer) : Integer; override;
|
||||
Function SetComboMinDropDownSize(Handle: HWND; MinItemsWidth, MinItemsHeight, MinItemCount: integer): boolean; override;
|
||||
Function SetCapture(Value : Longint): Longint; override;
|
||||
function SetCapture(AHandle: HWND): HWND; override;
|
||||
function SetCaretPos(X, Y: Integer): Boolean; override;
|
||||
function SetCaretPosEx(Handle: HWnd; X, Y: Integer): Boolean; override;
|
||||
function SetCaretRespondToFocus(handle: HWND; ShowHideOnFocus: boolean): Boolean; override;
|
||||
@ -215,6 +215,9 @@ Function WindowFromPoint(Point : TPoint) : HWND; override;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.94 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.93 2005/02/05 09:05:51 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
|
@ -57,7 +57,7 @@ type
|
||||
protected
|
||||
class procedure SetCallbacks(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual;
|
||||
public
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): HWND; override;
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure DefaultButtonChanged(const AButton: TCustomButton); override;
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
class procedure SetShortcut(const AButton: TCustomButton; const OldShortcut, NewShortcut: TShortcut); override;
|
||||
@ -74,7 +74,7 @@ type
|
||||
class procedure UpdateLayout(const AInfo: PBitBtnWidgetInfo; const ALayout: TButtonLayout; const AMargin: Integer);
|
||||
class procedure UpdateMargin(const AInfo: PBitBtnWidgetInfo; const ALayout: TButtonLayout; const AMargin: Integer);
|
||||
public
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): THandle; override;
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure SetGlyph(const ABitBtn: TCustomBitBtn; const AValue: TBitmap); override;
|
||||
class procedure SetLayout(const ABitBtn: TCustomBitBtn; const AValue: TButtonLayout); override;
|
||||
class procedure SetMargin(const ABitBtn: TCustomBitBtn; const AValue: Integer); override;
|
||||
@ -114,7 +114,7 @@ end;
|
||||
|
||||
|
||||
function TGtkWSButton.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): THandle;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
Button: TCustomButton;
|
||||
WidgetInfo: PWidgetInfo;
|
||||
@ -218,7 +218,7 @@ end;
|
||||
right, so the invisible is always in position 3.
|
||||
}
|
||||
function TGtkWSBitBtn.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): THandle;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
BitBtn: TCustomBitBtn;
|
||||
WidgetInfo: PWidgetInfo;
|
||||
|
@ -510,7 +510,7 @@ begin
|
||||
|
||||
lisSelected: begin
|
||||
AIsSet := (CListWidget^.selection <> nil)
|
||||
and (g_list_find(CListWidget^.selection, Pointer(Aindex)) <> nil);
|
||||
and (g_list_find(CListWidget^.selection, Pointer(PtrInt(Aindex))) <> nil);
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
|
@ -129,6 +129,7 @@ procedure DebugLn(const s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14: string);
|
||||
procedure DebugLn(const s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15: string);
|
||||
procedure DebugLn(const s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16: string);
|
||||
|
||||
procedure DbgOut(const S: String; Args: array of const);
|
||||
procedure DbgOut(const s: string);
|
||||
procedure DbgOut(const s1,s2: string);
|
||||
procedure DbgOut(const s1,s2,s3: string);
|
||||
@ -939,6 +940,11 @@ begin
|
||||
DebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16);
|
||||
end;
|
||||
|
||||
procedure DbgOut(const S: String; Args: array of const);
|
||||
begin
|
||||
DbgOut(Format(S, Args));
|
||||
end;
|
||||
|
||||
procedure DBGOut(const s: string);
|
||||
begin
|
||||
if Assigned(DebugText) then
|
||||
|
@ -79,30 +79,36 @@ type
|
||||
|
||||
|
||||
{$ifndef win32}
|
||||
{$IFDEF CPU64}
|
||||
// temp solution for 32bit system.Thandle
|
||||
THandle = type PtrInt;
|
||||
HANDLE = THandle;
|
||||
{$ENDIF}
|
||||
|
||||
{ Provided for compatibility with Windows registry ONLY }
|
||||
HKEY = Integer;
|
||||
HDC = type LongWord;
|
||||
HHOOK = type LongWord;
|
||||
HFONT = type LongWord;
|
||||
HGDIOBJ = type LongWord;
|
||||
HPEN = type LongWord;
|
||||
HRGN = type LongWord;
|
||||
HINST = type LongWord;
|
||||
HICON = type LongWord;
|
||||
HDC = type THandle;
|
||||
HHOOK = type THandle;
|
||||
HFONT = type THandle;
|
||||
HGDIOBJ = type THandle;
|
||||
HPEN = type THandle;
|
||||
HRGN = type THandle;
|
||||
HINST = type THandle;
|
||||
HICON = type THandle;
|
||||
HCURSOR = HICON;
|
||||
HGLOBAL = type THandle;
|
||||
HWND = type THandle;
|
||||
HMENU = type THandle;
|
||||
HBITMAP = type THandle;
|
||||
HPALETTE = type THandle;
|
||||
HBRUSH = type THandle;
|
||||
|
||||
Bool = LongBool;
|
||||
HGLOBAL = THandle;
|
||||
Short = SmallInt;
|
||||
HWND = THandle;
|
||||
HMENU = type LongWord;
|
||||
HBITMAP = type LongWord;
|
||||
HPALETTE = type LongWord;
|
||||
|
||||
HBRUSH = type LongWord;
|
||||
|
||||
WPARAM = type LongInt;
|
||||
LPARAM = type LongInt;
|
||||
LRESULT = type LongInt;
|
||||
WPARAM = type PtrInt; //LongInt;
|
||||
LPARAM = type PtrInt; //LongInt;
|
||||
LRESULT = type PtrInt; //LongInt;
|
||||
|
||||
{$else}
|
||||
HKEY = Windows.HKEY;
|
||||
@ -130,6 +136,8 @@ type
|
||||
LRESULT = Windows.LRESULT;
|
||||
{$endif}
|
||||
|
||||
TLCLIntfHandle = type THandle;
|
||||
|
||||
PHKEY = ^HKEY;
|
||||
|
||||
// from Delphis sysutils.pas
|
||||
@ -1718,10 +1726,10 @@ type
|
||||
LOGFONT = LOGFONTA;
|
||||
|
||||
PLogBrush = ^TLogBrush;
|
||||
tagLOGBRUSH = packed record
|
||||
tagLOGBRUSH = record
|
||||
lbStyle: LongWord;
|
||||
lbColor: TColorRef;
|
||||
lbHatch: Longint;
|
||||
lbHatch: PtrInt;
|
||||
end;
|
||||
TLogBrush = tagLOGBRUSH;
|
||||
LOGBRUSH = tagLOGBRUSH;
|
||||
@ -1944,11 +1952,11 @@ type
|
||||
|
||||
type
|
||||
PMsg = ^TMsg;
|
||||
tagMSG = packed record
|
||||
tagMSG = record
|
||||
hwnd: HWND;
|
||||
message: LongWord;
|
||||
wParam: Longint;
|
||||
lParam: Longint;
|
||||
wParam: WPARAM;
|
||||
lParam: LPARAM;
|
||||
time: DWORD;
|
||||
pt: TPoint;
|
||||
end;
|
||||
@ -2312,6 +2320,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.75 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.74 2005/01/08 11:03:18 mattias
|
||||
implemented TPen.Mode=pmXor from Jesus
|
||||
|
||||
|
264
lcl/lmessages.pp
264
lcl/lmessages.pp
@ -247,45 +247,48 @@ const
|
||||
//-------------
|
||||
|
||||
type
|
||||
UINT = LongWord;
|
||||
BOOL = Boolean;
|
||||
// Defined in LCLType
|
||||
// UINT = LongWord;
|
||||
// BOOL = Boolean;
|
||||
|
||||
|
||||
{ LCL Messages }
|
||||
|
||||
TLMDrawItems = record
|
||||
Msg: Cardinal;
|
||||
Ctl : HWND;
|
||||
DrawItemStruct : PDrawItemStruct;
|
||||
Result : LongInt;
|
||||
Ctl: HWND;
|
||||
DrawItemStruct: PDrawItemStruct;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMDrawListItem = record
|
||||
// message from the interface to the LCL
|
||||
Msg: Cardinal;
|
||||
Unused : LongInt;
|
||||
Unused: PtrInt;
|
||||
DrawListItemStruct : PDrawListItemStruct;
|
||||
Result : LongInt;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMMeasureItem = record
|
||||
// message from the interface to the LCL
|
||||
Msg: Cardinal;
|
||||
idCtl: Cardinal;
|
||||
idCtl: PtrUint;
|
||||
MeasureItemStruct: PMeasureItemStruct;
|
||||
Result: LongInt;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
{$if defined(ver1_0) or not(defined(win32))}
|
||||
TLMNoParams = record
|
||||
Msg: Cardinal;
|
||||
Unused: array[0..3] of Word;
|
||||
Result: Longint;
|
||||
Unused: array[0..1] of PtrInt;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
{$else}
|
||||
TLMNoParams = TWMNoParams;
|
||||
{$endif}
|
||||
|
||||
(*
|
||||
//TODO: Remove
|
||||
TLMCanvasCreate = Record
|
||||
pparent : Pointer;
|
||||
pCanvas : Pointer;
|
||||
@ -319,23 +322,27 @@ type
|
||||
PenColor : TGraphicsColor;
|
||||
ReDraw : Boolean;
|
||||
end;
|
||||
*)
|
||||
|
||||
TLMEraseBkgnd = record
|
||||
Msg: Cardinal;
|
||||
DC: HDC;
|
||||
Unused: Longint;
|
||||
Result: Longint;
|
||||
end;
|
||||
Msg: Cardinal;
|
||||
DC: HDC;
|
||||
Unused: PtrInt;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMGetText = record
|
||||
Msg: Cardinal;
|
||||
TextMax: Integer;
|
||||
Text: PChar;
|
||||
Result: Longint;
|
||||
end;
|
||||
Msg: Cardinal;
|
||||
TextMax: PtrInt;
|
||||
Text: PChar;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMGetTextLength = TLMNoParams;
|
||||
|
||||
(*
|
||||
//TODO: remove
|
||||
|
||||
PLMInsertText = ^TLMInsertText;
|
||||
TLMInsertText = record
|
||||
Msg : Cardinal;
|
||||
@ -344,14 +351,14 @@ type
|
||||
Position : Integer;
|
||||
UserData : Pointer;
|
||||
end;
|
||||
|
||||
*)
|
||||
|
||||
TLMKey = record
|
||||
Msg: Cardinal;
|
||||
CharCode: Word;
|
||||
Unused: Word;
|
||||
KeyData: Longint;
|
||||
Result: Longint;
|
||||
KeyData: PtrInt;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMChar = TLMKey;
|
||||
@ -362,70 +369,75 @@ type
|
||||
TLMSysKeyUp = TLMKey;
|
||||
|
||||
|
||||
TLMMouse = packed record
|
||||
Msg : Cardinal;
|
||||
Keys : LongInt;
|
||||
case Integer of
|
||||
0: (
|
||||
XPos: SmallInt;
|
||||
YPos: SmallInt);
|
||||
1: (
|
||||
Pos : TSmallPoint;
|
||||
Result : LongInt);
|
||||
end;
|
||||
|
||||
TLMMouse = record
|
||||
Msg : Cardinal;
|
||||
Keys: PtrInt;
|
||||
case Integer of
|
||||
0: (
|
||||
XPos: SmallInt;
|
||||
YPos: SmallInt);
|
||||
1: (
|
||||
Pos : TSmallPoint);
|
||||
2: (
|
||||
Dummy: LPARAM; // needed for64 bit alignment
|
||||
Result: LRESULT);
|
||||
end;
|
||||
|
||||
TLMMouseMove = TLMMouse;
|
||||
|
||||
TLMMove = record
|
||||
Msg: Cardinal;
|
||||
MoveType: Integer; // 0 = update, 1 = force RequestAlign,
|
||||
// 128 = Source is Interface (Widget has moved)
|
||||
MoveType: PtrInt; // 0 = update, 1 = force RequestAlign,
|
||||
// 128 = Source is Interface (Widget has moved)
|
||||
case Integer of
|
||||
0: (
|
||||
XPos: Smallint;
|
||||
YPos: Smallint);
|
||||
1: (
|
||||
Pos: TSmallPoint;
|
||||
Result: Longint);
|
||||
0: (
|
||||
XPos: Smallint;
|
||||
YPos: Smallint);
|
||||
1: (
|
||||
Pos : TSmallPoint);
|
||||
2: (
|
||||
Dummy: LPARAM; // needed for64 bit alignment
|
||||
Result: LRESULT);
|
||||
end;
|
||||
|
||||
TLMActivate = record
|
||||
Msg: Cardinal;
|
||||
Active: BOOL;
|
||||
Minimized : WordBool;
|
||||
ActiveWindow : HWND;
|
||||
Result: Longint;
|
||||
end;
|
||||
Msg: Cardinal;
|
||||
Active: WordBool;
|
||||
Minimized: WordBool;
|
||||
ActiveWindow: HWND;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMNCActivate = record
|
||||
Msg: Cardinal;
|
||||
Active: BOOL;
|
||||
Unused: Longint;
|
||||
Result: Longint;
|
||||
Active: LongBool;
|
||||
Unused: LPARAM;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMNotify = packed record
|
||||
TLMNotify = record
|
||||
Msg: Cardinal;
|
||||
IDCtrl: Longint;
|
||||
IDCtrl: PtrInt;
|
||||
NMHdr: PNMHdr;
|
||||
Result: Longint;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMNotifyFormat = packed record
|
||||
TLMNotifyFormat = record
|
||||
Msg: Cardinal;
|
||||
From: HWND;
|
||||
Command: Longint;
|
||||
Result: Longint;
|
||||
Command: LPARAM;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMPaint = packed record
|
||||
TLMPaint = record
|
||||
Msg: Cardinal;
|
||||
DC: HDC;
|
||||
PaintStruct: PPaintStruct;
|
||||
Result: Longint;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
(*
|
||||
//TODO: Remove
|
||||
TLMResize = record
|
||||
Msg : Cardinal;
|
||||
Left : Integer;
|
||||
@ -436,9 +448,10 @@ type
|
||||
end;
|
||||
|
||||
TLMMoveResize = TLMResize;
|
||||
*)
|
||||
|
||||
PWindowPos = ^TWindowPos;
|
||||
tagWINDOWPOS = packed record
|
||||
tagWINDOWPOS = record
|
||||
hwnd: THANDLE; //hwnd: hwnd doesnt compile on the next line
|
||||
hwndInsertAfter: THANDLE;
|
||||
x: Integer;
|
||||
@ -452,9 +465,9 @@ type
|
||||
|
||||
TLMWindowPosMsg = record
|
||||
Msg: Cardinal;
|
||||
Unused: Integer;
|
||||
Unused: WPARAM;
|
||||
WindowPos: PWindowPos;
|
||||
Result: Longint;
|
||||
Result: LPARAM;
|
||||
end;
|
||||
|
||||
TLMWindowPosChanged = TLMWindowPosMsg;
|
||||
@ -463,8 +476,8 @@ type
|
||||
{PNCCalcSizeParams}
|
||||
PNCCalcSizeParams = ^TNCCalcSizeParams;
|
||||
tagNCCalcSize_Params = packed record
|
||||
rgrc : Array[0..2] of TRect;
|
||||
lpPos : pWindowPos;
|
||||
rgrc: array[0..2] of TRect;
|
||||
lpPos: PWindowPos;
|
||||
end;
|
||||
TNCCalcSizeParams = tagNCCalcSize_Params;
|
||||
ncCalcSizeParams = tagNCCalcSize_Params;
|
||||
@ -472,7 +485,7 @@ type
|
||||
|
||||
TLMNCCalcSize = record
|
||||
Msg: Cardinal;
|
||||
CalcValidRects: BOOL;
|
||||
CalcValidRects: LongBool;
|
||||
CalcSize_Params: PNCCalcSizeParams;
|
||||
Result: Longint;
|
||||
end;
|
||||
@ -481,37 +494,39 @@ type
|
||||
|
||||
TLMSysCommand = record
|
||||
Msg: Cardinal;
|
||||
case CmdType: Longint of
|
||||
case CmdType: PtrInt of
|
||||
SC_HOTKEY: (
|
||||
ActivateWnd: HWND);
|
||||
ActivateWnd: HWND;
|
||||
Result: LRESULT);
|
||||
SC_KEYMENU: (
|
||||
Key: Word);
|
||||
SC_CLOSE, SC_HSCROLL, SC_MAXIMIZE, SC_MINIMIZE, SC_MOUSEMENU, SC_MOVE,
|
||||
SC_NEXTWINDOW, SC_PREVWINDOW, SC_RESTORE, SC_SCREENSAVE, SC_SIZE,
|
||||
SC_TASKLIST, SC_VSCROLL: (
|
||||
XPos: Smallint;
|
||||
YPos: Smallint;
|
||||
Result: Longint);
|
||||
YPos: Smallint);
|
||||
end;
|
||||
|
||||
TLMSysDeadChar = record
|
||||
Msg: Cardinal;
|
||||
CharCode: Word;
|
||||
Unused: Word;
|
||||
KeyData: Longint;
|
||||
Result: Longint;
|
||||
KeyData: LPARAM;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
|
||||
TLMSystemError = record
|
||||
Msg: Cardinal;
|
||||
ErrSpec: Word;
|
||||
Unused: Longint;
|
||||
Result: Longint;
|
||||
Unused: LPARAM;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMTimeChange = TLMNoParams;
|
||||
|
||||
// TODO: REmove
|
||||
(*
|
||||
//Used to set the statusbar's text
|
||||
PLMSetControlText = ^TLMSetControlText;
|
||||
TLMSetControlText = record
|
||||
@ -519,27 +534,31 @@ type
|
||||
Panel : Integer;
|
||||
Userdata : PChar;
|
||||
end;
|
||||
*)
|
||||
|
||||
TLMSetText = packed record
|
||||
Msg : cardinal;
|
||||
Unused : Longint;
|
||||
Text : PChar;
|
||||
Result : Longint;
|
||||
TLMSetText = record
|
||||
Msg: Cardinal;
|
||||
Unused: WPARAM;
|
||||
Text: PChar;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
|
||||
//TODO: Remove
|
||||
(*
|
||||
TLMKeyEvent = Record
|
||||
Msg : Cardinal;
|
||||
KeyChar : Char;
|
||||
Key : Word;
|
||||
Msg: Cardinal;
|
||||
KeyChar: Char;
|
||||
Key: Word;
|
||||
State : TShiftState;
|
||||
Length : Integer;
|
||||
Str : PChar;
|
||||
UserData : Pointer;
|
||||
end;
|
||||
*)
|
||||
|
||||
//TODO: make compatible with WM_MOUSEWHEEL ?
|
||||
PLMMouseEvent = ^TLMMouseEvent;
|
||||
TLMMouseEvent = Record
|
||||
TLMMouseEvent = record
|
||||
Msg : Cardinal;
|
||||
Button : LongInt;
|
||||
WheelDelta : Longint; { -1 for up, 1 for down }
|
||||
@ -547,8 +566,7 @@ type
|
||||
X : Integer;
|
||||
Y : Integer;
|
||||
UserData : Pointer;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
TLMLButtonDown = TLMMouse;
|
||||
TLMRButtonDown = TLMMouse;
|
||||
@ -566,38 +584,40 @@ type
|
||||
TLMRButtonUp = TLMMouse;
|
||||
TLMMButtonUp = TLMMouse;
|
||||
|
||||
TLMSetFocus = packed record
|
||||
TLMSetFocus = record
|
||||
Msg: Cardinal;
|
||||
FocusedWnd: HWND;
|
||||
Unused: LongInt;
|
||||
Result : LongInt;
|
||||
End;
|
||||
Unused: LPARAM;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
{$if defined(ver1_0) or not(defined(win32))}
|
||||
TLMSize = packed record
|
||||
TLMSize = record
|
||||
Msg: Cardinal;
|
||||
SizeType: LongInt; // see LCLType.pp (e.g. Size_Restored)
|
||||
Width : Word;
|
||||
Height : Word;
|
||||
Result : LongInt;
|
||||
SizeType: PtrInt; // see LCLType.pp (e.g. Size_Restored)
|
||||
Width: Word;
|
||||
Height: Word;
|
||||
Result: LResult;
|
||||
End;
|
||||
{$else}
|
||||
TLMSize = TWMSize;
|
||||
{$endif}
|
||||
|
||||
TLMNoPara = packed record
|
||||
Msg : Cardinal;
|
||||
TLMNoPara = record
|
||||
Msg: Cardinal;
|
||||
end;
|
||||
|
||||
PLMessage = ^TLMessage;
|
||||
{$if defined(ver1_0) or not(defined(win32))}
|
||||
TLMessage = packed record
|
||||
TLMessage = record
|
||||
Msg : Cardinal;
|
||||
case Integer of
|
||||
0 : (
|
||||
WParam: LclType.WPARAM;
|
||||
LParam : LclType.LPARAM;
|
||||
Result : LclType.LRESULT);
|
||||
LParam: LclType.LPARAM;
|
||||
Result: LclType.LRESULT);
|
||||
{$IFNDEF CPU64}
|
||||
// on a 64 bit platform these make no sense
|
||||
1 : (
|
||||
WParamLo: Word;
|
||||
WParamHi: Word;
|
||||
@ -605,6 +625,7 @@ type
|
||||
LParamHi: Word;
|
||||
ResultLo: Word;
|
||||
ResultHi: Word);
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$else}
|
||||
TLMessage = TMessage;
|
||||
@ -615,11 +636,11 @@ type
|
||||
|
||||
{$if defined(ver1_0) or not(defined(win32))}
|
||||
TLMScroll = record
|
||||
Msg : Cardinal;
|
||||
ScrollCode : SmallInt; // SB_xxx
|
||||
Pos : SmallInt;
|
||||
ScrollBar : HWND;
|
||||
Result : LongInt;
|
||||
Msg: Cardinal;
|
||||
ScrollCode: SmallInt; // SB_xxx
|
||||
Pos: SmallInt;
|
||||
ScrollBar: HWND;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
TLMHScroll = TLMScroll;
|
||||
@ -634,8 +655,8 @@ type
|
||||
TLMShowWindow = record
|
||||
Msg: Cardinal;
|
||||
Show: LongBool;
|
||||
Status: Longint;
|
||||
Result: Longint;
|
||||
Status: LPARAM;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
{$else}
|
||||
TLMShowWindow = TWMShowWindow;
|
||||
@ -647,26 +668,28 @@ type
|
||||
TLMKillFocus = TWMKillFocus;
|
||||
{$endif}
|
||||
|
||||
TLMNCHITTEST = packed record
|
||||
Msg : cardinal;
|
||||
Unused : LongInt;
|
||||
TLMNCHITTEST = record
|
||||
Msg: cardinal;
|
||||
Unused: WPARAM;
|
||||
case Integer of
|
||||
0 : (
|
||||
XPos : SmallInt;
|
||||
YPos : SmallInt);
|
||||
1 : (
|
||||
Pos : TSmallPoint;
|
||||
Result : LongInt);
|
||||
0 : (
|
||||
XPos : SmallInt;
|
||||
YPos : SmallInt);
|
||||
1 : (
|
||||
Pos : TSmallPoint);
|
||||
2: (
|
||||
Dummy: LPARAM; // needed for64 bit alignment
|
||||
Result: LRESULT);
|
||||
end;
|
||||
|
||||
TLMDestroy = TLMNoParams;
|
||||
|
||||
TLMCommand = packed record
|
||||
TLMCommand = record
|
||||
Msg: Cardinal;
|
||||
ItemID: Word;
|
||||
NotifyCode: Word;
|
||||
Ctl: HWND;
|
||||
Result: Longint;
|
||||
Result: LRESULT;
|
||||
end;
|
||||
|
||||
|
||||
@ -784,6 +807,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.125 2005/02/05 16:09:52 marc
|
||||
* first 64bit changes
|
||||
|
||||
Revision 1.124 2004/09/24 21:34:14 micha
|
||||
convert LM_CREATE message to interface methods
|
||||
remove SendMsgToInterface, CNSendMessage and related methods
|
||||
|
@ -83,7 +83,7 @@ type
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer); virtual;
|
||||
class function CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): HWND; virtual;
|
||||
const AParams: TCreateParams): TLCLIntfHandle; virtual;
|
||||
class procedure DestroyHandle(const AWinControl: TWinControl); virtual;
|
||||
class procedure Invalidate(const AWinControl: TWinControl); virtual;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); virtual;
|
||||
|
Loading…
Reference in New Issue
Block a user