* Change KeyState and Effect type in DragDrop interface to DWORD. Issue 21973

* fix compilation with fpc trunk. Issue 22023
* Adapt ole demo

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2433 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2012-05-14 02:38:21 +00:00
parent 3be423d4ed
commit 50325e7a18
10 changed files with 99 additions and 87 deletions

View File

@ -947,10 +947,10 @@ type
IDropTargetHelper = interface(IUnknown) IDropTargetHelper = interface(IUnknown)
[SID_IDropTargetHelper] [SID_IDropTargetHelper]
function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function DragLeave: HRESULT; stdcall; function DragLeave: HRESULT; stdcall;
function DragOver(var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Show(fShow: Boolean): HRESULT; stdcall; function Show(fShow: Boolean): HRESULT; stdcall;
end; end;
@ -1046,8 +1046,13 @@ type
function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
procedure ForceDragLeave; stdcall; procedure ForceDragLeave; stdcall;
function GiveFeedback(Effect: Integer): HResult; stdcall; {$IF (FPC_FULLVERSION < 020701) and DEFINED(LCLWin32)}
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; stdcall; function GiveFeedback(Effect: Longint): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Longint): HResult; stdcall;
{$ELSE}
function GiveFeedback(Effect: LongWord): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall;
{$ENDIF}
end; end;
PVTHintData = ^TVTHintData; PVTHintData = ^TVTHintData;
@ -2012,9 +2017,9 @@ type
TVTDragAllowedEvent = procedure(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TVTDragAllowedEvent = procedure(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
var Allowed: Boolean) of object; var Allowed: Boolean) of object;
TVTDragOverEvent = procedure(Sender: TBaseVirtualTree; Source: TObject; Shift: TShiftState; State: TDragState; TVTDragOverEvent = procedure(Sender: TBaseVirtualTree; Source: TObject; Shift: TShiftState; State: TDragState;
const Pt: TPoint; Mode: TDropMode; var Effect: Integer; var Accept: Boolean) of object; const Pt: TPoint; Mode: TDropMode; var Effect: LongWord; var Accept: Boolean) of object;
TVTDragDropEvent = procedure(Sender: TBaseVirtualTree; Source: TObject; DataObject: IDataObject; TVTDragDropEvent = procedure(Sender: TBaseVirtualTree; Source: TObject; DataObject: IDataObject;
Formats: TFormatArray; Shift: TShiftState; const Pt: TPoint; var Effect: Integer; Mode: TDropMode) of object; Formats: TFormatArray; Shift: TShiftState; const Pt: TPoint; var Effect: LongWord; Mode: TDropMode) of object;
TVTRenderOLEDataEvent = procedure(Sender: TBaseVirtualTree; const FormatEtcIn: TFormatEtc; out Medium: TStgMedium; TVTRenderOLEDataEvent = procedure(Sender: TBaseVirtualTree; const FormatEtcIn: TFormatEtc; out Medium: TStgMedium;
ForClipboard: Boolean; var Result: HRESULT) of object; ForClipboard: Boolean; var Result: HRESULT) of object;
TVTGetUserClipboardFormatsEvent = procedure(Sender: TBaseVirtualTree; var Formats: TFormatEtcArray) of object; TVTGetUserClipboardFormatsEvent = procedure(Sender: TBaseVirtualTree; var Formats: TFormatEtcArray) of object;
@ -2660,15 +2665,15 @@ type
procedure DoTimerScroll; virtual; procedure DoTimerScroll; virtual;
procedure DoUpdating(State: TVTUpdateState); virtual; procedure DoUpdating(State: TVTUpdateState); virtual;
function DoValidateCache: Boolean; virtual; function DoValidateCache: Boolean; virtual;
procedure DragAndDrop(AllowedEffects: Integer; DataObject: IDataObject; procedure DragAndDrop(AllowedEffects: LongWord; DataObject: IDataObject;
DragEffect: Integer); virtual; DragEffect: LongWord); virtual;
procedure DragCanceled; override; procedure DragCanceled; override;
function DragDrop(const DataObject: IDataObject; KeyState: Integer; Pt: TPoint; function DragDrop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint;
var Effect: LongWord): HResult; reintroduce; virtual; var Effect: LongWord): HResult; reintroduce; virtual;
function DragEnter(KeyState: Integer; Pt: TPoint; var Effect: LongWord): HResult; virtual; function DragEnter(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; virtual;
procedure DragFinished; virtual; procedure DragFinished; virtual;
procedure DragLeave; virtual; procedure DragLeave; virtual;
function DragOver(Source: TObject; KeyState: Integer; DragState: TDragState; Pt: TPoint; function DragOver(Source: TObject; KeyState: LongWord; DragState: TDragState; Pt: TPoint;
var Effect: LongWord): HResult; reintroduce; virtual; var Effect: LongWord): HResult; reintroduce; virtual;
procedure DrawDottedHLine(const PaintInfo: TVTPaintInfo; Left, Right, Top: Integer); virtual; procedure DrawDottedHLine(const PaintInfo: TVTPaintInfo; Left, Right, Top: Integer); virtual;
procedure DrawDottedVLine(const PaintInfo: TVTPaintInfo; Top, Bottom, Left: Integer); virtual; procedure DrawDottedVLine(const PaintInfo: TVTPaintInfo; Top, Bottom, Left: Integer); virtual;
@ -2744,7 +2749,7 @@ type
procedure StartWheelPanning(const Position: TPoint); virtual; procedure StartWheelPanning(const Position: TPoint); virtual;
procedure StopWheelPanning; virtual; procedure StopWheelPanning; virtual;
procedure StructureChange(Node: PVirtualNode; Reason: TChangeReason); virtual; procedure StructureChange(Node: PVirtualNode; Reason: TChangeReason); virtual;
function SuggestDropEffect(Source: TObject; Shift: TShiftState; const Pt: TPoint; AllowedEffects: Integer): Integer; virtual; function SuggestDropEffect(Source: TObject; Shift: TShiftState; const Pt: TPoint; AllowedEffects: LongWord): LongWord; virtual;
procedure ToggleSelection(StartNode, EndNode: PVirtualNode); virtual; procedure ToggleSelection(StartNode, EndNode: PVirtualNode); virtual;
procedure UnselectNodes(StartNode, EndNode: PVirtualNode); virtual; procedure UnselectNodes(StartNode, EndNode: PVirtualNode); virtual;
//lcl //lcl
@ -3059,7 +3064,7 @@ type
{$ifdef EnablePrint} {$ifdef EnablePrint}
procedure Print(Printer: TPrinter; PrintHeader: Boolean); procedure Print(Printer: TPrinter; PrintHeader: Boolean);
{$endif} {$endif}
function ProcessDrop(DataObject: IDataObject; TargetNode: PVirtualNode; var Effect: Integer; Mode: function ProcessDrop(DataObject: IDataObject; TargetNode: PVirtualNode; var Effect: LongWord; Mode:
TVTNodeAttachMode): Boolean; TVTNodeAttachMode): Boolean;
function ProcessOLEData(Source: TBaseVirtualTree; DataObject: IDataObject; TargetNode: PVirtualNode; function ProcessOLEData(Source: TBaseVirtualTree; DataObject: IDataObject; TargetNode: PVirtualNode;
Mode: TVTNodeAttachMode; Optimized: Boolean): Boolean; Mode: TVTNodeAttachMode; Optimized: Boolean): Boolean;
@ -14653,7 +14658,7 @@ function TBaseVirtualTree.DoDragMsg(ADragMessage: TDragMessage; APosition: TPoin
var var
S: TObject; S: TObject;
ShiftState: Integer; KeyState: LongWord;
P: TPoint; P: TPoint;
Formats: TFormatArray; Formats: TFormatArray;
@ -14683,18 +14688,18 @@ begin
with ScreenToClient(APosition) do with ScreenToClient(APosition) do
DoAutoScroll(X, Y); DoAutoScroll(X, Y);
ShiftState := 0; KeyState := 0;
// Alt key will be queried by the KeysToShiftState function in DragOver. // Alt key will be queried by the KeysToShiftState function in DragOver.
if GetKeyState(VK_SHIFT) < 0 then if GetKeyState(VK_SHIFT) < 0 then
ShiftState := ShiftState or MK_SHIFT; KeyState := KeyState or MK_SHIFT;
if GetKeyState(VK_CONTROL) < 0 then if GetKeyState(VK_CONTROL) < 0 then
ShiftState := ShiftState or MK_CONTROL; KeyState := KeyState or MK_CONTROL;
// Allowed drop effects are simulated for VCL dd. // Allowed drop effects are simulated for VCL dd.
Result := DROPEFFECT_MOVE or DROPEFFECT_COPY; FVCLDragEffect := DROPEFFECT_MOVE or DROPEFFECT_COPY;
DragOver(S, ShiftState, TDragState(ADragMessage), APosition, LongWord(Result)); DragOver(S, KeyState, TDragState(ADragMessage), APosition, FVCLDragEffect);
Result := LRESULT(FVCLDragEffect);
FLastVCLDragTarget := FDropTargetNode; FLastVCLDragTarget := FDropTargetNode;
FVCLDragEffect := LongWord(Result);
if (ADragMessage = dmDragLeave) and Assigned(FDropTargetNode) then if (ADragMessage = dmDragLeave) and Assigned(FDropTargetNode) then
begin begin
InvalidateNode(FDropTargetNode); InvalidateNode(FDropTargetNode);
@ -14703,12 +14708,12 @@ begin
end; end;
dmDragDrop: dmDragDrop:
begin begin
ShiftState := 0; KeyState := 0;
// Alt key will be queried by the KeysToShiftState function in DragOver // Alt key will be queried by the KeysToShiftState function in DragOver
if GetKeyState(VK_SHIFT) < 0 then if GetKeyState(VK_SHIFT) < 0 then
ShiftState := ShiftState or MK_SHIFT; KeyState := KeyState or MK_SHIFT;
if GetKeyState(VK_CONTROL) < 0 then if GetKeyState(VK_CONTROL) < 0 then
ShiftState := ShiftState or MK_CONTROL; KeyState := KeyState or MK_CONTROL;
// allowed drop effects are simulated for VCL dd, // allowed drop effects are simulated for VCL dd,
// replace target node with cached node from other VCL dd messages // replace target node with cached node from other VCL dd messages
@ -14716,7 +14721,7 @@ begin
InvalidateNode(FDropTargetNode); InvalidateNode(FDropTargetNode);
FDropTargetNode := FLastVCLDragTarget; FDropTargetNode := FLastVCLDragTarget;
P := ScreenToClient(APosition); P := ScreenToClient(APosition);
DoDragDrop(S, nil, Formats, KeysToShiftState(ShiftState), P, FVCLDragEffect, FLastDropMode); DoDragDrop(S, nil, Formats, KeysToShiftState(KeyState), P, FVCLDragEffect, FLastDropMode);
if Assigned(FDropTargetNode) then if Assigned(FDropTargetNode) then
begin begin
InvalidateNode(FDropTargetNode); InvalidateNode(FDropTargetNode);
@ -18266,7 +18271,7 @@ procedure TBaseVirtualTree.DoDragging(P: TPoint);
//--------------- local function -------------------------------------------- //--------------- local function --------------------------------------------
function GetDragOperations: Integer; function GetDragOperations: LongWord;
begin begin
if FDragOperations = [] then if FDragOperations = [] then
@ -18286,9 +18291,8 @@ procedure TBaseVirtualTree.DoDragging(P: TPoint);
//--------------- end local function ---------------------------------------- //--------------- end local function ----------------------------------------
var var
DragEffect: LongWord; DragEffect, AllowedEffects: LongWord;
I, I: Integer;
AllowedEffects: Integer;
DragObject: TDragObject; DragObject: TDragObject;
DataObject: IDataObject; DataObject: IDataObject;
@ -19595,8 +19599,8 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
procedure TBaseVirtualTree.DragAndDrop(AllowedEffects: Integer; procedure TBaseVirtualTree.DragAndDrop(AllowedEffects: LongWord;
DataObject: IDataObject; DragEffect: Integer); DataObject: IDataObject; DragEffect: LongWord);
begin begin
{$ifdef Windows} {$ifdef Windows}
@ -19618,7 +19622,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.DragDrop(const DataObject: IDataObject; KeyState: Integer; Pt: TPoint; function TBaseVirtualTree.DragDrop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint;
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
var var
@ -19685,7 +19689,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.DragEnter(KeyState: Integer; Pt: TPoint; var Effect: LongWord): HResult; function TBaseVirtualTree.DragEnter(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult;
// callback routine for the drop target interface // callback routine for the drop target interface
@ -19797,7 +19801,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.DragOver(Source: TObject; KeyState: Integer; DragState: TDragState; Pt: TPoint; function TBaseVirtualTree.DragOver(Source: TObject; KeyState: LongWord; DragState: TDragState; Pt: TPoint;
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
// callback routine for the drop target interface // callback routine for the drop target interface
@ -23338,7 +23342,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.SuggestDropEffect(Source: TObject; Shift: TShiftState; const Pt: TPoint; function TBaseVirtualTree.SuggestDropEffect(Source: TObject; Shift: TShiftState; const Pt: TPoint;
AllowedEffects: Integer): Integer; AllowedEffects: LongWord): LongWord;
// determines the drop action to take if the drag'n drop operation ends on this tree // determines the drop action to take if the drag'n drop operation ends on this tree
// Note: Source can be any Delphi object not just a virtual tree // Note: Source can be any Delphi object not just a virtual tree
@ -29036,7 +29040,7 @@ end;
{$endif} {$endif}
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.ProcessDrop(DataObject: IDataObject; TargetNode: PVirtualNode; var Effect: Integer; function TBaseVirtualTree.ProcessDrop(DataObject: IDataObject; TargetNode: PVirtualNode; var Effect: LongWord;
Mode: TVTNodeAttachMode): Boolean; Mode: TVTNodeAttachMode): Boolean;
// Recreates the (sub) tree structure serialized into memory and provided by DataObject. The new nodes are attached to // Recreates the (sub) tree structure serialized into memory and provided by DataObject. The new nodes are attached to

View File

@ -71,7 +71,7 @@ type
procedure AddUnicodeText(DataObject: IDataObject; Target: TVirtualStringTree; Mode: TVTNodeAttachMode); procedure AddUnicodeText(DataObject: IDataObject; Target: TVirtualStringTree; Mode: TVTNodeAttachMode);
procedure AddVCLText(Target: TVirtualStringTree; const Text: String; Mode: TVTNodeAttachMode); procedure AddVCLText(Target: TVirtualStringTree; const Text: String; Mode: TVTNodeAttachMode);
function FindCPFormatDescription(CPFormat: Word): string; function FindCPFormatDescription(CPFormat: Word): string;
procedure InsertData(Sender: TVirtualStringTree; DataObject: IDataObject; Formats: TFormatArray; Effect: Integer; procedure InsertData(Sender: TVirtualStringTree; DataObject: IDataObject; Formats: TFormatArray; Effect: LongWord;
Mode: TVTNodeAttachMode); Mode: TVTNodeAttachMode);
end; end;
@ -633,7 +633,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
procedure TMainForm.InsertData(Sender: TVirtualStringTree; DataObject: IDataObject; Formats: TFormatArray; procedure TMainForm.InsertData(Sender: TVirtualStringTree; DataObject: IDataObject; Formats: TFormatArray;
Effect: Integer; Mode: TVTNodeAttachMode); Effect: LongWord; Mode: TVTNodeAttachMode);
var var
FormatAccepted: Boolean; FormatAccepted: Boolean;

View File

@ -755,7 +755,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
begin begin
//Result := DRAGDROP_S_USEDEFAULTCURSORS; //Result := DRAGDROP_S_USEDEFAULTCURSORS;
@ -763,7 +763,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
var var
RButton, RButton,

View File

@ -686,7 +686,11 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; {$IF FPC_FULLVERSION < 020701}
function TVTDragManager.GiveFeedback(Effect: Longint): HResult;
{$ELSE}
function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
{$ENDIF}
begin begin
Result := DRAGDROP_S_USEDEFAULTCURSORS; Result := DRAGDROP_S_USEDEFAULTCURSORS;
@ -694,7 +698,11 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; {$IF FPC_FULLVERSION < 020701}
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Longint): HResult;
{$ELSE}
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
{$ENDIF}
var var
RButton, RButton,

View File

@ -291,8 +291,8 @@ type
IDropSource = interface(IUnknown) IDropSource = interface(IUnknown)
['{00000121-0000-0000-C000-000000000046}'] ['{00000121-0000-0000-C000-000000000046}']
function QueryContinueDrag(fEscapePressed: BOOL; function QueryContinueDrag(fEscapePressed: BOOL;
grfKeyState: Longint):HResult;StdCall; grfKeyState: LongWord):HResult;StdCall;
function GiveFeedback(dwEffect: Longint): HResult;StdCall; function GiveFeedback(dwEffect: LongWord): HResult;StdCall;
end; end;
@ -332,10 +332,10 @@ type
IDropTargetHelper = interface(IUnknown) IDropTargetHelper = interface(IUnknown)
[SID_IDropTargetHelper] [SID_IDropTargetHelper]
function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function DragLeave: HRESULT; stdcall; function DragLeave: HRESULT; stdcall;
function DragOver(var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Show(fShow: Boolean): HRESULT; stdcall; function Show(fShow: Boolean): HRESULT; stdcall;
end; end;
@ -434,8 +434,8 @@ type
function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
procedure ForceDragLeave; stdcall; procedure ForceDragLeave; stdcall;
function GiveFeedback(Effect: Integer): HResult; stdcall; function GiveFeedback(Effect: LongWord): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; stdcall; function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall;
end; end;
//Ole helper functions //Ole helper functions
@ -1583,7 +1583,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
begin begin
{$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
@ -1593,7 +1593,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
var var
RButton, RButton,

View File

@ -281,8 +281,8 @@ type
IDropSource = interface(IUnknown) IDropSource = interface(IUnknown)
['{00000121-0000-0000-C000-000000000046}'] ['{00000121-0000-0000-C000-000000000046}']
function QueryContinueDrag(fEscapePressed: BOOL; function QueryContinueDrag(fEscapePressed: BOOL;
grfKeyState: Longint):HResult;StdCall; grfKeyState: DWORD):HResult;StdCall;
function GiveFeedback(dwEffect: Longint): HResult;StdCall; function GiveFeedback(dwEffect: DWORD): HResult;StdCall;
end; end;

View File

@ -291,8 +291,8 @@ type
IDropSource = interface(IUnknown) IDropSource = interface(IUnknown)
['{00000121-0000-0000-C000-000000000046}'] ['{00000121-0000-0000-C000-000000000046}']
function QueryContinueDrag(fEscapePressed: BOOL; function QueryContinueDrag(fEscapePressed: BOOL;
grfKeyState: Longint):HResult;StdCall; grfKeyState: LongWord):HResult;StdCall;
function GiveFeedback(dwEffect: Longint): HResult;StdCall; function GiveFeedback(dwEffect: LongWord): HResult;StdCall;
end; end;
@ -332,10 +332,10 @@ type
IDropTargetHelper = interface(IUnknown) IDropTargetHelper = interface(IUnknown)
[SID_IDropTargetHelper] [SID_IDropTargetHelper]
function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function DragLeave: HRESULT; stdcall; function DragLeave: HRESULT; stdcall;
function DragOver(var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Show(fShow: Boolean): HRESULT; stdcall; function Show(fShow: Boolean): HRESULT; stdcall;
end; end;
@ -434,8 +434,8 @@ type
function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
procedure ForceDragLeave; stdcall; procedure ForceDragLeave; stdcall;
function GiveFeedback(Effect: Integer): HResult; stdcall; function GiveFeedback(Effect: LongWord): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; stdcall; function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall;
end; end;
//Ole helper functions //Ole helper functions
@ -1583,7 +1583,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
begin begin
{$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
@ -1593,7 +1593,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
var var
RButton, RButton,

View File

@ -291,8 +291,8 @@ type
IDropSource = interface(IUnknown) IDropSource = interface(IUnknown)
['{00000121-0000-0000-C000-000000000046}'] ['{00000121-0000-0000-C000-000000000046}']
function QueryContinueDrag(fEscapePressed: BOOL; function QueryContinueDrag(fEscapePressed: BOOL;
grfKeyState: Longint):HResult;StdCall; grfKeyState: LongWord):HResult;StdCall;
function GiveFeedback(dwEffect: Longint): HResult;StdCall; function GiveFeedback(dwEffect: LongWord): HResult;StdCall;
end; end;
@ -332,10 +332,10 @@ type
IDropTargetHelper = interface(IUnknown) IDropTargetHelper = interface(IUnknown)
[SID_IDropTargetHelper] [SID_IDropTargetHelper]
function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function DragLeave: HRESULT; stdcall; function DragLeave: HRESULT; stdcall;
function DragOver(var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Show(fShow: Boolean): HRESULT; stdcall; function Show(fShow: Boolean): HRESULT; stdcall;
end; end;
@ -434,8 +434,8 @@ type
function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
procedure ForceDragLeave; stdcall; procedure ForceDragLeave; stdcall;
function GiveFeedback(Effect: Integer): HResult; stdcall; function GiveFeedback(Effect: LongWord): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; stdcall; function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall;
end; end;
//Ole helper functions //Ole helper functions
@ -1583,7 +1583,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
begin begin
{$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
@ -1593,7 +1593,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
var var
RButton, RButton,

View File

@ -291,8 +291,8 @@ type
IDropSource = interface(IUnknown) IDropSource = interface(IUnknown)
['{00000121-0000-0000-C000-000000000046}'] ['{00000121-0000-0000-C000-000000000046}']
function QueryContinueDrag(fEscapePressed: BOOL; function QueryContinueDrag(fEscapePressed: BOOL;
grfKeyState: Longint):HResult;StdCall; grfKeyState: LongWord):HResult;StdCall;
function GiveFeedback(dwEffect: Longint): HResult;StdCall; function GiveFeedback(dwEffect: LongWord): HResult;StdCall;
end; end;
@ -332,10 +332,10 @@ type
IDropTargetHelper = interface(IUnknown) IDropTargetHelper = interface(IUnknown)
[SID_IDropTargetHelper] [SID_IDropTargetHelper]
function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function DragLeave: HRESULT; stdcall; function DragLeave: HRESULT; stdcall;
function DragOver(var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Show(fShow: Boolean): HRESULT; stdcall; function Show(fShow: Boolean): HRESULT; stdcall;
end; end;
@ -434,8 +434,8 @@ type
function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
procedure ForceDragLeave; stdcall; procedure ForceDragLeave; stdcall;
function GiveFeedback(Effect: Integer): HResult; stdcall; function GiveFeedback(Effect: LongWord): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; stdcall; function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall;
end; end;
//Ole helper functions //Ole helper functions
@ -1583,7 +1583,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
begin begin
{$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif} {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
@ -1593,7 +1593,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
var var
RButton, RButton,

View File

@ -71,10 +71,10 @@ type
IDropTargetHelper = interface(IUnknown) IDropTargetHelper = interface(IUnknown)
[SID_IDropTargetHelper] [SID_IDropTargetHelper]
function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragEnter(hwndTarget: HWND; pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function DragLeave: HRESULT; stdcall; function DragLeave: HRESULT; stdcall;
function DragOver(var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function DragOver(var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: Integer): HRESULT; stdcall; function Drop(pDataObject: IDataObject; var ppt: TPoint; dwEffect: LongWord): HRESULT; stdcall;
function Show(fShow: Boolean): HRESULT; stdcall; function Show(fShow: Boolean): HRESULT; stdcall;
end; end;
@ -173,8 +173,8 @@ type
function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall; function Drop(const DataObject: IDataObject; KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; stdcall;
procedure ForceDragLeave; stdcall; procedure ForceDragLeave; stdcall;
function GiveFeedback(Effect: Integer): HResult; stdcall; function GiveFeedback(Effect: LongWord): HResult; stdcall;
function QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; stdcall; function QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult; stdcall;
end; end;
//Ole helper functions //Ole helper functions
@ -1100,7 +1100,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: LongWord): HResult;
begin begin
Result := DRAGDROP_S_USEDEFAULTCURSORS; Result := DRAGDROP_S_USEDEFAULTCURSORS;
@ -1108,7 +1108,7 @@ end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: Integer): HResult; function TVTDragManager.QueryContinueDrag(EscapePressed: BOOL; KeyState: LongWord): HResult;
var var
RButton, RButton,