Skip to content

Commit

Permalink
Merge pull request #553 from dkimitsa/hotfix/uikey-multiple-overrides
Browse files Browse the repository at this point in the history
* hot fix for CompilerException while compiling UIKey.keyCode
  • Loading branch information
Tom-Ski authored Jan 20, 2021
2 parents 5c7b9ab + 9b9f592 commit 8d6ae8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion compiler/cocoatouch/src/main/bro-gen/uikit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4294,7 +4294,11 @@ classes:
UIToolbarAppearance: {} #since 13.0
UIWindowScene: {} #since 13.0
UIWindowSceneDestructionRequestOptions: {} #since 13.0
UIKey: {} #since 13.4
UIKey: #since 13.4
properties:
'keyCode':
name: keyCodeRaw
type: "@MachineSizedSInt long"
NSDiffableDataSourceSectionSnapshot: #since 14.0
methods:
'-appendItems:intoParentItem:':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ public UIKey() {}
@Property(selector = "modifierFlags")
public native UIKeyModifierFlags getModifierFlags();
@Property(selector = "keyCode")
public native UIKeyboardHIDUsage getKeyCode();
public native @MachineSizedSInt long getKeyCodeRaw();
/*</properties>*/

// manually added method to access keyCodes that are missing in UIKeyboardHIDUsage
@Property(selector = "keyCode")
public native @MachineSizedSInt long getKeyCodeRaw();
// manually added method, converts raw value into UIKeyboardHIDUsage
public UIKeyboardHIDUsage getKeyCode() {
return UIKeyboardHIDUsage.valueOf(getKeyCodeRaw());
}

/*<members>*//*</members>*/
/*<methods>*/
Expand Down

0 comments on commit 8d6ae8d

Please sign in to comment.