You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
uCEFApplicationCore is a VCL-free implementation (no Controls/Forms units, no Application object).
The old uCEFApplication.pas is renamed to uCEFApplicationCore.pas and a new uCEFApplication.pas is created that only contains the Controls/Forms unit related code and is backward compatible to existing code. This allows the creation of a SubProcess executable that doesn't initialize the VCL with all its problems (GlobalAtom leak in Delphi 6-XE, Application.Handle, OleInitialize and other unnecessary init-code). ujCEFMiscFunctions.GefCursorToWindowsCursor is renamed to >>C<<efCursorToWindowsCursor and moved to uCEFApplication.pas to prevent the inclusion of the Controls unit in Delphi 7-XE.
This commit is contained in:
@ -52,8 +52,8 @@ uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX,{$ENDIF} System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
|
||||
{$ELSE}
|
||||
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Controls, Graphics, Math,
|
||||
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Math,
|
||||
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase,{$ENDIF}{$ENDIF}
|
||||
{$ENDIF}
|
||||
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
|
||||
uCEFRegisterCDMCallback, uCEFConstants;
|
||||
@ -223,7 +223,6 @@ function CefIsKeyToggled(aWparam : WPARAM) : boolean;
|
||||
function GetCefMouseModifiers : TCefEventFlags; overload;
|
||||
function GetCefMouseModifiers(awparam : WPARAM) : TCefEventFlags; overload;
|
||||
function GetCefKeyboardModifiers(aWparam : WPARAM; aLparam : LPARAM) : TCefEventFlags;
|
||||
function GefCursorToWindowsCursor(aCefCursor : TCefCursorType) : TCursor;
|
||||
|
||||
procedure DropEffectToDragOperation(aEffect : Longint; var aAllowedOps : TCefDragOperations);
|
||||
procedure DragOperationToDropEffect(const aDragOperations : TCefDragOperations; var aEffect: Longint);
|
||||
@ -248,7 +247,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri
|
||||
implementation
|
||||
|
||||
uses
|
||||
uCEFApplication, uCEFSchemeHandlerFactory, uCEFValue,
|
||||
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
||||
uCEFBinaryValue, uCEFStringList;
|
||||
|
||||
function CefColorGetA(color: TCefColor): Byte;
|
||||
@ -1929,41 +1928,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function GefCursorToWindowsCursor(aCefCursor : TCefCursorType) : TCursor;
|
||||
begin
|
||||
case aCefCursor of
|
||||
CT_POINTER : Result := crArrow;
|
||||
CT_CROSS : Result := crCross;
|
||||
CT_HAND : Result := crHandPoint;
|
||||
CT_IBEAM : Result := crIBeam;
|
||||
CT_WAIT : Result := crHourGlass;
|
||||
CT_HELP : Result := crHelp;
|
||||
CT_EASTRESIZE : Result := crSizeWE;
|
||||
CT_NORTHRESIZE : Result := crSizeNS;
|
||||
CT_NORTHEASTRESIZE : Result := crSizeNESW;
|
||||
CT_NORTHWESTRESIZE : Result := crSizeNWSE;
|
||||
CT_SOUTHRESIZE : Result := crSizeNS;
|
||||
CT_SOUTHEASTRESIZE : Result := crSizeNWSE;
|
||||
CT_SOUTHWESTRESIZE : Result := crSizeNESW;
|
||||
CT_WESTRESIZE : Result := crSizeWE;
|
||||
CT_NORTHSOUTHRESIZE : Result := crSizeNS;
|
||||
CT_EASTWESTRESIZE : Result := crSizeWE;
|
||||
CT_NORTHEASTSOUTHWESTRESIZE : Result := crSizeNESW;
|
||||
CT_NORTHWESTSOUTHEASTRESIZE : Result := crSizeNWSE;
|
||||
CT_COLUMNRESIZE : Result := crHSplit;
|
||||
CT_ROWRESIZE : Result := crVSplit;
|
||||
CT_MOVE : Result := crSizeAll;
|
||||
CT_PROGRESS : Result := crAppStart;
|
||||
CT_NONE : Result := crNone;
|
||||
CT_NODROP,
|
||||
CT_NOTALLOWED : Result := crNo;
|
||||
CT_GRAB,
|
||||
CT_GRABBING : Result := crDrag;
|
||||
|
||||
else Result := crDefault;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure DropEffectToDragOperation(aEffect: Longint; var aAllowedOps : TCefDragOperations);
|
||||
begin
|
||||
aAllowedOps := DRAG_OPERATION_NONE;
|
||||
|
Reference in New Issue
Block a user