Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ?#6553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dalexsoto merged 10 commits intodotnet:xcode11fromdalexsoto:alex-uikitb1b3
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
[UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ?
Missing bindings for* NSDiffableDataSourceSnapshot* UICollectionViewDiffableDataSource* UITableViewDiffableDataSourcedue to a registrar issue git generics.
  • Loading branch information
@dalexsoto
dalexsoto committedJul 11, 2019
commit5ad8da73878acd73bb8232ed631ff869583d061c
25 changes: 25 additions & 0 deletionssrc/UIKit/NSLayoutManager.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -80,8 +80,16 @@ public unsafe nuint GetGlyphs (
}

#if XAMCORE_4_0 || MONOMAC
[Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the overload that takes 'nint glyphCount' instead.")]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use the overload that takes 'nint glyphCount' instead.")]
[Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the overload that takes 'nint glyphCount' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use the overload that takes 'nint glyphCount' instead.")]
public unsafe void ShowGlyphs (
#else
[Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")]
[Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")]
public unsafe void ShowCGGlyphs (
#endif
short[] /* const CGGlyph* = CGFontIndex* = unsigned short* */ glyphs,
Expand All@@ -99,6 +107,23 @@ public unsafe void ShowCGGlyphs (
}
}

[Watch (6,0), TV (13,0), Mac (10,15, onlyOn64: true), iOS (13,0)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you need to create this because it is not supported in C#? When do you know if you need to create an additional file?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I need to create this because thegenerator does not know how to handle certain types and these need to be manually bound, meaning C# does support this it is just the generator does not know how to output the right C# code for these.

Generally the generator will yell at you when it does not know how to handle a type but basically C arrays and types that do not inherit from NSObject.

public unsafe void ShowGlyphs (
short [] /* const CGGlyph* = CGFontIndex* = unsigned short* */ glyphs,
CGPoint [] /* const CGPoint* */ positions,
nint /* NSInteger */ glyphCount,
UIFont font,
CGAffineTransform textMatrix,
NSDictionary attributes,
CGContext graphicsContext)
{
fixed (short* gl = glyphs) {
fixed (CGPoint* pos = positions) {
ShowGlyphs ((IntPtr) gl, (IntPtr) pos, glyphCount, font, textMatrix, attributes, graphicsContext);
}
}
}

#if !XAMCORE_4_0 && !MONOMAC
// TextContainerForGlyphAtIndex
[Obsolete ("Use 'GetTextContainer' instead.")]
Expand Down
21 changes: 21 additions & 0 deletionssrc/UIKit/UIAccessibility.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -287,6 +287,13 @@ static public bool IsReduceMotionEnabled {
}
}

[iOS (13,0), TV (13,0)]
[DllImport (Constants.UIKitLibrary)]
static extern bool UIAccessibilityIsVideoAutoplayEnabled ();

[iOS (13,0), TV (13,0)]
static public bool IsVideoAutoplayEnabled => UIAccessibilityIsVideoAutoplayEnabled ();

[iOS (8,0)]
[DllImport (Constants.UIKitLibrary)]
static extern bool UIAccessibilityIsReduceTransparencyEnabled ();
Expand DownExpand Up@@ -339,6 +346,20 @@ public static bool IsAssistiveTouchRunning {
}
}

[iOS (13,0), TV (13,0)]
[DllImport (Constants.UIKitLibrary)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is Constants.UIKitLibrary a third party dll?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nope,UIKitLibrary points to the system's path where this library is located, the value changes between simulator and devices.

static extern bool UIAccessibilityShouldDifferentiateWithoutColor ();

[iOS (13,0), TV (13,0)]
public static bool ShouldDifferentiateWithoutColor => UIAccessibilityShouldDifferentiateWithoutColor ();

[iOS (13,0), TV (13,0)]
[DllImport (Constants.UIKitLibrary)]
static extern bool UIAccessibilityIsOnOffSwitchLabelsEnabled ();

[iOS (13,0), TV (13,0)]
public static bool IsOnOffSwitchLabelsEnabled => UIAccessibilityIsOnOffSwitchLabelsEnabled ();

#if !TVOS
[iOS (10,0)]
[DllImport (Constants.UIKitLibrary)]
Expand Down
223 changes: 199 additions & 24 deletionssrc/UIKit/UIEnums.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,9 +29,20 @@ public enum UIImagePickerControllerQualityType : long {
[Native]
[NoWatch]
public enum UIActivityIndicatorViewStyle : long {
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Large' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Large' instead.")]
WhiteLarge,
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Medium' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Medium' instead.")]
White,
Gray
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Medium' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Medium' instead.")]
Gray,

[iOS (13,0), TV (13,0)]
Medium = 100,
[iOS (13,0), TV (13,0)]
Large = 101,
}

// NSInteger -> UIAlertView.h
Expand DownExpand Up@@ -756,6 +767,7 @@ public enum UIDataDetectorType : ulong {
// NSInteger -> UIActionSheet.h
[Native]
[NoTV][NoWatch]
[Deprecated (PlatformName.iOS, 13, 0, message: "'UIActionSheet' is deprecated.")]
public enum UIActionSheetStyle : long {
Automatic = -1,
Default = UIBarStyle.Default,
Expand DownExpand Up@@ -1125,9 +1137,14 @@ public enum UITextDirection : long {
}

// NSInteger -> UITextInput.h
// NSWritingDirection == UITextWritingDirection
[Native]
[NoWatch]
#if XAMCORE_4_0
public enum NSWritingDirection : long {
#else
public enum UITextWritingDirection : long {
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is becoming confusing

src/AppKit/Enums.cs:    public enum NSWritingDirection : long {src/Foundation/Enum.cs: [Obsolete ("Use NSWritingDirection in AppKit instead.")]src/Foundation/Enum.cs: public enum NSWritingDirection : long {

and, for us, it's really different types (if some new, shared macOS+iOS API, start using them)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh woow nice catch@spouliot will expose AppKit's into xkit.cs and use that instead 👍

spouliot reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fixed in692b68b

Natural = -1,
LeftToRight,
RightToLeft,
Expand DownExpand Up@@ -1603,6 +1620,36 @@ public enum UIBlurEffectStyle : long {
Regular = 4,
[iOS (10,0)]
Prominent = 5,
[iOS (13,0), NoTV]
SystemUltraThinMaterial,
[iOS (13,0), NoTV]
SystemThinMaterial,
[iOS (13,0), NoTV]
SystemMaterial,
[iOS (13,0), NoTV]
SystemThickMaterial,
[iOS (13,0), NoTV]
SystemChromeMaterial,
[iOS (13,0), NoTV]
SystemUltraThinMaterialLight,
[iOS (13,0), NoTV]
SystemThinMaterialLight,
[iOS (13,0), NoTV]
SystemMaterialLight,
[iOS (13,0), NoTV]
SystemThickMaterialLight,
[iOS (13,0), NoTV]
SystemChromeMaterialLight,
[iOS (13,0), NoTV]
SystemUltraThinMaterialDark,
[iOS (13,0), NoTV]
SystemThinMaterialDark,
[iOS (13,0), NoTV]
SystemMaterialDark,
[iOS (13,0), NoTV]
SystemThickMaterialDark,
[iOS (13,0), NoTV]
SystemChromeMaterialDark,
}

[Native]
Expand DownExpand Up@@ -1689,6 +1736,7 @@ public enum UISplitViewControllerDisplayMode : long {

[Native]
[NoTV][NoWatch]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'UIContextualActionStyle' and corresponding APIs instead.")]
public enum UITableViewRowActionStyle : long {
Default, Destructive = Default, Normal
}
Expand DownExpand Up@@ -1979,7 +2027,9 @@ public enum UIAccessibilityContainerType : long
None = 0,
DataTable,
List,
Landmark
Landmark,
[iOS (13,0), TV (13,0), Watch (6,0)]
SemanticGroup,
}

[NoWatch]
Expand DownExpand Up@@ -2318,16 +2368,14 @@ public enum UIImageSymbolWeight : long

[Mac (10,15, onlyOn64: true), iOS (13,0), TV (13,0)]
[Native]
public enum NSTextScalingType : long
{
public enum NSTextScalingType : long {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

try not to fix style in the same commit that adds code
ease reviewing (now) and blaming (later)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah I agree but (🙃) I decided to fix this on the stuff that I included in my last PR it would not ease review but will still blame back to me

Standard = 0,
iOS,
}

[iOS (13,0), TV (13,0), NoWatch]
[Native]
public enum UISceneActivationState : long
{
public enum UISceneActivationState : long {
Unattached = -1,
ForegroundActive,
ForegroundInactive,
Expand All@@ -2336,44 +2384,37 @@ public enum UISceneActivationState : long

[iOS (13,0), TV (13,0), NoWatch]
[Native]
public enum UICommandState : long
{
public enum UIMenuElementState : long {
Off,
On,
Mixed,
Hidden,
}

[Flags]
[iOS (13,0), TV (13,0), NoWatch]
[Native]
public enum UIMenuOptions : ulong
{
DisplayInline = 1uL << 0,
public enum UIMenuElementAttributes : ulong {
Disabled = 1uL << 0,
Destructive = 1uL << 1,
Hidden = 1uL << 2,
}

[Flags]
[iOS (13,0), TV (13,0), NoWatch]
[Native]
public enum UIActionOptions : ulong
{
Disabled = 1uL << 0,
Selected = 1uL << 1,
Destructive = 1uL << 2,
public enum UIMenuOptions : ulong {
DisplayInline = 1uL << 0,
Destructive = 1uL << 1,
}

[NoWatch, NoTV, iOS (13, 0)]
[Native]
public enum UIContextMenuInteractionCommitStyle : long
{
public enum UIContextMenuInteractionCommitStyle : long {
Dismiss = 0,
Pop,
}

[iOS (13,0), TV (13,0), NoWatch]
public enum UIWindowSceneSessionRole
{
public enum UIWindowSceneSessionRole {
[Field ("UIWindowSceneSessionRoleApplication")]
Application,

Expand All@@ -2382,8 +2423,7 @@ public enum UIWindowSceneSessionRole
}

[iOS (13,0), TV (13,0), NoWatch]
public enum UIMenuIdentifier
{
public enum UIMenuIdentifier {
[DefaultEnumValue]
[Field (null)]
None,
Expand DownExpand Up@@ -2472,4 +2512,139 @@ public enum UIMenuIdentifier
[Field ("UIMenuRoot")]
Root,
}

[iOS (13,0), TV (13,0), Watch (6,0)]
public enum UIAccessibilityTextualContext {
[Field ("UIAccessibilityTextualContextWordProcessing")]
WordProcessing,
[Field ("UIAccessibilityTextualContextNarrative")]
Narrative,
[Field ("UIAccessibilityTextualContextMessaging")]
Messaging,
[Field ("UIAccessibilityTextualContextSpreadsheet")]
Spreadsheet,
[Field ("UIAccessibilityTextualContextFileSystem")]
FileSystem,
[Field ("UIAccessibilityTextualContextSourceCode")]
SourceCode,
[Field ("UIAccessibilityTextualContextConsole")]
Console,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UICollectionLayoutSectionOrthogonalScrollingBehavior : long {
None,
Continuous,
ContinuousGroupLeadingBoundary,
Paging,
GroupPaging,
GroupPagingCentered
}

[Flags, Watch (6,0), TV (13,0), iOS (13,0)]
[Native]
public enum NSDirectionalRectEdge : ulong {
None = 0x0,
Top = 1uL << 0,
Leading = 1uL << 1,
Bottom = 1uL << 2,
Trailing = 1uL << 3,
All = Top | Leading | Bottom | Trailing,
}

[Watch (6,0), TV (13,0), iOS (13,0)]
[Native]
public enum NSRectAlignment : long {
None = 0,
Top,
TopLeading,
Leading,
BottomLeading,
Bottom,
BottomTrailing,
Trailing,
TopTrailing,
}

[TV (13,0), NoWatch, iOS (13,0)]
[Native]
public enum UIAccessibilityContrast : long {
Unspecified = -1,
Normal,
High,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UILegibilityWeight : long {
Unspecified = -1,
Regular,
Bold,
}

[NoWatch, NoTV, iOS (13,0)]
[Native]
public enum UIUserInterfaceLevel : long {
Unspecified = -1,
Base,
Elevated,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UIEditingInteractionConfiguration : long {
None = 0,
Default = 1,
}

[NoTV, NoWatch, iOS (13,0)]
[Native]
public enum UISplitViewControllerBackgroundStyle : long {
None,
Sidebar,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UITabBarItemAppearanceStyle : long {
Stacked,
Inline,
CompactInline,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UITextAlternativeStyle : long {
None,
LowConfidence,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UITextInteractionMode : long {
Editable,
NonEditable,
}

[NoWatch, NoTV, iOS (13,0)]
[Native]
public enum UIVibrancyEffectStyle : long {
Label,
SecondaryLabel,
TertiaryLabel,
QuaternaryLabel,
Fill,
SecondaryFill,
TertiaryFill,
Separator,
}

[NoWatch, TV (13,0), iOS (13,0)]
[Native]
public enum UIWindowSceneDismissalAnimation : long {
Standard = 1,
Commit = 2,
Decline = 3,
}
}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp