You've already forked lazarus-ccr
One more try to commit all files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1027 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -34,13 +34,17 @@
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
unit GeckoBrowser;
|
||||
|
||||
{$IFDEF LCLCocoa}
|
||||
{$MODESWITCH ObjectiveC1}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
|
||||
SysUtils, Classes, Controls, nsConsts, nsXPCOM,
|
||||
nsGeckoStrings, CallbackInterfaces, nsTypes, nsXPCOMGlue, BrowserSupports,
|
||||
nsXPCOM_STD19
|
||||
nsXPCOM_std19
|
||||
{$IFDEF LCLCarbon}, CarbonPrivate {$ENDIF}
|
||||
{$IFDEF LCLCocoa}, CocoaPrivate {$ENDIF};
|
||||
|
||||
@ -1054,7 +1058,8 @@ begin
|
||||
rc := ClientRect;
|
||||
baseWin.InitWindow({$IFDEF MSWINDOWS}Pointer(Handle),{$ENDIF}
|
||||
{$IFDEF LCLCarbon}Pointer(TCarbonWindow(Handle).Window),{$ENDIF}
|
||||
{$IFDEF LCLCocoa}Pointer(TCocoaForm(Handle).MainWindowView.superview),{$ENDIF}
|
||||
// {$IFDEF LCLCocoa}Pointer(TCocoaForm(Handle).MainWindowView.superview),{$ENDIF}
|
||||
{$IFDEF LCLCocoa}Pointer(TCocoaWindow(Handle).contentView),{$ENDIF}
|
||||
{$IFDEF LCLGtk}Pointer(Handle),{$ENDIF} //Is Handle same as GTK Window?
|
||||
{$IFDEF LCLGtk2}Pointer(Handle),{$ENDIF} //Is Handle same as GTK Window?
|
||||
nil,
|
||||
|
@ -1,13 +1,13 @@
|
||||
object GeckoChromeForm: TGeckoChromeForm
|
||||
Left = 192
|
||||
Top = 107
|
||||
Width = 265
|
||||
Height = 163
|
||||
Width = 800
|
||||
Height = 600
|
||||
Color = clBtnFace
|
||||
Font.Charset = SHIFTJIS_CHARSET
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #65325#65331' '#65328#12468#12471#12483#12463
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
|
@ -1,13 +1,13 @@
|
||||
object GeckoChromeForm: TGeckoChromeForm
|
||||
Left = 192
|
||||
Top = 107
|
||||
Width = 257
|
||||
Height = 129
|
||||
Width = 800
|
||||
Height = 600
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = Tahoma
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
|
@ -1,8 +1,8 @@
|
||||
LazarusResources.Add('TGeckoChromeForm','FORMDATA',[
|
||||
'TPF0'#16'TGeckoChromeForm'#15'GeckoChromeForm'#4'Left'#3#192#0#3'Top'#2'k'#5
|
||||
+'Width'#3#1#1#6'Height'#3#129#0#5'Color'#7#9'clBtnFace'#12'Font.Charset'#7#15
|
||||
+'Width'#3' '#3#6'Height'#3'X'#2#5'Color'#7#9'clBtnFace'#12'Font.Charset'#7#15
|
||||
+'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWindowText'#11'Font.Height'#2#244#9
|
||||
+'Font.Name'#7#6'Tahoma'#10'Font.Style'#11#0#7'OnClose'#7#9'FormClose'#8'OnCr'
|
||||
+'Font.Name'#6#6'Tahoma'#10'Font.Style'#11#0#7'OnClose'#7#9'FormClose'#8'OnCr'
|
||||
+'eate'#7#10'FormCreate'#8'OnResize'#7#10'FormResize'#13'PixelsPerInch'#2'`'#0
|
||||
+#0
|
||||
]);
|
||||
|
@ -34,12 +34,18 @@
|
||||
* ***** END LICENSE BLOCK ***** *)
|
||||
unit GeckoChromeWindow;
|
||||
|
||||
{$IFDEF LCLCocoa}
|
||||
{$MODESWITCH ObjectiveC1}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LResources, {$ENDIF}
|
||||
SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, CallbackInterfaces, nsXPCOM, nsTypes, nsXPCOM_STD19;
|
||||
Dialogs, CallbackInterfaces, nsXPCOM, nsTypes, nsXPCOM_std19
|
||||
{$IFDEF LCLCarbon}, CarbonPrivate {$ENDIF}
|
||||
{$IFDEF LCLCocoa}, CocoaAll, CocoaUtils, CocoaPrivate {$ENDIF};
|
||||
|
||||
type
|
||||
TGeckoChromeForm = class(TForm,
|
||||
@ -92,6 +98,7 @@ type
|
||||
// for nsISupportsWeakReference
|
||||
function GetWeakReference(): nsIWeakReference; safecall;
|
||||
|
||||
function GetNativeWindow : Pointer; //FPC port: added this.
|
||||
procedure InitWebBrowser;
|
||||
procedure UpdateChrome;
|
||||
procedure ContentFinishedLoading;
|
||||
@ -104,6 +111,7 @@ type
|
||||
// IGeckoCreateWindowTarget
|
||||
function DoCreateChromeWindow(chromeFlags: Longword): nsIWebBrowserChrome;
|
||||
function GetWebBrowserChrome: nsIWebBrowserChrome;
|
||||
property WebBrowser : nsIWebBrowser read FWebBrowser; //FPC port: added this.
|
||||
end;
|
||||
|
||||
var
|
||||
@ -131,16 +139,52 @@ begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
function TGeckoChromeForm.GetNativeWindow : Pointer;
|
||||
{$IFDEF LCLCocoa}
|
||||
var
|
||||
ARect : NSRect;
|
||||
AView : NSView;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF MSWINDOWS}Result := Pointer(Handle);{$ENDIF}
|
||||
|
||||
{$IFDEF LCLCarbon}Result := Pointer(TCarbonWindow(Handle).Window);{$ENDIF}
|
||||
//Carbon doesn't work but leave in so package compiles in Carbon IDE.
|
||||
|
||||
// {$IFDEF LCLCocoa}Result := Pointer(TCocoaForm(Handle).MainWindowView.superview);{$ENDIF}
|
||||
//Old PasCocoa-based widgetset.
|
||||
|
||||
//Does adding a view work better than using window's view (below)? No, it doesn't.
|
||||
{$IFDEF LCLCocoa}
|
||||
ARect := NSView(TCocoaWindow(Handle).contentView).visibleRect;
|
||||
ARect.size.width := ARect.size.width - 30;
|
||||
ARect.size.height := ARect.size. height - 30;
|
||||
ARect.origin.x := 15;
|
||||
ARect.origin.y := 15;
|
||||
AView := NSView.alloc.initWithFrame(ARect);
|
||||
NSView(TCocoaWindow(Handle).contentView).addSubView(AView);
|
||||
Result := Pointer(AView);
|
||||
{$ENDIF}
|
||||
|
||||
//NSLog(NSStringUtf8(FloatToStr(NSView(TCocoaWindow(Handle).contentView).frame.size.width)));
|
||||
// {$IFDEF LCLCocoa}Result := Pointer(TCocoaWindow(Handle).contentView);{$ENDIF}
|
||||
//New ObjC-based Cocoa widgetset.
|
||||
|
||||
{$IFDEF LCLGtk}Result := Pointer(Handle);{$ENDIF} //Is Handle same as GTK Window?
|
||||
|
||||
{$IFDEF LCLGtk2}Result := Pointer(Handle);{$ENDIF} //Is Handle same as GTK Window?
|
||||
end;
|
||||
|
||||
procedure TGeckoChromeForm.InitWebBrowser;
|
||||
var
|
||||
base: nsIBaseWindow;
|
||||
begin
|
||||
NS_CreateInstance(NS_WEBBROWSER_CID, nsIWebBrowser, FWebBrowser);
|
||||
|
||||
FWebBrowser.SetContainerWindow(Self);
|
||||
FWebBrowser.ContainerWindow := Self;
|
||||
|
||||
base := FWebBrowser as nsIBaseWindow;
|
||||
base.InitWindow(Pointer(Handle), nil, 0, 0, ClientWidth, ClientHeight);
|
||||
base.InitWindow(GetNativeWindow, nil, 0, 0, ClientWidth, ClientHeight);
|
||||
base.Create;
|
||||
FWebBrowser.AddWebBrowserListener(Self, nsIWebProgressListener);
|
||||
base.SetVisibility(True);
|
||||
@ -330,7 +374,7 @@ end;
|
||||
|
||||
function TGeckoChromeForm.GetSiteWindow: Pointer;
|
||||
begin
|
||||
Result := Pointer(Handle);
|
||||
Result := GetNativeWindow;
|
||||
end;
|
||||
|
||||
procedure TGeckoChromeForm.OnStateChange(aWebProgress: nsIWebProgress; aRequest: nsIRequest; aStateFlags: PRUint32; aStatus: nsresult);
|
||||
@ -373,7 +417,9 @@ begin
|
||||
Result := NS_ERROR_NOT_INITIALIZED;
|
||||
end else
|
||||
begin
|
||||
Result := QueryInterface(uuid, Intf);
|
||||
// FPC port: Result is PRUInt32, but QueryInterface returns Longint,
|
||||
// so cast to nsresult to prevent range check error.
|
||||
Result := nsresult(QueryInterface(uuid, Intf));
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="Gecko Components for Lazarus"/>
|
||||
<License Value="MPL 1.1"/>
|
||||
<Version Release="2"/>
|
||||
<Version Release="3"/>
|
||||
<Files Count="20">
|
||||
<Item1>
|
||||
<Filename Value="GeckoBrowser.pas"/>
|
||||
@ -113,7 +113,7 @@
|
||||
<UnitName Value="nsXRE"/>
|
||||
</Item19>
|
||||
<Item20>
|
||||
<Filename Value="../each-version/nsXPCOM_STD19.pas"/>
|
||||
<Filename Value="../each-version/nsXPCOM_std19.pas"/>
|
||||
<UnitName Value="nsXPCOM_std19"/>
|
||||
</Item20>
|
||||
</Files>
|
||||
|
@ -10,7 +10,7 @@ uses
|
||||
GeckoBrowser, GeckoChromeWindow, GeckoInit, nsCID,
|
||||
nsConsts, nsEnumerators, nsError, nsErrorUtils, nsGeckoStrings, nsInit,
|
||||
nsMemory, nsNetUtil, nsStream, nsTypes, nsXPCOM, nsXPCOMGlue, nsXRE,
|
||||
nsXPCOM_STD19, LazarusPackageIntf;
|
||||
nsXPCOM_std19, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -61,7 +61,7 @@ implementation
|
||||
|
||||
uses
|
||||
nsTypes, nsInit, nsError, nsGeckoStrings, nsXPCOMGlue, nsCID, GeckoInit,
|
||||
nsXPCOM_STD19, nsEnumerators, Windows;
|
||||
nsXPCOM_std19, nsEnumerators, Windows;
|
||||
|
||||
type
|
||||
TDirectoryServiceProviderProxy = class(TInterfacedObject,
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
lazdir=~/lazarus
|
||||
if ! [ -e $lazdir ]
|
||||
then
|
||||
lazdir=/usr/local/share/lazarus
|
||||
fi
|
||||
if [ `arch` = "ppc" ]
|
||||
then
|
||||
proc=powerpc
|
||||
else
|
||||
proc=i386
|
||||
fi
|
||||
lclunits=$lazdir/lcl/units/$proc-darwin
|
||||
/usr/local/bin/fpc -dLCL -Sda -gl -O1 -Cirot -Fu../ -Fu../each-version -Fu$lclunits GeckoBrowser.pas
|
@ -1,18 +0,0 @@
|
||||
object Form1: TForm1
|
||||
Left = -2
|
||||
Top = 93
|
||||
Width = 803
|
||||
Height = 433
|
||||
Caption = 'Form1'
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
end
|
@ -1,16 +0,0 @@
|
||||
object Form1: TForm1
|
||||
Left = -2
|
||||
Top = 93
|
||||
Width = 795
|
||||
Height = 399
|
||||
Caption = 'Form1'
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
PixelsPerInch = 96
|
||||
end
|
@ -1,7 +0,0 @@
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#2#254#3'Top'#2']'#5'Width'#3#27#3#6'Height'
|
||||
+#3#143#1#7'Caption'#6#5'Form1'#5'Color'#7#9'clBtnFace'#12'Font.Charset'#7#15
|
||||
+'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWindowText'#11'Font.Height'#2#245#9
|
||||
+'Font.Name'#6#6'Tahoma'#10'Font.Style'#11#0#8'OnCreate'#7#10'FormCreate'#9'O'
|
||||
+'nDestroy'#7#11'FormDestroy'#13'PixelsPerInch'#2'`'#0#0
|
||||
]);
|
@ -1,173 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Delphi.Personality</Option>
|
||||
<Option Name="ProjectType"></Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{6C4A1541-ACE5-41C9-82B5-B6FBF513AFFF}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">BrowseWin.dpr</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">8</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">0</Compiler>
|
||||
<Compiler Name="R">0</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">False</Compiler>
|
||||
<Compiler Name="UnsafeCode">False</Compiler>
|
||||
<Compiler Name="UnsafeCast">False</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">False</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">16384</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription"></Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir">C:\B2005\GeckoSDK\Gre</Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath"></Directories>
|
||||
<Directories Name="Packages">rtl;vcl;dbrtl;vcldb;vclx;adortl;dbxcds;dbexpress;vclib;ibxpress;IntrawebDB_72_90;Intraweb_72_90;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;IndySystem;IndyCore;dclOfficeXP;VclSmp;dsnap;soaprtl;IndyProtocols;inetdb;bdertl;vcldbx;webdsnap;websnap;vclactnband;vclshlctrls;dsnapcon;teeui;teedb;tee;Rave60VCL;IE_EventD2005;O405_r70;IEDownD2005;TMSD2005;nplug;GeckoSDK;GeckoComponents</Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
</Parameters>
|
||||
<Language>
|
||||
<Language Name="ActiveLang"></Language>
|
||||
<Language Name="ProjectLang">$00000000</Language>
|
||||
<Language Name="RootDir"></Language>
|
||||
</Language>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
</BorlandProject>
|
@ -1,39 +0,0 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J-
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-E"C:\B2005\GeckoSDK\Gre"
|
||||
-LE"C:\Documents and Settings\Jaya\My Documents\Borland Studio Projects\Bpl"
|
||||
-LN"C:\Documents and Settings\Jaya\My Documents\Borland Studio Projects\Bpl"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<Compiler Value="/usr/local/bin/ppcppc" Date="1238925281"/>
|
||||
<Params Value=" -MDelphi -Sa -Cirot -O1 -gl -k-framework -kCocoa -WG -vewnhi -l -Fu../ -Fu../each-version/ -Fu../../../lazarus/lcl/units/powerpc-darwin/ -Fu../../../lazarus/lcl/units/powerpc-darwin/cocoa/ -Fu../../../lazarus/packager/units/powerpc-darwin/ -Fu. -oBrowseWin -dLCL -dLCLcocoa BrowseWin.dpr"/>
|
||||
</CONFIG>
|
@ -1,18 +0,0 @@
|
||||
program BrowseWin;
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
Interfaces,
|
||||
{$ENDIF}
|
||||
Forms,
|
||||
Brow10 in 'Brow10.pas' {Form1};
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$R *.res}
|
||||
{$ENDIF}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
Binary file not shown.
29
components/geckoport/SampleApps/ChromeWin.dpr
Executable file
29
components/geckoport/SampleApps/ChromeWin.dpr
Executable file
@ -0,0 +1,29 @@
|
||||
program ChromeWin;
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
Interfaces,
|
||||
{$ENDIF}
|
||||
Forms,
|
||||
nsXRE,
|
||||
BrowserSupports,
|
||||
GeckoChromeWindow in 'GeckoChromeWindow.pas' {GeckoChromeForm};
|
||||
|
||||
//{$IFDEF MSWINDOWS}
|
||||
//{$R *.res}
|
||||
//{$ENDIF}
|
||||
|
||||
var
|
||||
navigation: nsIWebNavigation;
|
||||
begin
|
||||
Application.Initialize;
|
||||
|
||||
XRE_Startup('1.9', True, '2.0', False);
|
||||
|
||||
// GeckoChromeForm := TGeckoChromeForm.CreateWithChromeFlags(Application, 0);
|
||||
Application.CreateForm(TGeckoChromeForm, GeckoChromeForm);
|
||||
navigation := GeckoChromeForm.WebBrowser as nsIWebNavigation;
|
||||
navigation.LoadURI('http://www.lazarus.freepascal.org', 0, nil, nil, nil);
|
||||
|
||||
Application.Run;
|
||||
end.
|
@ -27,14 +27,17 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="GeckoComponents"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="BrowseWin.dpr"/>
|
||||
<Filename Value="ChromeWin.dpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
@ -43,27 +46,11 @@
|
||||
<Loaded Value="True"/>
|
||||
<SyntaxHighlighter Value="Delphi"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="brow10.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Brow10"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
<SyntaxHighlighter Value="Delphi"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="../;../each-version/"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<SyntaxMode Value="Delphi"/>
|
@ -1,152 +0,0 @@
|
||||
unit Brow10;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}
|
||||
nsXRE,
|
||||
nsXPCOM,
|
||||
nsXPCOMGlue,
|
||||
nsTypes,
|
||||
nsError,
|
||||
SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls
|
||||
{$IFDEF LCLCarbon}, CarbonPrivate {$ENDIF}
|
||||
{$IFDEF LCLCocoa}, CocoaPrivate {$ENDIF};
|
||||
|
||||
type
|
||||
nsIWidget = interface end;
|
||||
nsIBaseWindow = interface(nsISupports)
|
||||
['{046BC8A0-8015-11d3-AF70-00A024FFC08C}']
|
||||
procedure InitWindow(parentNativeWindow: Pointer;
|
||||
parentWidget: nsIWidget;
|
||||
x: PRInt32;
|
||||
y: PRInt32;
|
||||
cx: PRInt32;
|
||||
cy: PRInt32); safecall;
|
||||
procedure Create(); safecall;
|
||||
procedure Destroy(); safecall;
|
||||
procedure SetPosition(x: PRInt32;
|
||||
y: PRInt32); safecall;
|
||||
procedure GetPosition(out x: PRInt32;
|
||||
out y: PRInt32); safecall;
|
||||
procedure SetSize(cx: PRInt32;
|
||||
cy: PRInt32); safecall;
|
||||
procedure GetSize(out cx: PRInt32;
|
||||
out cy: PRInt32); safecall;
|
||||
procedure SetPositionAndSize(x: PRInt32;
|
||||
y: PRInt32;
|
||||
cx: PRInt32;
|
||||
cy: PRInt32); safecall;
|
||||
procedure GetPositionAndSize(out x: PRInt32;
|
||||
out y: PRInt32;
|
||||
out cx: PRInt32;
|
||||
out cy: PRInt32); safecall;
|
||||
procedure Repaint(force: PRBool); safecall;
|
||||
function GetParentWidget: nsIWidget; safecall;
|
||||
procedure SetParentWidget(aParentWidget: nsIWidget); safecall;
|
||||
function GetNativeWindow: Pointer; safecall;
|
||||
procedure SetNativeWindow(aNativeWindow: Pointer); safecall;
|
||||
function GetVisibility: PRBool; safecall;
|
||||
procedure SetVisibility(aVisibility: PRBool); safecall;
|
||||
function GetEnabled: PRBool; safecall;
|
||||
procedure SetEnabled(aEnabled: PRBool); safecall;
|
||||
function GetBlurSupression: PRBool; safecall;
|
||||
procedure SetBlurSupression(aBlurSupression: PRBool); safecall;
|
||||
function GetMainWidget: nsIWidget; safecall;
|
||||
procedure SetFocus(); safecall;
|
||||
function GetTitle: PWideChar; safecall;
|
||||
procedure SetTitle(aTitle: PWideChar); safecall;
|
||||
end;
|
||||
|
||||
nsIWebNavigation = interface(nsISupports)
|
||||
['{F5D9E7B0-D930-11d3-B057-00A024FFC08C}']
|
||||
function GetCanGoBack: PRBool; safecall;
|
||||
function GetCanForward: PRBool; safecall;
|
||||
procedure GoBack(); safecall;
|
||||
procedure GoForward(); safecall;
|
||||
procedure GotoIndex(index: PRInt32); safecall;
|
||||
procedure LoadURI(uri: PWideChar;
|
||||
loadFlags: PRUint32;
|
||||
referer: nsIURI;
|
||||
postData: nsIInputStream;
|
||||
headers: nsIInputStream); safecall;
|
||||
procedure Reload(reloadFlags: PRUint32); safecall;
|
||||
procedure Stop(stopFlags: PRUint32); safecall;
|
||||
function GetDocument: nsIDOMDocument; safecall;
|
||||
function GetCurrentURI: nsIURI; safecall;
|
||||
function GetReferringURI: nsIURI; safecall;
|
||||
function GetSessionHistory: nsISHistory; safecall;
|
||||
end;
|
||||
|
||||
nsIDOMWindowInternal = interface(nsISupports)
|
||||
['{f914492c-0138-4123-a634-6ef8e3f126f8}']
|
||||
end;
|
||||
|
||||
nsIWindowMediator = interface(nsISupports)
|
||||
['{0659cb83-faad-11d2-8e19-b206620a657c}']
|
||||
function getMostRecentWindow(windowType: PWideChar): nsIDOMWindowInternal; stdcall;
|
||||
end;
|
||||
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FBrowser: nsIWebBrowser;
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$IFNDEF LCL}
|
||||
{$R *.dfm}
|
||||
{$ENDIF}
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
navigation: nsIWebNavigation;
|
||||
basewin: nsIBaseWindow;
|
||||
wm : nsIWindowMediator;
|
||||
begin
|
||||
XRE_Startup('1.9', True, '2.0', False);
|
||||
|
||||
NS_CreateInstance(NS_WEBBROWSER_CONTRACTID, nsIWebBrowser, FBrowser);
|
||||
|
||||
basewin := FBrowser as nsIBaseWindow;
|
||||
basewin.InitWindow({$IFDEF MSWINDOWS}Pointer(Handle),{$ENDIF}
|
||||
{$IFDEF LCLCarbon}Pointer(TCarbonWindow(Handle).Window),{$ENDIF}
|
||||
{$IFDEF LCLCocoa}Pointer(TCocoaForm(Handle).MainWindowView.superview),{$ENDIF}
|
||||
{$IFDEF LCLGtk}Pointer(Handle),{$ENDIF} //Is Handle same as GTK Window?
|
||||
{$IFDEF LCLGtk2}Pointer(Handle),{$ENDIF} //Is Handle same as GTK Window?
|
||||
nil, 0, 0, ClientWidth, ClientHeight);
|
||||
|
||||
basewin.Create;
|
||||
basewin.SetVisibility(True);
|
||||
|
||||
navigation := FBrowser as nsIWebNavigation;
|
||||
navigation.LoadURI('http://www.lazarus.freepascal.org', 0, nil, nil, nil);
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
FBrowser := nil;
|
||||
XRE_Shutdown;
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
{$IFDEF LCL}
|
||||
{$I Brow10.lrs} {Include form's resource file}
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
lazdir=~/lazarus
|
||||
if ! [ -e $lazdir ]
|
||||
then
|
||||
lazdir=/usr/local/share/lazarus
|
||||
fi
|
||||
if [ `arch` = "ppc" ]
|
||||
then
|
||||
proc=powerpc
|
||||
else
|
||||
proc=i386
|
||||
fi
|
||||
lclunits=$lazdir/lcl/units/$proc-darwin
|
||||
/usr/local/bin/fpc -dLCL -dLCLCarbon -WG -Sda -gl -O1 -Cirot -k'-framework' -k'carbon' -k'-framework' -k'opengl' -Fu$lclunits -Fu$lclunits/carbon -Fu../ -Fu../Components GBrowser.dpr
|
1
components/geckoport/SampleApps/lb-cw-cocoa.sh
Executable file
1
components/geckoport/SampleApps/lb-cw-cocoa.sh
Executable file
@ -0,0 +1 @@
|
||||
~/laz_svn/lazbuild --primary-config-path=~/.laz_svn --ws=cocoa chromewin.lpi
|
1
components/geckoport/SampleApps/lb-gb-cocoa.sh
Executable file
1
components/geckoport/SampleApps/lb-gb-cocoa.sh
Executable file
@ -0,0 +1 @@
|
||||
~/laz_svn/lazbuild --primary-config-path=~/.laz_svn --ws=cocoa gbrowser.lpi
|
6
components/geckoport/SampleApps/run-cw-mac.sh
Executable file
6
components/geckoport/SampleApps/run-cw-mac.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#export DYLD_LIBRARY_PATH=/Applications/Firefox.app/Contents/MacOS
|
||||
export DYLD_LIBRARY_PATH=/Library/Frameworks/XUL.framework/Versions/Current
|
||||
|
||||
open ChromeWin.app
|
@ -1 +0,0 @@
|
||||
fpc -Sd -Cirot nsXPCOM.pas
|
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
zipfile=GeckoPort
|
||||
|
||||
zip -D $zipfile *.*
|
||||
zip -d $zipfile *.o
|
||||
zip -d $zipfile *.ppu
|
||||
zip -d $zipfile *.bak
|
||||
|
||||
zip -D $zipfile each-version/*.*
|
||||
zip -d $zipfile each-version/*.o
|
||||
zip -d $zipfile each-version/*.ppu
|
||||
zip -d $zipfile each-version/*.bak
|
||||
|
||||
zip -D $zipfile Components/*.*
|
||||
zip -d $zipfile Components/*.o
|
||||
zip -d $zipfile Components/*.ppu
|
||||
zip -d $zipfile Components/*.bak
|
||||
|
||||
zip -D $zipfile SampleApps/*.*
|
||||
zip -d $zipfile SampleApps/*.o
|
||||
zip -d $zipfile SampleApps/*.ppu
|
||||
zip -d $zipfile SampleApps/*.bak
|
||||
zip -d $zipfile SampleApps/GBrowser
|
||||
zip -d $zipfile SampleApps/BrowseWin
|
Reference in New Issue
Block a user