mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-05-23 21:50:21 +02:00
Merge pull request #241 from ahausladen/CEFChromiumCore
Combine FMX and VCL/LCL Chromium units Great job Andreas! Thanks a million!
This commit is contained in:
commit
7ebcdf086a
@ -198,6 +198,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Top = 0
|
Top = 0
|
||||||
Width = 25
|
Width = 25
|
||||||
Caption = '►'
|
Caption = '►'
|
||||||
|
Default = True
|
||||||
Font.CharSet = ANSI_CHARSET
|
Font.CharSet = ANSI_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -17
|
Font.Height = -17
|
||||||
@ -244,6 +245,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
OnNavigationVisitorResultAvailable = Chromium1NavigationVisitorResultAvailable
|
OnNavigationVisitorResultAvailable = Chromium1NavigationVisitorResultAvailable
|
||||||
OnDownloadImageFinished = Chromium1DownloadImageFinished
|
OnDownloadImageFinished = Chromium1DownloadImageFinished
|
||||||
OnCookiesFlushed = Chromium1CookiesFlushed
|
OnCookiesFlushed = Chromium1CookiesFlushed
|
||||||
|
OnRenderCompMsg = Chromium1RenderCompMsg
|
||||||
OnLoadEnd = Chromium1LoadEnd
|
OnLoadEnd = Chromium1LoadEnd
|
||||||
OnLoadError = Chromium1LoadError
|
OnLoadError = Chromium1LoadError
|
||||||
OnLoadingStateChange = Chromium1LoadingStateChange
|
OnLoadingStateChange = Chromium1LoadingStateChange
|
||||||
|
@ -22,7 +22,7 @@ package CEF4Delphi;
|
|||||||
{$VARSTRINGCHECKS ON}
|
{$VARSTRINGCHECKS ON}
|
||||||
{$WRITEABLECONST OFF}
|
{$WRITEABLECONST OFF}
|
||||||
{$MINENUMSIZE 1}
|
{$MINENUMSIZE 1}
|
||||||
{$IMAGEBASE $400000}
|
{$IMAGEBASE $54C00000}
|
||||||
{$DEFINE DEBUG}
|
{$DEFINE DEBUG}
|
||||||
{$ENDIF IMPLICITBUILDING}
|
{$ENDIF IMPLICITBUILDING}
|
||||||
{$DESCRIPTION 'CEF4Delphi'}
|
{$DESCRIPTION 'CEF4Delphi'}
|
||||||
@ -102,7 +102,7 @@ contains
|
|||||||
uCEFZipReader in '..\source\uCEFZipReader.pas',
|
uCEFZipReader in '..\source\uCEFZipReader.pas',
|
||||||
uCEFResponse in '..\source\uCEFResponse.pas',
|
uCEFResponse in '..\source\uCEFResponse.pas',
|
||||||
uCEFCookieVisitor in '..\source\uCEFCookieVisitor.pas',
|
uCEFCookieVisitor in '..\source\uCEFCookieVisitor.pas',
|
||||||
uCEFV8Exception in '..\source\uCEFV8Exception.pas',
|
uCEFv8Exception in '..\source\uCEFv8Exception.pas',
|
||||||
uCEFResourceBundleHandler in '..\source\uCEFResourceBundleHandler.pas',
|
uCEFResourceBundleHandler in '..\source\uCEFResourceBundleHandler.pas',
|
||||||
uCEFSetCookieCallback in '..\source\uCEFSetCookieCallback.pas',
|
uCEFSetCookieCallback in '..\source\uCEFSetCookieCallback.pas',
|
||||||
uCEFDeleteCookiesCallback in '..\source\uCEFDeleteCookiesCallback.pas',
|
uCEFDeleteCookiesCallback in '..\source\uCEFDeleteCookiesCallback.pas',
|
||||||
@ -131,6 +131,7 @@ contains
|
|||||||
uCEFImage in '..\source\uCEFImage.pas',
|
uCEFImage in '..\source\uCEFImage.pas',
|
||||||
uCEFMenuModelDelegate in '..\source\uCEFMenuModelDelegate.pas',
|
uCEFMenuModelDelegate in '..\source\uCEFMenuModelDelegate.pas',
|
||||||
uCEFWindowParent in '..\source\uCEFWindowParent.pas',
|
uCEFWindowParent in '..\source\uCEFWindowParent.pas',
|
||||||
|
uCEFChromiumCore in '..\source\uCEFChromiumCore.pas',
|
||||||
uCEFChromium in '..\source\uCEFChromium.pas',
|
uCEFChromium in '..\source\uCEFChromium.pas',
|
||||||
uCEFChromiumEvents in '..\source\uCEFChromiumEvents.pas',
|
uCEFChromiumEvents in '..\source\uCEFChromiumEvents.pas',
|
||||||
uCEFChromiumOptions in '..\source\uCEFChromiumOptions.pas',
|
uCEFChromiumOptions in '..\source\uCEFChromiumOptions.pas',
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
<DCCReference Include="..\source\uCEFZipReader.pas"/>
|
<DCCReference Include="..\source\uCEFZipReader.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFResponse.pas"/>
|
<DCCReference Include="..\source\uCEFResponse.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFCookieVisitor.pas"/>
|
<DCCReference Include="..\source\uCEFCookieVisitor.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFV8Exception.pas"/>
|
<DCCReference Include="..\source\uCEFv8Exception.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFResourceBundleHandler.pas"/>
|
<DCCReference Include="..\source\uCEFResourceBundleHandler.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFSetCookieCallback.pas"/>
|
<DCCReference Include="..\source\uCEFSetCookieCallback.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFDeleteCookiesCallback.pas"/>
|
<DCCReference Include="..\source\uCEFDeleteCookiesCallback.pas"/>
|
||||||
@ -225,6 +225,7 @@
|
|||||||
<DCCReference Include="..\source\uCEFImage.pas"/>
|
<DCCReference Include="..\source\uCEFImage.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFMenuModelDelegate.pas"/>
|
<DCCReference Include="..\source\uCEFMenuModelDelegate.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFWindowParent.pas"/>
|
<DCCReference Include="..\source\uCEFWindowParent.pas"/>
|
||||||
|
<DCCReference Include="..\source\uCEFChromiumCore.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFChromium.pas"/>
|
<DCCReference Include="..\source\uCEFChromium.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFChromiumEvents.pas"/>
|
<DCCReference Include="..\source\uCEFChromiumEvents.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFChromiumOptions.pas"/>
|
<DCCReference Include="..\source\uCEFChromiumOptions.pas"/>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
-W+
|
-W+
|
||||||
-M
|
-M
|
||||||
-$M16384,1048576
|
-$M16384,1048576
|
||||||
-K$00400000
|
-K$54C00000
|
||||||
-N"dcu\"
|
-N"dcu\"
|
||||||
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
@ -21,7 +21,7 @@ package CEF4Delphi_D7;
|
|||||||
{$VARSTRINGCHECKS ON}
|
{$VARSTRINGCHECKS ON}
|
||||||
{$WRITEABLECONST OFF}
|
{$WRITEABLECONST OFF}
|
||||||
{$MINENUMSIZE 1}
|
{$MINENUMSIZE 1}
|
||||||
{$IMAGEBASE $400000}
|
{$IMAGEBASE $54C00000}
|
||||||
{$DESCRIPTION 'CEF4Delphi'}
|
{$DESCRIPTION 'CEF4Delphi'}
|
||||||
{$IMPLICITBUILD OFF}
|
{$IMPLICITBUILD OFF}
|
||||||
{$DEFINE DEBUG}
|
{$DEFINE DEBUG}
|
||||||
@ -100,7 +100,7 @@ contains
|
|||||||
uCEFZipReader in '..\source\uCEFZipReader.pas',
|
uCEFZipReader in '..\source\uCEFZipReader.pas',
|
||||||
uCEFResponse in '..\source\uCEFResponse.pas',
|
uCEFResponse in '..\source\uCEFResponse.pas',
|
||||||
uCEFCookieVisitor in '..\source\uCEFCookieVisitor.pas',
|
uCEFCookieVisitor in '..\source\uCEFCookieVisitor.pas',
|
||||||
uCEFV8Exception in '..\source\uCEFV8Exception.pas',
|
uCEFv8Exception in '..\source\uCEFv8Exception.pas',
|
||||||
uCEFResourceBundleHandler in '..\source\uCEFResourceBundleHandler.pas',
|
uCEFResourceBundleHandler in '..\source\uCEFResourceBundleHandler.pas',
|
||||||
uCEFSetCookieCallback in '..\source\uCEFSetCookieCallback.pas',
|
uCEFSetCookieCallback in '..\source\uCEFSetCookieCallback.pas',
|
||||||
uCEFDeleteCookiesCallback in '..\source\uCEFDeleteCookiesCallback.pas',
|
uCEFDeleteCookiesCallback in '..\source\uCEFDeleteCookiesCallback.pas',
|
||||||
@ -130,6 +130,7 @@ contains
|
|||||||
uCEFMenuModelDelegate in '..\source\uCEFMenuModelDelegate.pas',
|
uCEFMenuModelDelegate in '..\source\uCEFMenuModelDelegate.pas',
|
||||||
uCEFWindowParent in '..\source\uCEFWindowParent.pas',
|
uCEFWindowParent in '..\source\uCEFWindowParent.pas',
|
||||||
uCEFChromium in '..\source\uCEFChromium.pas',
|
uCEFChromium in '..\source\uCEFChromium.pas',
|
||||||
|
uCEFChromiumCore in '..\source\uCEFChromiumCore.pas',
|
||||||
uCEFChromiumEvents in '..\source\uCEFChromiumEvents.pas',
|
uCEFChromiumEvents in '..\source\uCEFChromiumEvents.pas',
|
||||||
uCEFChromiumOptions in '..\source\uCEFChromiumOptions.pas',
|
uCEFChromiumOptions in '..\source\uCEFChromiumOptions.pas',
|
||||||
uCEFChromiumFontOptions in '..\source\uCEFChromiumFontOptions.pas',
|
uCEFChromiumFontOptions in '..\source\uCEFChromiumFontOptions.pas',
|
||||||
|
@ -22,7 +22,7 @@ package CEF4Delphi_FMX;
|
|||||||
{$VARSTRINGCHECKS ON}
|
{$VARSTRINGCHECKS ON}
|
||||||
{$WRITEABLECONST OFF}
|
{$WRITEABLECONST OFF}
|
||||||
{$MINENUMSIZE 1}
|
{$MINENUMSIZE 1}
|
||||||
{$IMAGEBASE $400000}
|
{$IMAGEBASE $54C00000}
|
||||||
{$DEFINE $(FrameworkType)}
|
{$DEFINE $(FrameworkType)}
|
||||||
{$ENDIF IMPLICITBUILDING}
|
{$ENDIF IMPLICITBUILDING}
|
||||||
{$DESCRIPTION 'CEF4Delphi'}
|
{$DESCRIPTION 'CEF4Delphi'}
|
||||||
@ -103,7 +103,7 @@ contains
|
|||||||
uCEFZipReader in '..\source\uCEFZipReader.pas',
|
uCEFZipReader in '..\source\uCEFZipReader.pas',
|
||||||
uCEFResponse in '..\source\uCEFResponse.pas',
|
uCEFResponse in '..\source\uCEFResponse.pas',
|
||||||
uCEFCookieVisitor in '..\source\uCEFCookieVisitor.pas',
|
uCEFCookieVisitor in '..\source\uCEFCookieVisitor.pas',
|
||||||
uCEFV8Exception in '..\source\uCEFV8Exception.pas',
|
uCEFv8Exception in '..\source\uCEFv8Exception.pas',
|
||||||
uCEFResourceBundleHandler in '..\source\uCEFResourceBundleHandler.pas',
|
uCEFResourceBundleHandler in '..\source\uCEFResourceBundleHandler.pas',
|
||||||
uCEFSetCookieCallback in '..\source\uCEFSetCookieCallback.pas',
|
uCEFSetCookieCallback in '..\source\uCEFSetCookieCallback.pas',
|
||||||
uCEFDeleteCookiesCallback in '..\source\uCEFDeleteCookiesCallback.pas',
|
uCEFDeleteCookiesCallback in '..\source\uCEFDeleteCookiesCallback.pas',
|
||||||
@ -132,6 +132,7 @@ contains
|
|||||||
uCEFImage in '..\source\uCEFImage.pas',
|
uCEFImage in '..\source\uCEFImage.pas',
|
||||||
uCEFMenuModelDelegate in '..\source\uCEFMenuModelDelegate.pas',
|
uCEFMenuModelDelegate in '..\source\uCEFMenuModelDelegate.pas',
|
||||||
uCEFWindowParent in '..\source\uCEFWindowParent.pas',
|
uCEFWindowParent in '..\source\uCEFWindowParent.pas',
|
||||||
|
uCEFChromiumCore in '..\source\uCEFChromiumCore.pas',
|
||||||
uCEFChromium in '..\source\uCEFChromium.pas',
|
uCEFChromium in '..\source\uCEFChromium.pas',
|
||||||
uCEFChromiumEvents in '..\source\uCEFChromiumEvents.pas',
|
uCEFChromiumEvents in '..\source\uCEFChromiumEvents.pas',
|
||||||
uCEFChromiumOptions in '..\source\uCEFChromiumOptions.pas',
|
uCEFChromiumOptions in '..\source\uCEFChromiumOptions.pas',
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
<DCCReference Include="..\source\uCEFZipReader.pas"/>
|
<DCCReference Include="..\source\uCEFZipReader.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFResponse.pas"/>
|
<DCCReference Include="..\source\uCEFResponse.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFCookieVisitor.pas"/>
|
<DCCReference Include="..\source\uCEFCookieVisitor.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFV8Exception.pas"/>
|
<DCCReference Include="..\source\uCEFv8Exception.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFResourceBundleHandler.pas"/>
|
<DCCReference Include="..\source\uCEFResourceBundleHandler.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFSetCookieCallback.pas"/>
|
<DCCReference Include="..\source\uCEFSetCookieCallback.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFDeleteCookiesCallback.pas"/>
|
<DCCReference Include="..\source\uCEFDeleteCookiesCallback.pas"/>
|
||||||
@ -247,6 +247,7 @@
|
|||||||
<DCCReference Include="..\source\uCEFImage.pas"/>
|
<DCCReference Include="..\source\uCEFImage.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFMenuModelDelegate.pas"/>
|
<DCCReference Include="..\source\uCEFMenuModelDelegate.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFWindowParent.pas"/>
|
<DCCReference Include="..\source\uCEFWindowParent.pas"/>
|
||||||
|
<DCCReference Include="..\source\uCEFChromiumCore.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFChromium.pas"/>
|
<DCCReference Include="..\source\uCEFChromium.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFChromiumEvents.pas"/>
|
<DCCReference Include="..\source\uCEFChromiumEvents.pas"/>
|
||||||
<DCCReference Include="..\source\uCEFChromiumOptions.pas"/>
|
<DCCReference Include="..\source\uCEFChromiumOptions.pas"/>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
||||||
<License Value="MPL 1.1"/>
|
<License Value="MPL 1.1"/>
|
||||||
<Version Major="78" Minor="3" Release="1"/>
|
<Version Major="78" Minor="3" Release="1"/>
|
||||||
<Files Count="145">
|
<Files Count="146">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||||
<UnitName Value="uCEFAccessibilityHandler"/>
|
<UnitName Value="uCEFAccessibilityHandler"/>
|
||||||
@ -433,8 +433,8 @@
|
|||||||
<UnitName Value="uCEFv8Context"/>
|
<UnitName Value="uCEFv8Context"/>
|
||||||
</Item102>
|
</Item102>
|
||||||
<Item103>
|
<Item103>
|
||||||
<Filename Value="..\source\uCEFV8Exception.pas"/>
|
<Filename Value="..\source\uCEFv8Exception.pas"/>
|
||||||
<UnitName Value="uCEFV8Exception"/>
|
<UnitName Value="uCEFv8Exception"/>
|
||||||
</Item103>
|
</Item103>
|
||||||
<Item104>
|
<Item104>
|
||||||
<Filename Value="..\source\uCEFv8Handler.pas"/>
|
<Filename Value="..\source\uCEFv8Handler.pas"/>
|
||||||
@ -511,107 +511,111 @@
|
|||||||
<UnitName Value="uCEFZipReader"/>
|
<UnitName Value="uCEFZipReader"/>
|
||||||
</Item121>
|
</Item121>
|
||||||
<Item122>
|
<Item122>
|
||||||
|
<Filename Value="..\source\uCEFChromiumCore.pas"/>
|
||||||
|
<UnitName Value="uCEFChromiumCore"/>
|
||||||
|
</Item122>
|
||||||
|
<Item123>
|
||||||
<Filename Value="..\source\uCEFChromium.pas"/>
|
<Filename Value="..\source\uCEFChromium.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="uCEFChromium"/>
|
<UnitName Value="uCEFChromium"/>
|
||||||
</Item122>
|
</Item123>
|
||||||
<Item123>
|
<Item124>
|
||||||
<Filename Value="..\source\uCEFBufferPanel.pas"/>
|
<Filename Value="..\source\uCEFBufferPanel.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="uCEFBufferPanel"/>
|
<UnitName Value="uCEFBufferPanel"/>
|
||||||
</Item123>
|
|
||||||
<Item124>
|
|
||||||
<Filename Value="..\source\uCEFServer.pas"/>
|
|
||||||
<UnitName Value="uCEFServer"/>
|
|
||||||
</Item124>
|
</Item124>
|
||||||
<Item125>
|
<Item125>
|
||||||
|
<Filename Value="..\source\uCEFServer.pas"/>
|
||||||
|
<UnitName Value="uCEFServer"/>
|
||||||
|
</Item125>
|
||||||
|
<Item126>
|
||||||
<Filename Value="..\source\uCEFServerComponent.pas"/>
|
<Filename Value="..\source\uCEFServerComponent.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="uCEFServerComponent"/>
|
<UnitName Value="uCEFServerComponent"/>
|
||||||
</Item125>
|
|
||||||
<Item126>
|
|
||||||
<Filename Value="..\source\uCEFServerEvents.pas"/>
|
|
||||||
<UnitName Value="uCEFServerEvents"/>
|
|
||||||
</Item126>
|
</Item126>
|
||||||
<Item127>
|
<Item127>
|
||||||
<Filename Value="..\source\uCEFServerHandler.pas"/>
|
<Filename Value="..\source\uCEFServerEvents.pas"/>
|
||||||
<UnitName Value="uCEFServerHandler"/>
|
<UnitName Value="uCEFServerEvents"/>
|
||||||
</Item127>
|
</Item127>
|
||||||
<Item128>
|
<Item128>
|
||||||
<Filename Value="..\source\res\tbufferpanel.lrs"/>
|
<Filename Value="..\source\uCEFServerHandler.pas"/>
|
||||||
<Type Value="LRS"/>
|
<UnitName Value="uCEFServerHandler"/>
|
||||||
</Item128>
|
</Item128>
|
||||||
<Item129>
|
<Item129>
|
||||||
<Filename Value="..\source\res\tcefservercomponent.lrs"/>
|
<Filename Value="..\source\res\tbufferpanel.lrs"/>
|
||||||
<Type Value="LRS"/>
|
<Type Value="LRS"/>
|
||||||
</Item129>
|
</Item129>
|
||||||
<Item130>
|
<Item130>
|
||||||
<Filename Value="..\source\res\tcefwindowparent.lrs"/>
|
<Filename Value="..\source\res\tcefservercomponent.lrs"/>
|
||||||
<Type Value="LRS"/>
|
<Type Value="LRS"/>
|
||||||
</Item130>
|
</Item130>
|
||||||
<Item131>
|
<Item131>
|
||||||
<Filename Value="..\source\res\tcefworkscheduler.lrs"/>
|
<Filename Value="..\source\res\tcefwindowparent.lrs"/>
|
||||||
<Type Value="LRS"/>
|
<Type Value="LRS"/>
|
||||||
</Item131>
|
</Item131>
|
||||||
<Item132>
|
<Item132>
|
||||||
<Filename Value="..\source\res\tchromium.lrs"/>
|
<Filename Value="..\source\res\tcefworkscheduler.lrs"/>
|
||||||
<Type Value="LRS"/>
|
<Type Value="LRS"/>
|
||||||
</Item132>
|
</Item132>
|
||||||
<Item133>
|
<Item133>
|
||||||
<Filename Value="..\source\res\tchromiumwindow.lrs"/>
|
<Filename Value="..\source\res\tchromium.lrs"/>
|
||||||
<Type Value="LRS"/>
|
<Type Value="LRS"/>
|
||||||
</Item133>
|
</Item133>
|
||||||
<Item134>
|
<Item134>
|
||||||
<Filename Value="..\source\uCEFWinControl.pas"/>
|
<Filename Value="..\source\res\tchromiumwindow.lrs"/>
|
||||||
<UnitName Value="uCEFWinControl"/>
|
<Type Value="LRS"/>
|
||||||
</Item134>
|
</Item134>
|
||||||
<Item135>
|
<Item135>
|
||||||
|
<Filename Value="..\source\uCEFWinControl.pas"/>
|
||||||
|
<UnitName Value="uCEFWinControl"/>
|
||||||
|
</Item135>
|
||||||
|
<Item136>
|
||||||
<Filename Value="..\source\uCEFLinkedWindowParent.pas"/>
|
<Filename Value="..\source\uCEFLinkedWindowParent.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="uCEFLinkedWindowParent"/>
|
<UnitName Value="uCEFLinkedWindowParent"/>
|
||||||
</Item135>
|
|
||||||
<Item136>
|
|
||||||
<Filename Value="..\source\uCEFUrlRequestClientEvents.pas"/>
|
|
||||||
<UnitName Value="uCEFUrlRequestClientEvents"/>
|
|
||||||
</Item136>
|
</Item136>
|
||||||
<Item137>
|
<Item137>
|
||||||
|
<Filename Value="..\source\uCEFUrlRequestClientEvents.pas"/>
|
||||||
|
<UnitName Value="uCEFUrlRequestClientEvents"/>
|
||||||
|
</Item137>
|
||||||
|
<Item138>
|
||||||
<Filename Value="..\source\uCEFUrlRequestClientComponent.pas"/>
|
<Filename Value="..\source\uCEFUrlRequestClientComponent.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="uCEFUrlRequestClientComponent"/>
|
<UnitName Value="uCEFUrlRequestClientComponent"/>
|
||||||
</Item137>
|
|
||||||
<Item138>
|
|
||||||
<Filename Value="..\source\uCEFOSRIMEHandler.pas"/>
|
|
||||||
<UnitName Value="uCEFOSRIMEHandler"/>
|
|
||||||
</Item138>
|
</Item138>
|
||||||
<Item139>
|
<Item139>
|
||||||
<Filename Value="..\source\uCEFCookieAccessFilter.pas"/>
|
<Filename Value="..\source\uCEFOSRIMEHandler.pas"/>
|
||||||
<UnitName Value="uCEFCookieAccessFilter"/>
|
<UnitName Value="uCEFOSRIMEHandler"/>
|
||||||
</Item139>
|
</Item139>
|
||||||
<Item140>
|
<Item140>
|
||||||
<Filename Value="..\source\uCEFResourceReadCallback.pas"/>
|
<Filename Value="..\source\uCEFCookieAccessFilter.pas"/>
|
||||||
<UnitName Value="uCEFResourceReadCallback"/>
|
<UnitName Value="uCEFCookieAccessFilter"/>
|
||||||
</Item140>
|
</Item140>
|
||||||
<Item141>
|
<Item141>
|
||||||
<Filename Value="..\source\uCEFResourceRequestHandler.pas"/>
|
<Filename Value="..\source\uCEFResourceReadCallback.pas"/>
|
||||||
<UnitName Value="uCEFResourceRequestHandler"/>
|
<UnitName Value="uCEFResourceReadCallback"/>
|
||||||
</Item141>
|
</Item141>
|
||||||
<Item142>
|
<Item142>
|
||||||
<Filename Value="..\source\uCEFResourceSkipCallback.pas"/>
|
<Filename Value="..\source\uCEFResourceRequestHandler.pas"/>
|
||||||
<UnitName Value="uCEFResourceSkipCallback"/>
|
<UnitName Value="uCEFResourceRequestHandler"/>
|
||||||
</Item142>
|
</Item142>
|
||||||
<Item143>
|
<Item143>
|
||||||
<Filename Value="..\source\res\tcefsentinel.lrs"/>
|
<Filename Value="..\source\uCEFResourceSkipCallback.pas"/>
|
||||||
<Type Value="LRS"/>
|
<UnitName Value="uCEFResourceSkipCallback"/>
|
||||||
</Item143>
|
</Item143>
|
||||||
<Item144>
|
<Item144>
|
||||||
|
<Filename Value="..\source\res\tcefsentinel.lrs"/>
|
||||||
|
<Type Value="LRS"/>
|
||||||
|
</Item144>
|
||||||
|
<Item145>
|
||||||
<Filename Value="..\source\uCEFSentinel.pas"/>
|
<Filename Value="..\source\uCEFSentinel.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="uCEFSentinel"/>
|
<UnitName Value="uCEFSentinel"/>
|
||||||
</Item144>
|
</Item145>
|
||||||
<Item145>
|
<Item146>
|
||||||
<Filename Value="..\source\uCEFApplicationCore.pas"/>
|
<Filename Value="..\source\uCEFApplicationCore.pas"/>
|
||||||
<UnitName Value="uCEFApplicationCore"/>
|
<UnitName Value="uCEFApplicationCore"/>
|
||||||
</Item145>
|
</Item146>
|
||||||
</Files>
|
</Files>
|
||||||
<RequiredPkgs Count="3">
|
<RequiredPkgs Count="3">
|
||||||
<Item1>
|
<Item1>
|
||||||
|
@ -39,17 +39,18 @@ uses
|
|||||||
uCEFStringMap, uCEFStringMultimap, uCEFStringVisitor, uCEFTask,
|
uCEFStringMap, uCEFStringMultimap, uCEFStringVisitor, uCEFTask,
|
||||||
uCEFTaskRunner, uCEFThread, uCEFTypes, uCEFUrlRequest, uCEFUrlrequestClient,
|
uCEFTaskRunner, uCEFThread, uCEFTypes, uCEFUrlRequest, uCEFUrlrequestClient,
|
||||||
uCEFv8Accessor, uCEFv8ArrayBufferReleaseCallback, uCEFv8Context,
|
uCEFv8Accessor, uCEFv8ArrayBufferReleaseCallback, uCEFv8Context,
|
||||||
uCEFV8Exception, uCEFv8Handler, uCEFv8Interceptor, uCEFv8StackFrame,
|
uCEFv8Exception, uCEFv8Handler, uCEFv8Interceptor, uCEFv8StackFrame,
|
||||||
uCEFv8StackTrace, uCEFv8Value, uCEFValue, uCEFWaitableEvent,
|
uCEFv8StackTrace, uCEFv8Value, uCEFValue, uCEFWaitableEvent,
|
||||||
uCEFWebPluginInfo, uCEFWebPluginInfoVisitor, uCEFWebPluginUnstableCallback,
|
uCEFWebPluginInfo, uCEFWebPluginInfoVisitor, uCEFWebPluginUnstableCallback,
|
||||||
uCEFWindowParent, uCEFWorkScheduler, uCEFWorkSchedulerThread,
|
uCEFWindowParent, uCEFWorkScheduler, uCEFWorkSchedulerThread,
|
||||||
uCEFWriteHandler, uCEFX509Certificate, uCEFX509CertPrincipal, uCEFXmlReader,
|
uCEFWriteHandler, uCEFX509Certificate, uCEFX509CertPrincipal, uCEFXmlReader,
|
||||||
uCEFZipReader, uCEFChromium, uCEFBufferPanel, uCEFServer,
|
uCEFZipReader, uCEFChromiumCore, uCEFChromium, uCEFBufferPanel, uCEFServer,
|
||||||
uCEFServerComponent, uCEFServerEvents, uCEFServerHandler, uCEFWinControl,
|
uCEFServerComponent, uCEFServerEvents, uCEFServerHandler, uCEFWinControl,
|
||||||
uCEFLinkedWindowParent, uCEFUrlRequestClientEvents,
|
uCEFLinkedWindowParent, uCEFUrlRequestClientEvents,
|
||||||
uCEFUrlRequestClientComponent, uCEFOSRIMEHandler, uCEFCookieAccessFilter,
|
uCEFUrlRequestClientComponent, uCEFOSRIMEHandler, uCEFCookieAccessFilter,
|
||||||
uCEFResourceReadCallback, uCEFResourceRequestHandler,
|
uCEFResourceReadCallback, uCEFResourceRequestHandler,
|
||||||
uCEFResourceSkipCallback, uCEFSentinel, LazarusPackageIntf;
|
uCEFResourceSkipCallback, uCEFSentinel, uCEFApplicationCore,
|
||||||
|
LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -884,12 +884,11 @@ function TCefApplicationCore.CheckCEFLibrary : boolean;
|
|||||||
var
|
var
|
||||||
TempString, TempOldDir : string;
|
TempString, TempOldDir : string;
|
||||||
TempMissingFrm, TempMissingRsc, TempMissingLoc, TempMissingSubProc : boolean;
|
TempMissingFrm, TempMissingRsc, TempMissingLoc, TempMissingSubProc : boolean;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
TempMachine : integer;
|
TempMachine : integer;
|
||||||
TempVersionInfo : TFileVersionInfo;
|
TempVersionInfo : TFileVersionInfo;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
{$IFNDEF MSWINDOWS}
|
|
||||||
Result := True;
|
|
||||||
{$ELSE}
|
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
if not(FCheckCEFFiles) or (FProcessType <> ptBrowser) then
|
if not(FCheckCEFFiles) or (FProcessType <> ptBrowser) then
|
||||||
@ -901,93 +900,99 @@ begin
|
|||||||
TempOldDir := GetCurrentDir;
|
TempOldDir := GetCurrentDir;
|
||||||
chdir(GetModulePath);
|
chdir(GetModulePath);
|
||||||
end;
|
end;
|
||||||
|
try
|
||||||
|
TempMissingSubProc := not(CheckSubprocessPath(FBrowserSubprocessPath, FMissingLibFiles));
|
||||||
|
TempMissingFrm := not(CheckDLLs(FFrameworkDirPath, FMissingLibFiles));
|
||||||
|
TempMissingRsc := not(CheckResources(FResourcesDirPath, FMissingLibFiles, FCheckDevToolsResources, not(FDisableExtensions)));
|
||||||
|
TempMissingLoc := not(CheckLocales(FLocalesDirPath, FMissingLibFiles, FLocalesRequired));
|
||||||
|
|
||||||
TempMissingSubProc := not(CheckSubprocessPath(FBrowserSubprocessPath, FMissingLibFiles));
|
if TempMissingFrm or TempMissingRsc or TempMissingLoc or TempMissingSubProc then
|
||||||
TempMissingFrm := not(CheckDLLs(FFrameworkDirPath, FMissingLibFiles));
|
|
||||||
TempMissingRsc := not(CheckResources(FResourcesDirPath, FMissingLibFiles, FCheckDevToolsResources, not(FDisableExtensions)));
|
|
||||||
TempMissingLoc := not(CheckLocales(FLocalesDirPath, FMissingLibFiles, FLocalesRequired));
|
|
||||||
|
|
||||||
if TempMissingFrm or TempMissingRsc or TempMissingLoc or TempMissingSubProc then
|
|
||||||
begin
|
|
||||||
FStatus := asErrorMissingFiles;
|
|
||||||
TempString := 'CEF binaries missing !';
|
|
||||||
|
|
||||||
if (length(FMissingLibFiles) > 0) then
|
|
||||||
TempString := TempString + CRLF + CRLF +
|
|
||||||
'The missing files are :' + CRLF +
|
|
||||||
trim(FMissingLibFiles);
|
|
||||||
|
|
||||||
ShowErrorMessageDlg(TempString);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if CheckDLLVersion(LibCefPath,
|
|
||||||
CEF_SUPPORTED_VERSION_MAJOR,
|
|
||||||
CEF_SUPPORTED_VERSION_MINOR,
|
|
||||||
CEF_SUPPORTED_VERSION_RELEASE,
|
|
||||||
CEF_SUPPORTED_VERSION_BUILD) then
|
|
||||||
begin
|
begin
|
||||||
if GetDLLHeaderMachine(LibCefPath, TempMachine) then
|
FStatus := asErrorMissingFiles;
|
||||||
case TempMachine of
|
TempString := 'CEF binaries missing !';
|
||||||
CEF_IMAGE_FILE_MACHINE_I386 :
|
|
||||||
if Is32BitProcess then
|
|
||||||
Result := True
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
FStatus := asErrorDLLVersion;
|
|
||||||
TempString := 'Wrong CEF binaries !' +
|
|
||||||
CRLF + CRLF +
|
|
||||||
'Use the 32 bit CEF binaries with 32 bits applications only.';
|
|
||||||
|
|
||||||
ShowErrorMessageDlg(TempString);
|
if (length(FMissingLibFiles) > 0) then
|
||||||
end;
|
|
||||||
|
|
||||||
CEF_IMAGE_FILE_MACHINE_AMD64 :
|
|
||||||
if not(Is32BitProcess) then
|
|
||||||
Result := True
|
|
||||||
else
|
|
||||||
|
|
||||||
begin
|
|
||||||
FStatus := asErrorDLLVersion;
|
|
||||||
TempString := 'Wrong CEF binaries !' +
|
|
||||||
CRLF + CRLF +
|
|
||||||
'Use the 64 bit CEF binaries with 64 bits applications only.';
|
|
||||||
|
|
||||||
ShowErrorMessageDlg(TempString);
|
|
||||||
end;
|
|
||||||
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
FStatus := asErrorDLLVersion;
|
|
||||||
TempString := 'Unknown CEF binaries !' +
|
|
||||||
CRLF + CRLF +
|
|
||||||
'Use only the CEF binaries specified in the CEF4Delphi Readme.md file at ' +
|
|
||||||
CEF4DELPHI_URL;
|
|
||||||
|
|
||||||
ShowErrorMessageDlg(TempString);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
Result := True;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
FStatus := asErrorDLLVersion;
|
|
||||||
TempString := 'Unsupported CEF version !' +
|
|
||||||
CRLF + CRLF +
|
|
||||||
'Use only the CEF binaries specified in the CEF4Delphi Readme.md file at ' +
|
|
||||||
CEF4DELPHI_URL;
|
|
||||||
|
|
||||||
if GetDLLVersion(LibCefPath, TempVersionInfo) then
|
|
||||||
TempString := TempString + CRLF + CRLF +
|
TempString := TempString + CRLF + CRLF +
|
||||||
'Expected ' + LIBCEF_DLL + ' version : ' + LibCefVersion + CRLF +
|
'The missing files are :' + CRLF +
|
||||||
'Found ' + LIBCEF_DLL + ' version : ' + FileVersionInfoToString(TempVersionInfo);
|
trim(FMissingLibFiles);
|
||||||
|
|
||||||
ShowErrorMessageDlg(TempString);
|
ShowErrorMessageDlg(TempString);
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
if CheckDLLVersion(LibCefPath,
|
||||||
|
CEF_SUPPORTED_VERSION_MAJOR,
|
||||||
|
CEF_SUPPORTED_VERSION_MINOR,
|
||||||
|
CEF_SUPPORTED_VERSION_RELEASE,
|
||||||
|
CEF_SUPPORTED_VERSION_BUILD) then
|
||||||
|
begin
|
||||||
|
if GetDLLHeaderMachine(LibCefPath, TempMachine) then
|
||||||
|
case TempMachine of
|
||||||
|
CEF_IMAGE_FILE_MACHINE_I386 :
|
||||||
|
if Is32BitProcess then
|
||||||
|
Result := True
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FStatus := asErrorDLLVersion;
|
||||||
|
TempString := 'Wrong CEF binaries !' +
|
||||||
|
CRLF + CRLF +
|
||||||
|
'Use the 32 bit CEF binaries with 32 bits applications only.';
|
||||||
|
|
||||||
if FSetCurrentDir then chdir(TempOldDir);
|
ShowErrorMessageDlg(TempString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
CEF_IMAGE_FILE_MACHINE_AMD64 :
|
||||||
|
if not(Is32BitProcess) then
|
||||||
|
Result := True
|
||||||
|
else
|
||||||
|
|
||||||
|
begin
|
||||||
|
FStatus := asErrorDLLVersion;
|
||||||
|
TempString := 'Wrong CEF binaries !' +
|
||||||
|
CRLF + CRLF +
|
||||||
|
'Use the 64 bit CEF binaries with 64 bits applications only.';
|
||||||
|
|
||||||
|
ShowErrorMessageDlg(TempString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FStatus := asErrorDLLVersion;
|
||||||
|
TempString := 'Unknown CEF binaries !' +
|
||||||
|
CRLF + CRLF +
|
||||||
|
'Use only the CEF binaries specified in the CEF4Delphi Readme.md file at ' +
|
||||||
|
CEF4DELPHI_URL;
|
||||||
|
|
||||||
|
ShowErrorMessageDlg(TempString);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FStatus := asErrorDLLVersion;
|
||||||
|
TempString := 'Unsupported CEF version !' +
|
||||||
|
CRLF + CRLF +
|
||||||
|
'Use only the CEF binaries specified in the CEF4Delphi Readme.md file at ' +
|
||||||
|
CEF4DELPHI_URL;
|
||||||
|
|
||||||
|
if GetDLLVersion(LibCefPath, TempVersionInfo) then
|
||||||
|
TempString := TempString + CRLF + CRLF +
|
||||||
|
'Expected ' + LIBCEF_DLL + ' version : ' + LibCefVersion + CRLF +
|
||||||
|
'Found ' + LIBCEF_DLL + ' version : ' + FileVersionInfoToString(TempVersionInfo);
|
||||||
|
|
||||||
|
ShowErrorMessageDlg(TempString);
|
||||||
|
end;
|
||||||
|
{$ELSE}
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
finally
|
||||||
|
if FSetCurrentDir then chdir(TempOldDir);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefApplicationCore.StartMainProcess : boolean;
|
function TCefApplicationCore.StartMainProcess : boolean;
|
||||||
@ -1269,7 +1274,11 @@ begin
|
|||||||
{$IFDEF DELPHI14_UP}
|
{$IFDEF DELPHI14_UP}
|
||||||
TempThread.Start;
|
TempThread.Start;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
{$IFNDEF FPC}
|
||||||
TempThread.Resume;
|
TempThread.Resume;
|
||||||
|
{$ELSE}
|
||||||
|
TempThread.Start;
|
||||||
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1527,8 +1536,10 @@ procedure TCefApplicationCore.Internal_OnBeforeCommandLineProcessing(const proce
|
|||||||
const commandLine : ICefCommandLine);
|
const commandLine : ICefCommandLine);
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
TempVersionInfo : TFileVersionInfo;
|
TempVersionInfo : TFileVersionInfo;
|
||||||
TempFileName : string;
|
TempFileName : string;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
if (commandLine <> nil) and (FProcessType = ptBrowser) and (processType = '') then
|
if (commandLine <> nil) and (FProcessType = ptBrowser) and (processType = '') then
|
||||||
begin
|
begin
|
||||||
@ -1867,11 +1878,7 @@ begin
|
|||||||
ZeroMemory(@TempMemCtrs, SizeOf(TProcessMemoryCounters));
|
ZeroMemory(@TempMemCtrs, SizeOf(TProcessMemoryCounters));
|
||||||
TempMemCtrs.cb := SizeOf(TProcessMemoryCounters);
|
TempMemCtrs.cb := SizeOf(TProcessMemoryCounters);
|
||||||
|
|
||||||
{$IFDEF FPC}
|
if GetProcessMemoryInfo(TempProcHWND, {$IFNDEF FPC}@{$ENDIF}TempMemCtrs, TempMemCtrs.cb) then inc(Result, TempMemCtrs.WorkingSetSize);
|
||||||
if GetProcessMemoryInfo(TempProcHWND, TempMemCtrs, TempMemCtrs.cb) then inc(Result, TempMemCtrs.WorkingSetSize);
|
|
||||||
{$ELSE}
|
|
||||||
if GetProcessMemoryInfo(TempProcHWND, @TempMemCtrs, TempMemCtrs.cb) then inc(Result, TempMemCtrs.WorkingSetSize);
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
CloseHandle(TempProcHWND);
|
CloseHandle(TempProcHWND);
|
||||||
end;
|
end;
|
||||||
|
File diff suppressed because it is too large
Load Diff
4971
source/uCEFChromiumCore.pas
Normal file
4971
source/uCEFChromiumCore.pas
Normal file
File diff suppressed because it is too large
Load Diff
@ -116,6 +116,14 @@ implementation
|
|||||||
uses
|
uses
|
||||||
uCEFMiscFunctions, uCEFWriteHandler, uCEFStreamWriter, uCEFConstants;
|
uCEFMiscFunctions, uCEFWriteHandler, uCEFStreamWriter, uCEFConstants;
|
||||||
|
|
||||||
|
{$IFDEF FPC}
|
||||||
|
const
|
||||||
|
//CFSTR_FILEDESCRIPTORA = 'FileGroupDescriptor'; // CF_FILEGROUPDESCRIPTORA
|
||||||
|
CFSTR_FILEDESCRIPTORW = 'FileGroupDescriptorW'; // CF_FILEGROUPDESCRIPTORW
|
||||||
|
CFSTR_FILEDESCRIPTOR = CFSTR_FILEDESCRIPTORW;
|
||||||
|
CFSTR_FILECONTENTS = 'FileContents'; // CF_FILECONTENTS
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
// **************** TCEFDragAndDropMgr *****************
|
// **************** TCEFDragAndDropMgr *****************
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
@ -667,7 +675,11 @@ begin
|
|||||||
while (TempEnumFrmt.Next(1, TempFormat, nil) = S_OK) and not(TempUsed) do
|
while (TempEnumFrmt.Next(1, TempFormat, nil) = S_OK) and not(TempUsed) do
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
|
{$IFNDEF FPC}
|
||||||
TempMedium.unkForRelease := nil;
|
TempMedium.unkForRelease := nil;
|
||||||
|
{$ELSE}
|
||||||
|
TempMedium.PUnkForRelease := nil;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
if ((TempFormat.tymed and TYMED_HGLOBAL) <> 0) and
|
if ((TempFormat.tymed and TYMED_HGLOBAL) <> 0) and
|
||||||
(aDataObject.GetData(TempFormat, TempMedium) = S_OK) then
|
(aDataObject.GetData(TempFormat, TempMedium) = S_OK) then
|
||||||
@ -722,7 +734,11 @@ begin
|
|||||||
TempResEffect := DROPEFFECT_NONE;
|
TempResEffect := DROPEFFECT_NONE;
|
||||||
TempDataObject := TOLEDataObject.Create(TempFormatArray, TempMediumArray, i);
|
TempDataObject := TOLEDataObject.Create(TempFormatArray, TempMediumArray, i);
|
||||||
TempDropSource := TOLEDropSource.Create;
|
TempDropSource := TOLEDropSource.Create;
|
||||||
|
{$IFNDEF FPC}
|
||||||
TempResult := DoDragDrop(TempDataObject, TempDropSource, FOLEEffect, TempResEffect);
|
TempResult := DoDragDrop(TempDataObject, TempDropSource, FOLEEffect, TempResEffect);
|
||||||
|
{$ELSE}
|
||||||
|
TempResult := DoDragDrop(TempDataObject, TempDropSource, DWORD(FOLEEffect), LPDWORD(TempResEffect));
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
if (TempResult <> DRAGDROP_S_DROP) then TempResEffect := DROPEFFECT_NONE;
|
if (TempResult <> DRAGDROP_S_DROP) then TempResEffect := DROPEFFECT_NONE;
|
||||||
FCurrentDragData := nil;
|
FCurrentDragData := nil;
|
||||||
|
@ -70,7 +70,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFMiscFunctions, uCEFLibFunctions, uCEFDictionaryValue, uCEFRequestContext, uCefExtensionHandler;
|
uCEFMiscFunctions, uCEFLibFunctions, uCEFDictionaryValue, uCEFRequestContext, uCEFExtensionHandler;
|
||||||
|
|
||||||
function TCefExtensionRef.GetIdentifier : ustring;
|
function TCefExtensionRef.GetIdentifier : ustring;
|
||||||
begin
|
begin
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -53,7 +53,7 @@ uses
|
|||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX,{$ENDIF} System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX,{$ENDIF} System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Math,
|
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Math,
|
||||||
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase,{$ENDIF}{$ENDIF}
|
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
|
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
|
||||||
uCEFRegisterCDMCallback, uCEFConstants;
|
uCEFRegisterCDMCallback, uCEFConstants;
|
||||||
@ -104,9 +104,9 @@ function cef_string_utf16_copy(const src: PChar16; src_len: NativeUInt; output:
|
|||||||
function cef_string_copy(const src: PCefChar; src_len: NativeUInt; output: PCefString): Integer;
|
function cef_string_copy(const src: PCefChar; src_len: NativeUInt; output: PCefString): Integer;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : THandle; aRect : TRect; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
||||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
||||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF MACOS}
|
{$IFDEF MACOS}
|
||||||
@ -136,6 +136,8 @@ function PathIsURLAnsi(pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name
|
|||||||
function PathIsURLUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsURLW';
|
function PathIsURLUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsURLW';
|
||||||
|
|
||||||
{$IFNDEF DELPHI12_UP}
|
{$IFNDEF DELPHI12_UP}
|
||||||
|
const
|
||||||
|
GWLP_WNDPROC = GWL_WNDPROC;
|
||||||
{$IFDEF WIN64}
|
{$IFDEF WIN64}
|
||||||
function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: int64): int64; stdcall; external user32 name 'SetWindowLongPtrW';
|
function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: int64): int64; stdcall; external user32 name 'SetWindowLongPtrW';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -561,7 +563,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : THandle; aRect : TRect; const aWindowName : ustring; aExStyle : cardinal);
|
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring; aExStyle : cardinal);
|
||||||
begin
|
begin
|
||||||
aWindowInfo.ex_style := aExStyle;
|
aWindowInfo.ex_style := aExStyle;
|
||||||
aWindowInfo.window_name := CefString(aWindowName);
|
aWindowInfo.window_name := CefString(aWindowName);
|
||||||
@ -578,7 +580,7 @@ begin
|
|||||||
aWindowInfo.window := 0;
|
aWindowInfo.window := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring; aExStyle : cardinal);
|
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aExStyle : cardinal);
|
||||||
begin
|
begin
|
||||||
aWindowInfo.ex_style := aExStyle;
|
aWindowInfo.ex_style := aExStyle;
|
||||||
aWindowInfo.window_name := CefString(aWindowName);
|
aWindowInfo.window_name := CefString(aWindowName);
|
||||||
@ -595,7 +597,7 @@ begin
|
|||||||
aWindowInfo.window := 0;
|
aWindowInfo.window := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; const aWindowName : ustring; aExStyle : cardinal);
|
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aExStyle : cardinal);
|
||||||
begin
|
begin
|
||||||
aWindowInfo.ex_style := aExStyle;
|
aWindowInfo.ex_style := aExStyle;
|
||||||
aWindowInfo.window_name := CefString(aWindowName);
|
aWindowInfo.window_name := CefString(aWindowName);
|
||||||
@ -629,7 +631,7 @@ begin
|
|||||||
aWindowInfo.view := 0;
|
aWindowInfo.view := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : THandle; aHidden : boolean; const aWindowName : ustring);
|
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aHidden : boolean; const aWindowName : ustring);
|
||||||
begin
|
begin
|
||||||
aWindowInfo.window_name := CefString(aWindowName);
|
aWindowInfo.window_name := CefString(aWindowName);
|
||||||
aWindowInfo.x := integer(CW_USEDEFAULT);
|
aWindowInfo.x := integer(CW_USEDEFAULT);
|
||||||
@ -644,7 +646,7 @@ begin
|
|||||||
aWindowInfo.view := 0;
|
aWindowInfo.view := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : THandle; aHidden : boolean; const aWindowName : ustring);
|
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aHidden : boolean; const aWindowName : ustring);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
aWindowInfo.window_name := CefString(aWindowName);
|
aWindowInfo.window_name := CefString(aWindowName);
|
||||||
@ -879,9 +881,10 @@ function SplitLongString(aSrcString : string) : string;
|
|||||||
const
|
const
|
||||||
MAXLINELENGTH = 50;
|
MAXLINELENGTH = 50;
|
||||||
begin
|
begin
|
||||||
|
Result := '';
|
||||||
while (length(aSrcString) > 0) do
|
while (length(aSrcString) > 0) do
|
||||||
begin
|
begin
|
||||||
if (length(Result) > 0) then
|
if (Result <> '') then
|
||||||
Result := Result + CRLF + copy(aSrcString, 1, MAXLINELENGTH)
|
Result := Result + CRLF + copy(aSrcString, 1, MAXLINELENGTH)
|
||||||
else
|
else
|
||||||
Result := Result + copy(aSrcString, 1, MAXLINELENGTH);
|
Result := Result + copy(aSrcString, 1, MAXLINELENGTH);
|
||||||
@ -972,7 +975,7 @@ begin
|
|||||||
if (length(aLocalesDirPath) > 0) then
|
if (length(aLocalesDirPath) > 0) then
|
||||||
TempDir := IncludeTrailingPathDelimiter(aLocalesDirPath)
|
TempDir := IncludeTrailingPathDelimiter(aLocalesDirPath)
|
||||||
else
|
else
|
||||||
TempDir := 'locales\';
|
TempDir := 'locales' + PathDelim;
|
||||||
|
|
||||||
TempList := TStringList.Create;
|
TempList := TStringList.Create;
|
||||||
|
|
||||||
@ -1071,11 +1074,19 @@ begin
|
|||||||
TempList := TStringList.Create;
|
TempList := TStringList.Create;
|
||||||
TempList.Add(TempDir + CHROMEELF_DLL);
|
TempList.Add(TempDir + CHROMEELF_DLL);
|
||||||
TempList.Add(TempDir + LIBCEF_DLL);
|
TempList.Add(TempDir + LIBCEF_DLL);
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
TempList.Add(TempDir + 'd3dcompiler_47.dll');
|
TempList.Add(TempDir + 'd3dcompiler_47.dll');
|
||||||
TempList.Add(TempDir + 'libEGL.dll');
|
TempList.Add(TempDir + 'libEGL.dll');
|
||||||
TempList.Add(TempDir + 'libGLESv2.dll');
|
TempList.Add(TempDir + 'libGLESv2.dll');
|
||||||
TempList.Add(TempDir + 'swiftshader\libEGL.dll');
|
TempList.Add(TempDir + 'swiftshader\libEGL.dll');
|
||||||
TempList.Add(TempDir + 'swiftshader\libGLESv2.dll');
|
TempList.Add(TempDir + 'swiftshader\libGLESv2.dll');
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF LINUX}
|
||||||
|
TempList.Add(TempDir + 'libEGL.so');
|
||||||
|
TempList.Add(TempDir + 'libGLESv2.so');
|
||||||
|
TempList.Add(TempDir + 'swiftshader/libEGL.so');
|
||||||
|
TempList.Add(TempDir + 'swiftshader/libGLESv2.so');
|
||||||
|
{$ENDIF}
|
||||||
TempList.Add(TempDir + 'icudtl.dat');
|
TempList.Add(TempDir + 'icudtl.dat');
|
||||||
|
|
||||||
if TempExists then
|
if TempExists then
|
||||||
@ -1491,7 +1502,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function CustomAbsolutePath(const aPath : string; aMustExist : boolean) : string;
|
function CustomAbsolutePath(const aPath : string; aMustExist : boolean) : string;
|
||||||
var
|
var
|
||||||
TempNewPath, TempOldPath : string;
|
TempNewPath, TempOldPath : string;
|
||||||
begin
|
begin
|
||||||
if (length(aPath) > 0) then
|
if (length(aPath) > 0) then
|
||||||
@ -1505,8 +1516,8 @@ begin
|
|||||||
TempNewPath := TempOldPath;
|
TempNewPath := TempOldPath;
|
||||||
|
|
||||||
if aMustExist and not(DirectoryExists(TempNewPath)) then
|
if aMustExist and not(DirectoryExists(TempNewPath)) then
|
||||||
Result := ''
|
Result := ''
|
||||||
else
|
else
|
||||||
Result := TempNewPath;
|
Result := TempNewPath;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1515,7 +1526,12 @@ end;
|
|||||||
|
|
||||||
function GetModulePath : string;
|
function GetModulePath : string;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
Result := IncludeTrailingPathDelimiter(ExtractFileDir(GetModuleName(HINSTANCE{$IFDEF FPC}(){$ENDIF})));
|
Result := IncludeTrailingPathDelimiter(ExtractFileDir(GetModuleName(HINSTANCE{$IFDEF FPC}(){$ENDIF})));
|
||||||
|
{$ELSE}
|
||||||
|
// DLL filename not supported
|
||||||
|
Result := IncludeTrailingPathDelimiter(ExtractFileDir(ParamStr(0)));
|
||||||
|
{$ENDIF MSWINDOWS}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CefParseUrl(const url: ustring; var parts: TUrlParts): Boolean;
|
function CefParseUrl(const url: ustring; var parts: TUrlParts): Boolean;
|
||||||
@ -2080,8 +2096,8 @@ begin
|
|||||||
try
|
try
|
||||||
if (aFileList <> nil) and
|
if (aFileList <> nil) and
|
||||||
(length(aSrcDirectory) > 0) and
|
(length(aSrcDirectory) > 0) and
|
||||||
(length(aDstDirectory) > 0) and
|
(length(aDstDirectory) > 0) and
|
||||||
DirectoryExists(aSrcDirectory) and
|
DirectoryExists(aSrcDirectory) and
|
||||||
(DirectoryExists(aDstDirectory) or CreateDir(aDstDirectory)) then
|
(DirectoryExists(aDstDirectory) or CreateDir(aDstDirectory)) then
|
||||||
begin
|
begin
|
||||||
i := 0;
|
i := 0;
|
||||||
@ -2089,9 +2105,9 @@ begin
|
|||||||
|
|
||||||
while (i < aFileList.Count) do
|
while (i < aFileList.Count) do
|
||||||
begin
|
begin
|
||||||
TempSrcPath := IncludeTrailingPathDelimiter(aSrcDirectory) + aFileList[i];
|
TempSrcPath := IncludeTrailingPathDelimiter(aSrcDirectory) + aFileList[i];
|
||||||
TempDstPath := IncludeTrailingPathDelimiter(aDstDirectory) + aFileList[i];
|
TempDstPath := IncludeTrailingPathDelimiter(aDstDirectory) + aFileList[i];
|
||||||
|
|
||||||
if FileExists(TempSrcPath) and RenameFile(TempSrcPath, TempDstPath) then inc(TempCount);
|
if FileExists(TempSrcPath) and RenameFile(TempSrcPath, TempDstPath) then inc(TempCount);
|
||||||
|
|
||||||
inc(i);
|
inc(i);
|
||||||
|
@ -72,7 +72,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFMiscFunctions, uCefSSLStatus;
|
uCEFMiscFunctions, uCEFSSLStatus;
|
||||||
|
|
||||||
function TCefNavigationEntryRef.IsValid: Boolean;
|
function TCefNavigationEntryRef.IsValid: Boolean;
|
||||||
begin
|
begin
|
||||||
|
@ -88,8 +88,13 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
// IEnumFormatEtc
|
// IEnumFormatEtc
|
||||||
function Next(Celt: LongInt; out Elt; pCeltFetched: pLongInt): HRESULT; stdcall;
|
{$IFNDEF FPC}
|
||||||
|
function Next(Celt: LongInt; out Rgelt; pCeltFetched: pLongInt): HRESULT; stdcall;
|
||||||
function Skip(Celt: Longint): HRESULT; stdcall;
|
function Skip(Celt: Longint): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
function Next(Celt: ULONG; out Rgelt: FormatEtc; pceltFetched: PULONG = nil): HRESULT; stdcall;
|
||||||
|
function Skip(Celt: ULONG): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
function Reset: HRESULT; stdcall;
|
function Reset: HRESULT; stdcall;
|
||||||
function Clone(out Enum: IEnumFormatEtc): HRESULT; stdcall;
|
function Clone(out Enum: IEnumFormatEtc): HRESULT; stdcall;
|
||||||
end;
|
end;
|
||||||
@ -97,8 +102,13 @@ type
|
|||||||
TOLEDropSource = class(TInterfacedObject, IDropSource)
|
TOLEDropSource = class(TInterfacedObject, IDropSource)
|
||||||
public
|
public
|
||||||
// IDropSource
|
// IDropSource
|
||||||
|
{$IFNDEF FPC}
|
||||||
function QueryContinueDrag(fEscapePressed: bool; grfKeyState: LongInt): HRESULT; stdcall;
|
function QueryContinueDrag(fEscapePressed: bool; grfKeyState: LongInt): HRESULT; stdcall;
|
||||||
function GiveFeedback(dwEffect: LongInt): HRESULT; stdcall;
|
function GiveFeedback(dwEffect: LongInt): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
function QueryContinueDrag(fEscapePressed: BOOL; grfKeyState: DWORD): HRESULT; stdcall;
|
||||||
|
function GiveFeedback(dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TOLEDataObject = class(TInterfacedObject, IDataObject)
|
TOLEDataObject = class(TInterfacedObject, IDataObject)
|
||||||
@ -120,11 +130,19 @@ type
|
|||||||
function GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium):HRESULT; stdcall;
|
function GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium):HRESULT; stdcall;
|
||||||
function QueryGetData(const FormatEtc: TFormatEtc): HRESULT; stdcall;
|
function QueryGetData(const FormatEtc: TFormatEtc): HRESULT; stdcall;
|
||||||
function GetCanonicalFormatEtc(const FormatEtc: TFormatEtc; out FormatEtcout: TFormatEtc): HRESULT; stdcall;
|
function GetCanonicalFormatEtc(const FormatEtc: TFormatEtc; out FormatEtcout: TFormatEtc): HRESULT; stdcall;
|
||||||
|
{$IFNDEF FPC}
|
||||||
function SetData(const FormatEtc: TFormatEtc; var Medium: TStgMedium; fRelease: Bool): HRESULT; stdcall;
|
function SetData(const FormatEtc: TFormatEtc; var Medium: TStgMedium; fRelease: Bool): HRESULT; stdcall;
|
||||||
function EnumFormatEtc(dwDirection: LongInt; out aEnumFormatEtc: IEnumFormatEtc): HRESULT; stdcall;
|
function EnumFormatEtc(dwDirection: LongInt; out aEnumFormatEtc: IEnumFormatEtc): HRESULT; stdcall;
|
||||||
function dAdvise(const FormatEtc: TFormatEtc; advf: LongInt; const advsink: IAdviseSink; out dwConnection: LongInt): HRESULT; stdcall;
|
function dAdvise(const FormatEtc: TFormatEtc; advf: LongInt; const advsink: IAdviseSink; out dwConnection: LongInt): HRESULT; stdcall;
|
||||||
function dUnadvise(dwConnection: LongInt): HRESULT; stdcall;
|
function dUnadvise(dwConnection: LongInt): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
function SetData(const pformatetc: FORMATETC; const medium: STGMEDIUM; FRelease: BOOL): HRESULT; stdcall;
|
||||||
|
function EnumFormatEtc(dwDirection: DWORD; out aEnumFormatEtc: IENUMFORMATETC): HRESULT; stdcall;
|
||||||
|
function DAdvise(const formatetc: FORMATETC; advf: DWORD; const AdvSink: IAdviseSink; out dwConnection: DWORD): HRESULT; stdcall;
|
||||||
|
function DUnadvise(dwconnection: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
function EnumdAdvise(out EnumAdvise: IEnumStatData): HRESULT; stdcall;
|
function EnumdAdvise(out EnumAdvise: IEnumStatData): HRESULT; stdcall;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TOLEDropTarget = class(TInterfacedObject, IDropTarget)
|
TOLEDropTarget = class(TInterfacedObject, IDropTarget)
|
||||||
@ -135,10 +153,17 @@ type
|
|||||||
constructor Create(const aManager : TOLEDragAndDropMgr); reintroduce;
|
constructor Create(const aManager : TOLEDragAndDropMgr); reintroduce;
|
||||||
|
|
||||||
// IDropTarget
|
// IDropTarget
|
||||||
|
{$IFNDEF FPC}
|
||||||
function DragEnter(const DataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
function DragEnter(const DataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
||||||
function DragOver(grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
function DragOver(grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
||||||
function DragLeave: HRESULT; stdcall;
|
|
||||||
function Drop(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
function Drop(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
function DragEnter(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
function DragOver(grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
function Drop(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
|
function DragLeave: HRESULT; stdcall;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -168,7 +193,11 @@ begin
|
|||||||
|
|
||||||
aMedium.hGlobal := TempHandle;
|
aMedium.hGlobal := TempHandle;
|
||||||
aMedium.tymed := TYMED_HGLOBAL;
|
aMedium.tymed := TYMED_HGLOBAL;
|
||||||
|
{$IFNDEF FPC}
|
||||||
aMedium.unkForRelease := nil;
|
aMedium.unkForRelease := nil;
|
||||||
|
{$ELSE}
|
||||||
|
aMedium.PUnkForRelease := nil;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
GlobalUnlock(TempHandle);
|
GlobalUnlock(TempHandle);
|
||||||
|
|
||||||
@ -207,6 +236,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDragAndDropMgr.GetStorageForFileDescriptor(var aMedium : TStgMedium; const aFileName : string) : boolean;
|
function TOLEDragAndDropMgr.GetStorageForFileDescriptor(var aMedium : TStgMedium; const aFileName : string) : boolean;
|
||||||
|
{$IFDEF FPC}
|
||||||
|
const
|
||||||
|
FD_LINKUI = $8000;
|
||||||
|
{$ENDIF}
|
||||||
var
|
var
|
||||||
TempHandle : HGLOBAL;
|
TempHandle : HGLOBAL;
|
||||||
TempDescriptor : TFileGroupDescriptor;
|
TempDescriptor : TFileGroupDescriptor;
|
||||||
@ -243,7 +276,11 @@ begin
|
|||||||
|
|
||||||
aMedium.tymed := TYMED_HGLOBAL;
|
aMedium.tymed := TYMED_HGLOBAL;
|
||||||
aMedium.hGlobal := TempHandle;
|
aMedium.hGlobal := TempHandle;
|
||||||
|
{$IFNDEF FPC}
|
||||||
aMedium.unkForRelease := nil;
|
aMedium.unkForRelease := nil;
|
||||||
|
{$ELSE}
|
||||||
|
aMedium.PUnkForRelease := nil;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
GlobalUnlock(TempHandle);
|
GlobalUnlock(TempHandle);
|
||||||
|
|
||||||
@ -330,6 +367,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOLEEnumFormatEtc.CopyFormatEtc(var aDstFormatEtc : TFormatEtc; const aSrcFormatEtc : TFormatEtc);
|
procedure TOLEEnumFormatEtc.CopyFormatEtc(var aDstFormatEtc : TFormatEtc; const aSrcFormatEtc : TFormatEtc);
|
||||||
|
var
|
||||||
|
Size: Integer;
|
||||||
begin
|
begin
|
||||||
aDstFormatEtc.cfFormat := aSrcFormatEtc.cfFormat;
|
aDstFormatEtc.cfFormat := aSrcFormatEtc.cfFormat;
|
||||||
aDstFormatEtc.dwAspect := aSrcFormatEtc.dwAspect;
|
aDstFormatEtc.dwAspect := aSrcFormatEtc.dwAspect;
|
||||||
@ -340,27 +379,28 @@ begin
|
|||||||
aDstFormatEtc.ptd := nil
|
aDstFormatEtc.ptd := nil
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
aDstFormatEtc.ptd := CoTaskMemAlloc(SizeOf(TDVTargetDevice));
|
Size := Max(aSrcFormatEtc.ptd^.tdSize, SizeOf(DVTARGETDEVICE));
|
||||||
|
aDstFormatEtc.ptd := CoTaskMemAlloc(Size);
|
||||||
aDstFormatEtc.ptd.tdSize := aSrcFormatEtc.ptd.tdSize;
|
Move(aSrcFormatEtc.ptd^, aDstFormatEtc.ptd^, Size);
|
||||||
aDstFormatEtc.ptd.tdDriverNameOffset := aSrcFormatEtc.ptd.tdDriverNameOffset;
|
|
||||||
aDstFormatEtc.ptd.tdDeviceNameOffset := aSrcFormatEtc.ptd.tdDeviceNameOffset;
|
|
||||||
aDstFormatEtc.ptd.tdPortNameOffset := aSrcFormatEtc.ptd.tdPortNameOffset;
|
|
||||||
aDstFormatEtc.ptd.tdExtDevmodeOffset := aSrcFormatEtc.ptd.tdExtDevmodeOffset;
|
|
||||||
aDstFormatEtc.ptd.tdData := aSrcFormatEtc.ptd.tdData;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEEnumFormatEtc.Next(Celt: LongInt; out Elt; pCeltFetched: pLongInt): HRESULT;
|
function TOLEEnumFormatEtc.Next
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(Celt: LongInt; out Rgelt; pCeltFetched: pLongInt): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(Celt: ULONG; out Rgelt: FormatEtc; pceltFetched: PULONG): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
TempArray : TOLEFormatArray absolute Elt;
|
TempArray : ^TOLEFormatArray;
|
||||||
begin
|
begin
|
||||||
i := 0;
|
i := 0;
|
||||||
|
TempArray := @Rgelt;
|
||||||
|
|
||||||
while (i < Celt) and (FIndex < FNumFormats) do
|
while (i < Celt) and (FIndex < FNumFormats) do
|
||||||
begin
|
begin
|
||||||
CopyFormatEtc(TempArray[i], FFormatArray[FIndex]);
|
CopyFormatEtc(TempArray^[i], FFormatArray[FIndex]);
|
||||||
inc(i);
|
inc(i);
|
||||||
inc(FIndex);
|
inc(FIndex);
|
||||||
end;
|
end;
|
||||||
@ -373,7 +413,12 @@ begin
|
|||||||
Result := S_FALSE;
|
Result := S_FALSE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEEnumFormatEtc.Skip(Celt: Longint): HRESULT;
|
function TOLEEnumFormatEtc.Skip
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(Celt: Longint): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(Celt: ULONG): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
FIndex := FIndex + Celt;
|
FIndex := FIndex + Celt;
|
||||||
|
|
||||||
@ -383,13 +428,13 @@ begin
|
|||||||
Result := S_FALSE;
|
Result := S_FALSE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEEnumFormatEtc.Reset: HRESULT;
|
function TOLEEnumFormatEtc.Reset: HRESULT; stdcall;
|
||||||
begin
|
begin
|
||||||
FIndex := 0;
|
FIndex := 0;
|
||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEEnumFormatEtc.Clone(out Enum: IEnumFormatEtc): HRESULT;
|
function TOLEEnumFormatEtc.Clone(out Enum: IEnumFormatEtc): HRESULT; stdcall;
|
||||||
begin
|
begin
|
||||||
Enum := TOLEEnumFormatEtc.Create(FFormatArray, FNumFormats, FIndex);
|
Enum := TOLEEnumFormatEtc.Create(FFormatArray, FNumFormats, FIndex);
|
||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
@ -407,14 +452,24 @@ begin
|
|||||||
FManager := aManager;
|
FManager := aManager;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDropTarget.DragEnter(const DataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
function TOLEDropTarget.DragEnter
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(const DataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := FManager.DragEnter(DataObj, grfKeyState, pt, dwEffect);
|
Result := FManager.DragEnter(DataObj, grfKeyState, pt, Longint(dwEffect));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDropTarget.DragOver(grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
function TOLEDropTarget.DragOver
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := FManager.DragOver(grfKeyState, pt, dwEffect);
|
Result := FManager.DragOver(grfKeyState, pt, Longint(dwEffect));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDropTarget.DragLeave: HRESULT; stdcall;
|
function TOLEDropTarget.DragLeave: HRESULT; stdcall;
|
||||||
@ -422,9 +477,14 @@ begin
|
|||||||
Result := FManager.DragLeave;
|
Result := FManager.DragLeave;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDropTarget.Drop(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
function TOLEDropTarget.Drop
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := FManager.Drop(dataObj, grfKeyState, pt, dwEffect);
|
Result := FManager.Drop(dataObj, grfKeyState, pt, Longint(dwEffect));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -432,7 +492,12 @@ end;
|
|||||||
// ****************** TOLEDropSource *******************
|
// ****************** TOLEDropSource *******************
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
|
||||||
function TOLEDropSource.QueryContinueDrag(fEscapePressed: bool; grfKeyState: LongInt): HRESULT; stdcall;
|
function TOLEDropSource.QueryContinueDrag
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(fEscapePressed: bool; grfKeyState: LongInt): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(fEscapePressed: BOOL; grfKeyState: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
if fEscapePressed then
|
if fEscapePressed then
|
||||||
Result := DRAGDROP_S_CANCEL
|
Result := DRAGDROP_S_CANCEL
|
||||||
@ -443,7 +508,12 @@ begin
|
|||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDropSource.GiveFeedback(dwEffect: LongInt): HRESULT; stdcall;
|
function TOLEDropSource.GiveFeedback
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(dwEffect: LongInt): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(dwEffect: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := DRAGDROP_S_USEDEFAULTCURSORS;
|
Result := DRAGDROP_S_USEDEFAULTCURSORS;
|
||||||
end;
|
end;
|
||||||
@ -542,14 +612,22 @@ begin
|
|||||||
if (i < 0) or ((FFormatArray[i].tymed and TYMED_HGLOBAL) = 0) then
|
if (i < 0) or ((FFormatArray[i].tymed and TYMED_HGLOBAL) = 0) then
|
||||||
begin
|
begin
|
||||||
Medium.tymed := TYMED_NULL;
|
Medium.tymed := TYMED_NULL;
|
||||||
|
{$IFNDEF FPC}
|
||||||
Medium.unkForRelease := nil;
|
Medium.unkForRelease := nil;
|
||||||
|
{$ELSE}
|
||||||
|
Medium.PUnkForRelease := nil;
|
||||||
|
{$ENDIF}
|
||||||
Medium.hGlobal := 0;
|
Medium.hGlobal := 0;
|
||||||
Result := DV_E_FORMATETC;
|
Result := DV_E_FORMATETC;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Medium.tymed := FFormatArray[i].tymed;
|
Medium.tymed := FFormatArray[i].tymed;
|
||||||
|
{$IFNDEF FPC}
|
||||||
Medium.unkForRelease := nil;
|
Medium.unkForRelease := nil;
|
||||||
|
{$ELSE}
|
||||||
|
Medium.PUnkForRelease := nil;
|
||||||
|
{$ENDIF}
|
||||||
Medium.hGlobal := DupGlobalMem(FMediumArray[i].hGlobal);
|
Medium.hGlobal := DupGlobalMem(FMediumArray[i].hGlobal);
|
||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
end;
|
end;
|
||||||
@ -579,12 +657,22 @@ begin
|
|||||||
Result := E_NOTIMPL;
|
Result := E_NOTIMPL;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDataObject.SetData(const FormatEtc: TFormatEtc; var Medium: TStgMedium; fRelease: Bool): HRESULT; stdcall;
|
function TOLEDataObject.SetData
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(const FormatEtc: TFormatEtc; var Medium: TStgMedium; fRelease: Bool): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(const pformatetc: FORMATETC; const medium: STGMEDIUM; FRelease: BOOL): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := E_NOTIMPL;
|
Result := E_NOTIMPL;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDataObject.EnumFormatEtc(dwDirection: LongInt; out aEnumFormatEtc: IEnumFormatEtc): HRESULT; stdcall;
|
function TOLEDataObject.EnumFormatEtc
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(dwDirection: LongInt; out aEnumFormatEtc: IEnumFormatEtc): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(dwDirection: DWORD; out aEnumFormatEtc: IENUMFORMATETC): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
if (dwDirection = DATADIR_GET) then
|
if (dwDirection = DATADIR_GET) then
|
||||||
begin
|
begin
|
||||||
@ -602,15 +690,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDataObject.dAdvise(const FormatEtc: TFormatEtc;
|
function TOLEDataObject.dAdvise
|
||||||
advf: LongInt;
|
{$IFNDEF FPC}
|
||||||
const advsink: IAdviseSink;
|
(const FormatEtc: TFormatEtc; advf: LongInt; const advsink: IAdviseSink; out dwConnection: LongInt): HRESULT; stdcall;
|
||||||
out dwConnection: LongInt): HRESULT; stdcall;
|
{$ELSE}
|
||||||
|
(const formatetc: FORMATETC; advf: DWORD; const AdvSink: IAdviseSink; out dwConnection: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := OLE_E_ADVISENOTSUPPORTED;
|
Result := OLE_E_ADVISENOTSUPPORTED;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TOLEDataObject.dUnadvise(dwConnection: LongInt): HRESULT; stdcall;
|
function TOLEDataObject.dUnadvise
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
(dwConnection: LongInt): HRESULT; stdcall;
|
||||||
|
{$ELSE}
|
||||||
|
(dwconnection: DWORD): HRESULT; stdcall;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := OLE_E_ADVISENOTSUPPORTED;
|
Result := OLE_E_ADVISENOTSUPPORTED;
|
||||||
end;
|
end;
|
||||||
|
@ -80,7 +80,9 @@ type
|
|||||||
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pidWin32 or pidWin64)]{$ENDIF}{$ENDIF}
|
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pidWin32 or pidWin64)]{$ENDIF}{$ENDIF}
|
||||||
TCEFSentinel = class(TComponent)
|
TCEFSentinel = class(TComponent)
|
||||||
protected
|
protected
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
FCompHandle : HWND;
|
FCompHandle : HWND;
|
||||||
|
{$ENDIF}
|
||||||
FStatus : TSentinelStatus;
|
FStatus : TSentinelStatus;
|
||||||
FStatusCS : TCriticalSection;
|
FStatusCS : TCriticalSection;
|
||||||
FDelayPerProcMs : cardinal;
|
FDelayPerProcMs : cardinal;
|
||||||
@ -99,8 +101,8 @@ type
|
|||||||
procedure WndProc(var aMessage: TMessage);
|
procedure WndProc(var aMessage: TMessage);
|
||||||
procedure doStartMsg(var aMessage : TMessage); virtual;
|
procedure doStartMsg(var aMessage : TMessage); virtual;
|
||||||
procedure doCloseMsg(var aMessage : TMessage); virtual;
|
procedure doCloseMsg(var aMessage : TMessage); virtual;
|
||||||
{$ENDIF}
|
|
||||||
function SendCompMessage(aMsg : cardinal) : boolean;
|
function SendCompMessage(aMsg : cardinal) : boolean;
|
||||||
|
{$ENDIF}
|
||||||
function CanClose : boolean; virtual;
|
function CanClose : boolean; virtual;
|
||||||
|
|
||||||
procedure Timer_OnTimer(Sender: TObject); virtual;
|
procedure Timer_OnTimer(Sender: TObject); virtual;
|
||||||
@ -137,7 +139,9 @@ constructor TCEFSentinel.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(aOwner);
|
inherited Create(aOwner);
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
FCompHandle := 0;
|
FCompHandle := 0;
|
||||||
|
{$ENDIF}
|
||||||
FDelayPerProcMs := CEFSENTINEL_DEFAULT_DELAYPERPROCMS;
|
FDelayPerProcMs := CEFSENTINEL_DEFAULT_DELAYPERPROCMS;
|
||||||
FMinInitDelayMs := CEFSENTINEL_DEFAULT_MININITDELAYMS;
|
FMinInitDelayMs := CEFSENTINEL_DEFAULT_MININITDELAYMS;
|
||||||
FFinalDelayMs := CEFSENTINEL_DEFAULT_FINALDELAYMS;
|
FFinalDelayMs := CEFSENTINEL_DEFAULT_FINALDELAYMS;
|
||||||
@ -151,22 +155,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEFSentinel.AfterConstruction;
|
procedure TCEFSentinel.AfterConstruction;
|
||||||
{$IFDEF FPC}
|
|
||||||
var
|
|
||||||
TempWndMethod : TWndMethod;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
inherited AfterConstruction;
|
inherited AfterConstruction;
|
||||||
|
|
||||||
if not(csDesigning in ComponentState) then
|
if not(csDesigning in ComponentState) then
|
||||||
begin
|
begin
|
||||||
{$IFDEF FPC}
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
TempWndMethod := @WndProc;
|
FCompHandle := AllocateHWnd({$IFDEF FPC}@{$ENDIF}WndProc);
|
||||||
FCompHandle := AllocateHWnd(TempWndMethod);
|
|
||||||
{$ENDIF}
|
|
||||||
{$ELSE}
|
|
||||||
FCompHandle := AllocateHWnd(WndProc);
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
FStatusCS := TCriticalSection.Create;
|
FStatusCS := TCriticalSection.Create;
|
||||||
@ -218,12 +213,12 @@ procedure TCEFSentinel.doCloseMsg(var aMessage : TMessage);
|
|||||||
begin
|
begin
|
||||||
if assigned(FOnClose) then FOnClose(self);
|
if assigned(FOnClose) then FOnClose(self);
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
function TCEFSentinel.SendCompMessage(aMsg : cardinal) : boolean;
|
function TCEFSentinel.SendCompMessage(aMsg : cardinal) : boolean;
|
||||||
begin
|
begin
|
||||||
Result := (FCompHandle <> 0) and PostMessage(FCompHandle, aMsg, 0, 0);
|
Result := (FCompHandle <> 0) and PostMessage(FCompHandle, aMsg, 0, 0);
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
procedure TCEFSentinel.Start;
|
procedure TCEFSentinel.Start;
|
||||||
begin
|
begin
|
||||||
@ -233,7 +228,9 @@ begin
|
|||||||
if (FStatus = ssIdle) then
|
if (FStatus = ssIdle) then
|
||||||
begin
|
begin
|
||||||
FStatus := ssInitialDelay;
|
FStatus := ssInitialDelay;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
SendCompMessage(CEF_SENTINEL_START);
|
SendCompMessage(CEF_SENTINEL_START);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
if (FStatusCS <> nil) then FStatusCS.Release;
|
if (FStatusCS <> nil) then FStatusCS.Release;
|
||||||
@ -280,7 +277,9 @@ begin
|
|||||||
if CanClose then
|
if CanClose then
|
||||||
begin
|
begin
|
||||||
FStatus := ssClosing;
|
FStatus := ssClosing;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
SendCompMessage(CEF_SENTINEL_DOCLOSE);
|
SendCompMessage(CEF_SENTINEL_DOCLOSE);
|
||||||
|
{$ENDIF}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -294,7 +293,9 @@ begin
|
|||||||
if CanClose then
|
if CanClose then
|
||||||
begin
|
begin
|
||||||
FStatus := ssClosing;
|
FStatus := ssClosing;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
SendCompMessage(CEF_SENTINEL_DOCLOSE);
|
SendCompMessage(CEF_SENTINEL_DOCLOSE);
|
||||||
|
{$ENDIF}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
@ -133,19 +133,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEFWinControl.TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
function TCEFWinControl.TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
var
|
var
|
||||||
TempHWND : HWND;
|
TempHWND : HWND;
|
||||||
TempDC : HDC;
|
TempDC : HDC;
|
||||||
TempRect : TRect;
|
TempRect : TRect;
|
||||||
TempWidth : Integer;
|
TempWidth : Integer;
|
||||||
TempHeight : Integer;
|
TempHeight : Integer;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
if (aBitmap = nil) then exit;
|
if (aBitmap = nil) then exit;
|
||||||
|
|
||||||
TempHWND := ChildWindowHandle;
|
TempHWND := ChildWindowHandle;
|
||||||
if (TempHWND = 0) then exit;
|
if (TempHWND = 0) then exit;
|
||||||
{$IFDEF MSWINDOWS}
|
|
||||||
{$IFDEF DELPHI16_UP}Winapi.{$ENDIF}Windows.GetClientRect(TempHWND, TempRect);
|
{$IFDEF DELPHI16_UP}Winapi.{$ENDIF}Windows.GetClientRect(TempHWND, TempRect);
|
||||||
TempDC := GetDC(TempHWND);
|
TempDC := GetDC(TempHWND);
|
||||||
TempWidth := TempRect.Right - TempRect.Left;
|
TempWidth := TempRect.Right - TempRect.Left;
|
||||||
@ -163,12 +165,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEFWinControl.DestroyChildWindow : boolean;
|
function TCEFWinControl.DestroyChildWindow : boolean;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
var
|
var
|
||||||
TempHWND : HWND;
|
TempHWND : HWND;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
TempHWND := ChildWindowHandle;
|
TempHWND := ChildWindowHandle;
|
||||||
Result := (TempHWND <> 0) and DestroyWindow(TempHWND);
|
Result := (TempHWND <> 0) and DestroyWindow(TempHWND);
|
||||||
|
{$ELSE}
|
||||||
|
Result := False;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -166,10 +166,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEFWorkScheduler.AfterConstruction;
|
procedure TCEFWorkScheduler.AfterConstruction;
|
||||||
{$IFDEF FPC}
|
|
||||||
var
|
|
||||||
TempWndMethod : TWndMethod;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
inherited AfterConstruction;
|
inherited AfterConstruction;
|
||||||
|
|
||||||
@ -179,12 +175,7 @@ begin
|
|||||||
if (GlobalCEFApp <> nil) and
|
if (GlobalCEFApp <> nil) and
|
||||||
((GlobalCEFApp.ProcessType = ptBrowser) or GlobalCEFApp.SingleProcess) then
|
((GlobalCEFApp.ProcessType = ptBrowser) or GlobalCEFApp.SingleProcess) then
|
||||||
begin
|
begin
|
||||||
{$IFDEF FPC}
|
FCompHandle := AllocateHWnd({$IFDEF FPC}@{$ENDIF}WndProc);
|
||||||
TempWndMethod := @WndProc;
|
|
||||||
FCompHandle := AllocateHWnd(TempWndMethod);
|
|
||||||
{$ELSE}
|
|
||||||
FCompHandle := AllocateHWnd(WndProc);
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -203,7 +194,11 @@ begin
|
|||||||
{$IFDEF DELPHI14_UP}
|
{$IFDEF DELPHI14_UP}
|
||||||
FThread.Start;
|
FThread.Start;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
{$IFNDEF FPC}
|
||||||
FThread.Resume;
|
FThread.Resume;
|
||||||
|
{$ELSE}
|
||||||
|
FThread.Start;
|
||||||
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -238,14 +238,7 @@ begin
|
|||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
DeleteCriticalSection(FCriticalSection);
|
DeleteCriticalSection(FCriticalSection);
|
||||||
FCriticalSection.DebugInfo := nil;
|
FillChar(FCriticalSection, SizeOf(FCriticalSection), 0);
|
||||||
FCriticalSection.LockCount := 0;
|
|
||||||
FCriticalSection.RecursionCount := 0;
|
|
||||||
FCriticalSection.OwningThread := 0;
|
|
||||||
FCriticalSection.LockSemaphore := 0;
|
|
||||||
{$IFNDEF FPC}
|
|
||||||
FCriticalSection.Reserved := 0;
|
|
||||||
{$ENDIF}
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
DoneCriticalSection(FCriticalSection);
|
DoneCriticalSection(FCriticalSection);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -259,22 +252,24 @@ var
|
|||||||
TempSize : int64;
|
TempSize : int64;
|
||||||
begin
|
begin
|
||||||
EnterCriticalSection(FCriticalSection);
|
EnterCriticalSection(FCriticalSection);
|
||||||
|
try
|
||||||
|
TempSize := size * n;
|
||||||
|
|
||||||
TempSize := size * n;
|
if ((FOffset + TempSize) >= FBufferSize) and (Grow(TempSize) = 0) then
|
||||||
|
Result := 0
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TempPointer := Pointer(cardinal(FBuffer) + FOffset);
|
||||||
|
|
||||||
if ((FOffset + TempSize) >= FBufferSize) and (Grow(TempSize) = 0) then
|
Move(ptr^, TempPointer^, TempSize);
|
||||||
Result := 0
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
TempPointer := Pointer(cardinal(FBuffer) + FOffset);
|
|
||||||
|
|
||||||
Move(ptr^, TempPointer^, TempSize);
|
FOffset := FOffset + TempSize;
|
||||||
|
Result := n;
|
||||||
|
end;
|
||||||
|
|
||||||
FOffset := FOffset + TempSize;
|
finally
|
||||||
Result := n;
|
LeaveCriticalSection(FCriticalSection);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
LeaveCriticalSection(FCriticalSection);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefBytesWriteHandler.Seek(offset: Int64; whence: Integer): Integer;
|
function TCefBytesWriteHandler.Seek(offset: Int64; whence: Integer): Integer;
|
||||||
@ -352,8 +347,8 @@ function TCefBytesWriteHandler.Grow(size : NativeUInt) : NativeUInt;
|
|||||||
var
|
var
|
||||||
TempTotal : int64;
|
TempTotal : int64;
|
||||||
begin
|
begin
|
||||||
|
EnterCriticalSection(FCriticalSection);
|
||||||
try
|
try
|
||||||
EnterCriticalSection(FCriticalSection);
|
|
||||||
|
|
||||||
if (size < FGrow) then
|
if (size < FGrow) then
|
||||||
TempTotal := FGrow
|
TempTotal := FGrow
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
*
|
*
|
||||||
*)
|
*)
|
||||||
|
|
||||||
unit uCEFV8Exception;
|
unit uCEFv8Exception;
|
||||||
|
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$MODE OBJFPC}{$H+}
|
{$MODE OBJFPC}{$H+}
|
@ -133,7 +133,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFMiscFunctions, uCEFLibFunctions, uCEFv8Accessor, uCEFv8Handler, uCEFv8Exception,
|
uCEFMiscFunctions, uCEFLibFunctions, uCEFv8Accessor, uCEFv8Handler, uCEFv8Exception,
|
||||||
uCEFv8Interceptor, uCEFStringList, uCefv8ArrayBufferReleaseCallback;
|
uCEFv8Interceptor, uCEFStringList, uCEFv8ArrayBufferReleaseCallback;
|
||||||
|
|
||||||
function TCefv8ValueRef.AdjustExternallyAllocatedMemory(changeInBytes: Integer): Integer;
|
function TCefv8ValueRef.AdjustExternallyAllocatedMemory(changeInBytes: Integer): Integer;
|
||||||
begin
|
begin
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 61,
|
"InternalVersion" : 62,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "78.3.1.0"
|
"Version" : "78.3.1.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user