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
PrevPrevious commit
NextNext commit
Revert "[UIKit] Fix NSWritingDirection mess" <- lol just kiddding, it…
… did not really fix it 🙃This reverts commit692b68b.The right fix is to expose NSWritingDirection in foundation
  • Loading branch information
@dalexsoto
dalexsoto committedJul 12, 2019
commita09e1eb396ee6c92ba6a482ebd773443f67a3de4
8 changes: 8 additions & 0 deletionssrc/AppKit/Enums.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1289,6 +1289,14 @@ public enum NSTextAlignment : ulong {
Natural = 4
}

[Flags]
[Native]
public enum NSWritingDirection : long {
Natural = -1, LeftToRight, RightToLeft,
Embedding = 0,
Override = 2,
}

#if !XAMCORE_4_0
[Native]
public enum NSTextMovement : long {
Expand Down
3 changes: 0 additions & 3 deletionssrc/Foundation/Enum.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -812,8 +812,6 @@ public enum NSUnderlineStyle : long {
}
#endif

// Will be removed in favor of the UIKit/AppKit one to match Apple behavior inside xkit.cs
#if !XAMCORE_4_0
#if !MONOMAC || !XAMCORE_3_0
[Native]
#if MONOMAC
Expand All@@ -823,7 +821,6 @@ public enum NSWritingDirection : long {
Natural = -1, LeftToRight = 0, RightToLeft = 1,
}
#endif // !MONOMAC || !XAMCORE_3_0
#endif // !XAMCORE_4_0

[Flags]
[Native]
Expand Down
8 changes: 5 additions & 3 deletionssrc/UIKit/UIEnums.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1136,17 +1136,19 @@ public enum UITextDirection : long {
Forward, Backward, Right, Left, Up, Down
}

#if !XAMCORE_4_0
// NSInteger -> UITextInput.h
//UITextWritingDirection instances needs to be replaced byNSWritingDirectionin XAMCORE_4_0
// 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,
}
#endif

// NSInteger -> UITextInput.h
[Native]
Expand Down
18 changes: 0 additions & 18 deletionssrc/xkit.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1190,22 +1190,4 @@ interface NSLayoutManagerDelegate {
[Export ("layoutManager:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:inTextContainer:forGlyphRange:")]
bool ShouldSetLineFragmentRect (NSLayoutManager layoutManager, ref CGRect lineFragmentRect, ref CGRect lineFragmentUsedRect, ref nfloat baselineOffset, NSTextContainer textContainer, NSRange glyphRange);
}

[Flags, Native]
// This type belongs in UIkit and AppKit and should be enabled
// once the Foundation one is removed in XAMCORE_4_0
#if XAMCORE_4_0
[Watch (2,0), iOS (6,0)]
#else
[NoWatch, NoiOS, NoTV]
#endif
public enum NSWritingDirection : long {
Natural = -1,
LeftToRight,
RightToLeft,
[NoWatch, NoTV, NoiOS]
Embedding = 0,
[NoWatch, NoTV, NoiOS]
Override = 2,
}
}

[8]ページ先頭

©2009-2025 Movatter.jp