diff --git a/Make.config b/Make.config
index 855fbcfe738d..ae10378deba6 100644
--- a/Make.config
+++ b/Make.config
@@ -5,22 +5,20 @@ include $(TOP)/mk/subdirs.mk
-include $(TOP)/Make.config.inc
$(TOP)/Make.config.inc: $(TOP)/Make.config
@rm -f $@
- @printf "IOS_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.config HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
- @printf "MAC_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.config HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
+ @printf "IOS_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
+ @printf "MAC_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
@if which ccache > /dev/null 2>&1; then printf "ENABLE_CCACHE=1\nexport CCACHE_BASEDIR=$(abspath $(TOP)/..)\n" >> $@; echo "Found ccache on the system, enabling it"; fi
@if test -d $(TOP)/../maccore; then printf "ENABLE_XAMARIN=1\n" >> $@; echo "Detected the maccore repository, automatically enabled the Xamarin build"; fi
+include $(TOP)/Make.versions
+
PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)
#
# /!\ README /!\
#
-# A release branch requires updating:
-#
-# IOS_PACKAGE_VERSION (major/minor #)
-# MAC_PACKAGE_VERSION (major/minor #)
-# PACKAGE_VERSION_REV (set to 0 and increment for service releases or previews)
-# (and updating the same on master as well, to next version)
+# A release branch requires updating some variables.
+# This is done in Make.versions, not here.
#
ifeq ($(BRANCH_NAME),)
@@ -30,19 +28,14 @@ else
CURRENT_BRANCH:=$(BRANCH_NAME)
endif
-# TODO: reset to 0 after major/minor version bump (SRO) and increment for service releases and previews
-# Note: if not reseted to 0 we can skip a version and start with .1 or .2
-PACKAGE_VERSION_REV=0
-
IOS_PRODUCT=Xamarin.iOS
IOS_PACKAGE_NAME=Xamarin.iOS
IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
-# NEVER customize IOS_PACKAGE_VERSION itself, other parts (mtouch, web updater) are using the IOS_PACKAGE_VERSION_* variables
-IOS_PACKAGE_VERSION=12.3.$(PACKAGE_VERSION_REV).$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION)))
+IOS_PACKAGE_VERSION_REV:=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
-IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
+IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=10.0
@@ -264,10 +257,9 @@ MAC_PRODUCT=Xamarin.Mac
MAC_PACKAGE_NAME=xamarin.mac
MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
-MAC_PACKAGE_VERSION=5.1.$(PACKAGE_VERSION_REV).$(MAC_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION)))
-MAC_PACKAGE_VERSION_REV=$(PACKAGE_VERSION_REV)
+MAC_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_BUILD=$(word 4, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MAJOR_MINOR=$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR)
MAC_PACKAGE_UPDATE_ID=$(shell echo $(subst ., ,$(MAC_PACKAGE_VERSION).$(MAC_PACKAGE_VERSION_BUILD)) | awk '{printf "2%02d%02d%02d%03d",$$1,$$2,$$3,$$4}')
diff --git a/Make.versions b/Make.versions
new file mode 100644
index 000000000000..2146391bda4d
--- /dev/null
+++ b/Make.versions
@@ -0,0 +1,47 @@
+#
+# A release branch requires updating the following two variables at the bottom of this file:
+#
+# IOS_PACKAGE_VERSION (major/minor/revision #)
+# MAC_PACKAGE_VERSION (major/minor/revision #)
+#
+# Update version numbers on master as well, to the next version
+#
+
+#
+# ** Version numbers **
+#
+# Versions are defined as: Major.Minor.Revison.Build
+#
+# Major/minor (first/second numbers - max 2 digits each):
+# - Bump for major/minor releases.
+#
+# Revision (third number - max 2 digits):
+# - Reset to 0 after a major or minor bump (do not use 99 for Xcode preview
+# branches (use 0 instead), because otherwise we can't bump it further if
+# needed).
+# - Bump for service releases and previews.
+# - Bump if commit distance becomes > 999.
+# - Can also be bumped for other reasons (in particular there's no correlation
+# between Preview/Service Release #X and Revision #Y).
+# - Bumping revision to a high enough number to make it clear that there's
+# no correlation is a valid reason to bump.
+# - The revision must be bumped at the same time for both iOS and Mac
+# (otherwise the commit distance will differ).
+# - Also bump if the [IOS|MAC]_PACKAGE_VERSION lines change for any other
+# reason (otherwise we end up with repeating version numbers, since the
+# commit distance would restart at 0, while the other numbers wouldn't
+# change).
+# - Any other problem can also usually be solved by bumping the revision.
+# - Do not refactor the revision to a separate variable, because the reason
+# bumping the revision is a general solution for many problems is that it
+# also resets the commit distance (which wouldn't happen if the revision was
+# refactored to a separate variable).
+#
+# Build (fourth number - max 3 digits):
+# - Automatically calculated as the number of commits since the last time any
+# of the other three numbers changed (technically since the corresponding
+# line changed in git).
+#
+
+IOS_PACKAGE_VERSION=12.5.1.$(IOS_COMMIT_DISTANCE)
+MAC_PACKAGE_VERSION=5.5.1.$(MAC_COMMIT_DISTANCE)
diff --git a/Makefile b/Makefile
index 7748749b8472..b3dd84855443 100644
--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,19 @@ world: check-system
.PHONY: check-system
check-system:
+ @if [[ "x$(IOS_COMMIT_DISTANCE)" != "x$(MAC_COMMIT_DISTANCE)" ]]; then \
+ echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are different.$(COLOR_CLEAR)"; \
+ echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
+ echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
+ exit 1; \
+ elif (( $(IOS_COMMIT_DISTANCE) > 999 || $(MAC_COMMIT_DISTANCE) > 999 )); then \
+ echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and/or Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are > 999.$(COLOR_CLEAR)"; \
+ echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
+ echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
+ exit 1; \
+ fi
@./system-dependencies.sh
+ @echo "Building Xamarin.iOS $(IOS_PACKAGE_VERSION) and Xamarin.Mac $(MAC_PACKAGE_VERSION)"
$(DIRECTORIES):
$(Q) mkdir -p $@
diff --git a/builds/Makefile b/builds/Makefile
index 63d8ab1179e9..7e6d01fefd0a 100644
--- a/builds/Makefile
+++ b/builds/Makefile
@@ -1179,17 +1179,15 @@ $(eval $(call DeviceBuildTemplate,arm64,target64,target64,$(ARM64_ARCH_CONFIGURE
endif
ifdef INCLUDE_DEVICE
+ifdef INCLUDE_IOS
iphoneos:: setup-iphoneos build-iphoneos install-iphoneos
device:: iphoneos
clean-device: clean-iphoneos
install-device: install-iphoneos
# this needs to be here because the normal usage of this makefile is "make all install", but nothing actually lists the -iphoneos targets as dependencies.
-ifdef INCLUDE_IOS
install-local:: install-iphoneos
all-local:: install-iphoneos
-endif
-endif
LIBMONO_PROFILER_IPHONEOS_DYLIB=$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-profiler-log.dylib
@@ -1244,6 +1242,9 @@ $(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framewo
install-iphoneos:: $(IPHONEOS_TARGETS)
+endif # INCLUDE_IOS
+endif # INCLUDE_DEVICE
+
#
# Watch device build
#
@@ -1262,8 +1263,6 @@ targetwatch: build-targetwatch install-watchos
watchos:: targetwatch
.PHONY: targetwatch
-endif
-endif
.stamp-build-targetwatch: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targetwatch $(SDK_ARGS)
@@ -1356,6 +1355,9 @@ $(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono: $(BUILD_DESTDIR)/targetwatch/lib/libm
install-watchos: $(WATCHOS_TARGETS)
+endif # INCLUDE_DEVICE
+endif # INCLUDE_WATCH
+
#
# TV device build
#
@@ -1374,8 +1376,6 @@ targettv: build-targettv install-tvos
tvos:: targettv
.PHONY: targettv
-endif
-endif
.stamp-build-targettv: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targettv $(SDK_ARGS)
@@ -1467,6 +1467,9 @@ $(BUILD_DESTDIR)/targettv/tmp-lib/Mono: $(BUILD_DESTDIR)/targettv/lib/libmonosge
install-tvos: $(TVOS_TARGETS)
+endif # INCLUDE_DEVICE
+endif # INCLUDE_TVOS
+
#
# Cross compilers
#
@@ -1563,8 +1566,6 @@ offsets-tool: $(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe
##
define iOSCrossTemplate
-ifdef INCLUDE_IOS
-ifdef INCLUDE_DEVICE
$(1): build-$(1) install-$(1)
.PHONY: build-$(1) install-$(1)
@@ -1572,8 +1573,6 @@ $(1): build-$(1) install-$(1)
build:: build-$(1)
install-local:: install-$(1)
clean-local:: clean-$(1)
-endif
-endif
.stamp-build-$(1): .stamp-build-llvm $(MONO_PATH)/configure $(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe $(MONO_DEPENDENCIES) $(SDK_CONFIG)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-$(1) $(SDK_ARGS) $(if $(5), XCODE_DIR=$(5))
@@ -1597,6 +1596,10 @@ clean-$(1): $(SDK_CONFIG)
endef
+ifdef INCLUDE_IOS
+ifdef INCLUDE_DEVICE
$(eval $(call iOSCrossTemplate,cross32,llvm32,arm-darwin-mono-sgen,arm-darwin-mono-sgen,$(XCODE94_DEVELOPER_ROOT)))
$(eval $(call iOSCrossTemplate,cross64,llvm64,arm64-darwin-mono-sgen,aarch64-darwin-mono-sgen))
$(eval $(call iOSCrossTemplate,crosswatch,llvm32,armv7k-unknown-darwin-mono-sgen,armv7k-unknown-darwin-mono-sgen,$(XCODE94_DEVELOPER_ROOT)))
+endif
+endif
diff --git a/docs/website/generator-errors.md b/docs/website/generator-errors.md
index 1fa378b47e01..62f6ca29692e 100644
--- a/docs/website/generator-errors.md
+++ b/docs/website/generator-errors.md
@@ -13,9 +13,9 @@ dateupdated: 2017-06-26
E.g. parameters, environment
-### BI0000: Unexpected error - Please fill a bug report at https://bugzilla.xamarin.com
+### BI0000: Unexpected error - Please fill a bug report at https://github.com/xamarin/xamarin-macios/issues/new
-An unexpected error condition occurred. Please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with as much information as possible, including:
+An unexpected error condition occurred. Please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with as much information as possible, including:
* Full build logs, with maximum verbosity
* A minimal test case that reproduce the error
@@ -37,7 +37,7 @@ An invalid target framework was passed using the --target-framework argument. Pl
### BI0086: A target framework (--target-framework) must be specified when building for *.
-This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case.
+This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
# BI1xxx: code generation
@@ -100,7 +100,7 @@ Please go to [[FieldAttribute]](https://developer.xamarin.com/guides/cross-platf
### BI1027: Support for ZeroCopy strings is not implemented. Strings will be marshalled as NSStrings.
-### BI1028: Internal sanity check failed, please file a bug report (http://bugzilla.xamarin.com) with a test case.
+### BI1028: Internal sanity check failed, please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
### BI1029: Internal error: invalid enum mode for type '*'
@@ -134,7 +134,7 @@ Please go to [[FieldAttribute]](https://developer.xamarin.com/guides/cross-platf
### BI1046: The [Field] constant {fa.SymbolName} cannot only be used once inside enum {type.Name}.
-### BI1047: Unsupported platform: *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.
+### BI1047: Unsupported platform: *. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
### BI1048: Unsupported type * decorated with [BindAs].
@@ -142,31 +142,31 @@ Please go to [[FieldAttribute]](https://developer.xamarin.com/guides/cross-platf
### BI1050: [BindAs] cannot be used inside Protocol or Model types. Type: *
-### BI1051: Internal error: Don't know how to get attributes for *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.
+### BI1051: Internal error: Don't know how to get attributes for *. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-### BI1052: Internal error: Could not find the type * in the assembly *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.
+### BI1052: Internal error: Could not find the type * in the assembly *. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
### BI1053: Internal error: unknown target framework '*'.
-### BI1054: Internal error: can't convert type '*' (unknown assembly). Please file a bug report (https://bugzilla.xamarin.com) with a test case.
+### BI1054: Internal error: can't convert type '*' (unknown assembly). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
+This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-### BI1055: Internal error: failed to convert type '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.
+### BI1055: Internal error: failed to convert type '*'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
+This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-### BI1056: Internal error: failed to instantiate mock attribute '*' (could not convert type constructor argument #*). Please file a bug report (https://bugzilla.xamarin.com) with a test case.
+### BI1056: Internal error: failed to instantiate mock attribute '*' (could not convert type constructor argument #*). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
+This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-### BI1057: Internal error: failed to instantiate mock attribute '*' (could not convert constructor type #* (*)). Please file a bug report (https://bugzilla.xamarin.com) with a test case.
+### BI1057: Internal error: failed to instantiate mock attribute '*' (could not convert constructor type #* (*)). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
+This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-### BI1058: Internal error: could not find a constructor for the mock attribute '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.
+### BI1058: Internal error: could not find a constructor for the mock attribute '*'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
-This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
+This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
### BI1059: Found * * attributes on the member *. At most one was expected.
diff --git a/docs/website/mmp-errors.md b/docs/website/mmp-errors.md
index 135188da45ce..5816f66a8ef4 100644
--- a/docs/website/mmp-errors.md
+++ b/docs/website/mmp-errors.md
@@ -18,9 +18,9 @@ E.g. parameters, environment, missing tools.
-#### MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
+#### MM0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
-An unexpected error condition occurred. Please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac) with as much information as possible, including:
+An unexpected error condition occurred. Please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with as much information as possible, including:
* Full build logs, with maximum verbosity (e.g. `-v -v -v -v` in the **Additional mmp arguments**);
* A minimal test case that reproduce the error; and
@@ -114,9 +114,9 @@ An error occurred while loading the assemblies from the root assembly references
-#### MM0071: Unknown platform: *. This usually indicates a bug in Xamarin.Mac; please file a bug report at https://bugzilla.xamarin.com with a test case.
+#### MM0071: Unknown platform: *. This usually indicates a bug in Xamarin.Mac; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.
-This usually indicates a bug in Xamarin.Mac; please file a bug report at [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac) with a test case.
+This usually indicates a bug in Xamarin.Mac; please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
@@ -153,6 +153,8 @@ Xamarin.Mac requires the header files, from the SDK version specified in the err
One potential, alternative solution, is to enable the managed linker. This will remove unused API including, in most cases, the new API where the header files are missing (or incomplete). However this will not work if your project uses API that was introduced in a newer SDK than the one your Xcode provides.
+To enable the managed linker, go to your project's Mac Build Options, and set `Linker Behavior` to either `Link Framework SDKs only` or `Link All`.
+
A second potential, alternative solution, is use the dynamic registrar instead. This will impose a startup cost by dynamically registering types but remove the header file requirement.
A last-straw solution would be to use an older version of Xamarin.Mac, one that supports the SDK your project requires.
@@ -167,7 +169,7 @@ A last-straw solution would be to use an older version of Xamarin.Mac, one that
-#### MM0099: Internal error {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).
+#### MM0099: Internal error {0}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).
@@ -221,7 +223,7 @@ In addition 32-bit applications will not run on the version of macOS after High
For more details: https://developer.apple.com/news/?id=06282017a
-Consider updating your application and any dependencies to 64-bit.
+Consider [updating your application and any dependencies](https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/32-and-64/mac-64-bit) to 64-bit.
@@ -393,7 +395,7 @@ Change the architecture in the project's Mac Build options to 'x86_64' in order
An unexpected error occured when processing an assembly.
-The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](https://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**).
+The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](https://github.com/xamarin/xamarin-macios/issues/new) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**).
@@ -444,6 +446,10 @@ Consider using `lipo` to remove the unnecessary archtectures permanently from th
#### MM2109: Xamarin.Mac Classic API does not support Platform Linking.
+
+
+#### MM2109: Xamarin.Mac 'Partial Static' registrar does not support linking. Disable linking or use another registrar mode.
+
## MM3xxx: AOT
### MM30xx: AOT (general) errors
@@ -573,7 +579,7 @@ that uses blocks. It's recommended to use a binding project to bind
Objective-C code, in particular when it involves blocks, since it's quite
complicated to get it right when doing it manually.
-If this is not the case, please file a bug at [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac) with a test case.
+If this is not the case, please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
## MM5xxx: GCC and toolchain
@@ -587,7 +593,7 @@ If this is not the case, please file a bug at [https://bugzilla.xamarin.com](htt
-#### MM5103: Failed to compile. Error code - {0}. Please file a bug report at http://bugzilla.xamarin.com
+#### MM5103: Failed to compile. Error code - {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
### MM52xx: linking
@@ -695,7 +701,7 @@ See the [equivalent mtouch warning](~/ios/troubleshooting/mtouch-errors.md#MT521
#### MM8025: Failed to compute the token reference for the type '{type.AssemblyQualifiedName}' because {reasons}
-This indicates a bug in Xamarin.Mac. Please file a bug at [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac).
+This indicates a bug in Xamarin.Mac. Please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new).
A potential workaround would be to disable the `register-protocols`
optimization, by passing `--optimize:-register-protocols` as an additional mmp
@@ -705,7 +711,7 @@ argument in the project's Mac Build options.
#### MM8026: * is not supported when the dynamic registrar has been linked away.
-This usually indicates a bug in Xamarin.Mac, because the dynamic registrar should not be linked away if it's needed. Please file a bug at [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac).
+This usually indicates a bug in Xamarin.Mac, because the dynamic registrar should not be linked away if it's needed. Please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new).
It's possible to force the linker to keep the dynamic registrar by adding
`--optimize=-remove-dynamic-registrar` to the additional mmp arguments in
@@ -737,8 +743,7 @@ There are a few reasons this may happen:
* Incorrect bindings for third-party libraries.
* Reference-counting bugs in third-party libraries.
-* It could be a bug in Xamarin.Mac. If this is the case, please file a bug at
- [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac).
+* It could be a bug in Xamarin.Mac. If this is the case, please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new).
### MM8028: The runtime function {function} has been linked away.
diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md
index 460f4d62f802..7be3a24de17b 100644
--- a/docs/website/mtouch-errors.md
+++ b/docs/website/mtouch-errors.md
@@ -22,7 +22,7 @@ E.g. parameters, environment, missing tools.
-### MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com
+### MT0000: Unexpected error - Please fill a bug report at https://github.com/xamarin/xamarin-macios/issues/new
An unexpected error condition occurred. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new) with as much information as possible, including:
@@ -427,7 +427,7 @@ An invalid target framework was passed using the --target-framework argument. Pl
-### MT0071: Unknown platform: *. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.
+### MT0071: Unknown platform: *. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.
This usually indicates a bug in Xamarin.iOS; please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
@@ -541,6 +541,8 @@ Xamarin.iOS requires the header files, from the SDK version specified in the err
A potential, alternative solution is to enable the managed linker. This will remove unused API including, in most cases, the new API where the header files are missing (or incomplete). However this will not work if your project uses API that was introduced in a newer SDK than the one your Xcode provides.
+To enable the managed linker, go to your project's iOS Build Options, and set `Linker Behavior` to either `Link Framework SDKs only` or `Link All`.
+
A last-straw solution would be to use an older version of Xamarin.iOS, one that supports the SDK your project requires.
@@ -564,7 +566,7 @@ A last-straw solution would be to use an older version of Xamarin.iOS, one that
-### MT0099: Internal error *. Please file a bug report with a test case (http://bugzilla.xamarin.com).
+### MT0099: Internal error *. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).
This error message is reported when an internal consistency check in Xamarin.iOS fails.
@@ -572,7 +574,7 @@ This usually indicates a bug in Xamarin.iOS; please file a new issue on [github]
-### MT0100: Invalid assembly build target: '*'. Please file a bug report with a test case (http://bugzilla.xamarin.com).
+### MT0100: Invalid assembly build target: '*'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).
This error message is reported when an internal consistency check in Xamarin.iOS fails.
@@ -1015,7 +1017,7 @@ with your full version information and build log output.
-### MT1013: Dependency tracking error: no files to compare. Please file a bug report at http://bugzilla.xamarin.com with a test case.
+### MT1013: Dependency tracking error: no files to compare. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.
This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
@@ -1841,7 +1843,7 @@ An error occurred when generating `main.m`. Please file a new issue on [github](
-### MT4002: Failed to compile the generated code for P/Invoke methods. Please file a bug report at http://bugzilla.xamarin.com
+### MT4002: Failed to compile the generated code for P/Invoke methods. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
Failed to compile the generated code for P/Invoke methods. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -1911,7 +1913,7 @@ If you believe Xamarin.iOS should support the type in question, please file an e
-### MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com
+### MT4109: Failed to compile the generated registrar code. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
Failed to compile the generated code for the registrar. The build log will contain the output from the native compiler, explaining why the code isn't compiling.
@@ -1935,7 +1937,7 @@ This is always a bug in Xamarin.iOS; please file a new issue on [github](https:/
-### MT4114: Unexpected error in the registrar for the method '\*.\*' - Please file a bug report at http://bugzilla.xamarin.com
+### MT4114: Unexpected error in the registrar for the method '\*.\*' - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
@@ -1955,7 +1957,7 @@ This is always a bug in Xamarin.iOS; please file a new issue on [github](https:/
-### MT4120: The registrar found an unknown field type '\*' in field '\*.*'. Please file a bug report at http://bugzilla.xamarin.com
+### MT4120: The registrar found an unknown field type '\*' in field '\*.*'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This error indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -1973,7 +1975,7 @@ This error indicates a bug in Xamarin.iOS. Please file a new issue on [github](h
-### MT4124: Invalid * found on '*'. Please file a bug report at http://bugzilla.xamarin.com
+### MT4124: Invalid * found on '*'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This error indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -2091,7 +2093,7 @@ In this case Xamarin.iOS will override `retain`, `release` and `dealloc` on the
-### MT4144: Cannot register the method '*' since it does not have an associated trampoline. Please file a bug report at http://bugzilla.xamarin.com.
+### MT4144: Cannot register the method '*' since it does not have an associated trampoline. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -2181,7 +2183,7 @@ Please upgrade Xcode.
-### MT4163: Internal error in the registrar (*). Please file a bug report at http://bugzilla.xamarin.com
+### MT4163: Internal error in the registrar (*). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This error indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -2251,9 +2253,6 @@ we're open to adding support for new combinations of types. If this is the
case, please file an enhancement request on [github](https://github.com/xamarin/xamarin-macios/issues/new)
with a test case and we'll evaluate it.
-[1]: https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS
-[2]: https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=General&bug_severity=enhancement
-
### MT4173: The registrar can't compute the block signature for the delegate of type {delegate-type} in the method {method} because *.
This is a warning indicating that the registrar couldn't inject the block
@@ -2287,7 +2286,7 @@ that uses blocks. It's recommended to use a binding project to bind
Objective-C code, in particular when it involves blocks, since it's quite
complicated to get it right when doing it manually.
-If this is not the case, please file a bug at [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case.
+If this is not the case, please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
### MT4175: The parameter '{parameter}' in the method '{method}' has an invalid BlockProxy attribute (the type passed to the attribute does not have a 'Create' method).
@@ -2337,7 +2336,7 @@ that uses blocks. It's recommended to use a binding project to bind
Objective-C code, in particular when it involves blocks, since it's quite
complicated to get it right when doing it manually.
-If this is not the case, please file a bug at [https://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case.
+If this is not the case, please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
# MT5xxx: GCC and toolchain error messages
@@ -2354,11 +2353,11 @@ If this is not the case, please file a bug at [https://bugzilla.xamarin.com](htt
-### MT5102: Failed to assemble the file '*'. Please file a bug report at http://bugzilla.xamarin.com
+### MT5102: Failed to assemble the file '*'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
-### MT5103: Failed to compile the file '*'. Please file a bug report at http://bugzilla.xamarin.com
+### MT5103: Failed to compile the file '*'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
@@ -2368,7 +2367,7 @@ If this is not the case, please file a bug at [https://bugzilla.xamarin.com](htt
-### MT5106: Could not compile the file(s) '*'. Please file a bug report at http://bugzilla.xamarin.com
+### MT5106: Could not compile the file(s) '*'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This usually indicates a bug in Xamarin.iOS; please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -2527,11 +2526,23 @@ This is a warning, indicating that a P/Invoke was detected to reference the libr
-### MT5216: Native linking failed for *. Please file a bug report at http://bugzilla.xamarin.com
+### MT5216: Native linking failed for *. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
-This error is reported when linking the output from the AOT compiler.
+This error is reported when linking the output from the AOT compiler fails.
-This error most likely indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
+One potential reason is if:
+
+* The project depends on third-party native libraries, and tries to link with
+ them by passing them to the native linker using the additional mtouch
+ arguments in the project's iOS Build options.
+* "Incremental builds" is enabled.
+
+If this is the case, please try disabling "Incremental builds" in the
+project's iOS Build options. An alternative solution is to create a binding
+project for the native library.
+
+If this is not the case, this error most likely indicates a bug in
+Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -3142,13 +3153,13 @@ Where * can be:
-### MT8008: The loaded version of Xamarin.iOS.dll was compiled for * bits, while the process is * bits. Please file a bug at http://bugzilla.xamarin.com.
+### MT8008: The loaded version of Xamarin.iOS.dll was compiled for * bits, while the process is * bits. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
This indicates something is wrong in the build process. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
-### MT8009: Unable to locate the block to delegate conversion method for the method *.*'s parameter #*. Please file a bug at http://bugzilla.xamarin.com.
+### MT8009: Unable to locate the block to delegate conversion method for the method *.*'s parameter #*. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
This indicates an API wasn't bound correctly. If this is an API exposed by Xamarin, please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new)., if it's a third-party binding, please contact the vendor.
@@ -3160,7 +3171,7 @@ This indicates something is wrong in the build process. Please file a new issue
-### MT8011: Unable to locate the delegate to block conversion attribute ([DelegateProxy]) for the return value for the method *.*. Please file a bug at http://bugzilla.xamarin.com.
+### MT8011: Unable to locate the delegate to block conversion attribute ([DelegateProxy]) for the return value for the method *.*. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/newn
Xamarin.iOS was unable to locate a required method at runtime (to convert a delegate to a block).
@@ -3168,7 +3179,7 @@ This usually indicates a bug in Xamarin.iOS. Please file a new issue on [github]
-### MT8012: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType is null. Please file a bug at http://bugzilla.xamarin.com.
+### MT8012: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType is null. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
The DelegateProxy attribute for the method in question is invalid.
@@ -3176,7 +3187,7 @@ This usually indicates a bug in Xamarin.iOS. Please file a new issue on [github]
-### MT8013: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType ({2}) specifies a type without a 'Handler' field. Please file a bug at http://bugzilla.xamarin.com.
+### MT8013: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType ({2}) specifies a type without a 'Handler' field. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
The `[DelegateProxy]` attribute for the method in question is invalid.
@@ -3184,7 +3195,7 @@ This usually indicates a bug in Xamarin.iOS. Please file a new issue on [github]
-### MT8014: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is null. Please file a bug at http://bugzilla.xamarin.com.
+### MT8014: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is null. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
The `[DelegateProxy]` attribute for the method in question is invalid.
@@ -3192,7 +3203,7 @@ This usually indicates a bug in Xamarin.iOS. Please file a new issue on [github]
-### MT8015: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is not a delegate, it's a *. Please file a bug at http://bugzilla.xamarin.com.
+### MT8015: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is not a delegate, it's a *. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
The DelegateProxy attribute for the method in question is invalid.
@@ -3200,7 +3211,7 @@ This usually indicates a bug in Xamarin.iOS. Please file a new issue on [github]
-### MT8016: Unable to convert delegate to block for the return value for the method *.*, because the input isn't a delegate, it's a *. Please file a bug at http://bugzilla.xamarin.com.
+### MT8016: Unable to convert delegate to block for the return value for the method *.*, because the input isn't a delegate, it's a *. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
The `[DelegateProxy]` attribute for the method in question is invalid.
@@ -3210,7 +3221,7 @@ This usually indicates a bug in Xamarin.iOS. Please file a new issue on [github]
-### MT8018: Internal consistency error. Please file a bug report at http://bugzilla.xamarin.com.
+### MT8018: Internal consistency error. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
@@ -3234,19 +3245,19 @@ This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https:/
-### MT8022: Expected the token reference * to be a *, but it's a *. Please file a bug report at http://bugzilla.xamarin.com.
+### MT8022: Expected the token reference * to be a *, but it's a *. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
-### MT8023: An instance object is required to construct a closed generic method for the open generic method: * (token reference: *). Please file a bug report at http://bugzilla.xamarin.com.
+### MT8023: An instance object is required to construct a closed generic method for the open generic method: * (token reference: *). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).
-### MT8024: Could not find a valid extension type for the smart enum '{smart_type}'. Please file a bug at https://bugzilla.xamarin.com.
+### MT8024: Could not find a valid extension type for the smart enum '{smart_type}'. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
It's possible to force the linker to keep the dynamic registrar by adding
`--optimize=-remove-dynamic-registrar` to the additional mtouch arguments in
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index e4a77987e088..4c9893f98565 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -243,6 +243,18 @@ def uploadFiles (glob, virtualPath)
])
}
+@NonCPS
+def getUpdateInfoAndVersion (file)
+{
+ def result = [:]
+ def match = file =~ /xamarin.(mac|ios)-(\d+(\.\d+)+).*.pkg$/
+ if (match.matches()) {
+ result['platform'] = match[0][1]
+ result['version'] = match[0][2]
+ }
+ return result
+}
+
// There must be a better way than this hack to show a
// message in red in the Jenkins Blue Ocean UI...
def echoError (message)
@@ -462,13 +474,29 @@ timestamps {
def file = uploadingFiles [i]
def f_length = file.length;
def md5 = sh (returnStdout: true, script: "md5 -q '${file}'").trim ()
- def sha256 = sh (returnStdout: true, script: "shasum -a 256").trim ().split (" ") [0];
+ def sha256 = sh (returnStdout: true, script: "shasum -a 256 ${file}").trim ().split (" ") [0];
manifest += "${packagePrefix}/${file.name}\n"
artifacts += " {\n"
artifacts += " \"file\": \"${file.name}\",\n"
artifacts += " \"url\": \"${packagePrefix}/${file.name}\",\n"
artifacts += " \"md5\": \"${md5}\",\n"
artifacts += " \"sha256\": \"${sha256}\",\n"
+ def map = getUpdateInfoAndVersion (file.name)
+ def platform = map['platform']
+ if (platform) {
+ try {
+ def updateInfo = readFile "package/${platform}-updateinfo"
+ def parts = updateInfo.trim ().split (" ")
+ artifacts += " \"productId\": \"${parts[0]}\",\n"
+ artifacts += " \"releaseId\": \"${parts[1]}\",\n"
+ } catch (ex) {
+ echo "Did not find updateinfo file for xamarin.${platform}"
+ }
+ }
+ def version = map['version']
+ if (version) {
+ artifacts += " \"version\": \"${version}\",\n"
+ }
artifacts += " \"size\": ${f_length}\n"
artifacts += " }"
if (i < uploadingFiles.length - 1)
diff --git a/jenkins/build.sh b/jenkins/build.sh
index aabbaf87e23b..d6f18252fd80 100755
--- a/jenkins/build.sh
+++ b/jenkins/build.sh
@@ -59,13 +59,14 @@ fi
if test -z "$ENABLE_DEVICE_BUILD"; then
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-ios-device"
fi
-# shellcheck disable=SC2086
-./configure $CONFIGURE_FLAGS
make reset
make git-clean-all
make print-versions
+# shellcheck disable=SC2086
+./configure $CONFIGURE_FLAGS
+
time make -j8
time make install -j8
diff --git a/jenkins/compare.sh b/jenkins/compare.sh
index 4c5d32751575..a87fdee66689 100755
--- a/jenkins/compare.sh
+++ b/jenkins/compare.sh
@@ -81,7 +81,9 @@ else
fi
printf "\\n" >> "$WORKSPACE/jenkins/pr-comments.md"
-if grep "^[+-][^+-]" jenkins-results/generator-diff/generator.diff | grep -v "^.[[]assembly: AssemblyInformationalVersion" | grep -v "^[+-][[:space:]]*internal const string Revision =" >/dev/null 2>&1; then
+if ! test -s jenkins-results/generator-diff/generator.diff; then
+ printf "✅ [Generator Diff](%s) (no change)" "$URL_GENERATOR" >> "$WORKSPACE/jenkins/pr-comments.md"
+elif grep "^[+-][^+-]" jenkins-results/generator-diff/generator.diff | grep -v "^.[[]assembly: AssemblyInformationalVersion" | grep -v "^[+-][[:space:]]*internal const string Revision =" >/dev/null 2>&1; then
printf "ℹ️ [Generator Diff](%s) (please review changes)" "$URL_GENERATOR" >> "$WORKSPACE/jenkins/pr-comments.md"
else
printf "✅ [Generator Diff](%s) (only version changes)" "$URL_GENERATOR" >> "$WORKSPACE/jenkins/pr-comments.md"
diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
index 86229f5e0b26..cb4b4d895059 100644
--- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
+++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
@@ -27,8 +27,10 @@ Copyright (C) 2014 Xamarin. All rights reserved.
+
+
@@ -73,6 +75,12 @@ Copyright (C) 2014 Xamarin. All rights reserved.
<_PreparedResourceRules>
<_AppBundleName>$(AssemblyName)
+
+
+
+ <_ACTool_PartialAppManifestCache>$(IntermediateOutputPath)actool\_PartialAppManifest.items
+ <_ACTool_BundleResourceCache>$(IntermediateOutputPath)actool\_BundleResourceWithLogicalName.items
+
@@ -558,12 +566,40 @@ Copyright (C) 2014 Xamarin. All rights reserved.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
();
var modified = new HashSet ();
var items = new List ();
diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs
index 38f6ae363de5..cffba849503e 100644
--- a/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs
+++ b/msbuild/Xamarin.iOS.Tasks.Core/Tasks/CompileAppManifestTaskBase.cs
@@ -36,6 +36,8 @@ public abstract class CompileAppManifestTaskBase : Xamarin.MacDev.Tasks.CompileA
[Required]
public bool Debug { get; set; }
+ public bool UseFakeWatchOS4_3Sdk { get; set; }
+
public string DebugIPAddresses { get; set; }
public string ResourceRules { get; set; }
@@ -154,29 +156,65 @@ bool Compile (PDictionary plist)
plist.SetIfNotPresent (ManifestKeys.CFBundleVersion, "1.0");
plist.SetIfNotPresent (ManifestKeys.CFBundleShortVersionString, plist.GetCFBundleVersion ());
+ string dtCompiler = null;
+ string dtPlatformBuild = null;
+ string dtSDKBuild = null;
+ string dtPlatformName = null;
+ string dtPlatformVersion = null;
+ string dtXcode = null;
+ string dtXcodeBuild = null;
+
if (!SdkIsSimulator) {
- SetValue (plist, "DTCompiler", sdkSettings.DTCompiler);
- SetValue (plist, "DTPlatformBuild", dtSettings.DTPlatformBuild);
- SetValue (plist, "DTSDKBuild", sdkSettings.DTSDKBuild);
+ dtCompiler = sdkSettings.DTCompiler;
+ dtPlatformBuild = dtSettings.DTPlatformBuild;
+ dtSDKBuild = sdkSettings.DTSDKBuild;
}
- plist.SetIfNotPresent ("DTPlatformName", SdkPlatform.ToLowerInvariant ());
+ dtPlatformName = SdkPlatform.ToLowerInvariant ();
if (!SdkIsSimulator)
- SetValue (plist, "DTPlatformVersion", dtSettings.DTPlatformVersion);
+ dtPlatformVersion = dtSettings.DTPlatformVersion;
- var sdkName = sdkSettings.CanonicalName;
+ var dtSDKName = sdkSettings.CanonicalName;
// older sdksettings didn't have a canonicalname for sim
- if (SdkIsSimulator && string.IsNullOrEmpty (sdkName)) {
+ if (SdkIsSimulator && string.IsNullOrEmpty (dtSDKName)) {
var deviceSdkSettings = currentSDK.GetSdkSettings (sdkVersion, false);
- sdkName = deviceSdkSettings.AlternateSDK;
+ dtSDKName = deviceSdkSettings.AlternateSDK;
}
- SetValue (plist, "DTSDKName", sdkName);
if (!SdkIsSimulator) {
- SetValue (plist, "DTXcode", AppleSdkSettings.DTXcode);
- SetValue (plist, "DTXcodeBuild", dtSettings.DTXcodeBuild);
+ dtXcode = AppleSdkSettings.DTXcode;
+ dtXcodeBuild = dtSettings.DTXcodeBuild;
+ }
+
+ if (UseFakeWatchOS4_3Sdk) {
+ // This is a workaround for https://github.com/xamarin/xamarin-macios/issues/4810
+ if (Framework == PlatformFramework.WatchOS) {
+ if (dtPlatformBuild != null)
+ dtPlatformBuild = "15T212";
+ if (dtPlatformVersion != null)
+ dtPlatformVersion = "4.3";
+ if (dtSDKBuild != null)
+ dtSDKBuild = "15T212";
+ if (dtSDKName != null)
+ dtSDKName = "watchos4.3";
+ if (dtXcode != null)
+ dtXcode = "0940";
+ if (dtXcodeBuild != null)
+ dtXcodeBuild = "9F1027a";
+ } else {
+ Log.LogWarning ("Can only fake the watchOS 4.3 SDK when building for watchOS.");
+ }
}
+ SetValueIfNotNull (plist, "DTCompiler", dtCompiler);
+ SetValueIfNotNull (plist, "DTPlatformBuild", dtPlatformBuild);
+ SetValueIfNotNull (plist, "DTSDKBuild", dtSDKBuild);
+ plist.SetIfNotPresent ("DTPlatformName", dtPlatformName);
+ SetValueIfNotNull (plist, "DTPlatformVersion", dtPlatformVersion);
+ SetValue (plist, "DTSDKName", dtSDKName);
+ SetValueIfNotNull (plist, "DTXcode", dtXcode);
+ SetValueIfNotNull (plist, "DTXcodeBuild", dtXcodeBuild);
+
SetDeviceFamily (plist);
plist.SetIfNotPresent (ManifestKeys.MinimumOSVersion, minimumOSVersion.ToString ());
@@ -235,6 +273,13 @@ bool Compile (PDictionary plist)
return !Log.HasLoggedErrors;
}
+ void SetValueIfNotNull (PDictionary dict, string key, string value)
+ {
+ if (value == null)
+ return;
+ SetValue (dict, key, value);
+ }
+
void SetRequiredArchitectures (PDictionary plist)
{
PObject capabilities;
diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.AppExtension.Common.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.AppExtension.Common.targets
index 54d622b8998a..d4a75b552326 100644
--- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.AppExtension.Common.targets
+++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.WatchOS.AppExtension.Common.targets
@@ -24,6 +24,8 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved.
true
+
+ True
diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
index ff54f2301f14..d27d2b073121 100644
--- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
+++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
@@ -701,6 +701,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
SdkPlatform="$(_SdkPlatform)"
SdkIsSimulator="$(_SdkIsSimulator)"
DebugIPAddresses="$(_DebugIPAddresses)"
+ UseFakeWatchOS4_3Sdk="$(UseFakeWatchOS4_3Sdk)"
>
@@ -1275,10 +1276,11 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
+ DependsOnTargets="_BeforeCoreCompileSceneKitAssets;_GenerateBundleName">
+
+
+
+ CFBundleName
+ MySceneKitApp
+ CFBundleIdentifier
+ com.xamarin.MySceneKitApp.MySceneKitApp
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1.0
+ LSRequiresIPhoneOS
+
+ MinimumOSVersion
+ 11.0
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/msbuild/tests/MySceneKitApp/MySceneKitApp.csproj b/msbuild/tests/MySceneKitApp/MySceneKitApp.csproj
new file mode 100644
index 000000000000..fa4635b006a4
--- /dev/null
+++ b/msbuild/tests/MySceneKitApp/MySceneKitApp.csproj
@@ -0,0 +1,94 @@
+
+
+
+ Debug
+ iPhoneSimulator
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}
+ {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Exe
+ MySceneKitApp
+ MySceneKitApp
+ Resources
+
+
+ true
+ full
+ false
+ bin\iPhoneSimulator\Debug
+ DEBUG;ENABLE_TEST_CLOUD;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ true
+ 44556
+ None
+ x86_64
+ NSUrlSessionHandler
+ x86
+
+
+ pdbonly
+ true
+ bin\iPhone\Release
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ SdkOnly
+ ARM64
+ NSUrlSessionHandler
+ x86
+
+
+ pdbonly
+ true
+ bin\iPhoneSimulator\Release
+ prompt
+ 4
+ iPhone Developer
+ true
+ None
+ x86_64
+ NSUrlSessionHandler
+ x86
+
+
+ true
+ full
+ false
+ bin\iPhone\Debug
+ DEBUG;ENABLE_TEST_CLOUD;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ true
+ true
+ true
+ 48889
+ SdkOnly
+ ARM64
+ NSUrlSessionHandler
+ x86
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msbuild/tests/MySceneKitApp/MySceneKitApp.sln b/msbuild/tests/MySceneKitApp/MySceneKitApp.sln
new file mode 100644
index 000000000000..f4fa94441e87
--- /dev/null
+++ b/msbuild/tests/MySceneKitApp/MySceneKitApp.sln
@@ -0,0 +1,23 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySceneKitApp", "MySceneKitApp.csproj", "{D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Debug|iPhone = Debug|iPhone
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Release|iPhone.ActiveCfg = Release|iPhone
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Release|iPhone.Build.0 = Release|iPhone
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {D210EFF2-06EF-4DB0-9F0E-2BFAF873D824}.Debug|iPhone.Build.0 = Debug|iPhone
+ EndGlobalSection
+EndGlobal
diff --git a/msbuild/tests/MySceneKitApp/art.scnassets/scene.scn b/msbuild/tests/MySceneKitApp/art.scnassets/scene.scn
new file mode 100644
index 000000000000..5b0d1c58aa14
Binary files /dev/null and b/msbuild/tests/MySceneKitApp/art.scnassets/scene.scn differ
diff --git a/msbuild/tests/MySceneKitApp/art.scnassets/texture.png b/msbuild/tests/MySceneKitApp/art.scnassets/texture.png
new file mode 100644
index 000000000000..ba392589b700
Binary files /dev/null and b/msbuild/tests/MySceneKitApp/art.scnassets/texture.png differ
diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CompileSceneKitAssetsTest.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CompileSceneKitAssetsTest.cs
new file mode 100644
index 000000000000..58bacee2fad8
--- /dev/null
+++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/CompileSceneKitAssetsTest.cs
@@ -0,0 +1,33 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Diagnostics;
+using System.Collections.Generic;
+
+using NUnit.Framework;
+
+using Xamarin.Tests;
+
+namespace Xamarin.iOS.Tasks
+{
+ // [TestFixture ("iPhone")] // Skip this to speed things up a bit.
+ [TestFixture ("iPhoneSimulator")]
+ public class CompileSceneKitAssetsTest : ProjectTest
+ {
+ public CompileSceneKitAssetsTest (string platform) : base (platform)
+ {
+ }
+
+ [Test]
+ public void Compilation ()
+ {
+ var csproj = BuildProject ("MySceneKitApp", Platform, "Debug", clean: true);
+ var appPath = Path.Combine (Path.GetDirectoryName (csproj), "bin", Platform, "Debug", "MySceneKitApp.app");
+ var scenePath = Path.GetFullPath (Path.Combine (appPath, "art.scnassets", "scene.scn"));
+
+ var xml = Configuration.ReadPListAsXml (scenePath);
+ Assert.That (xml, Is.StringContaining ("art.scnassets/texture.png"), "asset with path");
+ }
+ }
+}
diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj
index c6e8dd7dac62..3fae72678c6b 100644
--- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj
+++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj
@@ -109,6 +109,7 @@
+
diff --git a/runtime/runtime.m b/runtime/runtime.m
index bbd9b28e7aa7..2ab99e13c2fa 100644
--- a/runtime/runtime.m
+++ b/runtime/runtime.m
@@ -329,7 +329,7 @@
mobj = mono_gchandle_get_target (gchandle);
#if DEBUG
if (self != xamarin_get_nsobject_handle (mobj)) {
- xamarin_assertion_message ("Internal consistency error, please file a bug (http://bugzilla.xamarin.com). Additional data: found managed object %p=%p (%s) in native object %p (%s).\n",
+ xamarin_assertion_message ("Internal consistency error, please file a bug (https://github.com/xamarin/xamarin-macios/issues/new). Additional data: found managed object %p=%p (%s) in native object %p (%s).\n",
mobj, xamarin_get_nsobject_handle (mobj), xamarin_class_get_full_name (mono_object_get_class (mobj), exception_gchandle), self, object_getClassName (self));
}
#endif
@@ -357,7 +357,7 @@ void xamarin_framework_peer_unlock ()
xamarin_get_nsvalue_class ()
{
if (nsvalue_class == NULL)
- xamarin_assertion_message ("Internal consistency error, please file a bug (https://bugzilla.xamarin.com). Additional data: can't get the %s class because it's been linked away.\n", "NSValue");
+ xamarin_assertion_message ("Internal consistency error, please file a bug (https://github.com/xamarin/xamarin-macios/issues/new). Additional data: can't get the %s class because it's been linked away.\n", "NSValue");
return nsvalue_class;
}
@@ -365,7 +365,7 @@ void xamarin_framework_peer_unlock ()
xamarin_get_nsnumber_class ()
{
if (nsnumber_class == NULL)
- xamarin_assertion_message ("Internal consistency error, please file a bug (https://bugzilla.xamarin.com). Additional data: can't get the %s class because it's been linked away.\n", "NSNumber");
+ xamarin_assertion_message ("Internal consistency error, please file a bug (https://github.com/xamarin/xamarin-macios/issues/new). Additional data: can't get the %s class because it's been linked away.\n", "NSNumber");
return nsnumber_class;
}
@@ -916,7 +916,7 @@ -(void) xamarinSetGCHandle: (int) gc_handle;
if (xamarin_get_is_mkbundle ()) {
assembly = mono_assembly_open (name, NULL);
if (assembly == NULL)
- xamarin_assertion_message ("Could not find the required assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: http://bugzilla.xamarin.com", name);
+ xamarin_assertion_message ("Could not find the required assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
return assembly;
}
#endif
@@ -933,16 +933,16 @@ -(void) xamarinSetGCHandle: (int) gc_handle;
if (assembly)
return assembly;
- xamarin_assertion_message ("Could not find the assembly '%s' in the app nor as an already loaded assembly. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: http://bugzilla.xamarin.com", name);
+ xamarin_assertion_message ("Could not find the assembly '%s' in the app nor as an already loaded assembly. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
}
#endif
if (!exists)
- xamarin_assertion_message ("Could not find the assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: http://bugzilla.xamarin.com", name);
+ xamarin_assertion_message ("Could not find the assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
assembly = mono_assembly_open (path, NULL);
if (assembly == NULL)
- xamarin_assertion_message ("Could not find the required assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: http://bugzilla.xamarin.com", name);
+ xamarin_assertion_message ("Could not find the required assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
return assembly;
}
diff --git a/runtime/trampolines.m b/runtime/trampolines.m
index 0beb2ad60d99..051c94672129 100644
--- a/runtime/trampolines.m
+++ b/runtime/trampolines.m
@@ -133,7 +133,7 @@
} else if (xamarin_is_class_inativeobject (r_klass)) {
return xamarin_get_handle_for_inativeobject (retval, exception_gchandle);
} else {
- xamarin_assertion_message ("Don't know how to marshal a return value of type '%s.%s'. Please file a bug with a test case at http://bugzilla.xamarin.com\n", mono_class_get_namespace (r_klass), mono_class_get_name (r_klass));
+ xamarin_assertion_message ("Don't know how to marshal a return value of type '%s.%s'. Please file a bug with a test case at https://github.com/xamarin/xamarin-macios/issues/new\n", mono_class_get_namespace (r_klass), mono_class_get_name (r_klass));
}
}
case _C_CHARPTR:
@@ -1252,7 +1252,7 @@
goto exception_handling;
method_full_name = mono_method_full_name (method, TRUE);
- msg = xamarin_strdup_printf ("Internal error: can't convert from '%s' to '%s' in %s. Please file a bug report with a test case (https://bugzilla.xamarin.com).",
+ msg = xamarin_strdup_printf ("Internal error: can't convert from '%s' to '%s' in %s. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).",
from_name, to_name, method_full_name);
exception_gchandle = mono_gchandle_new ((MonoObject *) xamarin_create_exception (msg), false);
diff --git a/runtime/xamarin-support.m b/runtime/xamarin-support.m
index eeee48d828a9..6ad8dc058419 100644
--- a/runtime/xamarin-support.m
+++ b/runtime/xamarin-support.m
@@ -35,7 +35,30 @@
fwrite ("\n", 1, 1, stdout);
fflush (stdout);
#else
- NSLog (@"%@", msg);
+ if (length > 4096) {
+ // Write in chunks of max 4096 characters; older versions of iOS seems to have a bug where NSLog may hang with long strings (!).
+ // https://github.com/xamarin/maccore/issues/1014
+ const char *utf8 = [msg UTF8String];
+ int len = strlen (utf8);
+ const int max_size = 4096;
+ while (len > 0) {
+ int chunk_size = len > max_size ? max_size : len;
+
+ // Try to not break in the middle of a line, by looking backwards for a newline
+ while (chunk_size > 0 && utf8 [chunk_size] != 0 && utf8 [chunk_size] != '\n')
+ chunk_size--;
+ if (chunk_size == 0) {
+ // No newline found, break in the middle.
+ chunk_size = len > max_size ? max_size : len;
+ }
+ NSLog (@"%.*s", chunk_size, utf8);
+
+ len -= chunk_size;
+ utf8 += chunk_size;
+ }
+ } else {
+ NSLog (@"%@", msg);
+ }
#endif
[msg release];
}
diff --git a/src/AVFoundation/AVAudioRecorder.cs b/src/AVFoundation/AVAudioRecorder.cs
index b5d4efff8fdd..ef1e265149e8 100644
--- a/src/AVFoundation/AVAudioRecorder.cs
+++ b/src/AVFoundation/AVAudioRecorder.cs
@@ -61,8 +61,8 @@ internal NSMutableDictionary ToDictionary ()
dict.SetObject (new NSNumber (NumberChannels), AVAudioSettings.AVNumberOfChannelsKey);
if (AudioFormat == AudioFormatType.LinearPCM){
- IntPtr thandle = CFBoolean.True.Handle;
- IntPtr fhandle = CFBoolean.False.Handle;
+ IntPtr thandle = CFBoolean.TrueHandle;
+ IntPtr fhandle = CFBoolean.FalseHandle;
if (LinearPcmBitDepth != 0){
if (LinearPcmBitDepth == 8 || LinearPcmBitDepth == 16 || LinearPcmBitDepth == 32 || LinearPcmBitDepth == 24)
diff --git a/src/AddressBook/ABAddressBook.cs b/src/AddressBook/ABAddressBook.cs
index f7dc289f8608..9282ab7a0dff 100644
--- a/src/AddressBook/ABAddressBook.cs
+++ b/src/AddressBook/ABAddressBook.cs
@@ -144,15 +144,7 @@ internal ABAddressBook (IntPtr handle)
static ABAddressBook ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- ErrorDomain = Dlfcn.GetStringConstant (handle, "ABAddressBookErrorDomain");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ ErrorDomain = Dlfcn.GetStringConstant (Libraries.AddressBook.Handle, "ABAddressBookErrorDomain");
}
~ABAddressBook ()
diff --git a/src/AddressBook/ABGroup.cs b/src/AddressBook/ABGroup.cs
index e2f69ae242c1..14eed0a6e33b 100644
--- a/src/AddressBook/ABGroup.cs
+++ b/src/AddressBook/ABGroup.cs
@@ -51,15 +51,7 @@ static ABGroupProperty ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Name = Dlfcn.GetInt32 (handle, "kABGroupNameProperty");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ Name = Dlfcn.GetInt32 (Libraries.AddressBook.Handle, "kABGroupNameProperty");
}
}
diff --git a/src/AddressBook/ABPerson.cs b/src/AddressBook/ABPerson.cs
index 6f6f059786d0..a2712438ed45 100644
--- a/src/AddressBook/ABPerson.cs
+++ b/src/AddressBook/ABPerson.cs
@@ -123,39 +123,32 @@ static ABPersonPropertyId ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Address = Dlfcn.GetInt32 (handle, "kABPersonAddressProperty");
- Birthday = Dlfcn.GetInt32 (handle, "kABPersonBirthdayProperty");
- CreationDate = Dlfcn.GetInt32 (handle, "kABPersonCreationDateProperty");
- Date = Dlfcn.GetInt32 (handle, "kABPersonDateProperty");
- Department = Dlfcn.GetInt32 (handle, "kABPersonDepartmentProperty");
- Email = Dlfcn.GetInt32 (handle, "kABPersonEmailProperty");
- FirstName = Dlfcn.GetInt32 (handle, "kABPersonFirstNameProperty");
- FirstNamePhonetic = Dlfcn.GetInt32 (handle, "kABPersonFirstNamePhoneticProperty");
- InstantMessage = Dlfcn.GetInt32 (handle, "kABPersonInstantMessageProperty");
- JobTitle = Dlfcn.GetInt32 (handle, "kABPersonJobTitleProperty");
- Kind = Dlfcn.GetInt32 (handle, "kABPersonKindProperty");
- LastName = Dlfcn.GetInt32 (handle, "kABPersonLastNameProperty");
- LastNamePhonetic = Dlfcn.GetInt32 (handle, "kABPersonLastNamePhoneticProperty");
- MiddleName = Dlfcn.GetInt32 (handle, "kABPersonMiddleNameProperty");
- MiddleNamePhonetic = Dlfcn.GetInt32 (handle, "kABPersonMiddleNamePhoneticProperty");
- ModificationDate = Dlfcn.GetInt32 (handle, "kABPersonModificationDateProperty");
- Nickname = Dlfcn.GetInt32 (handle, "kABPersonNicknameProperty");
- Note = Dlfcn.GetInt32 (handle, "kABPersonNoteProperty");
- Organization = Dlfcn.GetInt32 (handle, "kABPersonOrganizationProperty");
- Phone = Dlfcn.GetInt32 (handle, "kABPersonPhoneProperty");
- Prefix = Dlfcn.GetInt32 (handle, "kABPersonPrefixProperty");
- RelatedNames = Dlfcn.GetInt32 (handle, "kABPersonRelatedNamesProperty");
- Suffix = Dlfcn.GetInt32 (handle, "kABPersonSuffixProperty");
- Url = Dlfcn.GetInt32 (handle, "kABPersonURLProperty");
- SocialProfile = Dlfcn.GetInt32 (handle, "kABPersonSocialProfileProperty");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Address = Dlfcn.GetInt32 (handle, "kABPersonAddressProperty");
+ Birthday = Dlfcn.GetInt32 (handle, "kABPersonBirthdayProperty");
+ CreationDate = Dlfcn.GetInt32 (handle, "kABPersonCreationDateProperty");
+ Date = Dlfcn.GetInt32 (handle, "kABPersonDateProperty");
+ Department = Dlfcn.GetInt32 (handle, "kABPersonDepartmentProperty");
+ Email = Dlfcn.GetInt32 (handle, "kABPersonEmailProperty");
+ FirstName = Dlfcn.GetInt32 (handle, "kABPersonFirstNameProperty");
+ FirstNamePhonetic = Dlfcn.GetInt32 (handle, "kABPersonFirstNamePhoneticProperty");
+ InstantMessage = Dlfcn.GetInt32 (handle, "kABPersonInstantMessageProperty");
+ JobTitle = Dlfcn.GetInt32 (handle, "kABPersonJobTitleProperty");
+ Kind = Dlfcn.GetInt32 (handle, "kABPersonKindProperty");
+ LastName = Dlfcn.GetInt32 (handle, "kABPersonLastNameProperty");
+ LastNamePhonetic = Dlfcn.GetInt32 (handle, "kABPersonLastNamePhoneticProperty");
+ MiddleName = Dlfcn.GetInt32 (handle, "kABPersonMiddleNameProperty");
+ MiddleNamePhonetic = Dlfcn.GetInt32 (handle, "kABPersonMiddleNamePhoneticProperty");
+ ModificationDate = Dlfcn.GetInt32 (handle, "kABPersonModificationDateProperty");
+ Nickname = Dlfcn.GetInt32 (handle, "kABPersonNicknameProperty");
+ Note = Dlfcn.GetInt32 (handle, "kABPersonNoteProperty");
+ Organization = Dlfcn.GetInt32 (handle, "kABPersonOrganizationProperty");
+ Phone = Dlfcn.GetInt32 (handle, "kABPersonPhoneProperty");
+ Prefix = Dlfcn.GetInt32 (handle, "kABPersonPrefixProperty");
+ RelatedNames = Dlfcn.GetInt32 (handle, "kABPersonRelatedNamesProperty");
+ Suffix = Dlfcn.GetInt32 (handle, "kABPersonSuffixProperty");
+ Url = Dlfcn.GetInt32 (handle, "kABPersonURLProperty");
+ SocialProfile = Dlfcn.GetInt32 (handle, "kABPersonSocialProfileProperty");
}
public static int ToId (ABPersonProperty property)
@@ -239,20 +232,13 @@ static ABPersonAddressKey ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- City = Dlfcn.GetStringConstant (handle, "kABPersonAddressCityKey");
- Country = Dlfcn.GetStringConstant (handle, "kABPersonAddressCountryKey");
- CountryCode = Dlfcn.GetStringConstant (handle, "kABPersonAddressCountryCodeKey");
- State = Dlfcn.GetStringConstant (handle, "kABPersonAddressStateKey");
- Street = Dlfcn.GetStringConstant (handle, "kABPersonAddressStreetKey");
- Zip = Dlfcn.GetStringConstant (handle, "kABPersonAddressZIPKey");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ City = Dlfcn.GetStringConstant (handle, "kABPersonAddressCityKey");
+ Country = Dlfcn.GetStringConstant (handle, "kABPersonAddressCountryKey");
+ CountryCode = Dlfcn.GetStringConstant (handle, "kABPersonAddressCountryCodeKey");
+ State = Dlfcn.GetStringConstant (handle, "kABPersonAddressStateKey");
+ Street = Dlfcn.GetStringConstant (handle, "kABPersonAddressStreetKey");
+ Zip = Dlfcn.GetStringConstant (handle, "kABPersonAddressZIPKey");
}
}
@@ -267,15 +253,7 @@ static ABPersonDateLabel ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Anniversary = Dlfcn.GetStringConstant (handle, "kABPersonAnniversaryLabel");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ Anniversary = Dlfcn.GetStringConstant (Libraries.AddressBook.Handle, "kABPersonAnniversaryLabel");
}
}
@@ -298,16 +276,9 @@ static ABPersonKindId ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Organization = Dlfcn.GetNSNumber (handle, "kABPersonKindOrganization");
- Person = Dlfcn.GetNSNumber (handle, "kABPersonKindPerson");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Organization = Dlfcn.GetNSNumber (handle, "kABPersonKindOrganization");
+ Person = Dlfcn.GetNSNumber (handle, "kABPersonKindPerson");
}
public static ABPersonKind ToPersonKind (NSNumber value)
@@ -338,17 +309,11 @@ static class ABPersonSocialProfile {
static ABPersonSocialProfile ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- URLKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileURLKey");
- ServiceKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceKey");
- UsernameKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileUsernameKey");
- UserIdentifierKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileUserIdentifierKey");
- } finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ URLKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileURLKey");
+ ServiceKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceKey");
+ UsernameKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileUsernameKey");
+ UserIdentifierKey = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileUserIdentifierKey");
}
}
@@ -366,20 +331,14 @@ public static class ABPersonSocialProfileService
static ABPersonSocialProfileService ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Twitter = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceTwitter");
- GameCenter = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceGameCenter");
- Facebook = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceFacebook");
- Myspace = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceMyspace");
- LinkedIn = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceLinkedIn");
- Flickr = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceFlickr");
- SinaWeibo = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceSinaWeibo");
- } finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Twitter = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceTwitter");
+ GameCenter = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceGameCenter");
+ Facebook = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceFacebook");
+ Myspace = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceMyspace");
+ LinkedIn = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceLinkedIn");
+ Flickr = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceFlickr");
+ SinaWeibo = Dlfcn.GetStringConstant (handle, "kABPersonSocialProfileServiceSinaWeibo");
}
}
@@ -400,23 +359,16 @@ static ABPersonPhoneLabel ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- HomeFax = Dlfcn.GetStringConstant (handle, "kABPersonPhoneHomeFAXLabel");
- iPhone = Dlfcn.GetStringConstant (handle, "kABPersonPhoneIPhoneLabel");
- Main = Dlfcn.GetStringConstant (handle, "kABPersonPhoneMainLabel");
- Mobile = Dlfcn.GetStringConstant (handle, "kABPersonPhoneMobileLabel");
- Pager = Dlfcn.GetStringConstant (handle, "kABPersonPhonePagerLabel");
- WorkFax = Dlfcn.GetStringConstant (handle, "kABPersonPhoneWorkFAXLabel");
-
- // Since 5.0
- OtherFax = Dlfcn.GetStringConstant (handle, "kABPersonPhoneOtherFAXLabel");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ HomeFax = Dlfcn.GetStringConstant (handle, "kABPersonPhoneHomeFAXLabel");
+ iPhone = Dlfcn.GetStringConstant (handle, "kABPersonPhoneIPhoneLabel");
+ Main = Dlfcn.GetStringConstant (handle, "kABPersonPhoneMainLabel");
+ Mobile = Dlfcn.GetStringConstant (handle, "kABPersonPhoneMobileLabel");
+ Pager = Dlfcn.GetStringConstant (handle, "kABPersonPhonePagerLabel");
+ WorkFax = Dlfcn.GetStringConstant (handle, "kABPersonPhoneWorkFAXLabel");
+
+ // Since 5.0
+ OtherFax = Dlfcn.GetStringConstant (handle, "kABPersonPhoneOtherFAXLabel");
}
}
@@ -441,24 +393,17 @@ static ABPersonInstantMessageService ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Aim = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceAIM");
- Icq = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceICQ");
- Jabber = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceJabber");
- Msn = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceMSN");
- Yahoo = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceYahoo");
- QQ = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceQQ");
- GoogleTalk = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceGoogleTalk");
- Skype = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceSkype");
- Facebook = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceFacebook");
- GaduGadu = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceGaduGadu");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Aim = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceAIM");
+ Icq = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceICQ");
+ Jabber = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceJabber");
+ Msn = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceMSN");
+ Yahoo = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceYahoo");
+ QQ = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceQQ");
+ GoogleTalk = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceGoogleTalk");
+ Skype = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceSkype");
+ Facebook = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceFacebook");
+ GaduGadu = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceGaduGadu");
}
}
@@ -474,16 +419,9 @@ static ABPersonInstantMessageKey ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Service = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceKey");
- Username = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageUsernameKey");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Service = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageServiceKey");
+ Username = Dlfcn.GetStringConstant (handle, "kABPersonInstantMessageUsernameKey");
}
}
@@ -498,15 +436,7 @@ static ABPersonUrlLabel ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- HomePage = Dlfcn.GetStringConstant (handle, "kABPersonHomePageLabel");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ HomePage = Dlfcn.GetStringConstant (Libraries.AddressBook.Handle, "kABPersonHomePageLabel");
}
}
@@ -531,25 +461,18 @@ static ABPersonRelatedNamesLabel ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Assistant = Dlfcn.GetStringConstant (handle, "kABPersonAssistantLabel");
- Brother = Dlfcn.GetStringConstant (handle, "kABPersonBrotherLabel");
- Child = Dlfcn.GetStringConstant (handle, "kABPersonChildLabel");
- Father = Dlfcn.GetStringConstant (handle, "kABPersonFatherLabel");
- Friend = Dlfcn.GetStringConstant (handle, "kABPersonFriendLabel");
- Manager = Dlfcn.GetStringConstant (handle, "kABPersonManagerLabel");
- Mother = Dlfcn.GetStringConstant (handle, "kABPersonMotherLabel");
- Parent = Dlfcn.GetStringConstant (handle, "kABPersonParentLabel");
- Partner = Dlfcn.GetStringConstant (handle, "kABPersonPartnerLabel");
- Sister = Dlfcn.GetStringConstant (handle, "kABPersonSisterLabel");
- Spouse = Dlfcn.GetStringConstant (handle, "kABPersonSpouseLabel");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Assistant = Dlfcn.GetStringConstant (handle, "kABPersonAssistantLabel");
+ Brother = Dlfcn.GetStringConstant (handle, "kABPersonBrotherLabel");
+ Child = Dlfcn.GetStringConstant (handle, "kABPersonChildLabel");
+ Father = Dlfcn.GetStringConstant (handle, "kABPersonFatherLabel");
+ Friend = Dlfcn.GetStringConstant (handle, "kABPersonFriendLabel");
+ Manager = Dlfcn.GetStringConstant (handle, "kABPersonManagerLabel");
+ Mother = Dlfcn.GetStringConstant (handle, "kABPersonMotherLabel");
+ Parent = Dlfcn.GetStringConstant (handle, "kABPersonParentLabel");
+ Partner = Dlfcn.GetStringConstant (handle, "kABPersonPartnerLabel");
+ Sister = Dlfcn.GetStringConstant (handle, "kABPersonSisterLabel");
+ Spouse = Dlfcn.GetStringConstant (handle, "kABPersonSpouseLabel");
}
}
@@ -566,17 +489,10 @@ static ABLabel ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Home = Dlfcn.GetStringConstant (handle, "kABHomeLabel");
- Other = Dlfcn.GetStringConstant (handle, "kABOtherLabel");
- Work = Dlfcn.GetStringConstant (handle, "kABWorkLabel");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Home = Dlfcn.GetStringConstant (handle, "kABHomeLabel");
+ Other = Dlfcn.GetStringConstant (handle, "kABOtherLabel");
+ Work = Dlfcn.GetStringConstant (handle, "kABWorkLabel");
}
}
diff --git a/src/AddressBook/ABSource.cs b/src/AddressBook/ABSource.cs
index 8026435bfa20..4d0514210977 100644
--- a/src/AddressBook/ABSource.cs
+++ b/src/AddressBook/ABSource.cs
@@ -101,17 +101,9 @@ static ABSourcePropertyId ()
internal static void Init ()
{
- var handle = Dlfcn.dlopen (Constants.AddressBookLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
-
- try {
- Name = Dlfcn.GetInt32 (handle, "kABSourceNameProperty");
- Type = Dlfcn.GetInt32 (handle, "kABSourceTypeProperty");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.AddressBook.Handle;
+ Name = Dlfcn.GetInt32 (handle, "kABSourceNameProperty");
+ Type = Dlfcn.GetInt32 (handle, "kABSourceTypeProperty");
}
public static int ToId (ABSourceProperty property)
diff --git a/src/AppKit/NSLayoutManager.cs b/src/AppKit/NSLayoutManager.cs
index a6a47746d1e2..a4af8a410d88 100644
--- a/src/AppKit/NSLayoutManager.cs
+++ b/src/AppKit/NSLayoutManager.cs
@@ -1,23 +1,22 @@
// Copyright 2015 Xamarin, Inc.
+#if !WATCH
+
+#if !MONOMAC
+using NSFont=UIKit.UIFont;
+#endif
+
using System;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
+#if MONOMAC
namespace AppKit {
- partial class NSLayoutManager {
-#if !XAMCORE_2_0
- public uint GlyphAtIndex (nint glyphIndex, ref bool isValidIndex)
- {
- return GlyphAtIndexisValidIndex ((nuint) glyphIndex, ref isValidIndex);
- }
-
- public uint GlyphAtIndex (nint glyphIndex)
- {
- return GlyphCount (glyphIndex);
- }
+#else
+namespace UIKit {
#endif
-
+ partial class NSLayoutManager {
+#if !XAMCORE_4_0 && MONOMAC
[Deprecated (PlatformName.MacOSX, 10, 11)]
public CGRect [] GetRectArray (NSRange glyphRange, NSRange selectedGlyphRange, NSTextContainer textContainer)
{
@@ -37,8 +36,9 @@ public CGRect [] GetRectArray (NSRange glyphRange, NSRange selectedGlyphRange, N
}
return returnArray;
}
+#endif // MONOMAC
-#if !XAMCORE_4_0
+#if !XAMCORE_4_0 && MONOMAC
[Obsolete ("Use 'GetIntAttribute' instead.")]
public virtual nint IntAttributeforGlyphAtIndex (nint attributeTag, nint glyphIndex)
{
@@ -47,3 +47,5 @@ public virtual nint IntAttributeforGlyphAtIndex (nint attributeTag, nint glyphIn
#endif
}
}
+
+#endif // !WATCH
diff --git a/src/AssemblyInfo.cs.in b/src/AssemblyInfo.cs.in
index b116e9bd4791..0bfbcc825bef 100644
--- a/src/AssemblyInfo.cs.in
+++ b/src/AssemblyInfo.cs.in
@@ -16,4 +16,4 @@ using System.Runtime.CompilerServices;
// [assembly: AssemblyCopyright ("Copyright 2011-2014 Xamarin Inc.")]
[assembly: AssemblyCompany ("Xamarin Inc.")]
-[assembly: InternalsVisibleTo ("System.Net.Http, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
\ No newline at end of file
+[assembly: InternalsVisibleTo ("System.Net.Http,PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
\ No newline at end of file
diff --git a/src/AudioToolbox/AudioSession.cs b/src/AudioToolbox/AudioSession.cs
index 0d337827a0d3..ea79c3e839db 100644
--- a/src/AudioToolbox/AudioSession.cs
+++ b/src/AudioToolbox/AudioSession.cs
@@ -124,12 +124,10 @@ public class AudioSessionRouteChangeEventArgs : EventArgs {
static AudioSessionRouteChangeEventArgs ()
{
- var lib = Dlfcn.dlopen (Constants.AudioToolboxLibrary, 0);
+ var lib = Libraries.AudioToolbox.Handle;
route_change_key = Dlfcn.GetIntPtr (lib, "kAudioSession_RouteChangeKey_Reason");
previous_route_key = Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteChangeKey_PreviousRouteDescription");
current_route_key = Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteChangeKey_CurrentRouteDescription");
-
- Dlfcn.dlclose (lib);
}
public NSDictionary Dictionary { get; private set; }
@@ -247,35 +245,33 @@ public static void Initialize (CFRunLoop runLoop, string runMode)
if (initialized)
return;
- IntPtr lib = Dlfcn.dlopen (Constants.AudioToolboxLibrary, 0);
-
- AudioRouteKey_Inputs = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteKey_Inputs"));
- AudioRouteKey_Outputs = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteKey_Outputs"));
- AudioRouteKey_Type = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteKey_Type"));
-
- InputRoute_LineIn = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionInputRoute_LineIn"));
- InputRoute_BuiltInMic = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionInputRoute_BuiltInMic"));
- InputRoute_HeadsetMic = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionInputRoute_HeadsetMic"));
- InputRoute_BluetoothHFP = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionInputRoute_BluetoothHFP"));
- InputRoute_USBAudio = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionInputRoute_USBAudio"));
+ IntPtr lib = Libraries.AudioToolbox.Handle;
- OutputRoute_LineOut = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_LineOut"));
- OutputRoute_Headphones = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_Headphones"));
- OutputRoute_BluetoothHFP = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_BluetoothHFP"));
- OutputRoute_BluetoothA2DP = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_BluetoothA2DP"));
- OutputRoute_BuiltInReceiver = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_BuiltInReceiver"));
- OutputRoute_BuiltInSpeaker = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_BuiltInSpeaker"));
- OutputRoute_USBAudio = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_USBAudio"));
- OutputRoute_HDMI = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_HDMI"));
- OutputRoute_AirPlay = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_AirPlay"));
-
- InputSourceKey_ID = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_InputSourceKey_ID"));
- InputSourceKey_Description = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_InputSourceKey_Description"));
-
- OutputDestinationKey_ID = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_OutputDestinationKey_ID"));
- OutputDestinationKey_Description = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_OutputDestinationKey_Description"));
+ AudioRouteKey_Inputs = Dlfcn.GetStringConstant (lib, "kAudioSession_AudioRouteKey_Inputs");
+ AudioRouteKey_Outputs = Dlfcn.GetStringConstant (lib, "kAudioSession_AudioRouteKey_Outputs");
+ AudioRouteKey_Type = Dlfcn.GetStringConstant (lib, "kAudioSession_AudioRouteKey_Type");
+
+ InputRoute_LineIn = Dlfcn.GetStringConstant (lib, "kAudioSessionInputRoute_LineIn");
+ InputRoute_BuiltInMic = Dlfcn.GetStringConstant (lib, "kAudioSessionInputRoute_BuiltInMic");
+ InputRoute_HeadsetMic = Dlfcn.GetStringConstant (lib, "kAudioSessionInputRoute_HeadsetMic");
+ InputRoute_BluetoothHFP = Dlfcn.GetStringConstant (lib, "kAudioSessionInputRoute_BluetoothHFP");
+ InputRoute_USBAudio = Dlfcn.GetStringConstant (lib, "kAudioSessionInputRoute_USBAudio");
- Dlfcn.dlclose (lib);
+ OutputRoute_LineOut = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_LineOut");
+ OutputRoute_Headphones = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_Headphones");
+ OutputRoute_BluetoothHFP = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_BluetoothHFP");
+ OutputRoute_BluetoothA2DP = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_BluetoothA2DP");
+ OutputRoute_BuiltInReceiver = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_BuiltInReceiver");
+ OutputRoute_BuiltInSpeaker = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_BuiltInSpeaker");
+ OutputRoute_USBAudio = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_USBAudio");
+ OutputRoute_HDMI = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_HDMI");
+ OutputRoute_AirPlay = Dlfcn.GetStringConstant (lib, "kAudioSessionOutputRoute_AirPlay");
+
+ InputSourceKey_ID = Dlfcn.GetStringConstant (lib, "kAudioSession_InputSourceKey_ID");
+ InputSourceKey_Description = Dlfcn.GetStringConstant (lib, "kAudioSession_InputSourceKey_Description");
+
+ OutputDestinationKey_ID = Dlfcn.GetStringConstant (lib, "kAudioSession_OutputDestinationKey_ID");
+ OutputDestinationKey_Description = Dlfcn.GetStringConstant (lib, "kAudioSession_OutputDestinationKey_Description");
initialized = true;
}
diff --git a/src/CFNetwork/CFHTTPStream.cs b/src/CFNetwork/CFHTTPStream.cs
index b7b5ae387535..bf2490d74187 100644
--- a/src/CFNetwork/CFHTTPStream.cs
+++ b/src/CFNetwork/CFHTTPStream.cs
@@ -77,9 +77,9 @@ public bool AttemptPersistentConnection {
var handle = GetProperty (_AttemptPersistentConnection);
if (handle == IntPtr.Zero)
return false;
- else if (handle == CFBoolean.False.Handle)
+ else if (handle == CFBoolean.FalseHandle)
return false;
- else if (handle == CFBoolean.True.Handle)
+ else if (handle == CFBoolean.TrueHandle)
return true;
else
throw new InvalidCastException ();
@@ -106,9 +106,9 @@ public bool ShouldAutoredirect {
var handle = GetProperty (_ShouldAutoredirect);
if (handle == IntPtr.Zero)
return false;
- else if (handle == CFBoolean.False.Handle)
+ else if (handle == CFBoolean.FalseHandle)
return false;
- else if (handle == CFBoolean.True.Handle)
+ else if (handle == CFBoolean.TrueHandle)
return true;
else
throw new InvalidCastException ();
diff --git a/src/Constants.iOS.cs.in b/src/Constants.iOS.cs.in
index 6148bce47e10..d760ea4e8828 100644
--- a/src/Constants.iOS.cs.in
+++ b/src/Constants.iOS.cs.in
@@ -12,6 +12,7 @@ namespace MonoTouch {
public const string libSystemLibrary = "/usr/lib/libSystem.dylib";
public const string libcLibrary = "/usr/lib/libc.dylib";
+ public const string libdispatchLibrary = "/usr/lib/system/libdispatch.dylib";
public const string AddressBookLibrary = "/System/Library/Frameworks/AddressBook.framework/AddressBook";
public const string AddressBookUILibrary = "/System/Library/Frameworks/AddressBookUI.framework/AddressBookUI";
public const string AudioToolboxLibrary = "/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox";
diff --git a/src/Constants.mac.cs.in b/src/Constants.mac.cs.in
index 8b65c2e049c3..615679f52c55 100644
--- a/src/Constants.mac.cs.in
+++ b/src/Constants.mac.cs.in
@@ -106,6 +106,7 @@ namespace MonoMac {
public const string SearchKitLibrary = "/System/Library/Frameworks/CoreServices.framework/Frameworks/SearchKit.framework/SearchKit";
public const string libSystemLibrary = "/usr/lib/libSystem.dylib";
public const string libcLibrary = "/usr/lib/libc.dylib";
+ public const string libdispatchLibrary = "/usr/lib/system/libdispatch.dylib";
public const string ContactsLibrary = "/System/Library/Frameworks/Contacts.framework/Contacts";
public const string ContactsUILibrary = "/System/Library/Frameworks/ContactsUI.framework/ContactsUI";
diff --git a/src/Constants.tvos.cs.in b/src/Constants.tvos.cs.in
index 2d5c1d659770..cd2a5d6cf483 100644
--- a/src/Constants.tvos.cs.in
+++ b/src/Constants.tvos.cs.in
@@ -7,6 +7,7 @@ namespace ObjCRuntime {
public const string libSystemLibrary = "/usr/lib/libSystem.dylib";
public const string libcLibrary = "/usr/lib/libc.dylib";
public const string ObjectiveCLibrary = "/usr/lib/libobjc.dylib";
+ public const string libdispatchLibrary = "/usr/lib/system/libdispatch.dylib";
// TVOS 9.0
internal const string CoreServicesLibrary = "/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices";
diff --git a/src/Constants.watch.cs.in b/src/Constants.watch.cs.in
index 2158dc3149b3..abd8aa1cbd02 100644
--- a/src/Constants.watch.cs.in
+++ b/src/Constants.watch.cs.in
@@ -7,6 +7,7 @@ namespace ObjCRuntime {
public const string libSystemLibrary = "/usr/lib/libSystem.dylib";
public const string libcLibrary = "/usr/lib/libc.dylib";
public const string ObjectiveCLibrary = "/usr/lib/libobjc.dylib";
+ public const string libdispatchLibrary = "/usr/lib/system/libdispatch.dylib";
// WatchOS 2.0
public const string CFNetworkLibrary = "/System/Library/Frameworks/CFNetwork.framework/CFNetwork";
diff --git a/src/CoreFoundation/CFAllocator.cs b/src/CoreFoundation/CFAllocator.cs
index d4e08a9ef8a1..99a3b4980df4 100644
--- a/src/CoreFoundation/CFAllocator.cs
+++ b/src/CoreFoundation/CFAllocator.cs
@@ -37,7 +37,7 @@ namespace CoreFoundation {
// CFBase.h
public partial class CFAllocator : INativeObject, IDisposable
{
-#if !COREBUILD && !MTOUCH
+#if !COREBUILD
static CFAllocator Default_cf;
static CFAllocator SystemDefault_cf;
static CFAllocator Malloc_cf;
@@ -46,17 +46,6 @@ public partial class CFAllocator : INativeObject, IDisposable
#endif
IntPtr handle;
-#if MTOUCH
- internal static IntPtr null_ptr;
-
- static CFAllocator ()
- {
- var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- null_ptr = Dlfcn.GetIntPtr (handle, "kCFAllocatorNull");
- Dlfcn.dlclose (handle);
- }
-#endif
-
public CFAllocator (IntPtr handle)
{
this.handle = handle;
@@ -91,7 +80,7 @@ protected virtual void Dispose (bool disposing)
handle = IntPtr.Zero;
}
}
-#if !COREBUILD && !MTOUCH
+#if !COREBUILD
public static CFAllocator Default {
get {
return Default_cf ?? (Default_cf = new CFAllocator (default_ptr));
diff --git a/src/CoreFoundation/CFArray.cs b/src/CoreFoundation/CFArray.cs
index 38bd290ec370..7f5df0e79557 100644
--- a/src/CoreFoundation/CFArray.cs
+++ b/src/CoreFoundation/CFArray.cs
@@ -85,19 +85,13 @@ protected virtual void Dispose (bool disposing)
}
// pointer to a const struct (REALLY APPLE?)
- static readonly IntPtr kCFTypeArrayCallbacks_ptr;
-
- // FIXME: right now we can't use [Fields] for GetIndirect
- static CFArray ()
- {
- var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- kCFTypeArrayCallbacks_ptr = Dlfcn.GetIndirect (handle, "kCFTypeArrayCallBacks");
- }
- finally {
- Dlfcn.dlclose (handle);
+ static IntPtr kCFTypeArrayCallbacks_ptr_value;
+ static IntPtr kCFTypeArrayCallbacks_ptr {
+ get {
+ // FIXME: right now we can't use [Fields] for GetIndirect
+ if (kCFTypeArrayCallbacks_ptr_value == IntPtr.Zero)
+ kCFTypeArrayCallbacks_ptr_value = Dlfcn.GetIndirect (Libraries.CoreFoundation.Handle, "kCFTypeArrayCallBacks");
+ return kCFTypeArrayCallbacks_ptr_value;
}
}
diff --git a/src/CoreFoundation/CFBoolean.cs b/src/CoreFoundation/CFBoolean.cs
index e88dbad0a44f..29c741f13f82 100644
--- a/src/CoreFoundation/CFBoolean.cs
+++ b/src/CoreFoundation/CFBoolean.cs
@@ -35,26 +35,9 @@
namespace CoreFoundation {
// CFNumber.h
- class CFBoolean : INativeObject, IDisposable {
+ partial class CFBoolean : INativeObject, IDisposable {
IntPtr handle;
- public static readonly CFBoolean True;
- public static readonly CFBoolean False;
-
- static CFBoolean ()
- {
- var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- True = new CFBoolean (Dlfcn.GetIntPtr (handle, "kCFBooleanTrue"), false);
- False = new CFBoolean (Dlfcn.GetIntPtr (handle, "kCFBooleanFalse"), false);
- }
- finally {
- Dlfcn.dlclose (handle);
- }
- }
-
[Preserve (Conditional = true)]
internal CFBoolean (IntPtr handle, bool owns)
{
@@ -105,9 +88,14 @@ public static explicit operator CFBoolean (bool value)
return FromBoolean (value);
}
+ internal static IntPtr ToHandle (bool value)
+ {
+ return value ? TrueHandle : FalseHandle;
+ }
+
public static CFBoolean FromBoolean (bool value)
{
- return value ? True : False;
+ return new CFBoolean (value ? TrueHandle : FalseHandle, false);
}
[DllImport (Constants.CoreFoundationLibrary)]
diff --git a/src/CoreFoundation/CFDictionary.cs b/src/CoreFoundation/CFDictionary.cs
index f44e7557ec9b..741857665b97 100644
--- a/src/CoreFoundation/CFDictionary.cs
+++ b/src/CoreFoundation/CFDictionary.cs
@@ -81,13 +81,9 @@ public virtual void Dispose (bool disposing)
static CFDictionary ()
{
- var lib = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- try {
- KeyCallbacks = Dlfcn.GetIndirect (lib, "kCFTypeDictionaryKeyCallBacks");
- ValueCallbacks = Dlfcn.GetIndirect (lib, "kCFTypeDictionaryValueCallBacks");
- } finally {
- Dlfcn.dlclose (lib);
- }
+ var lib = Libraries.CoreFoundation.Handle;
+ KeyCallbacks = Dlfcn.GetIndirect (lib, "kCFTypeDictionaryKeyCallBacks");
+ ValueCallbacks = Dlfcn.GetIndirect (lib, "kCFTypeDictionaryValueCallBacks");
}
public static CFDictionary FromObjectAndKey (INativeObject obj, INativeObject key)
@@ -222,7 +218,7 @@ public static void SetValue (IntPtr theDict, IntPtr key, IntPtr value)
public static void SetValue (IntPtr theDict, IntPtr key, bool value)
{
- SetValue (theDict, key, value ? CFBoolean.True.Handle : CFBoolean.False.Handle);
+ SetValue (theDict, key, value ? CFBoolean.TrueHandle : CFBoolean.FalseHandle);
}
}
}
diff --git a/src/CoreFoundation/CFException.cs b/src/CoreFoundation/CFException.cs
index e051de7e7304..6279c10fe9f6 100644
--- a/src/CoreFoundation/CFException.cs
+++ b/src/CoreFoundation/CFException.cs
@@ -42,18 +42,11 @@ public static class CFErrorDomain {
static CFErrorDomain ()
{
- var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Cocoa = Dlfcn.GetStringConstant (handle, "kCFErrorDomainCocoa");
- Mach = Dlfcn.GetStringConstant (handle, "kCFErrorDomainMach");
- OSStatus = Dlfcn.GetStringConstant (handle, "kCFErrorDomainOSStatus");
- Posix = Dlfcn.GetStringConstant (handle, "kCFErrorDomainPosix");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreFoundation.Handle;
+ Cocoa = Dlfcn.GetStringConstant (handle, "kCFErrorDomainCocoa");
+ Mach = Dlfcn.GetStringConstant (handle, "kCFErrorDomainMach");
+ OSStatus = Dlfcn.GetStringConstant (handle, "kCFErrorDomainOSStatus");
+ Posix = Dlfcn.GetStringConstant (handle, "kCFErrorDomainPosix");
}
}
@@ -67,19 +60,12 @@ public static class CFExceptionDataKey {
static CFExceptionDataKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Description = Dlfcn.GetStringConstant (handle, "kCFErrorDescriptionKey");
- LocalizedDescription = Dlfcn.GetStringConstant (handle, "kCFErrorLocalizedDescriptionKey");
- LocalizedFailureReason = Dlfcn.GetStringConstant (handle, "kCFErrorLocalizedFailureReasonKey");
- LocalizedRecoverySuggestion = Dlfcn.GetStringConstant (handle, "kCFErrorLocalizedRecoverySuggestionKey");
- UnderlyingError = Dlfcn.GetStringConstant (handle, "kCFErrorUnderlyingErrorKey");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreFoundation.Handle;
+ Description = Dlfcn.GetStringConstant (handle, "kCFErrorDescriptionKey");
+ LocalizedDescription = Dlfcn.GetStringConstant (handle, "kCFErrorLocalizedDescriptionKey");
+ LocalizedFailureReason = Dlfcn.GetStringConstant (handle, "kCFErrorLocalizedFailureReasonKey");
+ LocalizedRecoverySuggestion = Dlfcn.GetStringConstant (handle, "kCFErrorLocalizedRecoverySuggestionKey");
+ UnderlyingError = Dlfcn.GetStringConstant (handle, "kCFErrorUnderlyingErrorKey");
}
}
diff --git a/src/CoreFoundation/CFPreferences.cs b/src/CoreFoundation/CFPreferences.cs
index a5e1b97cea9e..97cbedc7fc4e 100644
--- a/src/CoreFoundation/CFPreferences.cs
+++ b/src/CoreFoundation/CFPreferences.cs
@@ -33,22 +33,14 @@ public static class CFPreferences
static CFPreferences ()
{
- var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
- if (handle == IntPtr.Zero) {
- return;
- }
-
- try {
- CurrentApplication = Dlfcn.GetStringConstant (handle, "kCFPreferencesCurrentApplication");
-
- /*AnyApplication = Dlfcn.GetStringConstant (handle, "kCFPreferencesAnyApplication");
- CurrentHost = Dlfcn.GetStringConstant (handle, "kCFPreferencesCurrentHost");
- AnyHost = Dlfcn.GetStringConstant (handle, "kCFPreferencesAnyHost");
- CurrentUser = Dlfcn.GetStringConstant (handle, "kCFPreferencesCurrentUser");
- AnyUser = Dlfcn.GetStringConstant (handle, "kCFPreferencesAnyUser");*/
- } finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreFoundation.Handle;
+ CurrentApplication = Dlfcn.GetStringConstant (handle, "kCFPreferencesCurrentApplication");
+
+ /*AnyApplication = Dlfcn.GetStringConstant (handle, "kCFPreferencesAnyApplication");
+ CurrentHost = Dlfcn.GetStringConstant (handle, "kCFPreferencesCurrentHost");
+ AnyHost = Dlfcn.GetStringConstant (handle, "kCFPreferencesAnyHost");
+ CurrentUser = Dlfcn.GetStringConstant (handle, "kCFPreferencesCurrentUser");
+ AnyUser = Dlfcn.GetStringConstant (handle, "kCFPreferencesAnyUser");*/
}
public static object GetAppValue (string key)
diff --git a/src/CoreFoundation/CFProxySupport.cs b/src/CoreFoundation/CFProxySupport.cs
index c7646ffce16e..2a4d37b7c6ca 100644
--- a/src/CoreFoundation/CFProxySupport.cs
+++ b/src/CoreFoundation/CFProxySupport.cs
@@ -60,7 +60,7 @@ internal CFProxy (NSDictionary settings)
static NSString AutoConfigurationHTTPResponseKey {
get {
if (kCFProxyAutoConfigurationHTTPResponseKey == null)
- kCFProxyAutoConfigurationHTTPResponseKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyAutoConfigurationHTTPResponseKey");
+ kCFProxyAutoConfigurationHTTPResponseKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyAutoConfigurationHTTPResponseKey");
return kCFProxyAutoConfigurationHTTPResponseKey;
}
@@ -71,7 +71,7 @@ static NSString AutoConfigurationHTTPResponseKey {
static NSString AutoConfigurationJavaScriptKey {
get {
if (kCFProxyAutoConfigurationJavaScriptKey == null)
- kCFProxyAutoConfigurationJavaScriptKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyAutoConfigurationJavaScriptKey");
+ kCFProxyAutoConfigurationJavaScriptKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyAutoConfigurationJavaScriptKey");
return kCFProxyAutoConfigurationJavaScriptKey;
}
@@ -81,7 +81,7 @@ static NSString AutoConfigurationJavaScriptKey {
static NSString AutoConfigurationURLKey {
get {
if (kCFProxyAutoConfigurationURLKey == null)
- kCFProxyAutoConfigurationURLKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyAutoConfigurationURLKey");
+ kCFProxyAutoConfigurationURLKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyAutoConfigurationURLKey");
return kCFProxyAutoConfigurationURLKey;
}
@@ -91,7 +91,7 @@ static NSString AutoConfigurationURLKey {
static NSString HostNameKey {
get {
if (kCFProxyHostNameKey == null)
- kCFProxyHostNameKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyHostNameKey");
+ kCFProxyHostNameKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyHostNameKey");
return kCFProxyHostNameKey;
}
@@ -101,7 +101,7 @@ static NSString HostNameKey {
static NSString PasswordKey {
get {
if (kCFProxyPasswordKey == null)
- kCFProxyPasswordKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyPasswordKey");
+ kCFProxyPasswordKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyPasswordKey");
return kCFProxyPasswordKey;
}
@@ -111,7 +111,7 @@ static NSString PasswordKey {
static NSString PortNumberKey {
get {
if (kCFProxyPortNumberKey == null)
- kCFProxyPortNumberKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyPortNumberKey");
+ kCFProxyPortNumberKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyPortNumberKey");
return kCFProxyPortNumberKey;
}
@@ -121,7 +121,7 @@ static NSString PortNumberKey {
static NSString ProxyTypeKey {
get {
if (kCFProxyTypeKey == null)
- kCFProxyTypeKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeKey");
+ kCFProxyTypeKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeKey");
return kCFProxyTypeKey;
}
@@ -131,7 +131,7 @@ static NSString ProxyTypeKey {
static NSString UsernameKey {
get {
if (kCFProxyUsernameKey == null)
- kCFProxyUsernameKey = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyUsernameKey");
+ kCFProxyUsernameKey = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyUsernameKey");
return kCFProxyUsernameKey;
}
@@ -143,7 +143,7 @@ static NSString UsernameKey {
static NSString CFProxyTypeNone {
get {
if (kCFProxyTypeNone == null)
- kCFProxyTypeNone = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeNone");
+ kCFProxyTypeNone = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeNone");
return kCFProxyTypeNone;
}
@@ -153,7 +153,7 @@ static NSString CFProxyTypeNone {
static NSString CFProxyTypeAutoConfigurationURL {
get {
if (kCFProxyTypeAutoConfigurationURL == null)
- kCFProxyTypeAutoConfigurationURL = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeAutoConfigurationURL");
+ kCFProxyTypeAutoConfigurationURL = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeAutoConfigurationURL");
return kCFProxyTypeAutoConfigurationURL;
}
@@ -163,7 +163,7 @@ static NSString CFProxyTypeAutoConfigurationURL {
static NSString CFProxyTypeAutoConfigurationJavaScript {
get {
if (kCFProxyTypeAutoConfigurationJavaScript == null)
- kCFProxyTypeAutoConfigurationJavaScript = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeAutoConfigurationJavaScript");
+ kCFProxyTypeAutoConfigurationJavaScript = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeAutoConfigurationJavaScript");
return kCFProxyTypeAutoConfigurationJavaScript;
}
@@ -173,7 +173,7 @@ static NSString CFProxyTypeAutoConfigurationJavaScript {
static NSString CFProxyTypeFTP {
get {
if (kCFProxyTypeFTP == null)
- kCFProxyTypeFTP = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeFTP");
+ kCFProxyTypeFTP = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeFTP");
return kCFProxyTypeFTP;
}
@@ -183,7 +183,7 @@ static NSString CFProxyTypeFTP {
static NSString CFProxyTypeHTTP {
get {
if (kCFProxyTypeHTTP == null)
- kCFProxyTypeHTTP = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeHTTP");
+ kCFProxyTypeHTTP = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeHTTP");
return kCFProxyTypeHTTP;
}
@@ -193,7 +193,7 @@ static NSString CFProxyTypeHTTP {
static NSString CFProxyTypeHTTPS {
get {
if (kCFProxyTypeHTTPS == null)
- kCFProxyTypeHTTPS = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeHTTPS");
+ kCFProxyTypeHTTPS = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeHTTPS");
return kCFProxyTypeHTTPS;
}
@@ -203,7 +203,7 @@ static NSString CFProxyTypeHTTPS {
static NSString CFProxyTypeSOCKS {
get {
if (kCFProxyTypeSOCKS == null)
- kCFProxyTypeSOCKS = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFProxyTypeSOCKS");
+ kCFProxyTypeSOCKS = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFProxyTypeSOCKS");
return kCFProxyTypeSOCKS;
}
@@ -344,7 +344,7 @@ public NSDictionary Dictionary {
static NSString CFNetworkProxiesHTTPEnable {
get {
if (kCFNetworkProxiesHTTPEnable == null)
- kCFNetworkProxiesHTTPEnable = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFNetworkProxiesHTTPEnable");
+ kCFNetworkProxiesHTTPEnable = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFNetworkProxiesHTTPEnable");
return kCFNetworkProxiesHTTPEnable;
}
@@ -354,7 +354,7 @@ static NSString CFNetworkProxiesHTTPEnable {
static NSString CFNetworkProxiesHTTPPort {
get {
if (kCFNetworkProxiesHTTPPort == null)
- kCFNetworkProxiesHTTPPort = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFNetworkProxiesHTTPPort");
+ kCFNetworkProxiesHTTPPort = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFNetworkProxiesHTTPPort");
return kCFNetworkProxiesHTTPPort;
}
@@ -364,7 +364,7 @@ static NSString CFNetworkProxiesHTTPPort {
static NSString CFNetworkProxiesHTTPProxy {
get {
if (kCFNetworkProxiesHTTPProxy == null)
- kCFNetworkProxiesHTTPProxy = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFNetworkProxiesHTTPProxy");
+ kCFNetworkProxiesHTTPProxy = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFNetworkProxiesHTTPProxy");
return kCFNetworkProxiesHTTPProxy;
}
@@ -374,7 +374,7 @@ static NSString CFNetworkProxiesHTTPProxy {
static NSString CFNetworkProxiesProxyAutoConfigEnable {
get {
if (kCFNetworkProxiesProxyAutoConfigEnable == null)
- kCFNetworkProxiesProxyAutoConfigEnable = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFNetworkProxiesProxyAutoConfigEnable");
+ kCFNetworkProxiesProxyAutoConfigEnable = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFNetworkProxiesProxyAutoConfigEnable");
return kCFNetworkProxiesProxyAutoConfigEnable;
}
@@ -385,7 +385,7 @@ static NSString CFNetworkProxiesProxyAutoConfigEnable {
static NSString CFNetworkProxiesProxyAutoConfigJavaScript {
get {
if (kCFNetworkProxiesProxyAutoConfigJavaScript == null)
- kCFNetworkProxiesProxyAutoConfigJavaScript = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFNetworkProxiesProxyAutoConfigJavaScript");
+ kCFNetworkProxiesProxyAutoConfigJavaScript = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFNetworkProxiesProxyAutoConfigJavaScript");
return kCFNetworkProxiesProxyAutoConfigJavaScript;
}
@@ -396,7 +396,7 @@ static NSString CFNetworkProxiesProxyAutoConfigJavaScript {
static NSString CFNetworkProxiesProxyAutoConfigURLString {
get {
if (kCFNetworkProxiesProxyAutoConfigURLString == null)
- kCFNetworkProxiesProxyAutoConfigURLString = Dlfcn.GetStringConstant (CFNetwork.CFNetworkLibraryHandle, "kCFNetworkProxiesProxyAutoConfigURLString");
+ kCFNetworkProxiesProxyAutoConfigURLString = Dlfcn.GetStringConstant (Libraries.CFNetwork.Handle, "kCFNetworkProxiesProxyAutoConfigURLString");
return kCFNetworkProxiesProxyAutoConfigURLString;
}
@@ -473,8 +473,6 @@ public string ProxyAutoConfigURLString {
}
public static partial class CFNetwork {
- internal static IntPtr CFNetworkLibraryHandle = Dlfcn.dlopen (Constants.CFNetworkLibrary, 0);
-
[DllImport (Constants.CFNetworkLibrary)]
extern static /* CFArrayRef __nullable */ IntPtr CFNetworkCopyProxiesForAutoConfigurationScript (
/* CFStringRef __nonnull */ IntPtr proxyAutoConfigurationScript,
diff --git a/src/CoreFoundation/CFString.cs b/src/CoreFoundation/CFString.cs
index 414c8c3c3136..1d1b96b15846 100644
--- a/src/CoreFoundation/CFString.cs
+++ b/src/CoreFoundation/CFString.cs
@@ -42,13 +42,8 @@ namespace CoreFoundation {
[StructLayout (LayoutKind.Sequential)]
public struct CFRange {
-#if MTOUCH
- IntPtr loc;
- IntPtr len;
-#else
nint loc; // defined as 'long' in native code
nint len; // defined as 'long' in native code
-#endif
public int Location {
get { return (int) loc; }
@@ -73,13 +68,8 @@ public CFRange (int loc, int len)
public CFRange (long l, long len)
{
-#if MTOUCH
- this.loc = (IntPtr) l;
- this.len = (IntPtr) len;
-#else
this.loc = (nint) l;
this.len = (nint) len;
-#endif
}
#if XAMCORE_2_0
diff --git a/src/CoreFoundation/CFUrl.cs b/src/CoreFoundation/CFUrl.cs
index 64531d10a2dc..1bbf2248a1b2 100644
--- a/src/CoreFoundation/CFUrl.cs
+++ b/src/CoreFoundation/CFUrl.cs
@@ -150,16 +150,12 @@ static internal string GetFileSystemPath (IntPtr hcfurl)
return str.ToString ();
}
-#if !MTOUCH
[iOS (7,0)][Mac (10,9)]
-#endif
[DllImport (Constants.CoreFoundationLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
extern static /* Boolean */ bool CFURLIsFileReferenceURL (/* CFURLRef */IntPtr url);
-#if !MTOUCH
[iOS (7,0)][Mac (10,9)]
-#endif
public bool IsFileReference {
get {
return CFURLIsFileReferenceURL (handle);
diff --git a/src/CoreFoundation/Dispatch.cs b/src/CoreFoundation/Dispatch.cs
index 32b6bb714521..c10e456ba1d3 100644
--- a/src/CoreFoundation/Dispatch.cs
+++ b/src/CoreFoundation/Dispatch.cs
@@ -120,26 +120,14 @@ protected virtual void Dispose (bool disposing)
public static bool operator != (DispatchObject a, DispatchObject b)
{
- var oa = a as object;
- var ob = b as object;
-
- if (oa == null){
- if (ob == null)
- return false;
- return true;
- } else {
- if (ob == null)
- return true;
- return a.handle != b.handle;
- }
+ return !(a == b);
}
public override bool Equals (object other)
{
- if (other == null)
- return false;
-
var od = other as DispatchQueue;
+ if (od == null)
+ return false;
return od.handle == handle;
}
@@ -277,37 +265,16 @@ public static DispatchQueue DefaultGlobalQueue {
return new DispatchQueue (dispatch_get_global_queue ((nint) (int) DispatchQueuePriority.Default, 0), false);
}
}
-#if MONOMAC
- static DispatchQueue PInvokeDispatchGetMainQueue ()
- {
- return new DispatchQueue (dispatch_get_main_queue (), false);
- }
-#endif
static IntPtr main_q;
- static object lockobj = new object ();
public static DispatchQueue MainQueue {
get {
- lock (lockobj) {
- if (main_q == IntPtr.Zero) {
- // Try loading the symbol from our address space first, should work everywhere
- main_q = Dlfcn.dlsym ((IntPtr) (-2), "_dispatch_main_q");
-
- // Last case: this is technically not right for the simulator, as this path
- // actually points to the MacOS library, not the one in the SDK.
- if (main_q == IntPtr.Zero){
- var h = Dlfcn.dlopen ("/usr/lib/libSystem.dylib", 0x0);
- main_q = Dlfcn.GetIndirect (h, "_dispatch_main_q");
- Dlfcn.dlclose (h);
- }
- }
+ if (main_q == IntPtr.Zero) {
+ // Can't use a Field attribute because we don't support generating a call to Dlfcn.GetIndirect.
+ main_q = Dlfcn.GetIndirect (Libraries.libdispatch.Handle, "_dispatch_main_q");
}
-#if MONOMAC
- // For Snow Leopard
- if (main_q == IntPtr.Zero)
- return PInvokeDispatchGetMainQueue ();
-#endif
+
return new DispatchQueue (main_q, false);
}
}
@@ -442,12 +409,6 @@ public void Submit (Action action, long times)
// dispatch_queue_t dispatch_get_global_queue (long priority, unsigned long flags);
extern static IntPtr dispatch_get_global_queue (nint priority, nuint flags);
-#if MONOMAC
- [Obsoleted (PlatformName.MacOSX, 10, 7)]
- [DllImport (Constants.libcLibrary)]
- extern static IntPtr dispatch_get_main_queue ();
-#endif
-
[DllImport (Constants.libcLibrary)]
// this returns a "const char*" so we cannot make a string out of it since it will be freed (and crash)
extern static IntPtr dispatch_queue_get_label (IntPtr queue);
diff --git a/src/CoreFoundation/DispatchData.cs b/src/CoreFoundation/DispatchData.cs
index dabe062fea9a..984e0e4470c2 100644
--- a/src/CoreFoundation/DispatchData.cs
+++ b/src/CoreFoundation/DispatchData.cs
@@ -33,7 +33,7 @@
namespace CoreFoundation {
- public class DispatchData : DispatchObject {
+ public partial class DispatchData : DispatchObject {
#if !COREBUILD
public DispatchData (IntPtr handle, bool owns) : base (handle, owns)
{
@@ -43,13 +43,6 @@ public DispatchData (IntPtr handle) : base (handle, false)
{
}
- static IntPtr lib, free;
- static DispatchData ()
- {
- lib = Dlfcn.dlopen (Constants.libcLibrary, 0);
- free = Marshal.ReadIntPtr (Dlfcn.dlsym (lib, "_dispatch_data_destructor_free"));
- }
-
[DllImport (Constants.libcLibrary)]
extern static IntPtr dispatch_data_create (IntPtr buffer, nuint size, IntPtr dispatchQueue, IntPtr destructor);
diff --git a/src/CoreGraphics/CGContextPDF.cs b/src/CoreGraphics/CGContextPDF.cs
index 86d366d0144c..6d890f78a03b 100644
--- a/src/CoreGraphics/CGContextPDF.cs
+++ b/src/CoreGraphics/CGContextPDF.cs
@@ -108,9 +108,9 @@ internal override NSMutableDictionary ToDictionary ()
if (EncryptionKeyLength.HasValue)
ret.LowlevelSetObject (NSNumber.FromInt32 (EncryptionKeyLength.Value), kCGPDFContextEncryptionKeyLength);
if (AllowsPrinting.HasValue && AllowsPrinting.Value == false)
- ret.LowlevelSetObject (CFBoolean.False.Handle, kCGPDFContextAllowsPrinting);
+ ret.LowlevelSetObject (CFBoolean.FalseHandle, kCGPDFContextAllowsPrinting);
if (AllowsCopying.HasValue && AllowsCopying.Value == false)
- ret.LowlevelSetObject (CFBoolean.False.Handle, kCGPDFContextAllowsCopying);
+ ret.LowlevelSetObject (CFBoolean.FalseHandle, kCGPDFContextAllowsCopying);
if (AccessPermissions.HasValue)
ret.LowlevelSetObject (NSNumber.FromInt32 ((int) AccessPermissions.Value), kCGPDFContextAccessPermissions);
return ret;
diff --git a/src/CoreImage/CIImage.cs b/src/CoreImage/CIImage.cs
index 570bd3605862..8230453459da 100644
--- a/src/CoreImage/CIImage.cs
+++ b/src/CoreImage/CIImage.cs
@@ -71,10 +71,10 @@ internal NSDictionary ToDictionary ()
NSMutableDictionary dict = new NSMutableDictionary ();
if (Enhance.HasValue && Enhance.Value == false){
- dict.LowlevelSetObject (CFBoolean.False.Handle, CIImage.AutoAdjustEnhanceKey.Handle);
+ dict.LowlevelSetObject (CFBoolean.FalseHandle, CIImage.AutoAdjustEnhanceKey.Handle);
}
if (RedEye.HasValue && RedEye.Value == false){
- dict.LowlevelSetObject (CFBoolean.False.Handle, CIImage.AutoAdjustRedEyeKey.Handle);
+ dict.LowlevelSetObject (CFBoolean.FalseHandle, CIImage.AutoAdjustRedEyeKey.Handle);
}
if (Features != null && Features.Length != 0){
dict.LowlevelSetObject (NSArray.FromObjects (Features), CIImage.AutoAdjustFeaturesKey.Handle);
@@ -83,10 +83,10 @@ internal NSDictionary ToDictionary ()
dict.LowlevelSetObject (new NSNumber ((int)ImageOrientation.Value), global::ImageIO.CGImageProperties.Orientation.Handle);
}
if (AutoAdjustCrop.HasValue && AutoAdjustCrop.Value == true){
- dict.LowlevelSetObject (CFBoolean.True.Handle, CIImage.AutoAdjustCrop.Handle);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, CIImage.AutoAdjustCrop.Handle);
}
if (AutoAdjustLevel.HasValue && AutoAdjustLevel.Value == true){
- dict.LowlevelSetObject (CFBoolean.True.Handle, CIImage.AutoAdjustLevel.Handle);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, CIImage.AutoAdjustLevel.Handle);
}
#if false
diff --git a/src/CoreMedia/CMAttachmentBearer.cs b/src/CoreMedia/CMAttachmentBearer.cs
index 50d04dbb4272..e49fe9666177 100644
--- a/src/CoreMedia/CMAttachmentBearer.cs
+++ b/src/CoreMedia/CMAttachmentBearer.cs
@@ -62,6 +62,11 @@ public static T GetAttachment (this ICMAttachmentBearer target, string key, o
return default (T);
}
+ public static T GetAttachment (this ICMAttachmentBearer target, CMSampleBufferAttachmentKey key, out CMAttachmentMode attachmentModeOut) where T: class, INativeObject
+ {
+ return GetAttachment (target, key.GetConstant (), out attachmentModeOut);
+ }
+
[DllImport(Constants.CoreMediaLibrary)]
extern static void CMPropagateAttachments (/* CMAttachmentBearerRef */ IntPtr source, /* CMAttachmentBearerRef */ IntPtr destination);
public static void PropagateAttachments (this ICMAttachmentBearer source, ICMAttachmentBearer destination)
diff --git a/src/CoreMedia/CMTime.cs b/src/CoreMedia/CMTime.cs
index f71fe048869a..62855655e3c5 100644
--- a/src/CoreMedia/CMTime.cs
+++ b/src/CoreMedia/CMTime.cs
@@ -326,17 +326,11 @@ public static CMTime Fold (CMTime time, CMTimeRange foldRange)
static CMTime ()
{
- var lib = Dlfcn.dlopen (Constants.CoreMediaLibrary, 0);
- if (lib != IntPtr.Zero) {
- try {
- ValueKey = Dlfcn.GetStringConstant (lib, "kCMTimeValueKey");
- ScaleKey = Dlfcn.GetStringConstant (lib, "kCMTimeScaleKey");
- EpochKey = Dlfcn.GetStringConstant (lib, "kCMTimeEpochKey");
- FlagsKey = Dlfcn.GetStringConstant (lib, "kCMTimeFlagsKey");
- } finally {
- Dlfcn.dlclose (lib);
- }
- }
+ var lib = Libraries.CoreMedia.Handle;
+ ValueKey = Dlfcn.GetStringConstant (lib, "kCMTimeValueKey");
+ ScaleKey = Dlfcn.GetStringConstant (lib, "kCMTimeScaleKey");
+ EpochKey = Dlfcn.GetStringConstant (lib, "kCMTimeEpochKey");
+ FlagsKey = Dlfcn.GetStringConstant (lib, "kCMTimeFlagsKey");
}
[DllImport(Constants.CoreMediaLibrary)]
diff --git a/src/CoreMedia/CoreMedia.cs b/src/CoreMedia/CoreMedia.cs
index ea6ddc3f989a..44801146072a 100644
--- a/src/CoreMedia/CoreMedia.cs
+++ b/src/CoreMedia/CoreMedia.cs
@@ -119,28 +119,22 @@ public struct CMTimeRange {
public static NSString TimeMappingTargetKey { get; private set; }
static CMTimeRange () {
- var lib = Dlfcn.dlopen (Constants.CoreMediaLibrary, 0);
- if (lib != IntPtr.Zero) {
- try {
- var retZero = Dlfcn.dlsym (lib, "kCMTimeRangeZero");
- Zero = (CMTimeRange)Marshal.PtrToStructure (retZero, typeof(CMTimeRange));
+ var lib = Libraries.CoreMedia.Handle;
+ var retZero = Dlfcn.dlsym (lib, "kCMTimeRangeZero");
+ Zero = (CMTimeRange)Marshal.PtrToStructure (retZero, typeof(CMTimeRange));
- var retInvalid = Dlfcn.dlsym (lib, "kCMTimeRangeInvalid");
+ var retInvalid = Dlfcn.dlsym (lib, "kCMTimeRangeInvalid");
#if !XAMCORE_3_0
- Invalid = (CMTimeRange)Marshal.PtrToStructure (retInvalid, typeof(CMTimeRange));
+ Invalid = (CMTimeRange)Marshal.PtrToStructure (retInvalid, typeof(CMTimeRange));
#endif
- InvalidRange = (CMTimeRange)Marshal.PtrToStructure (retInvalid, typeof(CMTimeRange));
+ InvalidRange = (CMTimeRange)Marshal.PtrToStructure (retInvalid, typeof(CMTimeRange));
- var retMappingInvalid = Dlfcn.dlsym (lib, "kCMTimeMappingInvalid");
- if (retMappingInvalid != IntPtr.Zero)
- InvalidMapping = (CMTimeRange)Marshal.PtrToStructure (retMappingInvalid, typeof(CMTimeRange));
+ var retMappingInvalid = Dlfcn.dlsym (lib, "kCMTimeMappingInvalid");
+ if (retMappingInvalid != IntPtr.Zero)
+ InvalidMapping = (CMTimeRange)Marshal.PtrToStructure (retMappingInvalid, typeof(CMTimeRange));
- TimeMappingSourceKey = Dlfcn.GetStringConstant (lib, "kCMTimeMappingSourceKey");
- TimeMappingTargetKey = Dlfcn.GetStringConstant (lib, "kCMTimeMappingTargetKey");
- } finally {
- Dlfcn.dlclose (lib);
- }
- }
+ TimeMappingSourceKey = Dlfcn.GetStringConstant (lib, "kCMTimeMappingSourceKey");
+ TimeMappingTargetKey = Dlfcn.GetStringConstant (lib, "kCMTimeMappingTargetKey");
}
#endif // !COREBUILD
}
diff --git a/src/CoreMedia/Enums.cs b/src/CoreMedia/Enums.cs
new file mode 100644
index 000000000000..97311ee79373
--- /dev/null
+++ b/src/CoreMedia/Enums.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Runtime.InteropServices;
+using Foundation;
+using ObjCRuntime;
+
+namespace CoreMedia {
+ // keys names got changed at some point, but they all refer to a CMSampleBuffer (there is not CMSample obj)
+ enum CMSampleBufferAttachmentKey {
+ [Field ("kCMSampleAttachmentKey_NotSync")]
+ NotSync,
+ [Field ("kCMSampleAttachmentKey_PartialSync")]
+ PartialSync,
+ [Field ("kCMSampleAttachmentKey_HasRedundantCoding")]
+ HasRedundantCoding,
+ [Field ("kCMSampleAttachmentKey_IsDependedOnByOthers")]
+ IsDependedOnByOthers,
+ [Field ("kCMSampleAttachmentKey_DependsOnOthers")]
+ DependsOnOthers,
+ [Field ("kCMSampleAttachmentKey_EarlierDisplayTimesAllowed")]
+ EarlierDisplayTimesAllowed,
+ [Field ("kCMSampleAttachmentKey_DisplayImmediately")]
+ DisplayImmediately,
+ [Field ("kCMSampleAttachmentKey_DoNotDisplay")]
+ DoNotDisplay,
+ [iOS (11,0), Mac (10,13), TV (11,0)]
+ [Field ("kCMSampleAttachmentKey_HEVCTemporalLevelInfo")]
+ HevcTemporalLevelInfo,
+ [iOS (11,0), Mac (10,13), TV (11,0)]
+ [Field ("kCMSampleAttachmentKey_HEVCTemporalSubLayerAccess")]
+ HevcTemporalSubLayerAccess,
+ [iOS (11,0), Mac (10,13), TV (11,0)]
+ [Field ("kCMSampleAttachmentKey_HEVCStepwiseTemporalSubLayerAccess")]
+ HevcStepwiseTemporalSubLayerAccess,
+ [iOS (11,0), Mac (10,13), TV (11,0)]
+ [Field ("kCMSampleAttachmentKey_HEVCSyncSampleNALUnitType")]
+ HevcSyncSampleNalUnitType,
+ [Field ("kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding")]
+ ResetDecoderBeforeDecoding,
+ [Field ("kCMSampleBufferAttachmentKey_DrainAfterDecoding")]
+ DrainAfterDecoding,
+ [Field ("kCMSampleBufferAttachmentKey_PostNotificationWhenConsumed")]
+ PostNotificationWhenConsumed,
+ [Field ("kCMSampleBufferAttachmentKey_ResumeOutput")]
+ ResumeOutput,
+ [Field ("kCMSampleBufferAttachmentKey_TransitionID")]
+ TransitionId,
+ [Field ("kCMSampleBufferAttachmentKey_TrimDurationAtStart")]
+ TrimDurationAtStart,
+ [Field ("kCMSampleBufferAttachmentKey_TrimDurationAtEnd")]
+ TrimDurationAtEnd,
+ [Field ("kCMSampleBufferAttachmentKey_SpeedMultiplier")]
+ SpeedMultiplier,
+ [Field ("kCMSampleBufferAttachmentKey_Reverse")]
+ Reverse,
+ [Field ("kCMSampleBufferAttachmentKey_FillDiscontinuitiesWithSilence")]
+ FillDiscontinuitiesWithSilence,
+ [Field ("kCMSampleBufferAttachmentKey_EmptyMedia")]
+ EmptyMedia,
+ [Field ("kCMSampleBufferAttachmentKey_PermanentEmptyMedia")]
+ PermanentEmptyMedia,
+ [Field ("kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately")]
+ DisplayEmptyMediaImmediately,
+ [Field ("kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration")]
+ EndsPreviousSampleDuration,
+ [Field ("kCMSampleBufferAttachmentKey_SampleReferenceURL")]
+ SampleReferenceUrl,
+ [Field ("kCMSampleBufferAttachmentKey_SampleReferenceByteOffset")]
+ SampleReferenceByteOffset,
+ [Field ("kCMSampleBufferAttachmentKey_GradualDecoderRefresh")]
+ GradualDecoderRefresh,
+ [iOS (6,0)][Mac (10,14, onlyOn64: true)]
+ [Field ("kCMSampleBufferAttachmentKey_DroppedFrameReason")]
+ DroppedFrameReason,
+ [iOS (9,0)][Mac (10,14, onlyOn64: true)]
+ [Field ("kCMSampleBufferAttachmentKey_StillImageLensStabilizationInfo")]
+ StillImageLensStabilizationInfo,
+ [iOS (11,0), Mac (10,13), TV (11,0)]
+ [Field ("kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix")]
+ CameraIntrinsicMatrix,
+ [Mac (10,14, onlyOn64: true)]
+ [Field ("kCMSampleBufferAttachmentKey_DroppedFrameReasonInfo")]
+ DroppedFrameReasonInfo,
+ [Mac (10,10)]
+ [Field ("kCMSampleBufferAttachmentKey_ForceKeyFrame")]
+ ForceKeyFrame,
+ }
+}
diff --git a/src/CoreMidi/MidiServices.cs b/src/CoreMidi/MidiServices.cs
index 5044c6ef5765..97a4deaa72d2 100644
--- a/src/CoreMidi/MidiServices.cs
+++ b/src/CoreMidi/MidiServices.cs
@@ -228,11 +228,7 @@ public class MidiObject
static MidiObject ()
{
-#if MONOMAC
- var midiLibrary = Dlfcn.dlopen (Constants.CoreMidiLibrary, 0);
-#else
var midiLibrary = Libraries.CoreMidi.Handle;
-#endif
kMIDIPropertyAdvanceScheduleTimeMuSec = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyAdvanceScheduleTimeMuSec");
kMIDIPropertyCanRoute = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyCanRoute");
kMIDIPropertyConnectionUniqueID = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyConnectionUniqueID");
diff --git a/src/CoreText/CTBaselineClass.cs b/src/CoreText/CTBaselineClass.cs
index f241b0c6fe37..b524c833a878 100644
--- a/src/CoreText/CTBaselineClass.cs
+++ b/src/CoreText/CTBaselineClass.cs
@@ -52,19 +52,13 @@ static class CTBaselineClassID {
static CTBaselineClassID ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Roman = Dlfcn.GetStringConstant (handle, "kCTBaselineClassRoman");
- IdeographicCentered = Dlfcn.GetStringConstant (handle, "kCTBaselineClassIdeographicCentered");
- IdeographicLow = Dlfcn.GetStringConstant (handle, "kCTBaselineClassIdeographicLow");
- IdeographicHigh = Dlfcn.GetStringConstant (handle, "kCTBaselineClassIdeographicHigh");
- Hanging = Dlfcn.GetStringConstant (handle, "kCTBaselineClassHanging");
- Math = Dlfcn.GetStringConstant (handle, "kCTBaselineClassMath");
- } finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreText.Handle;
+ Roman = Dlfcn.GetStringConstant (handle, "kCTBaselineClassRoman");
+ IdeographicCentered = Dlfcn.GetStringConstant (handle, "kCTBaselineClassIdeographicCentered");
+ IdeographicLow = Dlfcn.GetStringConstant (handle, "kCTBaselineClassIdeographicLow");
+ IdeographicHigh = Dlfcn.GetStringConstant (handle, "kCTBaselineClassIdeographicHigh");
+ Hanging = Dlfcn.GetStringConstant (handle, "kCTBaselineClassHanging");
+ Math = Dlfcn.GetStringConstant (handle, "kCTBaselineClassMath");
}
public static NSString ToNSString (CTBaselineClass key)
@@ -106,15 +100,9 @@ static class CTBaselineFondID {
static CTBaselineFondID ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Reference = Dlfcn.GetStringConstant (handle, "kCTBaselineReferenceFont");
- Original = Dlfcn.GetStringConstant (handle, "kCTBaselineOriginalFont");
- } finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreText.Handle;
+ Reference = Dlfcn.GetStringConstant (handle, "kCTBaselineReferenceFont");
+ Original = Dlfcn.GetStringConstant (handle, "kCTBaselineOriginalFont");
}
public static NSString ToNSString (CTBaselineFont key)
diff --git a/src/CoreText/CTFontCollection.cs b/src/CoreText/CTFontCollection.cs
index 101bdd88cd6b..05d5de879628 100644
--- a/src/CoreText/CTFontCollection.cs
+++ b/src/CoreText/CTFontCollection.cs
@@ -43,15 +43,7 @@ public static class CTFontCollectionOptionKey {
static CTFontCollectionOptionKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- RemoveDuplicates = Dlfcn.GetStringConstant (handle, "kCTFontCollectionRemoveDuplicatesOption");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ RemoveDuplicates = Dlfcn.GetStringConstant (Libraries.CoreText.Handle, "kCTFontCollectionRemoveDuplicatesOption");
}
}
diff --git a/src/CoreText/CTFontDescriptor.cs b/src/CoreText/CTFontDescriptor.cs
index ece8f8a93ffc..2a382ff0376b 100644
--- a/src/CoreText/CTFontDescriptor.cs
+++ b/src/CoreText/CTFontDescriptor.cs
@@ -105,36 +105,29 @@ public static class CTFontDescriptorAttributeKey {
static CTFontDescriptorAttributeKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Url = Dlfcn.GetStringConstant (handle, "kCTFontURLAttribute");
- Name = Dlfcn.GetStringConstant (handle, "kCTFontNameAttribute");
- DisplayName = Dlfcn.GetStringConstant (handle, "kCTFontDisplayNameAttribute");
- FamilyName = Dlfcn.GetStringConstant (handle, "kCTFontFamilyNameAttribute");
- StyleName = Dlfcn.GetStringConstant (handle, "kCTFontStyleNameAttribute");
- Traits = Dlfcn.GetStringConstant (handle, "kCTFontTraitsAttribute");
- Variation = Dlfcn.GetStringConstant (handle, "kCTFontVariationAttribute");
- Size = Dlfcn.GetStringConstant (handle, "kCTFontSizeAttribute");
- Matrix = Dlfcn.GetStringConstant (handle, "kCTFontMatrixAttribute");
- CascadeList = Dlfcn.GetStringConstant (handle, "kCTFontCascadeListAttribute");
- CharacterSet = Dlfcn.GetStringConstant (handle, "kCTFontCharacterSetAttribute");
- Languages = Dlfcn.GetStringConstant (handle, "kCTFontLanguagesAttribute");
- BaselineAdjust = Dlfcn.GetStringConstant (handle, "kCTFontBaselineAdjustAttribute");
- MacintoshEncodings = Dlfcn.GetStringConstant (handle, "kCTFontMacintoshEncodingsAttribute");
- Features = Dlfcn.GetStringConstant (handle, "kCTFontFeaturesAttribute");
- FeatureSettings = Dlfcn.GetStringConstant (handle, "kCTFontFeatureSettingsAttribute");
- FixedAdvance = Dlfcn.GetStringConstant (handle, "kCTFontFixedAdvanceAttribute");
- FontOrientation = Dlfcn.GetStringConstant (handle, "kCTFontOrientationAttribute");
- FontFormat = Dlfcn.GetStringConstant (handle, "kCTFontFormatAttribute");
- RegistrationScope = Dlfcn.GetStringConstant (handle, "kCTFontRegistrationScopeAttribute");
- Priority = Dlfcn.GetStringConstant (handle, "kCTFontPriorityAttribute");
- Enabled = Dlfcn.GetStringConstant (handle, "kCTFontEnabledAttribute");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreText.Handle;
+ Url = Dlfcn.GetStringConstant (handle, "kCTFontURLAttribute");
+ Name = Dlfcn.GetStringConstant (handle, "kCTFontNameAttribute");
+ DisplayName = Dlfcn.GetStringConstant (handle, "kCTFontDisplayNameAttribute");
+ FamilyName = Dlfcn.GetStringConstant (handle, "kCTFontFamilyNameAttribute");
+ StyleName = Dlfcn.GetStringConstant (handle, "kCTFontStyleNameAttribute");
+ Traits = Dlfcn.GetStringConstant (handle, "kCTFontTraitsAttribute");
+ Variation = Dlfcn.GetStringConstant (handle, "kCTFontVariationAttribute");
+ Size = Dlfcn.GetStringConstant (handle, "kCTFontSizeAttribute");
+ Matrix = Dlfcn.GetStringConstant (handle, "kCTFontMatrixAttribute");
+ CascadeList = Dlfcn.GetStringConstant (handle, "kCTFontCascadeListAttribute");
+ CharacterSet = Dlfcn.GetStringConstant (handle, "kCTFontCharacterSetAttribute");
+ Languages = Dlfcn.GetStringConstant (handle, "kCTFontLanguagesAttribute");
+ BaselineAdjust = Dlfcn.GetStringConstant (handle, "kCTFontBaselineAdjustAttribute");
+ MacintoshEncodings = Dlfcn.GetStringConstant (handle, "kCTFontMacintoshEncodingsAttribute");
+ Features = Dlfcn.GetStringConstant (handle, "kCTFontFeaturesAttribute");
+ FeatureSettings = Dlfcn.GetStringConstant (handle, "kCTFontFeatureSettingsAttribute");
+ FixedAdvance = Dlfcn.GetStringConstant (handle, "kCTFontFixedAdvanceAttribute");
+ FontOrientation = Dlfcn.GetStringConstant (handle, "kCTFontOrientationAttribute");
+ FontFormat = Dlfcn.GetStringConstant (handle, "kCTFontFormatAttribute");
+ RegistrationScope = Dlfcn.GetStringConstant (handle, "kCTFontRegistrationScopeAttribute");
+ Priority = Dlfcn.GetStringConstant (handle, "kCTFontPriorityAttribute");
+ Enabled = Dlfcn.GetStringConstant (handle, "kCTFontEnabledAttribute");
}
}
diff --git a/src/CoreText/CTFontManager.cs b/src/CoreText/CTFontManager.cs
index d45900c45e77..dd148c7c572b 100644
--- a/src/CoreText/CTFontManager.cs
+++ b/src/CoreText/CTFontManager.cs
@@ -241,18 +241,11 @@ public static bool UnregisterGraphicsFont (CGFont font, out NSError error)
static CTFontManager ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
+ var handle = Libraries.CoreText.Handle;
#if !XAMCORE_3_0
- ErrorDomain = Dlfcn.GetStringConstant (handle, "kCTFontManagerErrorDomain");
+ ErrorDomain = Dlfcn.GetStringConstant (handle, "kCTFontManagerErrorDomain");
#endif
- ErrorFontUrlsKey = Dlfcn.GetStringConstant (handle, "kCTFontManagerErrorFontURLsKey");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ ErrorFontUrlsKey = Dlfcn.GetStringConstant (handle, "kCTFontManagerErrorFontURLsKey");
}
static NSString _RegisteredFontsChangedNotification;
@@ -260,11 +253,8 @@ static CTFontManager ()
[iOS (7,0)]
static NSString RegisteredFontsChangedNotification {
get {
- if (_RegisteredFontsChangedNotification == null){
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- _RegisteredFontsChangedNotification = Dlfcn.GetStringConstant (handle, "kCTFontManagerRegisteredFontsChangedNotification");
- Dlfcn.dlclose (handle);
- }
+ if (_RegisteredFontsChangedNotification == null)
+ _RegisteredFontsChangedNotification = Dlfcn.GetStringConstant (Libraries.CoreText.Handle, "kCTFontManagerRegisteredFontsChangedNotification");
return _RegisteredFontsChangedNotification;
}
}
diff --git a/src/CoreText/CTFontNameKey.cs b/src/CoreText/CTFontNameKey.cs
index 0ef87a234315..9d61e0e11740 100644
--- a/src/CoreText/CTFontNameKey.cs
+++ b/src/CoreText/CTFontNameKey.cs
@@ -79,32 +79,25 @@ static class CTFontNameKeyId {
static CTFontNameKeyId ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Copyright = Dlfcn.GetStringConstant (handle, "kCTFontCopyrightNameKey");
- Family = Dlfcn.GetStringConstant (handle, "kCTFontFamilyNameKey");
- SubFamily = Dlfcn.GetStringConstant (handle, "kCTFontSubFamilyNameKey");
- Style = Dlfcn.GetStringConstant (handle, "kCTFontStyleNameKey");
- Unique = Dlfcn.GetStringConstant (handle, "kCTFontUniqueNameKey");
- Full = Dlfcn.GetStringConstant (handle, "kCTFontFullNameKey");
- Version = Dlfcn.GetStringConstant (handle, "kCTFontVersionNameKey");
- PostScript = Dlfcn.GetStringConstant (handle, "kCTFontPostScriptNameKey");
- Trademark = Dlfcn.GetStringConstant (handle, "kCTFontTrademarkNameKey");
- Manufacturer = Dlfcn.GetStringConstant (handle, "kCTFontManufacturerNameKey");
- Designer = Dlfcn.GetStringConstant (handle, "kCTFontDesignerNameKey");
- Description = Dlfcn.GetStringConstant (handle, "kCTFontDescriptionNameKey");
- VendorUrl = Dlfcn.GetStringConstant (handle, "kCTFontVendorURLNameKey");
- DesignerUrl = Dlfcn.GetStringConstant (handle, "kCTFontDesignerURLNameKey");
- License = Dlfcn.GetStringConstant (handle, "kCTFontLicenseNameKey");
- LicenseUrl = Dlfcn.GetStringConstant (handle, "kCTFontLicenseURLNameKey");
- SampleText = Dlfcn.GetStringConstant (handle, "kCTFontSampleTextNameKey");
- PostscriptCid = Dlfcn.GetStringConstant (handle, "kCTFontPostScriptCIDNameKey");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreText.Handle;
+ Copyright = Dlfcn.GetStringConstant (handle, "kCTFontCopyrightNameKey");
+ Family = Dlfcn.GetStringConstant (handle, "kCTFontFamilyNameKey");
+ SubFamily = Dlfcn.GetStringConstant (handle, "kCTFontSubFamilyNameKey");
+ Style = Dlfcn.GetStringConstant (handle, "kCTFontStyleNameKey");
+ Unique = Dlfcn.GetStringConstant (handle, "kCTFontUniqueNameKey");
+ Full = Dlfcn.GetStringConstant (handle, "kCTFontFullNameKey");
+ Version = Dlfcn.GetStringConstant (handle, "kCTFontVersionNameKey");
+ PostScript = Dlfcn.GetStringConstant (handle, "kCTFontPostScriptNameKey");
+ Trademark = Dlfcn.GetStringConstant (handle, "kCTFontTrademarkNameKey");
+ Manufacturer = Dlfcn.GetStringConstant (handle, "kCTFontManufacturerNameKey");
+ Designer = Dlfcn.GetStringConstant (handle, "kCTFontDesignerNameKey");
+ Description = Dlfcn.GetStringConstant (handle, "kCTFontDescriptionNameKey");
+ VendorUrl = Dlfcn.GetStringConstant (handle, "kCTFontVendorURLNameKey");
+ DesignerUrl = Dlfcn.GetStringConstant (handle, "kCTFontDesignerURLNameKey");
+ License = Dlfcn.GetStringConstant (handle, "kCTFontLicenseNameKey");
+ LicenseUrl = Dlfcn.GetStringConstant (handle, "kCTFontLicenseURLNameKey");
+ SampleText = Dlfcn.GetStringConstant (handle, "kCTFontSampleTextNameKey");
+ PostscriptCid = Dlfcn.GetStringConstant (handle, "kCTFontPostScriptCIDNameKey");
}
public static NSString ToId (CTFontNameKey key)
diff --git a/src/CoreText/CTFontTrait.cs b/src/CoreText/CTFontTrait.cs
index 6092c7fc003f..45cde3c47dd9 100644
--- a/src/CoreText/CTFontTrait.cs
+++ b/src/CoreText/CTFontTrait.cs
@@ -43,18 +43,11 @@ public static class CTFontTraitKey {
static CTFontTraitKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Symbolic = Dlfcn.GetStringConstant (handle, "kCTFontSymbolicTrait");
- Weight = Dlfcn.GetStringConstant (handle, "kCTFontWeightTrait");
- Width = Dlfcn.GetStringConstant (handle, "kCTFontWidthTrait");
- Slant = Dlfcn.GetStringConstant (handle, "kCTFontSlantTrait");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreText.Handle;
+ Symbolic = Dlfcn.GetStringConstant (handle, "kCTFontSymbolicTrait");
+ Weight = Dlfcn.GetStringConstant (handle, "kCTFontWeightTrait");
+ Width = Dlfcn.GetStringConstant (handle, "kCTFontWidthTrait");
+ Slant = Dlfcn.GetStringConstant (handle, "kCTFontSlantTrait");
}
}
diff --git a/src/CoreText/CTFrame.cs b/src/CoreText/CTFrame.cs
index 4cfcd7b5ad8c..4d97c98273fa 100644
--- a/src/CoreText/CTFrame.cs
+++ b/src/CoreText/CTFrame.cs
@@ -57,19 +57,12 @@ public static class CTFrameAttributeKey {
static CTFrameAttributeKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Progression = Dlfcn.GetStringConstant (handle, "kCTFrameProgressionAttributeName");
- PathFillRule = Dlfcn.GetStringConstant (handle, "kCTFramePathFillRuleAttributeName");
- PathWidth = Dlfcn.GetStringConstant (handle, "kCTFramePathWidthAttributeName");
- ClippingPaths = Dlfcn.GetStringConstant (handle, "kCTFrameClippingPathsAttributeName");
- PathClippingPath = Dlfcn.GetStringConstant (handle, "kCTFramePathClippingPathAttributeName");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreText.Handle;
+ Progression = Dlfcn.GetStringConstant (handle, "kCTFrameProgressionAttributeName");
+ PathFillRule = Dlfcn.GetStringConstant (handle, "kCTFramePathFillRuleAttributeName");
+ PathWidth = Dlfcn.GetStringConstant (handle, "kCTFramePathWidthAttributeName");
+ ClippingPaths = Dlfcn.GetStringConstant (handle, "kCTFrameClippingPathsAttributeName");
+ PathClippingPath = Dlfcn.GetStringConstant (handle, "kCTFramePathClippingPathAttributeName");
}
}
diff --git a/src/CoreText/CTStringAttributes.cs b/src/CoreText/CTStringAttributes.cs
index 665830b13d3a..803c2b99ebcf 100644
--- a/src/CoreText/CTStringAttributes.cs
+++ b/src/CoreText/CTStringAttributes.cs
@@ -100,39 +100,32 @@ public static class CTStringAttributeKey {
static CTStringAttributeKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- Font = Dlfcn.GetStringConstant (handle, "kCTFontAttributeName");
- ForegroundColorFromContext = Dlfcn.GetStringConstant (handle, "kCTForegroundColorFromContextAttributeName");
- KerningAdjustment = Dlfcn.GetStringConstant (handle, "kCTKernAttributeName");
- LigatureFormation = Dlfcn.GetStringConstant (handle, "kCTLigatureAttributeName");
- ForegroundColor = Dlfcn.GetStringConstant (handle, "kCTForegroundColorAttributeName");
- BackgroundColor = Dlfcn.GetStringConstant (handle, "kCTBackgroundColorAttributeName");
- ParagraphStyle = Dlfcn.GetStringConstant (handle, "kCTParagraphStyleAttributeName");
- StrokeWidth = Dlfcn.GetStringConstant (handle, "kCTStrokeWidthAttributeName");
- StrokeColor = Dlfcn.GetStringConstant (handle, "kCTStrokeColorAttributeName");
- UnderlineStyle = Dlfcn.GetStringConstant (handle, "kCTUnderlineStyleAttributeName");
- Superscript = Dlfcn.GetStringConstant (handle, "kCTSuperscriptAttributeName");
- UnderlineColor = Dlfcn.GetStringConstant (handle, "kCTUnderlineColorAttributeName");
- VerticalForms = Dlfcn.GetStringConstant (handle, "kCTVerticalFormsAttributeName");
- HorizontalInVerticalForms = Dlfcn.GetStringConstant (handle, "kCTHorizontalInVerticalFormsAttributeName");
- GlyphInfo = Dlfcn.GetStringConstant (handle, "kCTGlyphInfoAttributeName");
- CharacterShape = Dlfcn.GetStringConstant (handle, "kCTCharacterShapeAttributeName");
- RunDelegate = Dlfcn.GetStringConstant (handle, "kCTRunDelegateAttributeName");
- BaselineOffset = Dlfcn.GetStringConstant (handle, "kCTBaselineOffsetAttributeName");
+ var handle = Libraries.CoreText.Handle;
+ Font = Dlfcn.GetStringConstant (handle, "kCTFontAttributeName");
+ ForegroundColorFromContext = Dlfcn.GetStringConstant (handle, "kCTForegroundColorFromContextAttributeName");
+ KerningAdjustment = Dlfcn.GetStringConstant (handle, "kCTKernAttributeName");
+ LigatureFormation = Dlfcn.GetStringConstant (handle, "kCTLigatureAttributeName");
+ ForegroundColor = Dlfcn.GetStringConstant (handle, "kCTForegroundColorAttributeName");
+ BackgroundColor = Dlfcn.GetStringConstant (handle, "kCTBackgroundColorAttributeName");
+ ParagraphStyle = Dlfcn.GetStringConstant (handle, "kCTParagraphStyleAttributeName");
+ StrokeWidth = Dlfcn.GetStringConstant (handle, "kCTStrokeWidthAttributeName");
+ StrokeColor = Dlfcn.GetStringConstant (handle, "kCTStrokeColorAttributeName");
+ UnderlineStyle = Dlfcn.GetStringConstant (handle, "kCTUnderlineStyleAttributeName");
+ Superscript = Dlfcn.GetStringConstant (handle, "kCTSuperscriptAttributeName");
+ UnderlineColor = Dlfcn.GetStringConstant (handle, "kCTUnderlineColorAttributeName");
+ VerticalForms = Dlfcn.GetStringConstant (handle, "kCTVerticalFormsAttributeName");
+ HorizontalInVerticalForms = Dlfcn.GetStringConstant (handle, "kCTHorizontalInVerticalFormsAttributeName");
+ GlyphInfo = Dlfcn.GetStringConstant (handle, "kCTGlyphInfoAttributeName");
+ CharacterShape = Dlfcn.GetStringConstant (handle, "kCTCharacterShapeAttributeName");
+ RunDelegate = Dlfcn.GetStringConstant (handle, "kCTRunDelegateAttributeName");
+ BaselineOffset = Dlfcn.GetStringConstant (handle, "kCTBaselineOffsetAttributeName");
#if !MONOMAC
- BaselineClass = Dlfcn.GetStringConstant (handle, "kCTBaselineClassAttributeName");
- BaselineInfo = Dlfcn.GetStringConstant (handle, "kCTBaselineInfoAttributeName");
- BaselineReferenceInfo = Dlfcn.GetStringConstant (handle, "kCTBaselineReferenceInfoAttributeName");
- WritingDirection = Dlfcn.GetStringConstant (handle, "kCTWritingDirectionAttributeName");
+ BaselineClass = Dlfcn.GetStringConstant (handle, "kCTBaselineClassAttributeName");
+ BaselineInfo = Dlfcn.GetStringConstant (handle, "kCTBaselineInfoAttributeName");
+ BaselineReferenceInfo = Dlfcn.GetStringConstant (handle, "kCTBaselineReferenceInfoAttributeName");
+ WritingDirection = Dlfcn.GetStringConstant (handle, "kCTWritingDirectionAttributeName");
#endif
- }
- finally {
- Dlfcn.dlclose (handle);
- }
}
}
#endregion
diff --git a/src/CoreText/CTTextTab.cs b/src/CoreText/CTTextTab.cs
index 3fe55824915b..5718fd2cf19c 100644
--- a/src/CoreText/CTTextTab.cs
+++ b/src/CoreText/CTTextTab.cs
@@ -41,15 +41,7 @@ public static class CTTextTabOptionKey {
static CTTextTabOptionKey ()
{
- var handle = Dlfcn.dlopen (Constants.CoreTextLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- ColumnTerminators = Dlfcn.GetStringConstant (handle, "kCTTabColumnTerminatorsAttributeName");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ ColumnTerminators = Dlfcn.GetStringConstant (Libraries.CoreText.Handle, "kCTTabColumnTerminatorsAttributeName");
}
}
diff --git a/src/CoreVideo/CVPixelFormatDescription.cs b/src/CoreVideo/CVPixelFormatDescription.cs
index 1844a7124f2a..d8eec7ff4468 100644
--- a/src/CoreVideo/CVPixelFormatDescription.cs
+++ b/src/CoreVideo/CVPixelFormatDescription.cs
@@ -82,49 +82,42 @@ public static class CVPixelFormatDescription {
static CVPixelFormatDescription ()
{
- var handle = Dlfcn.dlopen (Constants.CoreVideoLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- NameKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatName");
- ConstantKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatConstant");
- CodecTypeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCodecType");
- FourCCKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatFourCC");
- PlanesKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatPlanes");
- BlockWidthKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockWidth");
- BlockHeightKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockHeight");
- BitsPerBlockKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBitsPerBlock");
- BlockHorizontalAlignmentKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockHorizontalAlignment");
- BlockVerticalAlignmentKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockVerticalAlignment");
- BlackBlockKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlackBlock");
- HorizontalSubsamplingKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatHorizontalSubsampling");
- VerticalSubsamplingKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatVerticalSubsampling");
- OpenGLFormatKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLFormat");
- OpenGLTypeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLType");
- OpenGLInternalFormatKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLInternalFormat");
- CGBitmapInfoKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCGBitmapInfo");
- QDCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatQDCompatibility");
- CGBitmapContextCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCGBitmapContextCompatibility");
- CGImageCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCGImageCompatibility");
- OpenGLCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLCompatibility");
- FillExtendedPixelsCallbackKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatFillExtendedPixelsCallback");
-
- //iOS8 only
- ContainsRgb = Dlfcn.GetStringConstant (handle, "kCVPixelFormatContainsRGB");
- ContainsYCbCr = Dlfcn.GetStringConstant (handle, "kCVPixelFormatContainsYCbCr");
-
- //iOS9 only
- ComponentRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange");
- ComponentRangeFullRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange_FullRange");
- ComponentRangeVideoRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange_VideoRange");
- ComponentRangeWideRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange_WideRange");
-
- // Xcode 10
- ContainsGrayscaleKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatContainsGrayscale");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.CoreVideo.Handle;
+ NameKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatName");
+ ConstantKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatConstant");
+ CodecTypeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCodecType");
+ FourCCKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatFourCC");
+ PlanesKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatPlanes");
+ BlockWidthKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockWidth");
+ BlockHeightKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockHeight");
+ BitsPerBlockKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBitsPerBlock");
+ BlockHorizontalAlignmentKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockHorizontalAlignment");
+ BlockVerticalAlignmentKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlockVerticalAlignment");
+ BlackBlockKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatBlackBlock");
+ HorizontalSubsamplingKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatHorizontalSubsampling");
+ VerticalSubsamplingKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatVerticalSubsampling");
+ OpenGLFormatKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLFormat");
+ OpenGLTypeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLType");
+ OpenGLInternalFormatKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLInternalFormat");
+ CGBitmapInfoKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCGBitmapInfo");
+ QDCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatQDCompatibility");
+ CGBitmapContextCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCGBitmapContextCompatibility");
+ CGImageCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatCGImageCompatibility");
+ OpenGLCompatibilityKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatOpenGLCompatibility");
+ FillExtendedPixelsCallbackKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatFillExtendedPixelsCallback");
+
+ //iOS8 only
+ ContainsRgb = Dlfcn.GetStringConstant (handle, "kCVPixelFormatContainsRGB");
+ ContainsYCbCr = Dlfcn.GetStringConstant (handle, "kCVPixelFormatContainsYCbCr");
+
+ //iOS9 only
+ ComponentRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange");
+ ComponentRangeFullRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange_FullRange");
+ ComponentRangeVideoRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange_VideoRange");
+ ComponentRangeWideRangeKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatComponentRange_WideRange");
+
+ // Xcode 10
+ ContainsGrayscaleKey = Dlfcn.GetStringConstant (handle, "kCVPixelFormatContainsGrayscale");
}
// note: bad documentation, ref: https://bugzilla.xamarin.com/show_bug.cgi?id=13917
diff --git a/src/Foundation/DictionaryContainer.cs b/src/Foundation/DictionaryContainer.cs
index 6717fb2c6f2b..229e2d27e405 100644
--- a/src/Foundation/DictionaryContainer.cs
+++ b/src/Foundation/DictionaryContainer.cs
@@ -359,7 +359,7 @@ protected void SetArrayValue (NSString key, INativeObject[] values)
protected void SetBooleanValue (NSString key, bool? value)
{
if (NullCheckAndRemoveKey (key, !value.HasValue))
- CFMutableDictionary.SetValue (Dictionary.Handle, key.Handle, value.Value ? CFBoolean.True.Handle : CFBoolean.False.Handle);
+ CFMutableDictionary.SetValue (Dictionary.Handle, key.Handle, value.Value ? CFBoolean.TrueHandle : CFBoolean.FalseHandle);
}
#endregion
diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs
index 53e14ea581bf..5713fed437ad 100644
--- a/src/Foundation/Enum.cs
+++ b/src/Foundation/Enum.cs
@@ -1092,6 +1092,7 @@ public enum NSLengthFormatterUnit : long {
}
[iOS (8,0)]
+ [Mac (10,10)]
[Native]
public enum NSQualityOfService : long {
UserInteractive = 33,
diff --git a/src/ImageIO/CGImageDestination.cs b/src/ImageIO/CGImageDestination.cs
index 4da3485f028a..5c284f72dd26 100644
--- a/src/ImageIO/CGImageDestination.cs
+++ b/src/ImageIO/CGImageDestination.cs
@@ -86,9 +86,9 @@ internal NSMutableDictionary ToDictionary ()
dict.LowlevelSetObject (Metadata.Handle, kMetadata);
// default are false
if (MergeMetadata)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kMergeMetadata);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kMergeMetadata);
if (ShouldExcludeXMP)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kShouldExcludeXMP);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kShouldExcludeXMP);
} else {
// DateTime is exclusive of metadata (which includes its own)
if (DateTime.HasValue)
@@ -108,14 +108,14 @@ internal NSMutableDictionary ToDictionary ()
// new in iOS 8 and 10.10 - default is false
if (EmbedThumbnail && (kEmbedThumbnail != IntPtr.Zero))
- dict.LowlevelSetObject (CFBoolean.True.Handle, kEmbedThumbnail);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kEmbedThumbnail);
// new in iOS 8 and 10.10 - default is false
if (ShouldExcludeGPS && (kShouldExcludeGPS != IntPtr.Zero))
- dict.LowlevelSetObject (CFBoolean.True.Handle, kShouldExcludeGPS);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kShouldExcludeGPS);
if (OptimizeColorForSharing && (kOptimizeColorForSharing != IntPtr.Zero))
- dict.LowlevelSetObject (CFBoolean.True.Handle, kOptimizeColorForSharing);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kOptimizeColorForSharing);
return dict;
}
@@ -169,9 +169,9 @@ internal NSMutableDictionary ToDictionary ()
dict.LowlevelSetObject (Metadata.Handle, kMetadata);
// default are false
if (MergeMetadata)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kMergeMetadata);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kMergeMetadata);
if (ShouldExcludeXMP)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kShouldExcludeXMP);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kShouldExcludeXMP);
} else {
// DateTime is exclusive of metadata (which includes its own)
if (DateTime.HasValue)
@@ -180,7 +180,7 @@ internal NSMutableDictionary ToDictionary ()
// new in iOS 8 and 10.10 - default is false
if (ShouldExcludeGPS && (kShouldExcludeGPS != IntPtr.Zero))
- dict.LowlevelSetObject (CFBoolean.True.Handle, kShouldExcludeGPS);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kShouldExcludeGPS);
if (Orientation.HasValue) {
using (var n = new NSNumber (Orientation.Value))
diff --git a/src/ImageIO/CGImageMetadata.cs b/src/ImageIO/CGImageMetadata.cs
index 1728ba804029..4f243f624bc8 100644
--- a/src/ImageIO/CGImageMetadata.cs
+++ b/src/ImageIO/CGImageMetadata.cs
@@ -26,7 +26,7 @@ internal NSMutableDictionary ToDictionary ()
var dict = new NSMutableDictionary ();
if (Recursive)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kCGImageMetadataEnumerateRecursively);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kCGImageMetadataEnumerateRecursively);
return dict;
}
diff --git a/src/ImageIO/CGImageMetadataTag.cs b/src/ImageIO/CGImageMetadataTag.cs
index 3428769b283d..62ab3424d6db 100644
--- a/src/ImageIO/CGImageMetadataTag.cs
+++ b/src/ImageIO/CGImageMetadataTag.cs
@@ -56,7 +56,7 @@ public CGImageMetadataTag (NSString xmlns, NSString prefix, NSString name, CGIma
// CFBoolean support
public CGImageMetadataTag (NSString xmlns, NSString prefix, NSString name, CGImageMetadataType type, bool value) :
- this (xmlns, prefix, name, type, value ? CFBoolean.True.Handle : CFBoolean.False.Handle)
+ this (xmlns, prefix, name, type, value ? CFBoolean.TrueHandle : CFBoolean.FalseHandle)
{
}
diff --git a/src/ImageIO/CGImageSource.cs b/src/ImageIO/CGImageSource.cs
index ec92fbdeb72d..11f59dfc932f 100644
--- a/src/ImageIO/CGImageSource.cs
+++ b/src/ImageIO/CGImageSource.cs
@@ -70,11 +70,11 @@ internal virtual NSMutableDictionary ToDictionary ()
if (BestGuessTypeIdentifier != null)
dict.LowlevelSetObject (new NSString (BestGuessTypeIdentifier), kTypeIdentifierHint);
if (!ShouldCache)
- dict.LowlevelSetObject (CFBoolean.False.Handle, kShouldCache);
+ dict.LowlevelSetObject (CFBoolean.FalseHandle, kShouldCache);
if (ShouldAllowFloat)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kShouldAllowFloat);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kShouldAllowFloat);
if (kShouldCacheImmediately != IntPtr.Zero && ShouldCacheImmediately)
- dict.LowlevelSetObject (CFBoolean.True.Handle, kShouldCacheImmediately);
+ dict.LowlevelSetObject (CFBoolean.TrueHandle, kShouldCacheImmediately);
return dict;
}
@@ -93,7 +93,7 @@ public partial class CGImageThumbnailOptions : CGImageOptions {
internal override NSMutableDictionary ToDictionary ()
{
var dict = base.ToDictionary ();
- IntPtr thandle = CFBoolean.True.Handle;
+ IntPtr thandle = CFBoolean.TrueHandle;
if (CreateThumbnailFromImageIfAbsent)
dict.LowlevelSetObject (thandle, kCreateThumbnailFromImageIfAbsent);
diff --git a/src/ImageIO/CGMutableImageMetadata.cs b/src/ImageIO/CGMutableImageMetadata.cs
index 55c56bd6ff66..b77ae04e09aa 100644
--- a/src/ImageIO/CGMutableImageMetadata.cs
+++ b/src/ImageIO/CGMutableImageMetadata.cs
@@ -87,7 +87,7 @@ public bool SetValue (CGImageMetadataTag parent, NSString path, NSObject value)
public bool SetValue (CGImageMetadataTag parent, NSString path, bool value)
{
- return SetValue (parent, path, value ? CFBoolean.True.Handle : CFBoolean.False.Handle);
+ return SetValue (parent, path, value ? CFBoolean.TrueHandle : CFBoolean.FalseHandle);
}
bool SetValue (CGImageMetadataTag parent, NSString path, IntPtr value)
@@ -127,7 +127,7 @@ public bool SetValueMatchingImageProperty (NSString dictionaryName, NSString pro
public bool SetValueMatchingImageProperty (NSString dictionaryName, NSString propertyName, bool value)
{
- return SetValueMatchingImageProperty (dictionaryName, propertyName, value ? CFBoolean.True.Handle : CFBoolean.False.Handle);
+ return SetValueMatchingImageProperty (dictionaryName, propertyName, value ? CFBoolean.TrueHandle : CFBoolean.FalseHandle);
}
bool SetValueMatchingImageProperty (NSString dictionaryName, NSString propertyName, IntPtr value)
diff --git a/src/Makefile b/src/Makefile
index 9c36fbf62c26..b1cc23f40b2f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -485,7 +485,8 @@ $(MAC_BUILD_DIR)/$(1)/$(2): $(MAC_BUILD_DIR)/$(3)/generated-sources $(MAC_SOURCE
-nowarn:3021,1635,612,618,0219,0414,$(MAC_WARNINGS_TO_FIX) \
$$(MAC_CSC_FLAGS_XM) \
$(4) \
- @$$< $$(MAC_SOURCES)
+ $$(MAC_SOURCES) \
+ @$$<
$(MAC_BUILD_DIR)/$(1)/$(2:.dll=.pdb): $(MAC_BUILD_DIR)/$(1)/$(2)
diff --git a/src/MediaAccessibility/MediaAccessibility.cs b/src/MediaAccessibility/MediaAccessibility.cs
index e57237ba6162..b221390d3aee 100644
--- a/src/MediaAccessibility/MediaAccessibility.cs
+++ b/src/MediaAccessibility/MediaAccessibility.cs
@@ -78,21 +78,13 @@ public static partial class MACaptionAppearance {
static MACaptionAppearance ()
{
- var handle = Dlfcn.dlopen (Constants.MediaAccessibilityLibrary, 0);
- if (handle == IntPtr.Zero) {
- return;
- }
-
- try {
- SettingsChangedNotification = Dlfcn.GetStringConstant (handle, "kMACaptionAppearanceSettingsChangedNotification");
+ var handle = Libraries.MediaAccessibility.Handle;
+ SettingsChangedNotification = Dlfcn.GetStringConstant (handle, "kMACaptionAppearanceSettingsChangedNotification");
- MediaCharacteristicDescribesMusicAndSoundForAccessibility = Dlfcn.GetStringConstant (handle,
- "MAMediaCharacteristicDescribesMusicAndSoundForAccessibility");
- MediaCharacteristicTranscribesSpokenDialogForAccessibility = Dlfcn.GetStringConstant (handle,
- "MAMediaCharacteristicTranscribesSpokenDialogForAccessibility");
- } finally {
- Dlfcn.dlclose (handle);
- }
+ MediaCharacteristicDescribesMusicAndSoundForAccessibility = Dlfcn.GetStringConstant (handle,
+ "MAMediaCharacteristicDescribesMusicAndSoundForAccessibility");
+ MediaCharacteristicTranscribesSpokenDialogForAccessibility = Dlfcn.GetStringConstant (handle,
+ "MAMediaCharacteristicTranscribesSpokenDialogForAccessibility");
}
#endif
diff --git a/src/Metal/Defs.cs b/src/Metal/Defs.cs
index 158c192a823c..92eb3f79fda8 100644
--- a/src/Metal/Defs.cs
+++ b/src/Metal/Defs.cs
@@ -291,7 +291,9 @@ public MTLDrawPatchIndirectArguments (uint pathCount, uint instanceCount, uint p
[StructLayout (LayoutKind.Sequential)]
public struct MTLQuadTessellationFactorsHalf
{
+ [MarshalAs (UnmanagedType.ByValArray, SizeConst = 4)]
public ushort[] EdgeTessellationFactor;
+ [MarshalAs (UnmanagedType.ByValArray, SizeConst = 2)]
public ushort[] InsideTessellationFactor;
public MTLQuadTessellationFactorsHalf (ushort[] edgeTessellationFactor, ushort[] insideTessellationFactor)
@@ -306,6 +308,7 @@ public MTLQuadTessellationFactorsHalf (ushort[] edgeTessellationFactor, ushort[]
[StructLayout (LayoutKind.Sequential)]
public struct MTLTriangleTessellationFactorsHalf
{
+ [MarshalAs (UnmanagedType.ByValArray, SizeConst = 3)]
public ushort[] EdgeTessellationFactor;
public ushort InsideTessellationFactor;
diff --git a/src/ObjCRuntime/Blocks.cs b/src/ObjCRuntime/Blocks.cs
index 56f4584a9f63..cc40a2d46633 100644
--- a/src/ObjCRuntime/Blocks.cs
+++ b/src/ObjCRuntime/Blocks.cs
@@ -291,7 +291,7 @@ static Type GetDelegateProxyType (MethodInfo minfo, uint token_ref, out MethodIn
}
}
- throw ErrorHelper.CreateError (8011, "Unable to locate the delegate to block conversion attribute ([DelegateProxy]) for the return value for the method {0}.{1}. Please file a bug at http://bugzilla.xamarin.com.", baseMethod.DeclaringType.FullName, baseMethod.Name);
+ throw ErrorHelper.CreateError (8011, "Unable to locate the delegate to block conversion attribute ([DelegateProxy]) for the return value for the method {0}.{1}. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.", baseMethod.DeclaringType.FullName, baseMethod.Name);
}
[BindingImpl(BindingImplOptions.Optimizable)]
@@ -301,24 +301,24 @@ internal static IntPtr GetBlockForDelegate (MethodInfo minfo, object @delegate,
return IntPtr.Zero;
if (!(@delegate is Delegate))
- throw ErrorHelper.CreateError (8016, "Unable to convert delegate to block for the return value for the method {0}.{1}, because the input isn't a delegate, it's a {1}. Please file a bug at http://bugzilla.xamarin.com.", minfo.DeclaringType.FullName, minfo.Name, @delegate.GetType ().FullName);
+ throw ErrorHelper.CreateError (8016, "Unable to convert delegate to block for the return value for the method {0}.{1}, because the input isn't a delegate, it's a {1}. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.", minfo.DeclaringType.FullName, minfo.Name, @delegate.GetType ().FullName);
Type delegateProxyType = GetDelegateProxyType (minfo, token_ref, out var baseMethod);
if (baseMethod == null)
baseMethod = minfo; // 'baseMethod' is only used in error messages, and if it's null, we just use the closest alternative we have (minfo).
if (delegateProxyType == null)
- throw ErrorHelper.CreateError (8012, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: DelegateType is null. Please file a bug at http://bugzilla.xamarin.com.", baseMethod.DeclaringType.FullName, baseMethod.Name);
+ throw ErrorHelper.CreateError (8012, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: DelegateType is null. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.", baseMethod.DeclaringType.FullName, baseMethod.Name);
var delegateProxyField = delegateProxyType.GetField ("Handler", BindingFlags.NonPublic | BindingFlags.Static);
if (delegateProxyField == null)
- throw ErrorHelper.CreateError (8013, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: DelegateType ({2}) specifies a type without a 'Handler' field. Please file a bug at http://bugzilla.xamarin.com.", baseMethod.DeclaringType.FullName, baseMethod.Name, delegateProxyType.FullName);
+ throw ErrorHelper.CreateError (8013, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: DelegateType ({2}) specifies a type without a 'Handler' field. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.", baseMethod.DeclaringType.FullName, baseMethod.Name, delegateProxyType.FullName);
var handlerDelegate = delegateProxyField.GetValue (null);
if (handlerDelegate == null)
- throw ErrorHelper.CreateError (8014, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: The DelegateType's ({2}) 'Handler' field is null. Please file a bug at http://bugzilla.xamarin.com.", baseMethod.DeclaringType.FullName, baseMethod.Name, delegateProxyType.FullName);
+ throw ErrorHelper.CreateError (8014, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: The DelegateType's ({2}) 'Handler' field is null. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.", baseMethod.DeclaringType.FullName, baseMethod.Name, delegateProxyType.FullName);
if (!(handlerDelegate is Delegate))
- throw ErrorHelper.CreateError (8015, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: The DelegateType's ({2}) 'Handler' field is not a delegate, it's a {3}. Please file a bug at http://bugzilla.xamarin.com.", baseMethod.DeclaringType.FullName, baseMethod.Name, delegateProxyType.FullName, handlerDelegate.GetType ().FullName);
+ throw ErrorHelper.CreateError (8015, "Invalid DelegateProxyAttribute for the return value for the method {0}.{1}: The DelegateType's ({2}) 'Handler' field is not a delegate, it's a {3}. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.", baseMethod.DeclaringType.FullName, baseMethod.Name, delegateProxyType.FullName, handlerDelegate.GetType ().FullName);
// We now have the information we need to create the block.
// Note that we must create a heap-allocated block, so we
diff --git a/src/ObjCRuntime/Class.cs b/src/ObjCRuntime/Class.cs
index b81a5fff0007..761e100b1e1a 100644
--- a/src/ObjCRuntime/Class.cs
+++ b/src/ObjCRuntime/Class.cs
@@ -332,7 +332,7 @@ internal unsafe static Type FindType (IntPtr @class, out bool is_custom_type)
var type = member as Type;
if (type == null && member != null)
- throw ErrorHelper.CreateError (8022, $"Expected the token reference 0x{entry.Value.type_reference:X} to be a type, but it's a {member.GetType ().Name}. Please file a bug report at http://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8022, $"Expected the token reference 0x{entry.Value.type_reference:X} to be a type, but it's a {member.GetType ().Name}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.");
#if LOG_TYPELOAD
Console.WriteLine ($"FindType (0x{@class:X} = {Marshal.PtrToStringAuto (class_getName (@class))}) => {type.FullName}; is custom: {is_custom_type} (token reference: 0x{entry.Value.type_reference:X}).");
diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs
index dc7ccc3a4c5b..1c68b04b364e 100644
--- a/src/ObjCRuntime/Dlfcn.cs
+++ b/src/ObjCRuntime/Dlfcn.cs
@@ -51,7 +51,24 @@ static partial class Libraries {
static public class System {
static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.libSystemLibrary, 0);
}
+ static public class LibC {
+ static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.libcLibrary, 0);
+ }
+#if MONOMAC
+ static public class CoreMidi {
+ static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.CoreMidiLibrary, 0);
+ }
+#endif
+#if !WATCH && !MONOMAC
+ static public class OpenGLES
+ {
+ static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.OpenGLESLibrary, 0);
+ }
+#endif
#if !WATCH
+ static public class AudioToolbox {
+ static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.AudioToolboxLibrary, 0);
+ }
static public class MetalPerformanceShaders {
static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.MetalPerformanceShadersLibrary, 0);
}
diff --git a/src/ObjCRuntime/DynamicRegistrar.cs b/src/ObjCRuntime/DynamicRegistrar.cs
index e98b243d86ba..578d1fe40cfe 100644
--- a/src/ObjCRuntime/DynamicRegistrar.cs
+++ b/src/ObjCRuntime/DynamicRegistrar.cs
@@ -260,7 +260,7 @@ protected override BindAsAttribute GetBindAsAttribute (MethodBase method, int pa
} else {
var cinfo = method as ConstructorInfo;
if (parameter_index == -1) {
- throw ErrorHelper.CreateError (99, $"Internal error: can't get the BindAs attribute for the return value of a constructor ({GetDescriptiveMethodName (method)}). Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't get the BindAs attribute for the return value of a constructor ({GetDescriptiveMethodName (method)}). Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
} else {
provider = cinfo.GetParameters () [parameter_index];
}
@@ -1049,7 +1049,7 @@ bool RegisterMethod (ObjCMethod method)
tramp = Method.SetGCHandleTrampoline;
break;
default:
- throw ErrorHelper.CreateError (4144, "Cannot register the method '{0}.{1}' since it does not have an associated trampoline. Please file a bug report at http://bugzilla.xamarin.com", method.DeclaringType.Type.FullName, method.Name);
+ throw ErrorHelper.CreateError (4144, "Cannot register the method '{0}.{1}' since it does not have an associated trampoline. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", method.DeclaringType.Type.FullName, method.Name);
}
return Class.class_addMethod (reg_handle, Selector.GetHandle (method.Selector), tramp, method.Signature);
diff --git a/src/ObjCRuntime/ErrorHelper.cs b/src/ObjCRuntime/ErrorHelper.cs
index 5c83f6b95c5c..8a50bcde78d5 100644
--- a/src/ObjCRuntime/ErrorHelper.cs
+++ b/src/ObjCRuntime/ErrorHelper.cs
@@ -393,7 +393,7 @@ static bool ShowInternal (Exception e)
Console.Error.WriteLine (e.StackTrace);
#if MTOUCH || MMP
} else if (IsExpectedException == null || !IsExpectedException (e)) {
- Console.Error.WriteLine ("error " + Prefix + "0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com");
+ Console.Error.WriteLine ("error " + Prefix + "0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new");
Console.Error.WriteLine (e.ToString ());
#endif
} else {
diff --git a/src/ObjCRuntime/Registrar.cs b/src/ObjCRuntime/Registrar.cs
index ff88f79eacb6..33251c71b86b 100644
--- a/src/ObjCRuntime/Registrar.cs
+++ b/src/ObjCRuntime/Registrar.cs
@@ -576,7 +576,7 @@ internal void WriteUnmanagedDescription (IntPtr desc, System.Reflection.MethodBa
var bindas_count = Marshal.ReadInt32 (desc + IntPtr.Size + 4);
if (bindas_count < 1 + Parameters.Length)
- throw ErrorHelper.CreateError (8018, $"Internal consistency error: BindAs array is not big enough (expected at least {1 + parameters.Length} elements, got {bindas_count} elements) for {method_base.DeclaringType.FullName + "." + method_base.Name}. Please file a bug report at https://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8018, $"Internal consistency error: BindAs array is not big enough (expected at least {1 + parameters.Length} elements, got {bindas_count} elements) for {method_base.DeclaringType.FullName + "." + method_base.Name}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.");
Marshal.WriteIntPtr (desc, ObjectWrapper.Convert (method_base));
Marshal.WriteInt32 (desc + IntPtr.Size, (int) semantic);
@@ -792,7 +792,7 @@ public Trampoline Trampoline {
return trampoline;
#if MTOUCH || MMP
- throw ErrorHelper.CreateError (8018, "Internal consistency error. Please file a bug report at http://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8018, "Internal consistency error. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.");
#else
var mi = (System.Reflection.MethodInfo) Method;
bool is_stret;
@@ -1236,7 +1236,7 @@ internal string DualAssemblyName
case Xamarin.Utils.ApplePlatform.TVOS:
return "Xamarin.TVOS";
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", App.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", App.Platform);
}
}
}
diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs
index 9f3e668b4369..a9186009a193 100644
--- a/src/ObjCRuntime/Runtime.cs
+++ b/src/ObjCRuntime/Runtime.cs
@@ -353,7 +353,7 @@ static IntPtr ConvertSmartEnumToNSString (IntPtr value_handle)
var smart_type = value.GetType ();
MethodBase getConstantMethod, getValueMethod;
if (!Registrar.IsSmartEnum (smart_type, out getConstantMethod, out getValueMethod))
- throw ErrorHelper.CreateError (8024, $"Could not find a valid extension type for the smart enum '{smart_type.FullName}'. Please file a bug at https://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8024, $"Could not find a valid extension type for the smart enum '{smart_type.FullName}'. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.");
var rv = (NSString) ((MethodInfo) getConstantMethod).Invoke (null, new object [] { value });
if (rv == null)
return IntPtr.Zero;
@@ -370,7 +370,7 @@ static IntPtr ConvertNSStringToSmartEnum (IntPtr value, IntPtr type)
var str = GetNSObject (value);
MethodBase getConstantMethod, getValueMethod;
if (!Registrar.IsSmartEnum (smart_type, out getConstantMethod, out getValueMethod))
- throw ErrorHelper.CreateError (8024, $"Could not find a valid extension type for the smart enum '{smart_type.FullName}'. Please file a bug at https://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8024, $"Could not find a valid extension type for the smart enum '{smart_type.FullName}'. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.");
var rv = ((MethodInfo) getValueMethod).Invoke (null, new object [] { str });
return GCHandle.ToIntPtr (GCHandle.Alloc (rv));
}
@@ -654,7 +654,7 @@ static unsafe IntPtr GetMethodFromToken (uint token_ref)
var mb = method as MethodBase;
if (method != null && mb == null)
- throw ErrorHelper.CreateError (8022, $"Expected the token reference 0x{token_ref:X} to be a method, but it's a {method.GetType ().Name}. Please file a bug report at http://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8022, $"Expected the token reference 0x{token_ref:X} to be a method, but it's a {method.GetType ().Name}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.");
if (method != null)
return ObjectWrapper.Convert (method);
@@ -670,11 +670,11 @@ static unsafe IntPtr GetGenericMethodFromToken (IntPtr obj, uint token_ref)
var mb = method as MethodBase;
if (mb == null)
- throw ErrorHelper.CreateError (8022, $"Expected the token reference 0x{token_ref:X} to be a method, but it's a {method.GetType ().Name}. Please file a bug report at http://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8022, $"Expected the token reference 0x{token_ref:X} to be a method, but it's a {method.GetType ().Name}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.");
var nsobj = ObjectWrapper.Convert (obj) as NSObject;
if (nsobj == null)
- throw ErrorHelper.CreateError (8023, $"An instance object is required to construct a closed generic method for the open generic method: {mb.DeclaringType.FullName}.{mb.Name} (token reference: 0x{token_ref:X}). Please file a bug report at http://bugzilla.xamarin.com.");
+ throw ErrorHelper.CreateError (8023, $"An instance object is required to construct a closed generic method for the open generic method: {mb.DeclaringType.FullName}.{mb.Name} (token reference: 0x{token_ref:X}). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.");
return ObjectWrapper.Convert (FindClosedMethod (nsobj.GetType (), mb));
}
@@ -898,7 +898,7 @@ static MethodInfo GetBlockWrapperCreator (MethodInfo method, int parameter)
}
}
- throw new RuntimeException (8009, true, "Unable to locate the block to delegate conversion method for the method {0}.{1}'s parameter #{2}. Please file a bug at http://bugzilla.xamarin.com.",
+ throw new RuntimeException (8009, true, "Unable to locate the block to delegate conversion method for the method {0}.{1}'s parameter #{2}. Please file a bug at https://github.com/xamarin/xamarin-macios/issues/new.",
method.DeclaringType.FullName, method.Name, parameter + 1);
}
diff --git a/src/OpenGLES/EAGLConsts.cs b/src/OpenGLES/EAGLConsts.cs
index 7d4316c7cc31..a0a14ac7461d 100644
--- a/src/OpenGLES/EAGLConsts.cs
+++ b/src/OpenGLES/EAGLConsts.cs
@@ -20,18 +20,11 @@ public static class EAGLDrawableProperty {
static EAGLDrawableProperty ()
{
- var handle = Dlfcn.dlopen (Constants.OpenGLESLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- ColorFormat = Dlfcn.GetStringConstant (handle,
- "kEAGLDrawablePropertyColorFormat");
- RetainedBacking = Dlfcn.GetStringConstant (handle,
- "kEAGLDrawablePropertyRetainedBacking");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.OpenGLES.Handle;
+ ColorFormat = Dlfcn.GetStringConstant (handle,
+ "kEAGLDrawablePropertyColorFormat");
+ RetainedBacking = Dlfcn.GetStringConstant (handle,
+ "kEAGLDrawablePropertyRetainedBacking");
}
}
@@ -43,16 +36,9 @@ public static class EAGLColorFormat {
static EAGLColorFormat ()
{
- var handle = Dlfcn.dlopen (Constants.OpenGLESLibrary, 0);
- if (handle == IntPtr.Zero)
- return;
- try {
- RGB565 = Dlfcn.GetStringConstant (handle, "kEAGLColorFormatRGB565");
- RGBA8 = Dlfcn.GetStringConstant (handle, "kEAGLColorFormatRGBA8");
- }
- finally {
- Dlfcn.dlclose (handle);
- }
+ var handle = Libraries.OpenGLES.Handle;
+ RGB565 = Dlfcn.GetStringConstant (handle, "kEAGLColorFormatRGB565");
+ RGBA8 = Dlfcn.GetStringConstant (handle, "kEAGLColorFormatRGBA8");
}
}
}
diff --git a/src/QuickLook/Thumbnail.cs b/src/QuickLook/Thumbnail.cs
index a39a320b0e49..5883ec122df2 100644
--- a/src/QuickLook/Thumbnail.cs
+++ b/src/QuickLook/Thumbnail.cs
@@ -53,7 +53,7 @@ public static CGImage Create (NSUrl url, CGSize maxThumbnailSize, float scaleFac
if (scaleFactor != 1 && iconMode != false) {
dictionary = new NSMutableDictionary ();
dictionary.LowlevelSetObject ((NSNumber) scaleFactor, OptionScaleFactorKey.Handle);
- dictionary.LowlevelSetObject (iconMode ? CFBoolean.True.Handle : CFBoolean.False.Handle, OptionIconModeKey.Handle);
+ dictionary.LowlevelSetObject (iconMode ? CFBoolean.TrueHandle : CFBoolean.FalseHandle, OptionIconModeKey.Handle);
}
var handle = QLThumbnailImageCreate (IntPtr.Zero, url.Handle, maxThumbnailSize, dictionary == null ? IntPtr.Zero : dictionary.Handle);
diff --git a/src/Security/Items.cs b/src/Security/Items.cs
index d06667461133..1f995afd6d5b 100644
--- a/src/Security/Items.cs
+++ b/src/Security/Items.cs
@@ -111,9 +111,9 @@ public static NSData QueryAsData (SecRecord query, bool wantPersistentReference,
using (var copy = NSMutableDictionary.FromDictionary (query.queryDict)){
SetLimit (copy, 1);
if (wantPersistentReference)
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnPersistentRef);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnPersistentRef);
else
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnData);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnData);
IntPtr ptr;
status = SecItem.SecItemCopyMatching (copy.Handle, out ptr);
@@ -131,9 +131,9 @@ public static NSData [] QueryAsData (SecRecord query, bool wantPersistentReferen
using (var copy = NSMutableDictionary.FromDictionary (query.queryDict)){
var n = SetLimit (copy, max);
if (wantPersistentReference)
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnPersistentRef);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnPersistentRef);
else
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnData);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnData);
IntPtr ptr;
status = SecItem.SecItemCopyMatching (copy.Handle, out ptr);
@@ -171,8 +171,8 @@ public static SecRecord QueryAsRecord (SecRecord query, out SecStatusCode result
using (var copy = NSMutableDictionary.FromDictionary (query.queryDict)){
SetLimit (copy, 1);
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnAttributes);
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnData);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnAttributes);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnData);
IntPtr ptr;
result = SecItem.SecItemCopyMatching (copy.Handle, out ptr);
if (result == SecStatusCode.Success)
@@ -187,8 +187,8 @@ public static SecRecord [] QueryAsRecord (SecRecord query, int max, out SecStatu
throw new ArgumentNullException ("query");
using (var copy = NSMutableDictionary.FromDictionary (query.queryDict)){
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnAttributes);
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnData);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnAttributes);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnData);
var n = SetLimit (copy, max);
IntPtr ptr;
@@ -213,7 +213,7 @@ public static INativeObject[] QueryAsReference (SecRecord query, int max, out Se
}
using (var copy = NSMutableDictionary.FromDictionary (query.queryDict)){
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnRef);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnRef);
SetLimit (copy, max);
IntPtr ptr;
@@ -507,7 +507,7 @@ public static object QueryAsConcreteType (SecRecord query, out SecStatusCode res
}
using (var copy = NSMutableDictionary.FromDictionary (query.queryDict)){
- copy.LowlevelSetObject (CFBoolean.True.Handle, SecItem.ReturnRef);
+ copy.LowlevelSetObject (CFBoolean.TrueHandle, SecItem.ReturnRef);
SetLimit (copy, 1);
IntPtr ptr;
@@ -898,21 +898,21 @@ public string Label {
public bool Invisible {
get {
- return Fetch (SecAttributeKey.IsInvisible) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKey.IsInvisible) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKey.IsInvisible);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKey.IsInvisible);
}
}
public bool IsNegative {
get {
- return Fetch (SecAttributeKey.IsNegative) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKey.IsNegative) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKey.IsNegative);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKey.IsNegative);
}
}
@@ -950,10 +950,10 @@ public string UseOperationPrompt {
[Deprecated (PlatformName.iOS, 9, 0, message : "Use AuthenticationUI property")]
public bool UseNoAuthenticationUI {
get {
- return Fetch (SecItem.UseNoAuthenticationUI) == CFBoolean.True.Handle;
+ return Fetch (SecItem.UseNoAuthenticationUI) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecItem.UseNoAuthenticationUI);
+ SetValue (CFBoolean.ToHandle (value), SecItem.UseNoAuthenticationUI);
}
}
#endif
@@ -1150,31 +1150,31 @@ public string ApplicationLabel {
public bool IsPermanent {
get {
- return Fetch (SecAttributeKeys.IsPermanentKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.IsPermanentKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.IsPermanentKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.IsPermanentKey.Handle);
}
}
public bool IsSensitive {
get {
- return Fetch (SecAttributeKey.IsSensitive) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKey.IsSensitive) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKey.IsSensitive);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKey.IsSensitive);
}
}
public bool IsExtractable {
get {
- return Fetch (SecAttributeKey.IsExtractable) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKey.IsExtractable) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKey.IsExtractable);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKey.IsExtractable);
}
}
@@ -1229,71 +1229,71 @@ public int EffectiveKeySize {
public bool CanEncrypt {
get {
- return Fetch (SecAttributeKeys.CanEncryptKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.CanEncryptKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.CanEncryptKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.CanEncryptKey.Handle);
}
}
public bool CanDecrypt {
get {
- return Fetch (SecAttributeKeys.CanDecryptKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.CanDecryptKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.CanDecryptKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.CanDecryptKey.Handle);
}
}
public bool CanDerive {
get {
- return Fetch (SecAttributeKeys.CanDeriveKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.CanDeriveKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.CanDeriveKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.CanDeriveKey.Handle);
}
}
public bool CanSign {
get {
- return Fetch (SecAttributeKeys.CanSignKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.CanSignKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.CanSignKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.CanSignKey.Handle);
}
}
public bool CanVerify {
get {
- return Fetch (SecAttributeKeys.CanVerifyKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.CanVerifyKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.CanVerifyKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.CanVerifyKey.Handle);
}
}
public bool CanWrap {
get {
- return Fetch (SecKeyGenerationAttributeKeys.CanWrapKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecKeyGenerationAttributeKeys.CanWrapKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecKeyGenerationAttributeKeys.CanWrapKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecKeyGenerationAttributeKeys.CanWrapKey.Handle);
}
}
public bool CanUnwrap {
get {
- return Fetch (SecAttributeKeys.CanUnwrapKey.Handle) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKeys.CanUnwrapKey.Handle) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKeys.CanUnwrapKey.Handle);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKeys.CanUnwrapKey.Handle);
}
}
@@ -1310,10 +1310,10 @@ public string AccessGroup {
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
public bool PersistentReference {
get {
- return Fetch (SecAttributeKey.PersistentReference) == CFBoolean.True.Handle;
+ return Fetch (SecAttributeKey.PersistentReference) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKey.PersistentReference);
+ SetValue (CFBoolean.ToHandle (value), SecAttributeKey.PersistentReference);
}
}
@@ -1395,21 +1395,21 @@ public string MatchSubjectContains {
public bool MatchCaseInsensitive {
get {
- return Fetch (SecItem.MatchCaseInsensitive) == CFBoolean.True.Handle;
+ return Fetch (SecItem.MatchCaseInsensitive) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecItem.MatchCaseInsensitive);
+ SetValue (CFBoolean.ToHandle (value), SecItem.MatchCaseInsensitive);
}
}
public bool MatchTrustedOnly {
get {
- return Fetch (SecItem.MatchTrustedOnly) == CFBoolean.True.Handle;
+ return Fetch (SecItem.MatchTrustedOnly) == CFBoolean.TrueHandle;
}
set {
- SetValue (CFBoolean.FromBoolean (value).Handle, SecItem.MatchTrustedOnly);
+ SetValue (CFBoolean.ToHandle (value), SecItem.MatchTrustedOnly);
}
}
diff --git a/src/UIKit/NSLayoutManager.cs b/src/UIKit/NSLayoutManager.cs
index bb7e660b3c3b..1d3ed91eb59e 100644
--- a/src/UIKit/NSLayoutManager.cs
+++ b/src/UIKit/NSLayoutManager.cs
@@ -20,7 +20,15 @@
using Foundation;
using ObjCRuntime;
+#if MONOMAC
+using UIFont=AppKit.NSFont;
+#endif
+
+#if MONOMAC
+namespace AppKit {
+#else
namespace UIKit {
+#endif
partial class NSLayoutManager {
public unsafe nuint GetGlyphs (
NSRange glyphRange,
@@ -55,7 +63,7 @@ public unsafe nuint GetGlyphs (
fixed (void *properties = tmpArray) {
fixed (nuint* charIBuffer = charIndexBuffer) {
fixed (byte* bidi = bidiLevelBuffer) {
- rv = GetGlyphsInternal (glyphRange, (IntPtr) glyphs, (IntPtr) properties, (IntPtr) charIBuffer, (IntPtr) bidi);
+ rv = GetGlyphs (glyphRange, (IntPtr) glyphs, (IntPtr) properties, (IntPtr) charIBuffer, (IntPtr) bidi);
}
}
}
@@ -71,7 +79,11 @@ public unsafe nuint GetGlyphs (
}
}
+#if XAMCORE_4_0 || MONOMAC
+ public unsafe void ShowGlyphs (
+#else
public unsafe void ShowCGGlyphs (
+#endif
short[] /* const CGGlyph* = CGFontIndex* = unsigned short* */ glyphs,
CGPoint[] /* const CGPoint* */ positions,
nuint /* NSUInteger */ glyphCount,
@@ -82,70 +94,76 @@ public unsafe void ShowCGGlyphs (
{
fixed (short* gl = glyphs) {
fixed (CGPoint* pos = positions) {
- ShowCGGlyphsInternal ((IntPtr) gl, (IntPtr) pos, glyphCount, font, textMatrix, attributes, graphicsContext);
+ ShowGlyphs ((IntPtr) gl, (IntPtr) pos, glyphCount, font, textMatrix, attributes, graphicsContext);
}
}
}
+#if !XAMCORE_4_0 && !MONOMAC
// TextContainerForGlyphAtIndex
+ [Obsolete ("Use 'GetTextContainer' instead.")]
public NSTextContainer TextContainerForGlyphAtIndex (nuint glyphIndex)
{
- return TextContainerForGlyphAtIndexInternal (glyphIndex, IntPtr.Zero);
+ return GetTextContainer (glyphIndex);
}
- public unsafe NSTextContainer TextContainerForGlyphAtIndex (nuint glyphIndex, ref NSRange effectiveGlyphRange)
+ [Obsolete ("Use 'GetTextContainer' instead.")]
+ public NSTextContainer TextContainerForGlyphAtIndex (nuint glyphIndex, ref NSRange effectiveGlyphRange)
{
- fixed (NSRange* ptr = &effectiveGlyphRange)
- return TextContainerForGlyphAtIndexInternal (glyphIndex, (IntPtr) ptr);
+ return GetTextContainer (glyphIndex, out effectiveGlyphRange);
}
// LineFragmentRectForGlyphAtIndex
+ [Obsolete ("Use 'GetLineFragmentRect' instead.")]
public CGRect LineFragmentRectForGlyphAtIndex (nuint glyphIndex)
{
- return LineFragmentRectForGlyphAtIndexInternal (glyphIndex, IntPtr.Zero);
+ return GetLineFragmentRect (glyphIndex);
}
- public unsafe CGRect LineFragmentRectForGlyphAtIndex (nuint glyphIndex, ref NSRange effectiveGlyphRange)
+ [Obsolete ("Use 'GetLineFragmentRect' instead.")]
+ public CGRect LineFragmentRectForGlyphAtIndex (nuint glyphIndex, ref NSRange effectiveGlyphRange)
{
- fixed (NSRange* ptr = &effectiveGlyphRange)
- return LineFragmentRectForGlyphAtIndexInternal (glyphIndex, (IntPtr) ptr);
+ return GetLineFragmentRect (glyphIndex, out effectiveGlyphRange);
}
// LineFragmentUsedRectForGlyphAtIndex
+ [Obsolete ("Use 'GetLineFragmentUsedRect' instead.")]
public CGRect LineFragmentUsedRectForGlyphAtIndex (nuint glyphIndex)
{
- return LineFragmentUsedRectForGlyphAtIndexInternal (glyphIndex, IntPtr.Zero);
+ return GetLineFragmentUsedRect (glyphIndex);
}
- public unsafe CGRect LineFragmentUsedRectForGlyphAtIndex (nuint glyphIndex, ref NSRange effectiveGlyphRange)
+ [Obsolete ("Use 'GetLineFragmentUsedRect' instead.")]
+ public CGRect LineFragmentUsedRectForGlyphAtIndex (nuint glyphIndex, ref NSRange effectiveGlyphRange)
{
- fixed (NSRange* ptr = &effectiveGlyphRange)
- return LineFragmentUsedRectForGlyphAtIndexInternal (glyphIndex, (IntPtr) ptr);
+ return GetLineFragmentUsedRect (glyphIndex, out effectiveGlyphRange);
}
// GlyphRangeForCharacterRange
+ [Obsolete ("Use 'GetGlyphRange' instead.")]
public NSRange GlyphRangeForCharacterRange (NSRange charRange)
{
- return GlyphRangeForCharacterRangeInternal (charRange, IntPtr.Zero);
+ return GetGlyphRange (charRange);
}
- public unsafe NSRange GlyphRangeForCharacterRange (NSRange charRange, ref NSRange actualCharRange)
+ [Obsolete ("Use 'GetGlyphRange' instead.")]
+ public NSRange GlyphRangeForCharacterRange (NSRange charRange, ref NSRange actualCharRange)
{
- fixed (NSRange* ptr = &actualCharRange)
- return GlyphRangeForCharacterRangeInternal (charRange, (IntPtr) ptr);
+ return GetGlyphRange (charRange, out actualCharRange);
}
// CharacterRangeForGlyphRange
+ [Obsolete ("Use 'GetCharacterRange' instead.")]
public NSRange CharacterRangeForGlyphRange (NSRange charRange)
{
- return CharacterRangeForGlyphRangeInternal (charRange, IntPtr.Zero);
+ return GetCharacterRange (charRange);
}
- public unsafe NSRange CharacterRangeForGlyphRange (NSRange charRange, ref NSRange actualCharRange)
+ public NSRange CharacterRangeForGlyphRange (NSRange charRange, ref NSRange actualCharRange)
{
- fixed (NSRange* ptr = &actualCharRange)
- return CharacterRangeForGlyphRangeInternal (charRange, (IntPtr) ptr);
+ return GetCharacterRange (charRange, out actualCharRange);
}
+#endif // !XAMCORE_4_0 && !MONOMAC
public unsafe nuint GetLineFragmentInsertionPoints (
nuint /* NSUInteger */ charIndex,
diff --git a/src/appkit.cs b/src/appkit.cs
index f53349091a5c..57ebff6752c6 100644
--- a/src/appkit.cs
+++ b/src/appkit.cs
@@ -10662,454 +10662,6 @@ interface NSLayoutGuide : NSCoding, NSUserInterfaceItemIdentification
NSLayoutConstraint [] GetConstraintsAffectingLayout (NSLayoutConstraintOrientation orientation);
}
- delegate void NSTextLayoutEnumerateLineFragments (CGRect rect, CGRect usedRectangle, NSTextContainer textContainer, NSRange glyphRange, out bool stop);
- delegate void NSTextLayoutEnumerateEnclosingRects (CGRect rect, out bool stop);
-
- [DesignatedDefaultCtor]
- [BaseType (typeof (NSObject))]
- partial interface NSLayoutManager : NSCoding {
- [Export ("attributedString")]
- NSAttributedString AttributedString { get; }
-
- [Export ("replaceTextStorage:")]
- void ReplaceTextStorage (NSTextStorage newTextStorage);
-
- [Export ("textContainers")]
- NSTextContainer [] TextContainers { get; }
-
- [Export ("addTextContainer:")]
- [PostGet ("TextContainers")]
- void AddTextContainer (NSTextContainer container);
-
- [Export ("insertTextContainer:atIndex:")]
- [PostGet ("TextContainers")]
- void InsertTextContainer (NSTextContainer container, nint index);
-
- [Export ("removeTextContainerAtIndex:")]
- [PostGet ("TextContainers")]
- void RemoveTextContainer (nint index);
-
- [Export ("textContainerChangedGeometry:")]
- void TextContainerChangedGeometry (NSTextContainer container);
-
- [Export ("textContainerChangedTextView:")]
- void TextContainerChangedTextView (NSTextContainer container);
-
- [Export ("layoutOptions")]
- NSGlyphStorageOptions LayoutOptions { get; }
-
- [Export ("hasNonContiguousLayout")]
- bool HasNonContiguousLayout { get; }
-
- //[Export ("invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:")]
- //void InvalidateGlyphs (NSRange charRange, int changeInLength, NSRangePointer actualCharRange);
-
- //[Export ("invalidateLayoutForCharacterRange:actualCharacterRange:")]
- //void InvalidateLayout (NSRange charRange, NSRangePointer actualCharRange);
-
- //[Export ("invalidateLayoutForCharacterRange:isSoft:actualCharacterRange:")]
- //void InvalidateLayout (NSRange charRange, bool isSoft, NSRangePointer actualCharRange);
-
- [Export ("invalidateDisplayForCharacterRange:")]
- void InvalidateDisplayForCharacterRange (NSRange charRange);
-
- [Export ("invalidateDisplayForGlyphRange:")]
- void InvalidateDisplayForGlyphRange (NSRange glyphRange);
-
-#if !XAMCORE_4_0
- [Availability (Deprecated = Platform.Mac_10_11, Message = "Use ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, nint delta, NSRange invalidatedCharRange) instead).")]
- [Export ("textStorage:edited:range:changeInLength:invalidatedRange:")]
- void TextStorageEdited (NSTextStorage str, NSTextStorageEditedFlags editedMask, NSRange newCharRange, nint changeInLength, NSRange invalidatedCharRange);
-#endif
-
- [Export ("ensureGlyphsForCharacterRange:")]
- void EnsureGlyphsForCharacterRange (NSRange charRange);
-
- [Export ("ensureGlyphsForGlyphRange:")]
- void EnsureGlyphsForGlyphRange (NSRange glyphRange);
-
- [Export ("ensureLayoutForCharacterRange:")]
- void EnsureLayoutForCharacterRange (NSRange charRange);
-
- [Export ("ensureLayoutForGlyphRange:")]
- void EnsureLayoutForGlyphRange (NSRange glyphRange);
-
- [Export ("ensureLayoutForTextContainer:")]
- void EnsureLayoutForTextContainer (NSTextContainer container);
-
- [Export ("ensureLayoutForBoundingRect:inTextContainer:")]
- void EnsureLayoutForBoundingRect (CGRect bounds, NSTextContainer container);
-
- //[Export ("insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:")]
- //void InsertGlyphs (uint [] glyphs, int length, int glyphIndex, int charIndex);
-
- [Export ("insertGlyph:atGlyphIndex:characterIndex:")]
- void InsertGlyph (uint /* NSGlyph = unsigned int */ glyph, nint glyphIndex, nint charIndex);
-
- [Export ("replaceGlyphAtIndex:withGlyph:")]
- void ReplaceGlyphAtIndex (nint glyphIndex, uint /* NSGlyph = unsigned int */ newGlyph);
-
- [Export ("deleteGlyphsInRange:")]
- void DeleteGlyphs (NSRange glyphRange);
-
- [Export ("setCharacterIndex:forGlyphAtIndex:")]
- void SetCharacterIndex (nint charIndex, nint glyphIndex);
-
- [Export ("setIntAttribute:value:forGlyphAtIndex:")]
- void SetIntAttribute (nint attributeTag, nint value, nint glyphIndex);
-
- [Export ("invalidateGlyphsOnLayoutInvalidationForGlyphRange:")]
- void InvalidateGlyphsOnLayoutInvalidation (NSRange glyphRange);
-
- [Export ("numberOfGlyphs")]
- nint NumberOfGlyphs { get; }
-
- [Export ("glyphAtIndex:isValidIndex:")]
-#if XAMCORE_2_0
- uint /* NSGlyph = unsigned int */ GlyphAtIndex (nint glyphIndex, ref bool isValidIndex);
-#else
- [Obsolete ("Use 'GlyphAtIndex' instead.")]
- uint /* NSGlyph = unsigned int */ GlyphAtIndexisValidIndex (nuint glyphIndex, ref bool isValidIndex);
-#endif
-
- [Export ("glyphAtIndex:")]
-#if XAMCORE_2_0
- uint /* NSGlyph = unsigned int */ GlyphAtIndex (nint glyphIndex);
-#else
- [Obsolete ("Use 'GlyphAtIndex' instead.")]
- uint /* NSGlyph = unsigned int */ GlyphCount (nint glyphIndex);
-#endif
-
- [Export ("isValidGlyphIndex:")]
- bool IsValidGlyphIndex (nint glyphIndex);
-
- [Export ("characterIndexForGlyphAtIndex:")]
- nuint CharacterIndexForGlyphAtIndex (nint glyphIndex);
-
- [Export ("glyphIndexForCharacterAtIndex:")]
- nuint GlyphIndexForCharacterAtIndex (nint charIndex);
-
- [Export ("intAttribute:forGlyphAtIndex:")]
- nint GetIntAttribute (nint attributeTag, nint glyphIndex);
-
- [Export ("setTextContainer:forGlyphRange:")]
- void SetTextContainerForRange (NSTextContainer container, NSRange glyphRange);
-
- [Export ("setLineFragmentRect:forGlyphRange:usedRect:")]
- void SetLineFragmentRect (CGRect fragmentRect, NSRange glyphRange, CGRect usedRect);
-
- [Export ("setExtraLineFragmentRect:usedRect:textContainer:")]
- void SetExtraLineFragmentRect (CGRect fragmentRect, CGRect usedRect, NSTextContainer container);
-
- [Export ("setLocation:forStartOfGlyphRange:")]
- void SetLocation (CGPoint location, NSRange forStartOfGlyphRange);
-
- //[Export ("setLocations:startingGlyphIndexes:count:forGlyphRange:")]
- //void SetLocations (NSPointArray locations, int glyphIndexes, uint count, NSRange glyphRange);
-
- [Export ("setNotShownAttribute:forGlyphAtIndex:")]
- void SetNotShownAttribute (bool flag, nint glyphIndex);
-
- [Export ("setDrawsOutsideLineFragment:forGlyphAtIndex:")]
- void SetDrawsOutsideLineFragment (bool flag, nint glyphIndex);
-
- [Export ("setAttachmentSize:forGlyphRange:")]
- void SetAttachmentSize (CGSize attachmentSize, NSRange glyphRange);
-
- [Export ("getFirstUnlaidCharacterIndex:glyphIndex:")]
- void GetFirstUnlaidCharacterIndex (ref nuint charIndex, ref nuint glyphIndex);
-
- [Export ("firstUnlaidCharacterIndex")]
- nint FirstUnlaidCharacterIndex { get; }
-
- [Export ("firstUnlaidGlyphIndex")]
- nint FirstUnlaidGlyphIndex { get; }
-
- //[Export ("textContainerForGlyphAtIndex:effectiveRange:")]
- //NSTextContainer TextContainerForGlyphAt (int glyphIndex, NSRangePointer effectiveGlyphRange);
-
- [Export ("usedRectForTextContainer:")]
- CGRect GetUsedRectForTextContainer (NSTextContainer container);
-
- //[Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:")]
- //CGRect LineFragmentRectForGlyphAt (int glyphIndex, NSRangePointer effectiveGlyphRange);
-
- //[Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:")]
- //CGRect LineFragmentUsedRectForGlyphAt (int glyphIndex, NSRangePointer effectiveGlyphRange);
-
- //[Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
- //CGRect LineFragmentRectForGlyphAt (int glyphIndex, NSRangePointer effectiveGlyphRange, bool flag);
-
- //[Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
- //CGRect LineFragmentUsedRectForGlyphAt (int glyphIndex, NSRangePointer effectiveGlyphRange, bool flag);
-
- //[Export ("textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
- //NSTextContainer TextContainerForGlyphAt (int glyphIndex, NSRangePointer effectiveGlyphRange, bool flag);
-
- [Export ("extraLineFragmentRect")]
- CGRect ExtraLineFragmentRect { get; }
-
- [Export ("extraLineFragmentUsedRect")]
- CGRect ExtraLineFragmentUsedRect { get; }
-
- [Export ("extraLineFragmentTextContainer")]
- NSTextContainer ExtraLineFragmentTextContainer { get; }
-
- [Export ("locationForGlyphAtIndex:")]
- CGPoint LocationForGlyphAtIndex (nint glyphIndex);
-
- [Export ("notShownAttributeForGlyphAtIndex:")]
- bool NotShownAttributeForGlyphAtIndex (nint glyphIndex);
-
- [Export ("drawsOutsideLineFragmentForGlyphAtIndex:")]
- bool DrawsOutsideLineFragmentForGlyphAt (nint glyphIndex);
-
- [Export ("attachmentSizeForGlyphAtIndex:")]
- CGSize AttachmentSizeForGlyphAt (nint glyphIndex);
-
- [Export ("setLayoutRect:forTextBlock:glyphRange:")]
- void SetLayoutRect (CGRect layoutRect, NSTextBlock forTextBlock, NSRange glyphRange);
-
- [Export ("setBoundsRect:forTextBlock:glyphRange:")]
- void SetBoundsRect (CGRect boundsRect, NSTextBlock forTextBlock, NSRange glyphRange);
-
- [Export ("layoutRectForTextBlock:glyphRange:")]
- CGRect LayoutRect (NSTextBlock block, NSRange glyphRange);
-
- [Export ("boundsRectForTextBlock:glyphRange:")]
- CGRect BoundsRect (NSTextBlock block, NSRange glyphRange);
-
- //[Export ("layoutRectForTextBlock:atIndex:effectiveRange:")]
- //CGRect LayoutRect (NSTextBlock block, int glyphIndex, NSRangePointer effectiveGlyphRange);
-
- //[Export ("boundsRectForTextBlock:atIndex:effectiveRange:")]
- //CGRect BoundsRect (NSTextBlock block, int glyphIndex, NSRangePointer effectiveGlyphRange);
-
- //[Export ("glyphRangeForCharacterRange:actualCharacterRange:")]
- //NSRange GetGlyphRange (NSRange charRange, NSRangePointer actualCharRange);
-
- //[Export ("characterRangeForGlyphRange:actualGlyphRange:")]
- //NSRange GetCharacterRange (NSRange glyphRange, NSRangePointer actualGlyphRange);
-
- [Export ("glyphRangeForTextContainer:")]
- NSRange GetGlyphRange (NSTextContainer container);
-
- [Export ("rangeOfNominallySpacedGlyphsContainingIndex:")]
- NSRange RangeOfNominallySpacedGlyphsContainingIndex (nint glyphIndex);
-
- //[Export ("rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:")]
- //NSRectArray RectArrayForCharacterRangewithinSelectedCharacterRangeinTextContainerrectCount (NSRange charRange, NSRange selCharRange, NSTextContainer container, uint rectCount);
-
- [Internal]
- [Export ("rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:")]
- [Availability (Deprecated = Platform.Mac_10_11)]
- IntPtr GetRectArray (NSRange glyphRange, NSRange selectedGlyphRange, IntPtr textContainerHandle, out nuint rectCount);
-
- [Export ("boundingRectForGlyphRange:inTextContainer:")]
- CGRect BoundingRectForGlyphRange (NSRange glyphRange, NSTextContainer container);
-
- [Export ("glyphRangeForBoundingRect:inTextContainer:")]
- NSRange GlyphRangeForBoundingRect (CGRect bounds, NSTextContainer container);
-
- [Export ("glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:")]
- NSRange GlyphRangeForBoundingRectWithoutAdditionalLayout (CGRect bounds, NSTextContainer container);
-
- [Export ("glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:")]
- nuint GlyphIndexForPointInTextContainer (CGPoint point, NSTextContainer container, ref nfloat fractionOfDistanceThroughGlyph);
-
- [Export ("glyphIndexForPoint:inTextContainer:")]
- nuint GlyphIndexForPoint (CGPoint point, NSTextContainer container);
-
- [Export ("fractionOfDistanceThroughGlyphForPoint:inTextContainer:")]
- nfloat FractionOfDistanceThroughGlyphForPoint (CGPoint point, NSTextContainer container);
-
- [Export ("characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:")]
- nuint CharacterIndexForPoint (CGPoint point, NSTextContainer container, ref nfloat fractionOfDistanceBetweenInsertionPoints);
-
- [Export ("getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:")]
- nuint GetLineFragmentInsertionPoints (nuint charIndex, bool aFlag, bool dFlag, IntPtr positions, IntPtr charIndexes);
-
- //[Export ("temporaryAttributesAtCharacterIndex:effectiveRange:")]
- //NSDictionary GetTemporaryAttributes (int charIndex, NSRangePointer effectiveCharRange);
-
- [Export ("setTemporaryAttributes:forCharacterRange:")]
- void SetTemporaryAttributes (NSDictionary attrs, NSRange charRange);
-
- [Export ("addTemporaryAttributes:forCharacterRange:")]
- void AddTemporaryAttributes (NSDictionary attrs, NSRange charRange);
-
- [Export ("removeTemporaryAttribute:forCharacterRange:")]
- void RemoveTemporaryAttribute (string attrName, NSRange charRange);
-
- //[Export ("temporaryAttribute:atCharacterIndex:effectiveRange:")]
- //NSObject GetTemporaryAttribute (string attrName, uint location, NSRangePointer range);
-
- //[Export ("temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:")]
- //NSObject GetTemporaryAttribute (string attrName, uint location, NSRangePointer range, NSRange rangeLimit);
-
- //[Export ("temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:")]
- //NSDictionary GetTemporaryAttributes (int characterIndex, NSRangePointer longestEffectiveRange, NSRange rangeLimit);
-
- [Export ("addTemporaryAttribute:value:forCharacterRange:")]
- void AddTemporaryAttribute (string attrName, NSObject value, NSRange charRange);
-
- [Export ("substituteFontForFont:")]
- NSFont SubstituteFontForFont (NSFont originalFont);
-
- [Export ("defaultLineHeightForFont:")]
- nfloat DefaultLineHeightForFont (NSFont theFont);
-
- [Export ("defaultBaselineOffsetForFont:")]
- nfloat DefaultBaselineOffsetForFont (NSFont theFont);
-
- //Detected properties
- [Export ("textStorage")]
- NSTextStorage TextStorage { get; set; }
-
- [Export ("glyphGenerator", ArgumentSemantic.Retain)]
- NSGlyphGenerator GlyphGenerator { get; set; }
-
- [Export ("typesetter", ArgumentSemantic.Retain)]
- NSTypesetter Typesetter { get; set; }
-
- [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
- NSObject WeakDelegate { get; set; }
-
- [Wrap ("WeakDelegate")]
- [Protocolize]
- NSLayoutManagerDelegate Delegate { get; set; }
-
- [Export ("backgroundLayoutEnabled")]
- bool BackgroundLayoutEnabled { get; set; }
-
- [Export ("usesScreenFonts")]
- bool UsesScreenFonts { get; set; }
-
- [Export ("showsInvisibleCharacters")]
- bool ShowsInvisibleCharacters { get; set; }
-
- [Export ("showsControlCharacters")]
- bool ShowsControlCharacters { get; set; }
-
- [Export ("hyphenationFactor")]
- float HyphenationFactor { get; set; } /* float, not CGFloat */
-
- [Export ("defaultAttachmentScaling")]
- NSImageScaling DefaultAttachmentScaling { get; set; }
-
- [Export ("typesetterBehavior")]
- NSTypesetterBehavior TypesetterBehavior { get; set; }
-
- [Export ("allowsNonContiguousLayout")]
- bool AllowsNonContiguousLayout { get; set; }
-
- [Export ("usesFontLeading")]
- bool UsesFontLeading { get; set; }
-
- [Export ("drawBackgroundForGlyphRange:atPoint:")]
- void DrawBackgroundForGlyphRange (NSRange glyphsToShow, CGPoint origin);
-
- [Export ("drawGlyphsForGlyphRange:atPoint:")]
- void DrawGlyphsForGlyphRange (NSRange glyphsToShow, CGPoint origin);
-
- [Export ("characterRangeForGlyphRange:actualGlyphRange:")]
- NSRange CharacterRangeForGlyphRange (NSRange glyphRange, out NSRange actualGlyphRange);
-
- [Export ("glyphRangeForCharacterRange:actualCharacterRange:")]
- NSRange GlyphRangeForCharacterRange (NSRange charRange, out NSRange actualCharRange);
-
- [Mac (10,10)]
- [Export ("getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:")]
- [Internal]
- nuint GetGlyphsInternal (NSRange glyphRange, IntPtr glyphBuffer, IntPtr props, IntPtr charIndexBuffer, IntPtr bidiLevelBuffer);
-
- [Mac (10,10)]
- [Export ("propertyForGlyphAtIndex:")]
- NSGlyphProperty GetProperty (nuint glyphIndex);
-
- [Mac (10,11)]
- [Export ("CGGlyphAtIndex:isValidIndex:")]
- ushort GetCGGlyph (nuint glyphIndex, out bool isValidIndex);
-
- [Mac (10,11)]
- [Export ("CGGlyphAtIndex:")]
- ushort GetCGGlyph (nuint glyphIndex);
-
- [Mac (10,11)]
- [Export ("processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:")]
- void ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, nint delta, NSRange invalidatedCharRange);
-
- [Mac (10,11)]
- [Export ("setGlyphs:properties:characterIndexes:font:forGlyphRange:")]
- void SetGlyphs (IntPtr glyphs, IntPtr props, IntPtr charIndexes, NSFont aFont, NSRange glyphRange);
-
- [Mac (10,11)]
- [Export ("truncatedGlyphRangeInLineFragmentForGlyphAtIndex:")]
- NSRange GetTruncatedGlyphRangeInLineFragment (nuint glyphIndex);
-
- [Mac (10,11)]
- [Export ("enumerateLineFragmentsForGlyphRange:usingBlock:")]
- void EnumerateLineFragments (NSRange glyphRange, NSTextLayoutEnumerateLineFragments callback);
-
- [Mac (10,11)]
- [Export ("enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:")]
- void EnumerateEnclosingRects (NSRange glyphRange, NSRange selectedRange, NSTextContainer textContainer, NSTextLayoutEnumerateEnclosingRects callback);
-
- [Mac (10, 14, onlyOn64: true)]
- [Export ("limitsLayoutForSuspiciousContents")]
- bool LimitsLayoutForSuspiciousContents { get; set; }
- }
-
- [BaseType (typeof (NSObject))]
- [Model]
- [Protocol]
- interface NSLayoutManagerDelegate {
- [Export ("layoutManagerDidInvalidateLayout:")]
- void LayoutInvalidated (NSLayoutManager sender);
-
- [Export ("layoutManager:didCompleteLayoutForTextContainer:atEnd:")]
- void LayoutCompleted (NSLayoutManager layoutManager, NSTextContainer textContainer, bool layoutFinishedFlag);
-
- [Export ("layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:")]
- NSDictionary ShouldUseTemporaryAttributes (NSLayoutManager layoutManager, NSDictionary temporaryAttributes, bool drawingToScreen, nint charIndex, IntPtr effectiveCharRange);
-
- [Mac (10,11)]
- [Export ("layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:")]
- nuint ShouldGenerateGlyphs (NSLayoutManager layoutManager, IntPtr glyphBuffer, IntPtr props, IntPtr charIndexes, NSFont aFont, NSRange glyphRange);
-
- [Mac (10,11)]
- [Export ("layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:")]
- nfloat GetLineSpacingAfterGlyph (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
-
- [Mac (10,11)]
- [Export ("layoutManager:paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:")]
- nfloat GetParagraphSpacingBeforeGlyph (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
-
- [Mac (10,11)]
- [Export ("layoutManager:paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:")]
- nfloat GetParagraphSpacingAfterGlyph (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
-
- [Mac (10,11)]
- [Export ("layoutManager:shouldUseAction:forControlCharacterAtIndex:")]
- NSControlCharacterAction ShouldUseAction (NSLayoutManager layoutManager, NSControlCharacterAction action, nuint charIndex);
-
- [Mac (10,11)]
- [Export ("layoutManager:shouldBreakLineByWordBeforeCharacterAtIndex:")]
- bool ShouldBreakLineByWordBeforeCharacter (NSLayoutManager layoutManager, nuint charIndex);
-
- [Mac (10,11)]
- [Export ("layoutManager:shouldBreakLineByHyphenatingBeforeCharacterAtIndex:")]
- bool ShouldBreakLineByHyphenatingBeforeCharacter (NSLayoutManager layoutManager, nuint charIndex);
-
- [Mac (10,11)]
- [Export ("layoutManager:boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:")]
- CGRect GetBoundingBox (NSLayoutManager layoutManager, nuint glyphIndex, NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, nuint charIndex);
-
- [Mac (10,11)]
- [Export ("layoutManager:textContainer:didChangeGeometryFromSize:")]
- void DidChangeGeometry (NSLayoutManager layoutManager, NSTextContainer textContainer, CGSize oldSize);
- }
-
[Mac (10,10)]
[BaseType (typeof (NSGestureRecognizer))]
interface NSMagnificationGestureRecognizer {
@@ -23126,11 +22678,13 @@ partial interface NSPrintOperation {
NSPrintRenderingQuality PreferredRenderingQuality { get; }
}
+#if !XAMCORE_4_0
[Category, BaseType (typeof (NSResponder))]
- partial interface NSControlEditingSupport {
- [Mac (10, 7), Export ("validateProposedFirstResponder:forEvent:")]
- bool ValidateProposedFirstResponder (NSResponder responder, [NullAllowed] NSEvent forEvent);
- }
+ partial interface NSControlEditingSupport {
+ [Mac (10, 7), Export ("validateProposedFirstResponder:forEvent:")]
+ bool ValidateProposedFirstResponder (NSResponder responder, [NullAllowed] NSEvent forEvent);
+ }
+#endif
partial interface NSResponder {
[Mac (10, 7), Export ("wantsScrollEventsForSwipeTrackingOnAxis:")]
@@ -23144,6 +22698,10 @@ partial interface NSResponder {
[Mac (10, 8), Export ("quickLookWithEvent:")]
void QuickLook (NSEvent withEvent);
+
+ // From NSControlEditingSupport category. Needs to be here to make the API easier to be used. issue 4837
+ [Mac (10, 7), Export ("validateProposedFirstResponder:forEvent:")]
+ bool ValidateProposedFirstResponder (NSResponder responder, [NullAllowed] NSEvent forEvent);
}
[Category, BaseType (typeof (NSResponder))]
diff --git a/src/btouch.cs b/src/btouch.cs
index 9f0224ac1a45..7248ea969e62 100644
--- a/src/btouch.cs
+++ b/src/btouch.cs
@@ -108,7 +108,7 @@ static string GetAttributeLibraryPath ()
throw ErrorHelper.CreateError (1043, "Internal error: unknown target framework '{0}'.", target_framework);
}
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
@@ -141,7 +141,7 @@ static IEnumerable GetLibraryDirectories ()
}
break;
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
foreach (var lib in libs)
yield return lib;
@@ -182,7 +182,7 @@ static string GetSDKRoot ()
macSdkRoot = "/Library/Frameworks/Xamarin.Mac.framework/Versions/Current";
return macSdkRoot;
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
diff --git a/src/corefoundation.cs b/src/corefoundation.cs
index 082f8c06c776..947bb4b58422 100644
--- a/src/corefoundation.cs
+++ b/src/corefoundation.cs
@@ -29,6 +29,18 @@ interface CFAllocator {
IntPtr null_ptr { get; }
}
+ [Partial]
+ [Internal]
+ interface CFBoolean {
+ [Internal]
+ [Field ("kCFBooleanTrue", "CoreFoundation")]
+ IntPtr TrueHandle { get; }
+
+ [Internal]
+ [Field ("kCFBooleanFalse", "CoreFoundation")]
+ IntPtr FalseHandle { get; }
+ }
+
[Partial]
interface CFRunLoop {
@@ -39,6 +51,13 @@ interface CFRunLoop {
NSString ModeCommon { get; }
}
+ [Partial]
+ interface DispatchData {
+ [Internal]
+ [Field ("_dispatch_data_destructor_free", "/usr/lib/system/libdispatch.dylib")]
+ IntPtr free { get; }
+ }
+
#if !WATCH
[Partial]
interface CFNetwork {
diff --git a/src/error.cs b/src/error.cs
index cd7b883d3d46..e95a3160f764 100644
--- a/src/error.cs
+++ b/src/error.cs
@@ -122,7 +122,7 @@ static bool ShowInternal (Exception e)
if (Verbosity > 2)
Console.Error.WriteLine (e.StackTrace);
} else {
- Console.Out.WriteLine ("error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com");
+ Console.Out.WriteLine ("error BI0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new");
Console.Out.WriteLine (e.ToString ());
Console.Out.WriteLine (Environment.StackTrace);
}
diff --git a/src/frameworks.sources b/src/frameworks.sources
index 5fd80020d797..b00406d4fb28 100644
--- a/src/frameworks.sources
+++ b/src/frameworks.sources
@@ -108,6 +108,7 @@ APPKIT_SOURCES = \
AppKit/NSGraphicsContext.cs \
AppKit/NSImage.cs \
AppKit/NSLayoutManager.cs \
+ UIKit/NSLayoutManager.cs \
AppKit/NSLevelIndicator.cs \
AppKit/NSMatrix.cs \
AppKit/NSMenu.cs \
@@ -490,6 +491,9 @@ COREIMAGE_SOURCES = \
CoreImage/CISampler.cs \
CoreImage/CIVector.cs \
+COREIMAGE_API_SOURCES = \
+ CoreMedia/Enums.cs \
+
# CoreLocation
CORELOCATION_CORE_SOURCES = \
@@ -1449,6 +1453,7 @@ UIKIT_SOURCES = \
UIKit/Compat.cs \
UIKit/NSLayoutConstraint.cs \
UIKit/NSLayoutManager.cs \
+ AppKit/NSLayoutManager.cs \
UIKit/UIAccessibility.cs \
UIKit/UIAccessibilityCustomAction.cs \
UIKit/UIActionSheet.cs \
@@ -1710,7 +1715,7 @@ MAC_FRAMEWORKS = \
$(COMMON_FRAMEWORKS) \
Accounts \
AdSupport \
- AppKit \
+ AppKit XKit \
AudioToolbox \
AudioUnit \
AVKit \
@@ -1867,7 +1872,7 @@ IOS_FRAMEWORKS = \
StoreKit \
SystemConfiguration \
Twitter \
- UIKit \
+ UIKit XKit \
UserNotifications \
UserNotificationsUI \
VideoToolbox \
@@ -1899,7 +1904,7 @@ WATCHOS_FRAMEWORKS = \
NaturalLanguage \
PassKit \
Security \
- UIKit \
+ UIKit XKit \
UserNotifications \
WatchConnectivity \
WatchKit \
@@ -1951,7 +1956,7 @@ TVOS_FRAMEWORKS = \
TVMLKit \
TVUIKit \
TVServices \
- UIKit \
+ UIKit XKit \
UserNotifications \
VideoSubscriberAccount \
VideoToolbox \
diff --git a/src/generator-attribute-manager.cs b/src/generator-attribute-manager.cs
index 602ec4b763b4..b3ac589254b2 100644
--- a/src/generator-attribute-manager.cs
+++ b/src/generator-attribute-manager.cs
@@ -40,10 +40,10 @@ static System.Type ConvertType (Type type, ICustomAttributeProvider provider)
}
rv = typeof (TypeManager).Assembly.GetType (n);
} else {
- throw ErrorHelper.CreateError (1054, "Internal error: can't convert type '{0}' (unknown assembly). Please file a bug report (https://bugzilla.xamarin.com) with a test case.", type.AssemblyQualifiedName);
+ throw ErrorHelper.CreateError (1054, "Internal error: can't convert type '{0}' (unknown assembly). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", type.AssemblyQualifiedName);
}
if (rv == null)
- throw ErrorHelper.CreateError (1055, "Internal error: failed to convert type '{0}'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", type.AssemblyQualifiedName);
+ throw ErrorHelper.CreateError (1055, "Internal error: failed to convert type '{0}'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", type.AssemblyQualifiedName);
return rv;
}
@@ -76,10 +76,10 @@ static Type ConvertType (System.Type type, ICustomAttributeProvider provider)
rv = TypeManager.PlatformAssembly.GetType (fullname);
}
} else {
- throw ErrorHelper.CreateError (1054, "Internal error: can't convert type '{0}' (unknown assembly). Please file a bug report (https://bugzilla.xamarin.com) with a test case.", type.AssemblyQualifiedName);
+ throw ErrorHelper.CreateError (1054, "Internal error: can't convert type '{0}' (unknown assembly). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", type.AssemblyQualifiedName);
}
if (rv == null)
- throw ErrorHelper.CreateError (1055, "Internal error: failed to convert type '{0}'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", type.AssemblyQualifiedName);
+ throw ErrorHelper.CreateError (1055, "Internal error: failed to convert type '{0}'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", type.AssemblyQualifiedName);
return rv;
}
@@ -151,7 +151,7 @@ static IEnumerable CreateAttributeInstance (CustomAttributeData attribute
constructorArguments [i] = System.Type.GetType (((Type) value).FullName);
}
if (constructorArguments [i] == null)
- throw ErrorHelper.CreateError (1056, "Internal error: failed to instantiate mock attribute '{0}' (could not convert type constructor argument #{1}). Please file a bug report (https://bugzilla.xamarin.com) with a test case.", attribType.FullName, i + 1);
+ throw ErrorHelper.CreateError (1056, "Internal error: failed to instantiate mock attribute '{0}' (could not convert type constructor argument #{1}). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", attribType.FullName, i + 1);
}
break;
default:
@@ -177,11 +177,11 @@ static IEnumerable CreateAttributeInstance (CustomAttributeData attribute
break;
}
if (ctorTypes [i] == null)
- throw ErrorHelper.CreateError (1057, "Internal error: failed to instantiate mock attribute '{0}' (could not convert constructor type #{1} ({2})). Please file a bug report (https://bugzilla.xamarin.com) with a test case.", attribType.FullName, i, paramType.FullName);
+ throw ErrorHelper.CreateError (1057, "Internal error: failed to instantiate mock attribute '{0}' (could not convert constructor type #{1} ({2})). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", attribType.FullName, i, paramType.FullName);
}
var ctor = attribType.GetConstructor (ctorTypes);
if (ctor == null)
- throw ErrorHelper.CreateError (1058, "Internal error: could not find a constructor for the mock attribute '{0}'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", attribType.FullName);
+ throw ErrorHelper.CreateError (1058, "Internal error: could not find a constructor for the mock attribute '{0}'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", attribType.FullName);
var instance = ctor.Invoke (constructorArguments);
for (int i = 0; i < attribute.NamedArguments.Count; i++) {
@@ -200,7 +200,7 @@ static IEnumerable CreateAttributeInstance (CustomAttributeData attribute
arr [a] = (Type) typed_values [a].Value;
value = arr;
} else if (arg.TypedValue.ArgumentType.IsArray) {
- throw ErrorHelper.CreateError (1059, "Internal error: failed to instantiate mock attribute '{0}' (unknown type for the named argument #{1} ({2}). Please file a bug report (https://bugzilla.xamarin.com) with a test case.", attribType.FullName, i + 1, arg.MemberName);
+ throw ErrorHelper.CreateError (1059, "Internal error: failed to instantiate mock attribute '{0}' (unknown type for the named argument #{1} ({2}). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", attribType.FullName, i + 1, arg.MemberName);
}
if (arg.IsField) {
attribType.GetField (arg.MemberName).SetValue (instance, value);
@@ -251,7 +251,7 @@ static IList GetIKVMAttributes (ICustomAttributeProvider pr
var module = provider as Module;
if (module != null)
return CustomAttributeData.GetCustomAttributes (module);
- throw new BindingException (1051, true, "Internal error: Don't know how to get attributes for {0}. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", provider.GetType ().FullName);
+ throw new BindingException (1051, true, "Internal error: Don't know how to get attributes for {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", provider.GetType ().FullName);
}
public static bool HasAttribute (ICustomAttributeProvider provider, string type_name)
@@ -520,7 +520,7 @@ public static System.Attribute CreateNewAttribute (System.Type attribType, Syste
{
var ctor = attribType.GetConstructor (ctorTypes);
if (ctor == null)
- throw ErrorHelper.CreateError (1058, "Internal error: could not find a constructor for the mock attribute '{0}'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", attribType.FullName);
+ throw ErrorHelper.CreateError (1058, "Internal error: could not find a constructor for the mock attribute '{0}'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", attribType.FullName);
return (System.Attribute) ctor.Invoke (ctorValues);
}
diff --git a/src/generator-typemanager.cs b/src/generator-typemanager.cs
index 48f0b64d3584..b1f056902cce 100644
--- a/src/generator-typemanager.cs
+++ b/src/generator-typemanager.cs
@@ -150,7 +150,7 @@ static Type Lookup (Assembly assembly, string @namespace, string @typename, bool
var rv = assembly.GetType (fullname);
if (rv == null && !inexistentOK)
- throw new BindingException (1052, true, "Internal error: Could not find the type {0} in the assembly {1}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", fullname, assembly);
+ throw new BindingException (1052, true, "Internal error: Could not find the type {0} in the assembly {1}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", fullname, assembly);
return rv;
}
diff --git a/src/generator.cs b/src/generator.cs
index f98abb49ced9..60f337472bb2 100644
--- a/src/generator.cs
+++ b/src/generator.cs
@@ -821,7 +821,7 @@ static bool GetValue (string framework)
frameworks = macosframeworks;
break;
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", Generator.CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", Generator.CurrentPlatform);
}
}
@@ -867,7 +867,7 @@ public static string ApplicationClassName {
case PlatformName.MacOSX:
return "NSApplication";
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
}
@@ -973,7 +973,7 @@ static string CoreImageMap {
case PlatformName.MacOSX:
return "Quartz";
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
}
@@ -988,7 +988,7 @@ static string CoreServicesMap {
case PlatformName.MacOSX:
return "CoreServices";
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
}
@@ -1001,7 +1001,7 @@ static string PDFKitMap {
case PlatformName.MacOSX:
return "Quartz";
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
}
@@ -4124,7 +4124,7 @@ void GenerateThreadCheck ()
print ("global::{0}.NSApplication.EnsureUIThread ();", ns.Get ("AppKit"));
break;
default:
- throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", CurrentPlatform);
+ throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.", CurrentPlatform);
}
}
@@ -4198,7 +4198,7 @@ public void GenerateMethodBody (MemberInformation minfo, MethodInfo mi, string s
sane &= by_ref_processing2 [0].ToString () == by_ref_processing2 [1].ToString ();
sane &= by_ref_init2 [0].ToString () == by_ref_init2 [1].ToString ();
if (!sane)
- throw new BindingException (1028, "Internal sanity check failed, please file a bug report (http://bugzilla.xamarin.com) with a test case.");
+ throw new BindingException (1028, "Internal sanity check failed, please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.");
}
var convs = convs2 [0];
@@ -5864,7 +5864,11 @@ public void ComputeLibraryName (FieldAttribute fieldAttr, Type type, string prop
// it is a path to a library, so we save the path and change library name
// to a valid identifier if needed
library_path = library_name;
- library_name = Path.GetFileName (library_name);
+ if (BindThirdPartyLibrary /* without extension makes more sense, but we can't change it since it breaks compat */) {
+ library_name = Path.GetFileName (library_name);
+ } else {
+ library_name = Path.GetFileNameWithoutExtension (library_name);
+ }
if (library_name.Contains ("."))
library_name = library_name.Replace (".", string.Empty);
}
diff --git a/src/quicklook.cs b/src/quicklook.cs
index 53ef1ef2df91..003512c5c6db 100644
--- a/src/quicklook.cs
+++ b/src/quicklook.cs
@@ -130,13 +130,19 @@ interface IQLPreviewItem {}
interface QLPreviewItem {
[Abstract]
[Export ("previewItemURL")]
+#if XAMCORE_4_0
+ NSUrl PreviewItemUrl { get; }
+#else
NSUrl ItemUrl { get; }
+#endif
+ [Export ("previewItemTitle")]
#if !XAMCORE_4_0
[Abstract]
-#endif
- [Export ("previewItemTitle")]
string ItemTitle { get; }
+#else
+ string PreviewItemTitle { get; }
+#endif
}
[iOS (11,0)]
diff --git a/src/scenekit.cs b/src/scenekit.cs
index 37a6f90d2fa4..9155d2b1927c 100644
--- a/src/scenekit.cs
+++ b/src/scenekit.cs
@@ -1970,7 +1970,7 @@ interface SCNNode : SCNAnimatable, SCNBoundingVolume, SCNActionable, NSCopying,
// We took the decision to comment the following helpers since they currently do not bring
// any benefits over the SCN* versions, actually the SIMD types could potentially be just
// a little slower than the SCN* versions due to manual native conversion. If you really
- // need them please file a bug at https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS
+ // need them please file a bug at https://github.com/xamarin/xamarin-macios/issues/new
// Please add the following code to runtime/bindings-generator.cs if you reenable the following SIMD methods.
diff --git a/src/uikit.cs b/src/uikit.cs
index 43873fdd6a90..36c6b970eff9 100644
--- a/src/uikit.cs
+++ b/src/uikit.cs
@@ -121,8 +121,6 @@ public enum UINotificationFeedbackType : long {
// hacks to ease compilation
interface CIColor {}
#else
- delegate void NSTextLayoutEnumerateLineFragments (CGRect rect, CGRect usedRectangle, NSTextContainer textContainer, NSRange glyphRange, ref bool stop);
- delegate void NSTextLayoutEnumerateEnclosingRects (CGRect rect, ref bool stop);
delegate void UICompletionHandler (bool finished);
delegate void UIOperationHandler (bool success);
delegate void UICollectionViewLayoutInteractiveTransitionCompletion (bool completed, bool finished);
@@ -867,7 +865,6 @@ NSTextLayoutOrientation LayoutOrientation {
[iOS (7,0)]
[BaseType (typeof (NSObject))]
partial interface NSTextContainer : NSTextLayoutOrientationProvider, NSCoding {
-
[DesignatedInitializer]
[Export ("initWithSize:")]
IntPtr Constructor (CGSize size);
@@ -984,335 +981,6 @@ partial interface NSTextStorageDelegate {
void DidProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editedMask, NSRange editedRange, nint delta);
}
-
- [iOS (7,0)]
- [BaseType (typeof (NSObject))]
- [DesignatedDefaultCtor]
- interface NSLayoutManager : NSCoding {
- [NullAllowed] // by default this property is null
- [Export ("textStorage", ArgumentSemantic.Assign)]
- NSTextStorage TextStorage { get; set; }
-
- [Export ("textContainers")]
- NSTextContainer [] TextContainers { get; }
-
- [Export ("addTextContainer:")]
- [PostGet ("TextContainers")]
- void AddTextContainer (NSTextContainer container);
-
- [Export ("insertTextContainer:atIndex:")]
- [PostGet ("TextContainers")]
- void InsertTextContainer (NSTextContainer container, nint index);
-
- [Export ("removeTextContainerAtIndex:")]
- [PostGet ("TextContainers")]
- void RemoveTextContainer (nint index);
-
- [Export ("textContainerChangedGeometry:")]
- void TextContainerChangedGeometry (NSTextContainer container);
-
- [Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
- NSObject WeakDelegate { get; set; }
-
- [Wrap ("WeakDelegate")]
- [Protocolize]
- NSLayoutManagerDelegate Delegate { get; set; }
-
- [Export ("showsInvisibleCharacters")]
- bool ShowsInvisibleCharacters { get; set; }
-
- [Export ("showsControlCharacters")]
- bool ShowsControlCharacters { get; set; }
-
- [Export ("hyphenationFactor")]
- nfloat HyphenationFactor { get; set; }
-
- [Export ("usesFontLeading")]
- bool UsesFontLeading { get; set; }
-
- [Export ("allowsNonContiguousLayout")]
- bool AllowsNonContiguousLayout { get; set; }
-
- [Export ("hasNonContiguousLayout")]
- bool HasNonContiguousLayout { get; }
-
- [Export ("invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:")]
- void InvalidateGlyphs (NSRange charRange, nint delta, out NSRange actualCharRange);
-
- [Export ("invalidateLayoutForCharacterRange:actualCharacterRange:")]
- void InvalidateLayout (NSRange charRange, out NSRange actualCharRange);
-
-
- [Export ("invalidateDisplayForCharacterRange:")]
- void InvalidateDisplayForCharacterRange (NSRange charRange);
-
- [Export ("invalidateDisplayForGlyphRange:")]
- void InvalidateDisplayForGlyphRange (NSRange glyphRange);
-
- [Export ("processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:")]
- void ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, nint delta, NSRange invalidatedCharRange);
-
- [Export ("ensureGlyphsForCharacterRange:")]
- void EnsureGlyphsForCharacterRange (NSRange charRange);
-
- [Export ("ensureGlyphsForGlyphRange:")]
- void EnsureGlyphsForGlyphRange (NSRange glyphRange);
-
- [Export ("ensureLayoutForCharacterRange:")]
- void EnsureLayoutForCharacterRange (NSRange charRange);
-
- [Export ("ensureLayoutForGlyphRange:")]
- void EnsureLayoutForGlyphRange (NSRange glyphRange);
-
- [Export ("ensureLayoutForTextContainer:")]
- void EnsureLayoutForTextContainer (NSTextContainer container);
-
- [Export ("ensureLayoutForBoundingRect:inTextContainer:")]
- void EnsureLayoutForBoundingRect (CGRect bounds, NSTextContainer container);
-
- [Export ("setGlyphs:properties:characterIndexes:font:forGlyphRange:")]
- void SetGlyphs (IntPtr glyphs, IntPtr props, IntPtr charIndexes, UIFont aFont, NSRange glyphRange);
-
- [Export ("numberOfGlyphs")]
- nuint NumberOfGlyphs { get; }
-
- [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'GetGlyph' instead.")]
- [Export ("glyphAtIndex:isValidIndex:")]
- ushort GlyphAtIndex (nuint glyphIndex, ref bool isValidIndex);
-
- [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'GetGlyph' instead.")]
- [Export ("glyphAtIndex:")]
- ushort GlyphAtIndex (nuint glyphIndex);
-
- [Export ("isValidGlyphIndex:")]
- bool IsValidGlyphIndex (nuint glyphIndex);
-
- [Export ("propertyForGlyphAtIndex:")]
- NSGlyphProperty PropertyForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("characterIndexForGlyphAtIndex:")]
- nuint CharacterIndexForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("glyphIndexForCharacterAtIndex:")]
- nuint GlyphIndexForCharacterAtIndex (nuint charIndex);
-
- [Export ("getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:")]
- [Internal]
- nuint GetGlyphsInternal (NSRange glyphRange, IntPtr glyphBuffer, IntPtr props, IntPtr charIndexBuffer, IntPtr bidiLevelBuffer);
-
- [Export ("setTextContainer:forGlyphRange:")]
- void SetTextContainer (NSTextContainer container, NSRange glyphRange);
-
- [Export ("setLineFragmentRect:forGlyphRange:usedRect:")]
- void SetLineFragmentRect (CGRect fragmentRect, NSRange glyphRange, CGRect usedRect);
-
- [Export ("setExtraLineFragmentRect:usedRect:textContainer:")]
- void SetExtraLineFragmentRect (CGRect fragmentRect, CGRect usedRect, NSTextContainer container);
-
- [Export ("setLocation:forStartOfGlyphRange:")]
- void SetLocation (CGPoint location, NSRange glyphRange);
-
- [Export ("setNotShownAttribute:forGlyphAtIndex:")]
- void SetNotShownAttribute (bool flag, nuint glyphIndex);
-
- [Export ("setDrawsOutsideLineFragment:forGlyphAtIndex:")]
- void SetDrawsOutsideLineFragment (bool flag, nuint glyphIndex);
-
- [Export ("setAttachmentSize:forGlyphRange:")]
- void SetAttachmentSize (CGSize attachmentSize, NSRange glyphRange);
-
- [Export ("getFirstUnlaidCharacterIndex:glyphIndex:")]
- void GetFirstUnlaidCharacterIndex (ref nuint charIndex, ref nuint glyphIndex);
-
- [Export ("firstUnlaidCharacterIndex")]
- nuint FirstUnlaidCharacterIndex { get; }
-
- [Export ("firstUnlaidGlyphIndex")]
- nuint FirstUnlaidGlyphIndex { get; }
-
- [Export ("textContainerForGlyphAtIndex:effectiveRange:")]
- [Internal]
- NSTextContainer TextContainerForGlyphAtIndexInternal (nuint glyphIndex, IntPtr effectiveGlyphRange);
-
- [Export ("usedRectForTextContainer:")]
- CGRect GetUsedRectForTextContainer (NSTextContainer container);
-
- [Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:")]
- [Internal]
- CGRect LineFragmentRectForGlyphAtIndexInternal (nuint glyphIndex, IntPtr effectiveGlyphRange);
-
- [Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:")]
- [Internal]
- CGRect LineFragmentUsedRectForGlyphAtIndexInternal (nuint glyphIndex, IntPtr effectiveGlyphRange);
-
- [Export ("extraLineFragmentRect", ArgumentSemantic.Copy)]
- CGRect ExtraLineFragmentRect { get; }
-
- [Export ("extraLineFragmentUsedRect", ArgumentSemantic.Copy)]
- CGRect ExtraLineFragmentUsedRect { get; }
-
- [Export ("extraLineFragmentTextContainer", ArgumentSemantic.Copy)]
- NSTextContainer ExtraLineFragmentTextContainer { get; }
-
- [Export ("locationForGlyphAtIndex:")]
- CGPoint LocationForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("notShownAttributeForGlyphAtIndex:")]
- bool NotShownAttributeForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("drawsOutsideLineFragmentForGlyphAtIndex:")]
- bool DrawsOutsideLineFragmentForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("attachmentSizeForGlyphAtIndex:")]
- CGSize AttachmentSizeForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("truncatedGlyphRangeInLineFragmentForGlyphAtIndex:")]
- NSRange TruncatedGlyphRangeInLineFragmentForGlyphAtIndex (nuint glyphIndex);
-
- [Export ("glyphRangeForCharacterRange:actualCharacterRange:")]
- [Internal]
- NSRange GlyphRangeForCharacterRangeInternal (NSRange charRange, IntPtr actualCharRange);
-
- [Export ("characterRangeForGlyphRange:actualGlyphRange:")]
-#if XAMCORE_2_0
- [Internal]
-#endif
- NSRange CharacterRangeForGlyphRangeInternal (NSRange glyphRange, IntPtr actualGlyphRange);
-
- [Export ("glyphRangeForTextContainer:")]
- NSRange GetGlyphRange (NSTextContainer container);
-
- [Export ("rangeOfNominallySpacedGlyphsContainingIndex:")]
- NSRange RangeOfNominallySpacedGlyphsContainingIndex (nuint glyphIndex);
-
- [Export ("boundingRectForGlyphRange:inTextContainer:")]
- CGRect BoundingRectForGlyphRange (NSRange glyphRange, NSTextContainer container);
-
- [Export ("glyphRangeForBoundingRect:inTextContainer:")]
- NSRange GlyphRangeForBoundingRect (CGRect bounds, NSTextContainer container);
-
- [Export ("glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:")]
- NSRange GlyphRangeForBoundingRectWithoutAdditionalLayout (CGRect bounds, NSTextContainer container);
-
- [Export ("glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:")]
- nuint GlyphIndexForPoint (CGPoint point, NSTextContainer container, ref nfloat partialFraction);
-
- [Export ("glyphIndexForPoint:inTextContainer:")]
- nuint GlyphIndexForPoint (CGPoint point, NSTextContainer container);
-
- [Export ("fractionOfDistanceThroughGlyphForPoint:inTextContainer:")]
- nfloat FractionOfDistanceThroughGlyphForPoint (CGPoint point, NSTextContainer container);
-
- [Export ("characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:")]
- nuint CharacterIndexForPoint (CGPoint point, NSTextContainer container, ref nfloat partialFraction);
-
- [Export ("getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:")]
-#if XAMCORE_2_0
- [Internal]
-#endif
- nuint GetLineFragmentInsertionPoints (nuint charIndex, bool alternatePosition, bool inDisplayOrder, IntPtr positions, IntPtr charIndexes);
-
- [Export ("enumerateLineFragmentsForGlyphRange:usingBlock:")]
- void EnumerateLineFragments (NSRange glyphRange, NSTextLayoutEnumerateLineFragments callback);
-
- [Export ("enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:")]
- void EnumerateEnclosingRects (NSRange glyphRange, NSRange selectedRange, NSTextContainer textContainer, NSTextLayoutEnumerateEnclosingRects callback);
-
- [Export ("drawBackgroundForGlyphRange:atPoint:")]
- void DrawBackgroundForGlyphRange (NSRange glyphsToShow, CGPoint origin);
-
- [Export ("drawGlyphsForGlyphRange:atPoint:")]
- void DrawGlyphs (NSRange glyphsToShow, CGPoint origin);
-
- [Export ("showCGGlyphs:positions:count:font:matrix:attributes:inContext:")]
- [Internal]
- void ShowCGGlyphsInternal (IntPtr glyphs, IntPtr positions, nuint glyphCount, UIFont font, CGAffineTransform textMatrix, NSDictionary attributes, [NullAllowed] CGContext graphicsContext);
-
- // Can't make this internal and expose a manually written API, since you're supposed to override this method, not call it yourself.
- //[Export ("fillBackgroundRectArray:count:forCharacterRange:color:")]
- //void FillBackgroundRectArray (IntPtr rectArray, nuint rectCount, NSRange charRange, UIColor color);
-
- [Export ("drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
- void DrawUnderline (NSRange glyphRange, NSUnderlineStyle underlineVal, nfloat baselineOffset, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
-
- [Export ("underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
- void Underline (NSRange glyphRange, NSUnderlineStyle underlineVal, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
-
- [Export ("drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
- void DrawStrikethrough (NSRange glyphRange, NSUnderlineStyle strikethroughVal, nfloat baselineOffset, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
-
- [Export ("strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
- void Strikethrough (NSRange glyphRange, NSUnderlineStyle strikethroughVal, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
-
- [iOS (9,0)]
- [Export ("textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
- [return: NullAllowed]
- NSTextContainer GetTextContainer (nuint glyphIndex, out NSRange effectiveGlyphRange, bool withoutAdditionalLayout);
-
- [iOS (9,0)]
- [Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
- CGRect GetLineFragmentRect (nuint glyphIndex, out NSRange effectiveGlyphRange, bool withoutAdditionalLayout);
-
- [iOS (9,0)]
- [Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
- CGRect GetLineFragmentUsedRect (nuint glyphIndex, out NSRange effectiveGlyphRange, bool withoutAdditionalLayout);
-
- [iOS (9,0)] // documented as 7.0 but missing in 8.x
- [Export ("CGGlyphAtIndex:isValidIndex:")]
- unsafe ushort GetGlyph (nuint glyphIndex, ref bool isValidIndex);
-
- [iOS (9,0)] // documented as 7.0 but missing in 8.x
- [Export ("CGGlyphAtIndex:")]
- ushort GetGlyph (nuint glyphIndex);
-
- [NoWatch]
- [TV (12, 0), iOS (12, 0)]
- [Export ("limitsLayoutForSuspiciousContents")]
- bool LimitsLayoutForSuspiciousContents { get; set; }
-
- }
-
- [Model, BaseType (typeof (NSObject))]
- [Protocol]
- [iOS (7,0)]
- partial interface NSLayoutManagerDelegate {
- [Export ("layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:")]
- nuint ShouldGenerateGlyphs (NSLayoutManager layoutManager, IntPtr glyphBuffer, IntPtr props, IntPtr charIndexes, UIFont aFont, NSRange glyphRange);
-
- [Export ("layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:")]
- nfloat LineSpacingAfterGlyphAtIndex (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
-
- [Export ("layoutManager:paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:")]
- nfloat ParagraphSpacingBeforeGlyphAtIndex (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
-
- [Export ("layoutManager:paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:")]
- nfloat ParagraphSpacingAfterGlyphAtIndex (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
-
- [Export ("layoutManager:shouldUseAction:forControlCharacterAtIndex:")]
- NSControlCharacterAction ShouldUseAction (NSLayoutManager layoutManager, NSControlCharacterAction action, nuint charIndex);
-
- [Export ("layoutManager:shouldBreakLineByWordBeforeCharacterAtIndex:")]
- bool ShouldBreakLineByWordBeforeCharacter (NSLayoutManager layoutManager, nuint charIndex);
-
- [Export ("layoutManager:shouldBreakLineByHyphenatingBeforeCharacterAtIndex:")]
- bool ShouldBreakLineByHyphenatingBeforeCharacter (NSLayoutManager layoutManager, nuint charIndex);
-
- [Export ("layoutManager:boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:")]
- CGRect BoundingBoxForControlGlyph (NSLayoutManager layoutManager, nuint glyphIndex, NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, nuint charIndex);
-
- [Export ("layoutManagerDidInvalidateLayout:")]
- void DidInvalidatedLayout (NSLayoutManager sender);
-
- [Export ("layoutManager:didCompleteLayoutForTextContainer:atEnd:")]
- void DidCompleteLayout (NSLayoutManager layoutManager, NSTextContainer textContainer, bool layoutFinishedFlag);
-
- [Export ("layoutManager:textContainer:didChangeGeometryFromSize:")]
- void DidChangeGeometry (NSLayoutManager layoutManager, NSTextContainer textContainer, CGSize oldSize);
-
- [iOS (9,0)]
- [Export ("layoutManager:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:inTextContainer:forGlyphRange:")]
- bool ShouldSetLineFragmentRect (NSLayoutManager layoutManager, ref CGRect lineFragmentRect, ref CGRect lineFragmentUsedRect, ref nfloat baselineOffset, NSTextContainer textContainer, NSRange glyphRange);
- }
#endif // !WATCH
[Category]
diff --git a/src/xkit.cs b/src/xkit.cs
new file mode 100644
index 000000000000..3ecf7dc0622f
--- /dev/null
+++ b/src/xkit.cs
@@ -0,0 +1,1149 @@
+// This file contains api definitions shared between AppKit and UIKit
+
+using System;
+using System.Diagnostics;
+using System.ComponentModel;
+using Foundation;
+using ObjCRuntime;
+using CoreGraphics;
+
+using CGGlyph=System.UInt16;
+using NSGlyph=System.UInt32;
+
+#if !MONOMAC
+using NSColor=UIKit.UIColor;
+using NSFont=UIKit.UIFont;
+#endif
+
+// dummy types to simplify build
+#if !MONOMAC
+using NSCell=System.Object;
+using NSGlyphGenerator=System.Object;
+using NSGlyphStorageOptions=System.Object;
+using NSImageScaling=System.Object;
+using NSRulerMarker=System.Object;
+using NSRulerView=System.Object;
+using NSTextBlock=System.Object;
+using NSTextStorageEditedFlags=System.Object;
+using NSTextView=System.Object;
+using NSTypesetter=System.Object;
+using NSTypesetterBehavior=System.Object;
+using NSView=System.Object;
+using NSWindow=System.Object;
+#if WATCH
+using NSTextContainer=System.Object;
+using NSTextStorage=System.Object;
+#endif // WATCH
+#endif // !MONOMAC
+
+#if MONOMAC
+namespace AppKit {
+#else
+namespace UIKit {
+#endif
+
+#if XAMCORE_4_0 || MONOMAC
+ delegate void NSTextLayoutEnumerateLineFragments (CGRect rect, CGRect usedRectangle, NSTextContainer textContainer, NSRange glyphRange, out bool stop);
+ delegate void NSTextLayoutEnumerateEnclosingRects (CGRect rect, out bool stop);
+#else
+ delegate void NSTextLayoutEnumerateLineFragments (CGRect rect, CGRect usedRectangle, NSTextContainer textContainer, NSRange glyphRange, ref bool stop);
+ delegate void NSTextLayoutEnumerateEnclosingRects (CGRect rect, ref bool stop);
+#endif
+
+ [NoWatch] // Header is not present in watchOS SDK.
+ [iOS (7,0)]
+ [DesignatedDefaultCtor]
+ [BaseType (typeof (NSObject))]
+ partial interface NSLayoutManager : NSCoding {
+
+#if !XAMCORE_4_0
+ // This was removed in the headers in the macOS 10.11 SDK
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'TextStorage' instead.")]
+ [Export ("attributedString")]
+ NSAttributedString AttributedString { get; }
+#endif
+
+ [Export ("replaceTextStorage:")]
+ void ReplaceTextStorage (NSTextStorage newTextStorage);
+
+ [Export ("textContainers")]
+ NSTextContainer [] TextContainers { get; }
+
+ [Export ("addTextContainer:")]
+ void AddTextContainer (NSTextContainer container);
+
+ [Export ("insertTextContainer:atIndex:")]
+ void InsertTextContainer (NSTextContainer container, /* NSUInteger */ nint index);
+
+ [Export ("removeTextContainerAtIndex:")]
+ void RemoveTextContainer (/* NSUInteger */ nint index);
+
+ [Export ("textContainerChangedGeometry:")]
+ void TextContainerChangedGeometry (NSTextContainer container);
+
+ [Export ("textContainerChangedTextView:")]
+ void TextContainerChangedTextView (NSTextContainer container);
+
+#if !XAMCORE_4_0
+ // This was removed in the headers in the macOS 10.11 SDK
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11)]
+ [Export ("layoutOptions")]
+ NSGlyphStorageOptions LayoutOptions { get; }
+#endif
+
+ [Export ("hasNonContiguousLayout")]
+ bool HasNonContiguousLayout { get; }
+
+ /* InvalidateGlyphs */
+#if XAMCORE_4_0 || MONOMAC
+ [Protected]
+#else
+ [Internal][Sealed]
+#endif
+ [Export ("invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:")]
+ void InvalidateGlyphs (NSRange characterRange, /* NSInteger */ nint delta, /* nullable NSRangePointer */ IntPtr actualCharacterRange);
+
+ [Wrap ("InvalidateGlyphs (characterRange, delta, IntPtr.Zero)")]
+ void InvalidateGlyphs (NSRange characterRange, /* NSInteger */ nint delta);
+
+#if XAMCORE_4_0 || MONOMAC
+ [Sealed]
+#endif
+ [Export ("invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:")]
+#if XAMCORE_4_0 || MONOMAC
+ void InvalidateGlyphs (NSRange characterRange, /* NSInteger */ nint delta, /* nullable NSRangePointer */ out NSRange actualCharacterRange);
+#else
+ void InvalidateGlyphs (NSRange charRange, /* NSInteger */ nint delta, /* nullable NSRangePointer */ out NSRange actualCharRange);
+#endif
+
+ /* InvalidateLayout */
+#if XAMCORE_4_0 || MONOMAC
+ [Protected]
+#else
+ [Internal][Sealed]
+#endif
+ [Export ("invalidateLayoutForCharacterRange:actualCharacterRange:")]
+ void InvalidateLayout (NSRange characterRange, /* nullable NSRangePointer */ IntPtr actualCharacterRange);
+
+ [Wrap ("InvalidateLayout (characterRange, IntPtr.Zero)")]
+ void InvalidateLayout (NSRange characterRange);
+
+#if XAMCORE_4_0 || MONOMAC
+ [Sealed]
+#endif
+ [Export ("invalidateLayoutForCharacterRange:actualCharacterRange:")]
+#if XAMCORE_4_0 || MONOMAC
+ void InvalidateLayout (NSRange characterRange, /* nullable NSRangePointer */ out NSRange actualCharacterRange);
+#else
+ void InvalidateLayout (NSRange charRange, /* nullable NSRangePointer */ out NSRange actualCharRange);
+#endif
+
+ [Export ("invalidateDisplayForCharacterRange:")]
+#if XAMCORE_4_0
+ void InvalidateDisplayForCharacterRange (NSRange characterRange);
+#else
+ void InvalidateDisplayForCharacterRange (NSRange charRange);
+#endif
+
+ [Export ("invalidateDisplayForGlyphRange:")]
+ void InvalidateDisplayForGlyphRange (NSRange glyphRange);
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharacterRange, nint delta, NSRange invalidatedCharacterRange) instead).")]
+ [Export ("textStorage:edited:range:changeInLength:invalidatedRange:")]
+ void TextStorageEdited (NSTextStorage str, NSTextStorageEditedFlags editedMask, NSRange newCharRange, nint changeInLength, NSRange invalidatedCharRange);
+#endif
+
+ [Export ("ensureGlyphsForCharacterRange:")]
+#if XAMCORE_4_0
+ void EnsureGlyphsForCharacterRange (NSRange characterRange);
+#else
+ void EnsureGlyphsForCharacterRange (NSRange charRange);
+#endif
+
+ [Export ("ensureGlyphsForGlyphRange:")]
+ void EnsureGlyphsForGlyphRange (NSRange glyphRange);
+
+ [Export ("ensureLayoutForCharacterRange:")]
+#if XAMCORE_4_0
+ void EnsureLayoutForCharacterRange (NSRange characterRange);
+#else
+ void EnsureLayoutForCharacterRange (NSRange charRange);
+#endif
+
+ [Export ("ensureLayoutForGlyphRange:")]
+ void EnsureLayoutForGlyphRange (NSRange glyphRange);
+
+ [Export ("ensureLayoutForTextContainer:")]
+ void EnsureLayoutForTextContainer (NSTextContainer container);
+
+ [Export ("ensureLayoutForBoundingRect:inTextContainer:")]
+ void EnsureLayoutForBoundingRect (CGRect bounds, NSTextContainer container);
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'SetGlyphs' instead.")]
+ [Export ("insertGlyph:atGlyphIndex:characterIndex:")]
+ void InsertGlyph (NSGlyph glyph, nint glyphIndex, nint charIndex);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'SetGlyphs' instead.")]
+ [Export ("replaceGlyphAtIndex:withGlyph:")]
+ void ReplaceGlyphAtIndex (nint glyphIndex, NSGlyph newGlyph);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'SetGlyphs' instead.")]
+ [Export ("deleteGlyphsInRange:")]
+ void DeleteGlyphs (NSRange glyphRange);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'SetGlyphs' instead.")]
+ [Export ("setCharacterIndex:forGlyphAtIndex:")]
+ void SetCharacterIndex (nint charIndex, nint glyphIndex);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'SetGlyphs' instead.")]
+ [Export ("setIntAttribute:value:forGlyphAtIndex:")]
+ void SetIntAttribute (nint attributeTag, nint value, nint glyphIndex);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'SetGlyphs' instead.")]
+ [Export ("invalidateGlyphsOnLayoutInvalidationForGlyphRange:")]
+ void InvalidateGlyphsOnLayoutInvalidation (NSRange glyphRange);
+#endif
+
+ [Export ("numberOfGlyphs")]
+#if XAMCORE_4_0 || !MONOMAC
+ /* NSUInteger */ nuint NumberOfGlyphs { get; }
+#else
+ /* NSUInteger */ nint NumberOfGlyphs { get; }
+#endif
+
+#if !XAMCORE_4_0
+ [Export ("glyphAtIndex:isValidIndex:")]
+#if MONOMAC
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'GetCGGlyph' instead).")]
+ NSGlyph GlyphAtIndex (nint glyphIndex, ref bool isValidIndex);
+#else
+ [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'GetGlyph' instead.")]
+ CGGlyph GlyphAtIndex (nuint glyphIndex, ref bool isValidIndex);
+#endif // MONOMAC
+#endif // !XAMCORE_4_0
+
+#if !XAMCORE_4_0
+ [Export ("glyphAtIndex:")]
+#if MONOMAC
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'GetCGGlyph' instead).")]
+ NSGlyph GlyphAtIndex (nint glyphIndex);
+#else
+ [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'GetGlyph' instead.")]
+ CGGlyph GlyphAtIndex (nuint glyphIndex);
+#endif // MONOMAC
+#endif // !XAMCORE_4_0
+
+ [Export ("isValidGlyphIndex:")]
+#if XAMCORE_4_0
+ bool IsValidGlyph (nuint glyphIndex);
+#elif MONOMAC
+ bool IsValidGlyphIndex (nint glyphIndex);
+#else
+ bool IsValidGlyphIndex (nuint glyphIndex);
+#endif
+
+ [Export ("characterIndexForGlyphAtIndex:")]
+#if XAMCORE_4_0
+ nuint GetCharacterIndex (nuint glyphIndex);
+#elif MONOMAC
+ nuint CharacterIndexForGlyphAtIndex (nint glyphIndex);
+#else
+ nuint CharacterIndexForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [Export ("glyphIndexForCharacterAtIndex:")]
+#if XAMCORE_4_0
+ nuint GetGlyphIndex (nuint characterIndex);
+#elif MONOMAC
+ nuint GlyphIndexForCharacterAtIndex (nint charIndex);
+#else
+ nuint GlyphIndexForCharacterAtIndex (nuint charIndex);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'GetGlyphs' instead).")]
+ [Export ("intAttribute:forGlyphAtIndex:")]
+ nint GetIntAttribute (nint attributeTag, nint glyphIndex);
+#endif
+
+ [Export ("setTextContainer:forGlyphRange:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void SetTextContainer (NSTextContainer container, NSRange glyphRange);
+#else
+ void SetTextContainerForRange (NSTextContainer container, NSRange glyphRange);
+#endif
+
+ [Export ("setLineFragmentRect:forGlyphRange:usedRect:")]
+#if XAMCORE_4_0
+ void SetLineFragment (CGRect fragmentRect, NSRange glyphRange, CGRect usedRect);
+#else
+ void SetLineFragmentRect (CGRect fragmentRect, NSRange glyphRange, CGRect usedRect);
+#endif
+
+ [Export ("setExtraLineFragmentRect:usedRect:textContainer:")]
+#if XAMCORE_4_0
+ void SetExtraLineFragment (CGRect fragmentRect, CGRect usedRect, NSTextContainer container);
+#else
+ void SetExtraLineFragmentRect (CGRect fragmentRect, CGRect usedRect, NSTextContainer container);
+#endif
+
+ [Export ("setLocation:forStartOfGlyphRange:")]
+#if MONOMAC || XAMCORE_4_0
+ void SetLocation (CGPoint location, NSRange forStartOfGlyphRange);
+#else
+ void SetLocation (CGPoint location, NSRange glyphRange);
+#endif
+
+ [Export ("setNotShownAttribute:forGlyphAtIndex:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void SetNotShownAttribute (bool flag, nuint glyphIndex);
+#else
+ void SetNotShownAttribute (bool flag, nint glyphIndex);
+#endif
+
+ [Export ("setDrawsOutsideLineFragment:forGlyphAtIndex:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void SetDrawsOutsideLineFragment (bool flag, nuint glyphIndex);
+#else
+ void SetDrawsOutsideLineFragment (bool flag, nint glyphIndex);
+#endif
+
+ [Export ("setAttachmentSize:forGlyphRange:")]
+ void SetAttachmentSize (CGSize attachmentSize, NSRange glyphRange);
+
+ [Export ("getFirstUnlaidCharacterIndex:glyphIndex:")]
+#if XAMCORE_4_0
+ void GetFirstUnlaid (out nuint characterIndex, out nuint glyphIndex);
+#else
+ void GetFirstUnlaidCharacterIndex (ref nuint charIndex, ref nuint glyphIndex);
+#endif
+
+ [Export ("firstUnlaidCharacterIndex")]
+#if XAMCORE_4_0 || !MONOMAC
+ nuint FirstUnlaidCharacterIndex { get; }
+#else
+ nint FirstUnlaidCharacterIndex { get; }
+#endif
+
+ [Export ("firstUnlaidGlyphIndex")]
+#if XAMCORE_4_0 || !MONOMAC
+ nuint FirstUnlaidGlyphIndex { get; }
+#else
+ nint FirstUnlaidGlyphIndex { get; }
+#endif
+
+ /* GetTextContainer */
+#if XAMCORE_4_0 || MONOMAC
+ [Protected]
+#else
+ [Sealed][Internal]
+#endif
+ [Export ("textContainerForGlyphAtIndex:effectiveRange:")]
+ NSTextContainer GetTextContainer (nuint glyphIndex, /* nullable NSRangePointer */ IntPtr effectiveGlyphRange);
+
+ [Wrap ("GetTextContainer (glyphIndex, IntPtr.Zero)")]
+ NSTextContainer GetTextContainer (nuint glyphIndex);
+
+#if XAMCORE_4_0 || MONOMAC
+ [Sealed]
+#endif
+ [Export ("textContainerForGlyphAtIndex:effectiveRange:")]
+ NSTextContainer GetTextContainer (nuint glyphIndex, /* nullable NSRangePointer */ out NSRange effectiveGlyphRange);
+
+#if XAMCORE_4_0 || MONOMAC
+ [Protected]
+#else
+ [Sealed][Internal]
+#endif
+ [Export ("textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
+ NSTextContainer GetTextContainer (nuint glyphIndex, IntPtr effectiveGlyphRange, bool withoutAdditionalLayout);
+
+ [Wrap ("GetTextContainer (glyphIndex, IntPtr.Zero, flag)")]
+ NSTextContainer GetTextContainer (nuint glyphIndex, bool flag);
+
+#if XAMCORE_4_0 || MONOMAC
+ [Sealed]
+#endif
+ [Export ("textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
+ NSTextContainer GetTextContainer (nuint glyphIndex, /* nullable NSRangePointer */ out NSRange effectiveGlyphRange, bool withoutAdditionalLayout);
+
+ [Export ("usedRectForTextContainer:")]
+#if XAMCORE_4_0
+ CGRect GetUsedRect (NSTextContainer container);
+#else
+ CGRect GetUsedRectForTextContainer (NSTextContainer container);
+#endif
+
+ /* GetLineFragmentRect (NSUInteger, NSRangePointer) */
+ [Protected]
+ [Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:")]
+ CGRect GetLineFragmentRect (nuint glyphIndex, /* nullable NSRangePointer */ IntPtr effectiveGlyphRange);
+
+ [Wrap ("GetLineFragmentRect (glyphIndex, IntPtr.Zero)")]
+ CGRect GetLineFragmentRect (nuint glyphIndex);
+
+ [Sealed]
+ [Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:")]
+ CGRect GetLineFragmentRect (nuint glyphIndex, out /* nullable NSRangePointer */ NSRange effectiveGlyphRange);
+
+ /* GetLineFragmentRect (NSUInteger, NSRangePointer, bool) */
+ [iOS (9,0)]
+#if MONOMAC || XAMCORE_4_0
+ [Protected]
+#else
+ [Sealed][Internal]
+#endif
+ [Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
+ CGRect GetLineFragmentRect (nuint glyphIndex, /* nullable NSRangePointer */ IntPtr effectiveGlyphRange, bool withoutAdditionalLayout);
+
+ [iOS (9,0)]
+ [Wrap ("GetLineFragmentRect (glyphIndex, IntPtr.Zero)")]
+ CGRect GetLineFragmentRect (nuint glyphIndex, bool withoutAdditionalLayout);
+
+ [iOS (9,0)]
+#if MONOMAC || XAMCORE_4_0
+ [Sealed]
+#endif
+ [Export ("lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
+ CGRect GetLineFragmentRect (nuint glyphIndex, out /* nullable NSRangePointer */ NSRange effectiveGlyphRange, bool withoutAdditionalLayout);
+
+ /* GetLineFragmentUsedRect (NSUInteger, NSRangePointer) */
+ [Protected]
+ [Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:")]
+ CGRect GetLineFragmentUsedRect (nuint glyphIndex, /* nullable NSRangePointer */ IntPtr effectiveGlyphRange);
+
+ [Wrap ("GetLineFragmentUsedRect (glyphIndex, IntPtr.Zero)")]
+ CGRect GetLineFragmentUsedRect (nuint glyphIndex);
+
+ [Sealed]
+ [Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:")]
+ CGRect GetLineFragmentUsedRect (nuint glyphIndex, out /* nullable NSRangePointer */ NSRange effectiveGlyphRange);
+
+ /* GetLineFragmentUsedRect (NSUInteger, NSRangePointer, bool) */
+ [iOS (9,0)]
+#if MONOMAC || XAMCORE_4_0
+ [Protected]
+#else
+ [Sealed][Internal]
+#endif
+ [Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
+ CGRect GetLineFragmentUsedRect (nuint glyphIndex, /* nullable NSRangePointer */ IntPtr effectiveGlyphRange, bool withoutAdditionalLayout);
+
+ [iOS (9,0)]
+ [Wrap ("GetLineFragmentUsedRect (glyphIndex, IntPtr.Zero)")]
+ CGRect GetLineFragmentUsedRect (nuint glyphIndex, bool withoutAdditionalLayout);
+
+ [iOS (9,0)]
+#if MONOMAC || XAMCORE_4_0
+ [Sealed]
+#endif
+ [Export ("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:")]
+ CGRect GetLineFragmentUsedRect (nuint glyphIndex, out /* nullable NSRangePointer */ NSRange effectiveGlyphRange, bool withoutAdditionalLayout);
+
+ [Export ("extraLineFragmentRect")]
+ CGRect ExtraLineFragmentRect { get; }
+
+ [Export ("extraLineFragmentUsedRect")]
+ CGRect ExtraLineFragmentUsedRect { get; }
+
+ [Export ("extraLineFragmentTextContainer")]
+ NSTextContainer ExtraLineFragmentTextContainer { get; }
+
+ [Export ("locationForGlyphAtIndex:")]
+#if XAMCORE_4_0
+ CGPoint GetLocationForGlyph (nuint glyphIndex);
+#elif MONOMAC
+ CGPoint LocationForGlyphAtIndex (nint glyphIndex);
+#else
+ CGPoint LocationForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [Export ("notShownAttributeForGlyphAtIndex:")]
+#if XAMCORE_4_0
+ bool NotShownAttributeForGlyph (nuint glyphIndex);
+#elif MONOMAC
+ bool NotShownAttributeForGlyphAtIndex (nint glyphIndex);
+#else
+ bool NotShownAttributeForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [Export ("drawsOutsideLineFragmentForGlyphAtIndex:")]
+#if XAMCORE_4_0
+ bool DrawsOutsideLineFragmentForGlyph (nuint glyphIndex);
+#elif MONOMAC
+ bool DrawsOutsideLineFragmentForGlyphAt (nint glyphIndex);
+#else
+ bool DrawsOutsideLineFragmentForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [Export ("attachmentSizeForGlyphAtIndex:")]
+#if XAMCORE_4_0
+ CGSize GetAttachmentSizeForGlyph (nuint glyphIndex);
+#elif MONOMAC
+ CGSize AttachmentSizeForGlyphAt (nint glyphIndex);
+#else
+ CGSize AttachmentSizeForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [NoiOS][NoTV]
+ [Export ("setLayoutRect:forTextBlock:glyphRange:")]
+ void SetLayoutRect (CGRect layoutRect, NSTextBlock forTextBlock, NSRange glyphRange);
+
+ [NoiOS][NoTV]
+ [Export ("setBoundsRect:forTextBlock:glyphRange:")]
+ void SetBoundsRect (CGRect boundsRect, NSTextBlock forTextBlock, NSRange glyphRange);
+
+ [NoiOS][NoTV]
+ [Export ("layoutRectForTextBlock:glyphRange:")]
+#if XAMCORE_4_0
+ CGRect GetLayoutRect (NSTextBlock block, NSRange glyphRange);
+#else
+ CGRect LayoutRect (NSTextBlock block, NSRange glyphRange);
+#endif
+
+ [NoiOS][NoTV]
+ [Export ("boundsRectForTextBlock:glyphRange:")]
+#if XAMCORE_4_0
+ CGRect GetBoundsRect (NSTextBlock block, NSRange glyphRange);
+#else
+ CGRect BoundsRect (NSTextBlock block, NSRange glyphRange);
+#endif
+
+ /* GetLayoutRect (NSTextBlock, NSUInteger, nullable NSRangePointer) */
+
+ [NoiOS][NoTV]
+ [Protected]
+ [Export ("layoutRectForTextBlock:atIndex:effectiveRange:")]
+ CGRect GetLayoutRect (NSTextBlock block, nuint glyphIndex, IntPtr effectiveGlyphRange);
+
+ [NoiOS][NoTV]
+ [Wrap ("GetLayoutRect (block, glyphIndex, IntPtr.Zero)")]
+ CGRect GetLayoutRect (NSTextBlock block, nuint glyphIndex);
+
+ [NoiOS][NoTV]
+ [Sealed]
+ [Export ("layoutRectForTextBlock:atIndex:effectiveRange:")]
+ CGRect GetLayoutRect (NSTextBlock block, nuint glyphIndex, out NSRange effectiveGlyphRange);
+
+ /* GetBoundsRect (NSTextBlock, NSUInteger, nullable NSRangePointer) */
+
+ [NoiOS][NoTV]
+ [Protected]
+ [Export ("boundsRectForTextBlock:atIndex:effectiveRange:")]
+ CGRect GetBoundsRect (NSTextBlock block, nuint glyphIndex, IntPtr effectiveGlyphRange);
+
+ [NoiOS][NoTV]
+ [Wrap ("GetBoundsRect (block, glyphIndex, IntPtr.Zero)")]
+ CGRect GetBoundsRect (NSTextBlock block, nuint glyphIndex);
+
+ [NoiOS][NoTV]
+ [Sealed]
+ [Export ("boundsRectForTextBlock:atIndex:effectiveRange:")]
+ CGRect GetBoundsRect (NSTextBlock block, nuint glyphIndex, out NSRange effectiveGlyphRange);
+
+ /* GetGlyphRange (NSRange, nullable NSRangePointer) */
+
+#if XAMCORE_4_0 || !MONOMAC
+ [Protected]
+#else
+ [Internal][Sealed]
+#endif
+ [Export ("glyphRangeForCharacterRange:actualCharacterRange:")]
+ NSRange GetGlyphRange (NSRange characterRange, IntPtr actualCharacterRange);
+
+ [Wrap ("GetGlyphRange (characterRange, IntPtr.Zero)")]
+ NSRange GetGlyphRange (NSRange characterRange);
+
+ [Sealed]
+ [Export ("glyphRangeForCharacterRange:actualCharacterRange:")]
+ NSRange GetGlyphRange (NSRange characterRange, out NSRange actualCharacterRange);
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Obsolete ("Use 'GetGlyphRange' instead.")]
+ [Export ("glyphRangeForCharacterRange:actualCharacterRange:")]
+ NSRange GlyphRangeForCharacterRange (NSRange charRange, out NSRange actualCharRange);
+#endif
+
+ /* GetCharacterRange (NSRange, nullable NSRangePointer) */
+#if XAMCORE_4_0 || !MONOMAC
+ [Protected]
+#else
+ [Internal][Sealed]
+#endif
+ [Export ("characterRangeForGlyphRange:actualGlyphRange:")]
+ NSRange GetCharacterRange (NSRange glyphRange, IntPtr actualGlyphRange);
+
+ [Wrap ("GetCharacterRange (glyphRange, IntPtr.Zero)")]
+ NSRange GetCharacterRange (NSRange glyphRange);
+
+ [Sealed]
+ [Export ("characterRangeForGlyphRange:actualGlyphRange:")]
+ NSRange GetCharacterRange (NSRange glyphRange, out NSRange actualGlyphRange);
+
+#if MONOMAC && !XAMCORE_4_0
+ [Obsolete ("Use 'GetCharacterRange' instead.")]
+ [Export ("characterRangeForGlyphRange:actualGlyphRange:")]
+ NSRange CharacterRangeForGlyphRange (NSRange glyphRange, out NSRange actualGlyphRange);
+#endif
+
+ [Export ("glyphRangeForTextContainer:")]
+ NSRange GetGlyphRange (NSTextContainer container);
+
+ [Export ("rangeOfNominallySpacedGlyphsContainingIndex:")]
+#if XAMCORE_4_0
+ NSRange GetRangeOfNominallySpacedGlyphsContainingIndex (nuint glyphIndex);
+#elif MONOMAC
+ NSRange RangeOfNominallySpacedGlyphsContainingIndex (nint glyphIndex);
+#else
+ NSRange RangeOfNominallySpacedGlyphsContainingIndex (nuint glyphIndex);
+#endif
+
+ [Internal]
+ [NoiOS][NoTV]
+ [Export ("rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:")]
+ [Availability (Deprecated = Platform.Mac_10_11)]
+ IntPtr GetRectArray (NSRange glyphRange, NSRange selectedGlyphRange, IntPtr textContainerHandle, out nuint rectCount);
+
+ [Export ("boundingRectForGlyphRange:inTextContainer:")]
+#if XAMCORE_4_0
+ CGRect GetBoundingRect (NSRange glyphRange, NSTextContainer container);
+#else
+ CGRect BoundingRectForGlyphRange (NSRange glyphRange, NSTextContainer container);
+#endif
+
+ [Export ("glyphRangeForBoundingRect:inTextContainer:")]
+#if XAMCORE_4_0
+ NSRange GetGlyphRangeForBoundingRect (CGRect bounds, NSTextContainer container);
+#else
+ NSRange GlyphRangeForBoundingRect (CGRect bounds, NSTextContainer container);
+#endif
+
+ [Export ("glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:")]
+#if XAMCORE_4_0
+ NSRange GetGlyphRangeForBoundingRectWithoutAdditionalLayout (CGRect bounds, NSTextContainer container);
+#else
+ NSRange GlyphRangeForBoundingRectWithoutAdditionalLayout (CGRect bounds, NSTextContainer container);
+#endif
+
+ [Export ("glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:")]
+#if XAMCORE_4_0
+ nuint GetGlyphIndex (CGPoint point, NSTextContainer container, /* nullable CGFloat */ out nfloat fractionOfDistanceThroughGlyph);
+#elif MONOMAC
+ nuint GlyphIndexForPointInTextContainer (CGPoint point, NSTextContainer container, ref nfloat fractionOfDistanceThroughGlyph);
+#else
+ nuint GlyphIndexForPoint (CGPoint point, NSTextContainer container, ref nfloat partialFraction);
+#endif
+
+ [Export ("glyphIndexForPoint:inTextContainer:")]
+#if XAMCORE_4_0
+ nuint GetGlyphIndex (CGPoint point, NSTextContainer container);
+#else
+ nuint GlyphIndexForPoint (CGPoint point, NSTextContainer container);
+#endif
+
+ [Export ("fractionOfDistanceThroughGlyphForPoint:inTextContainer:")]
+#if XAMCORE_4_0
+ nfloat GetFractionOfDistanceThroughGlyph (CGPoint point, NSTextContainer container);
+#else
+ nfloat FractionOfDistanceThroughGlyphForPoint (CGPoint point, NSTextContainer container);
+#endif
+
+ // GetCharacterIndex (CGPoint, NSTextContainer, nullable CGFloat*)
+#if XAMCORE_4_0
+ [Protected]
+#else
+ [Sealed][Internal]
+#endif
+ [Export ("characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:")]
+ nuint GetCharacterIndex (CGPoint point, NSTextContainer container, IntPtr fractionOfDistanceBetweenInsertionPoints);
+
+ [Wrap ("GetCharacterIndex (point, container, IntPtr.Zero)")]
+ nuint GetCharacterIndex (CGPoint point, NSTextContainer container);
+
+ [Sealed]
+ [Export ("characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:")]
+ nuint GetCharacterIndex (CGPoint point, NSTextContainer container, out nfloat fractionOfDistanceBetweenInsertionPoints);
+
+#if !XAMCORE_4_0
+ [Obsolete ("Use 'GetCharacterIndex' instead.")]
+ [Export ("characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:")]
+#if MONOMAC
+ nuint CharacterIndexForPoint (CGPoint point, NSTextContainer container, ref nfloat fractionOfDistanceBetweenInsertionPoints);
+#else
+ nuint CharacterIndexForPoint (CGPoint point, NSTextContainer container, ref nfloat partialFraction);
+#endif
+#endif
+
+#if XAMCORE_4_0 || !MONOMAC
+ [Protected]
+#endif
+ [Export ("getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:")]
+#if XAMCORE_4_0 || !MONOMAC
+ nuint GetLineFragmentInsertionPoints (nuint characterIndex, bool alternatePositions, bool inDisplayOrder, IntPtr positions, IntPtr characterIndexes);
+#else
+ nuint GetLineFragmentInsertionPoints (nuint charIndex, bool aFlag, bool dFlag, IntPtr positions, IntPtr charIndexes);
+#endif
+
+ /* GetTemporaryAttributes (NSUInteger, nullable NSRangePointer) */
+
+ [Protected]
+ [Export ("temporaryAttributesAtCharacterIndex:effectiveRange:")]
+ NSDictionary GetTemporaryAttributes (nuint characterIndex, IntPtr effectiveCharacterRange);
+
+ [Wrap ("GetTemporaryAttributes (characterIndex, IntPtr.Zero)")]
+ NSDictionary GetTemporaryAttributes (nuint characterIndex);
+
+ [Sealed]
+ [Export ("temporaryAttributesAtCharacterIndex:effectiveRange:")]
+ NSDictionary GetTemporaryAttributes (nuint characterIndex, out NSRange effectiveCharacterRange);
+
+ [Export ("setTemporaryAttributes:forCharacterRange:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void SetTemporaryAttributes (NSDictionary attributes, NSRange characterReange);
+#else
+ void SetTemporaryAttributes (NSDictionary attrs, NSRange charRange);
+#endif
+
+ [Export ("addTemporaryAttributes:forCharacterRange:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void AddTemporaryAttributes (NSDictionary attributes, NSRange characterRange);
+#else
+ void AddTemporaryAttributes (NSDictionary attrs, NSRange charRange);
+#endif
+
+ // This API can take an NSString or managed string, but some related API
+ // takes a generic dictionary that can't use a managed string, so for symmetry
+ // provide an NSString overload as well.
+#if !XAMCORE_4_0 && MONOMAC
+ [Sealed]
+#endif
+ [Export ("removeTemporaryAttribute:forCharacterRange:")]
+ void RemoveTemporaryAttribute (NSString attributeName, NSRange characterRange);
+
+#if XAMCORE_4_0 || !MONOMAC
+ [Sealed]
+#endif
+ [Export ("removeTemporaryAttribute:forCharacterRange:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void RemoveTemporaryAttribute (string attributeName, NSRange characterRange);
+#else
+ void RemoveTemporaryAttribute (string attrName, NSRange charRange);
+#endif
+
+ /* GetTemporaryAttribute (NSString, NSUInteger, nullable NSRangePointer) */
+ [Protected]
+ [Export ("temporaryAttribute:atCharacterIndex:effectiveRange:")]
+ NSObject GetTemporaryAttribute (NSString attributeName, nuint characterIndex, /* nullable NSRangePointer */ IntPtr effectiveRange);
+
+ [Wrap ("GetTemporaryAttribute (attributeName, characterIndex, IntPtr.Zero)")]
+ NSObject GetTemporaryAttribute (NSString attributeName, nuint characterIndex);
+
+ [Sealed]
+ [Export ("temporaryAttribute:atCharacterIndex:effectiveRange:")]
+ NSObject GetTemporaryAttribute (NSString attributeName, nuint characterIndex, /* nullable NSRangePointer */ out NSRange effectiveRange);
+
+ /* GetTemporaryAttribute (NSString, NSUInteger, nullable NSRangePointer, NSRange) */
+
+ [Protected]
+ [Export ("temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:")]
+ NSObject GetTemporaryAttribute (NSString attributeName, nuint characterIndex, /* nullable NSRangePointer */ IntPtr longestEffectiveRange, NSRange rangeLimit);
+
+ [Wrap ("GetTemporaryAttribute (attributeName, characterIndex, IntPtr.Zero, rangeLimit)")]
+ NSObject GetTemporaryAttribute (NSString attributeName, nuint characterIndex, NSRange rangeLimit);
+
+ [Sealed]
+ [Export ("temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:")]
+ NSObject GetTemporaryAttribute (NSString attributeName, nuint characterIndex, /* nullable NSRangePointer */ out NSRange longestEffectiveRange, NSRange rangeLimit);
+
+ /* GetTemporaryAttributes (NSUInteger, nullable NSRangePointer, NSRange) */
+
+ [Protected]
+ [Export ("temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:")]
+ NSDictionary GetTemporaryAttributes (nuint characterIndex, /* nullable NSRangePointer */ IntPtr longestEffectiveRange, NSRange rangeLimit);
+
+ [Wrap ("GetTemporaryAttributes (characterIndex, IntPtr.Zero, rangeLimit)")]
+ NSDictionary GetTemporaryAttributes (nuint characterIndex, NSRange rangeLimit);
+
+ [Sealed]
+ [Export ("temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:")]
+ NSDictionary GetTemporaryAttributes (nuint characterIndex, /* nullable NSRangePointer */ out NSRange longestEffectiveRange, NSRange rangeLimit);
+
+ // This method can take an NSString or managed string, but some related API
+ // takes a generic dictionary that can't use a managed string, so for symmetry
+ // provide an NSString overload as well.
+#if !XAMCORE_4_0
+ [Sealed]
+#endif
+ [Export ("addTemporaryAttribute:value:forCharacterRange:")]
+ void AddTemporaryAttribute (NSString attributeName, NSObject value, NSRange characterRange);
+
+#if XAMCORE_4_0
+ [Sealed]
+#endif
+ [Export ("addTemporaryAttribute:value:forCharacterRange:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void AddTemporaryAttribute (string attributeName, NSObject value, NSRange characterRange);
+#else
+ void AddTemporaryAttribute (string attrName, NSObject value, NSRange charRange);
+#endif
+
+#if !XAMCORE_4_0
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11)]
+ [Export ("substituteFontForFont:")]
+ NSFont SubstituteFontForFont (NSFont originalFont);
+#endif
+
+ [Export ("defaultLineHeightForFont:")]
+#if XAMCORE_4_0 || !MONOMAC
+ nfloat GetDefaultLineHeight (NSFont font);
+#else
+ nfloat DefaultLineHeightForFont (NSFont theFont);
+#endif
+
+ [Export ("defaultBaselineOffsetForFont:")]
+#if XAMCORE_4_0 || !MONOMAC
+ nfloat GetDefaultBaselineOffset (NSFont font);
+#else
+ nfloat DefaultBaselineOffsetForFont (NSFont theFont);
+#endif
+
+ [NullAllowed]
+ [Export ("textStorage", ArgumentSemantic.Assign)]
+ NSTextStorage TextStorage { get; set; }
+
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11)]
+ [Export ("glyphGenerator", ArgumentSemantic.Retain)]
+ NSGlyphGenerator GlyphGenerator { get; set; }
+
+ [NoiOS][NoTV]
+ [Export ("typesetter", ArgumentSemantic.Retain)]
+ NSTypesetter Typesetter { get; set; }
+
+ [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
+ NSObject WeakDelegate { get; set; }
+
+ [Wrap ("WeakDelegate")]
+ INSLayoutManagerDelegate Delegate { get; set; }
+
+ [NoiOS][NoTV]
+ [Export ("backgroundLayoutEnabled")]
+ bool BackgroundLayoutEnabled { get; set; }
+
+ [NoiOS][NoTV]
+ [Availability (Deprecated = Platform.Mac_10_11)]
+ [Export ("usesScreenFonts")]
+ bool UsesScreenFonts { get; set; }
+
+ [Export ("showsInvisibleCharacters")]
+ bool ShowsInvisibleCharacters { get; set; }
+
+ [Export ("showsControlCharacters")]
+ bool ShowsControlCharacters { get; set; }
+
+ [Export ("hyphenationFactor")]
+#if MONOMAC
+ float HyphenationFactor { get; set; } /* This is defined as float in AppKit headers. */
+#else
+ nfloat HyphenationFactor { get; set; } /* This is defined as CGFloat in UIKit headers. */
+#endif
+
+ [NoiOS][NoTV]
+ [Export ("defaultAttachmentScaling")]
+ NSImageScaling DefaultAttachmentScaling { get; set; }
+
+ [NoiOS][NoTV]
+ [Export ("typesetterBehavior")]
+ NSTypesetterBehavior TypesetterBehavior { get; set; }
+
+ [iOS (7,0)]
+ [Export ("allowsNonContiguousLayout")]
+ bool AllowsNonContiguousLayout { get; set; }
+
+ [Export ("usesFontLeading")]
+ bool UsesFontLeading { get; set; }
+
+ [Export ("drawBackgroundForGlyphRange:atPoint:")]
+#if XAMCORE_4_0
+ void DrawBackground (NSRange glyphsToShow, CGPoint origin);
+#else
+ void DrawBackgroundForGlyphRange (NSRange glyphsToShow, CGPoint origin);
+#endif
+
+ [Export ("drawGlyphsForGlyphRange:atPoint:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void DrawGlyphs (NSRange glyphsToShow, CGPoint origin);
+#else
+ void DrawGlyphsForGlyphRange (NSRange glyphsToShow, CGPoint origin);
+#endif
+
+ [Protected] // Class can be subclassed, and most methods can be overridden.
+ [Mac (10,10)]
+ [Export ("getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:")]
+ nuint GetGlyphs (NSRange glyphRange, IntPtr glyphBuffer, IntPtr properties, IntPtr characterIndexBuffer, IntPtr bidiLevelBuffer);
+
+#if !XAMCORE_4_0 && !MONOMAC
+ [Sealed]
+#endif
+ [Mac (10,10)]
+ [Export ("propertyForGlyphAtIndex:")]
+ NSGlyphProperty GetProperty (nuint glyphIndex);
+
+#if !XAMCORE_4_0 && !MONOMAC
+ [Obsolete ("Use 'GetProperty' instead.")]
+ [Export ("propertyForGlyphAtIndex:")]
+ NSGlyphProperty PropertyForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("CGGlyphAtIndex:isValidIndex:")]
+#if XAMCORE_4_0
+ CGGlyph GetGlyph (nuint glyphIndex, out bool isValidIndex);
+#elif MONOMAC
+ CGGlyph GetCGGlyph (nuint glyphIndex, out bool isValidIndex);
+#else
+ CGGlyph GetGlyph (nuint glyphIndex, ref bool isValidIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("CGGlyphAtIndex:")]
+#if XAMCORE_4_0
+ CGGlyph GetGlyph (nuint glyphIndex);
+#elif MONOMAC
+ CGGlyph GetCGGlyph (nuint glyphIndex);
+#else
+ CGGlyph GetGlyph (nuint glyphIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:")]
+#if XAMCORE_4_0
+ void ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharacterRange, /* NSInteger */ nint delta, NSRange invalidatedCharacterRange);
+#else
+ void ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, /* NSInteger */ nint delta, NSRange invalidatedCharRange);
+#endif
+
+ // This method can only be called from
+ // NSLayoutManagerDelegate.ShouldGenerateGlyphs, and that method takes
+ // the same IntPtr arguments as this one. This means that creating a
+ // version of this method with nice(r) types (arrays instead of
+ // IntPtr) is useless, since what the caller has is IntPtrs (from the
+ // ShouldGenerateGlyphs parameters). We can revisit this if we ever
+ // fix the generator to have support for C-style arrays.
+ [Mac (10,11)]
+ [Export ("setGlyphs:properties:characterIndexes:font:forGlyphRange:")]
+#if XAMCORE_4_0
+ void SetGlyphs (IntPtr glyphs, IntPtr properties, IntPtr characterIndexes, NSFont font, NSRange glyphRange);
+#else
+ void SetGlyphs (IntPtr glyphs, IntPtr props, IntPtr charIndexes, NSFont aFont, NSRange glyphRange);
+#endif
+
+#if !(XAMCORE_4_0 || MONOMAC)
+ [Sealed]
+#endif
+ [Mac (10,11)]
+ [Export ("truncatedGlyphRangeInLineFragmentForGlyphAtIndex:")]
+ NSRange GetTruncatedGlyphRangeInLineFragment (nuint glyphIndex);
+
+#if !(XAMCORE_4_0 || MONOMAC)
+ [Obsolete ("Use 'GetTruncatedGlyphRangeInLineFragment' instead.")]
+ [Mac (10,11)]
+ [Export ("truncatedGlyphRangeInLineFragmentForGlyphAtIndex:")]
+ NSRange TruncatedGlyphRangeInLineFragmentForGlyphAtIndex (nuint glyphIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("enumerateLineFragmentsForGlyphRange:usingBlock:")]
+ void EnumerateLineFragments (NSRange glyphRange, NSTextLayoutEnumerateLineFragments callback);
+
+ [Mac (10,11)]
+ [Export ("enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:")]
+ void EnumerateEnclosingRects (NSRange glyphRange, NSRange selectedRange, NSTextContainer textContainer, NSTextLayoutEnumerateEnclosingRects callback);
+
+ [Protected] // Can be overridden
+ [Export ("showCGGlyphs:positions:count:font:matrix:attributes:inContext:")]
+ void ShowGlyphs (IntPtr glyphs, IntPtr positions, nuint glyphCount, NSFont font, CGAffineTransform textMatrix, NSDictionary attributes, [NullAllowed] CGContext graphicsContext);
+
+ // Unfortunately we can't provide a nicer API for this, because it uses C-style arrays.
+ // And providing a nicer overload when it's only purpose is to be overridden is useless.
+ [Advice ("This method should never be called, only overridden.")] // According to Apple's documentation
+ [Protected]
+ [Export ("fillBackgroundRectArray:count:forCharacterRange:color:")]
+ void FillBackground (IntPtr rectArray, nuint rectCount, NSRange characterRange, NSColor color);
+
+ [Export ("drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
+ void DrawUnderline (NSRange glyphRange, NSUnderlineStyle underlineVal, nfloat baselineOffset, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
+
+ [Export ("underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
+ void Underline (NSRange glyphRange, NSUnderlineStyle underlineVal, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
+
+ [Export ("drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
+ void DrawStrikethrough (NSRange glyphRange, NSUnderlineStyle strikethroughVal, nfloat baselineOffset, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
+
+ [Export ("strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:")]
+ void Strikethrough (NSRange glyphRange, NSUnderlineStyle strikethroughVal, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin);
+
+ [NoiOS][NoTV]
+ [Export ("showAttachmentCell:inRect:characterIndex:")]
+ void ShowAttachmentCell (NSCell cell, CGRect rect, nuint characterIndex);
+
+ [Mac (10, 14, onlyOn64: true)]
+ [TV (12, 0), iOS (12, 0)]
+ [Export ("limitsLayoutForSuspiciousContents")]
+ bool LimitsLayoutForSuspiciousContents { get; set; }
+ }
+
+ [NoiOS][NoWatch][NoTV]
+ [Category]
+ [BaseType (typeof (NSLayoutManager))]
+ interface NSLayoutManager_NSTextViewSupport {
+ [Export ("rulerMarkersForTextView:paragraphStyle:ruler:")]
+ NSRulerMarker[] GetRulerMarkers (NSTextView textView, NSParagraphStyle paragraphStyle, NSRulerView ruler);
+
+ [return: NullAllowed]
+ [Export ("rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:")]
+ NSView GetRulerAccessoryView (NSTextView textView, NSParagraphStyle paragraphStyle, NSRulerView ruler, bool enabled);
+
+ [Export ("layoutManagerOwnsFirstResponderInWindow:")]
+ bool LayoutManagerOwnsFirstResponder (NSWindow window);
+
+ [return: NullAllowed]
+ [Export ("firstTextView", ArgumentSemantic.Assign)]
+ NSTextView GetFirstTextView ();
+
+ [return: NullAllowed]
+ [Export ("textViewForBeginningOfSelection")]
+ NSTextView GetTextViewForBeginningOfSelection ();
+ }
+
+ interface INSLayoutManagerDelegate {}
+
+ [NoWatch] // Header not present in watchOS SDK.
+ [iOS (7,0)]
+ [BaseType (typeof (NSObject))]
+ [Model]
+ [Protocol]
+ interface NSLayoutManagerDelegate {
+ [Export ("layoutManagerDidInvalidateLayout:")]
+#if MONOMAC && !XAMCORE_4_0
+ void LayoutInvalidated (NSLayoutManager sender);
+#else
+ void DidInvalidatedLayout (NSLayoutManager sender);
+#endif
+
+ [iOS (7,0)]
+ [Export ("layoutManager:didCompleteLayoutForTextContainer:atEnd:")]
+#if XAMCORE_4_0 || !MONOMAC
+ void DidCompleteLayout (NSLayoutManager layoutManager, NSTextContainer textContainer, bool layoutFinishedFlag);
+#else
+ void LayoutCompleted (NSLayoutManager layoutManager, NSTextContainer textContainer, bool layoutFinishedFlag);
+#endif
+
+ [NoiOS][NoTV]
+ [Export ("layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:")]
+#if XAMCORE_4_0
+ NSDictionary ShouldUseTemporaryAttributes (NSLayoutManager layoutManager, NSDictionary temporaryAttributes, bool drawingToScreen, nuint characterIndex, ref NSRange effectiveCharacterRange);
+#else
+ NSDictionary ShouldUseTemporaryAttributes (NSLayoutManager layoutManager, NSDictionary temporaryAttributes, bool drawingToScreen, nint charIndex, IntPtr effectiveCharRange);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:")]
+#if XAMCORE_4_0
+ nuint ShouldGenerateGlyphs (NSLayoutManager layoutManager, IntPtr glyphBuffer, IntPtr properties, IntPtr characterIndexes, NSFont font, NSRange glyphRange);
+#else
+ nuint ShouldGenerateGlyphs (NSLayoutManager layoutManager, IntPtr glyphBuffer, IntPtr props, IntPtr charIndexes, NSFont aFont, NSRange glyphRange);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:")]
+#if XAMCORE_4_0 || MONOMAC
+ nfloat GetLineSpacingAfterGlyph (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
+#else
+ nfloat LineSpacingAfterGlyphAtIndex (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:")]
+#if XAMCORE_4_0 || MONOMAC
+ nfloat GetParagraphSpacingBeforeGlyph (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
+#else
+ nfloat ParagraphSpacingBeforeGlyphAtIndex (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:")]
+#if XAMCORE_4_0 || MONOMAC
+ nfloat GetParagraphSpacingAfterGlyph (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
+#else
+ nfloat ParagraphSpacingAfterGlyphAtIndex (NSLayoutManager layoutManager, nuint glyphIndex, CGRect rect);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:shouldUseAction:forControlCharacterAtIndex:")]
+#if XAMCORE_4_0
+ NSControlCharacterAction ShouldUseAction (NSLayoutManager layoutManager, NSControlCharacterAction action, nuint characterIndex);
+#else
+ NSControlCharacterAction ShouldUseAction (NSLayoutManager layoutManager, NSControlCharacterAction action, nuint charIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:shouldBreakLineByWordBeforeCharacterAtIndex:")]
+#if XAMCORE_4_0
+ bool ShouldBreakLineByWordBeforeCharacter (NSLayoutManager layoutManager, nuint characterIndex);
+#else
+ bool ShouldBreakLineByWordBeforeCharacter (NSLayoutManager layoutManager, nuint charIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:shouldBreakLineByHyphenatingBeforeCharacterAtIndex:")]
+#if XAMCORE_4_0
+ bool ShouldBreakLineByHyphenatingBeforeCharacter (NSLayoutManager layoutManager, nuint characterIndex);
+#else
+ bool ShouldBreakLineByHyphenatingBeforeCharacter (NSLayoutManager layoutManager, nuint charIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:")]
+#if XAMCORE_4_0
+ CGRect GetBoundingBox (NSLayoutManager layoutManager, nuint glyphIndex, NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, nuint characterIndex);
+#elif MONOMAC
+ CGRect GetBoundingBox (NSLayoutManager layoutManager, nuint glyphIndex, NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, nuint charIndex);
+#else
+ CGRect BoundingBoxForControlGlyph (NSLayoutManager layoutManager, nuint glyphIndex, NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, nuint charIndex);
+#endif
+
+ [Mac (10,11)]
+ [Export ("layoutManager:textContainer:didChangeGeometryFromSize:")]
+ void DidChangeGeometry (NSLayoutManager layoutManager, NSTextContainer textContainer, CGSize oldSize);
+
+ [iOS (9,0)]
+ [Mac (10,11)]
+ [Export ("layoutManager:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:inTextContainer:forGlyphRange:")]
+ bool ShouldSetLineFragmentRect (NSLayoutManager layoutManager, ref CGRect lineFragmentRect, ref CGRect lineFragmentUsedRect, ref nfloat baselineOffset, NSTextContainer textContainer, NSRange glyphRange);
+ }
+}
diff --git a/tests/README.md b/tests/README.md
index 3d92d9ec6ee0..2acb4a236ce4 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -72,7 +72,20 @@ Con
* The data might not represent the truth (errors, false positives...)
+### Xamarin.Mac
+Many tests when run for macOS use a integration [hack](https://github.com/xamarin/xamarin-macios/blob/master/tests/common/mac/MacTestMain.cs) which helps handle a number of issues:
+
+- Allowing command line arguments to tests while excluding "psn" arguments passed in while debugging with Visual Studio for Mac
+- Optionally integrating with the macOS message loop for tests that require it (anything that uses most Cocoa primitives).
+- Invoking `_exit` to work around a number of post-test hangs. See the [bug](https://bugzilla.xamarin.com/show_bug.cgi?id=52604) for details.
+- Add a number of "default" excludes for mono BCL tests
+
+One very useful "hack" this support adds is the ability to run a single test from the command line via the `XM_TEST_NAME` environmental variable. For example
+
+```
+XM_TEST_NAME=MonoTouchFixtures.Security.KeyTest.CreateRandomKeyWithParametersTests make run-mac-unified-xammac_tests
+```
# Test Suites
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
new file mode 100644
index 000000000000..d0b5a8098ec9
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
new file mode 100644
index 000000000000..f4c8d29047b8
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
new file mode 100644
index 000000000000..ebb5a0fe4e7e
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
new file mode 100644
index 000000000000..0986d31bebb1
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
new file mode 100644
index 000000000000..a142c83fb1c3
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
new file mode 100644
index 000000000000..0986d31bebb1
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
new file mode 100644
index 000000000000..412d6ca9b42c
Binary files /dev/null and b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png differ
diff --git a/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/Contents.json b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000000..deda2078f0bd
--- /dev/null
+++ b/tests/common/mac/Icons/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,238 @@
+{
+ "images": [
+ {
+ "size": "20x20",
+ "scale": "2x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "20x20",
+ "scale": "3x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "29x29",
+ "scale": "2x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "29x29",
+ "scale": "3x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "40x40",
+ "scale": "2x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "40x40",
+ "scale": "3x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "60x60",
+ "scale": "2x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "60x60",
+ "scale": "3x",
+ "idiom": "iphone"
+ },
+ {
+ "size": "20x20",
+ "scale": "1x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "20x20",
+ "scale": "2x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "29x29",
+ "scale": "1x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "29x29",
+ "scale": "2x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "40x40",
+ "scale": "1x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "40x40",
+ "scale": "2x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "83.5x83.5",
+ "scale": "2x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "76x76",
+ "scale": "1x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "76x76",
+ "scale": "2x",
+ "idiom": "ipad"
+ },
+ {
+ "size": "1024x1024",
+ "scale": "1x",
+ "idiom": "ios-marketing"
+ },
+ {
+ "size": "60x60",
+ "scale": "2x",
+ "idiom": "car"
+ },
+ {
+ "size": "60x60",
+ "scale": "3x",
+ "idiom": "car"
+ },
+ {
+ "role": "notificationCenter",
+ "size": "24x24",
+ "subtype": "38mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "notificationCenter",
+ "size": "27.5x27.5",
+ "subtype": "42mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "companionSettings",
+ "size": "29x29",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "companionSettings",
+ "size": "29x29",
+ "scale": "3x",
+ "idiom": "watch"
+ },
+ {
+ "role": "appLauncher",
+ "size": "40x40",
+ "subtype": "38mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "appLauncher",
+ "size": "44x44",
+ "subtype": "40mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "appLauncher",
+ "size": "50x50",
+ "subtype": "44mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "quickLook",
+ "size": "86x86",
+ "subtype": "38mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "quickLook",
+ "size": "98x98",
+ "subtype": "42mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "role": "quickLook",
+ "size": "108x108",
+ "subtype": "44mm",
+ "scale": "2x",
+ "idiom": "watch"
+ },
+ {
+ "size": "1024x1024",
+ "scale": "1x",
+ "idiom": "watch-marketing"
+ },
+ {
+ "filename": "AppIcon-16.png",
+ "size": "16x16",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-16@2x.png",
+ "size": "16x16",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-32.png",
+ "size": "32x32",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-32@2x.png",
+ "size": "32x32",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-128.png",
+ "size": "128x128",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-128@2x.png",
+ "size": "128x128",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "size": "256x256",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-256@2x.png",
+ "size": "256x256",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "size": "512x512",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "size": "512x512",
+ "scale": "2x",
+ "idiom": "mac"
+ }
+ ],
+ "info": {
+ "version": 1,
+ "author": "xcode"
+ }
+}
\ No newline at end of file
diff --git a/tests/common/mac/Icons/Assets.xcassets/Contents.json b/tests/common/mac/Icons/Assets.xcassets/Contents.json
new file mode 100644
index 000000000000..4caf392f92c9
--- /dev/null
+++ b/tests/common/mac/Icons/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/tests/common/mac/ProjectTestHelpers.cs b/tests/common/mac/ProjectTestHelpers.cs
index 92bf8d7e25c6..09114330138e 100644
--- a/tests/common/mac/ProjectTestHelpers.cs
+++ b/tests/common/mac/ProjectTestHelpers.cs
@@ -161,6 +161,9 @@ public class UnifiedTestConfig
public string APIDefinitionConfig { get; set; }
public string StructsAndEnumsConfig { get; set; }
+ // Unified Executable Specific
+ public bool AssetIcons { get; set; }
+
// Generated by TestUnifiedExecutable/TestSystemMonoExecutable and added to TestCode
public Guid guid { get; set; }
@@ -306,6 +309,24 @@ public static string GenerateEXEProject (UnifiedTestConfig config)
string sourceDir = FindSourceDirectory ();
+ if (config.AssetIcons)
+ {
+ RunAndAssert ("/bin/cp", $"-R {Path.Combine (sourceDir, "Icons/Assets.xcassets")} {config.TmpDir}", "Copy Asset Icons");
+ config.ItemGroup += @"
+
+
+
+
+
+
+
+
+
+ ";
+ // HACK - Should process using CopyFileWithSubstitutions
+ config.PlistReplaceStrings.Add ("", @"XSAppIconAssetsAssets.xcassets/AppIcon.appiconset");
+ }
+
CopyFileWithSubstitutions (Path.Combine (sourceDir, "Info-Unified.plist"), Path.Combine (config.TmpDir, "Info.plist"), text => {
foreach (var key in config.PlistReplaceStrings.Keys)
text = text.Replace (key, config.PlistReplaceStrings [key]);
diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs
index c605303e2e3f..1676b6afbb61 100644
--- a/tests/introspection/ApiTypoTest.cs
+++ b/tests/introspection/ApiTypoTest.cs
@@ -300,6 +300,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) {
"Linecap",
"Lingustic",
"libcompression",
+ "libdispatch",
"Lod",
"Lopass",
"Lowlevel",
diff --git a/tests/mmptest/src/LinkerTests.cs b/tests/mmptest/src/LinkerTests.cs
index 31675211cf6d..6f018289372e 100644
--- a/tests/mmptest/src/LinkerTests.cs
+++ b/tests/mmptest/src/LinkerTests.cs
@@ -139,5 +139,15 @@ public void LinkingAdditionalArguments_ShouldBeUsed ()
Assert.IsTrue (buildOutput.Contains ("Selected Linking: 'Platform'"), $"Build Output did not contain expected selected linking line: {buildOutput}");
});
}
+
+ [Test]
+ public void LinkingWithPartialStatic_ShouldFail ()
+ {
+ MMPTests.RunMMPTest (tmpDir => {
+ TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = "--registrar:partial --linkplatform" };
+ string buildOutput = TI.TestUnifiedExecutable (test, shouldFail: true).BuildOutput;
+ Assert.True (buildOutput.Contains ("2110"), $"Building did not give the expected 2110 error.\n\n{buildOutput}");
+ });
+ }
}
}
diff --git a/tests/mmptest/src/MMPTest.cs b/tests/mmptest/src/MMPTest.cs
index 991128910dc4..5b8936686413 100644
--- a/tests/mmptest/src/MMPTest.cs
+++ b/tests/mmptest/src/MMPTest.cs
@@ -673,5 +673,28 @@ public void MM0139 ()
rv.Messages.AssertWarningCount (0);
});
}
+
+ // [Test] - https://github.com/xamarin/xamarin-macios/issues/4110
+ public void BuildingSameSolutionTwice_ShouldNotRunACToolTwice ()
+ {
+ RunMMPTest (tmpDir => {
+ TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) {
+ AssetIcons = true
+ };
+
+ string project = TI.GenerateUnifiedExecutableProject (test);
+
+ string buildOutput = TI.BuildProject (project, true, diagnosticMSBuild: true, useMSBuild: true);
+ Assert.True (buildOutput.Contains ("actool execution started with arguments"), $"Initial build should run actool");
+
+ buildOutput = TI.BuildProject (project, true, diagnosticMSBuild: true, useMSBuild: true);
+ Assert.False (buildOutput.Contains ("actool execution started with arguments"), $"Second build should not run actool");
+
+ TI.RunAndAssert ("touch", Path.Combine (tmpDir, "Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png"), "touch icon");
+
+ buildOutput = TI.BuildProject (project, true, diagnosticMSBuild: true, useMSBuild: true);
+ Assert.True (buildOutput.Contains ("actool execution started with arguments"), $"Build after touching icon must run actool");
+ });
+ }
}
}
diff --git a/tests/monotouch-test/Metal/StructTest.cs b/tests/monotouch-test/Metal/StructTest.cs
new file mode 100644
index 000000000000..dd401501b5dc
--- /dev/null
+++ b/tests/monotouch-test/Metal/StructTest.cs
@@ -0,0 +1,36 @@
+#if !__WATCHOS__
+
+using System;
+using System.Runtime.InteropServices;
+
+#if XAMCORE_2_0
+using Metal;
+#else
+using MonoTouch.Metal;
+#endif
+
+using NUnit.Framework;
+
+namespace MonoTouchFixtures.Metal {
+
+ [TestFixture]
+ public class StructTest {
+
+ [Test]
+ public void MTLQuadTessellationFactorsHalfStructSize ()
+ {
+ // tested with a native iOS app
+ Assert.AreEqual (12, Marshal.SizeOf (), $"Reported size was {Marshal.SizeOf ()}");
+ }
+
+ [Test]
+ public void MTLTriangleTessellationFactorsHalfStructSize ()
+ {
+ // tested with a native iOS app
+ Assert.AreEqual (8, Marshal.SizeOf (), $"Reported size was {Marshal.SizeOf ()}");
+ }
+ }
+}
+
+#endif // !__WATCHOS__
+
diff --git a/tests/monotouch-test/UIKit/LayoutManagerTest.cs b/tests/monotouch-test/UIKit/LayoutManagerTest.cs
index b3e8295bf49b..b7a2d2922d70 100644
--- a/tests/monotouch-test/UIKit/LayoutManagerTest.cs
+++ b/tests/monotouch-test/UIKit/LayoutManagerTest.cs
@@ -55,6 +55,8 @@ public void Defaults ()
Assert.False (lm.ShowsInvisibleCharacters, "ShowsInvisibleCharacters");
Assert.Null (lm.TextStorage, "TextStorage");
Assert.True (lm.UsesFontLeading, "UsesFontLeading");
+ if (TestRuntime.CheckXcodeVersion (10, 0))
+ Assert.False (lm.LimitsLayoutForSuspiciousContents, "LimitsLayoutForSuspiciousContents");
}
}
diff --git a/tests/mtouch/MTouch.cs b/tests/mtouch/MTouch.cs
index 458c03338c93..1421d526c503 100644
--- a/tests/mtouch/MTouch.cs
+++ b/tests/mtouch/MTouch.cs
@@ -1089,7 +1089,7 @@ public void MT0091 (Profile profile, string name)
mtouch.Sdk = sdk_version;
Assert.AreEqual (1, mtouch.Execute (MTouchAction.BuildSim));
var xcodeVersionString = Configuration.XcodeVersion;
- mtouch.AssertError (91, String.Format ("This version of Xamarin.iOS requires the {0} {1} SDK (shipped with Xcode {2}). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).", name, GetSdkVersion (profile), xcodeVersionString));
+ mtouch.AssertError (91, String.Format ("This version of Xamarin.iOS requires the {0} {1} SDK (shipped with Xcode {2}). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only in your project's iOS Build Options > Linker Behavior (to try to avoid the new APIs).", name, GetSdkVersion (profile), xcodeVersionString));
}
}
diff --git a/tests/package-mac-tests.sh b/tests/package-mac-tests.sh
index 7a257fbf9658..903d6c335594 100755
--- a/tests/package-mac-tests.sh
+++ b/tests/package-mac-tests.sh
@@ -18,6 +18,7 @@ cp -p Makefile-mac.inc $DIR/tests
cp -p common.mk $DIR/tests
cp -p Makefile $DIR/tests
cp -p ../Make.config $DIR
+cp -p ../Make.versions $DIR
cp -p test-dependencies.sh $DIR
cp -p ../system-dependencies.sh $DIR
mkdir -p $DIR/mk
diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs
index 9dd072041cf7..3cac8aac977d 100644
--- a/tests/xharness/AppRunner.cs
+++ b/tests/xharness/AppRunner.cs
@@ -126,7 +126,7 @@ async Task FindSimulatorAsync ()
var sims = new Simulators () {
Harness = Harness,
};
- await sims.LoadAsync (Logs.Create ("simulator-list.log", "Simulator list"));
+ await sims.LoadAsync (Logs.Create ($"simulator-list-{Harness.Timestamp}.log", "Simulator list"));
simulators = await sims.FindAsync (Target, main_log);
return simulators != null;
diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs
index a4731ca3719a..525e8c65623d 100644
--- a/tests/xharness/Harness.cs
+++ b/tests/xharness/Harness.cs
@@ -329,19 +329,20 @@ void AutoConfigureIOS ()
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/mscorlib/mscorlib-0.csproj")), false));
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/mscorlib/mscorlib-1.csproj")), false));
foreach (var p in test_suites)
- IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj"))));
+ IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj"))) { Name = p });
foreach (var p in fsharp_test_suites)
- IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj"))));
+ IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj"))) { Name = p });
foreach (var p in library_projects)
- IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj")), false));
+ IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj")), false) { Name = p });
foreach (var p in fsharp_library_projects)
- IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")), false));
+ IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")), false) { Name = p });
foreach (var p in bcl_suites) {
BCLTestInfo bclTestInfo = new BCLTestInfo (this, p);
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/" + p + "/" + p + ".csproj"))) {
SkipwatchOSVariation = bcl_skip_watchos.Contains (p),
- BCLInfo = bclTestInfo
+ BCLInfo = bclTestInfo,
+ Name = p
});
}
diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs
index 2fa80aee78d4..e0bbc25a3dfb 100644
--- a/tests/xharness/Jenkins.cs
+++ b/tests/xharness/Jenkins.cs
@@ -23,6 +23,7 @@ public class Jenkins
public bool IncludeMac32 = true;
public bool IncludeiOS = true;
public bool IncludeiOSExtensions;
+ public bool ForceExtensionBuildOnly;
public bool IncludetvOS = true;
public bool IncludewatchOS = true;
public bool IncludeMmpTest;
@@ -80,7 +81,7 @@ Task LoadSimulatorsAndDevicesAsync ()
Devices.Harness = Harness;
if (SimulatorLoadLog == null)
- SimulatorLoadLog = Logs.Create ("simulator-list.log", "Simulator Listing");
+ SimulatorLoadLog = Logs.Create ($"simulator-list-{Harness.Timestamp}.log", "Simulator Listing");
var simulatorLoadTask = Task.Run (async () => {
try {
@@ -92,7 +93,7 @@ Task LoadSimulatorsAndDevicesAsync ()
});
if (DeviceLoadLog == null)
- DeviceLoadLog = Logs.Create ("device-list.log", "Device Listing");
+ DeviceLoadLog = Logs.Create ($"device-list-{Harness.Timestamp}.log", "Device Listing");
var deviceLoadTask = Task.Run (async () => {
try {
await Devices.LoadAsync (DeviceLoadLog, removed_locked: true);
@@ -388,7 +389,7 @@ IEnumerable CreateRunDeviceTasks ()
TestName = project.Name,
};
build64.CloneTestProject (project);
- rv.Add (new RunDeviceTask (build64, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.iOS && dev.Supports64Bit)) { Ignored = ignored || !IncludeiOS });
+ rv.Add (new RunDeviceTask (build64, Devices.Connected64BitIOS) { Ignored = ignored || !IncludeiOS, BuildOnly = project.BuildOnly });
var build32 = new XBuildTask {
Jenkins = this,
@@ -398,7 +399,7 @@ IEnumerable CreateRunDeviceTasks ()
TestName = project.Name,
};
build32.CloneTestProject (project);
- rv.Add (new RunDeviceTask (build32, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.iOS && dev.Supports32Bit)) { Ignored = ignored || !IncludeiOS });
+ rv.Add (new RunDeviceTask (build32, Devices.Connected32BitIOS) { Ignored = ignored || !IncludeiOS, BuildOnly = project.BuildOnly });
var todayProject = project.AsTodayExtensionProject ();
var buildToday = new XBuildTask {
@@ -409,7 +410,7 @@ IEnumerable CreateRunDeviceTasks ()
TestName = project.Name,
};
buildToday.CloneTestProject (todayProject);
- rv.Add (new RunDeviceTask (buildToday, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.iOS && dev.Supports64Bit)) { Ignored = ignored || !IncludeiOSExtensions });
+ rv.Add (new RunDeviceTask (buildToday, Devices.Connected64BitIOS) { Ignored = ignored || !IncludeiOSExtensions, BuildOnly = project.BuildOnly || ForceExtensionBuildOnly });
}
if (!project.SkiptvOSVariation) {
@@ -422,7 +423,7 @@ IEnumerable CreateRunDeviceTasks ()
TestName = project.Name,
};
buildTV.CloneTestProject (tvOSProject);
- rv.Add (new RunDeviceTask (buildTV, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.tvOS)) { Ignored = ignored || !IncludetvOS });
+ rv.Add (new RunDeviceTask (buildTV, Devices.ConnectedTV) { Ignored = ignored || !IncludetvOS, BuildOnly = project.BuildOnly });
}
if (!project.SkipwatchOSVariation) {
@@ -435,7 +436,7 @@ IEnumerable CreateRunDeviceTasks ()
TestName = project.Name,
};
buildWatch.CloneTestProject (watchOSProject);
- rv.Add (new RunDeviceTask (buildWatch, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.watchOS)) { Ignored = ignored || !IncludewatchOS });
+ rv.Add (new RunDeviceTask (buildWatch, Devices.ConnectedWatch) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly });
}
}
@@ -463,6 +464,8 @@ void SelectTests ()
// whatever we did automatically.
SelectTestsByLabel (pull_request);
+ DisableKnownFailingDeviceTests ();
+
if (!Harness.INCLUDE_IOS) {
MainLog.WriteLine ("The iOS build is diabled, so any iOS tests will be disabled as well.");
IncludeiOS = false;
@@ -484,6 +487,16 @@ void SelectTests ()
}
}
+ void DisableKnownFailingDeviceTests ()
+ {
+ // https://github.com/xamarin/maccore/issues/1008
+ ForceExtensionBuildOnly = true;
+
+ // https://github.com/xamarin/maccore/issues/1011
+ foreach (var mono in Harness.IOSTestProjects.Where (x => x.Name == "mini"))
+ mono.BuildOnly = true;
+ }
+
void SelectTestsByModifiedFiles (int pull_request)
{
var files = GitHub.GetModifiedFiles (Harness, pull_request);
@@ -900,7 +913,7 @@ public int Run ()
{
try {
Directory.CreateDirectory (LogDirectory);
- Log log = Logs.Create ("Harness.log", "Harness log");
+ Log log = Logs.Create ($"Harness-{Harness.Timestamp}.log", "Harness log");
if (Harness.InWrench)
log = Log.CreateAggregatedLog (log, new ConsoleLog ());
Harness.HarnessLog = MainLog = log;
@@ -1305,7 +1318,7 @@ public void GenerateReport (bool only_if_ci = false)
try {
lock (report_lock) {
- var report = Path.Combine (LogDirectory, "index.html");
+ var report = Path.Combine (LogDirectory, IsServerMode ? $"index-{Harness.Timestamp}.html" : "index.html");
using (var stream = new MemoryStream ()) {
MemoryStream markdown_summary = null;
StreamWriter markdown_writer = null;
@@ -2192,6 +2205,30 @@ abstract class TestTask
public bool RequiresXcode94;
+ // VerifyRun is called in RunInternalAsync/ExecuteAsync to verify that the task can be executed/run.
+ // Typically used to fail tasks that don't have an available device, or if there's not enough disk space.
+ public virtual Task VerifyRunAsync ()
+ {
+ return VerifyDiskSpaceAsync ();
+ }
+
+ static DriveInfo RootDrive;
+ protected Task VerifyDiskSpaceAsync ()
+ {
+ if (Finished)
+ return Task.CompletedTask;
+
+ if (RootDrive == null)
+ RootDrive = new DriveInfo ("/");
+ var afs = RootDrive.AvailableFreeSpace;
+ const long minSpaceRequirement = 1024 * 1024 * 1024; /* 1 GB */
+ if (afs < minSpaceRequirement) {
+ FailureMessage = $"Not enough space on the root drive '{RootDrive.Name}': {afs / (1024.0 * 1024):#.##} MB left of {minSpaceRequirement / (1024.0 * 1024):#.##} MB required";
+ ExecutionResult = TestExecutingResult.Failed;
+ }
+ return Task.CompletedTask;
+ }
+
public void CloneTestProject (TestProject project)
{
// Don't build in the original project directory
@@ -2335,7 +2372,7 @@ public virtual IEnumerable AggregatedLogs {
public string LogDirectory {
get {
- var rv = Path.Combine (Jenkins.LogDirectory, $"{TestName}_{ID}");
+ var rv = Path.Combine (Jenkins.LogDirectory, TestName, ID.ToString ());
Directory.CreateDirectory (rv);
return rv;
}
@@ -2359,6 +2396,10 @@ async Task RunInternalAsync ()
try {
if (InitialTask != null)
await InitialTask;
+
+ await VerifyRunAsync ();
+ if (Finished)
+ return;
duration.Start ();
@@ -3086,6 +3127,7 @@ protected override async Task RunTestAsync ()
abstract class RunTestTask : TestTask
{
public readonly BuildToolTask BuildTask;
+ public bool BuildOnly;
public RunTestTask (BuildToolTask build_task)
{
@@ -3126,6 +3168,10 @@ public async Task BuildAsync ()
if (Finished)
return true;
+ await VerifyBuildAsync ();
+ if (Finished)
+ return BuildTask.Succeeded;
+
ExecutionResult = TestExecutingResult.Building;
await BuildTask.RunAsync ();
if (!BuildTask.Succeeded) {
@@ -3153,15 +3199,23 @@ protected override async Task ExecuteAsync ()
if (!await BuildAsync ())
return;
+ if (BuildOnly) {
+ ExecutionResult = TestExecutingResult.Succeeded;
+ return;
+ }
+
ExecutionResult = TestExecutingResult.Running;
duration.Restart (); // don't count the build time.
await RunTestAsync ();
}
protected abstract Task RunTestAsync ();
- // VerifyRun is called in ExecuteAsync to verify that the task can be executed/run.
- // Typically used to fail tasks that don't have an available device.
- public virtual Task VerifyRunAsync () { return Task.CompletedTask; }
+ // VerifyBuild is called in BuildAsync to verify that the task can be built.
+ // Typically used to fail tasks if there's not enough disk space.
+ public virtual Task VerifyBuildAsync ()
+ {
+ return VerifyDiskSpaceAsync ();
+ }
public override void Reset ()
{
@@ -3238,6 +3292,8 @@ public override string Mode {
public override async Task VerifyRunAsync ()
{
await base.VerifyRunAsync ();
+ if (Finished)
+ return;
var enumerable = candidates;
var asyncEnumerable = enumerable as IAsyncEnumerable;
diff --git a/tests/xharness/Log.cs b/tests/xharness/Log.cs
index f956feb60b37..27dd10f5d156 100644
--- a/tests/xharness/Log.cs
+++ b/tests/xharness/Log.cs
@@ -339,6 +339,11 @@ void Capture ()
var currentLength = new FileInfo (CapturePath).Length;
var capturedLength = 0L;
+ if (length < 0) {
+ // The file shrank?
+ return;
+ }
+
if (File.Exists (Path))
capturedLength = new FileInfo (Path).Length;
diff --git a/tests/xharness/Simulators.cs b/tests/xharness/Simulators.cs
index 976ee404eb80..f121ef2394f9 100644
--- a/tests/xharness/Simulators.cs
+++ b/tests/xharness/Simulators.cs
@@ -646,11 +646,12 @@ public class Devices
bool loaded;
BlockingEnumerableCollection connected_devices = new BlockingEnumerableCollection ();
- public IEnumerable ConnectedDevices {
- get {
- return connected_devices;
- }
- }
+
+ public IEnumerable ConnectedDevices => connected_devices;
+ public IEnumerable Connected64BitIOS => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.iOS && x.Supports64Bit);
+ public IEnumerable Connected32BitIOS => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.iOS && x.Supports32Bit);
+ public IEnumerable ConnectedTV => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.tvOS);
+ public IEnumerable ConnectedWatch => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.watchOS);
public async Task LoadAsync (Log log, bool extra_data = false, bool removed_locked = false, bool force = false)
{
diff --git a/tests/xharness/TestProject.cs b/tests/xharness/TestProject.cs
index 0e18547221fc..ff79cab882f2 100644
--- a/tests/xharness/TestProject.cs
+++ b/tests/xharness/TestProject.cs
@@ -145,6 +145,7 @@ public class iOSTestProject : TestProject
public bool SkipiOSVariation;
public bool SkipwatchOSVariation;
public bool SkiptvOSVariation;
+ public bool BuildOnly;
// Optional
public BCLTestInfo BCLInfo { get; set; }
diff --git a/tests/xtro-sharpie/common-CoreFoundation.ignore b/tests/xtro-sharpie/common-CoreFoundation.ignore
index 89a469ced062..834c51367967 100644
--- a/tests/xtro-sharpie/common-CoreFoundation.ignore
+++ b/tests/xtro-sharpie/common-CoreFoundation.ignore
@@ -41,8 +41,6 @@
!missing-field! kCFAbsoluteTimeIntervalSince1904 not bound
!missing-field! kCFAbsoluteTimeIntervalSince1970 not bound
!missing-field! kCFAllocatorUseContext not bound
-!missing-field! kCFBooleanFalse not bound
-!missing-field! kCFBooleanTrue not bound
!missing-field! kCFBuddhistCalendar not bound
!missing-field! kCFBundleDevelopmentRegionKey not bound
!missing-field! kCFBundleExecutableKey not bound
@@ -931,6 +929,7 @@
!missing-pinvoke! CFWriteStreamCreateWithFile is not bound
!missing-pinvoke! CFWriteStreamGetError is not bound
!missing-pinvoke! CFWriteStreamGetTypeID is not bound
+!unknown-field! _dispatch_data_destructor_free bound
!unknown-pinvoke! close bound
!unknown-pinvoke! dispatch_after_f bound
!unknown-pinvoke! dispatch_apply_f bound
diff --git a/tests/xtro-sharpie/common-CoreMedia.ignore b/tests/xtro-sharpie/common-CoreMedia.ignore
index 2ba8cd723e03..5a60391093c1 100644
--- a/tests/xtro-sharpie/common-CoreMedia.ignore
+++ b/tests/xtro-sharpie/common-CoreMedia.ignore
@@ -124,8 +124,6 @@
!missing-field! kCMMetadataKeySpace_iTunes not bound
!missing-field! kCMMetadataKeySpace_QuickTimeMetadata not bound
!missing-field! kCMMetadataKeySpace_QuickTimeUserData not bound
-!missing-field! kCMSampleBufferAttachmentKey_DroppedFrameReasonInfo not bound
-!missing-field! kCMSampleBufferAttachmentKey_ForceKeyFrame not bound
!missing-field! kCMSampleBufferConduitNotification_InhibitOutputUntil not bound
!missing-field! kCMSampleBufferConduitNotification_ResetOutput not bound
!missing-field! kCMSampleBufferConduitNotification_UpcomingOutputPTSRangeChanged not bound
diff --git a/tests/xtro-sharpie/common-UIKit.ignore b/tests/xtro-sharpie/common-UIKit.ignore
index 093ce0efa336..fdb1c2185b5b 100644
--- a/tests/xtro-sharpie/common-UIKit.ignore
+++ b/tests/xtro-sharpie/common-UIKit.ignore
@@ -178,4 +178,3 @@
!missing-field! NSCharacterEncodingDocumentOption not bound
!missing-field! NSDefaultAttributesDocumentOption not bound
!missing-field! NSDocumentTypeDocumentOption not bound
-!missing-selector! NSLayoutManager::fillBackgroundRectArray:count:forCharacterRange:color: not bound
diff --git a/tests/xtro-sharpie/macOS-AppKit.ignore b/tests/xtro-sharpie/macOS-AppKit.ignore
index adeef820b6f9..19004e9fcb56 100644
--- a/tests/xtro-sharpie/macOS-AppKit.ignore
+++ b/tests/xtro-sharpie/macOS-AppKit.ignore
@@ -34,6 +34,16 @@
!missing-selector! NSObject::textStorageDidProcessEditing: not bound
!missing-selector! NSObject::textStorageWillProcessEditing: not bound
+## Defined in NSLayoutManager (NSLayoutManagerDeprecated)
+!missing-selector! NSLayoutManager::getGlyphs:range: not bound
+!missing-selector! NSLayoutManager::getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits: not bound
+!missing-selector! NSLayoutManager::getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels: not bound
+!missing-selector! NSLayoutManager::insertGlyphs:length:forStartingGlyphAtIndex:characterIndex: not bound
+!missing-selector! NSLayoutManager::invalidateLayoutForCharacterRange:isSoft:actualCharacterRange: not bound
+!missing-selector! NSLayoutManager::rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount: not bound
+!missing-selector! NSLayoutManager::setLocations:startingGlyphIndexes:count:forGlyphRange: not bound
+!missing-selector! NSLayoutManager::showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment: not bound
+
## Used in sandbox for NSOpen/Save panel but never should have been bound. #if !XAMCORE_3_0'ed
!unknown-type! NSRemoteOpenPanel bound
!unknown-type! NSRemoteSavePanel bound
@@ -652,7 +662,6 @@
!missing-protocol-member! NSDraggingSource::draggingSession:sourceOperationMaskForDraggingContext: not found
!missing-protocol-member! NSDraggingSource::draggingSession:willBeginAtPoint: not found
!missing-protocol-member! NSDraggingSource::ignoreModifierKeysForDraggingSession: not found
-!missing-protocol-member! NSLayoutManagerDelegate::layoutManager:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:inTextContainer:forGlyphRange: not found
!missing-protocol-member! NSPopoverDelegate::popoverShouldDetach: not found
!missing-protocol-member! NSTextInputClient::doCommandBySelector: not found
!missing-protocol-member! NSTextViewDelegate::textView:clickedOnCell:inRect: not found
@@ -817,40 +826,6 @@
!missing-selector! NSInputManager::markedTextAbandoned: not bound
!missing-selector! NSInputManager::markedTextSelectionChanged:client: not bound
!missing-selector! NSInputServer::initWithDelegate:name: not bound
-!missing-selector! NSLayoutManager::boundsRectForTextBlock:atIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin: not bound
-!missing-selector! NSLayoutManager::drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin: not bound
-!missing-selector! NSLayoutManager::fillBackgroundRectArray:count:forCharacterRange:color: not bound
-!missing-selector! NSLayoutManager::firstTextView not bound
-!missing-selector! NSLayoutManager::getGlyphs:range: not bound
-!missing-selector! NSLayoutManager::getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits: not bound
-!missing-selector! NSLayoutManager::getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels: not bound
-!missing-selector! NSLayoutManager::insertGlyphs:length:forStartingGlyphAtIndex:characterIndex: not bound
-!missing-selector! NSLayoutManager::invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange: not bound
-!missing-selector! NSLayoutManager::invalidateLayoutForCharacterRange:actualCharacterRange: not bound
-!missing-selector! NSLayoutManager::invalidateLayoutForCharacterRange:isSoft:actualCharacterRange: not bound
-!missing-selector! NSLayoutManager::layoutManagerOwnsFirstResponderInWindow: not bound
-!missing-selector! NSLayoutManager::layoutRectForTextBlock:atIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::lineFragmentRectForGlyphAtIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout: not bound
-!missing-selector! NSLayoutManager::lineFragmentUsedRectForGlyphAtIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout: not bound
-!missing-selector! NSLayoutManager::rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount: not bound
-!missing-selector! NSLayoutManager::rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled: not bound
-!missing-selector! NSLayoutManager::rulerMarkersForTextView:paragraphStyle:ruler: not bound
-!missing-selector! NSLayoutManager::setLocations:startingGlyphIndexes:count:forGlyphRange: not bound
-!missing-selector! NSLayoutManager::showAttachmentCell:inRect:characterIndex: not bound
-!missing-selector! NSLayoutManager::showCGGlyphs:positions:count:font:matrix:attributes:inContext: not bound
-!missing-selector! NSLayoutManager::showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment: not bound
-!missing-selector! NSLayoutManager::strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin: not bound
-!missing-selector! NSLayoutManager::temporaryAttribute:atCharacterIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange: not bound
-!missing-selector! NSLayoutManager::temporaryAttributesAtCharacterIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange: not bound
-!missing-selector! NSLayoutManager::textContainerForGlyphAtIndex:effectiveRange: not bound
-!missing-selector! NSLayoutManager::textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout: not bound
-!missing-selector! NSLayoutManager::textViewForBeginningOfSelection not bound
-!missing-selector! NSLayoutManager::underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin: not bound
!missing-selector! NSMatrix::sortUsingFunction:context: not bound
!missing-selector! NSMediaLibraryBrowserController::frame not bound
!missing-selector! NSMediaLibraryBrowserController::isVisible not bound
diff --git a/tests/xtro-sharpie/macOS-CoreFoundation.ignore b/tests/xtro-sharpie/macOS-CoreFoundation.ignore
index cfdc17b30363..4b7472403db9 100644
--- a/tests/xtro-sharpie/macOS-CoreFoundation.ignore
+++ b/tests/xtro-sharpie/macOS-CoreFoundation.ignore
@@ -1,5 +1,4 @@
## /usr/include/dispatch/queue.h
-!unknown-pinvoke! dispatch_get_main_queue bound
!unknown-pinvoke! dispatch_main bound
## dlfcn.h
diff --git a/tests/xtro-sharpie/macOS-CoreMedia.ignore b/tests/xtro-sharpie/macOS-CoreMedia.ignore
index 56fa5d458f08..bd2d970eca39 100644
--- a/tests/xtro-sharpie/macOS-CoreMedia.ignore
+++ b/tests/xtro-sharpie/macOS-CoreMedia.ignore
@@ -7,7 +7,5 @@
# as per headers: API_AVAILABLE(ios(9.0))
!missing-field! kCMSampleBufferLensStabilizationInfo_Active not bound
!missing-field! kCMSampleBufferLensStabilizationInfo_Off not bound
-!missing-field! kCMSampleBufferAttachmentKey_DroppedFrameReason not bound
-!missing-field! kCMSampleBufferAttachmentKey_StillImageLensStabilizationInfo not bound
!missing-field! kCMSampleBufferLensStabilizationInfo_OutOfRange not bound
!missing-field! kCMSampleBufferLensStabilizationInfo_Unavailable not bound
diff --git a/tests/xtro-sharpie/xtro-report/Reporter.cs b/tests/xtro-sharpie/xtro-report/Reporter.cs
index 8ae1821620fd..fa1cad588bed 100644
--- a/tests/xtro-sharpie/xtro-report/Reporter.cs
+++ b/tests/xtro-sharpie/xtro-report/Reporter.cs
@@ -270,7 +270,7 @@ public static int Main (string [] args)
log.Flush ();
Console.WriteLine ($"@MonkeyWrench: SetSummary: {errors} unclassified found.");
- return errors;
+ return errors == 0 ? 0 : 1;
}
}
}
diff --git a/tools/common/Application.cs b/tools/common/Application.cs
index b111651dbf80..3450ce8dc11e 100644
--- a/tools/common/Application.cs
+++ b/tools/common/Application.cs
@@ -350,7 +350,7 @@ public static bool IsUptodate (IEnumerable sources, IEnumerable
string max_s = null;
if (sources.Count () == 0 || targets.Count () == 0)
- ErrorHelper.Error (1013, "Dependency tracking error: no files to compare. Please file a bug report at http://bugzilla.xamarin.com with a test case.");
+ ErrorHelper.Error (1013, "Dependency tracking error: no files to compare. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.");
foreach (var s in sources) {
var sfi = new FileInfo (s);
diff --git a/tools/common/Assembly.cs b/tools/common/Assembly.cs
index 149547639630..8cb805bf2159 100644
--- a/tools/common/Assembly.cs
+++ b/tools/common/Assembly.cs
@@ -351,7 +351,7 @@ public string GetCompressionLinkingFlag ()
case ApplePlatform.WatchOS:
return "-lcompression";
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at http://bugzilla.xamarin.com with a test case.", App.Platform, App.SdkVersion);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", App.Platform, App.SdkVersion);
}
}
diff --git a/tools/common/BuildTasks.cs b/tools/common/BuildTasks.cs
index c067f688fe31..105734041d5b 100644
--- a/tools/common/BuildTasks.cs
+++ b/tools/common/BuildTasks.cs
@@ -166,7 +166,7 @@ void Log (string format, params object [] args)
public bool Rebuilt {
get {
if (!completed_task.Task.IsCompleted)
- throw ErrorHelper.CreateError (99, "Internal error: Can't rebuild a task that hasn't completed. Please file a bug report with a test case (http://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, "Internal error: Can't rebuild a task that hasn't completed. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
return completed_task.Task.Result;
}
}
@@ -275,7 +275,7 @@ protected virtual Task ExecuteAsync ()
protected virtual void Execute ()
{
- throw ErrorHelper.CreateError (99, "Internal error: 'Either Execute or ExecuteAsync must be overridden'. Please file a bug report with a test case (http://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, "Internal error: 'Either Execute or ExecuteAsync must be overridden'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
public override string ToString ()
diff --git a/tools/common/CompilerFlags.cs b/tools/common/CompilerFlags.cs
index 948e6cfad8f2..1bf341fe9c8a 100644
--- a/tools/common/CompilerFlags.cs
+++ b/tools/common/CompilerFlags.cs
@@ -128,7 +128,7 @@ public void LinkWithMono ()
AddFramework (Application.GetLibMono (mode));
break;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", mode);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", mode);
}
AddOtherFlag ("-lz");
AddOtherFlag ("-liconv");
@@ -146,7 +146,7 @@ public void LinkWithXamarin ()
AddFramework (Application.GetLibXamarin (mode));
break;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", mode);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", mode);
}
AddFramework ("Foundation");
AddOtherFlag ("-lz");
diff --git a/tools/common/SdkVersions.cs.in b/tools/common/SdkVersions.cs.in
index 42f4a0df8b1e..a9095c8f076f 100644
--- a/tools/common/SdkVersions.cs.in
+++ b/tools/common/SdkVersions.cs.in
@@ -42,7 +42,7 @@ namespace Xamarin {
case ApplePlatform.WatchOS: return WatchOSVersion;
case ApplePlatform.TVOS: return TVOSVersion;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at http://bugzilla.xamarin.com with a test case.", platform, Application.ProductName);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", platform, Application.ProductName);
}
}
@@ -54,7 +54,7 @@ namespace Xamarin {
case ApplePlatform.WatchOS: return MinWatchOSVersion;
case ApplePlatform.TVOS: return MinTVOSVersion;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at http://bugzilla.xamarin.com with a test case.", platform, Application.ProductName);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", platform, Application.ProductName);
}
}
#endif
diff --git a/tools/common/StaticRegistrar.cs b/tools/common/StaticRegistrar.cs
index 366aabc5d1df..883b677e0f32 100644
--- a/tools/common/StaticRegistrar.cs
+++ b/tools/common/StaticRegistrar.cs
@@ -1282,7 +1282,7 @@ public override RegisterAttribute GetRegisterAttribute (TypeReference type)
rv = new RegisterAttribute ((string) attrib.ConstructorArguments [0].Value, (bool) attrib.ConstructorArguments [1].Value);
break;
default:
- throw ErrorHelper.CreateError (4124, "Invalid RegisterAttribute found on '{0}'. Please file a bug report at http://bugzilla.xamarin.com", type.FullName);
+ throw ErrorHelper.CreateError (4124, "Invalid RegisterAttribute found on '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", type.FullName);
}
}
@@ -1299,7 +1299,7 @@ public override RegisterAttribute GetRegisterAttribute (TypeReference type)
rv.SkipRegistration = (bool) prop.Argument.Value;
break;
default:
- throw ErrorHelper.CreateError (4124, "Invalid RegisterAttribute property {1} found on '{0}'. Please file a bug report at http://bugzilla.xamarin.com", type.FullName, prop.Name);
+ throw ErrorHelper.CreateError (4124, "Invalid RegisterAttribute property {1} found on '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", type.FullName, prop.Name);
}
}
}
@@ -1315,7 +1315,7 @@ protected override CategoryAttribute GetCategoryAttribute (TypeReference type)
return null;
if (!attrib.HasConstructorArguments)
- throw ErrorHelper.CreateError (4124, "Invalid CategoryAttribute found on '{0}'. Please file a bug report at http://bugzilla.xamarin.com", type.FullName);
+ throw ErrorHelper.CreateError (4124, "Invalid CategoryAttribute found on '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", type.FullName);
if (attrib.HasProperties) {
foreach (var prop in attrib.Properties) {
@@ -1331,7 +1331,7 @@ protected override CategoryAttribute GetCategoryAttribute (TypeReference type)
var t1 = (TypeReference) attrib.ConstructorArguments [0].Value;
return new CategoryAttribute (t1 != null ? t1.Resolve () : null) { Name = name };
default:
- throw ErrorHelper.CreateError (4124, "Invalid CategoryAttribute found on '{0}'. Please file a bug report at http://bugzilla.xamarin.com", type.FullName);
+ throw ErrorHelper.CreateError (4124, "Invalid CategoryAttribute found on '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", type.FullName);
}
}
@@ -1368,11 +1368,11 @@ public override ProtocolAttribute GetProtocolAttribute (TypeReference type)
case "FormalSince":
Version version;
if (!Version.TryParse ((string)prop.Argument.Value, out version))
- throw ErrorHelper.CreateError (4147, "Invalid {0} found on '{1}'. Please file a bug report at http://bugzilla.xamarin.com", "ProtocolAttribute", type.FullName);
+ throw ErrorHelper.CreateError (4147, "Invalid {0} found on '{1}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", "ProtocolAttribute", type.FullName);
rv.FormalSinceVersion = version;
break;
default:
- throw ErrorHelper.CreateError (4147, "Invalid {0} found on '{1}'. Please file a bug report at http://bugzilla.xamarin.com", "ProtocolAttribute", type.FullName);
+ throw ErrorHelper.CreateError (4147, "Invalid {0} found on '{1}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", "ProtocolAttribute", type.FullName);
}
}
@@ -1391,7 +1391,7 @@ public BlockProxyAttribute GetBlockProxyAttribute (ParameterDefinition parameter
rv.Type = ((TypeReference) attrib.ConstructorArguments [0].Value).Resolve ();
break;
default:
- throw ErrorHelper.CreateError (4124, "Invalid BlockProxyAttribute found on '{0}'. Please file a bug report at https://bugzilla.xamarin.com", ((MethodReference) parameter.Method)?.FullName);
+ throw ErrorHelper.CreateError (4124, "Invalid BlockProxyAttribute found on '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", ((MethodReference) parameter.Method)?.FullName);
}
return rv;
@@ -1409,7 +1409,7 @@ public DelegateProxyAttribute GetDelegateProxyAttribute (MethodDefinition method
rv.DelegateType = ((TypeReference) attrib.ConstructorArguments [0].Value).Resolve ();
break;
default:
- throw ErrorHelper.CreateError (4124, "Invalid DelegateProxyAttribute found on '{0}'. Please file a bug report at https://bugzilla.xamarin.com", ((MethodReference) method)?.FullName);
+ throw ErrorHelper.CreateError (4124, "Invalid DelegateProxyAttribute found on '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", ((MethodReference) method)?.FullName);
}
return rv;
@@ -1552,7 +1552,7 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
currentPlatform = global::ObjCRuntime.PlatformName.WatchOS;
break;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", App.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", App.Platform);
}
#else
currentPlatform = global::ObjCRuntime.PlatformName.MacOSX;
@@ -1598,7 +1598,7 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
switch (ca.ConstructorArguments.Count) {
case 2:
if (!shorthand)
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
majorVersion = (byte) ca.ConstructorArguments [0].Value;
minorVersion = (byte) ca.ConstructorArguments [1].Value;
break;
@@ -1616,13 +1616,13 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
} else if (ca.ConstructorArguments [2].Type.Name == "Byte") {
minorVersion = (byte) ca.ConstructorArguments [2].Value;
} else {
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
}
}
break;
case 4:
if (!shorthand)
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
majorVersion = (byte) ca.ConstructorArguments [0].Value;
minorVersion = (byte) ca.ConstructorArguments [1].Value;
@@ -1633,7 +1633,7 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
} else if (ca.ConstructorArguments [3].Type.Name == "PlatformArchitecture") {
architecture = (PlatformArchitecture) (byte) ca.ConstructorArguments [3].Value;
} else {
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
}
break;
case 5:
@@ -1652,7 +1652,7 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
message = (string) ca.ConstructorArguments [5].Value;
break;
default:
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at http://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
}
if (platformName != currentPlatform)
@@ -1675,7 +1675,7 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
rv = new IntroducedAttribute (platformName, majorVersion, minorVersion, subminorVersion, architecture, message);
break;
default:
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at http://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
}
}
break;
@@ -1691,7 +1691,7 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
rv = new DeprecatedAttribute (platformName, majorVersion, minorVersion, subminorVersion, architecture, message);
break;
default:
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at http://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
}
break;
case AvailabilityKind.Obsoleted:
@@ -1706,14 +1706,14 @@ void CollectAvailabilityAttributes (IEnumerable attributes, re
rv = new ObsoletedAttribute (platformName, majorVersion, minorVersion, subminorVersion, architecture, message);
break;
default:
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at http://bugzilla.xamarin.com", caType.Name, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar ({0} ctor with {1} arguments). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", caType.Name, ca.ConstructorArguments.Count);
}
break;
case AvailabilityKind.Unavailable:
rv = new UnavailableAttribute (platformName, architecture, message);
break;
default:
- throw ErrorHelper.CreateError (4163, "Internal error in the registrar (Unknown availability kind: {0}). Please file a bug report at http://bugzilla.xamarin.com", kind);
+ throw ErrorHelper.CreateError (4163, "Internal error in the registrar (Unknown availability kind: {0}). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", kind);
}
if (list == null)
@@ -1781,7 +1781,7 @@ protected override IList GetAdoptsAttributes (TypeReference typ
attrib.ProtocolType = (string) ca.ConstructorArguments [0].Value;
break;
default:
- throw ErrorHelper.CreateError (4124, "Invalid AdoptsAttribute found on '{0}': expected 1 constructor arguments, got {1}. Please file a bug report at https://bugzilla.xamarin.com", type.FullName, 1, ca.ConstructorArguments.Count);
+ throw ErrorHelper.CreateError (4124, "Invalid AdoptsAttribute found on '{0}': expected 1 constructor arguments, got {1}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", type.FullName, 1, ca.ConstructorArguments.Count);
}
rv.Add (attrib);
}
@@ -1825,7 +1825,7 @@ static BindAsAttribute CreateBindAsAttribute (ICustomAttribute attrib, IMemberDe
originalType = ((TypeReference) field.Argument.Value);
break;
default:
- throw ErrorHelper.CreateError (4124, "Invalid BindAsAttribute found on '{0}.{1}': unknown field {2}. Please file a bug report at https://bugzilla.xamarin.com", member.DeclaringType.FullName, member.Name, field.Name);
+ throw ErrorHelper.CreateError (4124, "Invalid BindAsAttribute found on '{0}.{1}': unknown field {2}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", member.DeclaringType.FullName, member.Name, field.Name);
}
}
}
@@ -1835,7 +1835,7 @@ static BindAsAttribute CreateBindAsAttribute (ICustomAttribute attrib, IMemberDe
var t1 = (TypeReference) attrib.ConstructorArguments [0].Value;
return new BindAsAttribute (t1) { OriginalType = originalType };
default:
- throw ErrorHelper.CreateError (4124, "Invalid BindAsAttribute found on '{0}.{1}'. Please file a bug report at https://bugzilla.xamarin.com", member.DeclaringType.FullName, member.Name);
+ throw ErrorHelper.CreateError (4124, "Invalid BindAsAttribute found on '{0}.{1}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", member.DeclaringType.FullName, member.Name);
}
}
@@ -1863,7 +1863,7 @@ protected override ConnectAttribute GetConnectAttribute (PropertyDefinition prop
case 0: return new ConnectAttribute ();
case 1: return new ConnectAttribute (((string) attrib.ConstructorArguments [0].Value));
default:
- throw ErrorHelper.CreateError (4124, "Invalid ConnectAttribute found on '{0}.{1}'. Please file a bug report at http://bugzilla.xamarin.com", property.DeclaringType.FullName, property.Name);
+ throw ErrorHelper.CreateError (4124, "Invalid ConnectAttribute found on '{0}.{1}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", property.DeclaringType.FullName, property.Name);
}
}
@@ -1895,7 +1895,7 @@ ExportAttribute CreateExportAttribute (IMemberDefinition candidate)
case 2:
return new ExportAttribute ((string) attribute.ConstructorArguments [0].Value, (ArgumentSemantic) attribute.ConstructorArguments [1].Value) { IsVariadic = is_variadic };
default:
- throw ErrorHelper.CreateError (4124, "Invalid ExportAttribute found on '{0}.{1}'. Please file a bug report at http://bugzilla.xamarin.com", candidate.DeclaringType.FullName, candidate.Name);
+ throw ErrorHelper.CreateError (4124, "Invalid ExportAttribute found on '{0}.{1}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", candidate.DeclaringType.FullName, candidate.Name);
}
}
@@ -2904,7 +2904,7 @@ void Specialize (AutoIndentStringBuilder sb)
fields.Write ("XamarinObject ");
break;
default:
- throw ErrorHelper.CreateError (4120, "The registrar found an unknown field type '{0}' in field '{1}.{2}'. Please file a bug report at http://bugzilla.xamarin.com",
+ throw ErrorHelper.CreateError (4120, "The registrar found an unknown field type '{0}' in field '{1}.{2}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new",
field.FieldType, field.DeclaringType.Type.FullName, field.Name);
}
fields.Write (field.Name);
@@ -2976,7 +2976,7 @@ void Specialize (AutoIndentStringBuilder sb)
exceptions.Add (ex);
} catch (Exception ex) {
skip.Add (method);
- exceptions.Add (ErrorHelper.CreateError (4114, ex, "Unexpected error in the registrar for the method '{0}.{1}' - Please file a bug report at http://bugzilla.xamarin.com", method.DeclaringType.Type.FullName, method.Method.Name));
+ exceptions.Add (ErrorHelper.CreateError (4114, ex, "Unexpected error in the registrar for the method '{0}.{1}' - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", method.DeclaringType.Type.FullName, method.Method.Name));
}
}
}
@@ -3038,7 +3038,7 @@ void Specialize (AutoIndentStringBuilder sb)
if (map_dict.TryGetValue (skipped.Actual, out var index)) {
map.AppendLine ("{{ 0x{0:X}, {1} /* '{2}' => '{3}' */ }},", skipped.SkippedTokenReference, map_dict [skipped.Actual], skipped.Skipped.FullName, skipped.Actual.Type.FullName);
} else {
- throw ErrorHelper.CreateError (99, $"Internal error: could not find the native type for {skipped.Skipped.FullName} (failed to find {skipped.Actual.Type.FullName}). Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: could not find the native type for {skipped.Skipped.FullName} (failed to find {skipped.Actual.Type.FullName}). Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
map.AppendLine ("};");
@@ -3415,7 +3415,7 @@ void Specialize (AutoIndentStringBuilder sb, ObjCMethod method, List
if (type != nativetype) {
GenerateConversionToManaged (nativetype, type, setup_call_stack, descriptiveMethodName, ref exceptions, method, $"p{i}", $"arg_ptrs [{i}]", $"mono_class_from_mono_type (xamarin_get_parameter_type (managed_method, {i}))");
if (isRef || isOut)
- throw ErrorHelper.CreateError (4163, $"Internal error in the registrar (BindAs parameters can't be ref/out: {descriptiveMethodName}). Please file a bug report at https://bugzilla.xamarin.com");
+ throw ErrorHelper.CreateError (4163, $"Internal error in the registrar (BindAs parameters can't be ref/out: {descriptiveMethodName}). Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new");
continue;
} else if (isRef) {
type = type.GetElementType ();
@@ -4344,7 +4344,7 @@ string GetManagedToNSNumberFunc (TypeReference managedType, TypeReference inputT
default:
if (IsEnum (managedType))
return GetManagedToNSNumberFunc (GetEnumUnderlyingType (managedType), inputType, outputType, descriptiveMethodName);
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
@@ -4369,7 +4369,7 @@ string GetNSNumberToManagedFunc (TypeReference managedType, TypeReference inputT
default:
if (IsEnum (managedType))
return GetNSNumberToManagedFunc (GetEnumUnderlyingType (managedType), inputType, outputType, descriptiveMethodName, out nativeType);
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
@@ -4403,7 +4403,7 @@ string GetNSValueToManagedFunc (TypeReference managedType, TypeReference inputTy
case "UIKit.UIOffset": nativeType = "UIOffset"; return "xamarin_nsvalue_to_uioffset";
case "UIKit.NSDirectionalEdgeInsets": nativeType = "NSDirectionalEdgeInsets"; return "xamarin_nsvalue_to_nsdirectionaledgeinsets";
default:
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
@@ -4437,7 +4437,7 @@ string GetManagedToNSValueFunc (TypeReference managedType, TypeReference inputTy
case "UIKit.UIOffset": return "xamarin_uioffset_to_nsvalue";
case "UIKit.NSDirectionalEdgeInsets": return "xamarin_nsdirectionaledgeinsets_to_nsvalue";
default:
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
@@ -4468,13 +4468,13 @@ void GenerateConversionToManaged (TypeReference inputType, TypeReference outputT
var isNativeArray = IsArray (nativeType);
if (isManagedArray != isNativeArray)
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
var classVariableName = $"{inputName}_conv_class";
body_setup.AppendLine ($"MonoClass *{classVariableName} = NULL;");
if (isManagedArray) {
if (isManagedNullable)
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
underlyingNativeType = GetElementType (nativeType);
underlyingManagedType = GetElementType (managedType);
sb.AppendLine ($"{classVariableName} = mono_class_get_element_class ({managedClassExpression});");
@@ -4504,13 +4504,13 @@ void GenerateConversionToManaged (TypeReference inputType, TypeReference outputT
MethodDefinition getConstantMethod, getValueMethod;
if (!IsSmartEnum (underlyingManagedType, out getConstantMethod, out getValueMethod)) {
// method linked away!? this should already be verified
- ErrorHelper.Show (ErrorHelper.CreateWarning (99, $"Internal error: the smart enum {underlyingManagedType.FullName} doesn't seem to be a smart enum after all. Please file a bug report with a test case (https://bugzilla.xamarin.com)."));
+ ErrorHelper.Show (ErrorHelper.CreateWarning (99, $"Internal error: the smart enum {underlyingManagedType.FullName} doesn't seem to be a smart enum after all. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new)."));
token = "INVALID_TOKEN_REF";
} else {
token = $"0x{CreateTokenReference (getValueMethod, TokenType.Method):X} /* {getValueMethod.FullName} */";
}
} else {
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
if (isManagedArray) {
sb.AppendLine ($"xamarin_id_to_managed_func {inputName}_conv_func = (xamarin_id_to_managed_func) {func};");
@@ -4555,13 +4555,13 @@ void GenerateConversionToNative (TypeReference inputType, TypeReference outputTy
var isNativeArray = IsArray (nativeType);
if (isManagedArray != isNativeArray)
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
var classVariableName = $"{inputName}_conv_class";
body_setup.AppendLine ($"MonoClass *{classVariableName} = NULL;");
if (isManagedArray) {
if (isManagedNullable)
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
underlyingNativeType = GetElementType (nativeType);
underlyingManagedType = GetElementType (managedType);
sb.AppendLine ($"{classVariableName} = mono_class_get_element_class ({managedClassExpression});");
@@ -4590,13 +4590,13 @@ void GenerateConversionToNative (TypeReference inputType, TypeReference outputTy
MethodDefinition getConstantMethod, getValueMethod;
if (!IsSmartEnum (underlyingManagedType, out getConstantMethod, out getValueMethod)) {
// method linked away!? this should already be verified
- ErrorHelper.Show (ErrorHelper.CreateWarning (99, $"Internal error: the smart enum {underlyingManagedType.FullName} doesn't seem to be a smart enum after all. Please file a bug report with a test case (https://bugzilla.xamarin.com)."));
+ ErrorHelper.Show (ErrorHelper.CreateWarning (99, $"Internal error: the smart enum {underlyingManagedType.FullName} doesn't seem to be a smart enum after all. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new)."));
token = "INVALID_TOKEN_REF";
} else {
token = $"0x{CreateTokenReference (getConstantMethod, TokenType.Method):X} /* {getConstantMethod.FullName} */";
}
} else {
- throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: can't convert from '{inputType.FullName}' to '{outputType.FullName}' in {descriptiveMethodName}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
if (isManagedArray) {
@@ -4833,7 +4833,7 @@ public void GenerateSingleAssembly (IEnumerable assemblies,
public void Generate (IEnumerable assemblies, string header_path, string source_path)
{
if (Target?.CachedLink == true)
- throw ErrorHelper.CreateError (99, "Internal error: the static registrar should not execute unless the linker also executed (or was disabled). A potential workaround is to pass '-f' as an additional " + Driver.NAME + " argument to force a full build. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, "Internal error: the static registrar should not execute unless the linker also executed (or was disabled). A potential workaround is to pass '-f' as an additional " + Driver.NAME + " argument to force a full build. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
this.input_assemblies = assemblies;
diff --git a/tools/common/Symbols.cs b/tools/common/Symbols.cs
index 9fb54b4ba055..64299ca12c94 100644
--- a/tools/common/Symbols.cs
+++ b/tools/common/Symbols.cs
@@ -36,7 +36,7 @@ public string Name {
var prefix = Driver.SupportsModernObjectiveC ? "OBJC_CLASS_$_" : ".objc_class_name_";
return prefix + ObjectiveCName;
}
- throw ErrorHelper.CreateError (99, $"Internal error: symbol without a name (type: {Type}). Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: symbol without a name (type: {Type}). Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
set {
name = value;
@@ -165,7 +165,7 @@ public void Load (string filename, Target target)
var asm = line.Substring (1);
Assembly assembly;
if (!target.Assemblies.TryGetValue (Assembly.GetIdentity (asm), out assembly))
- throw ErrorHelper.CreateError (99, $"Internal error: serialized assembly {asm} for symbol {current.Name}, but no such assembly loaded. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: serialized assembly {asm} for symbol {current.Name}, but no such assembly loaded. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
current.AddAssembly (assembly.AssemblyDefinition);
} else {
var eq = line.IndexOf ('=');
diff --git a/tools/common/Target.cs b/tools/common/Target.cs
index adaf3a948a06..976ea464c0a2 100644
--- a/tools/common/Target.cs
+++ b/tools/common/Target.cs
@@ -148,7 +148,7 @@ public void GatherFrameworks ()
}
if (asm == null)
- throw ErrorHelper.CreateError (99, $"Internal error: could not find the product assembly {Driver.GetProductAssembly (App)} in the list of assemblies referenced by the executable. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: could not find the product assembly {Driver.GetProductAssembly (App)} in the list of assemblies referenced by the executable. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
AssemblyDefinition productAssembly = asm.AssemblyDefinition;
@@ -347,7 +347,7 @@ bool IsRequiredSymbol (Symbol symbol, Assembly single_assembly = null)
return true;
return App.Registrar != RegistrarMode.Static;
default:
- throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol type {symbol.Type} for symbol {symbol.Name}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol type {symbol.Type} for symbol {symbol.Name}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
@@ -391,7 +391,7 @@ internal string GenerateReferencingSource (string reference_m, IEnumerable "$OUTPUT_DIR/generator-diff/generator.diff" || true
diff --git a/tools/install-source/Program.cs b/tools/install-source/Program.cs
index 1e48a34702ce..f3a41ff90e9e 100644
--- a/tools/install-source/Program.cs
+++ b/tools/install-source/Program.cs
@@ -223,7 +223,8 @@ public static int Main (string[] arguments)
var targetDir = Path.GetDirectoryName (target);
if (String.IsNullOrEmpty (targetDir)) {
- Console.WriteLine ($"Got empty dir for {target}");
+ if (verbose)
+ Console.WriteLine ($"Got empty dir for {target}");
continue;
}
diff --git a/tools/linker/CoreOptimizeGeneratedCode.cs b/tools/linker/CoreOptimizeGeneratedCode.cs
index 610559616e88..91fff81d16c7 100644
--- a/tools/linker/CoreOptimizeGeneratedCode.cs
+++ b/tools/linker/CoreOptimizeGeneratedCode.cs
@@ -949,7 +949,7 @@ MethodReference GetBlockSetupImpl (MethodDefinition caller, Instruction ins)
break;
}
if (setupblock_def == null)
- throw ErrorHelper.CreateError (Options.Application, 99, caller, ins, $"Internal error: could not find the method {Namespaces.ObjCRuntime}.BlockLiteral.SetupBlockImpl. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (Options.Application, 99, caller, ins, $"Internal error: could not find the method {Namespaces.ObjCRuntime}.BlockLiteral.SetupBlockImpl. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
return caller.Module.ImportReference (setupblock_def);
}
@@ -972,4 +972,4 @@ MethodReference InflateMethod (TypeReference inflatedDeclaringType, MethodDefini
return mr;
}
}
-}
\ No newline at end of file
+}
diff --git a/tools/linker/MonoTouch.Tuner/MonoTouchSweepStep.cs b/tools/linker/MonoTouch.Tuner/MonoTouchSweepStep.cs
index 3caad66ebc68..e9c4148ab07b 100644
--- a/tools/linker/MonoTouch.Tuner/MonoTouchSweepStep.cs
+++ b/tools/linker/MonoTouch.Tuner/MonoTouchSweepStep.cs
@@ -35,9 +35,9 @@ void SweepAttributes (IList attributes)
// validating the public key and the public key token would be time consuming
// worse case (no match) is that we keep the attribute while it's not needed
var fqn = (ca.ConstructorArguments [0].Value as string);
- int pk = fqn.IndexOf (", PublicKey=", StringComparison.OrdinalIgnoreCase);
- if (pk != -1)
- fqn = fqn.Substring (0, pk);
+ int comma = fqn.IndexOf (',');
+ if (comma != -1)
+ fqn = fqn.Substring (0, comma);
bool need_ivt = false;
foreach (var assembly in Context.GetAssemblies ()) {
diff --git a/tools/linker/MonoTouch.Tuner/PreserveSmartEnumConversionsSubStep.cs b/tools/linker/MonoTouch.Tuner/PreserveSmartEnumConversionsSubStep.cs
index 37b5b24facde..760c9428f0b0 100644
--- a/tools/linker/MonoTouch.Tuner/PreserveSmartEnumConversionsSubStep.cs
+++ b/tools/linker/MonoTouch.Tuner/PreserveSmartEnumConversionsSubStep.cs
@@ -63,14 +63,14 @@ void ProcessAttributeProvider (ICustomAttributeProvider provider, MethodDefiniti
continue;
if (ca.ConstructorArguments.Count != 1) {
- ErrorHelper.Show (ErrorHelper.CreateWarning (LinkContext.Target.App, 4124, provider, "Invalid BindAsAttribute found on '{0}': should have 1 constructor arguments, found {1}. Please file a bug report at https://bugzilla.xamarin.com", provider.AsString (), ca.ConstructorArguments.Count));
+ ErrorHelper.Show (ErrorHelper.CreateWarning (LinkContext.Target.App, 4124, provider, "Invalid BindAsAttribute found on '{0}': should have 1 constructor arguments, found {1}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", provider.AsString (), ca.ConstructorArguments.Count));
continue;
}
var managedType = ca.ConstructorArguments [0].Value as TypeReference;
var managedEnumType = managedType?.GetElementType ().Resolve ();
if (managedEnumType == null) {
- ErrorHelper.Show (ErrorHelper.CreateWarning (LinkContext.Target.App, 4124, provider, "Invalid BindAsAttribute found on '{0}': could not find the underlying enum type of {1}. Please file a bug report at https://bugzilla.xamarin.com", provider.AsString (), managedType?.FullName));
+ ErrorHelper.Show (ErrorHelper.CreateWarning (LinkContext.Target.App, 4124, provider, "Invalid BindAsAttribute found on '{0}': could not find the underlying enum type of {1}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", provider.AsString (), managedType?.FullName));
continue;
}
diff --git a/tools/mmp/Application.cs b/tools/mmp/Application.cs
index 9fa543e8d6a0..97483627f526 100644
--- a/tools/mmp/Application.cs
+++ b/tools/mmp/Application.cs
@@ -4,7 +4,7 @@ namespace Xamarin.Bundler {
public partial class Application
{
public const string ProductName = "Xamarin.Mac";
- public const string Error91LinkerSuggestion = "use the dynamic registrar or set the managed linker behaviour to Link Platform or Link Framework SDKs Only";
+ public const string Error91LinkerSuggestion = "use the dynamic registrar or set the managed linker behaviour to Link Platform or Link Framework SDKs Only in your project's Mac Build Options > Linker Behavior";
public bool Is32Build => !Driver.Is64Bit;
public bool Is64Build => Driver.Is64Bit;
diff --git a/tools/mmp/aot.cs b/tools/mmp/aot.cs
index 02498fe49cd1..4f1a1f22f20e 100644
--- a/tools/mmp/aot.cs
+++ b/tools/mmp/aot.cs
@@ -202,7 +202,7 @@ public void Compile (string path)
public void Compile (IFileEnumerator files)
{
if (!options.IsAOT)
- throw ErrorHelper.CreateError (0099, "Internal error \"AOTBundle with aot: {0}\" Please file a bug report with a test case (http://bugzilla.xamarin.com).", options.CompilationType);
+ throw ErrorHelper.CreateError (0099, "Internal error \"AOTBundle with aot: {0}\" Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", options.CompilationType);
var monoEnv = new string [] {"MONO_PATH", files.RootDir };
@@ -276,7 +276,7 @@ List GetFilesToAOT (IFileEnumerator files)
case AOTCompilationType.Explicit:
break; // In explicit, only included includedAssemblies included
default:
- throw ErrorHelper.CreateError (0099, "Internal error \"GetFilesToAOT with aot: {0}\" Please file a bug report with a test case (http://bugzilla.xamarin.com).", options.CompilationType);
+ throw ErrorHelper.CreateError (0099, "Internal error \"GetFilesToAOT with aot: {0}\" Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", options.CompilationType);
}
}
@@ -307,7 +307,7 @@ string MonoPath
case AOTCompilerType.System32:
return "/Library/Frameworks/Mono.framework/Commands/mono32";
default:
- throw ErrorHelper.CreateError (0099, "Internal error \"MonoPath with compilerType: {0}\" Please file a bug report with a test case (http://bugzilla.xamarin.com).", compilerType);
+ throw ErrorHelper.CreateError (0099, "Internal error \"MonoPath with compilerType: {0}\" Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", compilerType);
}
}
}
diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs
index 3c5e5252e328..f5b54509183e 100644
--- a/tools/mmp/driver.cs
+++ b/tools/mmp/driver.cs
@@ -447,6 +447,9 @@ static void Main2 (string [] args)
if (IsClassic && App.LinkMode == LinkMode.Platform)
throw new MonoMacException (2109, true, "Xamarin.Mac Classic API does not support Platform Linking.");
+ if (Registrar == RegistrarMode.PartialStatic && App.LinkMode != LinkMode.None)
+ throw new MonoMacException (2110, true, "Xamarin.Mac 'Partial Static' registrar does not support linking. Disable linking or use another registrar mode.");
+
// sanity check as this should never happen: we start out by not setting any
// Unified/Classic properties, and only IsUnifiedMobile if we are are on the
// XM framework. If we are not, we set IsUnifiedFull to true iff we detect
@@ -846,7 +849,7 @@ static void Pack (IList unprocessed)
if (ret == 69)
throw new MonoMacException (5308, true, "Xcode license agreement may not have been accepted. Please launch Xcode.");
// if not then the compilation really failed
- throw new MonoMacException (5103, true, String.Format ("Failed to compile. Error code - {0}. Please file a bug report at http://bugzilla.xamarin.com", ret));
+ throw new MonoMacException (5103, true, String.Format ("Failed to compile. Error code - {0}. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", ret));
}
if (frameworks_copied_to_bundle_dir) {
int install_ret = XcodeRun ("install_name_tool", string.Format ("{0} -add_rpath @loader_path/../Frameworks", StringUtils.Quote (AppPath)));
@@ -869,7 +872,7 @@ static void Pack (IList unprocessed)
else if (IsUnifiedFullSystemFramework)
compilerType = Is64Bit ? AOTCompilerType.System64 : AOTCompilerType.System32;
else
- throw ErrorHelper.CreateError (0099, "Internal error \"AOT with unexpected profile.\" Please file a bug report with a test case (http://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (0099, "Internal error \"AOT with unexpected profile.\" Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
AOTCompiler compiler = new AOTCompiler (aotOptions, compilerType, IsUnifiedMobile, !EnableDebug);
compiler.Compile (mmp_dir);
@@ -1336,7 +1339,7 @@ static int Compile ()
args.Append ("-u ").Append (StringUtils.Quote (symbol.Prefix + symbol.Name)).Append (' ');
break;
default:
- throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol mode: {App.SymbolMode}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol mode: {App.SymbolMode}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
bool linkWithRequiresForceLoad = BuildTarget.Assemblies.Any (x => x.ForceLoad);
@@ -1398,7 +1401,7 @@ static int Compile ()
ret = XcodeRun ("clang", args.ToString (), null);
} catch (Win32Exception e) {
- throw new MonoMacException (5103, true, e, "Failed to compile the file '{0}'. Please file a bug report at http://bugzilla.xamarin.com", "driver");
+ throw new MonoMacException (5103, true, e, "Failed to compile the file '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", "driver");
}
return ret;
diff --git a/tools/mtouch/Application.cs b/tools/mtouch/Application.cs
index ed2affb16eba..413fb0354423 100644
--- a/tools/mtouch/Application.cs
+++ b/tools/mtouch/Application.cs
@@ -64,7 +64,7 @@ public enum DlsymOptions
public partial class Application
{
public const string ProductName = "Xamarin.iOS";
- public const string Error91LinkerSuggestion = "set the managed linker behaviour to Link Framework SDKs Only";
+ public const string Error91LinkerSuggestion = "set the managed linker behaviour to Link Framework SDKs Only in your project's iOS Build Options > Linker Behavior";
public string ExecutableName;
public BuildTarget BuildTarget;
@@ -512,7 +512,7 @@ public bool UseDlsym (string assembly)
case ApplePlatform.WatchOS:
return false;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", Platform);
}
}
@@ -659,7 +659,7 @@ public void SetDefaultAbi ()
throw ErrorHelper.CreateError (76, "No architecture specified (using the --abi argument). An architecture is required for {0} projects.", "Xamarin.TVOS");
break;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", Platform);
}
}
@@ -704,7 +704,7 @@ public void ValidateAbi ()
}
break;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", Platform);
}
foreach (var abi in abis) {
@@ -1360,7 +1360,7 @@ void Initialize ()
// All versions of tvOS support extensions
break;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", Platform);
}
}
@@ -1640,7 +1640,7 @@ void BuildBundle ()
continue; // Don't copy frameworks to app extensions (except watch extensions), they go into the container app.
if (!files.All ((v) => Directory.Exists (v) == isFramework))
- throw ErrorHelper.CreateError (99, $"Internal error: 'can't process a mix of dylibs and frameworks: {string.Join (", ", files)}'. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: 'can't process a mix of dylibs and frameworks: {string.Join (", ", files)}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
if (isFramework) {
// This is a framework
@@ -1664,7 +1664,7 @@ void BuildBundle ()
throw new AggregateException (exceptions);
}
if (info.DylibToFramework)
- throw ErrorHelper.CreateError (99, $"Internal error: 'can't convert frameworks to frameworks: {files.First ()}'. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: 'can't convert frameworks to frameworks: {files.First ()}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
var framework_src = files.First ();
var framework_filename = Path.Combine (framework_src, Path.GetFileNameWithoutExtension (framework_src));
if (!MachO.IsDynamicFramework (framework_filename)) {
@@ -1818,7 +1818,7 @@ public string GetLibMono (AssemblyBuildTarget build_target)
case AssemblyBuildTarget.Framework:
return Path.Combine (Driver.GetProductSdkDirectory (this), "Frameworks", "Mono.framework");
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", build_target);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", build_target);
}
}
@@ -1832,7 +1832,7 @@ public string GetLibXamarin (AssemblyBuildTarget build_target)
case AssemblyBuildTarget.Framework:
return Path.Combine (Driver.GetProductSdkDirectory (this), "Frameworks", EnableDebug ? "Xamarin-debug.framework" : "Xamarin.framework");
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", build_target);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", build_target);
}
}
@@ -2185,7 +2185,7 @@ public void BundleAssemblies ()
var codeShared = assemblies.Count ((v) => v.IsCodeShared || v.BundleInContainerApp);
if (codeShared > 0) {
if (codeShared != assemblies.Length)
- throw ErrorHelper.CreateError (99, $"Internal error: all assemblies in a joined build target must have the same code sharing options ({string.Join (", ", assemblies.Select ((v) => v.Identity + "=" + v.IsCodeShared))}). Please file a bug report with a test case (http://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: all assemblies in a joined build target must have the same code sharing options ({string.Join (", ", assemblies.Select ((v) => v.Identity + "=" + v.IsCodeShared))}). Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
continue; // These resources will be found in the main app.
}
@@ -2222,7 +2222,7 @@ public void BundleAssemblies ()
asm.CopyAotDataFilesToDirectory (size_specific ? Path.Combine (resource_directory, Path.GetFileName (asm.Target.AppTargetDirectory)) : resource_directory);
break;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", build_target);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", build_target);
}
}
}
@@ -2309,7 +2309,7 @@ public void CreateFrameworkInfoPList (string output_path, string framework_name,
sb.AppendLine (" 4");
break;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", Platform);
}
sb.AppendLine (" ");
diff --git a/tools/mtouch/BuildTasks.mtouch.cs b/tools/mtouch/BuildTasks.mtouch.cs
index 965c6f9c503b..6a4676b92684 100644
--- a/tools/mtouch/BuildTasks.mtouch.cs
+++ b/tools/mtouch/BuildTasks.mtouch.cs
@@ -117,7 +117,7 @@ class CompileMainTask : CompileTask
{
protected override void CompilationFailed (int exitCode)
{
- throw ErrorHelper.CreateError (5103, "Failed to compile the file(s) '{0}'. Please file a bug report at http://bugzilla.xamarin.com", string.Join ("', '", CompilerFlags.SourceFiles.ToArray ()));
+ throw ErrorHelper.CreateError (5103, "Failed to compile the file(s) '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", string.Join ("', '", CompilerFlags.SourceFiles.ToArray ()));
}
}
@@ -125,7 +125,7 @@ class PinvokesTask : CompileTask
{
protected override void CompilationFailed (int exitCode)
{
- throw ErrorHelper.CreateError (4002, "Failed to compile the generated code for P/Invoke methods. Please file a bug report at http://bugzilla.xamarin.com");
+ throw ErrorHelper.CreateError (4002, "Failed to compile the generated code for P/Invoke methods. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new");
}
}
@@ -169,7 +169,7 @@ public override IEnumerable Inputs {
protected override void CompilationFailed (int exitCode)
{
- throw ErrorHelper.CreateError (4109, "Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com");
+ throw ErrorHelper.CreateError (4109, "Failed to compile the generated registrar code. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new");
}
}
@@ -359,7 +359,7 @@ protected override async Task ExecuteAsync ()
protected override void CompilationFailed (int exitCode)
{
- throw ErrorHelper.CreateError (5216, "Native linking failed for '{0}'. Please file a bug report at http://bugzilla.xamarin.com", OutputFile);
+ throw ErrorHelper.CreateError (5216, "Native linking failed for '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", OutputFile);
}
}
@@ -514,7 +514,7 @@ protected override async Task ExecuteAsync ()
protected virtual void CompilationFailed (int exitCode)
{
- throw ErrorHelper.CreateError (5106, "Could not compile the file(s) '{0}'. Please file a bug report at http://bugzilla.xamarin.com", string.Join ("', '", CompilerFlags.SourceFiles.ToArray ()));
+ throw ErrorHelper.CreateError (5106, "Could not compile the file(s) '{0}'. Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new", string.Join ("', '", CompilerFlags.SourceFiles.ToArray ()));
}
protected async Task CompileAsync ()
diff --git a/tools/mtouch/Target.cs b/tools/mtouch/Target.cs
index 66637f0b896f..b75576201a23 100644
--- a/tools/mtouch/Target.cs
+++ b/tools/mtouch/Target.cs
@@ -120,7 +120,7 @@ List GetArchitectures (AssemblyBuildTarget build_target)
case AssemblyBuildTarget.Framework:
return AllArchitectures;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", build_target);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", build_target);
}
}
@@ -141,7 +141,7 @@ public void AddToBundle (string source, string bundle_path = null, bool dylib_to
BundleFiles [bundle_path] = info = new BundleFileInfo () { DylibToFramework = dylib_to_framework_conversion };
if (info.DylibToFramework != dylib_to_framework_conversion)
- throw ErrorHelper.CreateError (99, "Internal error: 'invalid value for framework conversion'. Please file a bug report with a test case (http://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, "Internal error: 'invalid value for framework conversion'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
info.Sources.Add (source);
}
@@ -163,7 +163,7 @@ void LinkWithBuildTarget (AssemblyBuildTarget build_target, string name, Compile
LinkWithTaskOutput (link_task);
break;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", build_target);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", build_target);
}
}
@@ -695,7 +695,7 @@ public void ManagedLink ()
// Verify that we don't get multiple identical assemblies from the linker.
foreach (var group in output_assemblies.GroupBy ((v) => v.Name.Name)) {
if (group.Count () != 1)
- throw ErrorHelper.CreateError (99, "Internal error {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).",
+ throw ErrorHelper.CreateError (99, "Internal error {0}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).",
$"The linker output contains more than one assemblies named '{group.Key}':\n\t{string.Join ("\n\t", group.Select ((v) => v.MainModule.FileName).ToArray ())}");
}
@@ -727,7 +727,7 @@ public void ManagedLink ()
var ad = output_assemblies.SingleOrDefault ((AssemblyDefinition v) => v.Name.Name == next);
if (ad == null)
- throw ErrorHelper.CreateError (99, "Internal error {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).", $"The assembly {next} was referenced by another assembly, but at the same time linked out by the linker.");
+ throw ErrorHelper.CreateError (99, "Internal error {0}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", $"The assembly {next} was referenced by another assembly, but at the same time linked out by the linker.");
if (ad.MainModule.HasAssemblyReferences) {
foreach (var ar in ad.MainModule.AssemblyReferences) {
if (!collectedNames.Contains (ar.Name) && !queue.Contains (ar.Name))
@@ -935,7 +935,7 @@ public void CompilePInvokeWrappers ()
App.CreateFrameworkInfoPList (plist_path, fw_name, App.BundleId + ".frameworks." + fw_name, fw_name);
break;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", mode);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", mode);
}
var pinvoke_task = new PinvokesTask
@@ -1007,9 +1007,9 @@ void AOTCompile ()
var existingLinkTask = infos.Where ((v) => v.LinkTask != null).Select ((v) => v.LinkTask).ToList ();
if (existingLinkTask.Count > 0) {
if (existingLinkTask.Count != infos.Count)
- throw ErrorHelper.CreateError (99, "Internal error: {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).", $"Not all assemblies for {name} have link tasks");
+ throw ErrorHelper.CreateError (99, "Internal error: {0}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", $"Not all assemblies for {name} have link tasks");
if (!existingLinkTask.All ((v) => v == existingLinkTask [0]))
- throw ErrorHelper.CreateError (99, "Internal error: {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).", $"Link tasks for {name} aren't all the same");
+ throw ErrorHelper.CreateError (99, "Internal error: {0}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", $"Link tasks for {name} aren't all the same");
LinkWithBuildTarget (build_target, name, existingLinkTask [0], assemblies);
continue;
@@ -1071,7 +1071,7 @@ void AOTCompile ()
compiler_output = Path.Combine (App.Cache.Location, arch, name);
break;
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", build_target);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", build_target);
}
CompileTask pinvoke_task;
@@ -1105,7 +1105,7 @@ void AOTCompile ()
compiler_flags.ReferenceSymbols (symbols);
break;
default:
- throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol mode: {App.SymbolMode}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol mode: {App.SymbolMode}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
}
}
@@ -1337,7 +1337,7 @@ public void Compile ()
library = "Xamarin.TVOS.registrar.a";
break;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", App.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", App.Platform);
}
var lib = Path.Combine (Driver.GetProductSdkDirectory (App), "usr", "lib", library);
@@ -1471,7 +1471,7 @@ public void NativeLink (BuildTasks build_tasks)
linker_flags.ReferenceSymbols (GetRequiredSymbols ());
break;
default:
- throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol mode: {App.SymbolMode}. Please file a bug report with a test case (https://bugzilla.xamarin.com).");
+ throw ErrorHelper.CreateError (99, $"Internal error: invalid symbol mode: {App.SymbolMode}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).");
}
var libdir = Path.Combine (Driver.GetProductSdkDirectory (App), "usr", "lib");
@@ -1509,7 +1509,7 @@ public void NativeLink (BuildTasks build_tasks)
break;
case AssemblyBuildTarget.Framework: // We don't ship the profiler as a framework, so this should be impossible.
default:
- throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", App.LibProfilerLinkMode);
+ throw ErrorHelper.CreateError (100, "Invalid assembly build target: '{0}'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", App.LibProfilerLinkMode);
}
}
diff --git a/tools/mtouch/mtouch.cs b/tools/mtouch/mtouch.cs
index aab4390f0192..12790a34dbb8 100644
--- a/tools/mtouch/mtouch.cs
+++ b/tools/mtouch/mtouch.cs
@@ -180,7 +180,7 @@ public static string GetPlatform (Application app)
case ApplePlatform.TVOS:
return app.IsDeviceBuild ? "AppleTVOS" : "AppleTVSimulator";
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -228,7 +228,7 @@ public static string GetPlatformFrameworkDirectory (Application app)
case ApplePlatform.TVOS:
return Path.Combine (MonoTouchDirectory, "lib", "mono", "Xamarin.TVOS");
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -238,7 +238,7 @@ public static string GetArch32Directory (Application app)
case ApplePlatform.iOS:
return Path.Combine (GetPlatformFrameworkDirectory (app), "..", "..", "32bits");
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -248,7 +248,7 @@ public static string GetArch64Directory (Application app)
case ApplePlatform.iOS:
return Path.Combine (GetPlatformFrameworkDirectory (app), "..", "..", "64bits");
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -262,7 +262,7 @@ public static string GetProductSdkDirectory (Application app)
case ApplePlatform.TVOS:
return Path.Combine (MonoTouchDirectory, "SDKs", app.IsDeviceBuild ? "Xamarin.AppleTVOS.sdk" : "Xamarin.AppleTVSimulator.sdk");
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -282,7 +282,7 @@ public static string GetTargetMinSdkName (Application app)
case ApplePlatform.TVOS:
return app.IsDeviceBuild ? "tvos" : "tvos-simulator";
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -296,7 +296,7 @@ public static string GetProductAssembly (Application app)
case ApplePlatform.TVOS:
return "Xamarin.TVOS";
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -311,7 +311,7 @@ public static bool GetLLVMAsmWriter (Application app)
case ApplePlatform.WatchOS:
return true;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -443,7 +443,7 @@ public static string GetAotCompiler (Application app, bool is64bits)
case ApplePlatform.TVOS:
return Path.Combine (cross_prefix, "bin", "arm64-darwin-mono-sgen");
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}
@@ -1412,13 +1412,13 @@ static int Main2 (string[] args)
ext.ContainerApp = app;
app.AppExtensions.Add (ext);
if (app_action != Action.Build)
- throw ErrorHelper.CreateError (99, "Internal error: Extension build action is '{0}' when it should be 'Build'. Please file a bug report with a test case (http://bugzilla.xamarin.com).", app_action);
+ throw ErrorHelper.CreateError (99, "Internal error: Extension build action is '{0}' when it should be 'Build'. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", app_action);
}
app.BuildAll ();
}
} else {
- throw ErrorHelper.CreateError (99, "Internal error: Invalid action: {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).", action);
+ throw ErrorHelper.CreateError (99, "Internal error: Invalid action: {0}. Please file a bug report with a test case (https://github.com/xamarin/xamarin-macios/issues/new).", action);
}
return 0;
@@ -1690,7 +1690,7 @@ public static Frameworks GetFrameworks (Application app)
case ApplePlatform.TVOS:
return Frameworks.TVOSFrameworks;
default:
- throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", app.Platform);
+ throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform);
}
}