From c40167afdd62de287e870912f89913852301f534 Mon Sep 17 00:00:00 2001 From: macpgmr Date: Sun, 28 Nov 2010 17:33:37 +0000 Subject: [PATCH] Minor changes so it compiles with Cocoa widgetset; minor change to Mac scripts so it uses system's libsqlite3.dylib rather than XUL's, which Snow Leopard does not consider secure enough. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1386 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/geckoport/Components/GeckoBrowser.pas | 4 ++-- .../geckoport/Components/GeckoChromeWindow.pas | 14 ++++++++------ components/geckoport/SampleApps/run-cw-mac.sh | 4 ++-- components/geckoport/SampleApps/run-gb-mac.sh | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/components/geckoport/Components/GeckoBrowser.pas b/components/geckoport/Components/GeckoBrowser.pas index 85b5dd626..0378c5000 100755 --- a/components/geckoport/Components/GeckoBrowser.pas +++ b/components/geckoport/Components/GeckoBrowser.pas @@ -1888,7 +1888,7 @@ begin Result := Handle; {$ENDIF} {$IFDEF LCLCarbon} - Result := TCarbonWindow(Handle).Window; + Result := THANDLE(TCarbonWindow(Handle).Window); {$ENDIF} {$IFDEF LCLCocoa} ARect := NSView(TCocoaWindow(Handle).contentView).visibleRect; @@ -1898,7 +1898,7 @@ begin ARect.origin.y := 15; AView := NSView.alloc.initWithFrame(ARect); NSView(TCocoaWindow(Handle).contentView).addSubView(AView); - Result := HANDLE(AView); + Result := THANDLE(AView); {$ENDIF} {$IFDEF LCLGtk} Result := Handle; diff --git a/components/geckoport/Components/GeckoChromeWindow.pas b/components/geckoport/Components/GeckoChromeWindow.pas index 2df9a57c4..a65f1b2e6 100755 --- a/components/geckoport/Components/GeckoChromeWindow.pas +++ b/components/geckoport/Components/GeckoChromeWindow.pas @@ -168,12 +168,17 @@ var begin {$IFDEF MSWINDOWS}Result := Handle;{$ENDIF} - {$IFDEF LCLCarbon}Result := TCarbonWindow(Handle).Window;{$ENDIF} + {$IFDEF LCLCarbon}Result := THANDLE(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. +//NSLog(NSStringUtf8(FloatToStr(NSView(TCocoaWindow(Handle).contentView).frame.size.width))); + {$IFDEF LCLCocoa}Result := THANDLE(TCocoaWindow(Handle).contentView);{$ENDIF} + //New ObjC-based Cocoa 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; @@ -183,12 +188,9 @@ begin ARect.origin.y := 15; AView := NSView.alloc.initWithFrame(ARect); NSView(TCocoaWindow(Handle).contentView).addSubView(AView); - Result := HANDLE(AView); + Result := THANDLE(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 := Handle;{$ENDIF} //Is Handle same as GTK Window? diff --git a/components/geckoport/SampleApps/run-cw-mac.sh b/components/geckoport/SampleApps/run-cw-mac.sh index c55f41a3c..1aa1a502a 100755 --- a/components/geckoport/SampleApps/run-cw-mac.sh +++ b/components/geckoport/SampleApps/run-cw-mac.sh @@ -1,6 +1,6 @@ #!/bin/sh -#export DYLD_LIBRARY_PATH=/Applications/Firefox.app/Contents/MacOS -export DYLD_LIBRARY_PATH=/Library/Frameworks/XUL.framework/Versions/Current +#export DYLD_LIBRARY_PATH=/usr/lib:/Applications/Firefox.app/Contents/MacOS +export DYLD_LIBRARY_PATH=/usr/lib:/Library/Frameworks/XUL.framework/Versions/Current open ChromeWin.app diff --git a/components/geckoport/SampleApps/run-gb-mac.sh b/components/geckoport/SampleApps/run-gb-mac.sh index df461ebba..cfd1d261e 100755 --- a/components/geckoport/SampleApps/run-gb-mac.sh +++ b/components/geckoport/SampleApps/run-gb-mac.sh @@ -1,6 +1,6 @@ #!/bin/sh -#export DYLD_LIBRARY_PATH=/Applications/Firefox.app/Contents/MacOS -export DYLD_LIBRARY_PATH=/Library/Frameworks/XUL.framework/Versions/Current +#export DYLD_LIBRARY_PATH=/usr/lib:/Applications/Firefox.app/Contents/MacOS +export DYLD_LIBRARY_PATH=/usr/lib:/Library/Frameworks/XUL.framework/Versions/Current open GBrowser.app