Commit Graph

23 Commits

Author SHA1 Message Date
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Michael Ilseman
8105dc7541 [CoreGraphics] Remove redundant, potentially-warning-inducing SwiftName 2016-08-12 11:43:51 -07:00
Mishal Shah
d28ff854b9 Update master to build with Xcode 8 beta 4, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-08-02 11:47:10 -07:00
Michael Ilseman
654c5235fe [CoreGraphics] fix up a few inconsistent names (#3912)
* [CoreGraphics] fix up a few inconsistent names

* [test] Remove LLVM value names to pass no-assert builds
2016-08-01 20:53:10 -07:00
Michael Ilseman
67e58f0c47 [Core Graphics] Rename several APIs to be more Swifty and consistent
This renames several APIs off of CGAffineTransform, CGPoint, CGSize,
CGColor, CGContext, CGRect, and CGColorSpace to have more consistent
names and Swifty names, in accordance with the Swift API Design
Guidelines.

At the same time, we drop many of the special mutating variants from
the overlays, as they are not typical CG usage and a historical
artifact. Test cases added for each.
2016-07-14 13:53:08 -07:00
Michael Ilseman
dc232f6279 [Core Graphics] Disambiguate the CGContext PDF endPage
This changes how we import CGPDFContextEndPage to be
CGContext.endPDFPage(), instead of .endPage() which conflicts with
another CGContext function. Also does .beginPDFPage() for consistency,
which is consistent with e.g. drawPDFPage().
2016-06-20 14:44:11 -07:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00
Jordan Rose
24030eb2ed [APINotes] Use non-"Ref" names for CG import-as-member renamings.
That is, import something like 'CGColorCreateGenericGray' as
"CGColor.init(gray:alpha:)" rather than "CGColorRef.init(gray:alpha:)".
Since we print the type name in diagnostic text and in fix-its, it's
important to use the name that Swift sources use.

Finishes rdar://problem/26347297.
2016-05-19 18:07:27 -07:00
Joe Groff
37d96dca6d Fix broken API notes uncovered by strengthened Clang-side validation. 2016-05-19 13:11:34 -07:00
Michael Ilseman
7fddadf9db [Core Graphics] Fix apinotes for CGPathCreateMutableCopy
CGPathCreateMutableCopy and CGPathCreateMutableCopyByTransformingPath
have 'self' type of CGPath, and thus must be imported as members of
CGPath proper, not CGMutablePath. Does so by following common naming
conventions for producing mutable copies.
2016-05-18 16:10:28 -07:00
Michael Ilseman
22ddf81047 [CG Import as Member] Fix argument label swap 2016-05-12 11:59:36 -07:00
Michael Ilseman
633d968c90 [Import as Member] Remove broken swift_name for CGPDFPageGetBoxRect 2016-05-12 10:18:08 -07:00
Michael Ilseman
8c65ef209e [CoreGraphics Renaming] Overhaul CG apinotes
Adds many more API renamings to CoreGraphics.apinotes
2016-05-06 14:52:24 -07:00
Dave Abrahams
debde16e2c Merge set-api branch into swift-3-indexing-model 2016-04-26 15:56:42 -07:00
Michael Ilseman
ba431a9954 [Import as member] CoreGraphics: Import global vars onto classes
With support from 16baa6, we can now use correct inference bahavior,
which is to import global variables as members on classes.
2016-04-12 10:48:18 -07:00
Michael Ilseman
151a19d3b8 [Import as member] Fixes to apinotes and tests
Fixes and clarifies a few API notes, and adds some test cases showing
current SILGen issues.
2016-04-11 11:31:12 -07:00
practicalswift
7bfe5c48f0 [gardening] Fix recently introduced typo: "auxilary" → "auxiliary" 2016-04-09 12:19:05 +02:00
Ted Kremenek
8e91efb39d Revert "Revert "[Import as member] First draft of renaming CG APIs"" 2016-04-08 21:26:03 -07:00
Ted Kremenek
18504de7dd Revert "[Import as member] First draft of renaming CG APIs" 2016-04-08 21:00:00 -07:00
Michael Ilseman
dc34fd61af [Import as member] Need to keep pre-9.0 APIs available 2016-04-08 17:17:44 -07:00
Michael Ilseman
3a2fed44f5 [Import as member] First draft of renaming CG APIs
This includes several large manual renaming of CG APIs where we want
different results than what the inference system produces.
2016-04-08 15:27:59 -07:00
Michael Ilseman
8a31b4b9f3 [Import as member] Mark CG APIs as nonswift
Several CG APIs are meant to be imported as nonswift, so mark them so
in our API notes.
2016-04-08 15:27:59 -07:00
Michael Ilseman
2b5b839686 [Import as member] Turn on CoreGraphics.
Introduces CoreGraphics.apinotes, in which we enable the
import-as-member inference system. Additionally, include some explicit
SwiftNames, for when inference doesn't produce the right result, and
to aid compatibility with the overlays.

Refactors many of the trivial overlays out, shrinking the
CoreGraphics.swift overlay by over half. Updates in-tree test
cases. The names we currently have will be highly in flux for a while,
and are likely to change frequently over the near term.

There are a few remaining known bugs that are worked around by
apinotes entries.
2016-04-06 11:03:18 -07:00