diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Tools/MiniBrowser | |
parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
download | qtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Tools/MiniBrowser')
56 files changed, 6 insertions, 11159 deletions
diff --git a/Tools/MiniBrowser/Configurations/Base.xcconfig b/Tools/MiniBrowser/Configurations/Base.xcconfig deleted file mode 100644 index c801d582f..000000000 --- a/Tools/MiniBrowser/Configurations/Base.xcconfig +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2010 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -CLANG_CXX_LANGUAGE_STANDARD = gnu++0x; -CLANG_CXX_LIBRARY = libc++; -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym; -PREBINDING = NO -GCC_C_LANGUAGE_STANDARD = gnu99 -GCC_ENABLE_CPP_EXCEPTIONS = NO; -GCC_PRECOMPILE_PREFIX_HEADER = YES -GCC_TREAT_WARNINGS_AS_ERRORS = YES -GCC_VERSION = com.apple.compilers.llvm.clang.1_0; -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_VARIABLE = YES -GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO -WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -LINKER_DISPLAYS_MANGLED_NAMES = YES; -VALID_ARCHS = i386 x86_64; - -TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR); - -TARGETING_SAME_OS_X_VERSION = $(TARGETING_SAME_OS_X_VERSION_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -TARGETING_SAME_OS_X_VERSION_1070_1070 = YES; -TARGETING_SAME_OS_X_VERSION_1080_1080 = YES; -TARGETING_SAME_OS_X_VERSION_1090_1090 = YES; - -// Don't build against an SDK unless we're targeting an older OS version. -SDKROOT = $(SDKROOT_TARGETING_SAME_OS_X_VERSION_$(TARGETING_SAME_OS_X_VERSION)); -SDKROOT_TARGETING_SAME_OS_X_VERSION_ = macosx; diff --git a/Tools/MiniBrowser/Configurations/DebugRelease.xcconfig b/Tools/MiniBrowser/Configurations/DebugRelease.xcconfig deleted file mode 100644 index 084cdf91e..000000000 --- a/Tools/MiniBrowser/Configurations/DebugRelease.xcconfig +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2010 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "Base.xcconfig" - -ARCHS = $(ARCHS_STANDARD_32_64_BIT); - -ONLY_ACTIVE_ARCH = YES; - -MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(TARGET_MAC_OS_X_VERSION_MAJOR)) -MACOSX_DEPLOYMENT_TARGET_1070 = 10.7; -MACOSX_DEPLOYMENT_TARGET_1080 = 10.8; -MACOSX_DEPLOYMENT_TARGET_1090 = 10.9; diff --git a/Tools/MiniBrowser/Configurations/MiniBrowser.xcconfig b/Tools/MiniBrowser/Configurations/MiniBrowser.xcconfig deleted file mode 100644 index cf5ad849a..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowser.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2010 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRODUCT_NAME = MiniBrowser -GCC_PREFIX_HEADER = mac/MiniBrowser_Prefix.pch -INFOPLIST_FILE = mac/Info.plist diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserCFLite.vsprops deleted file mode 100644 index 0882216a5..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserCFLite.vsprops +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserCFLite"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib WebKit$(WebKitDLLConfigSuffix).lib CFLite$(LibraryConfigSuffix).lib"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops deleted file mode 100644 index 51275c7a9..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\Include";"$(WebKitLibrariesDir)\Include""
- UsePrecompiledHeader="2"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserCoreFoundation.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserCoreFoundation.vsprops deleted file mode 100644 index deaa89bc9..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserCoreFoundation.vsprops +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserCoreFoundation"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops deleted file mode 100644 index 33f4e05dd..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\MiniBrowserCoreFoundation.vsprops;.\MiniBrowserCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops deleted file mode 100644 index 981e59aa8..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\MiniBrowserCoreFoundation.vsprops;.\MiniBrowserCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops deleted file mode 100644 index 485031283..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\MiniBrowserCFLite.vsprops;.\MiniBrowserCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops deleted file mode 100644 index 742780daf..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncherCommon"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib"
- OutputFile="$(OutDir)\MiniBrowser$(WebKitConfigSuffix).exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName)Launcher.pdb"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops deleted file mode 100644 index 1f30791da..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncherDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\MiniBrowserLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops deleted file mode 100644 index ff91b6f2b..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncherDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\MiniBrowserLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops deleted file mode 100644 index fb4922093..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\MiniBrowserLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops deleted file mode 100644 index 6a725b5cc..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncherProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\MiniBrowserLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops deleted file mode 100644 index 023632587..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncherRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\MiniBrowserLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops deleted file mode 100644 index b5919fe1b..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncherReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\MiniBrowserLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops deleted file mode 100644 index 165a3aab1..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\MiniBrowserCoreFoundation.vsprops;.\MiniBrowserCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops deleted file mode 100644 index 8bc9a13ca..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\MiniBrowserCoreFoundation.vsprops;.\MiniBrowserCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops deleted file mode 100644 index 8253f930d..000000000 --- a/Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\MiniBrowserCFLite.vsprops;.\MiniBrowserCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/WebBundle.xcconfig b/Tools/MiniBrowser/Configurations/WebBundle.xcconfig deleted file mode 100644 index 253fdf769..000000000 --- a/Tools/MiniBrowser/Configurations/WebBundle.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2010 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRODUCT_NAME = WebBundle -GCC_PREFIX_HEADER = mac/MiniBrowser_Prefix.pch -INFOPLIST_FILE = mac/WebBundle/Info.plist diff --git a/Tools/MiniBrowser/Makefile b/Tools/MiniBrowser/Makefile deleted file mode 100644 index 61cd4756b..000000000 --- a/Tools/MiniBrowser/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Build MiniBrowser only on SnowLeopard and later. - -OSX_VERSION ?= $(shell sw_vers -productVersion | cut -d. -f 2) -BUILD_MINIBROWSER = $(shell (( $(OSX_VERSION) >= 6 )) && echo "YES" ) - -ifeq "$(BUILD_MINIBROWSER)" "YES" - -SCRIPTS_PATH = ../Scripts -include ../../Makefile.shared - -else - -all: ; - -debug d development dev develop: ; - -release r deployment dep deploy: ; - -clean: ; - -endif diff --git a/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj b/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj deleted file mode 100644 index 225644535..000000000 --- a/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj +++ /dev/null @@ -1,399 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 0F7EB6E3134113C300F4D865 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F7EB6E2134113C300F4D865 /* WebKit.framework */; }; - 0F7EB879134113F200F4D865 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F7EB6E2134113C300F4D865 /* WebKit.framework */; }; - 0FE643A1161FA8940059E3FF /* BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FE643A0161FA8940059E3FF /* BrowserWindowController.m */; }; - 0FE643A4161FAC660059E3FF /* WK1BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FE643A3161FAC660059E3FF /* WK1BrowserWindowController.m */; }; - 256AC3DA0F4B6AC300CF3369 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* AppDelegate.m */; }; - 51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E244F911EFCE07008228D1 /* MBToolbarItem.m */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - BC20545E11C96C92008F3375 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; - BC329487116A92E2008635D0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BC329486116A92E2008635D0 /* main.m */; }; - BC329498116A941B008635D0 /* WK2BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC329497116A941B008635D0 /* WK2BrowserWindowController.m */; }; - BC72B89511E57E07001EB4EA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58150DA1D0A300B32029 /* MainMenu.xib */; }; - BC72B89611E57E0F001EB4EA /* BrowserWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3294A2116A9852008635D0 /* BrowserWindow.xib */; }; - BC8FB5A8116AA1FE0080D413 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8FB5A7116AA1FE0080D413 /* WebKit2.framework */; }; - BCBD384011B08A6800E01E54 /* WebBundleMain.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBD383D11B08A3100E01E54 /* WebBundleMain.m */; }; - BCBD384411B08AAD00E01E54 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8FB5A7116AA1FE0080D413 /* WebKit2.framework */; }; - BCBD38D011B08C0200E01E54 /* WebBundle.bundle in Copy WebBundle */ = {isa = PBXBuildFile; fileRef = BCBD381D11B0898200E01E54 /* WebBundle.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - BCBD38C511B08BA400E01E54 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BCBD381C11B0898200E01E54; - remoteInfo = WebBundle; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - BCBD38CF11B08C0100E01E54 /* Copy WebBundle */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = Contents; - dstSubfolderSpec = 1; - files = ( - BCBD38D011B08C0200E01E54 /* WebBundle.bundle in Copy WebBundle */, - ); - name = "Copy WebBundle"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0F7EB6E2134113C300F4D865 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0FE6439F161FA8940059E3FF /* BrowserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BrowserWindowController.h; path = mac/BrowserWindowController.h; sourceTree = "<group>"; }; - 0FE643A0161FA8940059E3FF /* BrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BrowserWindowController.m; path = mac/BrowserWindowController.m; sourceTree = "<group>"; }; - 0FE643A2161FAC660059E3FF /* WK1BrowserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WK1BrowserWindowController.h; path = mac/WK1BrowserWindowController.h; sourceTree = "<group>"; }; - 0FE643A3161FAC660059E3FF /* WK1BrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WK1BrowserWindowController.m; path = mac/WK1BrowserWindowController.m; sourceTree = "<group>"; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; - 1DDD58150DA1D0A300B32029 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainMenu.xib; path = mac/MainMenu.xib; sourceTree = "<group>"; }; - 256AC3D80F4B6AC300CF3369 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = mac/AppDelegate.h; sourceTree = "<group>"; }; - 256AC3D90F4B6AC300CF3369 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = mac/AppDelegate.m; sourceTree = "<group>"; }; - 256AC3F00F4B6AF500CF3369 /* MiniBrowser_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MiniBrowser_Prefix.pch; path = mac/MiniBrowser_Prefix.pch; sourceTree = "<group>"; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; - 51E244F811EFCE07008228D1 /* MBToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBToolbarItem.h; sourceTree = "<group>"; }; - 51E244F911EFCE07008228D1 /* MBToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBToolbarItem.m; sourceTree = "<group>"; }; - 8D1107320486CEB800E47090 /* MiniBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MiniBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; }; - BC329486116A92E2008635D0 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = mac/main.m; sourceTree = "<group>"; }; - BC329496116A941B008635D0 /* WK2BrowserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WK2BrowserWindowController.h; path = mac/WK2BrowserWindowController.h; sourceTree = "<group>"; }; - BC329497116A941B008635D0 /* WK2BrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WK2BrowserWindowController.m; path = mac/WK2BrowserWindowController.m; sourceTree = "<group>"; }; - BC3294A2116A9852008635D0 /* BrowserWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = BrowserWindow.xib; path = mac/BrowserWindow.xib; sourceTree = "<group>"; }; - BC72B89711E57E6E001EB4EA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - BC72B89A11E57E8A001EB4EA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = mac/Info.plist; sourceTree = "<group>"; }; - BC8FB5A7116AA1FE0080D413 /* WebKit2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BCA8CBDD11E578A000812FB7 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; }; - BCA8CBDE11E578A000812FB7 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; }; - BCA8CBDF11E578A000812FB7 /* MiniBrowser.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = MiniBrowser.xcconfig; sourceTree = "<group>"; }; - BCA8CBE011E578A000812FB7 /* WebBundle.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebBundle.xcconfig; sourceTree = "<group>"; }; - BCBD381D11B0898200E01E54 /* WebBundle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebBundle.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - BCBD383D11B08A3100E01E54 /* WebBundleMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebBundleMain.m; sourceTree = "<group>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 0F7EB6E3134113C300F4D865 /* WebKit.framework in Frameworks */, - BC8FB5A8116AA1FE0080D413 /* WebKit2.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCBD381B11B0898200E01E54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BC20545E11C96C92008F3375 /* Cocoa.framework in Frameworks */, - 0F7EB879134113F200F4D865 /* WebKit.framework in Frameworks */, - BCBD384411B08AAD00E01E54 /* WebKit2.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* MiniBrowser */ = { - isa = PBXGroup; - children = ( - 256AC3D80F4B6AC300CF3369 /* AppDelegate.h */, - 256AC3D90F4B6AC300CF3369 /* AppDelegate.m */, - 0FE6439F161FA8940059E3FF /* BrowserWindowController.h */, - 0FE643A0161FA8940059E3FF /* BrowserWindowController.m */, - BC72B89A11E57E8A001EB4EA /* Info.plist */, - BC329486116A92E2008635D0 /* main.m */, - 51E244F811EFCE07008228D1 /* MBToolbarItem.h */, - 51E244F911EFCE07008228D1 /* MBToolbarItem.m */, - 0FE643A2161FAC660059E3FF /* WK1BrowserWindowController.h */, - 0FE643A3161FAC660059E3FF /* WK1BrowserWindowController.m */, - BC329496116A941B008635D0 /* WK2BrowserWindowController.h */, - BC329497116A941B008635D0 /* WK2BrowserWindowController.m */, - ); - name = MiniBrowser; - sourceTree = "<group>"; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - 0F7EB6E2134113C300F4D865 /* WebKit.framework */, - BC8FB5A7116AA1FE0080D413 /* WebKit2.framework */, - ); - name = "Linked Frameworks"; - sourceTree = "<group>"; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = "<group>"; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* MiniBrowser.app */, - BCBD381D11B0898200E01E54 /* WebBundle.bundle */, - ); - name = Products; - sourceTree = "<group>"; - }; - 29B97314FDCFA39411CA2CEA /* MiniBrowser */ = { - isa = PBXGroup; - children = ( - 256AC3F00F4B6AF500CF3369 /* MiniBrowser_Prefix.pch */, - 080E96DDFE201D6D7F000001 /* MiniBrowser */, - BCBD382B11B089F700E01E54 /* WebBundle */, - 29B97317FDCFA39411CA2CEA /* Resources */, - BCA8CBDA11E5787800812FB7 /* Configurations */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = MiniBrowser; - sourceTree = "<group>"; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - BC3294A2116A9852008635D0 /* BrowserWindow.xib */, - 1DDD58150DA1D0A300B32029 /* MainMenu.xib */, - ); - name = Resources; - sourceTree = "<group>"; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; - BCA8CBDA11E5787800812FB7 /* Configurations */ = { - isa = PBXGroup; - children = ( - BCA8CBDD11E578A000812FB7 /* Base.xcconfig */, - BCA8CBDE11E578A000812FB7 /* DebugRelease.xcconfig */, - BCA8CBDF11E578A000812FB7 /* MiniBrowser.xcconfig */, - BCA8CBE011E578A000812FB7 /* WebBundle.xcconfig */, - ); - path = Configurations; - sourceTree = "<group>"; - }; - BCBD382B11B089F700E01E54 /* WebBundle */ = { - isa = PBXGroup; - children = ( - BC72B89711E57E6E001EB4EA /* Info.plist */, - BCBD383D11B08A3100E01E54 /* WebBundleMain.m */, - ); - name = WebBundle; - path = mac/WebBundle; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* MiniBrowser */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MiniBrowser" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - BCBD38CF11B08C0100E01E54 /* Copy WebBundle */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - BCBD38C611B08BA400E01E54 /* PBXTargetDependency */, - ); - name = MiniBrowser; - productInstallPath = "$(HOME)/Applications"; - productName = MiniBrowser; - productReference = 8D1107320486CEB800E47090 /* MiniBrowser.app */; - productType = "com.apple.product-type.application"; - }; - BCBD381C11B0898200E01E54 /* WebBundle */ = { - isa = PBXNativeTarget; - buildConfigurationList = BCBD382111B0898300E01E54 /* Build configuration list for PBXNativeTarget "WebBundle" */; - buildPhases = ( - BCBD381911B0898200E01E54 /* Resources */, - BCBD381A11B0898200E01E54 /* Sources */, - BCBD381B11B0898200E01E54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = WebBundle; - productName = WebBundle; - productReference = BCBD381D11B0898200E01E54 /* WebBundle.bundle */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MiniBrowser" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* MiniBrowser */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* MiniBrowser */, - BCBD381C11B0898200E01E54 /* WebBundle */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BC72B89611E57E0F001EB4EA /* BrowserWindow.xib in Resources */, - BC72B89511E57E07001EB4EA /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCBD381911B0898200E01E54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 256AC3DA0F4B6AC300CF3369 /* AppDelegate.m in Sources */, - 0FE643A1161FA8940059E3FF /* BrowserWindowController.m in Sources */, - BC329487116A92E2008635D0 /* main.m in Sources */, - 51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */, - 0FE643A4161FAC660059E3FF /* WK1BrowserWindowController.m in Sources */, - BC329498116A941B008635D0 /* WK2BrowserWindowController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCBD381A11B0898200E01E54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BCBD384011B08A6800E01E54 /* WebBundleMain.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - BCBD38C611B08BA400E01E54 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BCBD381C11B0898200E01E54 /* WebBundle */; - targetProxy = BCBD38C511B08BA400E01E54 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - BCBD381F11B0898300E01E54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BCA8CBE011E578A000812FB7 /* WebBundle.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - BCBD382011B0898300E01E54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BCA8CBE011E578A000812FB7 /* WebBundle.xcconfig */; - buildSettings = { - }; - name = Release; - }; - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BCA8CBDF11E578A000812FB7 /* MiniBrowser.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BCA8CBDF11E578A000812FB7 /* MiniBrowser.xcconfig */; - buildSettings = { - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BCA8CBDE11E578A000812FB7 /* DebugRelease.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BCA8CBDE11E578A000812FB7 /* DebugRelease.xcconfig */; - buildSettings = { - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BCBD382111B0898300E01E54 /* Build configuration list for PBXNativeTarget "WebBundle" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BCBD381F11B0898300E01E54 /* Debug */, - BCBD382011B0898300E01E54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MiniBrowser" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MiniBrowser" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/Tools/MiniBrowser/MBToolbarItem.m b/Tools/MiniBrowser/MiniBrowserWebProcessPlugIn.h index 56f777891..ff16bf5dc 100644 --- a/Tools/MiniBrowser/MBToolbarItem.m +++ b/Tools/MiniBrowser/MiniBrowserWebProcessPlugIn.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,13 +23,12 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#import "MBToolbarItem.h" +#import <WebKit/WKWebProcessPlugIn.h> -@implementation MBToolbarItem +#if WK_API_ENABLED -- (void)validate -{ - [self setEnabled:[[self target] validateUserInterfaceItem:self]]; -} +@interface MiniBrowserWebProcessPlugIn : NSObject <WKWebProcessPlugIn> @end + +#endif // WK_API_ENABLED diff --git a/Tools/MiniBrowser/efl/CMakeLists.txt b/Tools/MiniBrowser/efl/CMakeLists.txt deleted file mode 100644 index 13180762a..000000000 --- a/Tools/MiniBrowser/efl/CMakeLists.txt +++ /dev/null @@ -1,63 +0,0 @@ -set(MiniBrowser_DIR "${TOOLS_DIR}/MiniBrowser/efl") - -# Elementary is needed to build MiniBrowser -find_package(Elementary 1.6) - -set(MiniBrowser_SOURCES - ${TOOLS_DIR}/EWebLauncher/url_utils.c - ${MiniBrowser_DIR}/main.c -) - -set(MiniBrowser_INCLUDE_DIRECTORIES - ${CAIRO_INCLUDE_DIRS} - ${ECORE_INCLUDE_DIRS} - ${ECORE_EVAS_INCLUDE_DIRS} - ${ECORE_CON_INCLUDE_DIRS} - ${ECORE_FILE_INCLUDE_DIRS} - ${ECORE_IMF_INCLUDE_DIRS} - ${ECORE_INPUT_INCLUDE_DIRS} - ${EDJE_INCLUDE_DIRS} - ${EET_INCLUDE_DIRS} - ${EO_INCLUDE_DIRS} - ${DBUS_INCLUDE_DIRS} - ${E_DBUS_INCLUDE_DIRS} - ${EFREET_INCLUDE_DIRS} - ${EINA_INCLUDE_DIRS} - ${ELEMENTARY_INCLUDE_DIRS} - ${EVAS_INCLUDE_DIRS} - ${TOOLS_DIR}/EWebLauncher - ${WEBKIT2_DIR}/UIProcess/API/efl - ${WEBKIT2_DIR} - ${CMAKE_SOURCE_DIR}/Source -) - -set(MiniBrowser_LIBRARIES - JavaScriptCore - WebCore - WebKit2 - ${CAIRO_LIBRARIES} - ${ECORE_LIBRARIES} - ${ECORE_EVAS_LIBRARIES} - ${ECORE_FILE_LIBRARIES} - ${EDJE_LIBRARIES} - ${EET_LIBRARIES} - ${EINA_LIBRARIES} - ${ELEMENTARY_LIBRARIES} - ${EO_LIBRARIES} - ${EVAS_LIBRARIES} - ${FONTCONFIG_LIBRARIES} - ${GLIB_LIBRARIES} - ${GLIB_GTHREAD_LIBRARIES} - ${LIBSOUP_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${LIBXSLT_LIBRARIES} -lm - ${OPENGL_LIBRARIES} - ${SQLITE_LIBRARIES} -) - -if (ELEMENTARY_FOUND) - include_directories(${MiniBrowser_INCLUDE_DIRECTORIES}) - add_executable(MiniBrowser ${MiniBrowser_SOURCES}) - target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES}) - set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools") -endif () diff --git a/Tools/MiniBrowser/efl/main.c b/Tools/MiniBrowser/efl/main.c deleted file mode 100644 index 03f9cf8d9..000000000 --- a/Tools/MiniBrowser/efl/main.c +++ /dev/null @@ -1,1998 +0,0 @@ -/* - * Copyright (C) 2012 Samsung Electronics - * Copyright (C) 2012 Intel Corporation. All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "EWebKit2.h" -#include "url_utils.h" -#include <Ecore.h> -#include <Ecore_Evas.h> -#include <Ecore_Getopt.h> -#include <Eet.h> -#include <Eina.h> -#include <Elementary.h> -#include <Evas.h> - -static const char DEFAULT_URL[] = "http://www.google.com/"; -static const char APP_NAME[] = "EFL MiniBrowser"; -static const int TOOL_BAR_ICON_SIZE = 24; -static const int TOOL_BAR_BUTTON_SIZE = 32; -static const int SEARCH_FIELD_SIZE = 200; -static const int SEARCH_BUTTON_SIZE = 25; -static const int MAX_SEARCH_COUNT = 100; -static const int DEFAULT_SEARCH_FLAGS = EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE | EWK_FIND_OPTIONS_WRAP_AROUND; -static const double TOOLTIP_DELAY_SECONDS = 1.0; - -#define info(format, args...) \ - do { \ - if (verbose) \ - printf(format"\n", ##args); \ - } while (0) - -static int verbose = 1; -static Eina_List *windows = NULL; -static char *evas_engine_name = NULL; -static char *user_agent_string = NULL; -static Eina_Bool encoding_detector_enabled = EINA_FALSE; -static Eina_Bool frame_flattening_enabled = EINA_FALSE; -static Eina_Bool local_storage_enabled = EINA_TRUE; -static Eina_Bool fullscreen_enabled = EINA_FALSE; -static Eina_Bool spell_checking_enabled = EINA_FALSE; -static int window_width = 800; -static int window_height = 600; -/* Default value of device_pixel_ratio is '0' so that we don't set custom device - * scale factor unless it's required by the User. */ -static double device_pixel_ratio = 0; -static Eina_Bool legacy_behavior_enabled = EINA_FALSE; - -#define DEFAULT_ZOOM_LEVEL 5 // Set default zoom level to 1.0 (index 5 on zoomLevels). -// The zoom values are chosen to be like in Mozilla Firefox 3. -const static float zoomLevels[] = {0.3, 0.5, 0.67, 0.8, 0.9, 1.0, 1.1, 1.2, 1.33, 1.5, 1.7, 2.0, 2.4, 3.0}; - -static Eina_Bool -zoom_level_set(Evas_Object *webview, int level) -{ - if (level < 0 || level >= sizeof(zoomLevels) / sizeof(float)) - return EINA_FALSE; - - Evas_Coord ox, oy, mx, my, cx, cy; - evas_pointer_canvas_xy_get(evas_object_evas_get(webview), &mx, &my); // Get current mouse position on window. - evas_object_geometry_get(webview, &ox, &oy, NULL, NULL); // Get webview's position on window. - cx = mx - ox; // current x position = mouse x position - webview x position - cy = my - oy; // current y position = mouse y position - webview y position - - Eina_Bool result = ewk_view_scale_set(webview, zoomLevels[level], cx, cy); - return result; -} - -static Ewk_View_Smart_Class *miniBrowserViewSmartClass() -{ - static Ewk_View_Smart_Class ewkViewClass = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("MiniBrowser_View"); - return &ewkViewClass; -} - -typedef struct _Tooltip_Information { - Ecore_Timer *show_timer; - Eina_Bool activated; - Eina_Bool text_set; - Eina_Bool shown; -} Tooltip_Information; - -typedef struct _Color_Selector { - Ewk_Color_Picker *ewk_picker; - Evas_Object *elm_selector; - Evas_Object *elm_selector_window; -} Color_Selector; - -typedef struct _Browser_Window { - Evas_Object *elm_window; - Evas_Object *ewk_view; - Evas_Object *url_bar; - Evas_Object *back_button; - Evas_Object *forward_button; - struct { - Evas_Object *elm_menu; - Ewk_Popup_Menu *ewk_menu; - } popup; - struct { - Evas_Object *search_bar; - Evas_Object *search_field; - Evas_Object *backward_button; - Evas_Object *forward_button; - } search; - int current_zoom_level; - Tooltip_Information tooltip; - Color_Selector color_selector; - struct { - Evas_Object *elm_menu; - Ewk_Context_Menu *ewk_menu; - } context_menu; -} Browser_Window; - -typedef struct _File_Selector_Data { - Browser_Window* parent; - Evas_Object *elm_window; - Ewk_File_Chooser_Request *request; -} File_Selector_Data; - -typedef struct _Auth_Data { - Evas_Object *popup; - Ewk_Auth_Request *request; - Evas_Object *username_entry; - Evas_Object *password_entry; -} Auth_Data; - -static const Ecore_Getopt options = { - "MiniBrowser", - "%prog [options] [url]", - "0.0.1", - "(C)2012 Samsung Electronics\n (C)2012 Intel Corporation\n", - "", - "Test Web Browser using the Enlightenment Foundation Libraries (EFL) port of WebKit2", - EINA_TRUE, { - ECORE_GETOPT_STORE_STR - ('e', "engine", "ecore-evas engine to use."), - ECORE_GETOPT_STORE_STR - ('s', "window-size", "window size in following format (width)x(height)."), - ECORE_GETOPT_STORE_STR - ('u', "user-agent", "user agent to set."), - ECORE_GETOPT_STORE_DEF_BOOL - ('b', "legacy", "Legacy mode", EINA_FALSE), - ECORE_GETOPT_STORE_DOUBLE - ('r', "device-pixel-ratio", "Ratio between the CSS units and device pixels."), - ECORE_GETOPT_CALLBACK_NOARGS - ('E', "list-engines", "list ecore-evas engines.", - ecore_getopt_callback_ecore_evas_list_engines, NULL), - ECORE_GETOPT_STORE_DEF_BOOL - ('c', "encoding-detector", "enable/disable encoding detector", EINA_FALSE), - ECORE_GETOPT_STORE_DEF_BOOL - ('f', "flattening", "frame flattening.", EINA_FALSE), - ECORE_GETOPT_STORE_DEF_BOOL - ('l', "local-storage", "HTML5 local storage support (enabled by default).", EINA_TRUE), - ECORE_GETOPT_STORE_DEF_BOOL - ('F', "full-screen", "start in full-screen.", EINA_FALSE), - ECORE_GETOPT_STORE_DEF_BOOL - ('t', "text-checking", "text spell checking enabled", EINA_TRUE), - ECORE_GETOPT_STORE_DEF_STR - ('p', "policy-cookies", "Cookies policy:\n always - always accept,\n never - never accept,\n no-third-party - don't accept third-party cookies.", "no-third-party"), - ECORE_GETOPT_VERSION - ('V', "version"), - ECORE_GETOPT_COPYRIGHT - ('R', "copyright"), - ECORE_GETOPT_HELP - ('h', "help"), - ECORE_GETOPT_SENTINEL - } -}; - -static Eina_Stringshare *show_file_entry_dialog(Browser_Window *window, const char *label_tag, const char *default_text); -static Browser_Window *window_create(Evas_Object* opener, const char *url, int width, int height, Eina_Bool view_mode); - -static Browser_Window *window_find_with_elm_window(Evas_Object *elm_window) -{ - Eina_List *l; - void *data; - - if (!elm_window) - return NULL; - - EINA_LIST_FOREACH(windows, l, data) { - Browser_Window *window = (Browser_Window *)data; - if (window->elm_window == elm_window) - return window; - } - return NULL; -} - -static Browser_Window *window_find_with_ewk_view(Evas_Object *ewk_view) -{ - Eina_List *l; - void *data; - - if (!ewk_view) - return NULL; - - EINA_LIST_FOREACH(windows, l, data) { - Browser_Window *window = (Browser_Window *)data; - if (window->ewk_view == ewk_view) - return window; - } - return NULL; -} - -static Eina_Bool -on_tooltip_show(void *user_data) -{ - Browser_Window *window = (Browser_Window *)user_data; - - window->tooltip.show_timer = NULL; - elm_object_tooltip_show(window->elm_window); - window->tooltip.shown = EINA_TRUE; - return ECORE_CALLBACK_CANCEL; -} - -static void -window_tooltip_hide(Browser_Window *window) -{ - if (window->tooltip.show_timer) { - ecore_timer_del(window->tooltip.show_timer); - window->tooltip.show_timer = NULL; - } - - if (window->tooltip.shown) { - elm_object_tooltip_hide(window->elm_window); - window->tooltip.shown = EINA_FALSE; - } -} - -static void -window_tooltip_update(Browser_Window *window) -{ - window_tooltip_hide(window); - - if (window->tooltip.activated && window->tooltip.text_set) - window->tooltip.show_timer = ecore_timer_add(TOOLTIP_DELAY_SECONDS, on_tooltip_show, window); -} - -static void -on_mouse_in(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - window->tooltip.activated = EINA_TRUE; - window_tooltip_update(window); -} - -static void -on_mouse_move(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) -{ - window_tooltip_update((Browser_Window *)user_data); -} - -static void -on_mouse_out(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - window->tooltip.activated = EINA_FALSE; - window_tooltip_update(window); -} - -static void -on_window_resize(void *user_data, Evas *e, Evas_Object *elm_window, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - if (!window) { - info("ERROR: window is NULL."); - return; - } - - if (window->context_menu.ewk_menu) - ewk_context_menu_hide(window->context_menu.ewk_menu); - if (window->popup.ewk_menu) - ewk_popup_menu_close(window->popup.ewk_menu); - if (window->popup.elm_menu) - elm_menu_close(window->popup.elm_menu); -} - -static void window_free(Browser_Window *window) -{ - evas_object_event_callback_del(window->ewk_view, EVAS_CALLBACK_MOUSE_IN, on_mouse_in); - evas_object_event_callback_del(window->ewk_view, EVAS_CALLBACK_MOUSE_OUT, on_mouse_out); - evas_object_event_callback_del(window->ewk_view, EVAS_CALLBACK_MOUSE_MOVE, on_mouse_move); - - evas_object_event_callback_del(window->elm_window, EVAS_CALLBACK_RESIZE, on_window_resize); - - evas_object_del(window->ewk_view); - /* The elm_win will take care of freeing its children */ - evas_object_del(window->elm_window); - - if (window->tooltip.show_timer) - ecore_timer_del(window->tooltip.show_timer); - - if (window->color_selector.elm_selector_window) - evas_object_del(window->color_selector.elm_selector_window); - - free(window); -} - -static void window_close(Browser_Window *window) -{ - windows = eina_list_remove(windows, window); - window_free(window); - - if (!windows) - elm_exit(); -} - -static void -search_box_show(Browser_Window *window) -{ - evas_object_size_hint_min_set(window->search.search_bar, SEARCH_FIELD_SIZE + 2 * SEARCH_BUTTON_SIZE, SEARCH_BUTTON_SIZE); - - evas_object_show(window->search.search_bar); - evas_object_show(window->search.search_field); - evas_object_show(window->search.backward_button); - evas_object_show(window->search.forward_button); - - /* Grab focus from the view */ - evas_object_focus_set(window->ewk_view, EINA_FALSE); - elm_object_focus_set(window->search.search_field, EINA_TRUE); -} - -static void -search_box_hide(Browser_Window *window) -{ - ewk_view_text_find_highlight_clear(window->ewk_view); - - evas_object_size_hint_min_set(window->search.search_bar, SEARCH_FIELD_SIZE + 2 * SEARCH_BUTTON_SIZE, 0); - evas_object_hide(window->search.search_bar); - evas_object_hide(window->search.search_field); - evas_object_hide(window->search.backward_button); - evas_object_hide(window->search.forward_button); - - /* Give focus back to the view */ - elm_object_focus_set(window->search.search_field, EINA_FALSE); - evas_object_focus_set(window->ewk_view, EINA_TRUE); -} - -static void save_page_contents_callback(Ewk_Page_Contents_Type type, const char *data, void *user_data) -{ - Eet_File *ef; - Eina_Stringshare *fileName = (Eina_Stringshare *)user_data; - - if (!eina_str_has_extension(fileName, ".mht")) { - Eina_Strbuf *fileNameWithMht = eina_strbuf_new(); - eina_strbuf_append_printf(fileNameWithMht, "%s.mht", fileName); - ef = eet_open(eina_strbuf_string_get(fileNameWithMht), EET_FILE_MODE_WRITE); - info("Saving file to: %s", eina_strbuf_string_get(fileNameWithMht)); - eina_strbuf_free(fileNameWithMht); - } else { - ef = eet_open(fileName, EET_FILE_MODE_WRITE); - info("Saving file to: %s", fileName); - } - - if (!ef) { - info("ERROR: Could not create File"); - return; - } - - eet_write(ef, "MHTML data", data, strlen(data), 0 /* compress */); - eet_close(ef); - info("SUCCESS: saved."); - - eina_stringshare_del(fileName); -} - -static void -on_key_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info; - - static const char *encodings[] = { - "ISO-8859-1", - "UTF-8", - NULL - }; - static int currentEncoding = -1; - const Evas_Modifier *mod = evas_key_modifier_get(e); - Eina_Bool ctrlPressed = evas_key_modifier_is_set(mod, "Control"); - Eina_Bool altPressed = evas_key_modifier_is_set(mod, "Alt"); - - if (!strcmp(ev->key, "Left") && altPressed) { - info("Back (Alt+Left) was pressed"); - if (!ewk_view_back(ewk_view)) - info("Back ignored: No back history"); - } else if (!strcmp(ev->key, "Right") && altPressed) { - info("Forward (Alt+Right) was pressed"); - if (!ewk_view_forward(ewk_view)) - info("Forward ignored: No forward history"); - } else if (!strcmp(ev->key, "F3")) { - currentEncoding = (currentEncoding + 1) % (sizeof(encodings) / sizeof(encodings[0])); - info("Set encoding (F3) pressed. New encoding to %s", encodings[currentEncoding]); - ewk_view_custom_encoding_set(ewk_view, encodings[currentEncoding]); - } else if (!strcmp(ev->key, "F5")) { - info("Reload (F5) was pressed, reloading."); - ewk_view_reload(ewk_view); - } else if (!strcmp(ev->key, "F6")) { - info("Stop (F6) was pressed, stop loading."); - ewk_view_stop(ewk_view); - } else if (!strcmp(ev->key, "F7")) { - Ewk_Pagination_Mode mode = ewk_view_pagination_mode_get(ewk_view); - mode = (++mode) % (EWK_PAGINATION_MODE_BOTTOM_TO_TOP + 1); - if (ewk_view_pagination_mode_set(ewk_view, mode)) - info("Change Pagination Mode (F7) was pressed, changed to: %d", mode); - else - info("Change Pagination Mode (F7) was pressed, but NOT changed!"); - } else if (!strcmp(ev->key, "F8")) { - info("Create souce code window (F8) was pressed."); - Browser_Window *window = window_create(ewk_view, ewk_view_url_get(ewk_view), 0, 0, EINA_TRUE); - windows = eina_list_append(windows, window); - } else if (!strcmp(ev->key, "F11")) { - info("Fullscreen (F11) was pressed, toggling window/fullscreen."); - elm_win_fullscreen_set(window->elm_window, !elm_win_fullscreen_get(window->elm_window)); - } else if (!strcmp(ev->key, "n") && ctrlPressed) { - info("Create new window (Ctrl+n) was pressed."); - Browser_Window *window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE); - // 0 equals default width and height. - windows = eina_list_append(windows, window); - } else if (!strcmp(ev->key, "i") && ctrlPressed) { - info("Show Inspector (Ctrl+i) was pressed."); - ewk_view_inspector_show(ewk_view); - } else if (!strcmp(ev->key, "f") && ctrlPressed) { - info("Show Search Box (Ctrl+f) was pressed."); - search_box_show(window); - } else if (!strcmp(ev->key, "Escape")) { - if (evas_object_visible_get(window->search.search_bar)) - search_box_hide(window); - else if (elm_win_fullscreen_get(window->elm_window)) - ewk_view_fullscreen_exit(ewk_view); - } else if (ctrlPressed && (!strcmp(ev->key, "minus") || !strcmp(ev->key, "KP_Subtract"))) { - if (zoom_level_set(ewk_view, window->current_zoom_level - 1)) - window->current_zoom_level--; - info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]); - } else if (ctrlPressed && (!strcmp(ev->key, "equal") || !strcmp(ev->key, "KP_Add"))) { - if (zoom_level_set(ewk_view, window->current_zoom_level + 1)) - window->current_zoom_level++; - info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]); - } else if (ctrlPressed && !strcmp(ev->key, "0")) { - if (zoom_level_set(ewk_view, DEFAULT_ZOOM_LEVEL)) - window->current_zoom_level = DEFAULT_ZOOM_LEVEL; - info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]); - } else if (ctrlPressed && !strcmp(ev->key, "s")) { - Eina_Strbuf *default_file = eina_strbuf_new(); - const char *home_path = getenv("HOME"); - const char *title = ewk_view_title_get(window->ewk_view); - eina_strbuf_append_printf(default_file, "%s/%s.mht", home_path ? home_path : "/home", title ? title : "title"); - info("Pressed (CTRL + S) : Saving Current Page."); - Eina_Stringshare *save_file_name = show_file_entry_dialog(window, "SAVE", eina_strbuf_string_get(default_file)); - if (!save_file_name) - return; - ewk_view_page_contents_get(ewk_view, EWK_PAGE_CONTENTS_TYPE_MHTML, save_page_contents_callback, (void *)save_file_name); - eina_strbuf_free(default_file); - } else if (ctrlPressed && !strcmp(ev->key, "l")) { - const char *home_path = getenv("HOME"); - Eina_Stringshare *open_file_name = show_file_entry_dialog(window, "LOAD", home_path ? home_path : "/home"); - if (!open_file_name) - return; - Eina_Strbuf *uri_path = eina_strbuf_new(); - eina_strbuf_append_printf(uri_path, "file://%s", open_file_name); - info("pressed (CTRL + L) : Loading Page %s", eina_strbuf_string_get(uri_path)); - ewk_view_url_set(ewk_view, eina_strbuf_string_get(uri_path)); - eina_strbuf_free(uri_path); - eina_stringshare_del(open_file_name); - } -} - -static void -view_focus_set(Browser_Window *window, Eina_Bool focus) -{ - /* We steal focus away from elm's focus model and start to do things - * manually here, so elm now has no clue what's up. Tell elm that its - * toplevel widget is to be unfocused so elm gives up the focus */ - elm_object_focus_set(elm_object_top_widget_get(window->elm_window), EINA_FALSE); - evas_object_focus_set(window->ewk_view, focus); -} - -static void -on_mouse_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info; - - /* Clear selection from the URL bar */ - elm_entry_select_none(window->url_bar); - - if (ev->button == 1) - view_focus_set(window, EINA_TRUE); - else if (ev->button == 2) - view_focus_set(window, !evas_object_focus_get(ewk_view)); -} - -static void -title_set(Evas_Object *elm_window, const char *title, int progress) -{ - Eina_Strbuf *buffer; - - if (!title || !*title) { - elm_win_title_set(elm_window, APP_NAME); - return; - } - - buffer = eina_strbuf_new(); - if (progress < 100) - eina_strbuf_append_printf(buffer, "%s (%d%%) - %s", title, progress, APP_NAME); - else - eina_strbuf_append_printf(buffer, "%s - %s", title, APP_NAME); - - elm_win_title_set(elm_window, eina_strbuf_string_get(buffer)); - eina_strbuf_free(buffer); -} - -static void -on_title_changed(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - const char *title = (const char *)event_info; - - title_set(window->elm_window, title, 100); -} - -static void -on_url_changed(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - char *url = elm_entry_utf8_to_markup(ewk_view_url_get(window->ewk_view)); - elm_entry_entry_set(window->url_bar, url); - - free(url); - - search_box_hide(window); -} - -static void -on_back_forward_list_changed(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - /* Update navigation buttons state */ - elm_object_disabled_set(window->back_button, !ewk_view_back_possible(ewk_view)); - elm_object_disabled_set(window->forward_button, !ewk_view_forward_possible(ewk_view)); -} - -static void -on_progress(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - double progress = *(double *)event_info; - - title_set(window->elm_window, ewk_view_title_get(window->ewk_view), progress * 100); -} - -static void -on_error(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Eina_Strbuf *buffer; - const Ewk_Error *error = (const Ewk_Error *)event_info; - - /* This is a cancellation, do not display the error page */ - if (ewk_error_cancellation_get(error)) - return; - - buffer = eina_strbuf_new(); - eina_strbuf_append_printf(buffer, "<html><body><div style=\"color:#ff0000\">ERROR!</div><br><div>Code: %d<br>Description: %s<br>URL: %s</div></body</html>", - ewk_error_code_get(error), ewk_error_description_get(error), ewk_error_url_get(error)); - - ewk_view_html_string_load(ewk_view, eina_strbuf_string_get(buffer), 0, ewk_error_url_get(error)); - eina_strbuf_free(buffer); -} - -static void -on_download_request(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Ewk_Download_Job *download = (Ewk_Download_Job *)event_info; - - // FIXME: The destination folder should be selected by the user but we set it to '/tmp' for now. - Eina_Strbuf *destination_path = eina_strbuf_new(); - - const char *suggested_name = ewk_download_job_suggested_filename_get(download); - if (suggested_name && *suggested_name) - eina_strbuf_append_printf(destination_path, "/tmp/%s", suggested_name); - else { - // Generate a unique file name since no name was suggested. - char unique_path[] = "/tmp/downloaded-file.XXXXXX"; - eina_strbuf_append(destination_path, mktemp(unique_path)); - } - - ewk_download_job_destination_set(download, eina_strbuf_string_get(destination_path)); - info("Downloading: %s", eina_strbuf_string_get(destination_path)); - eina_strbuf_free(destination_path); -} - -static void on_filepicker_parent_deletion(void *user_data, Evas *evas, Evas_Object *elm_window, void *event); - -static void close_file_picker(File_Selector_Data *fs_data) -{ - evas_object_event_callback_del(fs_data->parent->elm_window, EVAS_CALLBACK_DEL, on_filepicker_parent_deletion); - evas_object_del(fs_data->elm_window); - ewk_object_unref(fs_data->request); - free(fs_data); -} - -static void -on_filepicker_parent_deletion(void *user_data, Evas *evas, Evas_Object *elm_window, void *event) -{ - close_file_picker((File_Selector_Data *)user_data); -} - -static void -on_filepicker_deletion(void *user_data, Evas_Object *elm_window, void *event_info) -{ - close_file_picker((File_Selector_Data *)user_data); -} - -static void -on_fileselector_done(void *user_data, Evas_Object *file_selector, void *event_info) -{ - File_Selector_Data *fs_data = (File_Selector_Data *)user_data; - - const char *selected = (const char *)event_info; - if (selected && *selected) - ewk_file_chooser_request_file_choose(fs_data->request, selected); - - close_file_picker(fs_data); -} - -static void -on_file_chooser_request(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Evas_Object *bg; - Browser_Window *window = (Browser_Window *)user_data; - Ewk_File_Chooser_Request *request = (Ewk_File_Chooser_Request *)event_info; - - // Show basic file picker which does not currently support multiple files - // or MIME type filtering. - Evas_Object *elm_window = elm_win_add(window->elm_window, "file-picker-window", ELM_WIN_DIALOG_BASIC); - elm_win_title_set(elm_window, "File picker"); - elm_win_modal_set(elm_window, EINA_TRUE); - - bg = elm_bg_add(elm_window); - evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(elm_window, bg); - evas_object_show(bg); - - File_Selector_Data *fs_data = (File_Selector_Data *)malloc(sizeof(File_Selector_Data)); - fs_data->parent = window; - fs_data->elm_window = elm_window; - fs_data->request = ewk_object_ref(request); - evas_object_smart_callback_add(elm_window, "delete,request", on_filepicker_deletion, fs_data); - evas_object_event_callback_add(window->elm_window, EVAS_CALLBACK_DEL, on_filepicker_parent_deletion, fs_data); - - Evas_Object *file_selector = elm_fileselector_add(elm_window); - const char *home_path = getenv("HOME"); - elm_fileselector_path_set(file_selector, home_path ? home_path : "/home"); - evas_object_size_hint_weight_set(file_selector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(elm_window, file_selector); - evas_object_show(file_selector); - - evas_object_smart_callback_add(file_selector, "done", on_fileselector_done, fs_data); - - evas_object_resize(elm_window, 400, 400); - elm_win_center(elm_window, EINA_TRUE, EINA_TRUE); - evas_object_show(elm_window); -} - -static void -on_download_finished(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Ewk_Download_Job *download = (Ewk_Download_Job *)event_info; - info("Download finished: %s", ewk_download_job_destination_get(download)); -} - -static void -on_download_failed(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - info("Download failed!"); -} - -static void -on_color_changed(void *data, Evas_Object *obj, void *event_info) -{ - int r, g, b, a; - - elm_colorselector_color_get(obj, &r, &g, &b, &a); - evas_object_color_set(data, r, g, b, a); -} - -static void -on_color_item_selected(void *data, Evas_Object *obj, void *event_info) -{ - int r, g, b, a; - Elm_Object_Item *color_item = (Elm_Object_Item *)event_info; - - elm_colorselector_palette_item_color_get(color_item, &r, &g, &b, &a); - evas_object_color_set(data, r, g, b, a); -} - -static void -on_color_picker_ok_clicked(void *data, Evas_Object *obj, void *event_info) -{ - int r, g, b, a; - Color_Selector *color_selector = (Color_Selector *)data; - - elm_colorselector_color_get(color_selector->elm_selector, &r, &g, &b, &a); - ewk_color_picker_color_set(color_selector->ewk_picker, r, g, b, a); -} - -static void -on_color_picker_cancel_clicked(void *data, Evas_Object *obj, void *event_info) -{ - int r, g, b, a; - - ewk_color_picker_color_get(data, &r, &g, &b, &a); - ewk_color_picker_color_set(data, r, g, b, a); -} - -static Eina_Bool -on_color_picker_dismiss(Ewk_View_Smart_Data *sd) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - evas_object_del(window->color_selector.elm_selector_window); - window->color_selector.elm_selector_window = NULL; - - return EINA_TRUE; -} - -static Eina_Bool -on_color_picker_request(Ewk_View_Smart_Data *sd, Ewk_Color_Picker *color_picker) -{ - int r, g, b, a; - Evas_Object *background, *rect, *box, *button_box, *rect_frame, *cs_frame, *ok_button, *cancel_button; - - Browser_Window *window = window_find_with_ewk_view(sd->self); - window->color_selector.elm_selector_window = elm_win_add(window->elm_window, "color selector", ELM_WIN_BASIC); - window->color_selector.ewk_picker = color_picker; - - elm_win_title_set(window->color_selector.elm_selector_window, "Color selector"); - - /* Show color view */ - background = elm_bg_add(window->color_selector.elm_selector_window); - evas_object_size_hint_weight_set(background, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(window->color_selector.elm_selector_window, background); - evas_object_show(background); - - box = elm_box_add(window->color_selector.elm_selector_window); - evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(window->color_selector.elm_selector_window, box); - evas_object_show(box); - - rect_frame = elm_frame_add(window->color_selector.elm_selector_window); - evas_object_size_hint_weight_set(rect_frame, EVAS_HINT_EXPAND, 0.3); - evas_object_size_hint_align_set(rect_frame, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_text_set(rect_frame, "Color View"); - elm_box_pack_end(box, rect_frame); - evas_object_show(rect_frame); - - rect = evas_object_rectangle_add(evas_object_evas_get(window->color_selector.elm_selector_window)); - elm_object_content_set(rect_frame, rect); - ewk_color_picker_color_get(window->color_selector.ewk_picker, &r, &g, &b, &a); - evas_object_color_set(rect, r, g, b, a); - evas_object_show(rect); - - /* Show color selector */ - cs_frame = elm_frame_add(window->color_selector.elm_selector_window); - evas_object_size_hint_weight_set(cs_frame, EVAS_HINT_EXPAND, 0.7); - evas_object_size_hint_align_set(cs_frame, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_text_set(cs_frame, "Color Selector"); - elm_box_pack_end(box, cs_frame); - evas_object_show(cs_frame); - - window->color_selector.elm_selector = elm_colorselector_add(window->color_selector.elm_selector_window); - elm_object_content_set(cs_frame, window->color_selector.elm_selector); - evas_object_show(window->color_selector.elm_selector); - - /* OK, Cancel Buttons */ - button_box = elm_box_add(window->color_selector.elm_selector_window); - elm_box_horizontal_set(button_box, EINA_TRUE); - evas_object_size_hint_min_set(button_box, 200, 50); - elm_box_pack_end(box, button_box); - evas_object_show(button_box); - - ok_button = elm_button_add(window->color_selector.elm_selector_window); - elm_object_text_set(ok_button, "OK"); - elm_box_pack_end(button_box, ok_button); - evas_object_show(ok_button); - - cancel_button = elm_button_add(window->color_selector.elm_selector_window); - elm_object_text_set(cancel_button, "Cancel"); - elm_box_pack_end(button_box, cancel_button); - evas_object_show(cancel_button); - - evas_object_smart_callback_add(ok_button, "clicked", on_color_picker_ok_clicked, &(window->color_selector)); - evas_object_smart_callback_add(cancel_button, "clicked", on_color_picker_cancel_clicked, window->color_selector.ewk_picker); - evas_object_smart_callback_add(window->color_selector.elm_selector_window, "delete,request", on_color_picker_cancel_clicked, window->color_selector.ewk_picker); - evas_object_smart_callback_add(window->color_selector.elm_selector, "changed", on_color_changed, rect); - evas_object_smart_callback_add(window->color_selector.elm_selector, "color,item,selected", on_color_item_selected, rect); - - elm_win_center(window->color_selector.elm_selector_window, EINA_TRUE, EINA_TRUE); - evas_object_resize(window->color_selector.elm_selector_window, 350, 500); - evas_object_show(window->color_selector.elm_selector_window); - - return EINA_TRUE; -} - -static void -update_view_favicon(Browser_Window *window, Evas_Object *icon) -{ - /* Remove previous icon from URL bar */ - Evas_Object *old_icon = elm_object_part_content_unset(window->url_bar, "icon"); - if (old_icon) { - evas_object_unref(old_icon); - evas_object_del(old_icon); - } - - /* Show new icon in URL bar */ - if (icon) { - /* Workaround for icon display bug: - * http://trac.enlightenment.org/e/ticket/1616 */ - evas_object_size_hint_min_set(icon, 48, 24); - evas_object_image_filled_set(icon, EINA_FALSE); - evas_object_image_fill_set(icon, 24, 0, 24, 24); - elm_object_part_content_set(window->url_bar, "icon", icon); - evas_object_ref(icon); - } -} - -static void -on_view_favicon_changed(void *user_data, Evas_Object *ewk_view, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - Evas_Object* favicon = ewk_view_favicon_get(ewk_view); - update_view_favicon(window, favicon); - - if (favicon) - evas_object_unref(favicon); -} - -static int -quit(Eina_Bool success, const char *msg) -{ - ewk_shutdown(); - elm_shutdown(); - - if (msg) - fputs(msg, (success) ? stdout : stderr); - - if (!success) - return EXIT_FAILURE; - - return EXIT_SUCCESS; -} - -static void -on_url_bar_activated(void *user_data, Evas_Object *url_bar, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - const char *markup_url = elm_entry_entry_get(url_bar); - char *user_url = elm_entry_markup_to_utf8(markup_url); - char *url = url_from_user_input(user_url); - ewk_view_url_set(window->ewk_view, url); - - free(user_url); - free(url); - - /* Give focus back to the view */ - view_focus_set(window, EINA_TRUE); -} - -static void -on_url_bar_clicked(void *user_data, Evas_Object *url_bar, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - /* Grab focus from the view */ - evas_object_focus_set(window->ewk_view, EINA_FALSE); - elm_object_focus_set(url_bar, EINA_TRUE); -} - -static void -on_search_field_aborted(void *user_data, Evas_Object *search_field, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - search_box_hide(window); - - /* Give focus back to the view */ - view_focus_set(window, EINA_TRUE); -} - -static void -on_search_field_activated(void *user_data, Evas_Object *search_field, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - const char *markup_text = elm_entry_entry_get(search_field); - char *text = elm_entry_markup_to_utf8(markup_text); - ewk_view_text_find(window->ewk_view, text, DEFAULT_SEARCH_FLAGS, MAX_SEARCH_COUNT); - free(text); - - /* Grab focus from the view */ - evas_object_focus_set(window->ewk_view, EINA_FALSE); - elm_object_focus_set(search_field, EINA_TRUE); -} - -static void -on_search_field_clicked(void *user_data, Evas_Object *search_field, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - /* Grab focus from the view */ - evas_object_focus_set(window->ewk_view, EINA_FALSE); - elm_object_focus_set(search_field, EINA_TRUE); -} - -static void -on_back_button_clicked(void *user_data, Evas_Object *back_button, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - ewk_view_back(window->ewk_view); - /* Update back button state */ - elm_object_disabled_set(back_button, !ewk_view_back_possible(window->ewk_view)); -} - -static void -on_forward_button_clicked(void *user_data, Evas_Object *forward_button, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - ewk_view_forward(window->ewk_view); - /* Update forward button state */ - elm_object_disabled_set(forward_button, !ewk_view_forward_possible(window->ewk_view)); -} - -static void -on_search_backward_button_clicked(void *user_data, Evas_Object *search_backward_button, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - char *text = elm_entry_markup_to_utf8(elm_entry_entry_get(window->search.search_field)); - ewk_view_text_find(window->ewk_view, text, DEFAULT_SEARCH_FLAGS | EWK_FIND_OPTIONS_BACKWARDS, MAX_SEARCH_COUNT); - free(text); -} - -static void -on_search_forward_button_clicked(void *user_data, Evas_Object *search_forward_button, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - char *text = elm_entry_markup_to_utf8(elm_entry_entry_get(window->search.search_field)); - ewk_view_text_find(window->ewk_view, text, DEFAULT_SEARCH_FLAGS, MAX_SEARCH_COUNT); - free(text); -} - -static void -on_refresh_button_clicked(void *user_data, Evas_Object *refresh_button, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - Evas *evas = evas_object_evas_get(refresh_button); - Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(evas), "Control"); - if (ctrlPressed) { - info("Reloading and bypassing cache..."); - ewk_view_reload_bypass_cache(window->ewk_view); - } else { - info("Reloading..."); - ewk_view_reload(window->ewk_view); - } -} - -static void -quit_event_loop(void *user_data, Evas_Object *obj, void *event_info) -{ - ecore_main_loop_quit(); -} - -static void -on_ok_clicked(void *user_data, Evas_Object *obj, void *event_info) -{ - Eina_Bool *confirmed = (Eina_Bool *)user_data; - *confirmed = EINA_TRUE; - - ecore_main_loop_quit(); -} - -static Eina_Stringshare * -show_file_entry_dialog(Browser_Window *window, const char *label_tag, const char *default_text) -{ - Evas_Object *file_popup = elm_popup_add(window->elm_window); - evas_object_size_hint_weight_set(file_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_show(file_popup); - - Evas_Object *vbox = elm_box_add(file_popup); - evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_content_set(file_popup, vbox); - evas_object_show(vbox); - - Evas_Object *label = elm_label_add(window->elm_window); - elm_object_text_set(label, label_tag); - evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(label, EVAS_HINT_FILL, 0.5); - evas_object_color_set(label, 23, 45, 67, 142); - elm_box_pack_end(vbox, label); - evas_object_show(label); - - Evas_Object *fs_entry = elm_fileselector_entry_add(file_popup); - elm_fileselector_entry_is_save_set(fs_entry, EINA_TRUE); - evas_object_size_hint_align_set(fs_entry, EVAS_HINT_FILL, 0); - elm_fileselector_entry_path_set(fs_entry, default_text); - elm_object_text_set(fs_entry, "FileChooser"); - elm_box_pack_end(vbox, fs_entry); - evas_object_show(fs_entry); - - Evas_Object *hbox = elm_box_add(file_popup); - evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_box_horizontal_set(hbox, EINA_TRUE); - evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_end(vbox, hbox); - evas_object_show(hbox); - - Eina_Bool ok = EINA_FALSE; - Evas_Object *ok_button = elm_button_add(file_popup); - elm_object_text_set(ok_button, "OK"); - evas_object_smart_callback_add(ok_button, "clicked", on_ok_clicked, &ok); - elm_box_pack_end(hbox, ok_button); - evas_object_show(ok_button); - - Evas_Object *cancel_button = elm_button_add(file_popup); - elm_object_text_set(cancel_button, "Cancel"); - evas_object_smart_callback_add(cancel_button, "clicked", quit_event_loop, NULL); - elm_box_pack_end(hbox, cancel_button); - evas_object_show(cancel_button); - - ecore_main_loop_begin(); - - Eina_Stringshare *file_path = ok ? eina_stringshare_add(elm_fileselector_entry_path_get(fs_entry)) : NULL; - evas_object_del(file_popup); - return file_path; -} - -static void -on_javascript_alert(Ewk_View_Smart_Data *smartData, const char *message) -{ - Browser_Window *window = window_find_with_ewk_view(smartData->self); - - Evas_Object *alert_popup = elm_popup_add(window->elm_window); - evas_object_size_hint_weight_set(alert_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_text_set(alert_popup, message); - elm_object_part_text_set(alert_popup, "title,text", "Alert"); - - /* Popup buttons */ - Evas_Object *button = elm_button_add(alert_popup); - elm_object_text_set(button, "OK"); - elm_object_part_content_set(alert_popup, "button1", button); - evas_object_smart_callback_add(button, "clicked", quit_event_loop, NULL); - elm_object_focus_set(button, EINA_TRUE); - evas_object_show(alert_popup); - - /* Make modal */ - ecore_main_loop_begin(); - - evas_object_del(alert_popup); -} - -static Eina_Bool -on_javascript_confirm(Ewk_View_Smart_Data *smartData, const char *message) -{ - Browser_Window *window = window_find_with_ewk_view(smartData->self); - - Eina_Bool ok = EINA_FALSE; - - Evas_Object *confirm_popup = elm_popup_add(window->elm_window); - evas_object_size_hint_weight_set(confirm_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_text_set(confirm_popup, message); - elm_object_part_text_set(confirm_popup, "title,text", "Confirmation"); - - /* Popup buttons */ - Evas_Object *cancel_button = elm_button_add(confirm_popup); - elm_object_text_set(cancel_button, "Cancel"); - elm_object_part_content_set(confirm_popup, "button1", cancel_button); - evas_object_smart_callback_add(cancel_button, "clicked", quit_event_loop, NULL); - Evas_Object *ok_button = elm_button_add(confirm_popup); - elm_object_text_set(ok_button, "OK"); - elm_object_part_content_set(confirm_popup, "button2", ok_button); - evas_object_smart_callback_add(ok_button, "clicked", on_ok_clicked, &ok); - elm_object_focus_set(ok_button, EINA_TRUE); - evas_object_show(confirm_popup); - - /* Make modal */ - ecore_main_loop_begin(); - - evas_object_del(confirm_popup); - - return ok; -} - -static const char * -on_javascript_prompt(Ewk_View_Smart_Data *smartData, const char *message, const char *default_value) -{ - Browser_Window *window = window_find_with_ewk_view(smartData->self); - - Eina_Bool ok = EINA_FALSE; - - Evas_Object *prompt_popup = elm_popup_add(window->elm_window); - evas_object_size_hint_weight_set(prompt_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_text_set(prompt_popup, "title,text", "Prompt"); - - /* Popup Content */ - Evas_Object *box = elm_box_add(window->elm_window); - elm_box_padding_set(box, 0, 4); - evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(box); - - Evas_Object *prompt = elm_label_add(window->elm_window); - elm_object_text_set(prompt, message); - evas_object_size_hint_weight_set(prompt, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(prompt, EVAS_HINT_FILL, 0.5); - elm_box_pack_end(box, prompt); - evas_object_show(prompt); - - Evas_Object *entry = elm_entry_add(window->elm_window); - elm_entry_scrollable_set(entry, EINA_TRUE); - elm_entry_single_line_set(entry, EINA_TRUE); - elm_entry_text_style_user_push(entry, "DEFAULT='font_size=18'"); - elm_entry_entry_set(entry, default_value ? default_value : ""); - elm_entry_select_all(entry); - evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0.5); - elm_box_pack_end(box, entry); - elm_object_focus_set(entry, EINA_TRUE); - evas_object_show(entry); - - elm_object_content_set(prompt_popup, box); - - /* Popup buttons */ - Evas_Object *cancel_button = elm_button_add(prompt_popup); - elm_object_text_set(cancel_button, "Cancel"); - elm_object_part_content_set(prompt_popup, "button1", cancel_button); - evas_object_smart_callback_add(cancel_button, "clicked", quit_event_loop, NULL); - Evas_Object *ok_button = elm_button_add(prompt_popup); - elm_object_text_set(ok_button, "OK"); - elm_object_part_content_set(prompt_popup, "button2", ok_button); - evas_object_smart_callback_add(ok_button, "clicked", on_ok_clicked, &ok); - evas_object_show(prompt_popup); - - /* Make modal */ - ecore_main_loop_begin(); - - /* The return string need to be stringshared */ - const char *prompt_text = ok ? eina_stringshare_add(elm_entry_entry_get(entry)) : NULL; - evas_object_del(prompt_popup); - - return prompt_text; -} - -static void -on_popup_menu_discarded(void *user_data, Evas_Object *obj, void *event_info) -{ - // The user clicked outside the menu to discard it. - info("Popup menu was discarded."); - Browser_Window *window = (Browser_Window *)user_data; - ewk_popup_menu_close(window->popup.ewk_menu); -} - -static void -on_popup_menu_item_clicked(void *user_data, Evas_Object *obj, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - Elm_Object_Item *item = (Elm_Object_Item *)event_info; - - info("Selected popup menu index: %u", elm_menu_item_index_get(item)); - ewk_popup_menu_selected_index_set(window->popup.ewk_menu, elm_menu_item_index_get(item)); - - // Close popup menu. - ewk_popup_menu_close(window->popup.ewk_menu); -} - -static void -popup_menu_populate(Evas_Object *elm_menu, Ewk_Popup_Menu *ewk_menu, void *user_data) -{ - const Eina_List* ewk_items = ewk_popup_menu_items_get(ewk_menu); - - void *data; - const Eina_List *l; - EINA_LIST_FOREACH(ewk_items, l, data) { - Ewk_Popup_Menu_Item *ewk_item = (Ewk_Popup_Menu_Item *)data; - switch (ewk_popup_menu_item_type_get(ewk_item)) { - case EWK_POPUP_MENU_SEPARATOR: - elm_menu_item_separator_add(elm_menu, NULL); - break; - case EWK_POPUP_MENU_ITEM: - if (ewk_popup_menu_item_is_label_get(ewk_item)) { - Elm_Object_Item *item = elm_menu_item_add(elm_menu, NULL, NULL, ewk_popup_menu_item_text_get(ewk_item), NULL, NULL); - elm_object_item_disabled_set(item, EINA_TRUE); - } else { - Elm_Object_Item *item = elm_menu_item_add(elm_menu, NULL, NULL, ewk_popup_menu_item_text_get(ewk_item), on_popup_menu_item_clicked, user_data); - const char *tooltip_text = ewk_popup_menu_item_tooltip_get(ewk_item); - if (tooltip_text && tooltip_text[0] != '\0') - elm_object_item_tooltip_text_set(item, tooltip_text); - elm_object_item_disabled_set(item, !ewk_popup_menu_item_enabled_get(ewk_item)); - elm_menu_item_selected_set(item, ewk_popup_menu_item_selected_get(ewk_item)); - } - break; - default: - info("Unrecognized popup menu item type!"); - break; - } - } -} - -static Eina_Bool -on_popup_menu_show(Ewk_View_Smart_Data *smartData, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Ewk_Popup_Menu *ewk_menu) -{ - Browser_Window *window = window_find_with_ewk_view(smartData->self); - - if (window->popup.elm_menu) - evas_object_del(window->popup.elm_menu); - - window->popup.elm_menu = elm_menu_add(window->elm_window); - window->popup.ewk_menu = ewk_menu; - evas_object_smart_callback_add(window->popup.elm_menu, "clicked", on_popup_menu_discarded, window); - - popup_menu_populate(window->popup.elm_menu, ewk_menu, window); - - info("Showing popup menu at (%d, %d)", rect.x, rect.y); - elm_menu_move(window->popup.elm_menu, rect.x, rect.y); - evas_object_show(window->popup.elm_menu); - - return EINA_TRUE; -} - -static Eina_Bool -on_popup_menu_hide(Ewk_View_Smart_Data *smartData) -{ - Browser_Window *window = window_find_with_ewk_view(smartData->self); - - if (!window->popup.elm_menu) - return EINA_FALSE; - - elm_menu_close(window->popup.elm_menu); - - return EINA_TRUE; -} - -static Eina_Bool on_window_geometry_get(Ewk_View_Smart_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *width, Evas_Coord *height) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - evas_object_geometry_get(window->elm_window, x, y, width, height); - - return EINA_TRUE; -} - -static Eina_Bool on_window_geometry_set(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - evas_object_move(window->elm_window, x, y); - evas_object_resize(window->elm_window, width, height); - - return EINA_TRUE; -} - -typedef struct { - Evas_Object *ewk_view; - Evas_Object *permission_popup; -} PermissionData; - -static void -on_fullscreen_accept(void *user_data, Evas_Object *obj, void *event_info) -{ - PermissionData *permission_data = (PermissionData *)user_data; - - evas_object_del(permission_data->permission_popup); - evas_object_focus_set(permission_data->ewk_view, EINA_TRUE); - free(permission_data); -} - -static void -on_fullscreen_deny(void *user_data, Evas_Object *obj, void *event_info) -{ - PermissionData *permission_data = (PermissionData *)user_data; - - ewk_view_fullscreen_exit(permission_data->ewk_view); - evas_object_del(permission_data->permission_popup); - evas_object_focus_set(permission_data->ewk_view, EINA_TRUE); - free(permission_data); -} - -static Eina_Bool on_fullscreen_enter(Ewk_View_Smart_Data *sd, Ewk_Security_Origin *origin) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - /* Go fullscreen */ - elm_win_fullscreen_set(window->elm_window, EINA_TRUE); - - /* Show user popup */ - Evas_Object *permission_popup = elm_popup_add(window->elm_window); - evas_object_size_hint_weight_set(permission_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - Eina_Strbuf *message = eina_strbuf_new(); - eina_strbuf_append_printf(message, "%s is now fullscreen.<br>Press ESC at any time to exit fullscreen.<br>Allow fullscreen?", ewk_security_origin_host_get(origin)); - elm_object_text_set(permission_popup, eina_strbuf_string_get(message)); - eina_strbuf_free(message); - elm_object_part_text_set(permission_popup, "title,text", "Fullscreen Permission"); - - /* Popup buttons */ - PermissionData *permission_data = (PermissionData *)malloc(sizeof(PermissionData)); - permission_data->ewk_view = window->ewk_view; - permission_data->permission_popup = permission_popup; - Evas_Object *accept_button = elm_button_add(permission_popup); - elm_object_text_set(accept_button, "Accept"); - elm_object_part_content_set(permission_popup, "button1", accept_button); - evas_object_smart_callback_add(accept_button, "clicked", on_fullscreen_accept, permission_data); - - Evas_Object *deny_button = elm_button_add(permission_popup); - elm_object_text_set(deny_button, "Deny"); - elm_object_part_content_set(permission_popup, "button2", deny_button); - evas_object_smart_callback_add(deny_button, "clicked", on_fullscreen_deny, permission_data); - - evas_object_show(permission_popup); - - return EINA_TRUE; -} - -static Eina_Bool on_fullscreen_exit(Ewk_View_Smart_Data *sd) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - elm_win_fullscreen_set(window->elm_window, EINA_FALSE); - - return EINA_TRUE; -} - -static Evas_Object * -on_window_create(Ewk_View_Smart_Data *smartData, const char *url, const Ewk_Window_Features *window_features) -{ - int x = 0; - int y = 0; - int width = 0; - int height = 0; - - ewk_window_features_geometry_get(window_features, &x, &y, &width, &height); - - if (!width) - width = window_width; - - if (!height) - height = window_height; - - Browser_Window *window = window_create(smartData->self, url, width, height, EINA_FALSE); - Evas_Object *new_view = window->ewk_view; - - windows = eina_list_append(windows, window); - - info("minibrowser: location(%d,%d) size=(%d,%d) url=%s", x, y, width, height, url); - - return new_view; -} - -static void -on_window_close(Ewk_View_Smart_Data *smartData) -{ - Browser_Window *window = window_find_with_ewk_view(smartData->self); - window_close(window); -} - -static void -context_menu_item_selected_cb(void *data, Evas_Object *obj, void *event_info) -{ - if (!data) { - info("ERROR: context menu callback data is NULL."); - return; - } - - Ewk_Context_Menu_Item *ewk_item = (Ewk_Context_Menu_Item *)data; - info("Selected context menu item: %s.", ewk_context_menu_item_title_get(ewk_item)); - ewk_context_menu_item_select(ewk_context_menu_item_parent_menu_get(ewk_item), ewk_item); - ewk_context_menu_hide(ewk_context_menu_item_parent_menu_get(ewk_item)); -} - -static void -context_menu_populate(Evas_Object* context_menu, Ewk_Context_Menu *ewk_menu, Elm_Object_Item *parent_item) -{ - if (!context_menu || !ewk_menu) { - info("ERROR: necessary objects are NULL."); - return; - } - - const Eina_List *list = ewk_context_menu_items_get(ewk_menu); - const Eina_List *l; - void *data; - - Ewk_Context_Menu_Item *ewk_item; - Elm_Object_Item *elm_menu_item; - Evas_Object *elm_check_item; - - EINA_LIST_FOREACH(list, l, data) { - ewk_item = (Ewk_Context_Menu_Item *)data; - switch (ewk_context_menu_item_type_get(ewk_item)) { - case EWK_ACTION_TYPE: - elm_menu_item = elm_menu_item_add(context_menu, parent_item, NULL, ewk_context_menu_item_title_get(ewk_item), context_menu_item_selected_cb, ewk_item); - break; - case EWK_CHECKABLE_ACTION_TYPE: - elm_check_item = elm_check_add(context_menu); - elm_menu_item = elm_menu_item_add(context_menu, parent_item, NULL, ewk_context_menu_item_title_get(ewk_item), context_menu_item_selected_cb, ewk_item); - elm_object_item_content_set(elm_menu_item, elm_check_item); - elm_check_state_set(elm_check_item, ewk_context_menu_item_checked_get(ewk_item)); - break; - case EWK_SUBMENU_TYPE: - elm_menu_item = elm_menu_item_add(context_menu, parent_item, NULL, ewk_context_menu_item_title_get(ewk_item), NULL, ewk_item); - if (elm_menu_item) - context_menu_populate(context_menu, ewk_context_menu_item_submenu_get(ewk_item), elm_menu_item); - break; - default: - continue; - } - elm_object_item_disabled_set(elm_menu_item, !ewk_context_menu_item_enabled_get(ewk_item)); - } -} - -static Eina_Bool -on_context_menu_show(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Ewk_Context_Menu *menu) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - if (!window || !menu) { - info("ERROR: necessary objects are NULL."); - return EINA_FALSE; - } - - window->context_menu.elm_menu = elm_menu_add(window->elm_window); - - if (!window->context_menu.elm_menu) { - info("ERROR: could not create menu widget."); - return EINA_FALSE; - } - - window->context_menu.ewk_menu = menu; - - context_menu_populate(window->context_menu.elm_menu, menu, NULL); - - info("Showing context menu at (%d, %d).", x, y); - elm_menu_move(window->context_menu.elm_menu, x, y); - evas_object_show(window->context_menu.elm_menu); - - return EINA_TRUE; -} - -static Eina_Bool -on_context_menu_hide(Ewk_View_Smart_Data *sd) -{ - Browser_Window *window = window_find_with_ewk_view(sd->self); - - if (!window || !window->context_menu.elm_menu) { - info("ERROR: necessary objects are NULL."); - return EINA_FALSE; - } - - elm_menu_close(window->context_menu.elm_menu); - evas_object_del(window->context_menu.elm_menu); - window->context_menu.elm_menu = NULL; - window->context_menu.ewk_menu = NULL; - - return EINA_TRUE; -} - -static void -auth_popup_close(Auth_Data *auth_data) -{ - ewk_object_unref(auth_data->request); - evas_object_del(auth_data->popup); - free(auth_data); -} - -static void -on_auth_cancel(void *user_data, Evas_Object *obj, void *event_info) -{ - Auth_Data *auth_data = (Auth_Data *)user_data; - - ewk_auth_request_cancel(auth_data->request); - - auth_popup_close(auth_data); -} - -static void -on_auth_ok(void *user_data, Evas_Object *obj, void *event_info) -{ - Auth_Data *auth_data = (Auth_Data *)user_data; - - const char *username = elm_entry_entry_get(auth_data->username_entry); - const char *password = elm_entry_entry_get(auth_data->password_entry); - ewk_auth_request_authenticate(auth_data->request, username, password); - - auth_popup_close(auth_data); -} - -static void -on_authentication_request(void *user_data, Evas_Object *obj, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - Ewk_Auth_Request *request = ewk_object_ref((Ewk_Auth_Request *)event_info); - - Auth_Data *auth_data = (Auth_Data *)malloc(sizeof(Auth_Data)); - auth_data->request = request; - - Evas_Object *auth_popup = elm_popup_add(window->elm_window); - auth_data->popup = auth_popup; - evas_object_size_hint_weight_set(auth_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_text_set(auth_popup, "title,text", "Authentication Required"); - - /* Popup Content */ - Evas_Object *vbox = elm_box_add(auth_popup); - elm_box_padding_set(vbox, 0, 4); - evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_content_set(auth_popup, vbox); - evas_object_show(vbox); - - /* Authentication message */ - Evas_Object *label = elm_label_add(auth_popup); - elm_label_line_wrap_set(label, ELM_WRAP_WORD); - Eina_Strbuf *auth_text = eina_strbuf_new(); - const char *host = ewk_auth_request_host_get(request); - const char *realm = ewk_auth_request_realm_get(request); - eina_strbuf_append_printf(auth_text, "A username and password are being requested by %s. The site says: \"%s\"", host, realm ? realm : ""); - elm_object_text_set(label, eina_strbuf_string_get(auth_text)); - eina_strbuf_free(auth_text); - evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_end(vbox, label); - evas_object_show(label); - - /* Credential table */ - Evas_Object *table = elm_table_add(auth_popup); - elm_table_padding_set(table, 2, 2); - elm_table_homogeneous_set(table, EINA_TRUE); - evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_end(vbox, table); - evas_object_show(table); - - /* Username row */ - Evas_Object *username_label = elm_label_add(auth_popup); - elm_object_text_set(username_label, "Username:"); - evas_object_size_hint_weight_set(username_label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(username_label, 1, EVAS_HINT_FILL); - elm_table_pack(table, username_label, 0, 0, 1, 1); - evas_object_show(username_label); - - Evas_Object *username_entry = elm_entry_add(auth_popup); - auth_data->username_entry = username_entry; - elm_entry_scrollable_set(username_entry, EINA_TRUE); - elm_entry_single_line_set(username_entry, EINA_TRUE); - elm_entry_text_style_user_push(username_entry, "DEFAULT='font_size=18'"); - const char *suggested_username = ewk_auth_request_suggested_username_get(request); - elm_entry_entry_set(username_entry, suggested_username ? suggested_username : ""); - evas_object_size_hint_weight_set(username_entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(username_entry, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_table_pack(table, username_entry, 1, 0, 2, 1); - elm_object_focus_set(username_entry, EINA_TRUE); - evas_object_show(username_entry); - - /* Password row */ - Evas_Object *password_label = elm_label_add(auth_popup); - elm_object_text_set(password_label, "Password:"); - evas_object_size_hint_weight_set(password_label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(password_label, 1, EVAS_HINT_FILL); - elm_table_pack(table, password_label, 0, 1, 1, 1); - evas_object_show(password_label); - - Evas_Object *password_entry = elm_entry_add(auth_popup); - auth_data->password_entry = password_entry; - elm_entry_scrollable_set(password_entry, EINA_TRUE); - elm_entry_single_line_set(password_entry, EINA_TRUE); - elm_entry_password_set(password_entry, EINA_TRUE); - elm_entry_text_style_user_push(password_entry, "DEFAULT='font_size=18'"); - evas_object_size_hint_weight_set(password_entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(password_entry, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_table_pack(table, password_entry, 1, 1, 2, 1); - evas_object_show(password_entry); - - /* Popup buttons */ - Evas_Object *cancel_button = elm_button_add(auth_popup); - elm_object_text_set(cancel_button, "Cancel"); - elm_object_part_content_set(auth_popup, "button1", cancel_button); - evas_object_smart_callback_add(cancel_button, "clicked", on_auth_cancel, auth_data); - Evas_Object *ok_button = elm_button_add(auth_popup); - elm_object_text_set(ok_button, "OK"); - elm_object_part_content_set(auth_popup, "button2", ok_button); - evas_object_smart_callback_add(ok_button, "clicked", on_auth_ok, auth_data); - evas_object_show(auth_popup); -} - -static void -on_tooltip_text_set(void *user_data, Evas_Object *obj, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - const char *message = (const char*)event_info; - - elm_object_tooltip_text_set(window->elm_window, message); - window->tooltip.text_set = EINA_TRUE; - window_tooltip_update(window); -} - -static void -on_tooltip_text_unset(void *user_data, Evas_Object *obj, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - window_tooltip_hide(window); - elm_object_tooltip_unset(window->elm_window); - window->tooltip.text_set = EINA_FALSE; -} - -static void -on_home_button_clicked(void *user_data, Evas_Object *home_button, void *event_info) -{ - Browser_Window *window = (Browser_Window *)user_data; - - ewk_view_url_set(window->ewk_view, DEFAULT_URL); -} - -static void -on_window_deletion(void *user_data, Evas_Object *elm_window, void *event_info) -{ - window_close(window_find_with_elm_window(elm_window)); -} - -static Evas_Object * -create_toolbar_button(Evas_Object *elm_window, const char *icon_name) -{ - Evas_Object *button = elm_button_add(elm_window); - - Evas_Object *icon = elm_icon_add(elm_window); - elm_icon_standard_set(icon, icon_name); - evas_object_size_hint_max_set(icon, TOOL_BAR_ICON_SIZE, TOOL_BAR_ICON_SIZE); - evas_object_color_set(icon, 44, 44, 102, 128); - evas_object_show(icon); - elm_object_part_content_set(button, "icon", icon); - evas_object_size_hint_min_set(button, TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE); - - return button; -} - -static Browser_Window *window_create(Evas_Object *opener, const char *url, int width, int height, Eina_Bool view_mode) -{ - Browser_Window *window = calloc(1, sizeof(Browser_Window)); - if (!window) { - info("ERROR: could not create browser window."); - return NULL; - } - - /* Initialize tooltip information */ - window->tooltip.show_timer = NULL; - window->tooltip.activated = EINA_FALSE; - window->tooltip.text_set = EINA_FALSE; - window->tooltip.shown = EINA_FALSE; - - /* Create window */ - window->elm_window = elm_win_add(NULL, "minibrowser-window", ELM_WIN_BASIC); - elm_win_title_set(window->elm_window, APP_NAME); - evas_object_smart_callback_add(window->elm_window, "delete,request", on_window_deletion, &window); - - /* Create window background */ - Evas_Object *bg = elm_bg_add(window->elm_window); - elm_bg_color_set(bg, 193, 192, 191); - evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(window->elm_window, bg); - evas_object_show(bg); - - /* Create vertical layout */ - Evas_Object *vertical_layout = elm_box_add(window->elm_window); - elm_box_padding_set(vertical_layout, 0, 2); - evas_object_size_hint_weight_set(vertical_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(window->elm_window, vertical_layout); - evas_object_show(vertical_layout); - - /* Create horizontal layout for top bar */ - Evas_Object *horizontal_layout = elm_box_add(window->elm_window); - elm_box_horizontal_set(horizontal_layout, EINA_TRUE); - evas_object_size_hint_weight_set(horizontal_layout, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(horizontal_layout, EVAS_HINT_FILL, 0.0); - elm_box_pack_end(vertical_layout, horizontal_layout); - evas_object_show(horizontal_layout); - - /* Create Back button */ - window->back_button = create_toolbar_button(window->elm_window, "arrow_left"); - evas_object_smart_callback_add(window->back_button, "clicked", on_back_button_clicked, window); - elm_object_disabled_set(window->back_button, EINA_TRUE); - evas_object_size_hint_weight_set(window->back_button, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->back_button, 0.0, 0.5); - elm_box_pack_end(horizontal_layout, window->back_button); - evas_object_show(window->back_button); - - /* Create Forward button */ - window->forward_button = create_toolbar_button(window->elm_window, "arrow_right"); - evas_object_smart_callback_add(window->forward_button, "clicked", on_forward_button_clicked, window); - elm_object_disabled_set(window->forward_button, EINA_TRUE); - evas_object_size_hint_weight_set(window->forward_button, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->forward_button, 0.0, 0.5); - elm_box_pack_end(horizontal_layout, window->forward_button); - evas_object_show(window->forward_button); - - /* Create URL bar */ - window->url_bar = elm_entry_add(window->elm_window); - elm_entry_scrollable_set(window->url_bar, EINA_TRUE); - elm_entry_scrollbar_policy_set(window->url_bar, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); - elm_entry_single_line_set(window->url_bar, EINA_TRUE); - elm_entry_cnp_mode_set(window->url_bar, ELM_CNP_MODE_PLAINTEXT); - elm_entry_text_style_user_push(window->url_bar, "DEFAULT='font_size=18'"); - evas_object_smart_callback_add(window->url_bar, "activated", on_url_bar_activated, window); - evas_object_smart_callback_add(window->url_bar, "clicked", on_url_bar_clicked, window); - evas_object_size_hint_weight_set(window->url_bar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->url_bar, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_end(horizontal_layout, window->url_bar); - evas_object_show(window->url_bar); - - /* Create Refresh button */ - Evas_Object *refresh_button = create_toolbar_button(window->elm_window, "refresh"); - evas_object_smart_callback_add(refresh_button, "clicked", on_refresh_button_clicked, window); - evas_object_size_hint_weight_set(refresh_button, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(refresh_button, 1.0, 0.5); - elm_box_pack_end(horizontal_layout, refresh_button); - evas_object_show(refresh_button); - - /* Create Home button */ - Evas_Object *home_button = create_toolbar_button(window->elm_window, "home"); - evas_object_smart_callback_add(home_button, "clicked", on_home_button_clicked, window); - evas_object_size_hint_weight_set(home_button, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(home_button, 1.0, 0.5); - elm_box_pack_end(horizontal_layout, home_button); - evas_object_show(home_button); - - /* Create Search bar */ - window->search.search_bar = elm_box_add(window->elm_window); - elm_box_horizontal_set(window->search.search_bar, EINA_TRUE); - evas_object_size_hint_min_set(window->search.search_bar, SEARCH_FIELD_SIZE + 2 * SEARCH_BUTTON_SIZE, 0); - evas_object_size_hint_align_set(window->search.search_bar, 0.0, EVAS_HINT_FILL); - elm_box_pack_end(vertical_layout, window->search.search_bar); - - /* Create Search field */ - window->search.search_field = elm_entry_add(window->elm_window); - elm_entry_scrollable_set(window->search.search_field, EINA_TRUE); - elm_entry_scrollbar_policy_set(window->search.search_field, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); - elm_entry_single_line_set(window->search.search_field, EINA_TRUE); - elm_entry_cnp_mode_set(window->search.search_field, ELM_CNP_MODE_PLAINTEXT); - elm_entry_text_style_user_push(window->search.search_field, "DEFAULT='font_size=14'"); - evas_object_smart_callback_add(window->search.search_field, "activated", on_search_field_activated, window); - evas_object_smart_callback_add(window->search.search_field, "changed", on_search_field_activated, window); - evas_object_smart_callback_add(window->search.search_field, "aborted", on_search_field_aborted, window); - evas_object_smart_callback_add(window->search.search_field, "clicked", on_search_field_clicked, window); - evas_object_size_hint_weight_set(window->search.search_field, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->search.search_field, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_end(window->search.search_bar, window->search.search_field); - - /* Create Search backward button */ - window->search.backward_button = create_toolbar_button(window->elm_window, "arrow_up"); - evas_object_smart_callback_add(window->search.backward_button, "clicked", on_search_backward_button_clicked, window); - elm_object_disabled_set(window->search.backward_button, EINA_FALSE); - evas_object_size_hint_weight_set(window->search.backward_button, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->search.backward_button, 1.0, 0.5); - evas_object_size_hint_min_set(window->search.backward_button, SEARCH_BUTTON_SIZE, SEARCH_BUTTON_SIZE); - elm_box_pack_end(window->search.search_bar, window->search.backward_button); - - /* Create Search forwardward button */ - window->search.forward_button = create_toolbar_button(window->elm_window, "arrow_down"); - evas_object_smart_callback_add(window->search.forward_button, "clicked", on_search_forward_button_clicked, window); - elm_object_disabled_set(window->search.forward_button, EINA_FALSE); - evas_object_size_hint_weight_set(window->search.forward_button, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->search.forward_button, 1.0, 0.5); - evas_object_size_hint_min_set(window->search.forward_button, SEARCH_BUTTON_SIZE, SEARCH_BUTTON_SIZE); - elm_box_pack_end(window->search.search_bar, window->search.forward_button); - - /* Create ewk_view */ - Ewk_View_Smart_Class *ewkViewClass = miniBrowserViewSmartClass(); - ewkViewClass->run_javascript_alert = on_javascript_alert; - ewkViewClass->run_javascript_confirm = on_javascript_confirm; - ewkViewClass->run_javascript_prompt = on_javascript_prompt; - ewkViewClass->window_geometry_get = on_window_geometry_get; - ewkViewClass->window_geometry_set = on_window_geometry_set; - ewkViewClass->fullscreen_enter = on_fullscreen_enter; - ewkViewClass->fullscreen_exit = on_fullscreen_exit; - ewkViewClass->window_create = on_window_create; - ewkViewClass->window_close = on_window_close; - ewkViewClass->popup_menu_show = on_popup_menu_show; - ewkViewClass->popup_menu_hide = on_popup_menu_hide; - ewkViewClass->context_menu_show = on_context_menu_show; - ewkViewClass->context_menu_hide = on_context_menu_hide; - ewkViewClass->input_picker_color_request = on_color_picker_request; - ewkViewClass->input_picker_color_dismiss = on_color_picker_dismiss; - - Evas *evas = evas_object_evas_get(window->elm_window); - if (legacy_behavior_enabled) { - // Use raw WK2 api to create a view using legacy mode. - window->ewk_view = (Evas_Object*)WKViewCreate(evas, 0, 0); - } else { - Evas_Smart *smart = evas_smart_class_new(&ewkViewClass->sc); - Ewk_Context *context = opener ? ewk_view_context_get(opener) : ewk_context_default_get(); - Ewk_Page_Group *pageGroup = opener ? ewk_view_page_group_get(opener) : ewk_page_group_create(""); - window->ewk_view = ewk_view_smart_add(evas, smart, context, pageGroup); - } - ewk_view_theme_set(window->ewk_view, TEST_THEME_DIR "/default.edj"); - if (device_pixel_ratio) - ewk_view_device_pixel_ratio_set(window->ewk_view, (float)device_pixel_ratio); - ewk_view_source_mode_set(window->ewk_view, view_mode); - ewk_view_user_agent_set(window->ewk_view, user_agent_string); - - /* Set the zoom level to default */ - window->current_zoom_level = DEFAULT_ZOOM_LEVEL; - - Ewk_Settings *settings = ewk_view_settings_get(window->ewk_view); - ewk_settings_file_access_from_file_urls_allowed_set(settings, EINA_TRUE); - ewk_settings_encoding_detector_enabled_set(settings, encoding_detector_enabled); - ewk_settings_frame_flattening_enabled_set(settings, frame_flattening_enabled); - ewk_settings_local_storage_enabled_set(settings, local_storage_enabled); - info("HTML5 local storage is %s for this view.", local_storage_enabled ? "enabled" : "disabled"); - elm_win_fullscreen_set(window->elm_window, fullscreen_enabled); - ewk_settings_developer_extras_enabled_set(settings, EINA_TRUE); - ewk_settings_preferred_minimum_contents_width_set(settings, 0); - ewk_text_checker_continuous_spell_checking_enabled_set(spell_checking_enabled); - - evas_object_smart_callback_add(window->ewk_view, "authentication,request", on_authentication_request, window); - evas_object_smart_callback_add(window->ewk_view, "download,failed", on_download_failed, window); - evas_object_smart_callback_add(window->ewk_view, "download,finished", on_download_finished, window); - evas_object_smart_callback_add(window->ewk_view, "download,request", on_download_request, window); - evas_object_smart_callback_add(window->ewk_view, "file,chooser,request", on_file_chooser_request, window); - evas_object_smart_callback_add(window->ewk_view, "favicon,changed", on_view_favicon_changed, window); - evas_object_smart_callback_add(window->ewk_view, "load,error", on_error, window); - evas_object_smart_callback_add(window->ewk_view, "load,provisional,failed", on_error, window); - evas_object_smart_callback_add(window->ewk_view, "load,progress", on_progress, window); - evas_object_smart_callback_add(window->ewk_view, "title,changed", on_title_changed, window); - evas_object_smart_callback_add(window->ewk_view, "url,changed", on_url_changed, window); - evas_object_smart_callback_add(window->ewk_view, "back,forward,list,changed", on_back_forward_list_changed, window); - evas_object_smart_callback_add(window->ewk_view, "tooltip,text,set", on_tooltip_text_set, window); - evas_object_smart_callback_add(window->ewk_view, "tooltip,text,unset", on_tooltip_text_unset, window); - - evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_KEY_DOWN, on_key_down, window); - evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_DOWN, on_mouse_down, window); - - evas_object_size_hint_weight_set(window->ewk_view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(window->ewk_view, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_before(vertical_layout, window->ewk_view, window->search.search_bar); - evas_object_show(window->ewk_view); - - if (url && strcmp(url, "about:blank")) // Do not reset 'about:blank' as it would erase all previous document modifications. - ewk_view_url_set(window->ewk_view, url); - - evas_object_resize(window->elm_window, width ? width : window_width, height ? height : window_height); - evas_object_show(window->elm_window); - search_box_hide(window); - - view_focus_set(window, EINA_TRUE); - - evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_IN, on_mouse_in, window); - evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_OUT, on_mouse_out, window); - evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_MOVE, on_mouse_move, window); - evas_object_event_callback_add(window->elm_window, EVAS_CALLBACK_RESIZE, on_window_resize, window); - - return window; -} - -static Ewk_Cookie_Accept_Policy -parse_cookies_policy(const char *input_string) -{ - if (!strcmp(input_string, "always")) - return EWK_COOKIE_ACCEPT_POLICY_ALWAYS; - if (!strcmp(input_string, "never")) - return EWK_COOKIE_ACCEPT_POLICY_NEVER; - if (strcmp(input_string, "no-third-party")) - info("Unrecognized type for cookies policy: %s.", input_string); - return EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY; -} - -static void -parse_window_size(const char *input_string, int *width, int *height) -{ - static const unsigned max_length = 4; - int parsed_width; - int parsed_height; - char **arr; - unsigned elements; - - arr = eina_str_split_full(input_string, "x", 0, &elements); - - if (elements == 2 && (strlen(arr[0]) <= max_length) && (strlen(arr[1]) <= max_length)) { - parsed_width = atoi(arr[0]); - if (width && parsed_width) - *width = parsed_width; - - parsed_height = atoi(arr[1]); - if (height && parsed_height) - *height = parsed_height; - } - - free(arr[0]); - free(arr); -} - -EAPI_MAIN int -elm_main(int argc, char *argv[]) -{ - int args = 1; - unsigned char quitOption = 0; - Browser_Window *window; - char *window_size_string = NULL; - char *cookies_policy_string = NULL; - - Ecore_Getopt_Value values[] = { - ECORE_GETOPT_VALUE_STR(evas_engine_name), - ECORE_GETOPT_VALUE_STR(window_size_string), - ECORE_GETOPT_VALUE_STR(user_agent_string), - ECORE_GETOPT_VALUE_BOOL(legacy_behavior_enabled), - ECORE_GETOPT_VALUE_DOUBLE(device_pixel_ratio), - ECORE_GETOPT_VALUE_BOOL(quitOption), - ECORE_GETOPT_VALUE_BOOL(encoding_detector_enabled), - ECORE_GETOPT_VALUE_BOOL(frame_flattening_enabled), - ECORE_GETOPT_VALUE_BOOL(local_storage_enabled), - ECORE_GETOPT_VALUE_BOOL(fullscreen_enabled), - ECORE_GETOPT_VALUE_BOOL(spell_checking_enabled), - ECORE_GETOPT_VALUE_STR(cookies_policy_string), - ECORE_GETOPT_VALUE_BOOL(quitOption), - ECORE_GETOPT_VALUE_BOOL(quitOption), - ECORE_GETOPT_VALUE_BOOL(quitOption), - ECORE_GETOPT_VALUE_NONE - }; - - if (!ewk_init()) - return EXIT_FAILURE; - - ewk_view_smart_class_set(miniBrowserViewSmartClass()); - - ecore_app_args_set(argc, (const char **) argv); - args = ecore_getopt_parse(&options, values, argc, argv); - - if (args < 0) - return quit(EINA_FALSE, "ERROR: could not parse options.\n"); - - if (quitOption) - return quit(EINA_TRUE, NULL); - - if (evas_engine_name) - elm_config_preferred_engine_set(evas_engine_name); -#if defined(WTF_USE_ACCELERATED_COMPOSITING) && defined(HAVE_ECORE_X) - else { - evas_engine_name = "opengl_x11"; - elm_config_preferred_engine_set(evas_engine_name); - } -#endif - - // Enable favicon database. - Ewk_Context *context = ewk_context_default_get(); - ewk_context_favicon_database_directory_set(context, NULL); - - if (cookies_policy_string) - ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), parse_cookies_policy(cookies_policy_string)); - - if (window_size_string) - parse_window_size(window_size_string, &window_width, &window_height); - - if (args < argc) { - char *url = url_from_user_input(argv[args]); - window = window_create(NULL, url, 0, 0, EINA_FALSE); - free(url); - } else - window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE); - - if (!window) - return quit(EINA_FALSE, "ERROR: could not create browser window.\n"); - - windows = eina_list_append(windows, window); - - elm_run(); - - return quit(EINA_TRUE, NULL); -} -ELM_MAIN() - diff --git a/Tools/MiniBrowser/gtk/BrowserCellRendererVariant.c b/Tools/MiniBrowser/gtk/BrowserCellRendererVariant.c deleted file mode 100644 index cb2caa35b..000000000 --- a/Tools/MiniBrowser/gtk/BrowserCellRendererVariant.c +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "BrowserCellRendererVariant.h" -#include "BrowserMarshal.h" -#include <errno.h> - -enum { - PROP_0, - - PROP_VALUE, - PROP_ADJUSTMENT -}; - -enum { - CHANGED, - - LAST_SIGNAL -}; - -struct _BrowserCellRendererVariant { - GtkCellRenderer parent; - - GValue *value; - - GtkCellRenderer *textRenderer; - GtkCellRenderer *toggleRenderer; - GtkCellRenderer *spinRenderer; -}; - -struct _BrowserCellRendererVariantClass { - GtkCellRendererClass parent; -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -G_DEFINE_TYPE(BrowserCellRendererVariant, browser_cell_renderer_variant, GTK_TYPE_CELL_RENDERER) - -static void browserCellRendererVariantFinalize(GObject *object) -{ - BrowserCellRendererVariant *renderer = BROWSER_CELL_RENDERER_VARIANT(object); - - g_object_unref(renderer->toggleRenderer); - g_object_unref(renderer->spinRenderer); - g_object_unref(renderer->textRenderer); - if (renderer->value) - g_boxed_free(G_TYPE_VALUE, renderer->value); - - G_OBJECT_CLASS(browser_cell_renderer_variant_parent_class)->finalize(object); -} - -static void browserCellRendererVariantGetProperty(GObject *object, guint propId, GValue *value, GParamSpec *pspec) -{ - BrowserCellRendererVariant *renderer = BROWSER_CELL_RENDERER_VARIANT(object); - - switch (propId) { - case PROP_VALUE: - g_value_set_boxed(value, renderer->value); - break; - case PROP_ADJUSTMENT: { - GtkAdjustment *adjustment = NULL; - g_object_get(G_OBJECT(renderer->spinRenderer), "adjustment", &adjustment, NULL); - if (adjustment) { - g_value_set_object(value, adjustment); - g_object_unref(adjustment); - } - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec); - } -} - -static void browserCellRendererVariantSetModeForValue(BrowserCellRendererVariant *renderer) -{ - if (!renderer->value) - return; - - GtkCellRendererMode mode; - if (G_VALUE_HOLDS_BOOLEAN(renderer->value)) - mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE; - else if (G_VALUE_HOLDS_STRING(renderer->value) || G_VALUE_HOLDS_UINT(renderer->value)) - mode = GTK_CELL_RENDERER_MODE_EDITABLE; - else - return; - - g_object_set(G_OBJECT(renderer), "mode", mode, NULL); -} - -static void browserCellRendererVariantSetProperty(GObject *object, guint propId, const GValue *value, GParamSpec *pspec) -{ - BrowserCellRendererVariant *renderer = BROWSER_CELL_RENDERER_VARIANT(object); - - switch (propId) { - case PROP_VALUE: - if (renderer->value) - g_boxed_free(G_TYPE_VALUE, renderer->value); - renderer->value = g_value_dup_boxed(value); - browserCellRendererVariantSetModeForValue(renderer); - break; - case PROP_ADJUSTMENT: - g_object_set(G_OBJECT(renderer->spinRenderer), "adjustment", g_value_get_object(value), NULL); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec); - } -} - -static GtkCellRenderer *browserCellRendererVariantGetRendererForValue(BrowserCellRendererVariant *renderer) -{ - if (!renderer->value) - return NULL; - - if (G_VALUE_HOLDS_BOOLEAN(renderer->value)) { - g_object_set(G_OBJECT(renderer->toggleRenderer), - "active", g_value_get_boolean(renderer->value), - NULL); - return renderer->toggleRenderer; - } - - if (G_VALUE_HOLDS_STRING(renderer->value)) { - g_object_set(G_OBJECT(renderer->textRenderer), - "text", g_value_get_string(renderer->value), - NULL); - return renderer->textRenderer; - } - - if (G_VALUE_HOLDS_UINT(renderer->value)) { - gchar *text = g_strdup_printf("%u", g_value_get_uint(renderer->value)); - g_object_set(G_OBJECT(renderer->spinRenderer), "text", text, NULL); - g_free(text); - return renderer->spinRenderer; - } - - return NULL; -} - -static void browserCellRendererVariantCellRendererTextEdited(BrowserCellRendererVariant *renderer, const gchar *path, const gchar *newText) -{ - if (!renderer->value) - return; - - if (!G_VALUE_HOLDS_STRING(renderer->value)) - return; - - g_value_set_string(renderer->value, newText); - g_signal_emit(renderer, signals[CHANGED], 0, path, renderer->value); -} - -static void browserCellRendererVariantCellRendererSpinEdited(BrowserCellRendererVariant *renderer, const gchar *path, const gchar *newText) -{ - if (!renderer->value) - return; - - if (!G_VALUE_HOLDS_UINT(renderer->value)) - return; - - GtkAdjustment *adjustment; - g_object_get(G_OBJECT(renderer->spinRenderer), "adjustment", &adjustment, NULL); - if (!adjustment) - return; - - errno = 0; - gchar *endPtr; - gdouble value = g_strtod(newText, &endPtr); - if (errno || value > gtk_adjustment_get_upper(adjustment) || value < gtk_adjustment_get_lower(adjustment) || endPtr == newText) { - g_warning("Invalid input for cell: %s\n", newText); - return; - } - - g_value_set_uint(renderer->value, (guint)value); - g_signal_emit(renderer, signals[CHANGED], 0, path, renderer->value); -} - -static gboolean browserCellRendererVariantCellRendererActivate(GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, const GdkRectangle *bgArea, const GdkRectangle *cellArea, GtkCellRendererState flags) -{ - BrowserCellRendererVariant *renderer = BROWSER_CELL_RENDERER_VARIANT(cell); - - if (!renderer->value) - return TRUE; - - if (!G_VALUE_HOLDS_BOOLEAN(renderer->value)) - return TRUE; - - g_value_set_boolean(renderer->value, !g_value_get_boolean(renderer->value)); - g_signal_emit(renderer, signals[CHANGED], 0, path, renderer->value); - - return TRUE; -} - -static void browserCellRendererVariantCellRendererRender(GtkCellRenderer *cell, cairo_t *cr, GtkWidget *widget, const GdkRectangle *bgArea, const GdkRectangle *cellArea, GtkCellRendererState flags) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return; - - GTK_CELL_RENDERER_GET_CLASS(renderer)->render(renderer, cr, widget, bgArea, cellArea, flags); -} - -static GtkCellEditable *browserCellRendererVariantCellRendererStartEditing(GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, const GdkRectangle *bgArea, const GdkRectangle *cellArea, GtkCellRendererState flags) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return NULL; - - if (!GTK_CELL_RENDERER_GET_CLASS(renderer)->start_editing) - return NULL; - - return GTK_CELL_RENDERER_GET_CLASS(renderer)->start_editing(renderer, event, widget, path, bgArea, cellArea, flags); -} - -static void browserCellRendererVariantCellRendererGetPreferredWidth(GtkCellRenderer *cell, GtkWidget *widget, gint *minimumWidth, gint *naturalWidth) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return; - - GTK_CELL_RENDERER_GET_CLASS(renderer)->get_preferred_width(renderer, widget, minimumWidth, naturalWidth); -} - -static void browserCellRendererVariantCellRendererGetPreferredHeight(GtkCellRenderer *cell, GtkWidget *widget, gint *minimumHeight, gint *naturalHeight) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return; - - GTK_CELL_RENDERER_GET_CLASS(renderer)->get_preferred_height(renderer, widget, minimumHeight, naturalHeight); -} - -static void browserCellRendererVariantCellRendererGetPreferredWidthForHeight(GtkCellRenderer *cell, GtkWidget *widget, gint height, gint *minimumWidth, gint *naturalWidth) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return; - - GTK_CELL_RENDERER_GET_CLASS(renderer)->get_preferred_width_for_height(renderer, widget, height, minimumWidth, naturalWidth); -} - -static void browserCellRendererVariantCellRendererGetPreferredHeightForWidth(GtkCellRenderer *cell, GtkWidget *widget, gint width, gint *minimumHeight, gint *naturalHeight) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return; - - GTK_CELL_RENDERER_GET_CLASS(renderer)->get_preferred_height_for_width(renderer, widget, width, minimumHeight, naturalHeight); -} - -static void browserCellRendererVariantCellRendererGetAlignedArea(GtkCellRenderer *cell, GtkWidget *widget, GtkCellRendererState flags, const GdkRectangle *cellArea, GdkRectangle *alignedArea) -{ - GtkCellRenderer *renderer = browserCellRendererVariantGetRendererForValue(BROWSER_CELL_RENDERER_VARIANT(cell)); - if (!renderer) - return; - - GTK_CELL_RENDERER_GET_CLASS(renderer)->get_aligned_area(renderer, widget, flags, cellArea, alignedArea); -} - -static void browser_cell_renderer_variant_init(BrowserCellRendererVariant *renderer) -{ - g_object_set(renderer, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL); - - renderer->toggleRenderer = gtk_cell_renderer_toggle_new(); - g_object_set(G_OBJECT(renderer->toggleRenderer), "xalign", 0.0, NULL); - g_object_ref_sink(renderer->toggleRenderer); - - renderer->textRenderer = gtk_cell_renderer_text_new(); - g_signal_connect_swapped(renderer->textRenderer, "edited", - G_CALLBACK(browserCellRendererVariantCellRendererTextEdited), renderer); - g_object_set(G_OBJECT(renderer->textRenderer), "editable", TRUE, NULL); - g_object_ref_sink(renderer->textRenderer); - - renderer->spinRenderer = gtk_cell_renderer_spin_new(); - g_signal_connect_swapped(renderer->spinRenderer, "edited", - G_CALLBACK(browserCellRendererVariantCellRendererSpinEdited), renderer); - g_object_set(G_OBJECT(renderer->spinRenderer), "editable", TRUE, NULL); -} - -static void browser_cell_renderer_variant_class_init(BrowserCellRendererVariantClass *klass) -{ - GObjectClass *gobjectClass = G_OBJECT_CLASS(klass); - GtkCellRendererClass *cellRendererClass = GTK_CELL_RENDERER_CLASS(klass); - - gobjectClass->get_property = browserCellRendererVariantGetProperty; - gobjectClass->set_property = browserCellRendererVariantSetProperty; - gobjectClass->finalize = browserCellRendererVariantFinalize; - - cellRendererClass->activate = browserCellRendererVariantCellRendererActivate; - cellRendererClass->render = browserCellRendererVariantCellRendererRender; - cellRendererClass->start_editing = browserCellRendererVariantCellRendererStartEditing; - cellRendererClass->get_preferred_width = browserCellRendererVariantCellRendererGetPreferredWidth; - cellRendererClass->get_preferred_height = browserCellRendererVariantCellRendererGetPreferredHeight; - cellRendererClass->get_preferred_width_for_height = browserCellRendererVariantCellRendererGetPreferredWidthForHeight; - cellRendererClass->get_preferred_height_for_width = browserCellRendererVariantCellRendererGetPreferredHeightForWidth; - cellRendererClass->get_aligned_area = browserCellRendererVariantCellRendererGetAlignedArea; - - g_object_class_install_property(gobjectClass, - PROP_VALUE, - g_param_spec_boxed("value", - "Value", - "The cell renderer value", - G_TYPE_VALUE, - G_PARAM_READWRITE)); - g_object_class_install_property(gobjectClass, - PROP_ADJUSTMENT, - g_param_spec_object("adjustment", - "Adjustment", - "The adjustment that holds the value of the spin button", - GTK_TYPE_ADJUSTMENT, - G_PARAM_READWRITE)); - - signals[CHANGED] = - g_signal_new("changed", - G_TYPE_FROM_CLASS(gobjectClass), - G_SIGNAL_RUN_LAST, - 0, NULL, NULL, - browser_marshal_VOID__STRING_BOXED, - G_TYPE_NONE, 2, - G_TYPE_STRING, G_TYPE_VALUE); -} - -GtkCellRenderer *browser_cell_renderer_variant_new(void) -{ - return GTK_CELL_RENDERER(g_object_new(BROWSER_TYPE_CELL_RENDERER_VARIANT, NULL)); -} - diff --git a/Tools/MiniBrowser/gtk/BrowserCellRendererVariant.h b/Tools/MiniBrowser/gtk/BrowserCellRendererVariant.h deleted file mode 100644 index 4fce3bb60..000000000 --- a/Tools/MiniBrowser/gtk/BrowserCellRendererVariant.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BrowserCellRendererVariant_h -#define BrowserCellRendererVariant_h - -#include <gtk/gtk.h> - -G_BEGIN_DECLS - -#define BROWSER_TYPE_CELL_RENDERER_VARIANT (browser_cell_renderer_variant_get_type()) -#define BROWSER_CELL_RENDERER_VARIANT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BROWSER_TYPE_CELL_RENDERER_VARIANT, BrowserCellRendererVariant)) -#define BROWSER_CELL_RENDERER_VARIANT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), BROWSER_TYPE_CELL_RENDERER_VARIANT, BrowserCellRendererVariantClass)) -#define BROWSER_IS_CELL_RENDERER_VARIANT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_TYPE_CELL_RENDERER_VARIANT)) -#define BROWSER_IS_CELL_RENDERER_VARIANT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_TYPE_CELL_RENDERER_VARIANT)) -#define BROWSER_CELL_RENDERER_VARIANT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_TYPE_CELL_RENDERER_VARIANT, BrowserCellRendererVariantClass)) - -typedef struct _BrowserCellRendererVariant BrowserCellRendererVariant; -typedef struct _BrowserCellRendererVariantClass BrowserCellRendererVariantClass; - -GType browser_cell_renderer_variant_get_type(void); - -GtkCellRenderer* browser_cell_renderer_variant_new(void); - -G_END_DECLS - -#endif diff --git a/Tools/MiniBrowser/gtk/BrowserDownloadsBar.c b/Tools/MiniBrowser/gtk/BrowserDownloadsBar.c deleted file mode 100644 index 5f0e620e5..000000000 --- a/Tools/MiniBrowser/gtk/BrowserDownloadsBar.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "BrowserDownloadsBar.h" - -#include <glib/gi18n.h> - -#define BROWSER_TYPE_DOWNLOAD (browser_download_get_type()) -#define BROWSER_DOWNLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BROWSER_TYPE_DOWNLOAD, BrowserDownload)) - -typedef struct _BrowserDownload BrowserDownload; -typedef struct _BrowserDownloadClass BrowserDownloadClass; - -static GType browser_download_get_type(); - -struct _BrowserDownloadsBar { - GtkInfoBar parent; -}; - -struct _BrowserDownloadsBarClass { - GtkInfoBarClass parentClass; -}; - -G_DEFINE_TYPE(BrowserDownloadsBar, browser_downloads_bar, GTK_TYPE_INFO_BAR) - -static void -browserDownloadsBarChildRemoved(GtkContainer *infoBar, GtkWidget *widget, BrowserDownloadsBar *downloadsBar) -{ - GList *children = gtk_container_get_children(infoBar); - if (g_list_length(children) == 1) - gtk_info_bar_response(GTK_INFO_BAR(downloadsBar), GTK_RESPONSE_CLOSE); - g_list_free(children); -} - -static void browserDownloadsBarResponse(GtkInfoBar *infoBar, gint responseId) -{ - gtk_widget_destroy(GTK_WIDGET(infoBar)); -} - -static void browser_downloads_bar_init(BrowserDownloadsBar *downloadsBar) -{ - GtkWidget *contentBox = gtk_info_bar_get_content_area(GTK_INFO_BAR(downloadsBar)); - g_signal_connect_after(contentBox, "remove", G_CALLBACK(browserDownloadsBarChildRemoved), downloadsBar); - gtk_orientable_set_orientation(GTK_ORIENTABLE(contentBox), GTK_ORIENTATION_VERTICAL); - - GtkWidget *title = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(title), "<span size='xx-large' weight='bold'>Downloads</span>"); - gtk_misc_set_alignment(GTK_MISC(title), 0., 0.5); - gtk_box_pack_start(GTK_BOX(contentBox), title, FALSE, FALSE, 12); - gtk_widget_show(title); -} - -static void browser_downloads_bar_class_init(BrowserDownloadsBarClass *klass) -{ - GtkInfoBarClass *infoBarClass = GTK_INFO_BAR_CLASS(klass); - infoBarClass->response = browserDownloadsBarResponse; -} - -GtkWidget *browser_downloads_bar_new() -{ - GtkInfoBar *downloadsBar = GTK_INFO_BAR(g_object_new(BROWSER_TYPE_DOWNLOADS_BAR, NULL)); - gtk_info_bar_add_buttons(downloadsBar, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); - return GTK_WIDGET(downloadsBar); -} - -struct _BrowserDownload { - GtkBox parent; - - WebKitDownload *download; - guint64 contentLength; - guint64 downloadedSize; - gboolean finished; - - GtkWidget *statusLabel; - GtkWidget *remainingLabel; - GtkWidget *progressBar; - GtkWidget *actionButton; -}; - -struct _BrowserDownloadClass { - GtkBoxClass parentClass; -}; - -G_DEFINE_TYPE(BrowserDownload, browser_download, GTK_TYPE_BOX) - -static void actionButtonClicked(GtkButton *button, BrowserDownload *browserDownload) -{ - if (!browserDownload->finished) { - webkit_download_cancel(browserDownload->download); - return; - } - - gtk_show_uri(gtk_widget_get_screen(GTK_WIDGET(browserDownload)), - webkit_download_get_destination(browserDownload->download), - gtk_get_current_event_time(), NULL); - gtk_widget_destroy(GTK_WIDGET(browserDownload)); -} - -static void browserDownloadFinalize(GObject *object) -{ - BrowserDownload *browserDownload = BROWSER_DOWNLOAD(object); - - if (browserDownload->download) { - g_object_unref(browserDownload->download); - browserDownload->download = NULL; - } - - G_OBJECT_CLASS(browser_download_parent_class)->finalize(object); -} - -static void browser_download_init(BrowserDownload *download) -{ - GtkWidget *mainBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); - gtk_box_pack_start(GTK_BOX(download), mainBox, FALSE, FALSE, 0); - gtk_widget_show(mainBox); - - GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - gtk_box_pack_start(GTK_BOX(mainBox), vbox, TRUE, TRUE, 0); - gtk_widget_show(vbox); - - GtkWidget *statusBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_pack_start(GTK_BOX(vbox), statusBox, TRUE, TRUE, 0); - gtk_widget_show(statusBox); - - download->statusLabel = gtk_label_new("Starting Download"); - gtk_label_set_ellipsize(GTK_LABEL(download->statusLabel), PANGO_ELLIPSIZE_END); - gtk_misc_set_alignment(GTK_MISC(download->statusLabel), 0., 0.5); - gtk_box_pack_start(GTK_BOX(statusBox), download->statusLabel, TRUE, TRUE, 0); - gtk_widget_show(download->statusLabel); - - download->remainingLabel = gtk_label_new(NULL); - gtk_misc_set_alignment(GTK_MISC(download->remainingLabel), 1., 0.5); - gtk_box_pack_end(GTK_BOX(statusBox), download->remainingLabel, TRUE, TRUE, 0); - gtk_widget_show(download->remainingLabel); - - download->progressBar = gtk_progress_bar_new(); - gtk_box_pack_start(GTK_BOX(vbox), download->progressBar, FALSE, FALSE, 0); - gtk_widget_show(download->progressBar); - - download->actionButton = gtk_button_new_from_stock(GTK_STOCK_CANCEL); - g_signal_connect(download->actionButton, "clicked", G_CALLBACK(actionButtonClicked), download); - gtk_box_pack_end(GTK_BOX(mainBox), download->actionButton, FALSE, FALSE, 0); - gtk_widget_show(download->actionButton); -} - -static void browser_download_class_init(BrowserDownloadClass *klass) -{ - GObjectClass *objectClass = G_OBJECT_CLASS(klass); - - objectClass->finalize = browserDownloadFinalize; -} - -static void downloadReceivedResponse(WebKitDownload *download, GParamSpec *paramSpec, BrowserDownload *browserDownload) -{ - WebKitURIResponse *response = webkit_download_get_response(download); - browserDownload->contentLength = webkit_uri_response_get_content_length(response); - char *text = g_strdup_printf("Downloading %s", webkit_uri_response_get_uri(response)); - gtk_label_set_text(GTK_LABEL(browserDownload->statusLabel), text); - g_free(text); -} - -static gchar *remainingTime(BrowserDownload *browserDownload) -{ - guint64 total = browserDownload->contentLength; - guint64 current = browserDownload->downloadedSize; - gdouble elapsedTime = webkit_download_get_elapsed_time(browserDownload->download); - - if (current <= 0) - return NULL; - - gdouble perByteTime = elapsedTime / current; - gdouble interval = perByteTime * (total - current); - - int hours = (int) (interval / 3600); - interval -= hours * 3600; - int mins = (int) (interval / 60); - interval -= mins * 60; - int secs = (int) interval; - - if (hours > 0) { - if (mins > 0) - return g_strdup_printf (ngettext ("%u:%02u hour left", "%u:%02u hours left", hours), hours, mins); - return g_strdup_printf (ngettext ("%u hour left", "%u hours left", hours), hours); - } - - if (mins > 0) - return g_strdup_printf (ngettext ("%u:%02u minute left", "%u:%02u minutes left", mins), mins, secs); - return g_strdup_printf (ngettext ("%u second left", "%u seconds left", secs), secs); -} - -static void downloadProgress(WebKitDownload *download, GParamSpec *paramSpec, BrowserDownload *browserDownload) -{ - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browserDownload->progressBar), - webkit_download_get_estimated_progress(download)); - char *remaining = remainingTime(browserDownload); - gtk_label_set_text(GTK_LABEL(browserDownload->remainingLabel), remaining); - g_free(remaining); -} - -static void downloadReceivedData(WebKitDownload *download, guint64 dataLength, BrowserDownload *browserDownload) -{ - browserDownload->downloadedSize += dataLength; -} - -static void downloadFinished(WebKitDownload *download, BrowserDownload *browserDownload) -{ - gchar *text = g_strdup_printf("Download completed: %s", webkit_download_get_destination(download)); - gtk_label_set_text(GTK_LABEL(browserDownload->statusLabel), text); - g_free(text); - gtk_label_set_text(GTK_LABEL(browserDownload->remainingLabel), NULL); - gtk_button_set_image(GTK_BUTTON(browserDownload->actionButton), - gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON)); - gtk_button_set_label(GTK_BUTTON(browserDownload->actionButton), "Open ..."); - browserDownload->finished = TRUE; -} - -static void downloadFailed(WebKitDownload *download, GError *error, BrowserDownload *browserDownload) -{ - g_signal_handlers_disconnect_by_func(browserDownload->download, downloadFinished, browserDownload); - if (g_error_matches(error, WEBKIT_DOWNLOAD_ERROR, WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER)) { - gtk_widget_destroy(GTK_WIDGET(browserDownload)); - return; - } - - char *errorMessage = g_strdup_printf("Download failed: %s", error->message); - gtk_label_set_text(GTK_LABEL(browserDownload->statusLabel), errorMessage); - g_free(errorMessage); - gtk_label_set_text(GTK_LABEL(browserDownload->remainingLabel), NULL); - gtk_widget_set_sensitive(browserDownload->actionButton, FALSE); -} - -GtkWidget *browserDownloadNew(WebKitDownload *download) -{ - BrowserDownload *browserDownload = BROWSER_DOWNLOAD(g_object_new(BROWSER_TYPE_DOWNLOAD, - "orientation", GTK_ORIENTATION_VERTICAL, - NULL)); - - browserDownload->download = g_object_ref(download); - g_signal_connect(browserDownload->download, "notify::response", G_CALLBACK(downloadReceivedResponse), browserDownload); - g_signal_connect(browserDownload->download, "notify::estimated-progress", G_CALLBACK(downloadProgress), browserDownload); - g_signal_connect(browserDownload->download, "received-data", G_CALLBACK(downloadReceivedData), browserDownload); - g_signal_connect(browserDownload->download, "finished", G_CALLBACK(downloadFinished), browserDownload); - g_signal_connect(browserDownload->download, "failed", G_CALLBACK(downloadFailed), browserDownload); - - return GTK_WIDGET(browserDownload); -} - -void browser_downloads_bar_add_download(BrowserDownloadsBar *downloadsBar, WebKitDownload *download) -{ - GtkWidget *browserDownload = browserDownloadNew(download); - GtkWidget *contentBox = gtk_info_bar_get_content_area(GTK_INFO_BAR(downloadsBar)); - gtk_box_pack_start(GTK_BOX(contentBox), browserDownload, FALSE, TRUE, 0); - gtk_widget_show(browserDownload); -} diff --git a/Tools/MiniBrowser/gtk/BrowserDownloadsBar.h b/Tools/MiniBrowser/gtk/BrowserDownloadsBar.h deleted file mode 100644 index 1704a5d01..000000000 --- a/Tools/MiniBrowser/gtk/BrowserDownloadsBar.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BrowserDownloadsBar_h -#define BrowserDownloadsBar_h - -#include <gtk/gtk.h> -#include <webkit2/webkit2.h> - -G_BEGIN_DECLS - -#define BROWSER_TYPE_DOWNLOADS_BAR (browser_downloads_bar_get_type()) -#define BROWSER_DOWNLOADS_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BROWSER_TYPE_DOWNLOADS_BAR, BrowserDownloadsBar)) -#define BROWSER_IS_DOWNLOADS_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_TYPE_DOWNLOADS_BAR)) -#define BROWSER_DOWNLOADS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), BROWSER_TYPE_DOWNLOADS_BAR, BrowserDownloadsBarClass)) -#define BROWSER_IS_DOWNLOADS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_TYPE_DOWNLOADS_BAR)) -#define BROWSER_DOWNLOADS_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_TYPE_DOWNLOADS_BAR, BrowserDownloadsBarClass)) - -typedef struct _BrowserDownloadsBar BrowserDownloadsBar; -typedef struct _BrowserDownloadsBarClass BrowserDownloadsBarClass; - -GType browser_downloads_bar_get_type(void); - -GtkWidget *browser_downloads_bar_new(void); -void browser_downloads_bar_add_download(BrowserDownloadsBar *, WebKitDownload *); - -G_END_DECLS - -#endif diff --git a/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c b/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c deleted file mode 100644 index 1e4dcd804..000000000 --- a/Tools/MiniBrowser/gtk/BrowserSettingsDialog.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "BrowserSettingsDialog.h" -#include "BrowserCellRendererVariant.h" - -enum { - PROP_0, - - PROP_SETTINGS -}; - -enum { - SETTINGS_LIST_COLUMN_NAME, - SETTINGS_LIST_COLUMN_NICK, - SETTINGS_LIST_COLUMN_BLURB, - SETTINGS_LIST_COLUMN_VALUE, - SETTINGS_LIST_COLUMN_ADJUSTMENT, - - SETTINGS_LIST_N_COLUMNS -}; - -struct _BrowserSettingsDialog { - GtkDialog parent; - - GtkWidget *settingsList; - WebKitSettings *settings; -}; - -struct _BrowserSettingsDialogClass { - GtkDialogClass parent; -}; - -G_DEFINE_TYPE(BrowserSettingsDialog, browser_settings_dialog, GTK_TYPE_DIALOG) - -static void cellRendererChanged(GtkCellRenderer *renderer, const char *path, const GValue *value, BrowserSettingsDialog *dialog) -{ - GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(dialog->settingsList)); - GtkTreePath *treePath = gtk_tree_path_new_from_string(path); - GtkTreeIter iter; - gtk_tree_model_get_iter(model, &iter, treePath); - - char *name; - gtk_tree_model_get(model, &iter, SETTINGS_LIST_COLUMN_NAME, &name, -1); - g_object_set_property(G_OBJECT(dialog->settings), name, value); - g_free(name); - - gtk_list_store_set(GTK_LIST_STORE(model), &iter, SETTINGS_LIST_COLUMN_VALUE, value, -1); - gtk_tree_path_free(treePath); -} - -static void browserSettingsDialogSetProperty(GObject *object, guint propId, const GValue *value, GParamSpec *pspec) -{ - BrowserSettingsDialog *dialog = BROWSER_SETTINGS_DIALOG(object); - - switch (propId) { - case PROP_SETTINGS: - dialog->settings = g_value_get_object(value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec); - } -} - -static void browser_settings_dialog_init(BrowserSettingsDialog *dialog) -{ - GtkBox *contentArea = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))); - gtk_box_set_spacing(contentArea, 2); - - gtk_window_set_default_size(GTK_WINDOW(dialog), 400, 300); - gtk_window_set_title(GTK_WINDOW(dialog), "WebKit View Settings"); - gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); - gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); - gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); - gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE); - - GtkWidget *scrolledWindow = gtk_scrolled_window_new(NULL, NULL); - dialog->settingsList = gtk_tree_view_new(); - GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(dialog->settingsList), - 0, "Name", renderer, - "text", SETTINGS_LIST_COLUMN_NICK, - NULL); - renderer = browser_cell_renderer_variant_new(); - g_signal_connect(renderer, "changed", G_CALLBACK(cellRendererChanged), dialog); - gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(dialog->settingsList), - 1, "Value", renderer, - "value", SETTINGS_LIST_COLUMN_VALUE, - "adjustment", SETTINGS_LIST_COLUMN_ADJUSTMENT, - NULL); - gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(dialog->settingsList), SETTINGS_LIST_COLUMN_BLURB); - - gtk_container_add(GTK_CONTAINER(scrolledWindow), dialog->settingsList); - gtk_widget_show(dialog->settingsList); - - gtk_box_pack_start(contentArea, scrolledWindow, TRUE, TRUE, 0); - gtk_widget_show(scrolledWindow); - - g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); -} - -static void browserSettingsDialogConstructed(GObject *object) -{ - BrowserSettingsDialog *dialog = BROWSER_SETTINGS_DIALOG(object); - WebKitSettings *settings = dialog->settings; - GtkListStore *model = gtk_list_store_new(SETTINGS_LIST_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_VALUE, G_TYPE_OBJECT); - guint propertiesCount; - GParamSpec **properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(settings), &propertiesCount); - guint i; - for (i = 0; i < propertiesCount; i++) { - GParamSpec *property = properties[i]; - const char *name = g_param_spec_get_name(property); - const char *nick = g_param_spec_get_nick(property); - - GValue value = { 0, { { 0 } } }; - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(property)); - g_object_get_property(G_OBJECT(settings), name, &value); - - GtkAdjustment *adjustment = NULL; - if (G_PARAM_SPEC_VALUE_TYPE(property) == G_TYPE_UINT) { - GParamSpecUInt *uIntProperty = G_PARAM_SPEC_UINT(property); - adjustment = gtk_adjustment_new(uIntProperty->default_value, uIntProperty->minimum, - uIntProperty->maximum, 1, 1, 1); - } - - char *blurb = g_markup_escape_text(g_param_spec_get_blurb(property), -1); - GtkTreeIter iter; - gtk_list_store_append(model, &iter); - gtk_list_store_set(model, &iter, - SETTINGS_LIST_COLUMN_NAME, name, - SETTINGS_LIST_COLUMN_NICK, nick, - SETTINGS_LIST_COLUMN_BLURB, blurb, - SETTINGS_LIST_COLUMN_VALUE, &value, - SETTINGS_LIST_COLUMN_ADJUSTMENT, adjustment, - -1); - g_free(blurb); - g_value_unset(&value); - } - g_free(properties); - - gtk_tree_view_set_model(GTK_TREE_VIEW(dialog->settingsList), GTK_TREE_MODEL(model)); - g_object_unref(model); -} - -static void browser_settings_dialog_class_init(BrowserSettingsDialogClass *klass) -{ - GObjectClass *gobjectClass = G_OBJECT_CLASS(klass); - - gobjectClass->constructed = browserSettingsDialogConstructed; - gobjectClass->set_property = browserSettingsDialogSetProperty; - - g_object_class_install_property(gobjectClass, - PROP_SETTINGS, - g_param_spec_object("settings", - "Settings", - "The WebKitSettings", - WEBKIT_TYPE_SETTINGS, - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -} - -GtkWidget *browser_settings_dialog_new(WebKitSettings *settings) -{ - g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), NULL); - - return GTK_WIDGET(g_object_new(BROWSER_TYPE_SETTINGS_DIALOG, "settings", settings, NULL)); -} - diff --git a/Tools/MiniBrowser/gtk/BrowserSettingsDialog.h b/Tools/MiniBrowser/gtk/BrowserSettingsDialog.h deleted file mode 100644 index f3dbcd042..000000000 --- a/Tools/MiniBrowser/gtk/BrowserSettingsDialog.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BrowserSettingsDialog_h -#define BrowserSettingsDialog_h - -#include <gtk/gtk.h> -#include <webkit2/webkit2.h> - -G_BEGIN_DECLS - -#define BROWSER_TYPE_SETTINGS_DIALOG (browser_settings_dialog_get_type()) -#define BROWSER_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BROWSER_TYPE_SETTINGS_DIALOG, BrowserSettingsDialog)) -#define BROWSER_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), BROWSER_TYPE_SETTINGS_DIALOG, BrowserSettingsDialogClass)) -#define BROWSER_IS_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_TYPE_SETTINGS_DIALOG)) -#define BROWSER_IS_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_TYPE_SETTINGS_DIALOG)) -#define BROWSER_SETTINGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_TYPE_SETTINGS_DIALOG, BrowserSettingsDialogClass)) - -typedef struct _BrowserSettingsDialog BrowserSettingsDialog; -typedef struct _BrowserSettingsDialogClass BrowserSettingsDialogClass; - -GType browser_settings_dialog_get_type(void); - -GtkWidget* browser_settings_dialog_new(WebKitSettings *settings); - -G_END_DECLS - -#endif diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c deleted file mode 100644 index c95f49c98..000000000 --- a/Tools/MiniBrowser/gtk/BrowserWindow.c +++ /dev/null @@ -1,685 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple Inc. - * Copyright (C) 2007 Alp Toker <alp@atoker.com> - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "BrowserWindow.h" - -#include "BrowserDownloadsBar.h" -#include "BrowserSettingsDialog.h" -#include <gdk/gdkkeysyms.h> -#include <string.h> - -enum { - PROP_0, - - PROP_VIEW -}; - -struct _BrowserWindow { - GtkWindow parent; - - GtkWidget *mainBox; - GtkWidget *toolbar; - GtkWidget *uriEntry; - GtkWidget *backItem; - GtkWidget *forwardItem; - GtkWidget *zoomInItem; - GtkWidget *zoomOutItem; - GtkWidget *statusLabel; - GtkWidget *settingsDialog; - WebKitWebView *webView; - GtkWidget *downloadsBar; - GdkPixbuf *favicon; - GtkWidget *fullScreenMessageLabel; - guint fullScreenMessageLabelId; -}; - -struct _BrowserWindowClass { - GtkWindowClass parent; -}; - -static const char *defaultWindowTitle = "WebKitGTK+ MiniBrowser"; -static const char *miniBrowserAboutScheme = "minibrowser-about"; -static const gdouble minimumZoomLevel = 0.5; -static const gdouble maximumZoomLevel = 3; -static const gdouble zoomStep = 1.2; -static gint windowCount = 0; - -G_DEFINE_TYPE(BrowserWindow, browser_window, GTK_TYPE_WINDOW) - -static char *getInternalURI(const char *uri) -{ - // Internally we use minibrowser-about: as about: prefix is ignored by WebKit. - if (g_str_has_prefix(uri, "about:") && !g_str_equal(uri, "about:blank")) - return g_strconcat(miniBrowserAboutScheme, uri + strlen ("about"), NULL); - - return g_strdup(uri); -} - -static char *getExternalURI(const char *uri) -{ - // From the user point of view we support about: prefix. - if (g_str_has_prefix(uri, miniBrowserAboutScheme)) - return g_strconcat("about", uri + strlen(miniBrowserAboutScheme), NULL); - - return g_strdup(uri); -} - -static void browserWindowSetStatusText(BrowserWindow *window, const char *text) -{ - gtk_label_set_text(GTK_LABEL(window->statusLabel), text); - gtk_widget_set_visible(window->statusLabel, !!text); -} - -static void resetStatusText(GtkWidget *widget, BrowserWindow *window) -{ - browserWindowSetStatusText(window, NULL); -} - -static void activateUriEntryCallback(BrowserWindow *window) -{ - browser_window_load_uri(window, gtk_entry_get_text(GTK_ENTRY(window->uriEntry))); -} - -static void reloadCallback(BrowserWindow *window) -{ - webkit_web_view_reload(window->webView); -} - -static void goBackCallback(BrowserWindow *window) -{ - webkit_web_view_go_back(window->webView); -} - -static void goForwardCallback(BrowserWindow *window) -{ - webkit_web_view_go_forward(window->webView); -} - -static void settingsCallback(BrowserWindow *window) -{ - if (window->settingsDialog) { - gtk_window_present(GTK_WINDOW(window->settingsDialog)); - return; - } - - window->settingsDialog = browser_settings_dialog_new(webkit_web_view_get_settings(window->webView)); - gtk_window_set_transient_for(GTK_WINDOW(window->settingsDialog), GTK_WINDOW(window)); - g_object_add_weak_pointer(G_OBJECT(window->settingsDialog), (gpointer *)&window->settingsDialog); - gtk_widget_show(window->settingsDialog); -} - -static void webViewURIChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window) -{ - char *externalURI = getExternalURI(webkit_web_view_get_uri(webView)); - gtk_entry_set_text(GTK_ENTRY(window->uriEntry), externalURI); - g_free(externalURI); -} - -static void webViewTitleChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window) -{ - const char *title = webkit_web_view_get_title(webView); - gtk_window_set_title(GTK_WINDOW(window), title ? title : defaultWindowTitle); -} - -static gboolean resetEntryProgress(GtkEntry *entry) -{ - gtk_entry_set_progress_fraction(entry, 0); - return FALSE; -} - -static void webViewLoadProgressChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window) -{ - gdouble progress = webkit_web_view_get_estimated_load_progress(webView); - gtk_entry_set_progress_fraction(GTK_ENTRY(window->uriEntry), progress); - if (progress == 1.0) - g_timeout_add(500, (GSourceFunc)resetEntryProgress, window->uriEntry); -} - -static void downloadStarted(WebKitWebContext *webContext, WebKitDownload *download, BrowserWindow *window) -{ - if (!window->downloadsBar) { - window->downloadsBar = browser_downloads_bar_new(); - gtk_box_pack_start(GTK_BOX(window->mainBox), window->downloadsBar, FALSE, FALSE, 0); - gtk_box_reorder_child(GTK_BOX(window->mainBox), window->downloadsBar, 0); - g_object_add_weak_pointer(G_OBJECT(window->downloadsBar), (gpointer *)&(window->downloadsBar)); - gtk_widget_show(window->downloadsBar); - } - browser_downloads_bar_add_download(BROWSER_DOWNLOADS_BAR(window->downloadsBar), download); -} - -static void browserWindowHistoryItemSelected(BrowserWindow *window, GtkMenuItem *item) -{ - GtkAction *action = gtk_activatable_get_related_action(GTK_ACTIVATABLE(item)); - browserWindowSetStatusText(window, action ? gtk_action_get_name(action) : NULL); -} - -static void browserWindowHistoryItemActivated(BrowserWindow *window, GtkAction *action) -{ - WebKitBackForwardListItem *item = g_object_get_data(G_OBJECT(action), "back-forward-list-item"); - if (!item) - return; - - webkit_web_view_go_to_back_forward_list_item(window->webView, item); -} - -static GtkWidget *browserWindowCreateBackForwardMenu(BrowserWindow *window, GList *list) -{ - if (!list) - return NULL; - - GtkWidget *menu = gtk_menu_new(); - GList *listItem; - for (listItem = list; listItem; listItem = g_list_next(listItem)) { - WebKitBackForwardListItem *item = (WebKitBackForwardListItem *)listItem->data; - const char *uri = webkit_back_forward_list_item_get_uri(item); - const char *title = webkit_back_forward_list_item_get_title(item); - - GtkAction *action = gtk_action_new(uri, title, NULL, NULL); - g_object_set_data_full(G_OBJECT(action), "back-forward-list-item", g_object_ref(item), g_object_unref); - g_signal_connect_swapped(action, "activate", G_CALLBACK(browserWindowHistoryItemActivated), window); - - GtkWidget *menuItem = gtk_action_create_menu_item(action); - g_signal_connect_swapped(menuItem, "select", G_CALLBACK(browserWindowHistoryItemSelected), window); - g_object_unref(action); - - gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), menuItem); - gtk_widget_show(menuItem); - } - - g_signal_connect(menu, "hide", G_CALLBACK(resetStatusText), window); - - return menu; -} - -static void browserWindowUpdateNavigationActions(BrowserWindow *window, WebKitBackForwardList *backForwadlist) -{ - gtk_widget_set_sensitive(window->backItem, webkit_web_view_can_go_back(window->webView)); - gtk_widget_set_sensitive(window->forwardItem, webkit_web_view_can_go_forward(window->webView)); - - GList *list = webkit_back_forward_list_get_back_list_with_limit(backForwadlist, 10); - gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(window->backItem), - browserWindowCreateBackForwardMenu(window, list)); - g_list_free(list); - - list = webkit_back_forward_list_get_forward_list_with_limit(backForwadlist, 10); - gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(window->forwardItem), - browserWindowCreateBackForwardMenu(window, list)); - g_list_free(list); -} - -static void backForwadlistChanged(WebKitBackForwardList *backForwadlist, WebKitBackForwardListItem *itemAdded, GList *itemsRemoved, BrowserWindow *window) -{ - browserWindowUpdateNavigationActions(window, backForwadlist); -} - -static void geolocationRequestDialogCallback(GtkDialog *dialog, gint response, WebKitPermissionRequest *request) -{ - switch (response) { - case GTK_RESPONSE_YES: - webkit_permission_request_allow(request); - break; - default: - webkit_permission_request_deny(request); - break; - } - - gtk_widget_destroy(GTK_WIDGET(dialog)); - g_object_unref(request); -} - -static void webViewClose(WebKitWebView *webView, BrowserWindow *window) -{ - gtk_widget_destroy(GTK_WIDGET(window)); -} - -static void webViewRunAsModal(WebKitWebView *webView, BrowserWindow *window) -{ - gtk_window_set_modal(GTK_WINDOW(window), TRUE); -} - -static void webViewReadyToShow(WebKitWebView *webView, BrowserWindow *window) -{ - WebKitWindowProperties *windowProperties = webkit_web_view_get_window_properties(webView); - - GdkRectangle geometry; - webkit_window_properties_get_geometry(windowProperties, &geometry); - if (geometry.x >= 0 && geometry.y >= 0) - gtk_window_move(GTK_WINDOW(window), geometry.x, geometry.y); - if (geometry.width > 0 && geometry.height > 0) - gtk_window_resize(GTK_WINDOW(window), geometry.width, geometry.height); - - if (!webkit_window_properties_get_toolbar_visible(windowProperties)) - gtk_widget_hide(window->toolbar); - else if (!webkit_window_properties_get_locationbar_visible(windowProperties)) - gtk_widget_hide(window->uriEntry); - - if (!webkit_window_properties_get_resizable(windowProperties)) - gtk_window_set_resizable(GTK_WINDOW(window), FALSE); - - gtk_widget_show(GTK_WIDGET(window)); -} - -static gboolean fullScreenMessageTimeoutCallback(BrowserWindow *window) -{ - gtk_widget_hide(window->fullScreenMessageLabel); - window->fullScreenMessageLabelId = 0; - return FALSE; -} - -static gboolean webViewEnterFullScreen(WebKitWebView *webView, BrowserWindow *window) -{ - gchar *titleOrURI = g_strdup(webkit_web_view_get_title(window->webView)); - if (!titleOrURI) - titleOrURI = getExternalURI(webkit_web_view_get_uri(window->webView)); - gchar *message = g_strdup_printf("%s is now full screen. Press ESC or f to exit.", titleOrURI); - gtk_label_set_text(GTK_LABEL(window->fullScreenMessageLabel), message); - g_free(titleOrURI); - g_free(message); - - gtk_widget_show(window->fullScreenMessageLabel); - - window->fullScreenMessageLabelId = g_timeout_add_seconds(2, (GSourceFunc)fullScreenMessageTimeoutCallback, window); - gtk_widget_hide(window->toolbar); - - return FALSE; -} - -static gboolean webViewLeaveFullScreen(WebKitWebView *webView, BrowserWindow *window) -{ - if (window->fullScreenMessageLabelId) { - g_source_remove(window->fullScreenMessageLabelId); - window->fullScreenMessageLabelId = 0; - } - gtk_widget_hide(window->fullScreenMessageLabel); - gtk_widget_show(window->toolbar); - - return FALSE; -} - -static GtkWidget *webViewCreate(WebKitWebView *webView, BrowserWindow *window) -{ - WebKitWebView *newWebView = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(webkit_web_view_get_context(webView))); - webkit_web_view_set_settings(newWebView, webkit_web_view_get_settings(webView)); - - GtkWidget *newWindow = browser_window_new(newWebView, GTK_WINDOW(window)); - g_signal_connect(newWebView, "ready-to-show", G_CALLBACK(webViewReadyToShow), newWindow); - g_signal_connect(newWebView, "run-as-modal", G_CALLBACK(webViewRunAsModal), newWindow); - g_signal_connect(newWebView, "close", G_CALLBACK(webViewClose), newWindow); - return GTK_WIDGET(newWebView); -} - -static gboolean webViewLoadFailed(WebKitWebView *webView, WebKitLoadEvent loadEvent, const char *failingURI, GError *error, BrowserWindow *window) -{ - gtk_entry_set_progress_fraction(GTK_ENTRY(window->uriEntry), 0.); - return FALSE; -} - -static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision *decision, WebKitPolicyDecisionType decisionType, BrowserWindow *window) -{ - switch (decisionType) { - case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: { - WebKitNavigationPolicyDecision *navigationDecision = WEBKIT_NAVIGATION_POLICY_DECISION(decision); - if (webkit_navigation_policy_decision_get_navigation_type(navigationDecision) != WEBKIT_NAVIGATION_TYPE_LINK_CLICKED - || webkit_navigation_policy_decision_get_mouse_button(navigationDecision) != GDK_BUTTON_MIDDLE) - return FALSE; - - // Opening a new window if link clicked with the middle button. - WebKitWebView *newWebView = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(webkit_web_view_get_context(webView))); - GtkWidget *newWindow = browser_window_new(newWebView, GTK_WINDOW(window)); - webkit_web_view_load_request(newWebView, webkit_navigation_policy_decision_get_request(navigationDecision)); - gtk_widget_show(newWindow); - - webkit_policy_decision_ignore(decision); - return TRUE; - } - case WEBKIT_POLICY_DECISION_TYPE_RESPONSE: { - WebKitResponsePolicyDecision *responseDecision = WEBKIT_RESPONSE_POLICY_DECISION(decision); - WebKitURIResponse *response = webkit_response_policy_decision_get_response(responseDecision); - const char *mimeType = webkit_uri_response_get_mime_type(response); - - if (webkit_web_view_can_show_mime_type(webView, mimeType)) - return FALSE; - - WebKitWebResource *mainResource = webkit_web_view_get_main_resource(webView); - WebKitURIRequest *request = webkit_response_policy_decision_get_request(responseDecision); - const char *requestURI = webkit_uri_request_get_uri(request); - if (g_strcmp0(webkit_web_resource_get_uri(mainResource), requestURI)) - return FALSE; - - webkit_policy_decision_download(decision); - return TRUE; - } - case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: - default: - return FALSE; - } -} - -static gboolean webViewDecidePermissionRequest(WebKitWebView *webView, WebKitPermissionRequest *request, BrowserWindow *window) -{ - if (!WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST(request)) - return FALSE; - - GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - "Geolocation request"); - - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "Allow geolocation request?"); - g_signal_connect(dialog, "response", G_CALLBACK(geolocationRequestDialogCallback), g_object_ref(request)); - gtk_widget_show(dialog); - - return TRUE; -} - -static void webViewMouseTargetChanged(WebKitWebView *webView, WebKitHitTestResult *hitTestResult, guint mouseModifiers, BrowserWindow *window) -{ - if (!webkit_hit_test_result_context_is_link(hitTestResult)) { - browserWindowSetStatusText(window, NULL); - return; - } - browserWindowSetStatusText(window, webkit_hit_test_result_get_link_uri(hitTestResult)); -} - -static gboolean browserWindowCanZoomIn(BrowserWindow *window) -{ - gdouble zoomLevel = webkit_web_view_get_zoom_level(window->webView) * zoomStep; - return zoomLevel < maximumZoomLevel; -} - -static gboolean browserWindowCanZoomOut(BrowserWindow *window) -{ - gdouble zoomLevel = webkit_web_view_get_zoom_level(window->webView) / zoomStep; - return zoomLevel > minimumZoomLevel; -} - -static void browserWindowUpdateZoomActions(BrowserWindow *window) -{ - gtk_widget_set_sensitive(window->zoomInItem, browserWindowCanZoomIn(window)); - gtk_widget_set_sensitive(window->zoomOutItem, browserWindowCanZoomOut(window)); -} - -static void webViewZoomLevelChanged(GObject *object, GParamSpec *paramSpec, BrowserWindow *window) -{ - browserWindowUpdateZoomActions(window); -} - -static void updateUriEntryIcon(BrowserWindow *window) -{ - GtkEntry *entry = GTK_ENTRY(window->uriEntry); - if (window->favicon) - gtk_entry_set_icon_from_pixbuf(entry, GTK_ENTRY_ICON_PRIMARY, window->favicon); - else - gtk_entry_set_icon_from_stock(entry, GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_NEW); -} - -static void faviconChanged(GObject *object, GParamSpec *paramSpec, BrowserWindow *window) -{ - GdkPixbuf *favicon = NULL; - cairo_surface_t *surface = webkit_web_view_get_favicon(window->webView); - - if (surface) { - int width = cairo_image_surface_get_width(surface); - int height = cairo_image_surface_get_height(surface); - favicon = gdk_pixbuf_get_from_surface(surface, 0, 0, width, height); - } - - if (window->favicon) - g_object_unref(window->favicon); - window->favicon = favicon; - - updateUriEntryIcon(window); -} - -static void zoomInCallback(BrowserWindow *window) -{ - gdouble zoomLevel = webkit_web_view_get_zoom_level(window->webView) * zoomStep; - webkit_web_view_set_zoom_level(window->webView, zoomLevel); -} - -static void zoomOutCallback(BrowserWindow *window) -{ - gdouble zoomLevel = webkit_web_view_get_zoom_level(window->webView) / zoomStep; - webkit_web_view_set_zoom_level(window->webView, zoomLevel); -} - -static void browserWindowFinalize(GObject *gObject) -{ - BrowserWindow *window = BROWSER_WINDOW(gObject); - if (window->favicon) { - g_object_unref(window->favicon); - window->favicon = NULL; - } - - if (window->fullScreenMessageLabelId) - g_source_remove(window->fullScreenMessageLabelId); - - G_OBJECT_CLASS(browser_window_parent_class)->finalize(gObject); - - if (g_atomic_int_dec_and_test(&windowCount)) - gtk_main_quit(); -} - -static void browserWindowGetProperty(GObject *object, guint propId, GValue *value, GParamSpec *pspec) -{ - BrowserWindow *window = BROWSER_WINDOW(object); - - switch (propId) { - case PROP_VIEW: - g_value_set_object(value, browser_window_get_view(window)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec); - } -} - -static void browserWindowSetProperty(GObject *object, guint propId, const GValue *value, GParamSpec *pspec) -{ - BrowserWindow* window = BROWSER_WINDOW(object); - - switch (propId) { - case PROP_VIEW: - window->webView = g_value_get_object(value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec); - } -} - -static void browser_window_init(BrowserWindow *window) -{ - g_atomic_int_inc(&windowCount); - - gtk_window_set_title(GTK_WINDOW(window), defaultWindowTitle); - gtk_window_set_default_size(GTK_WINDOW(window), 800, 600); - - window->uriEntry = gtk_entry_new(); - g_signal_connect_swapped(window->uriEntry, "activate", G_CALLBACK(activateUriEntryCallback), (gpointer)window); - gtk_entry_set_icon_activatable(GTK_ENTRY(window->uriEntry), GTK_ENTRY_ICON_PRIMARY, FALSE); - updateUriEntryIcon(window); - - /* Keyboard accelerators */ - GtkAccelGroup *accelGroup = gtk_accel_group_new(); - gtk_window_add_accel_group(GTK_WINDOW(window), accelGroup); - g_object_unref(accelGroup); - - GtkWidget *toolbar = gtk_toolbar_new(); - window->toolbar = toolbar; - gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL); - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ); - - GtkToolItem *item = gtk_menu_tool_button_new_from_stock(GTK_STOCK_GO_BACK); - window->backItem = GTK_WIDGET(item); - gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(item), 0); - g_signal_connect_swapped(item, "clicked", G_CALLBACK(goBackCallback), (gpointer)window); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_show(GTK_WIDGET(item)); - - item = gtk_menu_tool_button_new_from_stock(GTK_STOCK_GO_FORWARD); - window->forwardItem = GTK_WIDGET(item); - gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(item), 0); - g_signal_connect_swapped(G_OBJECT(item), "clicked", G_CALLBACK(goForwardCallback), (gpointer)window); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_show(GTK_WIDGET(item)); - - item = gtk_tool_button_new_from_stock(GTK_STOCK_PREFERENCES); - g_signal_connect_swapped(G_OBJECT(item), "clicked", G_CALLBACK(settingsCallback), window); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_show(GTK_WIDGET(item)); - - item = gtk_tool_button_new_from_stock(GTK_STOCK_ZOOM_OUT); - window->zoomOutItem = GTK_WIDGET(item); - g_signal_connect_swapped(item, "clicked", G_CALLBACK(zoomOutCallback), window); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_show(GTK_WIDGET(item)); - - item = gtk_tool_button_new_from_stock(GTK_STOCK_ZOOM_IN); - window->zoomInItem = GTK_WIDGET(item); - g_signal_connect_swapped(item, "clicked", G_CALLBACK(zoomInCallback), window); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_show(GTK_WIDGET(item)); - - item = gtk_tool_item_new(); - gtk_tool_item_set_expand(item, TRUE); - gtk_container_add(GTK_CONTAINER(item), window->uriEntry); - gtk_widget_show(window->uriEntry); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_show(GTK_WIDGET(item)); - - item = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH); - g_signal_connect_swapped(item, "clicked", G_CALLBACK(reloadCallback), window); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1); - gtk_widget_add_accelerator(GTK_WIDGET(item), "clicked", accelGroup, GDK_KEY_F5, 0, GTK_ACCEL_VISIBLE); - gtk_widget_show(GTK_WIDGET(item)); - - GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - window->mainBox = vbox; - gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); - gtk_widget_show(toolbar); - - gtk_container_add(GTK_CONTAINER(window), vbox); - gtk_widget_show(vbox); -} - -static void browserWindowConstructed(GObject *gObject) -{ - BrowserWindow *window = BROWSER_WINDOW(gObject); - - browserWindowUpdateZoomActions(window); - - g_signal_connect(window->webView, "notify::uri", G_CALLBACK(webViewURIChanged), window); - g_signal_connect(window->webView, "notify::estimated-load-progress", G_CALLBACK(webViewLoadProgressChanged), window); - g_signal_connect(window->webView, "notify::title", G_CALLBACK(webViewTitleChanged), window); - g_signal_connect(window->webView, "create", G_CALLBACK(webViewCreate), window); - g_signal_connect(window->webView, "load-failed", G_CALLBACK(webViewLoadFailed), window); - g_signal_connect(window->webView, "decide-policy", G_CALLBACK(webViewDecidePolicy), window); - g_signal_connect(window->webView, "permission-request", G_CALLBACK(webViewDecidePermissionRequest), window); - g_signal_connect(window->webView, "mouse-target-changed", G_CALLBACK(webViewMouseTargetChanged), window); - g_signal_connect(window->webView, "notify::zoom-level", G_CALLBACK(webViewZoomLevelChanged), window); - g_signal_connect(window->webView, "notify::favicon", G_CALLBACK(faviconChanged), window); - g_signal_connect(window->webView, "enter-fullscreen", G_CALLBACK(webViewEnterFullScreen), window); - g_signal_connect(window->webView, "leave-fullscreen", G_CALLBACK(webViewLeaveFullScreen), window); - - g_signal_connect(webkit_web_view_get_context(window->webView), "download-started", G_CALLBACK(downloadStarted), window); - - WebKitBackForwardList *backForwadlist = webkit_web_view_get_back_forward_list(window->webView); - g_signal_connect(backForwadlist, "changed", G_CALLBACK(backForwadlistChanged), window); - - GtkWidget *overlay = gtk_overlay_new(); - gtk_box_pack_start(GTK_BOX(window->mainBox), overlay, TRUE, TRUE, 0); - gtk_widget_show(overlay); - - window->statusLabel = gtk_label_new(NULL); - gtk_widget_set_halign(window->statusLabel, GTK_ALIGN_START); - gtk_widget_set_valign(window->statusLabel, GTK_ALIGN_END); - gtk_widget_set_margin_left(window->statusLabel, 1); - gtk_widget_set_margin_right(window->statusLabel, 1); - gtk_widget_set_margin_top(window->statusLabel, 1); - gtk_widget_set_margin_bottom(window->statusLabel, 1); - gtk_overlay_add_overlay(GTK_OVERLAY(overlay), window->statusLabel); - - gtk_container_add(GTK_CONTAINER(overlay), GTK_WIDGET(window->webView)); - - window->fullScreenMessageLabel = gtk_label_new(NULL); - gtk_widget_set_halign(window->fullScreenMessageLabel, GTK_ALIGN_CENTER); - gtk_widget_set_valign(window->fullScreenMessageLabel, GTK_ALIGN_CENTER); - gtk_widget_set_no_show_all(window->fullScreenMessageLabel, TRUE); - gtk_overlay_add_overlay(GTK_OVERLAY(overlay), window->fullScreenMessageLabel); - gtk_widget_show(GTK_WIDGET(window->webView)); -} - -static void browser_window_class_init(BrowserWindowClass *klass) -{ - GObjectClass *gobjectClass = G_OBJECT_CLASS(klass); - - gobjectClass->constructed = browserWindowConstructed; - gobjectClass->get_property = browserWindowGetProperty; - gobjectClass->set_property = browserWindowSetProperty; - gobjectClass->finalize = browserWindowFinalize; - - g_object_class_install_property(gobjectClass, - PROP_VIEW, - g_param_spec_object("view", - "View", - "The web view of this window", - WEBKIT_TYPE_WEB_VIEW, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); -} - -// Public API. -GtkWidget *browser_window_new(WebKitWebView *view, GtkWindow *parent) -{ - g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(view), 0); - - return GTK_WIDGET(g_object_new(BROWSER_TYPE_WINDOW, - "transient-for", parent, - "type", GTK_WINDOW_TOPLEVEL, - "view", view, NULL)); -} - -WebKitWebView *browser_window_get_view(BrowserWindow *window) -{ - g_return_val_if_fail(BROWSER_IS_WINDOW(window), 0); - - return window->webView; -} - -void browser_window_load_uri(BrowserWindow *window, const char *uri) -{ - g_return_if_fail(BROWSER_IS_WINDOW(window)); - g_return_if_fail(uri); - - if (!g_str_has_prefix(uri, "javascript:")) { - char *internalURI = getInternalURI(uri); - webkit_web_view_load_uri(window->webView, internalURI); - g_free(internalURI); - return; - } - - webkit_web_view_run_javascript(window->webView, strstr(uri, "javascript:"), NULL, NULL, NULL); -} diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.h b/Tools/MiniBrowser/gtk/BrowserWindow.h deleted file mode 100644 index 66675462f..000000000 --- a/Tools/MiniBrowser/gtk/BrowserWindow.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BrowserWindow_h -#define BrowserWindow_h - -#include <webkit2/webkit2.h> -#include <gtk/gtk.h> - -G_BEGIN_DECLS - -#define BROWSER_TYPE_WINDOW (browser_window_get_type()) -#define BROWSER_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BROWSER_TYPE_WINDOW, BrowserWindow)) -#define BROWSER_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), BROWSER_TYPE_WINDOW, BrowserWindowClass)) -#define BROWSER_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_TYPE_WINDOW)) -#define BROWSER_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_TYPE_WINDOW)) -#define BROWSER_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_TYPE_WINDOW, BrowserWindowClass)) - -typedef struct _BrowserWindow BrowserWindow; -typedef struct _BrowserWindowClass BrowserWindowClass; - -GType browser_window_get_type(void); - -GtkWidget* browser_window_new(WebKitWebView*, GtkWindow*); -WebKitWebView* browser_window_get_view(BrowserWindow*); -void browser_window_load_uri(BrowserWindow *, const char *uri); - -G_END_DECLS - -#endif diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt deleted file mode 100644 index 14fd82f3f..000000000 --- a/Tools/MiniBrowser/gtk/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -set(MINIBROWSER_DIR "${TOOLS_DIR}/MiniBrowser/gtk") -set(DERIVED_SOURCES_MINIBROWSER_DIR "${CMAKE_BINARY_DIR}/DerivedSources/MiniBrowser") - -file(MAKE_DIRECTORY ${DERIVED_SOURCES_MINIBROWSER_DIR}) - -set(MiniBrowser_SOURCES - ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c - ${MINIBROWSER_DIR}/BrowserCellRendererVariant.h - ${MINIBROWSER_DIR}/BrowserCellRendererVariant.c - ${MINIBROWSER_DIR}/BrowserDownloadsBar.h - ${MINIBROWSER_DIR}/BrowserDownloadsBar.c - ${MINIBROWSER_DIR}/BrowserSettingsDialog.h - ${MINIBROWSER_DIR}/BrowserSettingsDialog.c - ${MINIBROWSER_DIR}/BrowserWindow.h - ${MINIBROWSER_DIR}/BrowserWindow.c - ${MINIBROWSER_DIR}/main.c -) - -set(MiniBrowser_INCLUDE_DIRECTORIES - ${DERIVED_SOURCES_MINIBROWSER_DIR} - ${DERIVED_SOURCES_DIR}/webkit2gtk - ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk - ${DERIVED_SOURCES_DIR}/ForwardingHeaders - ${CMAKE_SOURCE_DIR}/Source - ${GTK3_INCLUDE_DIRS} - ${GLIB_INCLUDE_DIRS} - ${LIBSOUP_INCLUDE_DIRS} -) - -set(MiniBrowser_LIBRARIES - ${JavaScriptCore_LIBRARY_NAME} - WebKit2 - ${GTK3_LIBRARIES} - ${GLIB_LIBRARIES} -) - -add_custom_command( - OUTPUT ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c - ${DERIVED_SOURCES_MINIBROWSER_DIR}/Browsermarshal.h - MAIN_DEPENDENCY ${MINIBROWSER_DIR}/browser-marshal.list - COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --body > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c - COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --header > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.h - VERBATIM) - -add_definitions(-DWEBKIT_EXEC_PATH="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") -add_definitions(-DWEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") - -include_directories(${MiniBrowser_INCLUDE_DIRECTORIES}) -add_executable(MiniBrowser ${MiniBrowser_SOURCES}) -target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES}) -set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools") diff --git a/Tools/MiniBrowser/gtk/GNUmakefile.am b/Tools/MiniBrowser/gtk/GNUmakefile.am deleted file mode 100644 index f42a30b79..000000000 --- a/Tools/MiniBrowser/gtk/GNUmakefile.am +++ /dev/null @@ -1,73 +0,0 @@ -if ENABLE_WEBKIT2 -noinst_PROGRAMS += \ - Programs/MiniBrowser -endif - -Programs_MiniBrowser_CPPFLAGS = \ - -I$(srcdir)/Source \ - -I$(top_builddir)/DerivedSources/WebKit2 \ - -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \ - -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \ - -DWEBKIT_EXEC_PATH=\"${shell pwd}/$(top_builddir)/Programs/\" \ - -DWEBKIT_INJECTED_BUNDLE_PATH=\"${shell pwd}/$(top_builddir)/.libs\" \ - $(global_cppflags) \ - $(javascriptcore_cppflags) \ - $(FREETYPE_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(LIBSOUP_CFLAGS) - -Programs_MiniBrowser_SOURCES = \ - Tools/MiniBrowser/gtk/BrowserCellRendererVariant.h \ - Tools/MiniBrowser/gtk/BrowserCellRendererVariant.c \ - Tools/MiniBrowser/gtk/BrowserDownloadsBar.h \ - Tools/MiniBrowser/gtk/BrowserDownloadsBar.c \ - Tools/MiniBrowser/gtk/BrowserSettingsDialog.h \ - Tools/MiniBrowser/gtk/BrowserSettingsDialog.c \ - Tools/MiniBrowser/gtk/BrowserWindow.h \ - Tools/MiniBrowser/gtk/BrowserWindow.c \ - Tools/MiniBrowser/gtk/main.c - -minibrowser_built_sources += \ - DerivedSources/WebKit2/BrowserMarshal.h \ - DerivedSources/WebKit2/BrowserMarshal.c -nodist_Programs_MiniBrowser_SOURCES = \ - $(minibrowser_built_sources) - -Programs_MiniBrowser_LDADD = \ - libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ - $(FREETYPE_LIBS) \ - $(GLIB_LIBS) \ - $(GTK_LIBS) \ - $(LIBSOUP_LIBS) - -Programs_MiniBrowser_LDFLAGS = \ - -no-fast-install \ - -no-install - -CLEANFILES += \ - $(top_builddir)/Programs/MiniBrowser \ - $(minibrowser_built_sources) \ - $(top_builddir)/stamp-mini-browser-marshal.h \ - $(top_builddir)/stamp-mini-browser-marshal.c - -BUILT_SOURCES += $(minibrowser_built_sources) - -minibrowser_marshal_list = $(srcdir)/Tools/MiniBrowser/gtk/browser-marshal.list - -$(GENSOURCES_WEBKIT2)/BrowserMarshal.h: stamp-mini-browser-marshal.h - @true -$(GENSOURCES_WEBKIT2)/BrowserMarshal.c: stamp-mini-browser-marshal.c - @true - -stamp-mini-browser-marshal.c: $(minibrowser_marshal_list) - $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=browser_marshal $(minibrowser_marshal_list) --body > $(GENSOURCES_WEBKIT2)/BrowserMarshal.c && \ - echo timestamp > $(@F) - -stamp-mini-browser-marshal.h: $(MiniBrowser_marshal_list) - $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=browser_marshal $(minibrowser_marshal_list) --header > $(GENSOURCES_WEBKIT2)/BrowserMarshal.h && \ - echo timestamp > $(@F) - -EXTRA_DIST += \ - $(srcdir)/Tools/MiniBrowser/gtk/browser-marshal.list - diff --git a/Tools/MiniBrowser/gtk/browser-marshal.list b/Tools/MiniBrowser/gtk/browser-marshal.list deleted file mode 100644 index e72aa4bc3..000000000 --- a/Tools/MiniBrowser/gtk/browser-marshal.list +++ /dev/null @@ -1 +0,0 @@ -VOID:STRING,BOXED diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c deleted file mode 100644 index 4592d76bb..000000000 --- a/Tools/MiniBrowser/gtk/main.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple Inc. - * Copyright (C) 2007 Alp Toker <alp@atoker.com> - * Copyright (C) 2011 Igalia S.L. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "BrowserWindow.h" -#include <errno.h> -#include <gtk/gtk.h> -#include <string.h> -#include <webkit2/webkit2.h> - -#define MINI_BROWSER_ERROR (miniBrowserErrorQuark()) - -static const gchar **uriArguments = NULL; -static const char *miniBrowserAboutScheme = "minibrowser-about"; - -typedef enum { - MINI_BROWSER_ERROR_INVALID_ABOUT_PATH -} MiniBrowserError; - -static GQuark miniBrowserErrorQuark() -{ - return g_quark_from_string("minibrowser-quark"); -} - -static gchar *argumentToURL(const char *filename) -{ - GFile *gfile = g_file_new_for_commandline_arg(filename); - gchar *fileURL = g_file_get_uri(gfile); - g_object_unref(gfile); - - return fileURL; -} - -static void createBrowserWindow(const gchar *uri, WebKitSettings *webkitSettings) -{ - GtkWidget *webView = webkit_web_view_new(); - GtkWidget *mainWindow = browser_window_new(WEBKIT_WEB_VIEW(webView), NULL); - gchar *url = argumentToURL(uri); - - if (webkitSettings) { - webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView), webkitSettings); - g_object_unref(webkitSettings); - } - - browser_window_load_uri(BROWSER_WINDOW(mainWindow), url); - g_free(url); - - gtk_widget_grab_focus(webView); - gtk_widget_show(mainWindow); -} - -static const GOptionEntry commandLineOptions[] = -{ - { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" }, - { 0, 0, 0, 0, 0, 0, 0 } -}; - -static gboolean parseOptionEntryCallback(const gchar *optionNameFull, const gchar *value, WebKitSettings *webSettings, GError **error) -{ - if (strlen(optionNameFull) <= 2) { - g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_FAILED, "Invalid option %s", optionNameFull); - return FALSE; - } - - /* We have two -- in option name so remove them. */ - const gchar *optionName = optionNameFull + 2; - GParamSpec *spec = g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), optionName); - if (!spec) { - g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_FAILED, "Cannot find web settings for option %s", optionNameFull); - return FALSE; - } - - switch (G_PARAM_SPEC_VALUE_TYPE(spec)) { - case G_TYPE_BOOLEAN: { - gboolean propertyValue = !(value && g_ascii_strcasecmp(value, "true") && strcmp(value, "1")); - g_object_set(G_OBJECT(webSettings), optionName, propertyValue, NULL); - break; - } - case G_TYPE_STRING: - g_object_set(G_OBJECT(webSettings), optionName, value, NULL); - break; - case G_TYPE_INT: { - glong propertyValue; - gchar *end; - - errno = 0; - propertyValue = g_ascii_strtoll(value, &end, 0); - if (errno == ERANGE || propertyValue > G_MAXINT || propertyValue < G_MININT) { - g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "Integer value '%s' for %s out of range", value, optionNameFull); - return FALSE; - } - if (errno || value == end) { - g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "Cannot parse integer value '%s' for %s", value, optionNameFull); - return FALSE; - } - g_object_set(G_OBJECT(webSettings), optionName, propertyValue, NULL); - break; - } - case G_TYPE_FLOAT: { - gdouble propertyValue; - gchar *end; - - errno = 0; - propertyValue = g_ascii_strtod(value, &end); - if (errno == ERANGE || propertyValue > G_MAXFLOAT || propertyValue < G_MINFLOAT) { - g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "Float value '%s' for %s out of range", value, optionNameFull); - return FALSE; - } - if (errno || value == end) { - g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "Cannot parse float value '%s' for %s", value, optionNameFull); - return FALSE; - } - g_object_set(G_OBJECT(webSettings), optionName, propertyValue, NULL); - break; - } - default: - g_assert_not_reached(); - } - - return TRUE; -} - -static gboolean isValidParameterType(GType gParamType) -{ - return (gParamType == G_TYPE_BOOLEAN || gParamType == G_TYPE_STRING || gParamType == G_TYPE_INT - || gParamType == G_TYPE_FLOAT); -} - -static GOptionEntry* getOptionEntriesFromWebKitSettings(WebKitSettings *webSettings) -{ - GParamSpec **propertySpecs; - GOptionEntry *optionEntries; - guint numProperties, numEntries, i; - - propertySpecs = g_object_class_list_properties(G_OBJECT_GET_CLASS(webSettings), &numProperties); - if (!propertySpecs) - return NULL; - - optionEntries = g_new0(GOptionEntry, numProperties + 1); - numEntries = 0; - for (i = 0; i < numProperties; i++) { - GParamSpec *param = propertySpecs[i]; - - /* Fill in structures only for writable and not construct-only properties. */ - if (!param || !(param->flags & G_PARAM_WRITABLE) || (param->flags & G_PARAM_CONSTRUCT_ONLY)) - continue; - - GType gParamType = G_PARAM_SPEC_VALUE_TYPE(param); - if (!isValidParameterType(gParamType)) - continue; - - GOptionEntry *optionEntry = &optionEntries[numEntries++]; - optionEntry->long_name = g_param_spec_get_name(param); - - /* There is no easy way to figure our short name for generated option entries. - optionEntry.short_name=*/ - /* For bool arguments "enable" type make option argument not required. */ - if (gParamType == G_TYPE_BOOLEAN && (strstr(optionEntry->long_name, "enable"))) - optionEntry->flags = G_OPTION_FLAG_OPTIONAL_ARG; - optionEntry->arg = G_OPTION_ARG_CALLBACK; - optionEntry->arg_data = parseOptionEntryCallback; - optionEntry->description = g_param_spec_get_blurb(param); - optionEntry->arg_description = g_type_name(gParamType); - } - g_free(propertySpecs); - - return optionEntries; -} - -static gboolean addSettingsGroupToContext(GOptionContext *context, WebKitSettings* webkitSettings) -{ - GOptionEntry *optionEntries = getOptionEntriesFromWebKitSettings(webkitSettings); - if (!optionEntries) - return FALSE; - - GOptionGroup *webSettingsGroup = g_option_group_new("websettings", - "WebKitSettings writable properties for default WebKitWebView", - "WebKitSettings properties", - webkitSettings, - NULL); - g_option_group_add_entries(webSettingsGroup, optionEntries); - g_free(optionEntries); - - /* Option context takes ownership of the group. */ - g_option_context_add_group(context, webSettingsGroup); - - return TRUE; -} - -static void -aboutURISchemeRequestCallback(WebKitURISchemeRequest *request, gpointer userData) -{ - GInputStream *stream; - gsize streamLength; - const gchar *path; - gchar *contents; - GError *error; - - path = webkit_uri_scheme_request_get_path(request); - if (!g_strcmp0(path, "minibrowser")) { - contents = g_strdup_printf("<html><body><h1>WebKitGTK+ MiniBrowser</h1><p>The WebKit2 test browser of the GTK+ port.</p><p>WebKit version: %d.%d.%d</p></body></html>", - webkit_get_major_version(), - webkit_get_minor_version(), - webkit_get_micro_version()); - streamLength = strlen(contents); - stream = g_memory_input_stream_new_from_data(contents, streamLength, g_free); - - webkit_uri_scheme_request_finish(request, stream, streamLength, "text/html"); - g_object_unref(stream); - } else { - error = g_error_new(MINI_BROWSER_ERROR, MINI_BROWSER_ERROR_INVALID_ABOUT_PATH, "Invalid about:%s page.", path); - webkit_uri_scheme_request_finish_error(request, error); - g_error_free(error); - } -} - -int main(int argc, char *argv[]) -{ - gtk_init(&argc, &argv); - - GOptionContext *context = g_option_context_new(NULL); - g_option_context_add_main_entries(context, commandLineOptions, 0); - g_option_context_add_group(context, gtk_get_option_group(TRUE)); - - WebKitSettings *webkitSettings = webkit_settings_new(); - webkit_settings_set_enable_developer_extras(webkitSettings, TRUE); - if (!addSettingsGroupToContext(context, webkitSettings)) { - g_object_unref(webkitSettings); - webkitSettings = 0; - } - - GError *error = 0; - if (!g_option_context_parse(context, &argc, &argv, &error)) { - g_printerr("Cannot parse arguments: %s\n", error->message); - g_error_free(error); - g_option_context_free(context); - - return 1; - } - g_option_context_free (context); - -#ifdef WEBKIT_EXEC_PATH - g_setenv("WEBKIT_INSPECTOR_PATH", WEBKIT_EXEC_PATH "resources/inspector", FALSE); -#endif /* WEBKIT_EXEC_PATH */ - g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE); - - // Enable the favicon database, by specifying the default directory. - webkit_web_context_set_favicon_database_directory(webkit_web_context_get_default(), NULL); - - webkit_web_context_register_uri_scheme(webkit_web_context_get_default(), miniBrowserAboutScheme, aboutURISchemeRequestCallback, NULL, NULL); - - if (uriArguments) { - int i; - - for (i = 0; uriArguments[i]; i++) - createBrowserWindow(uriArguments[i], webkitSettings); - } else - createBrowserWindow("http://www.webkitgtk.org/", webkitSettings); - - gtk_main(); - - return 0; -} diff --git a/Tools/MiniBrowser/mac/AppDelegate.h b/Tools/MiniBrowser/mac/AppDelegate.h deleted file mode 100644 index 6129ea396..000000000 --- a/Tools/MiniBrowser/mac/AppDelegate.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -@interface BrowserAppDelegate : NSObject <NSApplicationDelegate> { - WKContextRef _processContext; - WKPageGroupRef _pageGroup; - NSMutableSet *_browserWindows; -} - -- (void)browserWindowWillClose:(NSWindow *)window; - -@end diff --git a/Tools/MiniBrowser/mac/AppDelegate.m b/Tools/MiniBrowser/mac/AppDelegate.m deleted file mode 100644 index 3bde3d1f5..000000000 --- a/Tools/MiniBrowser/mac/AppDelegate.m +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "AppDelegate.h" - -#import "WK1BrowserWindowController.h" -#import "WK2BrowserWindowController.h" - -#import <WebKit2/WKContextPrivate.h> -#import <WebKit2/WKStringCF.h> -#import <WebKit2/WKURLCF.h> - -static NSString *defaultURL = @"http://www.webkit.org/"; - -enum { - WebKit1NewWindowTag = 1, - WebKit2NewWindowTag = 2 -}; - -@implementation BrowserAppDelegate - -void didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo) -{ - CFStringRef cfMessageName = WKStringCopyCFString(0, messageName); - - WKTypeID typeID = WKGetTypeID(messageBody); - if (typeID == WKStringGetTypeID()) { - CFStringRef cfMessageBody = WKStringCopyCFString(0, (WKStringRef)messageBody); - LOG(@"ContextInjectedBundleClient - didReceiveMessage - MessageName: %@ MessageBody %@", cfMessageName, cfMessageBody); - CFRelease(cfMessageBody); - } else { - LOG(@"ContextInjectedBundleClient - didReceiveMessage - MessageName: %@ (MessageBody Unhandled)\n", cfMessageName); - } - - CFRelease(cfMessageName); - - WKStringRef newMessageName = WKStringCreateWithCFString(CFSTR("Response")); - WKStringRef newMessageBody = WKStringCreateWithCFString(CFSTR("Roger that!")); - - WKContextPostMessageToInjectedBundle(context, newMessageName, newMessageBody); - - WKRelease(newMessageName); - WKRelease(newMessageBody); -} - -// MARK: History Client Callbacks - -static void didNavigateWithNavigationData(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void *clientInfo) -{ - WKStringRef wkTitle = WKNavigationDataCopyTitle(navigationData); - CFStringRef title = WKStringCopyCFString(0, wkTitle); - WKRelease(wkTitle); - - WKURLRef wkURL = WKNavigationDataCopyURL(navigationData); - CFURLRef url = WKURLCopyCFURL(0, wkURL); - WKRelease(wkURL); - - LOG(@"HistoryClient - didNavigateWithNavigationData - title: %@ - url: %@", title, url); - CFRelease(title); - CFRelease(url); -} - -static void didPerformClientRedirect(WKContextRef context, WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef frame, const void *clientInfo) -{ - CFURLRef cfSourceURL = WKURLCopyCFURL(0, sourceURL); - CFURLRef cfDestinationURL = WKURLCopyCFURL(0, destinationURL); - LOG(@"HistoryClient - didPerformClientRedirect - sourceURL: %@ - destinationURL: %@", cfSourceURL, cfDestinationURL); - CFRelease(cfSourceURL); - CFRelease(cfDestinationURL); -} - -static void didPerformServerRedirect(WKContextRef context, WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef frame, const void *clientInfo) -{ - CFURLRef cfSourceURL = WKURLCopyCFURL(0, sourceURL); - CFURLRef cfDestinationURL = WKURLCopyCFURL(0, destinationURL); - LOG(@"HistoryClient - didPerformServerRedirect - sourceURL: %@ - destinationURL: %@", cfSourceURL, cfDestinationURL); - CFRelease(cfSourceURL); - CFRelease(cfDestinationURL); -} - -static void didUpdateHistoryTitle(WKContextRef context, WKPageRef page, WKStringRef title, WKURLRef URL, WKFrameRef frame, const void *clientInfo) -{ - CFStringRef cfTitle = WKStringCopyCFString(0, title); - CFURLRef cfURL = WKURLCopyCFURL(0, URL); - LOG(@"HistoryClient - didUpdateHistoryTitle - title: %@ - URL: %@", cfTitle, cfURL); - CFRelease(cfTitle); - CFRelease(cfURL); -} - -static void populateVisitedLinks(WKContextRef context, const void *clientInfo) -{ - LOG(@"HistoryClient - populateVisitedLinks"); -} - -- (id)init -{ - self = [super init]; - if (self) { - WKContextHistoryClient historyClient = { - kWKContextHistoryClientCurrentVersion, - self, - didNavigateWithNavigationData, - didPerformClientRedirect, - didPerformServerRedirect, - didUpdateHistoryTitle, - populateVisitedLinks - }; - - CFStringRef bundlePathCF = (CFStringRef)[[NSBundle mainBundle] pathForAuxiliaryExecutable:@"WebBundle.bundle"]; - WKStringRef bundlePath = WKStringCreateWithCFString(bundlePathCF); - - _processContext = WKContextCreateWithInjectedBundlePath(bundlePath); - - WKContextInjectedBundleClient bundleClient = { - kWKContextInjectedBundleClientCurrentVersion, - 0, /* clientInfo */ - didReceiveMessageFromInjectedBundle, - 0, /* didReceiveSynchronousMessageFromInjectedBundle */ - 0 /* getInjectedBundleInitializationUserData */ - }; - WKContextSetInjectedBundleClient(_processContext, &bundleClient); - WKContextSetHistoryClient(_processContext, &historyClient); - WKContextSetCacheModel(_processContext, kWKCacheModelPrimaryWebBrowser); - - WKRelease(bundlePath); - - WKStringRef pageGroupIdentifier = WKStringCreateWithCFString(CFSTR("MiniBrowser")); - _pageGroup = WKPageGroupCreateWithIdentifier(pageGroupIdentifier); - WKRelease(pageGroupIdentifier); - - _browserWindows = [[NSMutableSet alloc] init]; - } - - return self; -} - -- (IBAction)newWindow:(id)sender -{ - BrowserWindowController *controller = nil; - - if (![sender respondsToSelector:@selector(tag)] || [sender tag] == WebKit1NewWindowTag) - controller = [[WK1BrowserWindowController alloc] initWithWindowNibName:@"BrowserWindow"]; - else if ([sender tag] == WebKit2NewWindowTag) - controller = [[WK2BrowserWindowController alloc] initWithContext:_processContext pageGroup:_pageGroup]; - - if (!controller) - return; - - [[controller window] makeKeyAndOrderFront:sender]; - [_browserWindows addObject:[controller window]]; - - [controller loadURLString:defaultURL]; -} - -- (void)browserWindowWillClose:(NSWindow *)window -{ - [_browserWindows removeObject:window]; -} - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - [self newWindow:self]; -} - -- (void)applicationWillTerminate:(NSNotification *)notification -{ - for (NSWindow* window in _browserWindows) { - id delegate = [window delegate]; - assert([delegate isKindOfClass:[BrowserWindowController class]]); - BrowserWindowController *controller = (BrowserWindowController *)delegate; - [controller applicationTerminating]; - } - - WKRelease(_processContext); - _processContext = 0; -} - -- (BrowserWindowController *)frontmostBrowserWindowController -{ - NSArray* windows = [NSApp windows]; - for (NSWindow* window in windows) { - id delegate = [window delegate]; - assert([delegate isKindOfClass:[BrowserWindowController class]]); - BrowserWindowController *controller = (BrowserWindowController *)delegate; - assert([_browserWindows containsObject:[controller window]]); - return controller; - } - - return 0; -} - -- (IBAction)openDocument:(id)sender -{ - NSOpenPanel *openPanel = [[NSOpenPanel openPanel] retain]; - [openPanel beginForDirectory:nil - file:nil - types:nil - modelessDelegate:self - didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) - contextInfo:0]; -} - -- (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo -{ - [sheet autorelease]; - if (returnCode != NSOKButton || ![[sheet filenames] count]) - return; - - NSString* filePath = [[sheet filenames] objectAtIndex:0]; - - BrowserWindowController *controller = [self frontmostBrowserWindowController]; - if (!controller) { - controller = [[WK2BrowserWindowController alloc] initWithContext:_processContext pageGroup:_pageGroup]; // FIXME: add a way to open in WK1 also. - [[controller window] makeKeyAndOrderFront:self]; - } - - [controller loadURLString:[[NSURL fileURLWithPath:filePath] absoluteString]]; -} - -@end diff --git a/Tools/MiniBrowser/mac/BrowserWindow.xib b/Tools/MiniBrowser/mac/BrowserWindow.xib deleted file mode 100644 index 5984fe5d4..000000000 --- a/Tools/MiniBrowser/mac/BrowserWindow.xib +++ /dev/null @@ -1,1558 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> - <data> - <int key="IBDocument.SystemTarget">1060</int> - <string key="IBDocument.SystemVersion">10H545</string> - <string key="IBDocument.InterfaceBuilderVersion">820</string> - <string key="IBDocument.AppKitVersion">1038.35</string> - <string key="IBDocument.HIToolboxVersion">461.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">820</string> - </object> - <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> - <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="9"/> - <integer value="71"/> - </object> - <object class="NSArray" key="IBDocument.PluginDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </object> - <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys" id="0"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - </object> - <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSCustomObject" id="1001"> - <string key="NSClassName">BrowserWindowController</string> - </object> - <object class="NSCustomObject" id="1003"> - <string key="NSClassName">FirstResponder</string> - </object> - <object class="NSCustomObject" id="1004"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSWindowTemplate" id="1005"> - <int key="NSWindowStyleMask">4111</int> - <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{517, 330}, {776, 608}}</string> - <int key="NSWTFlags">544735232</int> - <string key="NSWindowTitle">Window</string> - <string key="NSWindowClass">NSWindow</string> - <object class="NSToolbar" key="NSViewClass" id="726585754"> - <object class="NSMutableString" key="NSToolbarIdentifier"> - <characters key="NS.bytes">994A0CB1-7575-4F39-A65B-7165AB1E8015</characters> - </object> - <nil key="NSToolbarDelegate"/> - <bool key="NSToolbarPrefersToBeShown">YES</bool> - <bool key="NSToolbarShowsBaselineSeparator">YES</bool> - <bool key="NSToolbarAllowsUserCustomization">YES</bool> - <bool key="NSToolbarAutosavesConfiguration">NO</bool> - <int key="NSToolbarDisplayMode">2</int> - <int key="NSToolbarSizeMode">1</int> - <object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</string> - <string>6BDC61B7-F1A8-425A-A212-9CAC59C56385</string> - <string>73DE9F4B-73E2-4036-A134-2D9E029DA980</string> - <string>88C16109-D40F-4682-BCE4-CBEE2EDE32D2</string> - <string>E1A9D32A-59E3-467B-9ABA-A95780416E69</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSToolbarItem" id="16289946"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</characters> - </object> - <string key="NSToolbarItemLabel">Location</string> - <string key="NSToolbarItemPaletteLabel">Location</string> - <nil key="NSToolbarItemToolTip"/> - <object class="NSTextField" key="NSToolbarItemView" id="690456651"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">266</int> - <string key="NSFrame">{{0, 14}, {565, 22}}</string> - <int key="NSViewLayerContentsRedrawPolicy">2</int> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="1023147716"> - <int key="NSCellFlags">-1804468671</int> - <int key="NSCellFlags2">268436480</int> - <string key="NSContents"/> - <object class="NSFont" key="NSSupport" id="1064395332"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">13</double> - <int key="NSfFlags">1044</int> - </object> - <reference key="NSControlView" ref="690456651"/> - <bool key="NSDrawsBackground">YES</bool> - <object class="NSColor" key="NSBackgroundColor" id="1032961300"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">textBackgroundColor</string> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MQA</bytes> - </object> - </object> - <object class="NSColor" key="NSTextColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">textColor</string> - <object class="NSColor" key="NSColor" id="365730878"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MAA</bytes> - </object> - </object> - </object> - </object> - <nil key="NSToolbarItemImage"/> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{200, 22}</string> - <string key="NSToolbarItemMaxSize">{800, 22}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">0</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - <object class="NSToolbarItem" id="457655522"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">6BDC61B7-F1A8-425A-A212-9CAC59C56385</characters> - </object> - <string key="NSToolbarItemLabel">Progress</string> - <string key="NSToolbarItemPaletteLabel">Progress</string> - <nil key="NSToolbarItemToolTip"/> - <object class="NSProgressIndicator" key="NSToolbarItemView" id="128750774"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">1289</int> - <object class="NSPSMatrix" key="NSDrawMatrix"/> - <string key="NSFrame">{{19, 14}, {16, 16}}</string> - <int key="NSpiFlags">28936</int> - <double key="NSMaxValue">1</double> - </object> - <nil key="NSToolbarItemImage"/> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{16, 16}</string> - <string key="NSToolbarItemMaxSize">{16, 16}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">-1</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - <object class="NSToolbarItem" id="332491395"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">73DE9F4B-73E2-4036-A134-2D9E029DA980</characters> - </object> - <string key="NSToolbarItemLabel">Go Back</string> - <string key="NSToolbarItemPaletteLabel">Go Back</string> - <nil key="NSToolbarItemToolTip"/> - <object class="NSButton" key="NSToolbarItemView" id="777930419"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{9, 14}, {32, 25}}</string> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="663899880"> - <int key="NSCellFlags">-2080244224</int> - <int key="NSCellFlags2">134217728</int> - <string key="NSContents"/> - <reference key="NSSupport" ref="1064395332"/> - <reference key="NSControlView" ref="777930419"/> - <int key="NSButtonFlags">-2033434369</int> - <int key="NSButtonFlags2">163</int> - <object class="NSCustomResource" key="NSNormalImage" id="206098440"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSGoLeftTemplate</string> - </object> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">400</int> - <int key="NSPeriodicInterval">75</int> - </object> - </object> - <reference key="NSToolbarItemImage" ref="206098440"/> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{32, 25}</string> - <string key="NSToolbarItemMaxSize">{32, 25}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">0</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - <object class="NSToolbarItem" id="818723416"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">88C16109-D40F-4682-BCE4-CBEE2EDE32D2</characters> - </object> - <string key="NSToolbarItemLabel">Refresh</string> - <string key="NSToolbarItemPaletteLabel">Refresh</string> - <nil key="NSToolbarItemToolTip"/> - <object class="NSButton" key="NSToolbarItemView" id="35464578"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{10, 14}, {29, 25}}</string> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="366486485"> - <int key="NSCellFlags">-2080244224</int> - <int key="NSCellFlags2">134217728</int> - <string key="NSContents"/> - <reference key="NSSupport" ref="1064395332"/> - <reference key="NSControlView" ref="35464578"/> - <int key="NSButtonFlags">-2033434369</int> - <int key="NSButtonFlags2">163</int> - <object class="NSCustomResource" key="NSNormalImage" id="443763357"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSRefreshTemplate</string> - </object> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">400</int> - <int key="NSPeriodicInterval">75</int> - </object> - </object> - <reference key="NSToolbarItemImage" ref="443763357"/> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{29, 25}</string> - <string key="NSToolbarItemMaxSize">{29, 25}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">0</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - <object class="NSToolbarItem" id="928383107"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">E1A9D32A-59E3-467B-9ABA-A95780416E69</characters> - </object> - <string key="NSToolbarItemLabel">Go Forward</string> - <string key="NSToolbarItemPaletteLabel">Go Forward</string> - <nil key="NSToolbarItemToolTip"/> - <object class="NSButton" key="NSToolbarItemView" id="95415629"> - <nil key="NSNextResponder"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{19, 14}, {32, 25}}</string> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="767612038"> - <int key="NSCellFlags">-2080244224</int> - <int key="NSCellFlags2">134217728</int> - <string key="NSContents"/> - <reference key="NSSupport" ref="1064395332"/> - <reference key="NSControlView" ref="95415629"/> - <int key="NSButtonFlags">-2033434369</int> - <int key="NSButtonFlags2">163</int> - <object class="NSCustomResource" key="NSNormalImage" id="163672266"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSGoRightTemplate</string> - </object> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">400</int> - <int key="NSPeriodicInterval">75</int> - </object> - </object> - <reference key="NSToolbarItemImage" ref="163672266"/> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{32, 25}</string> - <string key="NSToolbarItemMaxSize">{32, 25}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">0</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - </object> - </object> - <object class="NSArray" key="NSToolbarIBAllowedItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="332491395"/> - <reference ref="928383107"/> - <reference ref="818723416"/> - <reference ref="457655522"/> - <reference ref="16289946"/> - </object> - <object class="NSMutableArray" key="NSToolbarIBDefaultItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="332491395"/> - <reference ref="928383107"/> - <reference ref="818723416"/> - <reference ref="16289946"/> - <reference ref="457655522"/> - </object> - <object class="NSMutableArray" key="NSToolbarIBSelectableItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> - <object class="NSView" key="NSWindowView" id="1006"> - <reference key="NSNextResponder"/> - <int key="NSvFlags">256</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSCustomView" id="877383975"> - <reference key="NSNextResponder" ref="1006"/> - <int key="NSvFlags">274</int> - <string key="NSFrameSize">{776, 608}</string> - <reference key="NSSuperview" ref="1006"/> - <int key="NSViewLayerContentsRedrawPolicy">2</int> - <string key="NSClassName">NSView</string> - </object> - </object> - <string key="NSFrameSize">{776, 608}</string> - <reference key="NSSuperview"/> - <int key="NSViewLayerContentsRedrawPolicy">2</int> - </object> - <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> - <string key="NSFrameAutosaveName">Main Window</string> - </object> - <object class="NSWindowTemplate" id="833876351"> - <int key="NSWindowStyleMask">147</int> - <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{230, 479}, {452, 62}}</string> - <int key="NSWTFlags">-461897728</int> - <string key="NSWindowTitle">Find</string> - <string key="NSWindowClass">NSPanel</string> - <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> - <object class="NSView" key="NSWindowView" id="585866018"> - <reference key="NSNextResponder"/> - <int key="NSvFlags">256</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSSearchField" id="841639270"> - <reference key="NSNextResponder" ref="585866018"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{20, 20}, {412, 22}}</string> - <reference key="NSSuperview" ref="585866018"/> - <bool key="NSEnabled">YES</bool> - <object class="NSSearchFieldCell" key="NSCell" id="41426839"> - <int key="NSCellFlags">343014976</int> - <int key="NSCellFlags2">268436544</int> - <string key="NSContents"/> - <reference key="NSSupport" ref="1064395332"/> - <reference key="NSControlView" ref="841639270"/> - <bool key="NSDrawsBackground">YES</bool> - <int key="NSTextBezelStyle">1</int> - <reference key="NSBackgroundColor" ref="1032961300"/> - <object class="NSColor" key="NSTextColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlTextColor</string> - <reference key="NSColor" ref="365730878"/> - </object> - <object class="NSButtonCell" key="NSSearchButtonCell"> - <int key="NSCellFlags">130560</int> - <int key="NSCellFlags2">0</int> - <string key="NSContents">search</string> - <reference key="NSControlView" ref="841639270"/> - <string key="NSAction">_searchFieldSearch:</string> - <reference key="NSTarget" ref="41426839"/> - <int key="NSButtonFlags">138690815</int> - <int key="NSButtonFlags2">0</int> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">400</int> - <int key="NSPeriodicInterval">75</int> - </object> - <object class="NSButtonCell" key="NSCancelButtonCell"> - <int key="NSCellFlags">130560</int> - <int key="NSCellFlags2">0</int> - <string key="NSContents">clear</string> - <object class="NSMutableArray" key="NSAccessibilityOverriddenAttributes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableDictionary"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>AXDescription</string> - <string>NSAccessibilityEncodedAttributesValueType</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>cancel</string> - <integer value="1"/> - </object> - </object> - </object> - <reference key="NSControlView" ref="841639270"/> - <string key="NSAction">_searchFieldCancel:</string> - <reference key="NSTarget" ref="41426839"/> - <int key="NSButtonFlags">138690815</int> - <int key="NSButtonFlags2">0</int> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">400</int> - <int key="NSPeriodicInterval">75</int> - </object> - <int key="NSMaximumRecents">255</int> - </object> - </object> - </object> - <string key="NSFrameSize">{452, 62}</string> - <reference key="NSSuperview"/> - </object> - <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> - </object> - </object> - <object class="IBObjectContainer" key="IBDocument.Objects"> - <object class="NSMutableArray" key="connectionRecords"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">window</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="1005"/> - </object> - <int key="connectionID">3</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="1005"/> - <reference key="destination" ref="1001"/> - </object> - <int key="connectionID">4</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">urlText</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="690456651"/> - </object> - <int key="connectionID">32</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">progressIndicator</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="128750774"/> - </object> - <int key="connectionID">33</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">reloadButton</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="35464578"/> - </object> - <int key="connectionID">34</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">reload:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="35464578"/> - </object> - <int key="connectionID">35</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">fetch:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="690456651"/> - </object> - <int key="connectionID">36</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">containerView</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="877383975"/> - </object> - <int key="connectionID">37</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">backButton</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="777930419"/> - </object> - <int key="connectionID">46</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">forwardButton</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="95415629"/> - </object> - <int key="connectionID">47</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">goBack:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="332491395"/> - </object> - <int key="connectionID">61</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">goForward:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="928383107"/> - </object> - <int key="connectionID">62</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">toolbar</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="726585754"/> - </object> - <int key="connectionID">67</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">find:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="841639270"/> - </object> - <int key="connectionID">76</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">findPanelWindow</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="833876351"/> - </object> - <int key="connectionID">77</int> - </object> - </object> - <object class="IBMutableOrderedSet" key="objectRecords"> - <object class="NSArray" key="orderedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBObjectRecord"> - <int key="objectID">0</int> - <reference key="object" ref="0"/> - <reference key="children" ref="1000"/> - <nil key="parent"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-2</int> - <reference key="object" ref="1001"/> - <reference key="parent" ref="0"/> - <string key="objectName">File's Owner</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-1</int> - <reference key="object" ref="1003"/> - <reference key="parent" ref="0"/> - <string key="objectName">First Responder</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-3</int> - <reference key="object" ref="1004"/> - <reference key="parent" ref="0"/> - <string key="objectName">Application</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">1</int> - <reference key="object" ref="1005"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1006"/> - <reference ref="726585754"/> - </object> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">2</int> - <reference key="object" ref="1006"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="877383975"/> - </object> - <reference key="parent" ref="1005"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">9</int> - <reference key="object" ref="877383975"/> - <reference key="parent" ref="1006"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">48</int> - <reference key="object" ref="726585754"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="332491395"/> - <reference ref="928383107"/> - <reference ref="818723416"/> - <reference ref="16289946"/> - <reference ref="457655522"/> - </object> - <reference key="parent" ref="1005"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">56</int> - <reference key="object" ref="332491395"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="777930419"/> - </object> - <reference key="parent" ref="726585754"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">40</int> - <reference key="object" ref="777930419"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="663899880"/> - </object> - <reference key="parent" ref="332491395"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">41</int> - <reference key="object" ref="663899880"/> - <reference key="parent" ref="777930419"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">57</int> - <reference key="object" ref="928383107"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="95415629"/> - </object> - <reference key="parent" ref="726585754"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">42</int> - <reference key="object" ref="95415629"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="767612038"/> - </object> - <reference key="parent" ref="928383107"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">43</int> - <reference key="object" ref="767612038"/> - <reference key="parent" ref="95415629"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">58</int> - <reference key="object" ref="818723416"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="35464578"/> - </object> - <reference key="parent" ref="726585754"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">23</int> - <reference key="object" ref="35464578"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="366486485"/> - </object> - <reference key="parent" ref="818723416"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">24</int> - <reference key="object" ref="366486485"/> - <reference key="parent" ref="35464578"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">59</int> - <reference key="object" ref="16289946"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="690456651"/> - </object> - <reference key="parent" ref="726585754"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">10</int> - <reference key="object" ref="690456651"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1023147716"/> - </object> - <reference key="parent" ref="16289946"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">11</int> - <reference key="object" ref="1023147716"/> - <reference key="parent" ref="690456651"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">60</int> - <reference key="object" ref="457655522"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="128750774"/> - </object> - <reference key="parent" ref="726585754"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">21</int> - <reference key="object" ref="128750774"/> - <reference key="parent" ref="457655522"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">70</int> - <reference key="object" ref="833876351"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="585866018"/> - </object> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">71</int> - <reference key="object" ref="585866018"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="841639270"/> - </object> - <reference key="parent" ref="833876351"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">74</int> - <reference key="object" ref="841639270"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="41426839"/> - </object> - <reference key="parent" ref="585866018"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">75</int> - <reference key="object" ref="41426839"/> - <reference key="parent" ref="841639270"/> - </object> - </object> - </object> - <object class="NSMutableDictionary" key="flattenedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>1.IBEditorWindowLastContentRect</string> - <string>1.IBPluginDependency</string> - <string>1.IBWindowTemplateEditedContentRect</string> - <string>1.NSWindowTemplate.visibleAtLaunch</string> - <string>1.WindowOrigin</string> - <string>1.editorWindowContentRectSynchronizationRect</string> - <string>10.IBPluginDependency</string> - <string>11.IBPluginDependency</string> - <string>2.IBPluginDependency</string> - <string>21.IBPluginDependency</string> - <string>21.IBViewIntegration.shadowBlurRadius</string> - <string>21.IBViewIntegration.shadowColor</string> - <string>21.IBViewIntegration.shadowOffsetHeight</string> - <string>21.IBViewIntegration.shadowOffsetWidth</string> - <string>23.IBPluginDependency</string> - <string>24.IBPluginDependency</string> - <string>40.IBPluginDependency</string> - <string>41.IBPluginDependency</string> - <string>42.IBPluginDependency</string> - <string>43.IBPluginDependency</string> - <string>48.IBEditorWindowLastContentRect</string> - <string>48.IBPluginDependency</string> - <string>56.CustomClassName</string> - <string>57.CustomClassName</string> - <string>58.CustomClassName</string> - <string>70.IBEditorWindowLastContentRect</string> - <string>70.IBPluginDependency</string> - <string>70.IBWindowTemplateEditedContentRect</string> - <string>70.NSWindowTemplate.visibleAtLaunch</string> - <string>71.IBPluginDependency</string> - <string>74.IBPluginDependency</string> - <string>75.IBPluginDependency</string> - <string>9.IBPluginDependency</string> - <string>9.IBViewBoundsToFrameTransform</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>{{404, 157}, {776, 608}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{404, 157}, {776, 608}}</string> - <integer value="1"/> - <string>{196, 240}</string> - <string>{{202, 428}, {480, 270}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <real value="0.0"/> - <reference ref="365730878"/> - <real value="0.0"/> - <real value="0.0"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{422, 781}, {616, 0}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>MBToolbarItem</string> - <string>MBToolbarItem</string> - <string>MBToolbarItem</string> - <string>{{558, 468}, {452, 62}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{558, 468}, {452, 62}}</string> - <boolean value="NO"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <object class="NSAffineTransform"/> - </object> - </object> - <object class="NSMutableDictionary" key="unlocalizedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - </object> - <nil key="activeLocalization"/> - <object class="NSMutableDictionary" key="localizations"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - </object> - <nil key="sourceID"/> - <int key="maxID">77</int> - </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <object class="NSMutableArray" key="referencedPartialClassDescriptions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">BrowserWindowController</string> - <string key="superclassName">NSWindowController</string> - <object class="NSMutableDictionary" key="actions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>dumpSourceToConsole:</string> - <string>fetch:</string> - <string>find:</string> - <string>forceRepaint:</string> - <string>goBack:</string> - <string>goForward:</string> - <string>reload:</string> - <string>removeReinsertWebView:</string> - <string>resetZoom:</string> - <string>showHideWebView:</string> - <string>toggleZoomMode:</string> - <string>zoomIn:</string> - <string>zoomOut:</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - </object> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>dumpSourceToConsole:</string> - <string>fetch:</string> - <string>find:</string> - <string>forceRepaint:</string> - <string>goBack:</string> - <string>goForward:</string> - <string>reload:</string> - <string>removeReinsertWebView:</string> - <string>resetZoom:</string> - <string>showHideWebView:</string> - <string>toggleZoomMode:</string> - <string>zoomIn:</string> - <string>zoomOut:</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBActionInfo"> - <string key="name">dumpSourceToConsole:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">fetch:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">find:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">forceRepaint:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">goBack:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">goForward:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">reload:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">removeReinsertWebView:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">resetZoom:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">showHideWebView:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">toggleZoomMode:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">zoomIn:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">zoomOut:</string> - <string key="candidateClassName">id</string> - </object> - </object> - </object> - <object class="NSMutableDictionary" key="outlets"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>backButton</string> - <string>containerView</string> - <string>findPanelWindow</string> - <string>forwardButton</string> - <string>progressIndicator</string> - <string>reloadButton</string> - <string>toolbar</string> - <string>urlText</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSButton</string> - <string>NSView</string> - <string>NSWindow</string> - <string>NSButton</string> - <string>NSProgressIndicator</string> - <string>NSButton</string> - <string>NSToolbar</string> - <string>NSTextField</string> - </object> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>backButton</string> - <string>containerView</string> - <string>findPanelWindow</string> - <string>forwardButton</string> - <string>progressIndicator</string> - <string>reloadButton</string> - <string>toolbar</string> - <string>urlText</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBToOneOutletInfo"> - <string key="name">backButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">containerView</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">findPanelWindow</string> - <string key="candidateClassName">NSWindow</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">forwardButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">progressIndicator</string> - <string key="candidateClassName">NSProgressIndicator</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">reloadButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">toolbar</string> - <string key="candidateClassName">NSToolbar</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">urlText</string> - <string key="candidateClassName">NSTextField</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">mac/BrowserWindowController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">BrowserWindowController</string> - <string key="superclassName">NSWindowController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBUserSource</string> - <string key="minorKey"/> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">MBToolbarItem</string> - <string key="superclassName">NSToolbarItem</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">MBToolbarItem.h</string> - </object> - </object> - </object> - <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">NSActionCell</string> - <string key="superclassName">NSCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <string key="superclassName">NSResponder</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="558771426"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSApplication.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="344596456"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="428409299"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSApplication</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSButton</string> - <string key="superclassName">NSControl</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSButton.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSButtonCell</string> - <string key="superclassName">NSActionCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSCell</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSControl</string> - <string key="superclassName">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="297186634"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSControl.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSFormatter</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSMenu</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="808053469"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="558771426"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="344596456"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="428409299"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="297186634"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSFontManager.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <reference key="sourceIdentifier" ref="808053469"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTableView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="335804019"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier" id="555757547"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSArchiver.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSError.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSObject.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSThread.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSURL.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSPanel</string> - <string key="superclassName">NSWindow</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSPanel.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSProgressIndicator</string> - <string key="superclassName">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSProgressIndicator.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSResponder</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSInterfaceStyle.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSResponder</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSResponder.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSSearchField</string> - <string key="superclassName">NSTextField</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSearchField.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSSearchFieldCell</string> - <string key="superclassName">NSTextFieldCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSSearchFieldCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSTextField</string> - <string key="superclassName">NSControl</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTextField.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSTextFieldCell</string> - <string key="superclassName">NSActionCell</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSTextFieldCell.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSToolbar</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSToolbarItem</string> - <string key="superclassName">NSObject</string> - <reference key="sourceIdentifier" ref="335804019"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSClipView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSRulerView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSView</string> - <string key="superclassName">NSResponder</string> - <reference key="sourceIdentifier" ref="555757547"/> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindow</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSDrawer.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindow</string> - <string key="superclassName">NSResponder</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSWindow.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindow</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSWindowScripting.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSWindowController</string> - <string key="superclassName">NSResponder</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">showWindow:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">showWindow:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">showWindow:</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string> - </object> - </object> - </object> - </object> - <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> - <integer value="3000" key="NS.object.0"/> - </object> - <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> - <string key="IBDocument.LastKnownRelativeProjectPath">../MiniBrowser.xcodeproj</string> - <int key="IBDocument.defaultPropertyAccessControl">3</int> - <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSGoLeftTemplate</string> - <string>NSGoRightTemplate</string> - <string>NSRefreshTemplate</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>{9, 9}</string> - <string>{9, 9}</string> - <string>{10, 12}</string> - </object> - </object> - </data> -</archive> diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.h b/Tools/MiniBrowser/mac/BrowserWindowController.h deleted file mode 100644 index 482184b65..000000000 --- a/Tools/MiniBrowser/mac/BrowserWindowController.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2012 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import <Cocoa/Cocoa.h> - -@protocol BrowserController - -- (IBAction)fetch:(id)sender; -- (IBAction)reload:(id)sender; -- (IBAction)forceRepaint:(id)sender; -- (IBAction)goBack:(id)sender; -- (IBAction)goForward:(id)sender; - -- (IBAction)showHideWebView:(id)sender; -- (IBAction)removeReinsertWebView:(id)sender; - -- (IBAction)zoomIn:(id)sender; -- (IBAction)zoomOut:(id)sender; -- (IBAction)resetZoom:(id)sender; -- (BOOL)canZoomIn; -- (BOOL)canZoomOut; -- (BOOL)canResetZoom; - -- (IBAction)toggleZoomMode:(id)sender; -- (IBAction)togglePaginationMode:(id)sender; - -- (IBAction)toggleTransparentWindow:(id)sender; - -- (IBAction)dumpSourceToConsole:(id)sender; - -- (IBAction)find:(id)sender; - -@end - -@interface BrowserWindowController : NSWindowController { - IBOutlet NSProgressIndicator *progressIndicator; - IBOutlet NSButton *reloadButton; - IBOutlet NSButton *backButton; - IBOutlet NSButton *forwardButton; - IBOutlet NSToolbar *toolbar; - IBOutlet NSTextField *urlText; - IBOutlet NSView *containerView; - - IBOutlet NSWindow *findPanelWindow; - - BOOL _zoomTextOnly; -} - -- (void)loadURLString:(NSString *)urlString; -- (NSString *)addProtocolIfNecessary:(NSString *)address; - -- (void)applicationTerminating; - -- (IBAction)openLocation:(id)sender; - -@end - diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.m b/Tools/MiniBrowser/mac/BrowserWindowController.m deleted file mode 100644 index ba38d2563..000000000 --- a/Tools/MiniBrowser/mac/BrowserWindowController.m +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2012 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "BrowserWindowController.h" - -@interface BrowserWindowController () - -@end - -@implementation BrowserWindowController - -- (id)initWithWindow:(NSWindow *)window -{ - self = [super initWithWindow:window]; - if (self) { - } - - return self; -} - -- (void)windowDidLoad -{ - [super windowDidLoad]; -} - -- (IBAction)openLocation:(id)sender -{ - [[self window] makeFirstResponder:urlText]; -} - -- (void)loadURLString:(NSString *)urlString -{ -} - -- (void)applicationTerminating -{ -} - -- (NSString *)addProtocolIfNecessary:(NSString *)address -{ - if ([address rangeOfString:@"://"].length > 0) - return address; - - return [@"http://" stringByAppendingString:address]; -} - -@end diff --git a/Tools/MiniBrowser/mac/Info.plist b/Tools/MiniBrowser/mac/Info.plist deleted file mode 100644 index 7564a7eb7..000000000 --- a/Tools/MiniBrowser/mac/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIconFile</key> - <string>MiniBrowser</string> - <key>CFBundleIdentifier</key> - <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>LSMinimumSystemVersion</key> - <string>${MACOSX_DEPLOYMENT_TARGET}</string> - <key>CFBundleVersion</key> - <string>1</string> - <key>NSMainNibFile</key> - <string>MainMenu</string> - <key>NSPrincipalClass</key> - <string>NSApplication</string> -</dict> -</plist> diff --git a/Tools/MiniBrowser/mac/MainMenu.xib b/Tools/MiniBrowser/mac/MainMenu.xib deleted file mode 100644 index f40e9bd2b..000000000 --- a/Tools/MiniBrowser/mac/MainMenu.xib +++ /dev/null @@ -1,2790 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> - <data> - <int key="IBDocument.SystemTarget">1080</int> - <string key="IBDocument.SystemVersion">12C52</string> - <string key="IBDocument.InterfaceBuilderVersion">4109</string> - <string key="IBDocument.AppKitVersion">1187.34</string> - <string key="IBDocument.HIToolboxVersion">625.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">4109</string> - </object> - <object class="NSArray" key="IBDocument.IntegratedClassDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSCustomObject</string> - <string>NSMenu</string> - <string>NSMenuItem</string> - </object> - <object class="NSArray" key="IBDocument.PluginDependencies"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </object> - <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <string key="NS.key.0">PluginDependencyRecalculationVersion</string> - <integer value="1" key="NS.object.0"/> - </object> - <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSCustomObject" id="1021"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSCustomObject" id="1014"> - <string key="NSClassName">FirstResponder</string> - </object> - <object class="NSCustomObject" id="1050"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSMenu" id="649796088"> - <string key="NSTitle">AMainMenu</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="694149608"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">MiniBrowser</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <object class="NSCustomResource" key="NSOnImage" id="35465992"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuCheckmark</string> - </object> - <object class="NSCustomResource" key="NSMixedImage" id="502551668"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuMixedState</string> - </object> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="110575045"> - <string key="NSTitle">MiniBrowser</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="238522557"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">About MiniBrowser</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="304266470"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="609285721"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Preferences…</string> - <string key="NSKeyEquiv">,</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="481834944"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1046388886"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Services</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="752062318"> - <string key="NSTitle">Services</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <string key="NSName">_NSServicesMenu</string> - </object> - </object> - <object class="NSMenuItem" id="646227648"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="755159360"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide MiniBrowser</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="342932134"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide Others</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="908899353"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Show All</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1056857174"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="632727374"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Quit MiniBrowser</string> - <string key="NSKeyEquiv">q</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSAppleMenu</string> - </object> - </object> - <object class="NSMenuItem" id="379814623"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">File</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="720053764"> - <string key="NSTitle">File</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="705341025"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Open Location </string> - <string key="NSKeyEquiv">l</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="552626760"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">New WebKit1 Window</string> - <string key="NSKeyEquiv">n</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="632566413"> - <reference key="NSMenu" ref="720053764"/> - <bool key="NSIsAlternate">YES</bool> - <string key="NSTitle">New WebKit2 Window</string> - <string key="NSKeyEquiv">n</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">2</int> - </object> - <object class="NSMenuItem" id="722745758"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Open…</string> - <string key="NSKeyEquiv">o</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1025936716"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Open Recent</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="1065607017"> - <string key="NSTitle">Open Recent</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="759406840"> - <reference key="NSMenu" ref="1065607017"/> - <string key="NSTitle">Clear Menu</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSRecentDocumentsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="425164168"> - <reference key="NSMenu" ref="720053764"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="776162233"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Close</string> - <string key="NSKeyEquiv">w</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1023925487"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Save</string> - <string key="NSKeyEquiv">s</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="117038363"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Save As…</string> - <string key="NSKeyEquiv">S</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="579971712"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Revert to Saved</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1010469920"> - <reference key="NSMenu" ref="720053764"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="294629803"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Page Setup...</string> - <string key="NSKeyEquiv">P</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSToolTip"/> - </object> - <object class="NSMenuItem" id="49223823"> - <reference key="NSMenu" ref="720053764"/> - <string key="NSTitle">Print…</string> - <string key="NSKeyEquiv">p</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="952259628"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Edit</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="789758025"> - <string key="NSTitle">Edit</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="1058277027"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Undo</string> - <string key="NSKeyEquiv">z</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="790794224"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Redo</string> - <string key="NSKeyEquiv">Z</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1040322652"> - <reference key="NSMenu" ref="789758025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="296257095"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Cut</string> - <string key="NSKeyEquiv">x</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="860595796"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Copy</string> - <string key="NSKeyEquiv">c</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="29853731"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Paste</string> - <string key="NSKeyEquiv">v</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="82994268"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Paste and Match Style</string> - <string key="NSKeyEquiv">V</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="437104165"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Delete</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="583158037"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Select All</string> - <string key="NSKeyEquiv">a</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="212016141"> - <reference key="NSMenu" ref="789758025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="892235320"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Find</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="963351320"> - <string key="NSTitle">Find</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="447796847"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find…</string> - <string key="NSKeyEquiv">f</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="326711663"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find Next</string> - <string key="NSKeyEquiv">g</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">2</int> - </object> - <object class="NSMenuItem" id="270902937"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Find Previous</string> - <string key="NSKeyEquiv">G</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">3</int> - </object> - <object class="NSMenuItem" id="159080638"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Use Selection for Find</string> - <string key="NSKeyEquiv">e</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">7</int> - </object> - <object class="NSMenuItem" id="88285865"> - <reference key="NSMenu" ref="963351320"/> - <string key="NSTitle">Jump to Selection</string> - <string key="NSKeyEquiv">j</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="972420730"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Spelling and Grammar</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="769623530"> - <string key="NSTitle">Spelling and Grammar</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="679648819"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Show Spelling and Grammar</string> - <string key="NSKeyEquiv">:</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="96193923"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Check Document Now</string> - <string key="NSKeyEquiv">;</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="859480356"> - <reference key="NSMenu" ref="769623530"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="948374510"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Check Spelling While Typing</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="967646866"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Check Grammar With Spelling</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="795346622"> - <reference key="NSMenu" ref="769623530"/> - <string key="NSTitle">Correct Spelling Automatically</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="507821607"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Substitutions</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="698887838"> - <string key="NSTitle">Substitutions</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="65139061"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Show Substitutions</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="19036812"> - <reference key="NSMenu" ref="698887838"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="605118523"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Copy/Paste</string> - <string key="NSKeyEquiv">f</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">1</int> - </object> - <object class="NSMenuItem" id="197661976"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Quotes</string> - <string key="NSKeyEquiv">g</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">2</int> - </object> - <object class="NSMenuItem" id="672708820"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Dashes</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="708854459"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Smart Links</string> - <string key="NSKeyEquiv">G</string> - <int key="NSKeyEquivModMask">1179648</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <int key="NSTag">3</int> - </object> - <object class="NSMenuItem" id="537092702"> - <reference key="NSMenu" ref="698887838"/> - <string key="NSTitle">Text Replacement</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="288088188"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Transformations</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="579392910"> - <string key="NSTitle">Transformations</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="1060694897"> - <reference key="NSMenu" ref="579392910"/> - <string key="NSTitle">Make Upper Case</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="879586729"> - <reference key="NSMenu" ref="579392910"/> - <string key="NSTitle">Make Lower Case</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="56570060"> - <reference key="NSMenu" ref="579392910"/> - <string key="NSTitle">Capitalize</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="676164635"> - <reference key="NSMenu" ref="789758025"/> - <string key="NSTitle">Speech</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="785027613"> - <string key="NSTitle">Speech</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="731782645"> - <reference key="NSMenu" ref="785027613"/> - <string key="NSTitle">Start Speaking</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="680220178"> - <reference key="NSMenu" ref="785027613"/> - <string key="NSTitle">Stop Speaking</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="586577488"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">View</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="466310130"> - <string key="NSTitle">View</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="102151532"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Show Toolbar</string> - <string key="NSKeyEquiv">t</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="237841660"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Customize Toolbar…</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1025359947"> - <reference key="NSMenu" ref="466310130"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="694544109"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Zoom In</string> - <string key="NSKeyEquiv">+</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="943694335"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Zoom Out</string> - <string key="NSKeyEquiv">-</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="863984465"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Reset Zoom</string> - <string key="NSKeyEquiv">0</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="138443116"> - <reference key="NSMenu" ref="466310130"/> - <string key="NSTitle">Zoom Text Only</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="713487014"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Window</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="835318025"> - <string key="NSTitle">Window</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="1011231497"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Minimize</string> - <string key="NSKeyEquiv">m</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="575023229"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Zoom</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="299356726"> - <reference key="NSMenu" ref="835318025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="625202149"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Bring All to Front</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSWindowsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="448692316"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Help</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="992780483"> - <string key="NSTitle">Help</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="105068016"> - <reference key="NSMenu" ref="992780483"/> - <string key="NSTitle">MiniBrowser Help</string> - <string key="NSKeyEquiv">?</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - <string key="NSName">_NSHelpMenu</string> - </object> - </object> - <object class="NSMenuItem" id="816668511"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Debug</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="865232259"> - <string key="NSTitle">Debug</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="878165919"> - <reference key="NSMenu" ref="865232259"/> - <string key="NSTitle">Force Repaint</string> - <string key="NSKeyEquiv">r</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="137933275"> - <reference key="NSMenu" ref="865232259"/> - <string key="NSTitle">Hide Web View</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="1027125810"> - <reference key="NSMenu" ref="865232259"/> - <string key="NSTitle">Remove Web View</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="864702084"> - <reference key="NSMenu" ref="865232259"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="15772092"> - <reference key="NSMenu" ref="865232259"/> - <string key="NSTitle">Paginated Mode</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="489162377"> - <reference key="NSMenu" ref="865232259"/> - <string key="NSTitle">Transparent Window</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="624939128"> - <reference key="NSMenu" ref="865232259"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - <object class="NSMenuItem" id="191469404"> - <reference key="NSMenu" ref="865232259"/> - <string key="NSTitle">Dump Source To Console</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="35465992"/> - <reference key="NSMixedImage" ref="502551668"/> - </object> - </object> - </object> - </object> - </object> - <string key="NSName">_NSMainMenu</string> - </object> - <object class="NSCustomObject" id="976324537"> - <string key="NSClassName">BrowserAppDelegate</string> - </object> - <object class="NSCustomObject" id="755631768"> - <string key="NSClassName">NSFontManager</string> - </object> - </object> - <object class="IBObjectContainer" key="IBDocument.Objects"> - <object class="NSMutableArray" key="connectionRecords"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">terminate:</string> - <reference key="source" ref="1050"/> - <reference key="destination" ref="632727374"/> - </object> - <int key="connectionID">449</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontStandardAboutPanel:</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="238522557"/> - </object> - <int key="connectionID">142</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="976324537"/> - </object> - <int key="connectionID">495</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performMiniaturize:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1011231497"/> - </object> - <int key="connectionID">37</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">arrangeInFront:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="625202149"/> - </object> - <int key="connectionID">39</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">print:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="49223823"/> - </object> - <int key="connectionID">86</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">runPageLayout:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="294629803"/> - </object> - <int key="connectionID">87</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">clearRecentDocuments:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="759406840"/> - </object> - <int key="connectionID">127</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performClose:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="776162233"/> - </object> - <int key="connectionID">193</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleContinuousSpellChecking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="948374510"/> - </object> - <int key="connectionID">222</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">undo:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1058277027"/> - </object> - <int key="connectionID">223</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">copy:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="860595796"/> - </object> - <int key="connectionID">224</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">checkSpelling:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="96193923"/> - </object> - <int key="connectionID">225</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">paste:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="29853731"/> - </object> - <int key="connectionID">226</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">stopSpeaking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="680220178"/> - </object> - <int key="connectionID">227</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">cut:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="296257095"/> - </object> - <int key="connectionID">228</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">showGuessPanel:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="679648819"/> - </object> - <int key="connectionID">230</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">redo:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="790794224"/> - </object> - <int key="connectionID">231</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">selectAll:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="583158037"/> - </object> - <int key="connectionID">232</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">startSpeaking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="731782645"/> - </object> - <int key="connectionID">233</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">delete:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="437104165"/> - </object> - <int key="connectionID">235</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performZoom:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="575023229"/> - </object> - <int key="connectionID">240</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="447796847"/> - </object> - <int key="connectionID">241</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">centerSelectionInVisibleArea:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="88285865"/> - </object> - <int key="connectionID">245</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleGrammarChecking:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="967646866"/> - </object> - <int key="connectionID">347</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleSmartInsertDelete:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="605118523"/> - </object> - <int key="connectionID">355</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticQuoteSubstitution:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="197661976"/> - </object> - <int key="connectionID">356</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticLinkDetection:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="708854459"/> - </object> - <int key="connectionID">357</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">saveDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1023925487"/> - </object> - <int key="connectionID">362</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">saveDocumentAs:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="117038363"/> - </object> - <int key="connectionID">363</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">revertDocumentToSaved:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="579971712"/> - </object> - <int key="connectionID">364</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">runToolbarCustomizationPalette:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="237841660"/> - </object> - <int key="connectionID">365</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleToolbarShown:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="102151532"/> - </object> - <int key="connectionID">366</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hide:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="755159360"/> - </object> - <int key="connectionID">367</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hideOtherApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="342932134"/> - </object> - <int key="connectionID">368</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">unhideAllApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="908899353"/> - </object> - <int key="connectionID">370</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">openDocument:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="722745758"/> - </object> - <int key="connectionID">374</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticSpellingCorrection:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="795346622"/> - </object> - <int key="connectionID">456</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontSubstitutionsPanel:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="65139061"/> - </object> - <int key="connectionID">458</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticDashSubstitution:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="672708820"/> - </object> - <int key="connectionID">461</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleAutomaticTextReplacement:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="537092702"/> - </object> - <int key="connectionID">463</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">uppercaseWord:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1060694897"/> - </object> - <int key="connectionID">464</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">capitalizeWord:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="56570060"/> - </object> - <int key="connectionID">467</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">lowercaseWord:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="879586729"/> - </object> - <int key="connectionID">468</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">pasteAsPlainText:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="82994268"/> - </object> - <int key="connectionID">486</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="326711663"/> - </object> - <int key="connectionID">487</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="270902937"/> - </object> - <int key="connectionID">488</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performFindPanelAction:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="159080638"/> - </object> - <int key="connectionID">489</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">showHelp:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="105068016"/> - </object> - <int key="connectionID">493</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">forceRepaint:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="878165919"/> - </object> - <int key="connectionID">547</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">showHideWebView:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="137933275"/> - </object> - <int key="connectionID">549</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">removeReinsertWebView:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1027125810"/> - </object> - <int key="connectionID">551</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">zoomIn:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="694544109"/> - </object> - <int key="connectionID">559</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">zoomOut:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="943694335"/> - </object> - <int key="connectionID">560</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">resetZoom:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="863984465"/> - </object> - <int key="connectionID">561</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleZoomMode:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="138443116"/> - </object> - <int key="connectionID">564</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">dumpSourceToConsole:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="191469404"/> - </object> - <int key="connectionID">567</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">togglePaginationMode:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="15772092"/> - </object> - <int key="connectionID">570</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">newWindow:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="632566413"/> - </object> - <int key="connectionID">572</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">newWindow:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="552626760"/> - </object> - <int key="connectionID">574</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">openLocation:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="705341025"/> - </object> - <int key="connectionID">575</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleTransparentWindow:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="489162377"/> - </object> - <int key="connectionID">578</int> - </object> - </object> - <object class="IBMutableOrderedSet" key="objectRecords"> - <object class="NSArray" key="orderedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBObjectRecord"> - <int key="objectID">0</int> - <object class="NSArray" key="object" id="0"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <reference key="children" ref="1048"/> - <nil key="parent"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-2</int> - <reference key="object" ref="1021"/> - <reference key="parent" ref="0"/> - <string key="objectName">File's Owner</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-1</int> - <reference key="object" ref="1014"/> - <reference key="parent" ref="0"/> - <string key="objectName">First Responder</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-3</int> - <reference key="object" ref="1050"/> - <reference key="parent" ref="0"/> - <string key="objectName">Application</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">29</int> - <reference key="object" ref="649796088"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="713487014"/> - <reference ref="694149608"/> - <reference ref="952259628"/> - <reference ref="379814623"/> - <reference ref="586577488"/> - <reference ref="448692316"/> - <reference ref="816668511"/> - </object> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">19</int> - <reference key="object" ref="713487014"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="835318025"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">56</int> - <reference key="object" ref="694149608"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="110575045"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">217</int> - <reference key="object" ref="952259628"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="789758025"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">83</int> - <reference key="object" ref="379814623"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="720053764"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">81</int> - <reference key="object" ref="720053764"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1023925487"/> - <reference ref="117038363"/> - <reference ref="49223823"/> - <reference ref="722745758"/> - <reference ref="705341025"/> - <reference ref="1025936716"/> - <reference ref="294629803"/> - <reference ref="776162233"/> - <reference ref="425164168"/> - <reference ref="579971712"/> - <reference ref="1010469920"/> - <reference ref="632566413"/> - <reference ref="552626760"/> - </object> - <reference key="parent" ref="379814623"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">75</int> - <reference key="object" ref="1023925487"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">80</int> - <reference key="object" ref="117038363"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">78</int> - <reference key="object" ref="49223823"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">72</int> - <reference key="object" ref="722745758"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">82</int> - <reference key="object" ref="705341025"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">124</int> - <reference key="object" ref="1025936716"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1065607017"/> - </object> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">77</int> - <reference key="object" ref="294629803"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">73</int> - <reference key="object" ref="776162233"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">79</int> - <reference key="object" ref="425164168"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">112</int> - <reference key="object" ref="579971712"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">74</int> - <reference key="object" ref="1010469920"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">125</int> - <reference key="object" ref="1065607017"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="759406840"/> - </object> - <reference key="parent" ref="1025936716"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">126</int> - <reference key="object" ref="759406840"/> - <reference key="parent" ref="1065607017"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">205</int> - <reference key="object" ref="789758025"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="437104165"/> - <reference ref="583158037"/> - <reference ref="1058277027"/> - <reference ref="212016141"/> - <reference ref="296257095"/> - <reference ref="29853731"/> - <reference ref="860595796"/> - <reference ref="1040322652"/> - <reference ref="790794224"/> - <reference ref="892235320"/> - <reference ref="972420730"/> - <reference ref="676164635"/> - <reference ref="507821607"/> - <reference ref="288088188"/> - <reference ref="82994268"/> - </object> - <reference key="parent" ref="952259628"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">202</int> - <reference key="object" ref="437104165"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">198</int> - <reference key="object" ref="583158037"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">207</int> - <reference key="object" ref="1058277027"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">214</int> - <reference key="object" ref="212016141"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">199</int> - <reference key="object" ref="296257095"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">203</int> - <reference key="object" ref="29853731"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">197</int> - <reference key="object" ref="860595796"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">206</int> - <reference key="object" ref="1040322652"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">215</int> - <reference key="object" ref="790794224"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">218</int> - <reference key="object" ref="892235320"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="963351320"/> - </object> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">216</int> - <reference key="object" ref="972420730"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="769623530"/> - </object> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">200</int> - <reference key="object" ref="769623530"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="948374510"/> - <reference ref="96193923"/> - <reference ref="679648819"/> - <reference ref="967646866"/> - <reference ref="859480356"/> - <reference ref="795346622"/> - </object> - <reference key="parent" ref="972420730"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">219</int> - <reference key="object" ref="948374510"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">201</int> - <reference key="object" ref="96193923"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">204</int> - <reference key="object" ref="679648819"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">220</int> - <reference key="object" ref="963351320"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="270902937"/> - <reference ref="88285865"/> - <reference ref="159080638"/> - <reference ref="326711663"/> - <reference ref="447796847"/> - </object> - <reference key="parent" ref="892235320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">213</int> - <reference key="object" ref="270902937"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">210</int> - <reference key="object" ref="88285865"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">221</int> - <reference key="object" ref="159080638"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">208</int> - <reference key="object" ref="326711663"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">209</int> - <reference key="object" ref="447796847"/> - <reference key="parent" ref="963351320"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">57</int> - <reference key="object" ref="110575045"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="238522557"/> - <reference ref="755159360"/> - <reference ref="908899353"/> - <reference ref="632727374"/> - <reference ref="646227648"/> - <reference ref="609285721"/> - <reference ref="481834944"/> - <reference ref="304266470"/> - <reference ref="1046388886"/> - <reference ref="1056857174"/> - <reference ref="342932134"/> - </object> - <reference key="parent" ref="694149608"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">58</int> - <reference key="object" ref="238522557"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">134</int> - <reference key="object" ref="755159360"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">150</int> - <reference key="object" ref="908899353"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">136</int> - <reference key="object" ref="632727374"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">144</int> - <reference key="object" ref="646227648"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">129</int> - <reference key="object" ref="609285721"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">143</int> - <reference key="object" ref="481834944"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">236</int> - <reference key="object" ref="304266470"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">131</int> - <reference key="object" ref="1046388886"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="752062318"/> - </object> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">149</int> - <reference key="object" ref="1056857174"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">145</int> - <reference key="object" ref="342932134"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">130</int> - <reference key="object" ref="752062318"/> - <reference key="parent" ref="1046388886"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">24</int> - <reference key="object" ref="835318025"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="299356726"/> - <reference ref="625202149"/> - <reference ref="575023229"/> - <reference ref="1011231497"/> - </object> - <reference key="parent" ref="713487014"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">92</int> - <reference key="object" ref="299356726"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">5</int> - <reference key="object" ref="625202149"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">239</int> - <reference key="object" ref="575023229"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">23</int> - <reference key="object" ref="1011231497"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">295</int> - <reference key="object" ref="586577488"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="466310130"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">296</int> - <reference key="object" ref="466310130"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="102151532"/> - <reference ref="237841660"/> - <reference ref="694544109"/> - <reference ref="1025359947"/> - <reference ref="943694335"/> - <reference ref="863984465"/> - <reference ref="138443116"/> - </object> - <reference key="parent" ref="586577488"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">297</int> - <reference key="object" ref="102151532"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">298</int> - <reference key="object" ref="237841660"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">211</int> - <reference key="object" ref="676164635"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="785027613"/> - </object> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">212</int> - <reference key="object" ref="785027613"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="680220178"/> - <reference ref="731782645"/> - </object> - <reference key="parent" ref="676164635"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">195</int> - <reference key="object" ref="680220178"/> - <reference key="parent" ref="785027613"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">196</int> - <reference key="object" ref="731782645"/> - <reference key="parent" ref="785027613"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">346</int> - <reference key="object" ref="967646866"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">348</int> - <reference key="object" ref="507821607"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="698887838"/> - </object> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">349</int> - <reference key="object" ref="698887838"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="605118523"/> - <reference ref="197661976"/> - <reference ref="708854459"/> - <reference ref="65139061"/> - <reference ref="19036812"/> - <reference ref="672708820"/> - <reference ref="537092702"/> - </object> - <reference key="parent" ref="507821607"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">350</int> - <reference key="object" ref="605118523"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">351</int> - <reference key="object" ref="197661976"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">354</int> - <reference key="object" ref="708854459"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">420</int> - <reference key="object" ref="755631768"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">450</int> - <reference key="object" ref="288088188"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="579392910"/> - </object> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">451</int> - <reference key="object" ref="579392910"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1060694897"/> - <reference ref="879586729"/> - <reference ref="56570060"/> - </object> - <reference key="parent" ref="288088188"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">452</int> - <reference key="object" ref="1060694897"/> - <reference key="parent" ref="579392910"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">453</int> - <reference key="object" ref="859480356"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">454</int> - <reference key="object" ref="795346622"/> - <reference key="parent" ref="769623530"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">457</int> - <reference key="object" ref="65139061"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">459</int> - <reference key="object" ref="19036812"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">460</int> - <reference key="object" ref="672708820"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">462</int> - <reference key="object" ref="537092702"/> - <reference key="parent" ref="698887838"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">465</int> - <reference key="object" ref="879586729"/> - <reference key="parent" ref="579392910"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">466</int> - <reference key="object" ref="56570060"/> - <reference key="parent" ref="579392910"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">485</int> - <reference key="object" ref="82994268"/> - <reference key="parent" ref="789758025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">490</int> - <reference key="object" ref="448692316"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="992780483"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">491</int> - <reference key="object" ref="992780483"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="105068016"/> - </object> - <reference key="parent" ref="448692316"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">492</int> - <reference key="object" ref="105068016"/> - <reference key="parent" ref="992780483"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">494</int> - <reference key="object" ref="976324537"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">534</int> - <reference key="object" ref="816668511"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="865232259"/> - </object> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">535</int> - <reference key="object" ref="865232259"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="878165919"/> - <reference ref="137933275"/> - <reference ref="1027125810"/> - <reference ref="864702084"/> - <reference ref="191469404"/> - <reference ref="624939128"/> - <reference ref="15772092"/> - <reference ref="489162377"/> - </object> - <reference key="parent" ref="816668511"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">545</int> - <reference key="object" ref="878165919"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">548</int> - <reference key="object" ref="137933275"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">550</int> - <reference key="object" ref="1027125810"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">553</int> - <reference key="object" ref="864702084"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">555</int> - <reference key="object" ref="694544109"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">556</int> - <reference key="object" ref="1025359947"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">557</int> - <reference key="object" ref="943694335"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">558</int> - <reference key="object" ref="863984465"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">562</int> - <reference key="object" ref="138443116"/> - <reference key="parent" ref="466310130"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">566</int> - <reference key="object" ref="191469404"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">568</int> - <reference key="object" ref="624939128"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">569</int> - <reference key="object" ref="15772092"/> - <reference key="parent" ref="865232259"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">571</int> - <reference key="object" ref="632566413"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">573</int> - <reference key="object" ref="552626760"/> - <reference key="parent" ref="720053764"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">576</int> - <reference key="object" ref="489162377"/> - <reference key="parent" ref="865232259"/> - </object> - </object> - </object> - <object class="NSMutableDictionary" key="flattenedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>-1.IBPluginDependency</string> - <string>-2.IBPluginDependency</string> - <string>-3.IBPluginDependency</string> - <string>112.IBPluginDependency</string> - <string>124.IBPluginDependency</string> - <string>125.IBPluginDependency</string> - <string>126.IBPluginDependency</string> - <string>129.IBPluginDependency</string> - <string>130.IBPluginDependency</string> - <string>131.IBPluginDependency</string> - <string>134.IBPluginDependency</string> - <string>136.IBPluginDependency</string> - <string>143.IBPluginDependency</string> - <string>144.IBPluginDependency</string> - <string>145.IBPluginDependency</string> - <string>149.IBPluginDependency</string> - <string>150.IBPluginDependency</string> - <string>19.IBPluginDependency</string> - <string>195.IBPluginDependency</string> - <string>196.IBPluginDependency</string> - <string>197.IBPluginDependency</string> - <string>198.IBPluginDependency</string> - <string>199.IBPluginDependency</string> - <string>200.IBPluginDependency</string> - <string>201.IBPluginDependency</string> - <string>202.IBPluginDependency</string> - <string>203.IBPluginDependency</string> - <string>204.IBPluginDependency</string> - <string>205.IBPluginDependency</string> - <string>206.IBPluginDependency</string> - <string>207.IBPluginDependency</string> - <string>208.IBPluginDependency</string> - <string>209.IBPluginDependency</string> - <string>210.IBPluginDependency</string> - <string>211.IBPluginDependency</string> - <string>212.IBPluginDependency</string> - <string>213.IBPluginDependency</string> - <string>214.IBPluginDependency</string> - <string>215.IBPluginDependency</string> - <string>216.IBPluginDependency</string> - <string>217.IBPluginDependency</string> - <string>218.IBPluginDependency</string> - <string>219.IBPluginDependency</string> - <string>220.IBPluginDependency</string> - <string>221.IBPluginDependency</string> - <string>23.IBPluginDependency</string> - <string>236.IBPluginDependency</string> - <string>239.IBPluginDependency</string> - <string>24.IBPluginDependency</string> - <string>29.IBPluginDependency</string> - <string>295.IBPluginDependency</string> - <string>296.IBPluginDependency</string> - <string>297.IBPluginDependency</string> - <string>298.IBPluginDependency</string> - <string>346.IBPluginDependency</string> - <string>348.IBPluginDependency</string> - <string>349.IBPluginDependency</string> - <string>350.IBPluginDependency</string> - <string>351.IBPluginDependency</string> - <string>354.IBPluginDependency</string> - <string>420.IBPluginDependency</string> - <string>450.IBPluginDependency</string> - <string>451.IBPluginDependency</string> - <string>452.IBPluginDependency</string> - <string>453.IBPluginDependency</string> - <string>454.IBPluginDependency</string> - <string>457.IBPluginDependency</string> - <string>459.IBPluginDependency</string> - <string>460.IBPluginDependency</string> - <string>462.IBPluginDependency</string> - <string>465.IBPluginDependency</string> - <string>466.IBPluginDependency</string> - <string>485.IBPluginDependency</string> - <string>490.IBPluginDependency</string> - <string>491.IBPluginDependency</string> - <string>492.IBPluginDependency</string> - <string>494.IBPluginDependency</string> - <string>5.IBPluginDependency</string> - <string>534.IBPluginDependency</string> - <string>535.IBPluginDependency</string> - <string>545.IBPluginDependency</string> - <string>548.IBPluginDependency</string> - <string>550.IBPluginDependency</string> - <string>553.IBPluginDependency</string> - <string>555.IBPluginDependency</string> - <string>556.IBPluginDependency</string> - <string>557.IBPluginDependency</string> - <string>558.IBPluginDependency</string> - <string>56.IBPluginDependency</string> - <string>562.IBPluginDependency</string> - <string>566.IBPluginDependency</string> - <string>568.IBPluginDependency</string> - <string>569.IBPluginDependency</string> - <string>57.IBPluginDependency</string> - <string>571.IBPluginDependency</string> - <string>573.IBPluginDependency</string> - <string>576.IBPluginDependency</string> - <string>58.IBPluginDependency</string> - <string>72.IBPluginDependency</string> - <string>73.IBPluginDependency</string> - <string>74.IBPluginDependency</string> - <string>75.IBPluginDependency</string> - <string>77.IBPluginDependency</string> - <string>78.IBPluginDependency</string> - <string>79.IBPluginDependency</string> - <string>80.IBPluginDependency</string> - <string>81.IBPluginDependency</string> - <string>82.IBPluginDependency</string> - <string>83.IBPluginDependency</string> - <string>92.IBPluginDependency</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </object> - </object> - <object class="NSMutableDictionary" key="unlocalizedProperties"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <reference key="dict.values" ref="0"/> - </object> - <nil key="activeLocalization"/> - <object class="NSMutableDictionary" key="localizations"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference key="dict.sortedKeys" ref="0"/> - <reference key="dict.values" ref="0"/> - </object> - <nil key="sourceID"/> - <int key="maxID">578</int> - </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <object class="NSMutableArray" key="referencedPartialClassDescriptions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBPartialClassDescription"> - <string key="className">BrowserAppDelegate</string> - <string key="superclassName">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/BrowserAppDelegate.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">BrowserWindowController</string> - <string key="superclassName">NSWindowController</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">openLocation:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">openLocation:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">openLocation:</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="NSMutableDictionary" key="outlets"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>backButton</string> - <string>containerView</string> - <string>findPanelWindow</string> - <string>forwardButton</string> - <string>progressIndicator</string> - <string>reloadButton</string> - <string>toolbar</string> - <string>urlText</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSButton</string> - <string>NSView</string> - <string>NSWindow</string> - <string>NSButton</string> - <string>NSProgressIndicator</string> - <string>NSButton</string> - <string>NSToolbar</string> - <string>NSTextField</string> - </object> - </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>backButton</string> - <string>containerView</string> - <string>findPanelWindow</string> - <string>forwardButton</string> - <string>progressIndicator</string> - <string>reloadButton</string> - <string>toolbar</string> - <string>urlText</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBToOneOutletInfo"> - <string key="name">backButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">containerView</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">findPanelWindow</string> - <string key="candidateClassName">NSWindow</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">forwardButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">progressIndicator</string> - <string key="candidateClassName">NSProgressIndicator</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">reloadButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">toolbar</string> - <string key="candidateClassName">NSToolbar</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">urlText</string> - <string key="candidateClassName">NSTextField</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/BrowserWindowController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">FirstResponder</string> - <object class="NSMutableDictionary" key="actions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>forceRepaint:</string> - <string>newWindow:</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>id</string> - <string>id</string> - </object> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>forceRepaint:</string> - <string>newWindow:</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBActionInfo"> - <string key="name">forceRepaint:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">newWindow:</string> - <string key="candidateClassName">id</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBUserSource</string> - <string key="minorKey"/> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSDocument</string> - <object class="NSMutableDictionary" key="actions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>printDocument:</string> - <string>revertDocumentToSaved:</string> - <string>runPageLayout:</string> - <string>saveDocument:</string> - <string>saveDocumentAs:</string> - <string>saveDocumentTo:</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - </object> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>printDocument:</string> - <string>revertDocumentToSaved:</string> - <string>runPageLayout:</string> - <string>saveDocument:</string> - <string>saveDocumentAs:</string> - <string>saveDocumentTo:</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBActionInfo"> - <string key="name">printDocument:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">revertDocumentToSaved:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">runPageLayout:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">saveDocument:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">saveDocumentAs:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">saveDocumentTo:</string> - <string key="candidateClassName">id</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/NSDocument.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSDocumentController</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">_openRecentDocument:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">_openRecentDocument:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">_openRecentDocument:</string> - <string key="candidateClassName">id</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/NSDocumentController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">WebView</string> - <object class="NSMutableDictionary" key="actions"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>reloadFromOrigin:</string> - <string>resetPageZoom:</string> - <string>zoomPageIn:</string> - <string>zoomPageOut:</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - </object> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>reloadFromOrigin:</string> - <string>resetPageZoom:</string> - <string>zoomPageIn:</string> - <string>zoomPageOut:</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBActionInfo"> - <string key="name">reloadFromOrigin:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">resetPageZoom:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">zoomPageIn:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">zoomPageOut:</string> - <string key="candidateClassName">id</string> - </object> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/WebView.h</string> - </object> - </object> - </object> - </object> - <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> - <integer value="3000" key="NS.object.0"/> - </object> - <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> - <int key="IBDocument.defaultPropertyAccessControl">3</int> - <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSMenuCheckmark</string> - <string>NSMenuMixedState</string> - </object> - <object class="NSArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>{11, 11}</string> - <string>{10, 3}</string> - </object> - </object> - </data> -</archive> diff --git a/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch b/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch deleted file mode 100644 index 24ff04c07..000000000 --- a/Tools/MiniBrowser/mac/MiniBrowser_Prefix.pch +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef __OBJC__ - #import <Cocoa/Cocoa.h> -#endif - -#import <WebKit2/WebKit2_C.h> - -#define ENABLE_LOGGING 0 - -#if ENABLE_LOGGING -#define LOG NSLog -#else -#define LOG(...) ((void)0) -#endif diff --git a/Tools/MiniBrowser/mac/WK1BrowserWindowController.h b/Tools/MiniBrowser/mac/WK1BrowserWindowController.h deleted file mode 100644 index fdae2ca27..000000000 --- a/Tools/MiniBrowser/mac/WK1BrowserWindowController.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "BrowserWindowController.h" - -@class WebView; - -@interface WK1BrowserWindowController : BrowserWindowController<BrowserController> { - WebView *_webView; -} - - -@end diff --git a/Tools/MiniBrowser/mac/WK1BrowserWindowController.m b/Tools/MiniBrowser/mac/WK1BrowserWindowController.m deleted file mode 100644 index 4b2428a32..000000000 --- a/Tools/MiniBrowser/mac/WK1BrowserWindowController.m +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "WK1BrowserWindowController.h" - -#import <WebKit/WebKit.h> -#import <WebKit/WebViewPrivate.h> -#import "AppDelegate.h" - -@interface WK1BrowserWindowController () -@end - -@implementation WK1BrowserWindowController - -- (void)awakeFromNib -{ - _webView = [[WebView alloc] initWithFrame:[containerView bounds]]; - [_webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; - - // Set the WebView delegates - [_webView setFrameLoadDelegate:self]; - [_webView setUIDelegate:self]; - [_webView setResourceLoadDelegate:self]; - - [containerView addSubview:_webView]; -} - -- (void)dealloc -{ - [_webView setFrameLoadDelegate:nil]; - [_webView setUIDelegate:nil]; - [_webView setResourceLoadDelegate:nil]; - [_webView release]; - - [super dealloc]; -} - -- (void)loadURLString:(NSString *)urlString -{ - // FIXME: We shouldn't have to set the url text here. - [urlText setStringValue:urlString]; - [self fetch:nil]; -} - -- (IBAction)fetch:(id)sender -{ - [urlText setStringValue:[self addProtocolIfNecessary:[urlText stringValue]]]; - NSURL *url = [NSURL URLWithString:[urlText stringValue]]; - [[_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:url]]; -} - -- (IBAction)showHideWebView:(id)sender -{ - BOOL hidden = ![_webView isHidden]; - - [_webView setHidden:hidden]; -} - -- (IBAction)removeReinsertWebView:(id)sender -{ - if ([_webView window]) { - [_webView retain]; - [_webView removeFromSuperview]; - } else { - [containerView addSubview:_webView]; - [_webView release]; - } -} - -- (IBAction)reload:(id)sender -{ - [_webView reload:sender]; -} - -- (IBAction)forceRepaint:(id)sender -{ - [_webView setNeedsDisplay:YES]; -} - -- (IBAction)goBack:(id)sender -{ - [_webView goBack:sender]; -} - -- (IBAction)goForward:(id)sender -{ - [_webView goForward:sender]; -} - -- (BOOL)validateMenuItem:(NSMenuItem *)menuItem -{ - SEL action = [menuItem action]; - - if (action == @selector(zoomIn:)) - return [self canZoomIn]; - if (action == @selector(zoomOut:)) - return [self canZoomOut]; - if (action == @selector(resetZoom:)) - return [self canResetZoom]; - - if (action == @selector(showHideWebView:)) - [menuItem setTitle:[_webView isHidden] ? @"Show Web View" : @"Hide Web View"]; - else if (action == @selector(removeReinsertWebView:)) - [menuItem setTitle:[_webView window] ? @"Remove Web View" : @"Insert Web View"]; - else if (action == @selector(toggleZoomMode:)) - [menuItem setState:_zoomTextOnly ? NSOnState : NSOffState]; - else if ([menuItem action] == @selector(togglePaginationMode:)) - [menuItem setState:[self isPaginated] ? NSOnState : NSOffState]; - else if ([menuItem action] == @selector(toggleTransparentWindow:)) - [menuItem setState:[[self window] isOpaque] ? NSOffState : NSOnState]; - - return YES; -} - -- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item -{ - SEL action = [item action]; - - if (action == @selector(goBack:)) - return [_webView canGoBack]; - - if (action == @selector(goForward:)) - return [_webView canGoForward]; - - return YES; -} - -- (void)validateToolbar -{ - [toolbar validateVisibleItems]; -} - -- (BOOL)windowShouldClose:(id)sender -{ - return YES; -} - -- (void)windowWillClose:(NSNotification *)notification -{ - [(BrowserAppDelegate *)[NSApp delegate] browserWindowWillClose:[self window]]; - [self autorelease]; -} - -- (void)applicationTerminating -{ -} - -- (double)currentZoomFactor -{ - return 1; -} - -- (BOOL)canZoomIn -{ - return [_webView canMakeTextLarger]; -} - -- (void)zoomIn:(id)sender -{ - if (![self canZoomIn]) - return; - - [_webView makeTextLarger:sender]; -} - -- (BOOL)canZoomOut -{ - return [_webView canMakeTextSmaller]; -} - -- (void)zoomOut:(id)sender -{ - if (![self canZoomIn]) - return; - - [_webView makeTextSmaller:sender]; -} - -- (BOOL)canResetZoom -{ - return [_webView canMakeTextStandardSize]; -} - -- (void)resetZoom:(id)sender -{ - if (![self canResetZoom]) - return; - - [_webView makeTextStandardSize:sender]; -} - -- (IBAction)toggleZoomMode:(id)sender -{ - // FIXME: non-text zoom not implemented. - _zoomTextOnly = !_zoomTextOnly; -} - -- (BOOL)isPaginated -{ - return [_webView _paginationMode] != WebPaginationModeUnpaginated; -} - -- (IBAction)togglePaginationMode:(id)sender -{ - if ([self isPaginated]) { - [_webView _setPaginationMode:WebPaginationModeUnpaginated]; - } else { - [_webView _setPaginationMode:WebPaginationModeRightToLeft]; - [_webView _setPageLength:_webView.bounds.size.width / 2]; - [_webView _setGapBetweenPages:10]; - } -} - -- (IBAction)toggleTransparentWindow:(id)sender -{ - BOOL isTransparent = ![[self window] isOpaque]; - isTransparent = !isTransparent; - - [[self window] setOpaque:!isTransparent]; - [[self window] setHasShadow:!isTransparent]; - - if (isTransparent) - [_webView setBackgroundColor:[NSColor clearColor]]; - else - [_webView setBackgroundColor:[NSColor whiteColor]]; - - [[self window] display]; -} - -- (IBAction)find:(id)sender -{ -} - -- (IBAction)dumpSourceToConsole:(id)sender -{ -} - -// WebFrameLoadDelegate Methods -- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame -{ -} - -- (void)webView:(WebView *)sender didCommitLoadForFrame:(WebFrame *)frame -{ - if (frame != [sender mainFrame]) - return; - - NSURL *committedURL = [[[frame dataSource] request] URL]; - [urlText setStringValue:[committedURL absoluteString]]; -} - -- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame -{ - if (frame != [sender mainFrame]) - return; - - [[self window] setTitle:[title stringByAppendingString:@" [WK1]"]]; -} - -- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame -{ - NSAlert *alert = [[NSAlert alloc] init]; - [alert addButtonWithTitle:@"OK"]; - - alert.messageText = [NSString stringWithFormat:@"JavaScript alert dialog from %@.", frame.dataSource.request.URL.absoluteString]; - alert.informativeText = message; - - [alert runModal]; - [alert release]; -} - -@end diff --git a/Tools/MiniBrowser/mac/WK2BrowserWindowController.h b/Tools/MiniBrowser/mac/WK2BrowserWindowController.h deleted file mode 100644 index 840f08273..000000000 --- a/Tools/MiniBrowser/mac/WK2BrowserWindowController.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "BrowserWindowController.h" - -@interface WK2BrowserWindowController : BrowserWindowController<BrowserController> { - WKContextRef _context; - WKPageGroupRef _pageGroup; - WKView *_webView; -} - -- (id)initWithContext:(WKContextRef)context pageGroup:(WKPageGroupRef)pageGroup; - -@end diff --git a/Tools/MiniBrowser/mac/WK2BrowserWindowController.m b/Tools/MiniBrowser/mac/WK2BrowserWindowController.m deleted file mode 100644 index bb40dbf70..000000000 --- a/Tools/MiniBrowser/mac/WK2BrowserWindowController.m +++ /dev/null @@ -1,847 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "WK2BrowserWindowController.h" - -#import "AppDelegate.h" -#import <WebKit2/WKPagePrivate.h> -#import <WebKit2/WKStringCF.h> -#import <WebKit2/WKURLCF.h> -#import <WebKit2/WKViewPrivate.h> - -@interface WK2BrowserWindowController () -- (void)didStartProgress; -- (void)didChangeProgress:(double)value; -- (void)didFinishProgress; -- (void)didStartProvisionalLoadForFrame:(WKFrameRef)frame; -- (void)didCommitLoadForFrame:(WKFrameRef)frame; -- (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame; -- (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame; -- (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame; -- (void)didSameDocumentNavigationForFrame:(WKFrameRef)frame; -- (BOOL)isPaginated; -@end - -@implementation WK2BrowserWindowController - -- (id)initWithContext:(WKContextRef)context pageGroup:(WKPageGroupRef)pageGroup -{ - if ((self = [super initWithWindowNibName:@"BrowserWindow"])) { - _context = WKRetain(context); - _pageGroup = WKRetain(pageGroup); - _zoomTextOnly = NO; - } - - return self; -} - -- (void)dealloc -{ - WKRelease(_context); - WKRelease(_pageGroup); - [_webView release]; - - [super dealloc]; -} - -- (IBAction)fetch:(id)sender -{ - [urlText setStringValue:[self addProtocolIfNecessary:[urlText stringValue]]]; - - CFURLRef cfURL = CFURLCreateWithString(0, (CFStringRef)[urlText stringValue], 0); - if (!cfURL) - return; - - WKURLRef url = WKURLCreateWithCFURL(cfURL); - CFRelease(cfURL); - - WKPageLoadURL(_webView.pageRef, url); - WKRelease(url); -} - -- (IBAction)showHideWebView:(id)sender -{ - BOOL hidden = ![_webView isHidden]; - - [_webView setHidden:hidden]; -} - -- (IBAction)removeReinsertWebView:(id)sender -{ - if ([_webView window]) { - [_webView retain]; - [_webView removeFromSuperview]; - } else { - [containerView addSubview:_webView]; - [_webView release]; - } -} - -- (BOOL)validateMenuItem:(NSMenuItem *)menuItem -{ - SEL action = [menuItem action]; - - if (action == @selector(zoomIn:)) - return [self canZoomIn]; - if (action == @selector(zoomOut:)) - return [self canZoomOut]; - if (action == @selector(resetZoom:)) - return [self canResetZoom]; - - if (action == @selector(showHideWebView:)) - [menuItem setTitle:[_webView isHidden] ? @"Show Web View" : @"Hide Web View"]; - else if (action == @selector(removeReinsertWebView:)) - [menuItem setTitle:[_webView window] ? @"Remove Web View" : @"Insert Web View"]; - else if (action == @selector(toggleZoomMode:)) - [menuItem setState:_zoomTextOnly ? NSOnState : NSOffState]; - else if ([menuItem action] == @selector(togglePaginationMode:)) - [menuItem setState:[self isPaginated] ? NSOnState : NSOffState]; - else if ([menuItem action] == @selector(toggleTransparentWindow:)) - [menuItem setState:[[self window] isOpaque] ? NSOffState : NSOnState]; - - return YES; -} - -- (IBAction)reload:(id)sender -{ - WKPageReload(_webView.pageRef); -} - -- (IBAction)forceRepaint:(id)sender -{ - [_webView setNeedsDisplay:YES]; -} - -- (IBAction)goBack:(id)sender -{ - WKPageGoBack(_webView.pageRef); -} - -- (IBAction)goForward:(id)sender -{ - WKPageGoForward(_webView.pageRef); -} - -- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item -{ - SEL action = [item action]; - - if (action == @selector(goBack:)) - return _webView && WKPageCanGoBack(_webView.pageRef); - - if (action == @selector(goForward:)) - return _webView && WKPageCanGoForward(_webView.pageRef); - - return YES; -} - -- (void)validateToolbar -{ - [toolbar validateVisibleItems]; -} - -- (BOOL)windowShouldClose:(id)sender -{ - LOG(@"windowShouldClose"); - BOOL canCloseImmediately = WKPageTryClose(_webView.pageRef); - return canCloseImmediately; -} - -- (void)windowWillClose:(NSNotification *)notification -{ - [(BrowserAppDelegate *)[NSApp delegate] browserWindowWillClose:[self window]]; - [self autorelease]; -} - -- (void)applicationTerminating -{ - // FIXME: Why are we bothering to close the page? This doesn't even prevent LEAK output. - WKPageClose(_webView.pageRef); -} - -#define DefaultMinimumZoomFactor (.5) -#define DefaultMaximumZoomFactor (3.0) -#define DefaultZoomFactorRatio (1.2) - -- (double)currentZoomFactor -{ - return _zoomTextOnly ? WKPageGetTextZoomFactor(_webView.pageRef) : WKPageGetPageZoomFactor(_webView.pageRef); -} - -- (void)setCurrentZoomFactor:(double)factor -{ - _zoomTextOnly ? WKPageSetTextZoomFactor(_webView.pageRef, factor) : WKPageSetPageZoomFactor(_webView.pageRef, factor); -} - -- (BOOL)canZoomIn -{ - return [self currentZoomFactor] * DefaultZoomFactorRatio < DefaultMaximumZoomFactor; -} - -- (void)zoomIn:(id)sender -{ - if (![self canZoomIn]) - return; - - double factor = [self currentZoomFactor] * DefaultZoomFactorRatio; - [self setCurrentZoomFactor:factor]; -} - -- (BOOL)canZoomOut -{ - return [self currentZoomFactor] / DefaultZoomFactorRatio > DefaultMinimumZoomFactor; -} - -- (void)zoomOut:(id)sender -{ - if (![self canZoomIn]) - return; - - double factor = [self currentZoomFactor] / DefaultZoomFactorRatio; - [self setCurrentZoomFactor:factor]; -} - -- (BOOL)canResetZoom -{ - return _zoomTextOnly ? (WKPageGetTextZoomFactor(_webView.pageRef) != 1) : (WKPageGetPageZoomFactor(_webView.pageRef) != 1); -} - -- (void)resetZoom:(id)sender -{ - if (![self canResetZoom]) - return; - - if (_zoomTextOnly) - WKPageSetTextZoomFactor(_webView.pageRef, 1); - else - WKPageSetPageZoomFactor(_webView.pageRef, 1); -} - -- (IBAction)toggleZoomMode:(id)sender -{ - if (_zoomTextOnly) { - _zoomTextOnly = NO; - double currentTextZoom = WKPageGetTextZoomFactor(_webView.pageRef); - WKPageSetPageAndTextZoomFactors(_webView.pageRef, currentTextZoom, 1); - } else { - _zoomTextOnly = YES; - double currentPageZoom = WKPageGetPageZoomFactor(_webView.pageRef); - WKPageSetPageAndTextZoomFactors(_webView.pageRef, 1, currentPageZoom); - } -} - -- (BOOL)isPaginated -{ - return WKPageGetPaginationMode(_webView.pageRef) != kWKPaginationModeUnpaginated; -} - -- (IBAction)togglePaginationMode:(id)sender -{ - if ([self isPaginated]) - WKPageSetPaginationMode(_webView.pageRef, kWKPaginationModeUnpaginated); - else { - WKPageSetPaginationMode(_webView.pageRef, kWKPaginationModeLeftToRight); - WKPageSetPageLength(_webView.pageRef, _webView.bounds.size.width / 2); - WKPageSetGapBetweenPages(_webView.pageRef, 10); - } -} - -- (IBAction)toggleTransparentWindow:(id)sender -{ - BOOL isTransparent = _webView.drawsTransparentBackground; - isTransparent = !isTransparent; - - [[self window] setOpaque:!isTransparent]; - [[self window] setHasShadow:!isTransparent]; - - _webView.drawsTransparentBackground = isTransparent; - - [[self window] display]; -} - -- (IBAction)dumpSourceToConsole:(id)sender -{ - WKPageGetSourceForFrame_b(_webView.pageRef, WKPageGetMainFrame(_webView.pageRef), ^(WKStringRef result, WKErrorRef error) { - if (!result) - return; - - CFStringRef cfResult = WKStringCopyCFString(0, result); - LOG(@"Main frame source\n \"%@\"", (NSString *)cfResult); - CFRelease(cfResult); - }); -} - -// MARK: Loader Client Callbacks - -static void didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didStartProvisionalLoadForFrame:frame]; -} - -static void didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didReceiveServerRedirectForProvisionalLoadForFrame:frame]; -} - -static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didFailProvisionalLoadWithErrorForFrame:frame]; -} - -static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didCommitLoadForFrame:frame]; -} - -static void didFinishDocumentLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didFinishDocumentLoadForFrame"); -} - -static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didFinishLoadForFrame"); -} - -static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didFailLoadWithErrorForFrame:frame]; -} - -static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didSameDocumentNavigationForFrame:frame]; -} - -static void didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - if (!WKFrameIsMainFrame(frame)) - return; - - WK2BrowserWindowController* controller = (WK2BrowserWindowController*)clientInfo; - CFStringRef cfTitle = WKStringCopyCFString(0, title); - [[controller window] setTitle:[(NSString *)cfTitle stringByAppendingString:@" [WK2]"]]; - CFRelease(cfTitle); -} - -static void didFirstLayoutForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didFirstLayoutForFrame"); -} - -static void didFirstVisuallyNonEmptyLayoutForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didFirstVisuallyNonEmptyLayoutForFrame"); -} - -static void didRemoveFrameFromHierarchy(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didRemoveFrameFromHierarchy"); -} - -static void didDisplayInsecureContentForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didDisplayInsecureContentForFrame"); -} - -static void didRunInsecureContentForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didRunInsecureContentForFrame"); -} - -static void didDetectXSSForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"didDetectXSSForFrame"); -} - -static void didStartProgress(WKPageRef page, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didStartProgress]; -} - -static void didChangeProgress(WKPageRef page, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didChangeProgress:WKPageGetEstimatedProgress(page)]; -} - -static void didFinishProgress(WKPageRef page, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo didFinishProgress]; -} - -static void didBecomeUnresponsive(WKPageRef page, const void *clientInfo) -{ - LOG(@"didBecomeUnresponsive"); -} - -static void didBecomeResponsive(WKPageRef page, const void *clientInfo) -{ - LOG(@"didBecomeResponsive"); -} - -static void processDidExit(WKPageRef page, const void *clientInfo) -{ - LOG(@"processDidExit"); -} - -static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void *clientInfo) -{ - [(WK2BrowserWindowController *)clientInfo validateToolbar]; -} - -// MARK: Policy Client Callbacks - -static void decidePolicyForNavigationAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo) -{ - LOG(@"decidePolicyForNavigationAction"); - WKFramePolicyListenerUse(listener); -} - -static void decidePolicyForNewWindowAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo) -{ - LOG(@"decidePolicyForNewWindowAction"); - WKFramePolicyListenerUse(listener); -} - -static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo) -{ - WKFramePolicyListenerUse(listener); -} - -// MARK: UI Client Callbacks - -static WKPageRef createNewPage(WKPageRef page, WKURLRequestRef request, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton button, const void* clientInfo) -{ - LOG(@"createNewPage"); - WK2BrowserWindowController *controller = [[WK2BrowserWindowController alloc] initWithContext:WKPageGetContext(page) pageGroup:WKPageGetPageGroup(page)]; - [controller loadWindow]; - - return WKRetain(controller->_webView.pageRef); -} - -static void showPage(WKPageRef page, const void *clientInfo) -{ - LOG(@"showPage"); - [[(BrowserWindowController *)clientInfo window] orderFront:nil]; -} - -static void closePage(WKPageRef page, const void *clientInfo) -{ - LOG(@"closePage"); - WKPageClose(page); - [[(BrowserWindowController *)clientInfo window] close]; -} - -static void runJavaScriptAlert(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo) -{ - NSAlert* alert = [[NSAlert alloc] init]; - - WKURLRef wkURL = WKFrameCopyURL(frame); - CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKRelease(wkURL); - - [alert setMessageText:[NSString stringWithFormat:@"JavaScript alert dialog from %@.", [(NSURL *)cfURL absoluteString]]]; - CFRelease(cfURL); - - CFStringRef cfMessage = WKStringCopyCFString(0, message); - [alert setInformativeText:(NSString *)cfMessage]; - CFRelease(cfMessage); - - [alert addButtonWithTitle:@"OK"]; - - [alert runModal]; - [alert release]; -} - -static bool runJavaScriptConfirm(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo) -{ - NSAlert* alert = [[NSAlert alloc] init]; - - WKURLRef wkURL = WKFrameCopyURL(frame); - CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKRelease(wkURL); - - [alert setMessageText:[NSString stringWithFormat:@"JavaScript confirm dialog from %@.", [(NSURL *)cfURL absoluteString]]]; - CFRelease(cfURL); - - CFStringRef cfMessage = WKStringCopyCFString(0, message); - [alert setInformativeText:(NSString *)cfMessage]; - CFRelease(cfMessage); - - [alert addButtonWithTitle:@"OK"]; - [alert addButtonWithTitle:@"Cancel"]; - - NSInteger button = [alert runModal]; - [alert release]; - - return button == NSAlertFirstButtonReturn; -} - -static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void* clientInfo) -{ - NSAlert* alert = [[NSAlert alloc] init]; - - WKURLRef wkURL = WKFrameCopyURL(frame); - CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKRelease(wkURL); - - [alert setMessageText:[NSString stringWithFormat:@"JavaScript prompt dialog from %@.", [(NSURL *)cfURL absoluteString]]]; - CFRelease(cfURL); - - CFStringRef cfMessage = WKStringCopyCFString(0, message); - [alert setInformativeText:(NSString *)cfMessage]; - CFRelease(cfMessage); - - [alert addButtonWithTitle:@"OK"]; - [alert addButtonWithTitle:@"Cancel"]; - - NSTextField* input = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 24)]; - CFStringRef cfDefaultValue = WKStringCopyCFString(0, defaultValue); - [input setStringValue:(NSString *)cfDefaultValue]; - CFRelease(cfDefaultValue); - - [alert setAccessoryView:input]; - - NSInteger button = [alert runModal]; - - NSString* result = nil; - if (button == NSAlertFirstButtonReturn) { - [input validateEditing]; - result = [input stringValue]; - } - - [alert release]; - - if (!result) - return 0; - return WKStringCreateWithCFString((CFStringRef)result); -} - -static void setStatusText(WKPageRef page, WKStringRef text, const void* clientInfo) -{ - LOG(@"setStatusText"); -} - -static void mouseDidMoveOverElement(WKPageRef page, WKHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo) -{ - LOG(@"mouseDidMoveOverElement"); -} - -static WKRect getWindowFrame(WKPageRef page, const void* clientInfo) -{ - NSRect rect = [[(BrowserWindowController *)clientInfo window] frame]; - WKRect wkRect; - wkRect.origin.x = rect.origin.x; - wkRect.origin.y = rect.origin.y; - wkRect.size.width = rect.size.width; - wkRect.size.height = rect.size.height; - return wkRect; -} - -static void setWindowFrame(WKPageRef page, WKRect rect, const void* clientInfo) -{ - [[(BrowserWindowController *)clientInfo window] setFrame:NSMakeRect(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height) display:YES]; -} - -static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo) -{ - NSAlert *alert = [[NSAlert alloc] init]; - - WKURLRef wkURL = WKFrameCopyURL(frame); - CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKRelease(wkURL); - - [alert setMessageText:[NSString stringWithFormat:@"BeforeUnload confirm dialog from %@.", [(NSURL *)cfURL absoluteString]]]; - CFRelease(cfURL); - - CFStringRef cfMessage = WKStringCopyCFString(0, message); - [alert setInformativeText:(NSString *)cfMessage]; - CFRelease(cfMessage); - - [alert addButtonWithTitle:@"OK"]; - [alert addButtonWithTitle:@"Cancel"]; - - NSInteger button = [alert runModal]; - [alert release]; - - return button == NSAlertFirstButtonReturn; -} - -static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener, const void* clientInfo) -{ - NSOpenPanel *openPanel = [NSOpenPanel openPanel]; - [openPanel setAllowsMultipleSelection:WKOpenPanelParametersGetAllowsMultipleFiles(parameters)]; - - WKRetain(listener); - - [openPanel beginSheetModalForWindow:[(BrowserWindowController *)clientInfo window] completionHandler:^(NSInteger result) { - if (result == NSFileHandlingPanelOKButton) { - WKMutableArrayRef fileURLs = WKMutableArrayCreate(); - - NSURL *nsURL; - for (nsURL in [openPanel URLs]) { - WKURLRef wkURL = WKURLCreateWithCFURL((CFURLRef)nsURL); - WKArrayAppendItem(fileURLs, wkURL); - WKRelease(wkURL); - } - - WKOpenPanelResultListenerChooseFiles(listener, fileURLs); - - WKRelease(fileURLs); - } else - WKOpenPanelResultListenerCancel(listener); - - WKRelease(listener); - }]; -} - -- (void)awakeFromNib -{ - _webView = [[WKView alloc] initWithFrame:[containerView bounds] contextRef:_context pageGroupRef:_pageGroup]; - - [_webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; - [containerView addSubview:_webView]; - - WKPageLoaderClient loadClient = { - kWKPageLoaderClientCurrentVersion, - self, /* clientInfo */ - didStartProvisionalLoadForFrame, - didReceiveServerRedirectForProvisionalLoadForFrame, - didFailProvisionalLoadWithErrorForFrame, - didCommitLoadForFrame, - didFinishDocumentLoadForFrame, - didFinishLoadForFrame, - didFailLoadWithErrorForFrame, - didSameDocumentNavigationForFrame, - didReceiveTitleForFrame, - didFirstLayoutForFrame, - didFirstVisuallyNonEmptyLayoutForFrame, - didRemoveFrameFromHierarchy, - didDisplayInsecureContentForFrame, - didRunInsecureContentForFrame, - 0, // canAuthenticateAgainstProtectionSpaceInFrame - 0, // didReceiveAuthenticationChallengeInFrame - didStartProgress, - didChangeProgress, - didFinishProgress, - didBecomeUnresponsive, - didBecomeResponsive, - processDidExit, - didChangeBackForwardList, - 0, // shouldGoToBackForwardItem - 0, // didFailToInitializePlugin - didDetectXSSForFrame, - 0, // didNewFirstVisuallyNonEmptyLayout - 0, // willGoToBackForwardListItem - 0, // interactionOccurredWhileProcessUnresponsive - 0, // pluginDidFail_deprecatedForUseWithV1 - 0, // didReceiveIntentForFrame - 0, // registerIntentServiceForFrame - 0, // didLayout - 0, // pluginLoadPolicy_deprecatedForUseWithV2 - 0, // pluginDidFail - 0, // pluginLoadPolicy - }; - WKPageSetPageLoaderClient(_webView.pageRef, &loadClient); - - WKPagePolicyClient policyClient = { - kWKPagePolicyClientCurrentVersion, - self, /* clientInfo */ - decidePolicyForNavigationAction, - decidePolicyForNewWindowAction, - decidePolicyForResponse, - 0 /* unableToImplementPolicy */ - }; - WKPageSetPagePolicyClient(_webView.pageRef, &policyClient); - - WKPageUIClient uiClient = { - kWKPageUIClientCurrentVersion, - self, /* clientInfo */ - 0, /* createNewPage_deprecatedForUseWithV0 */ - showPage, - closePage, - 0, /* takeFocus */ - 0, /* focus */ - 0, /* unfocus */ - runJavaScriptAlert, - runJavaScriptConfirm, - runJavaScriptPrompt, - setStatusText, - 0, /* mouseDidMoveOverElement_deprecatedForUseWithV0 */ - 0, /* missingPluginButtonClicked */ - 0, /* didNotHandleKeyEvent */ - 0, /* didNotHandleWheelEvent */ - 0, /* toolbarsAreVisible */ - 0, /* setToolbarsAreVisible */ - 0, /* menuBarIsVisible */ - 0, /* setMenuBarIsVisible */ - 0, /* statusBarIsVisible */ - 0, /* setStatusBarIsVisible */ - 0, /* isResizable */ - 0, /* setIsResizable */ - getWindowFrame, - setWindowFrame, - runBeforeUnloadConfirmPanel, - 0, /* didDraw */ - 0, /* pageDidScroll */ - 0, /* exceededDatabaseQuota */ - runOpenPanel, - 0, /* decidePolicyForGeolocationPermissionRequest */ - 0, // headerHeight - 0, // footerHeight - 0, // drawHeader - 0, // drawFooter - 0, // printFrame - 0, // showModal - 0, // didCompleteRubberBandForMainFrame - 0, // saveDataToFileInDownloadsFolder - 0, // shouldInterruptJavaScript - createNewPage, - mouseDidMoveOverElement, - 0, // decidePolicyForNotificationPermissionRequest - 0, // unavailablePluginButtonClicked_deprecatedForUseWithV1 - 0, // showColorPicker - 0, // hideColorPicker - 0, // unavailablePluginButtonClicked - }; - WKPageSetPageUIClient(_webView.pageRef, &uiClient); -} - -- (void)didStartProgress -{ - [progressIndicator setDoubleValue:0.0]; - [progressIndicator setHidden:NO]; -} - -- (void)didChangeProgress:(double)value -{ - [progressIndicator setDoubleValue:value]; -} - -- (void)didFinishProgress -{ - [progressIndicator setHidden:YES]; - [progressIndicator setDoubleValue:1.0]; -} - -- (void)updateTextFieldFromURL:(WKURLRef)URLRef -{ - if (!URLRef) - return; - - static WKURLRef emptyURL = 0; - if (!emptyURL) - emptyURL = WKURLCreateWithUTF8CString(""); - - if (WKURLIsEqual(URLRef, emptyURL)) - return; - - CFURLRef cfSourceURL = WKURLCopyCFURL(0, URLRef); - [urlText setStringValue:(NSString*)CFURLGetString(cfSourceURL)]; - CFRelease(cfSourceURL); -} - -- (void)updateProvisionalURLForFrame:(WKFrameRef)frame -{ - WKURLRef url = WKFrameCopyProvisionalURL(frame); - if (!url) - return; - [self updateTextFieldFromURL:url]; - WKRelease(url); -} - -- (void)updateCommittedURLForFrame:(WKFrameRef)frame -{ - WKURLRef url = WKFrameCopyURL(frame); - if (!url) - return; - [self updateTextFieldFromURL:url]; - WKRelease(url); -} - -- (void)didStartProvisionalLoadForFrame:(WKFrameRef)frame -{ - if (!WKFrameIsMainFrame(frame)) - return; - - [self updateProvisionalURLForFrame:frame]; -} - -- (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame -{ - if (!WKFrameIsMainFrame(frame)) - return; - - [self updateProvisionalURLForFrame:frame]; -} - -- (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame -{ - if (!WKFrameIsMainFrame(frame)) - return; - - [self updateProvisionalURLForFrame:frame]; -} - -- (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame -{ - if (!WKFrameIsMainFrame(frame)) - return; - - [self updateProvisionalURLForFrame:frame]; -} - -- (void)didSameDocumentNavigationForFrame:(WKFrameRef)frame -{ -} - -- (void)didCommitLoadForFrame:(WKFrameRef)frame -{ - if (!WKFrameIsMainFrame(frame)) - return; - - [self updateCommittedURLForFrame:frame]; -} - -- (void)loadURLString:(NSString *)urlString -{ - // FIXME: We shouldn't have to set the url text here. - [urlText setStringValue:urlString]; - [self fetch:nil]; -} - -- (IBAction)performFindPanelAction:(id)sender -{ - [findPanelWindow makeKeyAndOrderFront:sender]; -} - -- (IBAction)find:(id)sender -{ - WKStringRef string = WKStringCreateWithCFString((CFStringRef)[sender stringValue]); - - WKPageFindString(_webView.pageRef, string, kWKFindOptionsCaseInsensitive | kWKFindOptionsWrapAround | kWKFindOptionsShowFindIndicator | kWKFindOptionsShowOverlay, 100); -} - -@end diff --git a/Tools/MiniBrowser/mac/WebBundle/Info.plist b/Tools/MiniBrowser/mac/WebBundle/Info.plist deleted file mode 100644 index c285a472c..000000000 --- a/Tools/MiniBrowser/mac/WebBundle/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIdentifier</key> - <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>BNDL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1</string> -</dict> -</plist> diff --git a/Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m b/Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m deleted file mode 100644 index 16e86b404..000000000 --- a/Tools/MiniBrowser/mac/WebBundle/WebBundleMain.m +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <Cocoa/Cocoa.h> -#include <WebKit2/WKBundle.h> -#include <WebKit2/WKBundleFrame.h> -#include <WebKit2/WKBundleInitialize.h> -#include <WebKit2/WKBundlePage.h> -#include <WebKit2/WKString.h> -#include <WebKit2/WKStringCF.h> -#include <WebKit2/WKURLCF.h> -#include <stdio.h> - -static WKBundleRef globalBundle; - -// WKBundlePageClient functions - -void didClearWindowObjectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleScriptWorldRef world, const void *clientInfo) -{ - WKURLRef wkURL = WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)); - CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKRelease(wkURL); - - LOG(@"WKBundlePageClient - didClearWindowForFrame %@", [(NSURL *)cfURL absoluteString]); - if (cfURL) - CFRelease(cfURL); - - WKStringRef messageName = WKStringCreateWithCFString(CFSTR("Callback")); - WKStringRef messageBody = WKStringCreateWithCFString(CFSTR("Window was cleared")); - WKBundlePostMessage(globalBundle, messageName, messageBody); - WKRelease(messageName); - WKRelease(messageBody); -} - - -// WKBundleClient - -void didCreatePage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo) -{ - LOG(@"WKBundleClient - didCreatePage\n"); - - WKBundlePageLoaderClient client; - memset(&client, 0, sizeof(client)); - client.didClearWindowObjectForFrame = didClearWindowObjectForFrame; - - WKBundlePageSetPageLoaderClient(page, &client); -} - -void willDestroyPage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo) -{ - LOG(@"WKBundleClient - willDestroyPage\n"); -} - -void didReceiveMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo) -{ - CFStringRef cfMessageName = WKStringCopyCFString(0, messageName); - - WKTypeID typeID = WKGetTypeID(messageBody); - if (typeID == WKStringGetTypeID()) { - CFStringRef cfMessageBody = WKStringCopyCFString(0, (WKStringRef)messageBody); - LOG(@"WKBundleClient - didReceiveMessage - MessageName: %@ MessageBody %@", cfMessageName, cfMessageBody); - CFRelease(cfMessageBody); - } else { - LOG(@"WKBundleClient - didReceiveMessage - MessageName: %@ (MessageBody Unhandled)\n", cfMessageName); - } - - CFRelease(cfMessageName); -} - -void WKBundleInitialize(WKBundleRef bundle, WKTypeRef initializationUserData) -{ - globalBundle = bundle; - - WKBundleClient client = { - kWKBundleClientCurrentVersion, - 0, - didCreatePage, - willDestroyPage, - 0, // didInitializePageGroup - didReceiveMessage, - 0 // didReceiveMessageToPage - }; - WKBundleSetClient(bundle, &client); -} diff --git a/Tools/MiniBrowser/mac/main.m b/Tools/MiniBrowser/mac/main.m deleted file mode 100644 index 7f5673749..000000000 --- a/Tools/MiniBrowser/mac/main.m +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import <Cocoa/Cocoa.h> - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/Tools/MiniBrowser/qt/MiniBrowser.pro b/Tools/MiniBrowser/qt/MiniBrowser.pro deleted file mode 100644 index 3db1c7887..000000000 --- a/Tools/MiniBrowser/qt/MiniBrowser.pro +++ /dev/null @@ -1,38 +0,0 @@ -# ------------------------------------------------------------------- -# Project file for the WebKit2 MiniBrowser binary -# -# See 'Tools/qmake/README' for an overview of the build system -# ------------------------------------------------------------------- - -TEMPLATE = app - -WEBKIT += wtf - -INCLUDEPATH += \ - $${ROOT_WEBKIT_DIR}/Source/WebCore/platform/qt \ - $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt/ - -SOURCES += \ - BrowserWindow.cpp \ - main.cpp \ - MiniBrowserApplication.cpp \ - UrlLoader.cpp \ - utils.cpp \ - -HEADERS += \ - BrowserWindow.h \ - MiniBrowserApplication.h \ - UrlLoader.h \ - utils.h \ - -TARGET = MiniBrowser -DESTDIR = $${ROOT_BUILD_DIR}/bin - -have?(FONTCONFIG): PKGCONFIG += fontconfig - -QT += network gui-private quick quick-private webkit webkit-private -macx: QT += xml - -RESOURCES += MiniBrowser.qrc - -OTHER_FILES += qml/* diff --git a/Tools/MiniBrowser/qt/raw/DerivedSources.pri b/Tools/MiniBrowser/qt/raw/DerivedSources.pri deleted file mode 100644 index dc4d2f4ff..000000000 --- a/Tools/MiniBrowser/qt/raw/DerivedSources.pri +++ /dev/null @@ -1,6 +0,0 @@ -TEMPLATE = derived - -# Make sure forwarded headers needed by this project are present -fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Tools/WebKitTestRunner $${ROOT_BUILD_DIR}/Source/include qt -fwheader_generator.depends = $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl -GENERATORS += fwheader_generator diff --git a/Tools/MiniBrowser/qt/raw/MiniBrowserRaw.pro b/Tools/MiniBrowser/qt/raw/MiniBrowserRaw.pro deleted file mode 100644 index 0503104c0..000000000 --- a/Tools/MiniBrowser/qt/raw/MiniBrowserRaw.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = subdirs -CONFIG += ordered - -derived_sources.file = DerivedSources.pri -target.file = Target.pri - -SUBDIRS = derived_sources target - -addStrictSubdirOrderBetween(derived_sources, target) diff --git a/Tools/MiniBrowser/qt/raw/Target.pri b/Tools/MiniBrowser/qt/raw/Target.pri deleted file mode 100644 index afc38ce5f..000000000 --- a/Tools/MiniBrowser/qt/raw/Target.pri +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = app -TARGET = MiniBrowserRaw - -HEADERS += \ - View.h - -SOURCES += \ - View.cpp - -DESTDIR = $${ROOT_BUILD_DIR}/bin - -QT = core gui network webkitwidgets - -WEBKIT += wtf javascriptcore webkit2 |