1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-02-02 10:25:26 +02:00

Added TBufferPanel.OnMouseEnter and TBufferPanel.OnMouseLeave on Lazarus

Fixed building in Windows
Issue #337 : First implementation. It's incomplete.
This commit is contained in:
Salvador Diaz Fau 2021-02-08 10:28:36 +01:00
parent a1f3e133ed
commit e45839bb90
17 changed files with 881 additions and 293 deletions

View File

@ -3,7 +3,7 @@
<ProjectSession>
<Version Value="11"/>
<BuildModes Active="Default"/>
<Units Count="58">
<Units Count="60">
<Unit0>
<Filename Value="ExternalPumpBrowser.lpr"/>
<IsPartOfProject Value="True"/>
@ -20,7 +20,7 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<TopLine Value="235"/>
<CursorPos X="6" Y="271"/>
<CursorPos X="49" Y="264"/>
<UsageCount Value="49"/>
<Bookmarks Count="2">
<Item0 Y="273" ID="3"/>
@ -167,8 +167,8 @@
<Filename Value="/usr/share/lazarus/2.0.10/lcl/controls.pp"/>
<UnitName Value="Controls"/>
<EditorIndex Value="-1"/>
<TopLine Value="1958"/>
<CursorPos X="3" Y="1981"/>
<TopLine Value="1137"/>
<CursorPos X="13" Y="1158"/>
<UsageCount Value="14"/>
</Unit21>
<Unit22>
@ -432,6 +432,20 @@
<CursorPos Y="234"/>
<UsageCount Value="10"/>
</Unit57>
<Unit58>
<Filename Value="../../../source/uCEFBufferPanel.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="37"/>
<UsageCount Value="10"/>
</Unit58>
<Unit59>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<EditorIndex Value="-1"/>
<TopLine Value="1023"/>
<CursorPos X="3" Y="1046"/>
<UsageCount Value="10"/>
</Unit59>
</Units>
<JumpHistory Count="13" HistoryIndex="12">
<Position1>

View File

@ -25,13 +25,16 @@
<FormatVersion Value="2"/>
<Modes Count="0"/>
</RunParams>
<RequiredPackages Count="2">
<RequiredPackages Count="3">
<Item1>
<PackageName Value="CEF4Delphi_Lazarus"/>
<PackageName Value="Printer4Lazarus"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
<PackageName Value="CEF4Delphi_Lazarus"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="3">
<Unit0>

View File

@ -44,7 +44,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, uMiniBrowser
Forms, printer4lazarus, uMiniBrowser
{ you can add units after this },
uCEFApplication;

View File

@ -3,15 +3,14 @@
<ProjectSession>
<Version Value="11"/>
<BuildModes Active="Default"/>
<Units Count="13">
<Units Count="48">
<Unit0>
<Filename Value="MiniBrowser.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="1"/>
<EditorIndex Value="-1"/>
<TopLine Value="26"/>
<CursorPos X="62" Y="52"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
<UsageCount Value="33"/>
</Unit0>
<Unit1>
<Filename Value="uMiniBrowser.pas"/>
@ -20,10 +19,15 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<TopLine Value="168"/>
<CursorPos X="52" Y="196"/>
<FoldState Value=" TJmA1{32 pjZlg1@311]B8qW1JF"/>
<UsageCount Value="22"/>
<TopLine Value="780"/>
<CursorPos X="3" Y="782"/>
<FoldState Value=" TJnR1{3122{"/>
<UsageCount Value="33"/>
<Bookmarks Count="3">
<Item0 X="66" Y="1049" ID="1"/>
<Item1 Y="936" ID="9"/>
<Item2 X="12" Y="618" ID="8"/>
</Bookmarks>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
@ -33,7 +37,7 @@
<UnitName Value="Interfaces"/>
<EditorIndex Value="-1"/>
<CursorPos X="11" Y="9"/>
<UsageCount Value="22"/>
<UsageCount Value="33"/>
</Unit2>
<Unit3>
<Filename Value="uminibrowser.pas"/>
@ -44,21 +48,21 @@
<WindowIndex Value="-1"/>
<TopLine Value="29"/>
<CursorPos X="45" Y="36"/>
<UsageCount Value="20"/>
<UsageCount Value="19"/>
</Unit3>
<Unit4>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/include/winapi.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="306"/>
<CursorPos Y="329"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit4>
<Unit5>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/include/application.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="420"/>
<CursorPos Y="439"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit5>
<Unit6>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/forms.pp"/>
@ -66,84 +70,431 @@
<EditorIndex Value="-1"/>
<TopLine Value="1462"/>
<CursorPos X="25" Y="1499"/>
<UsageCount Value="10"/>
<UsageCount Value="9"/>
</Unit6>
<Unit7>
<Filename Value="../../../source/uCEFChromium.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="130"/>
<CursorPos X="3" Y="146"/>
<UsageCount Value="10"/>
<TopLine Value="183"/>
<CursorPos X="68" Y="201"/>
<UsageCount Value="9"/>
<Bookmarks Count="1">
<Item0 Y="198" ID="9"/>
</Bookmarks>
</Unit7>
<Unit8>
<Filename Value="../../../source/uCEFMiscFunctions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="780"/>
<CursorPos X="70" Y="807"/>
<UsageCount Value="10"/>
<Bookmarks Count="1">
<Item0 X="68" Y="793" ID="2"/>
</Bookmarks>
<TopLine Value="700"/>
<CursorPos X="77" Y="725"/>
<UsageCount Value="9"/>
</Unit8>
<Unit9>
<Filename Value="../../../source/uCEFChromiumCore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1950"/>
<CursorPos X="71" Y="1975"/>
<UsageCount Value="10"/>
<Bookmarks Count="1">
<Item0 X="56" Y="1966" ID="1"/>
<TopLine Value="728"/>
<CursorPos X="32" Y="735"/>
<UsageCount Value="12"/>
<Bookmarks Count="5">
<Item0 X="7" Y="59" ID="3"/>
<Item1 X="35" Y="1230" ID="4"/>
<Item2 X="3" Y="2733" ID="8"/>
<Item3 Y="4621" ID="7"/>
<Item4 X="37" Y="6383" ID="6"/>
</Bookmarks>
</Unit9>
<Unit10>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk2/src/gtk+/gtk/gtkwidget.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="82"/>
<CursorPos X="9" Y="105"/>
<UsageCount Value="10"/>
<CursorPos X="20"/>
<UsageCount Value="9"/>
</Unit10>
<Unit11>
<Filename Value="../../../source/uCEFTypes.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1228"/>
<CursorPos X="53" Y="1251"/>
<UsageCount Value="10"/>
<TopLine Value="505"/>
<CursorPos X="9" Y="528"/>
<UsageCount Value="11"/>
</Unit11>
<Unit12>
<Filename Value="../../../source/uCEFApplicationCore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="220"/>
<UsageCount Value="10"/>
<EditorIndex Value="7"/>
<TopLine Value="545"/>
<CursorPos Y="570"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit12>
<Unit13>
<Filename Value="../../../source/uCEFLibFunctions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="316"/>
<CursorPos X="3" Y="356"/>
<UsageCount Value="10"/>
</Unit13>
<Unit14>
<Filename Value="/usr/share/lazarus/2.0.10/components/opengl/glgtkglxcontext.pas"/>
<UnitName Value="GLGtkGlxContext"/>
<EditorIndex Value="-1"/>
<CursorPos X="56" Y="24"/>
<UsageCount Value="10"/>
</Unit14>
<Unit15>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk2/src/gtk2x11/include/gdkx.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="18"/>
<CursorPos X="10" Y="41"/>
<UsageCount Value="10"/>
</Unit15>
<Unit16>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk2/src/gtk2x11/include/gdk2x11includes.inc"/>
<EditorIndex Value="-1"/>
<CursorPos X="5" Y="12"/>
<UsageCount Value="10"/>
</Unit16>
<Unit17>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk2/src/gtk2x11/gdk2x.pas"/>
<EditorIndex Value="-1"/>
<CursorPos X="11" Y="16"/>
<UsageCount Value="10"/>
</Unit17>
<Unit18>
<Filename Value="../../../source/uCEFLinuxTypes.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="16"/>
<CursorPos X="42" Y="40"/>
<UsageCount Value="10"/>
</Unit18>
<Unit19>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk3/gtk3bindings/lazgtk3.pas"/>
<UnitName Value="LazGtk3"/>
<EditorIndex Value="2"/>
<TopLine Value="12147"/>
<CursorPos X="10" Y="12129"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="../../../source/uCEFLinuxFunctions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="40"/>
<CursorPos Y="73"/>
<UsageCount Value="10"/>
</Unit20>
<Unit21>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk1/src/gdk/gdkx.pp"/>
<EditorIndex Value="-1"/>
<CursorPos X="67" Y="15"/>
<UsageCount Value="10"/>
</Unit21>
<Unit22>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk1/src/gdk/gdkprivate.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="13"/>
<CursorPos X="6" Y="11"/>
<UsageCount Value="9"/>
</Unit22>
<Unit23>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk/gtk1extra.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="276"/>
<CursorPos X="57" Y="279"/>
<UsageCount Value="9"/>
</Unit23>
<Unit24>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk/gtkwinapi.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="6852"/>
<CursorPos X="48" Y="6875"/>
<UsageCount Value="9"/>
</Unit24>
<Unit25>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk/gtkproc.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="763"/>
<CursorPos X="36" Y="779"/>
<UsageCount Value="9"/>
</Unit25>
<Unit26>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk2/gtk2proc.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="714"/>
<CursorPos X="18" Y="730"/>
<UsageCount Value="9"/>
</Unit26>
<Unit27>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk/gtk1extrah.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="36"/>
<CursorPos X="48" Y="59"/>
<UsageCount Value="9"/>
</Unit27>
<Unit28>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk2/src/gtk+/gdk/gdkdrawable.inc"/>
<EditorIndex Value="-1"/>
<CursorPos X="4" Y="10"/>
<UsageCount Value="9"/>
</Unit28>
<Unit29>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk2/gtk2trayicon.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="144"/>
<CursorPos X="54" Y="167"/>
<UsageCount Value="9"/>
</Unit29>
<Unit30>
<Filename Value="../../../source/uCEFLinkedWindowParent.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="146"/>
<UsageCount Value="9"/>
</Unit30>
<Unit31>
<Filename Value="../../../source/uCEFFMXChromium.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="171"/>
<CursorPos X="42" Y="191"/>
<UsageCount Value="9"/>
</Unit31>
<Unit32>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/controls.pp"/>
<UnitName Value="Controls"/>
<EditorIndex Value="-1"/>
<TopLine Value="2312"/>
<CursorPos X="14" Y="2333"/>
<UsageCount Value="9"/>
</Unit32>
<Unit33>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/include/wincontrol.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="7414"/>
<CursorPos X="3" Y="7435"/>
<UsageCount Value="9"/>
</Unit33>
<Unit34>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/x11/src/xlib.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="110"/>
<CursorPos X="4" Y="133"/>
<UsageCount Value="9"/>
</Unit34>
<Unit35>
<Filename Value="../../../source/uCEFTask.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="639"/>
<CursorPos Y="683"/>
<UsageCount Value="9"/>
</Unit35>
<Unit36>
<Filename Value="../../../source/uCEFInterfaces.pas"/>
<EditorIndex Value="5"/>
<TopLine Value="2274"/>
<CursorPos X="53" Y="2312"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit36>
<Unit37>
<Filename Value="../../../source/uCEFPrintHandler.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="31"/>
<UsageCount Value="12"/>
</Unit37>
<Unit38>
<Filename Value="../../../source/uCEFPrintDialogCallback.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="19"/>
<UsageCount Value="12"/>
</Unit38>
<Unit39>
<Filename Value="../../../source/uCEFPrintSettings.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="38"/>
<CursorPos X="63" Y="70"/>
<UsageCount Value="12"/>
</Unit39>
<Unit40>
<Filename Value="../../../source/uCEFPrintJobCallback.pas"/>
<EditorIndex Value="6"/>
<TopLine Value="22"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit40>
<Unit41>
<Filename Value="../../../source/uCEFPDFPrintOptions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="58"/>
<CursorPos X="3" Y="60"/>
<UsageCount Value="11"/>
</Unit41>
<Unit42>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/printers.pas"/>
<UnitName Value="Printers"/>
<EditorIndex Value="1"/>
<TopLine Value="270"/>
<CursorPos X="23" Y="303"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit42>
<Unit43>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/graphics.pp"/>
<UnitName Value="Graphics"/>
<EditorIndex Value="-1"/>
<TopLine Value="940"/>
<CursorPos X="3" Y="966"/>
<UsageCount Value="10"/>
</Unit43>
<Unit44>
<Filename Value="../../../source/uCEFProcessMessage.pas"/>
<EditorIndex Value="-1"/>
<UsageCount Value="10"/>
</Unit44>
<Unit45>
<Filename Value="/usr/share/lazarus/2.0.10/components/printers/printersdlgs.pp"/>
<UnitName Value="PrintersDlgs"/>
<EditorIndex Value="3"/>
<TopLine Value="90"/>
<CursorPos X="14" Y="128"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit45>
<Unit46>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/dialogs.pp"/>
<UnitName Value="Dialogs"/>
<EditorIndex Value="4"/>
<TopLine Value="936"/>
<CursorPos X="3" Y="961"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit46>
<Unit47>
<Filename Value="/usr/share/fpcsrc/3.2.0/packages/gtk1/src/glib/glib.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="641"/>
<CursorPos X="16" Y="668"/>
<UsageCount Value="10"/>
</Unit47>
</Units>
<OtherDefines Count="1">
<Define0 Value="UseCThreads"/>
</OtherDefines>
<JumpHistory Count="6" HistoryIndex="5">
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="865" TopLine="829"/>
<Caret Line="932" Column="22" TopLine="909"/>
</Position1>
<Position2>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="158" Column="15" TopLine="137"/>
<Caret Line="935" Column="57" TopLine="909"/>
</Position2>
<Position3>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="863" Column="3" TopLine="829"/>
<Caret Line="59" Column="5" TopLine="33"/>
</Position3>
<Position4>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="849" Column="74" TopLine="829"/>
<Filename Value="/usr/share/lazarus/2.0.10/components/printers/printersdlgs.pp"/>
<Caret Line="114" Column="3" TopLine="82"/>
</Position4>
<Position5>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="222" Column="47" TopLine="210"/>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/dialogs.pp"/>
<Caret Line="506" Column="3" TopLine="492"/>
</Position5>
<Position6>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="352" TopLine="188"/>
<Caret Line="59" Column="5" TopLine="33"/>
</Position6>
<Position7>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="938" Column="50" TopLine="904"/>
</Position7>
<Position8>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="940" Column="82" TopLine="904"/>
</Position8>
<Position9>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="1037" TopLine="1001"/>
</Position9>
<Position10>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="945" Column="9" TopLine="919"/>
</Position10>
<Position11>
<Filename Value="/usr/share/lazarus/2.0.10/components/printers/printersdlgs.pp"/>
<Caret Line="128" Column="14" TopLine="102"/>
</Position11>
<Position12>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/dialogs.pp"/>
<Caret Line="506" Column="3" TopLine="486"/>
</Position12>
<Position13>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="945" Column="9" TopLine="919"/>
</Position13>
<Position14>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="1028" Column="25" TopLine="1008"/>
</Position14>
<Position15>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="927" Column="16" TopLine="904"/>
</Position15>
<Position16>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="1038" TopLine="1010"/>
</Position16>
<Position17>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="976" Column="57" TopLine="936"/>
</Position17>
<Position18>
<Filename Value="/usr/share/lazarus/2.0.10/components/printers/printersdlgs.pp"/>
<Caret Line="128" Column="14" TopLine="102"/>
</Position18>
<Position19>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/dialogs.pp"/>
<Caret Line="518" Column="25" TopLine="489"/>
</Position19>
<Position20>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/dialogs.pp"/>
<Caret Line="961" Column="3" TopLine="936"/>
</Position20>
<Position21>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="976" Column="57" TopLine="936"/>
</Position21>
<Position22>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="620" Column="7" TopLine="573"/>
</Position22>
<Position23>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="979" Column="54" TopLine="915"/>
</Position23>
<Position24>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="1089" Column="53" TopLine="1053"/>
</Position24>
<Position25>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="620" Column="48" TopLine="614"/>
</Position25>
<Position26>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="54" Column="84" TopLine="22"/>
</Position26>
<Position27>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/printers.pas"/>
</Position27>
<Position28>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="54" Column="84" TopLine="22"/>
</Position28>
<Position29>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="624" TopLine="576"/>
</Position29>
<Position30>
<Filename Value="uMiniBrowser.pas"/>
<Caret Line="436" Column="74" TopLine="413"/>
</Position30>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -236,6 +236,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
OnAddressChange = Chromium1AddressChange
OnTitleChange = Chromium1TitleChange
OnStatusMessage = Chromium1StatusMessage
OnJsdialog = Chromium1Jsdialog
OnAfterCreated = Chromium1AfterCreated
OnBeforeClose = Chromium1BeforeClose
OnClose = Chromium1Close
@ -270,12 +271,10 @@ object MiniBrowserFrm: TMiniBrowserFrm
end
object Print1: TMenuItem
Caption = 'Print'
Enabled = False
OnClick = Print1Click
end
object PrintinPDF1: TMenuItem
Caption = 'Print to PDF'
Enabled = False
OnClick = PrintinPDF1Click
end
object N3: TMenuItem
@ -313,4 +312,10 @@ object MiniBrowserFrm: TMiniBrowserFrm
Left = 32
Top = 344
end
object PrintDialog1: TPrintDialog
FromPage = 1
ToPage = 1
Left = 32
Top = 416
end
end

View File

@ -45,7 +45,7 @@ interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
Menus, ComCtrls, SyncObjs, LMessages,
Menus, ComCtrls, SyncObjs, LMessages, Printers, PrintersDlgs,
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes,
uCEFConstants, uCEFWinControl, uCEFChromiumEvents, uCEFLinkedWindowParent;
@ -56,6 +56,7 @@ type
HideDevTools1: TMenuItem;
NavControlPnl: TPanel;
NavButtonPnl: TPanel;
PrintDialog1: TPrintDialog;
StatusBar1: TStatusBar;
URLEditPnl: TPanel;
BackBtn: TButton;
@ -89,6 +90,7 @@ type
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
procedure Chromium1BeforePluginLoad(Sender: TObject; const mimeType, pluginUrl: ustring; isMainFrame: boolean; const topOriginUrl: ustring; const pluginInfo: ICefWebPluginInfo; var pluginPolicy: TCefPluginPolicy; var aResult: boolean);
procedure Chromium1GotFocus(Sender: TObject; const browser: ICefBrowser);
procedure Chromium1Jsdialog(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean; out Result: Boolean);
procedure Chromium1LoadingStateChange(Sender: TObject; const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean);
procedure Chromium1TitleChange(Sender: TObject; const browser: ICefBrowser; const title: ustring);
procedure Chromium1AddressChange(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const url: ustring);
@ -140,6 +142,13 @@ type
FBrowserStatusText : string;
FBrowserTitle : string;
FPrintJobCallback : ICefPrintJobCallback;
FPrintJobDocumentName : ustring;
FPrintJobPDFFilePath : ustring;
FPrintDialogCallback : ICefPrintDialogCallback;
FPrintDialogHasSelection : boolean;
procedure SetBrowserAddress(const aValue : string);
procedure SetBrowserIsLoading(aValue : boolean);
procedure SetBrowserCanGoBack(aValue : boolean);
@ -174,6 +183,10 @@ type
procedure BrowserShowDevToolsMsg(Data: PtrInt);
procedure BrowserHideDevToolsMsg(Data: PtrInt);
procedure BrowserPrintPDFEndMsg(Data: PtrInt);
procedure BrowserShowPrintDlgMsg(Data: PtrInt);
procedure BrowserPrintJobStartedMsg(Data: PtrInt);
procedure BrowserPrintStartMsg(Data: PtrInt);
procedure BrowserPrintResetMsg(Data: PtrInt);
property BrowserAddress : string read GetBrowserAddress write SetBrowserAddress;
property BrowserIsLoading : boolean read GetBrowserIsLoading write SetBrowserIsLoading;
@ -181,6 +194,12 @@ type
property BrowserCanGoForward : boolean read GetBrowserCanGoForward write SetBrowserCanGoForward;
property BrowserStatusText : string read GetBrowserStatusText write SetBrowserStatusText;
property BrowserTitle : string read GetBrowserTitle write SetBrowserTitle;
public
procedure HandlePrintStart(const browser: ICefBrowser);
procedure HandlePrintSettings(const browser: ICefBrowser; const settings: ICefPrintSettings; getDefaults: boolean);
procedure HandlePrintDialog(const browser: ICefBrowser; hasSelection: boolean; const callback: ICefPrintDialogCallback; var aResult : boolean);
procedure HandlePrintJob(const browser: ICefBrowser; const documentName, PDFFilePath: ustring; const callback: ICefPrintJobCallback; var aResult : boolean);
procedure HandlePrintReset(const browser: ICefBrowser);
end;
var
@ -193,7 +212,7 @@ implementation
{$R *.lfm}
uses
uCEFMiscFunctions, uCefClient, uCEFLinuxConstants;
uCEFMiscFunctions, uCefClient, uCEFLinuxConstants, uCEFPrintSettings;
const
CEF_UPDATEADDRESS = 1;
@ -203,6 +222,10 @@ const
CEF_SHOWDEVTOOLS = 5;
CEF_HIDEDEVTOOLS = 6;
CEF_PDFPRINTEND = 7;
CEF_SHOWPRINTDIALOG = 8;
CEF_PRINTJOBSTARTED = 9;
CEF_PRINTSTART = 10;
CEF_PRINTRESET = 11;
MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS = MENU_ID_USER_FIRST + 1;
MINIBROWSER_CONTEXTMENU_HIDEDEVTOOLS = MENU_ID_USER_FIRST + 2;
@ -213,13 +236,50 @@ const
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnPrintStart(const browser: ICefBrowser);
begin
MiniBrowserFrm.HandlePrintStart(browser);
end;
procedure GlobalCEFApp_OnPrintSettings(const browser: ICefBrowser; const settings: ICefPrintSettings; getDefaults: boolean);
begin
MiniBrowserFrm.HandlePrintSettings(browser, settings, getDefaults);
end;
procedure GlobalCEFApp_OnPrintDialog(const browser: ICefBrowser; hasSelection: boolean; const callback: ICefPrintDialogCallback; var aResult : boolean);
begin
MiniBrowserFrm.HandlePrintDialog(browser, hasSelection, callback, aResult);
end;
procedure GlobalCEFApp_OnPrintJob(const browser: ICefBrowser; const documentName, PDFFilePath: ustring; const callback: ICefPrintJobCallback; var aResult : boolean);
begin
MiniBrowserFrm.HandlePrintJob(browser, documentName, PDFFilePath, callback, aResult);
end;
procedure GlobalCEFApp_OnPrintReset(const browser: ICefBrowser);
begin
MiniBrowserFrm.HandlePrintReset(browser);
end;
procedure GlobalCEFApp_OnGetPDFPaperSize(deviceUnitsPerInch: Integer; var aResult : TCefSize);
begin
aResult.width := Printer.PaperSize.Width;
aResult.height := Printer.PaperSize.Height;
end;
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.cache := 'cache';
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
//GlobalCEFApp.EnablePrintPreview := True;
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.EnablePrintPreview := True;
GlobalCEFApp.OnPrintStart := @GlobalCEFApp_OnPrintStart;
GlobalCEFApp.OnPrintSettings := @GlobalCEFApp_OnPrintSettings;
GlobalCEFApp.OnPrintDialog := @GlobalCEFApp_OnPrintDialog;
GlobalCEFApp.OnPrintJob := @GlobalCEFApp_OnPrintJob;
GlobalCEFApp.OnPrintReset := @GlobalCEFApp_OnPrintReset;
GlobalCEFApp.OnGetPDFPaperSize := @GlobalCEFApp_OnGetPDFPaperSize;
end;
{Property setters and getters}
@ -367,22 +427,16 @@ end;
procedure TMiniBrowserFrm.Print1Click(Sender: TObject);
begin
// TODO: Linux applications need to use the Printer Handler events in
// GlobalCEFApp before printing.
//Chromium1.Print;
Chromium1.Print;
end;
procedure TMiniBrowserFrm.PrintinPDF1Click(Sender: TObject);
begin
// TODO: Linux applications need to use the Printer Handler events in
// GlobalCEFApp before printing.
{
SaveDialog1.DefaultExt := 'pdf';
SaveDialog1.Filter := 'PDF files (*.pdf)|*.PDF';
if SaveDialog1.Execute and (length(SaveDialog1.FileName) > 0) then
Chromium1.PrintToPDF(SaveDialog1.FileName, Chromium1.DocumentURL, Chromium1.DocumentURL);
}
end;
procedure TMiniBrowserFrm.ShowDevTools1Click(Sender: TObject);
@ -482,6 +536,9 @@ begin
FBrowserStatusText := '';
FBrowserTitle := '';
FPrintDialogCallback := nil;
FPrintJobCallback := nil;
FBrowserCS := TCriticalSection.Create;
// The MultiBrowserMode store all the browser references in TChromium.
@ -503,6 +560,9 @@ end;
procedure TMiniBrowserFrm.FormDestroy(Sender: TObject);
begin
FPrintDialogCallback := nil;
FPrintJobCallback := nil;
FBrowserCS.Free;
end;
{%Endregion}
@ -549,10 +609,20 @@ end;
{%Region}
procedure TMiniBrowserFrm.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
if not(Chromium1.CreateBrowser(CEFLinkedWindowParent1.Handle, CEFLinkedWindowParent1.BoundsRect)) and
not(Chromium1.Initialized) then
Timer1.Enabled := True;
if Chromium1.Initialized then
begin
if (FPrintJobCallback <> nil) and not(Printer.Printing) then
begin
FPrintJobCallback.Cont();
FPrintJobCallback := nil;
end;
end
else
begin
Timer1.Enabled := False;
if not(Chromium1.CreateBrowser(CEFLinkedWindowParent1.Handle, CEFLinkedWindowParent1.BoundsRect)) then
Timer1.Enabled := True;
end;
end;
{%Endregion}
@ -756,6 +826,20 @@ procedure TMiniBrowserFrm.Chromium1GotFocus(Sender: TObject;
begin
CEFLinkedWindowParent1.SetFocus;
end;
procedure TMiniBrowserFrm.Chromium1Jsdialog(Sender: TObject;
const browser: ICefBrowser; const originUrl: ustring;
dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring;
const callback: ICefJsDialogCallback; out suppressMessage: Boolean; out
Result: Boolean);
begin
// We skip JS dialogs to avoid a crash due to the CEF issue #3087
// https://bitbucket.org/chromiumembedded/cef/issues/3087/linux-multi-threaded-message-loop-not
// Even with this workaround the application may have issues if a JS dialog is suppressed.
suppressMessage := True;
Result := False;
end;
{%Endregion}
{Custom form messages}
@ -839,6 +923,72 @@ begin
Caption := BrowserTitle;
end;
procedure TMiniBrowserFrm.BrowserShowPrintDlgMsg(Data: PtrInt);
var
TempSettings : ICefPrintSettings;
TempRanges : TCefRangeArray;
TempSize : TCefSize;
TempArea : TCefRect;
begin
if (FPrintDialogCallback = nil) then exit;
try
if PrintDialog1.Execute then
begin
TempSettings := TCefPrintSettingsRef.New();
if (PrintDialog1.PrintRange = TPrintRange.prPageNums) then
begin
SetLength(TempRanges, 1);
TempRanges[0].from := PrintDialog1.FromPage;
TempRanges[0].to_ := PrintDialog1.ToPage;
end
else
SetLength(TempRanges, 0);
TempSettings.SetPageRanges(TempRanges);
TempSettings.SetSelectionOnly(PrintDialog1.PrintRange = TPrintRange.prSelection);
TempSettings.DeviceName := Printer.PrinterName;
TempSettings.Dpi := Printer.XDPI;
TempSize.width := Printer.PaperSize.Width;
TempSize.height := Printer.PaperSize.Height;
TempArea.x := TPrinterCanvas(Printer.Canvas).LeftMargin;
TempArea.y := TPrinterCanvas(Printer.Canvas).TopMargin;
TempArea.width := TPrinterCanvas(Printer.Canvas).PageWidth;
TempArea.height := TPrinterCanvas(Printer.Canvas).PageHeight;
TempSettings.SetOrientation(Printer.Orientation in [TPrinterOrientation.poLandscape, TPrinterOrientation.poReverseLandscape]);
TempSettings.SetPrinterPrintableArea(@TempSize, @TempArea, Printer.Orientation = TPrinterOrientation.poReverseLandscape);
FPrintDialogCallback.Cont(TempSettings);
end
else
FPrintDialogCallback.Cancel;
finally
TempSettings := nil;
FPrintDialogCallback := nil;
end;
end;
procedure TMiniBrowserFrm.BrowserPrintJobStartedMsg(Data: PtrInt);
begin
StatusBar1.Panels[0].Text := 'Print job started';
Timer1.Enabled := True;
end;
procedure TMiniBrowserFrm.BrowserPrintStartMsg(Data: PtrInt);
begin
StatusBar1.Panels[0].Text := 'Print start';
end;
procedure TMiniBrowserFrm.BrowserPrintResetMsg(Data: PtrInt);
begin
StatusBar1.Panels[0].Text := 'Print reset';
end;
procedure TMiniBrowserFrm.SendCompMessage(aMsg : cardinal; Data: PtrInt);
begin
case aMsg of
@ -851,6 +1001,10 @@ begin
CEF_SHOWDEVTOOLS : Application.QueueAsyncCall(@BrowserShowDevToolsMsg, Data);
CEF_HIDEDEVTOOLS : Application.QueueAsyncCall(@BrowserHideDevToolsMsg, Data);
CEF_PDFPRINTEND : Application.QueueAsyncCall(@BrowserPrintPDFEndMsg, Data);
CEF_SHOWPRINTDIALOG : Application.QueueAsyncCall(@BrowserShowPrintDlgMsg, Data);
CEF_PRINTJOBSTARTED : Application.QueueAsyncCall(@BrowserPrintJobStartedMsg, Data);
CEF_PRINTSTART : Application.QueueAsyncCall(@BrowserPrintStartMsg, Data);
CEF_PRINTRESET : Application.QueueAsyncCall(@BrowserPrintResetMsg, Data);
end;
end;
{%Endregion}
@ -877,4 +1031,73 @@ begin
end;
{%Endregion}
{Printing procedures}
{%Region}
procedure TMiniBrowserFrm.HandlePrintStart(const browser: ICefBrowser);
begin
if (browser <> nil) and Chromium1.IsSameBrowser(browser) then
SendCompMessage(CEF_PRINTSTART);
end;
procedure TMiniBrowserFrm.HandlePrintSettings(const browser: ICefBrowser; const settings: ICefPrintSettings; getDefaults: boolean);
var
TempSize : TCefSize;
TempArea : TCefRect;
begin
if (settings <> nil) and (browser <> nil) and settings.IsValid and not(settings.IsReadOnly) and Chromium1.IsSameBrowser(browser) then
begin
// if getDefaults then ...
TempSize.width := Printer.PaperSize.Width;
TempSize.height := Printer.PaperSize.Height;
TempArea.x := TPrinterCanvas(Printer.Canvas).LeftMargin;
TempArea.y := TPrinterCanvas(Printer.Canvas).TopMargin;
TempArea.width := TPrinterCanvas(Printer.Canvas).PageWidth;
TempArea.height := TPrinterCanvas(Printer.Canvas).PageHeight;
settings.DeviceName := Printer.PrinterName;
settings.Dpi := Printer.XDPI;
settings.SetOrientation(Printer.Orientation in [TPrinterOrientation.poLandscape, TPrinterOrientation.poReverseLandscape]);
settings.SetPrinterPrintableArea(@TempSize, @TempArea, Printer.Orientation = TPrinterOrientation.poReverseLandscape);
end;
end;
procedure TMiniBrowserFrm.HandlePrintDialog(const browser: ICefBrowser; hasSelection: boolean; const callback: ICefPrintDialogCallback; var aResult : boolean);
begin
if (browser <> nil) and (callback <> nil) and Chromium1.IsSameBrowser(browser) then
begin
FPrintDialogCallback := callback;
FPrintDialogHasSelection := hasSelection;
aResult := True;
SendCompMessage(CEF_SHOWPRINTDIALOG);
end
else
aResult := False;
end;
procedure TMiniBrowserFrm.HandlePrintJob(const browser: ICefBrowser; const documentName, PDFFilePath: ustring; const callback: ICefPrintJobCallback; var aResult : boolean);
begin
if (browser <> nil) and (callback <> nil) and Chromium1.IsSameBrowser(browser) then
begin
FPrintJobCallback := callback;
FPrintJobDocumentName := documentName;
FPrintJobPDFFilePath := PDFFilePath;
aResult := True;
SendCompMessage(CEF_PRINTJOBSTARTED);
end
else
aResult := False;
end;
procedure TMiniBrowserFrm.HandlePrintReset(const browser: ICefBrowser);
begin
if (browser <> nil) and Chromium1.IsSameBrowser(browser) then
SendCompMessage(CEF_PRINTRESET);
end;
{%Endregion}
end.

View File

@ -7,11 +7,10 @@
<Unit0>
<Filename Value="OSRExternalPumpBrowser.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="4"/>
<EditorIndex Value="-1"/>
<TopLine Value="31"/>
<CursorPos X="20" Y="72"/>
<UsageCount Value="91"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="uosrexternalpumpbrowser.pas"/>
@ -21,16 +20,16 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="uOSRExternalPumpBrowser"/>
<IsVisibleTab Value="True"/>
<TopLine Value="177"/>
<CursorPos X="21" Y="195"/>
<TopLine Value="342"/>
<CursorPos X="67" Y="379"/>
<UsageCount Value="91"/>
<Bookmarks Count="6">
<Item0 Y="705" ID="2"/>
<Item1 X="9" Y="603" ID="3"/>
<Item2 X="13" Y="316" ID="9"/>
<Item3 Y="690" ID="8"/>
<Item4 X="41" Y="281" ID="7"/>
<Item5 X="52" Y="187" ID="1"/>
<Item0 Y="731" ID="2"/>
<Item1 X="9" Y="629" ID="3"/>
<Item2 X="13" Y="318" ID="9"/>
<Item3 Y="716" ID="8"/>
<Item4 X="41" Y="283" ID="7"/>
<Item5 X="52" Y="189" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -94,11 +93,10 @@
</Unit9>
<Unit10>
<Filename Value="../../../source/uCEFMiscFunctions.pas"/>
<EditorIndex Value="3"/>
<EditorIndex Value="-1"/>
<TopLine Value="40"/>
<CursorPos X="51" Y="63"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/interfaces/gtk2/gtk2int.pas"/>
@ -146,11 +144,10 @@
</Unit16>
<Unit17>
<Filename Value="../../../source/uCEFApplicationCore.pas"/>
<EditorIndex Value="1"/>
<EditorIndex Value="-1"/>
<TopLine Value="604"/>
<CursorPos X="71" Y="623"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit17>
<Unit18>
<Filename Value="../../../source/uCEFApplication.pas"/>
@ -399,8 +396,8 @@
<Unit52>
<Filename Value="../../../source/uCEFChromiumCore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="6966"/>
<CursorPos X="78" Y="6355"/>
<TopLine Value="6328"/>
<CursorPos X="68" Y="6353"/>
<UsageCount Value="10"/>
</Unit52>
<Unit53>
@ -813,8 +810,8 @@
<Filename Value="../SimpleOSRBrowser/usimpleosrbrowser.pas"/>
<UnitName Value="uSimpleOSRBrowser"/>
<EditorIndex Value="-1"/>
<TopLine Value="772"/>
<CursorPos X="9" Y="817"/>
<TopLine Value="351"/>
<CursorPos X="60" Y="372"/>
<UsageCount Value="10"/>
</Unit110>
<Unit111>
@ -827,138 +824,113 @@
</Unit111>
<Unit112>
<Filename Value="../../../source/uCEFLinuxFunctions.pas"/>
<EditorIndex Value="2"/>
<EditorIndex Value="-1"/>
<TopLine Value="62"/>
<CursorPos X="19" Y="81"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit112>
</Units>
<OtherDefines Count="2">
<Define0 Value="UseCthreads"/>
<Define1 Value="EnabledGtkThreading"/>
</OtherDefines>
<JumpHistory Count="30" HistoryIndex="29">
<JumpHistory Count="24" HistoryIndex="23">
<Position1>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="328" Column="58" TopLine="308"/>
<Caret Line="86" Column="24" TopLine="81"/>
</Position1>
<Position2>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="216" Column="77" TopLine="205"/>
<Caret Line="768" TopLine="54"/>
</Position2>
<Position3>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="87" Column="22" TopLine="60"/>
<Caret Line="195" Column="47" TopLine="172"/>
</Position3>
<Position4>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="73" Column="13" TopLine="63"/>
<Caret Line="220" Column="36" TopLine="197"/>
</Position4>
<Position5>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="410" Column="3" TopLine="406"/>
<Caret Line="221" Column="51" TopLine="197"/>
</Position5>
<Position6>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="277" Column="73" TopLine="237"/>
<Caret Line="235" Column="62" TopLine="208"/>
</Position6>
<Position7>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="86" Column="24" TopLine="81"/>
<Caret Line="240" Column="47" TopLine="205"/>
</Position7>
<Position8>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="768" TopLine="54"/>
<Caret Line="331" TopLine="310"/>
</Position8>
<Position9>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="195" Column="47" TopLine="172"/>
<Caret Line="722" TopLine="713"/>
</Position9>
<Position10>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="220" Column="36" TopLine="197"/>
<Caret Line="96" TopLine="74"/>
</Position10>
<Position11>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="221" Column="51" TopLine="197"/>
<Caret Line="95" TopLine="73"/>
</Position11>
<Position12>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="235" Column="62" TopLine="208"/>
<Caret Line="317" Column="82" TopLine="291"/>
</Position12>
<Position13>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="240" Column="47" TopLine="205"/>
<Caret Line="79" Column="15" TopLine="65"/>
</Position13>
<Position14>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="331" TopLine="310"/>
<Caret Line="620" Column="34" TopLine="596"/>
</Position14>
<Position15>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="722" TopLine="713"/>
<Caret Line="689" TopLine="644"/>
</Position15>
<Position16>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="96" TopLine="74"/>
<Caret Line="687" Column="3" TopLine="644"/>
</Position16>
<Position17>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="95" TopLine="73"/>
<Caret Line="231" TopLine="174"/>
</Position17>
<Position18>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="317" Column="82" TopLine="291"/>
<Caret Line="199" Column="4" TopLine="189"/>
</Position18>
<Position19>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="79" Column="15" TopLine="65"/>
<Caret Line="191" Column="60" TopLine="189"/>
</Position19>
<Position20>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="620" Column="34" TopLine="596"/>
<Caret Line="196" Column="21" TopLine="178"/>
</Position20>
<Position21>
<Filename Value="OSRExternalPumpBrowser.lpr"/>
<Caret Line="72" Column="20" TopLine="31"/>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="352" Column="53" TopLine="333"/>
</Position21>
<Position22>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="689" TopLine="644"/>
<Caret Line="349" Column="56" TopLine="332"/>
</Position22>
<Position23>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="687" Column="3" TopLine="644"/>
<Caret Line="355" Column="53" TopLine="333"/>
</Position23>
<Position24>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="231" TopLine="174"/>
<Caret Line="404" TopLine="369"/>
</Position24>
<Position25>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="199" Column="4" TopLine="189"/>
</Position25>
<Position26>
<Filename Value="../../../source/uCEFApplicationCore.pas"/>
<Caret Line="623" Column="71" TopLine="604"/>
</Position26>
<Position27>
<Filename Value="../../../source/uCEFMiscFunctions.pas"/>
<Caret Line="70" Column="7" TopLine="39"/>
</Position27>
<Position28>
<Filename Value="../../../source/uCEFLinuxFunctions.pas"/>
<Caret Line="55" Column="19" TopLine="33"/>
</Position28>
<Position29>
<Filename Value="../../../source/uCEFMiscFunctions.pas"/>
<Caret Line="74" Column="66" TopLine="39"/>
</Position29>
<Position30>
<Filename Value="uosrexternalpumpbrowser.pas"/>
<Caret Line="191" Column="60" TopLine="189"/>
</Position30>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -86,6 +86,8 @@ object Form1: TForm1
OnMouseMove = Panel1MouseMove
OnMouseUp = Panel1MouseUp
OnMouseWheel = Panel1MouseWheel
OnMouseEnter = Panel1MouseEnter
OnMouseLeave = Panel1MouseLeave
OnResize = Panel1Resize
end
object Chromium1: TChromium

View File

@ -63,6 +63,8 @@ type
procedure Panel1Enter(Sender: TObject);
procedure Panel1Exit(Sender: TObject);
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseEnter(Sender: TObject);
procedure Panel1MouseLeave(Sender: TObject);
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
@ -330,7 +332,6 @@ procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
TempEvent : TCefMouseEvent;
TempTime : integer;
begin
Panel1.SetFocus;
@ -341,11 +342,36 @@ begin
Chromium1.SendMouseClickEvent(@TempEvent, GetButton(Button), False, 1);
end;
procedure TForm1.Panel1MouseEnter(Sender: TObject);
var
TempEvent : TCefMouseEvent;
TempPoint : TPoint;
begin
TempPoint := Panel1.ScreenToClient(mouse.CursorPos);
TempEvent.x := TempPoint.x;
TempEvent.y := TempPoint.y;
TempEvent.modifiers := EVENTFLAG_NONE;
DeviceToLogical(TempEvent, Panel1.ScreenScale);
Chromium1.SendMouseMoveEvent(@TempEvent, False);
end;
procedure TForm1.Panel1MouseLeave(Sender: TObject);
var
TempEvent : TCefMouseEvent;
TempPoint : TPoint;
begin
TempPoint := Panel1.ScreenToClient(mouse.CursorPos);
TempEvent.x := TempPoint.x;
TempEvent.y := TempPoint.y;
TempEvent.modifiers := EVENTFLAG_NONE;
DeviceToLogical(TempEvent, Panel1.ScreenScale);
Chromium1.SendMouseMoveEvent(@TempEvent, True);
end;
procedure TForm1.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
TempEvent : TCefMouseEvent;
TempTime : integer;
begin
TempEvent.x := x;
TempEvent.y := y;

View File

@ -3,14 +3,14 @@
<ProjectSession>
<Version Value="11"/>
<BuildModes Active="Default"/>
<Units Count="62">
<Units Count="64">
<Unit0>
<Filename Value="SimpleBrowser2.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<TopLine Value="18"/>
<CursorPos X="74" Y="42"/>
<UsageCount Value="49"/>
<UsageCount Value="52"/>
</Unit0>
<Unit1>
<Filename Value="usimplebrowser2.pas"/>
@ -21,8 +21,8 @@
<UnitName Value="uSimpleBrowser2"/>
<IsVisibleTab Value="True"/>
<TopLine Value="225"/>
<CursorPos X="57" Y="246"/>
<UsageCount Value="49"/>
<CursorPos X="49" Y="250"/>
<UsageCount Value="52"/>
<Bookmarks Count="2">
<Item0 X="57" Y="243" ID="3"/>
<Item1 Y="239" ID="9"/>
@ -35,7 +35,7 @@
<IsPartOfProject Value="True"/>
<UnitName Value="Interfaces"/>
<EditorIndex Value="-1"/>
<UsageCount Value="47"/>
<UsageCount Value="50"/>
</Unit2>
<Unit3>
<Filename Value="../../../../source/uCEFConstants.pas"/>
@ -143,9 +143,9 @@
<Unit18>
<Filename Value="../../../source/uCEFChromiumCore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="6390"/>
<CursorPos X="25" Y="6396"/>
<UsageCount Value="23"/>
<TopLine Value="6342"/>
<CursorPos X="3" Y="6346"/>
<UsageCount Value="24"/>
<Bookmarks Count="1">
<Item0 Y="4727" ID="2"/>
</Bookmarks>
@ -262,9 +262,9 @@
<Unit35>
<Filename Value="../../../source/uCEFApplicationCore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="520"/>
<CursorPos X="53" Y="563"/>
<UsageCount Value="10"/>
<TopLine Value="2367"/>
<CursorPos X="77" Y="2398"/>
<UsageCount Value="11"/>
</Unit35>
<Unit36>
<Filename Value="../../../source/uCEFApplication.pas"/>
@ -459,6 +459,19 @@
<CursorPos X="54" Y="232"/>
<UsageCount Value="11"/>
</Unit61>
<Unit62>
<Filename Value="../../../source/uCEFLinuxConstants.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="3896"/>
<CursorPos X="40" Y="3736"/>
<UsageCount Value="10"/>
</Unit62>
<Unit63>
<Filename Value="../../../source/uCEFLinuxFunctions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="514"/>
<UsageCount Value="10"/>
</Unit63>
</Units>
<JumpHistory Count="11" HistoryIndex="10">
<Position1>

View File

@ -3,14 +3,14 @@
<ProjectSession>
<Version Value="11"/>
<BuildModes Active="Default"/>
<Units Count="108">
<Units Count="111">
<Unit0>
<Filename Value="SimpleOSRBrowser.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<TopLine Value="29"/>
<CursorPos X="57" Y="58"/>
<UsageCount Value="83"/>
<UsageCount Value="85"/>
</Unit0>
<Unit1>
<Filename Value="usimpleosrbrowser.pas"/>
@ -20,12 +20,11 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="uSimpleOSRBrowser"/>
<IsVisibleTab Value="True"/>
<TopLine Value="213"/>
<CursorPos X="78" Y="229"/>
<UsageCount Value="83"/>
<Bookmarks Count="2">
<Item0 X="49" Y="223" ID="2"/>
<Item1 X="80" Y="528" ID="6"/>
<TopLine Value="341"/>
<CursorPos X="27" Y="359"/>
<UsageCount Value="85"/>
<Bookmarks Count="1">
<Item0 X="80" Y="554" ID="6"/>
</Bookmarks>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -36,7 +35,7 @@
<UnitName Value="Interfaces"/>
<EditorIndex Value="-1"/>
<CursorPos X="40" Y="20"/>
<UsageCount Value="79"/>
<UsageCount Value="81"/>
</Unit2>
<Unit3>
<Filename Value="/usr/share/lazarus/2.0.6/lcl/lcltype.pp"/>
@ -90,8 +89,8 @@
<Unit10>
<Filename Value="../../../source/uCEFMiscFunctions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="184"/>
<CursorPos X="22" Y="211"/>
<TopLine Value="721"/>
<CursorPos X="3" Y="756"/>
<UsageCount Value="15"/>
</Unit10>
<Unit11>
@ -105,9 +104,9 @@
<Unit12>
<Filename Value="../../../source/uCEFChromium.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="62"/>
<CursorPos X="17" Y="86"/>
<UsageCount Value="8"/>
<TopLine Value="294"/>
<CursorPos X="3" Y="302"/>
<UsageCount Value="10"/>
</Unit12>
<Unit13>
<Filename Value="../../../source/uCEFConstants.pas"/>
@ -126,14 +125,14 @@
<Unit15>
<Filename Value="../../../source/uCEFBufferPanel.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1034"/>
<CursorPos X="3" Y="1037"/>
<TopLine Value="231"/>
<CursorPos Y="257"/>
<UsageCount Value="29"/>
<Bookmarks Count="4">
<Item0 Y="1036" ID="9"/>
<Item1 X="63" Y="589" ID="8"/>
<Item2 X="5" Y="350" ID="7"/>
<Item3 X="5" Y="380" ID="1"/>
<Item0 Y="1038" ID="9"/>
<Item1 X="63" Y="591" ID="8"/>
<Item2 X="5" Y="352" ID="7"/>
<Item3 X="5" Y="382" ID="1"/>
</Bookmarks>
</Unit15>
<Unit16>
@ -184,15 +183,15 @@
<Filename Value="/usr/share/lazarus/2.0.10/lcl/controls.pp"/>
<UnitName Value="Controls"/>
<EditorIndex Value="-1"/>
<TopLine Value="1718"/>
<CursorPos X="29" Y="1745"/>
<TopLine Value="1472"/>
<CursorPos Y="1502"/>
<UsageCount Value="16"/>
</Unit22>
<Unit23>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<EditorIndex Value="-1"/>
<TopLine Value="1025"/>
<TopLine Value="1034"/>
<CursorPos X="3" Y="1046"/>
<UsageCount Value="12"/>
</Unit23>
@ -401,9 +400,15 @@
<Unit52>
<Filename Value="../../../source/uCEFChromiumCore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1122"/>
<CursorPos Y="1147"/>
<TopLine Value="2506"/>
<CursorPos Y="2529"/>
<UsageCount Value="10"/>
<Bookmarks Count="4">
<Item0 Y="4619" ID="2"/>
<Item1 X="41" Y="2931" ID="9"/>
<Item2 Y="6346" ID="1"/>
<Item3 Y="2529" ID="3"/>
</Bookmarks>
</Unit52>
<Unit53>
<Filename Value="/usr/share/lazarus/2.0.10/lcl/include/wincontrol.inc"/>
@ -579,9 +584,9 @@
<Unit76>
<Filename Value="../../../source/uCEFTypes.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1243"/>
<CursorPos X="9" Y="1271"/>
<UsageCount Value="9"/>
<TopLine Value="1404"/>
<CursorPos X="17" Y="1427"/>
<UsageCount Value="10"/>
</Unit76>
<Unit77>
<Filename Value="/usr/share/fpcsrc/3.2.0/rtl/inc/objpash.inc"/>
@ -797,96 +802,37 @@
<CursorPos X="77" Y="127"/>
<UsageCount Value="10"/>
</Unit107>
<Unit108>
<Filename Value="../../../source/uCEFLinuxFunctions.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="538"/>
<CursorPos X="127" Y="573"/>
<UsageCount Value="10"/>
</Unit108>
<Unit109>
<Filename Value="../../../source/uCEFInterfaces.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="452"/>
<CursorPos Y="488"/>
<UsageCount Value="10"/>
</Unit109>
<Unit110>
<Filename Value="../../../source/uCEFTask.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="641"/>
<CursorPos Y="684"/>
<UsageCount Value="10"/>
</Unit110>
</Units>
<OtherDefines Count="2">
<Define0 Value="UseCthreads"/>
<Define1 Value="EnabledGtkThreading"/>
</OtherDefines>
<JumpHistory Count="21" HistoryIndex="20">
<JumpHistory Count="1">
<Position1>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="56" Column="63" TopLine="51"/>
<Caret Line="359" Column="27" TopLine="341"/>
</Position1>
<Position2>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="634" Column="63" TopLine="619"/>
</Position2>
<Position3>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="80" Column="15" TopLine="64"/>
</Position3>
<Position4>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="501" Column="35" TopLine="478"/>
</Position4>
<Position5>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="512" Column="52" TopLine="478"/>
</Position5>
<Position6>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="514" Column="38" TopLine="497"/>
</Position6>
<Position7>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="506" Column="70" TopLine="497"/>
</Position7>
<Position8>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="558" Column="39" TopLine="536"/>
</Position8>
<Position9>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="569" Column="56" TopLine="475"/>
</Position9>
<Position10>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="469" Column="61" TopLine="460"/>
</Position10>
<Position11>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="89" Column="15" TopLine="56"/>
</Position11>
<Position12>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="663" Column="3" TopLine="660"/>
</Position12>
<Position13>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="309" Column="3" TopLine="280"/>
</Position13>
<Position14>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="90" Column="24" TopLine="45"/>
</Position14>
<Position15>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="679" Column="12" TopLine="661"/>
</Position15>
<Position16>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="85" Column="15" TopLine="68"/>
</Position16>
<Position17>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="319" Column="12" TopLine="306"/>
</Position17>
<Position18>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="90" Column="15" TopLine="63"/>
</Position18>
<Position19>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="675" TopLine="671"/>
</Position19>
<Position20>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="85" Column="15" TopLine="68"/>
</Position20>
<Position21>
<Filename Value="usimpleosrbrowser.pas"/>
<Caret Line="225" Column="72" TopLine="187"/>
</Position21>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -85,6 +85,8 @@ object Form1: TForm1
OnMouseMove = Panel1MouseMove
OnMouseUp = Panel1MouseUp
OnMouseWheel = Panel1MouseWheel
OnMouseEnter = Panel1MouseEnter
OnMouseLeave = Panel1MouseLeave
OnResize = Panel1Resize
end
object Chromium1: TChromium

View File

@ -64,6 +64,8 @@ type
procedure Panel1Enter(Sender: TObject);
procedure Panel1Exit(Sender: TObject);
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseEnter(Sender: TObject);
procedure Panel1MouseLeave(Sender: TObject);
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
@ -344,7 +346,6 @@ procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
TempEvent : TCefMouseEvent;
TempTime : integer;
begin
Panel1.SetFocus;
@ -355,11 +356,36 @@ begin
Chromium1.SendMouseClickEvent(@TempEvent, GetButton(Button), False, 1);
end;
procedure TForm1.Panel1MouseEnter(Sender: TObject);
var
TempEvent : TCefMouseEvent;
TempPoint : TPoint;
begin
TempPoint := Panel1.ScreenToClient(mouse.CursorPos);
TempEvent.x := TempPoint.x;
TempEvent.y := TempPoint.y;
TempEvent.modifiers := EVENTFLAG_NONE;
DeviceToLogical(TempEvent, Panel1.ScreenScale);
Chromium1.SendMouseMoveEvent(@TempEvent, False);
end;
procedure TForm1.Panel1MouseLeave(Sender: TObject);
var
TempEvent : TCefMouseEvent;
TempPoint : TPoint;
begin
TempPoint := Panel1.ScreenToClient(mouse.CursorPos);
TempEvent.x := TempPoint.x;
TempEvent.y := TempPoint.y;
TempEvent.modifiers := EVENTFLAG_NONE;
DeviceToLogical(TempEvent, Panel1.ScreenScale);
Chromium1.SendMouseMoveEvent(@TempEvent, True);
end;
procedure TForm1.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
TempEvent : TCefMouseEvent;
TempTime : integer;
begin
TempEvent.x := x;
TempEvent.y := y;

View File

@ -270,8 +270,8 @@ type
function GetLibCefVersion : ustring;
function GetLibCefPath : ustring;
function GetChromeElfPath : ustring;
function GetLocalesDirPath: ustring;
function GetResourcesDirPath: ustring;
function GetLocalesDirPath: ustring;
function GetResourcesDirPath: ustring;
function GetMustCreateResourceBundleHandler : boolean; virtual;
function GetMustCreateBrowserProcessHandler : boolean; virtual;
function GetMustCreateRenderProcessHandler : boolean; virtual;
@ -366,9 +366,11 @@ type
destructor Destroy; override;
procedure AfterConstruction; override;
procedure AddCustomCommandLine(const aCommandLine : string; const aValue : string = '');
procedure InitLibLocationFromArgs;
function StartMainProcess : boolean;
function StartSubProcess : boolean;
{$IFDEF MACOSX}
procedure InitLibLocationFromArgs;
{$ENDIF}
procedure DoMessageLoopWork;
procedure RunMessageLoop;
@ -867,16 +869,17 @@ begin
if (FCustomCommandLineValues <> nil) then FCustomCommandLineValues.Add(aValue);
end;
{$IFDEF MACOSX}
// This function checks if argv contains
// --framework-dir-path=
// --main-bundle-path=
// It sets the corresponding fields in the config
// This params are passed on Mac.
// The values can also be calculated, instead of calling this procedure
var
PARAM_FRAME_PATH : string = '--framework-dir-path';
PARAM_BUNDLE_PATH : string = '--main-bundle-path';
procedure TCefApplicationCore.InitLibLocationFromArgs;
const
PARAM_FRAME_PATH = '--framework-dir-path';
PARAM_BUNDLE_PATH = '--main-bundle-path';
var
i, l : Integer;
p : PChar;
@ -887,11 +890,11 @@ begin
p := strscan(argv[i], '=');
if p = nil then continue;
l := p - argv[i];
if (l = Length(PARAM_FRAME_PATH)) and
(strlcomp(argv[i], PChar(PARAM_FRAME_PATH), Length(PARAM_FRAME_PATH)) = 0) then
begin
FrameworkDirPath := PChar(argv[i] + Length(PARAM_FRAME_PATH) + 1);
end;
FrameworkDirPath := PChar(argv[i] + Length(PARAM_FRAME_PATH) + 1);
if (l = Length(PARAM_BUNDLE_PATH)) and
(strlcomp(argv[i], PChar(PARAM_BUNDLE_PATH), Length(PARAM_BUNDLE_PATH)) = 0) then
begin
@ -899,17 +902,16 @@ begin
MainBundlePath := MBPath;
end;
end;
if (MBPath <> '') and (FrameworkDirPath = '') then
begin
MBPath := IncludeTrailingPathDelimiter(MBPath);
{$IFDEF MACOSX}
MBPath := MBPath + LIBCEF_PREFIX;
{$ENDIF}
if FileExists(MBPath + LIBCEF_DLL) then begin
FrameworkDirPath := MBPath;
end;
end;
if (MBPath <> '') and (FrameworkDirPath = '') then
begin
MBPath := IncludeTrailingPathDelimiter(MBPath) + LIBCEF_PREFIX;
if FileExists(MBPath + LIBCEF_DLL) then
FrameworkDirPath := MBPath;
end;
end;
{$ENDIF}
// This function must only be called by the main executable when the application
// is configured to use a different executable for the subprocesses.
@ -1035,11 +1037,13 @@ end;
function TCefApplicationCore.GetResourcesDirPath: ustring;
begin
Result := FResourcesDirPath;
{$IFNDEF MACOSX}
if (Result = '') and (FrameworkDirPath <> '') then
begin
if FileExists(IncludeTrailingPathDelimiter(FrameworkDirPath) + LIBCEF_PAK) then
Result := FrameworkDirPath;
end;
{$ENDIF}
end;
procedure TCefApplicationCore.SetCache(const aValue : ustring);
@ -1657,8 +1661,7 @@ begin
FOnScheduleMessagePumpWork(delayMs);
end;
function TCefApplicationCore.Internal_GetLocalizedString(stringId: Integer;
var stringVal: ustring): boolean;
function TCefApplicationCore.Internal_GetLocalizedString(stringid: Integer; var stringVal: ustring) : boolean;
begin
Result := False;
@ -1819,8 +1822,7 @@ begin
FOnGetPDFPaperSize(deviceUnitsPerInch, aResult);
end;
procedure TCefApplicationCore.AppendSwitch(var aKeys, aValues: TStringList;
const aNewKey: ustring; const aNewValue: ustring);
procedure TCefApplicationCore.AppendSwitch(var aKeys, aValues : TStringList; const aNewKey, aNewValue : ustring);
var
TempKey, TempHyphenatedKey : ustring;
i : integer;
@ -1924,8 +1926,7 @@ begin
FreeAndNil(TempDisabledValues);
end;
procedure TCefApplicationCore.ReplaceSwitch(var aKeys, aValues: TStringList;
const aNewKey: ustring; const aNewValue: ustring);
procedure TCefApplicationCore.ReplaceSwitch(var aKeys, aValues : TStringList; const aNewKey, aNewValue : ustring);
var
TempKey, TempHyphenatedKey : ustring;
i : integer;

View File

@ -270,6 +270,10 @@ type
property OnMouseEnter;
property OnMouseLeave;
{$ENDIF}
{$IFDEF FPC}
property OnMouseEnter;
property OnMouseLeave;
{$ENDIF}
{$IFDEF DELPHI12_UP}
property ShowCaption;
property ParentDoubleBuffered;

View File

@ -1957,7 +1957,7 @@ begin
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName, FDefaultWindowInfoExStyle);
{$ELSE}
if FIsOSR then
WindowInfoAsWindowless(FWindowInfo, 0)
WindowInfoAsWindowless(FWindowInfo, aParentHandle)
else
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect);
{$ENDIF}

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 251,
"InternalVersion" : 252,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "88.2.4.0"
}