Граф коммитов

1735 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot f471f9b591
[security] Update for beta 5 (only) change (#4600) 2018-08-09 10:12:07 -04:00
Sebastien Pouliot 0b7265193a
[coreservices] Update up to beta 5 (#4590)
Also avoid creating NSString instances for hidden constants where
only the handle is every used.
2018-08-08 12:38:03 -04:00
Manuel de la Pena 7c7f46da28
[iTunesLibrary] Xcode 10 beta 3 support. (#4462) 2018-08-08 16:34:16 +02:00
Miguel de Icaza 8960cc0022
Merge pull request #4251 from migueldeicaza/xcode10-network
[Network, Security] Bindings for Network, Security, DispatchIO and some classes needed to port samples
2018-08-08 09:55:06 -04:00
Manuel de la Pena f4cd485b38 [ImageIO] Add support for Xcode 10 beta 5. (#4587) 2018-08-07 21:06:40 -04:00
Sebastien Pouliot 805c65ac98
[coreanimation] Add new API up to b5 (#4571)
Also a small generator change to allow `CGColorSpace` use inside
strong dictionaries.
2018-08-07 13:49:30 -04:00
Sebastien Pouliot 7e770663d9
[audiotoolbox][tvos] Remove AudioFileReadPackets symbol (#4570)
The public API was removed a long time ago (with XAMCORE_2_0) but
the p/invoke was still present in the platform assemblies.

Since tvOS requires bitcode this can cause a problem when linking
natively since a direct call won't be possible. That would only
happen if the symbol is removed (from the binary, not just the
headers) and if the managed linker is not enabled (otherwise it
will always be removed).
2018-08-04 00:24:54 -04:00
Manuel de la Pena 3613803471 [CoreMedia] Add Xcode 10 beta 5 support. (#4567) 2018-08-04 00:24:24 -04:00
Chris Hamons 7669300fcb Fix appkit warning (#4573) 2018-08-04 00:22:07 -04:00
Manuel de la Pena b47305ede2 [CoreImage] Add Xcode 10 beta 5 support. (#4564) 2018-08-03 17:06:45 -04:00
Rolf Bjarne Kvinge 16f8032616 Merge remote-tracking branch 'origin/xcode10' into xcode10-network 2018-08-03 10:32:10 +02:00
Rolf Bjarne Kvinge c77f191064 [CoreGraphics] Add missing API added in Xcode 10 beta 1. (#4547)
* [CoreGraphics] Add CGPDFArray.Get* overloads that take a nint index, since the CGPDFArray.Count property returns nint.

This makes the following code work:

    for (var i = 0; i < array.Count; i++)
    	array.GetInt (i, ...)

* Don't add [MonoPInvokeCallback] to Mac code.

* [CoreGraphics] Rename CGPDFArray.ApplyBlockCallback to ApplyCallback.

Since the fact that the method is implemented using a block is not relevant
for managed code.

This also makes the method named like an equivalent method in CGPDFDictionary.

* [CoreGraphics] Change CGPDFArray.Apply to take an 'object' as the info parameter instead of IntPtr.

This makes it nicer for managed code.

* [CoreGraphics] CGPDFArray.Apply: resolve the iterated object to the actual CGPDFObject type.

* [CoreGraphics] Add an CGPDFDictionary.Apply overload that resolves the iterated object to the actual CGPDFObject type.

This method was previously only available in Classic, so I just reintroduced
it with a few changes to make the API nicer (which isn't a breaking change
since we're not building Classic anymore).

* [tests] Add test for CGPDF types.

* [tests] Don't run the new tests unless the SDK was part of Xcode 10
2018-08-02 20:30:41 -04:00
Manuel de la Pena ab64222d5b [AudioToolbox] Add Xcode 10 beta 5 support. (#4559) 2018-08-02 20:29:15 -04:00
Miguel de Icaza 0c7f9248cd [Network, Security] Feedback, plus build warnings 2018-08-02 17:38:51 -04:00
Chris Hamons abcce7c2b9 Add missing AppKit Xcode 10 bindings (#4546) 2018-08-02 16:32:30 -04:00
Manuel de la Pena bf3d722360 [UIKit] Add support for Xcode 10 beta 5. (#4556) 2018-08-02 16:31:35 -04:00
Manuel de la Pena a2bfd0b633 [AVFoundation] Add support for Xcode 10 beta5. (#4554) 2018-08-02 16:15:16 -04:00
Chris Hamons 9e3c69a7f5
Add soft deprecations from Foundation beta 5 on macOS (#4548) 2018-08-02 11:06:28 -05:00
Sebastien Pouliot 66a4a0fd79
[iad] Update for beta 5 (#4544)
Apple removed `MPMoviePlayerController_iAdPreroll.h` in beta 5.

The deprecation existed, but indirectly, on `MPMoviePlayerController`,
the type on which the category is based. IOW it's became obsoleted so
we're adding the attributes to match this.
2018-08-02 10:13:15 -04:00
Sebastien Pouliot 1c2c655bb8
[coremidi] Update to beta 5 (#4550)
Be more explicit (and match headers) about API availability - even
if it does not change what we expose.
2018-08-02 09:15:09 -04:00
Rolf Bjarne Kvinge bbfb76135a Put availability attributes on the type instead of each member when it's the same for all members. 2018-08-02 10:09:53 +02:00
Chris Hamons e77560fff3
Xcode 10 Beta 5 AppKit (#4539)
- Mark NSBindingSelectionMarker as 10.14+ and note in XAMCORE_4_0 future usages
2018-08-01 12:31:20 -05:00
Miguel de Icaza eee94b4620 [Network, ObjCRuntime] Bring back the helper for future simple uses of the block API 2018-08-01 12:20:56 -04:00
Rolf Bjarne Kvinge 21eb1037dc Add trailing slash to make future diffs nicer. 2018-08-01 17:22:48 +02:00
Rolf Bjarne Kvinge f54aa3b84b Remove unused file. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge b5a8124684 Move Blocks.SimpleCall into NWConnection.Batch.
It's not worth it to have a helper function (Blocks.SimpleCall) for a single
API (NWConnection.Batch( that will never be widely used, when the cost is a
static field and the corresponding eternal memory usage for every app that
uses blocks at least once (which is pretty much every app).
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge c10a3d5742 Use 'ref BlockLiteral' in P/Invokes instead of unsafe code whenever we don't need to pass null blocks.
This makes it possible to avoid a lot of unsafe code, and additionally it
simplifies the block code greatly.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge def474d3ac Don't leak blocks if GetCheckedHandle throws. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge b539083d6d Fix typo. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 1091ff9dcc Don't dispose the same object twice. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge ab8b84c43e Make NativeObject.handle a private field.
* This is how it's defined in the RFC (#3582).
* It forces us to call InitializeHandle (or use the property setter, which
  does the same thing), which makes it impossible to create broken types
  (instantiating C# wrapper objects successfully, but with a null handle)
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 302c880d1e Avoid repeated null checks when the variable has been null-checked earlier in the method. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 4d7a166c41 Avoid double 'as'. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 06e4426e1c Use INativeObject.GetHandle in a few places to simplify code.
Since INativeObject.GetHandle is an extension method that can detect a null
'this' value and returns IntPtr.Zero.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge a6efd56402 Rename NativeObject.GetHandle to NativeObject.GetCheckedHandle.
Two reasons:

* NativeObject.GetHandle looks too much like the existing
  INativeObject.GetHandle, which has a different behavior.
* It's not clear from the name that it can easily throw exceptions. This
  becomes particularly important with resource management (ensuring we don't
  leak stuff if calling the method happens to throw an exception).
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge df11c128bb Simplify the block creation pattern.
This should have no functional changes.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge e04d7fdf9d Use nuint instead of IntPtr for size/length parameters. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 2f5e14434f Add a BlockLiteral.GetTarget method and use it to simplify code (and make it less unsafe as well). 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge f5914589e1 CoreFoundation: consistently use nuint instead of mixed (u)long usage.
This also fixes a few P/Invokes that were incorrectly bound with (u)long instead of nuint.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 63163714f5 Added some code review comments. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge ca9b61693c NWError: don't double retain, base class already does it. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge a605baca62 Fixed compiler warnings by removing unused variables. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 06eda3504c Fix whitespace, add comma after last enum value, and fix a few other style issues. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 05340241ed Merge remote-tracking branch 'origin/xcode10' into xcode10-network 2018-08-01 17:10:36 +02:00
Manuel de la Pena 96509612d0 Merge branch 'xcode10-network' of github.com:migueldeicaza/xamarin-macios into xcode10-network 2018-08-01 16:56:44 +02:00
Manuel de la Pena 00eedb9381 [Network] Ensure NWAdvertiseDescriptor does take the type when exposing
a service.

As per documentation the NWAdvertiseDescriptor CreateBonjourService
should always get a type. Added the change which fixes the introspection
failures.
2018-08-01 16:55:06 +02:00
Miguel de Icaza b9ee7a93d7 [Network] Undo the change that uses Runtime.GetINativeObject as discussed with the team, it is just slower and does not fetch a cached object as originally assumed 2018-08-01 10:50:51 -04:00
Alex Soto b808213465 [Vision] Update bindings to Xcode 10 beta 1, nothing in beta 2 (#4321) 2018-08-01 10:50:13 -04:00
Miguel de Icaza 49bb4aa0ca Xcode10 CoreGraphics B1-B5 (#4198)
* [CoreGraphics] Add first batch of Xcode10 APIs, added an enum that we did not surface before

* [xcode10] CoreGraphics support

* Fix whitespace/formatting and add comma after last enum value.

* Make CFPropertyList follow normal INativeObject creation pattern.

* Make CFPropertyList.AsData return the error as a tuple.

* Fix CFPropertyList.AsData to not leak.

* CFPropertyList.Value: use Runtime.GetNSObject so that we don't accidentally create duplicate wrappers for the same native object.

* [CoreGraphics] Update to beta 5.

* Update xtro definitions.

* Add tests.

* Don't compare value type with null.

* Use PascalCase for named return tuples.

* [CoreFoundation] Make CFPropertyList enums native and fix code accordingly.

* [tests] Fix fetching 64-bit int to actually fetch a 64-bit int and not a nint.

* [tests] Teach introspection's ApiCMAttachmentTest about CFPropertyList.
2018-08-01 16:25:40 +02:00
Vincent Dondain 52aae1858b [homekit] Remove export for 'RemoveUser' (iOS prohibited) (#4542)
We want to remove the native API because it's prohibited and Apple could reject apps with it. Therefore we exposed empty stubs to avoid breaking the API.
2018-08-01 08:13:49 -04:00