committed by
GitHub
208 changed files with 1934 additions and 1917 deletions
File diff suppressed because it is too large
@ -1,9 +1,14 @@ |
|||
#ifndef keytransform_h |
|||
#define keytransform_h |
|||
#include "common.h" |
|||
#include "key.h" |
|||
#include <map> |
|||
|
|||
extern std::map<int, AvnKey> s_KeyMap; |
|||
|
|||
extern std::map<AvnKey, int> s_AvnKeyMap; |
|||
|
|||
extern std::map<int, const char*> s_QwertyKeyMap; |
|||
|
|||
extern std::map<AvnKey, int> s_UnicodeKeyMap; |
|||
|
|||
#endif |
|||
|
|||
@ -0,0 +1,66 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using System.Windows.Input; |
|||
|
|||
namespace MiniMvvm |
|||
{ |
|||
public sealed class MiniCommand<T> : MiniCommand, ICommand |
|||
{ |
|||
private readonly Action<T> _cb; |
|||
private bool _busy; |
|||
private Func<T, Task> _acb; |
|||
|
|||
public MiniCommand(Action<T> cb) |
|||
{ |
|||
_cb = cb; |
|||
} |
|||
|
|||
public MiniCommand(Func<T, Task> cb) |
|||
{ |
|||
_acb = cb; |
|||
} |
|||
|
|||
private bool Busy |
|||
{ |
|||
get => _busy; |
|||
set |
|||
{ |
|||
_busy = value; |
|||
CanExecuteChanged?.Invoke(this, EventArgs.Empty); |
|||
} |
|||
} |
|||
|
|||
|
|||
public override event EventHandler CanExecuteChanged; |
|||
public override bool CanExecute(object parameter) => !_busy; |
|||
|
|||
public override async void Execute(object parameter) |
|||
{ |
|||
if(Busy) |
|||
return; |
|||
try |
|||
{ |
|||
Busy = true; |
|||
if (_cb != null) |
|||
_cb((T)parameter); |
|||
else |
|||
await _acb((T)parameter); |
|||
} |
|||
finally |
|||
{ |
|||
Busy = false; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public abstract class MiniCommand : ICommand |
|||
{ |
|||
public static MiniCommand Create(Action cb) => new MiniCommand<object>(_ => cb()); |
|||
public static MiniCommand Create<TArg>(Action<TArg> cb) => new MiniCommand<TArg>(cb); |
|||
public static MiniCommand CreateFromTask(Func<Task> cb) => new MiniCommand<object>(_ => cb()); |
|||
|
|||
public abstract bool CanExecute(object parameter); |
|||
public abstract void Execute(object parameter); |
|||
public abstract event EventHandler CanExecuteChanged; |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
</PropertyGroup> |
|||
<Import Project="..\..\build\Rx.props" /> |
|||
</Project> |
|||
@ -0,0 +1,108 @@ |
|||
using System; |
|||
using System.ComponentModel; |
|||
using System.Linq.Expressions; |
|||
using System.Reactive.Linq; |
|||
using System.Reflection; |
|||
|
|||
namespace MiniMvvm |
|||
{ |
|||
public static class PropertyChangedExtensions |
|||
{ |
|||
class PropertyObservable<T> : IObservable<T> |
|||
{ |
|||
private readonly INotifyPropertyChanged _target; |
|||
private readonly PropertyInfo _info; |
|||
|
|||
public PropertyObservable(INotifyPropertyChanged target, PropertyInfo info) |
|||
{ |
|||
_target = target; |
|||
_info = info; |
|||
} |
|||
|
|||
class Subscription : IDisposable |
|||
{ |
|||
private readonly INotifyPropertyChanged _target; |
|||
private readonly PropertyInfo _info; |
|||
private readonly IObserver<T> _observer; |
|||
|
|||
public Subscription(INotifyPropertyChanged target, PropertyInfo info, IObserver<T> observer) |
|||
{ |
|||
_target = target; |
|||
_info = info; |
|||
_observer = observer; |
|||
_target.PropertyChanged += OnPropertyChanged; |
|||
_observer.OnNext((T)_info.GetValue(_target)); |
|||
} |
|||
|
|||
private void OnPropertyChanged(object sender, PropertyChangedEventArgs e) |
|||
{ |
|||
if (e.PropertyName == _info.Name) |
|||
_observer.OnNext((T)_info.GetValue(_target)); |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
_target.PropertyChanged -= OnPropertyChanged; |
|||
_observer.OnCompleted(); |
|||
} |
|||
} |
|||
|
|||
public IDisposable Subscribe(IObserver<T> observer) |
|||
{ |
|||
return new Subscription(_target, _info, observer); |
|||
} |
|||
} |
|||
|
|||
public static IObservable<TRes> WhenAnyValue<TModel, TRes>(this TModel model, |
|||
Expression<Func<TModel, TRes>> expr) where TModel : INotifyPropertyChanged |
|||
{ |
|||
var l = (LambdaExpression)expr; |
|||
var ma = (MemberExpression)l.Body; |
|||
var prop = (PropertyInfo)ma.Member; |
|||
return new PropertyObservable<TRes>(model, prop); |
|||
} |
|||
|
|||
public static IObservable<TRes> WhenAnyValue<TModel, T1, TRes>(this TModel model, |
|||
Expression<Func<TModel, T1>> v1, |
|||
Func<T1, TRes> cb |
|||
) where TModel : INotifyPropertyChanged |
|||
{ |
|||
return model.WhenAnyValue(v1).Select(cb); |
|||
} |
|||
|
|||
public static IObservable<TRes> WhenAnyValue<TModel, T1, T2, TRes>(this TModel model, |
|||
Expression<Func<TModel, T1>> v1, |
|||
Expression<Func<TModel, T2>> v2, |
|||
Func<T1, T2, TRes> cb |
|||
) where TModel : INotifyPropertyChanged => |
|||
Observable.CombineLatest( |
|||
model.WhenAnyValue(v1), |
|||
model.WhenAnyValue(v2), |
|||
cb); |
|||
|
|||
public static IObservable<ValueTuple<T1, T2>> WhenAnyValue<TModel, T1, T2>(this TModel model, |
|||
Expression<Func<TModel, T1>> v1, |
|||
Expression<Func<TModel, T2>> v2 |
|||
) where TModel : INotifyPropertyChanged => |
|||
model.WhenAnyValue(v1, v2, (a1, a2) => (a1, a2)); |
|||
|
|||
public static IObservable<TRes> WhenAnyValue<TModel, T1, T2, T3, TRes>(this TModel model, |
|||
Expression<Func<TModel, T1>> v1, |
|||
Expression<Func<TModel, T2>> v2, |
|||
Expression<Func<TModel, T3>> v3, |
|||
Func<T1, T2, T3, TRes> cb |
|||
) where TModel : INotifyPropertyChanged => |
|||
Observable.CombineLatest( |
|||
model.WhenAnyValue(v1), |
|||
model.WhenAnyValue(v2), |
|||
model.WhenAnyValue(v3), |
|||
cb); |
|||
|
|||
public static IObservable<ValueTuple<T1, T2, T3>> WhenAnyValue<TModel, T1, T2, T3>(this TModel model, |
|||
Expression<Func<TModel, T1>> v1, |
|||
Expression<Func<TModel, T2>> v2, |
|||
Expression<Func<TModel, T3>> v3 |
|||
) where TModel : INotifyPropertyChanged => |
|||
model.WhenAnyValue(v1, v2, v3, (a1, a2, a3) => (a1, a2, a3)); |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Reactive.Joins; |
|||
using System.Runtime.CompilerServices; |
|||
|
|||
namespace MiniMvvm |
|||
{ |
|||
public class ViewModelBase : INotifyPropertyChanged |
|||
{ |
|||
public event PropertyChangedEventHandler PropertyChanged; |
|||
protected bool RaiseAndSetIfChanged<T>(ref T field, T value, [CallerMemberName] string propertyName = null) |
|||
{ |
|||
if (!EqualityComparer<T>.Default.Equals(field, value)) |
|||
{ |
|||
field = value; |
|||
RaisePropertyChanged(propertyName); |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
|
|||
protected void RaisePropertyChanged([CallerMemberName] string propertyName = null) |
|||
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|||
} |
|||
} |
|||
@ -1,4 +1,4 @@ |
|||
Compat issues with assembly Avalonia.Base: |
|||
CannotAddAbstractMembers : Member 'protected System.IObservable<Avalonia.AvaloniaPropertyChangedEventArgs> Avalonia.AvaloniaProperty.GetChanged()' is abstract in the implementation but is missing in the contract. |
|||
TypesMustExist : Type 'Avalonia.Logging.DebugLogSink' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public void Avalonia.Threading.AvaloniaSynchronizationContext..ctor(Avalonia.Threading.AvaloniaSynchronizationContext.INonPumpingPlatformWaitProvider)' does not exist in the implementation but it does exist in the contract. |
|||
TypesMustExist : Type 'Avalonia.Threading.AvaloniaSynchronizationContext.INonPumpingPlatformWaitProvider' does not exist in the implementation but it does exist in the contract. |
|||
Total Issues: 2 |
|||
|
|||
@ -0,0 +1,14 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia.Utilities |
|||
{ |
|||
public class NonPumpingLockHelper |
|||
{ |
|||
public interface IHelperImpl |
|||
{ |
|||
IDisposable Use(); |
|||
} |
|||
|
|||
public static IDisposable Use() => AvaloniaLocator.Current.GetService<IHelperImpl>()?.Use(); |
|||
} |
|||
} |
|||
@ -1,5 +1 @@ |
|||
Compat issues with assembly Avalonia.Controls.DataGrid: |
|||
MembersMustExist : Member 'public Avalonia.StyledProperty<System.String> Avalonia.StyledProperty<System.String> Avalonia.Controls.DataGridTextColumn.FontFamilyProperty' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public System.String Avalonia.Controls.DataGridTextColumn.FontFamily.get()' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public void Avalonia.Controls.DataGridTextColumn.FontFamily.set(System.String)' does not exist in the implementation but it does exist in the contract. |
|||
Total Issues: 3 |
|||
Total Issues: 0 |
|||
|
|||
@ -1,26 +1,5 @@ |
|||
Compat issues with assembly Avalonia.Controls: |
|||
TypesMustExist : Type 'Avalonia.Controls.IndexPath' does not exist in the implementation but it does exist in the contract. |
|||
TypesMustExist : Type 'Avalonia.Controls.ISelectedItemInfo' does not exist in the implementation but it does exist in the contract. |
|||
TypesMustExist : Type 'Avalonia.Controls.ISelectionModel' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.DirectProperty<Avalonia.Controls.Primitives.SelectingItemsControl, Avalonia.Controls.ISelectionModel> Avalonia.DirectProperty<Avalonia.Controls.Primitives.SelectingItemsControl, Avalonia.Controls.ISelectionModel> Avalonia.Controls.ListBox.SelectionProperty' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.Controls.ISelectionModel Avalonia.Controls.ListBox.Selection.get()' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public void Avalonia.Controls.ListBox.Selection.set(Avalonia.Controls.ISelectionModel)' does not exist in the implementation but it does exist in the contract. |
|||
TypesMustExist : Type 'Avalonia.Controls.SelectionModel' does not exist in the implementation but it does exist in the contract. |
|||
TypesMustExist : Type 'Avalonia.Controls.SelectionModelChildrenRequestedEventArgs' does not exist in the implementation but it does exist in the contract. |
|||
TypesMustExist : Type 'Avalonia.Controls.SelectionModelSelectionChangedEventArgs' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.StyledProperty<Avalonia.Controls.IControl> Avalonia.StyledProperty<Avalonia.Controls.IControl> Avalonia.Controls.SplitView.ContentProperty' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.StyledProperty<Avalonia.Controls.IControl> Avalonia.StyledProperty<Avalonia.Controls.IControl> Avalonia.Controls.SplitView.PaneProperty' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.Controls.IControl Avalonia.Controls.SplitView.Content.get()' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public void Avalonia.Controls.SplitView.Content.set(Avalonia.Controls.IControl)' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.Controls.IControl Avalonia.Controls.SplitView.Pane.get()' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public void Avalonia.Controls.SplitView.Pane.set(Avalonia.Controls.IControl)' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.DirectProperty<Avalonia.Controls.TreeView, Avalonia.Controls.ISelectionModel> Avalonia.DirectProperty<Avalonia.Controls.TreeView, Avalonia.Controls.ISelectionModel> Avalonia.Controls.TreeView.SelectionProperty' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.Interactivity.RoutedEvent<Avalonia.Controls.SelectionChangedEventArgs> Avalonia.Interactivity.RoutedEvent<Avalonia.Controls.SelectionChangedEventArgs> Avalonia.Controls.TreeView.SelectionChangedEvent' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public Avalonia.Controls.ISelectionModel Avalonia.Controls.TreeView.Selection.get()' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'public void Avalonia.Controls.TreeView.Selection.set(Avalonia.Controls.ISelectionModel)' does not exist in the implementation but it does exist in the contract. |
|||
InterfacesShouldHaveSameMembers : Interface member 'public System.String[] Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime.Args' is present in the implementation but not in the contract. |
|||
InterfacesShouldHaveSameMembers : Interface member 'public System.String[] Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime.Args.get()' is present in the implementation but not in the contract. |
|||
MembersMustExist : Member 'public Avalonia.DirectProperty<Avalonia.Controls.Primitives.SelectingItemsControl, Avalonia.Controls.ISelectionModel> Avalonia.DirectProperty<Avalonia.Controls.Primitives.SelectingItemsControl, Avalonia.Controls.ISelectionModel> Avalonia.Controls.Primitives.SelectingItemsControl.SelectionProperty' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'protected Avalonia.Controls.ISelectionModel Avalonia.Controls.Primitives.SelectingItemsControl.Selection.get()' does not exist in the implementation but it does exist in the contract. |
|||
MembersMustExist : Member 'protected void Avalonia.Controls.Primitives.SelectingItemsControl.Selection.set(Avalonia.Controls.ISelectionModel)' does not exist in the implementation but it does exist in the contract. |
|||
Total Issues: 24 |
|||
InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Platform.IWindowBaseImpl.Show()' is present in the contract but not in the implementation. |
|||
MembersMustExist : Member 'public void Avalonia.Platform.IWindowBaseImpl.Show()' does not exist in the implementation but it does exist in the contract. |
|||
InterfacesShouldHaveSameMembers : Interface member 'public void Avalonia.Platform.IWindowBaseImpl.Show(System.Boolean)' is present in the implementation but not in the contract. |
|||
Total Issues: 3 |
|||
|
|||
@ -0,0 +1,31 @@ |
|||
using Avalonia.Platform; |
|||
|
|||
namespace Avalonia.Native |
|||
{ |
|||
internal class DoubleClickHelper |
|||
{ |
|||
private int _clickCount; |
|||
private Rect _lastClickRect; |
|||
private ulong _lastClickTime; |
|||
|
|||
public bool IsDoubleClick( |
|||
ulong timestamp, |
|||
Point p) |
|||
{ |
|||
var settings = AvaloniaLocator.Current.GetService<IPlatformSettings>(); |
|||
var doubleClickTime = settings.DoubleClickTime.TotalMilliseconds; |
|||
|
|||
if (!_lastClickRect.Contains(p) || timestamp - _lastClickTime > doubleClickTime) |
|||
{ |
|||
_clickCount = 0; |
|||
} |
|||
|
|||
++_clickCount; |
|||
_lastClickTime = timestamp; |
|||
_lastClickRect = new Rect(p, new Size()) |
|||
.Inflate(new Thickness(settings.DoubleClickSize.Width / 2, settings.DoubleClickSize.Height / 2)); |
|||
|
|||
return _clickCount == 2; |
|||
} |
|||
} |
|||
} |
|||
@ -1,152 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using Avalonia.Input; |
|||
|
|||
namespace Avalonia.Native.Interop |
|||
{ |
|||
internal static class OsxUnicodeKeys |
|||
{ |
|||
enum OsxUnicodeSpecialKey |
|||
{ |
|||
NSUpArrowFunctionKey = 0xF700, |
|||
NSDownArrowFunctionKey = 0xF701, |
|||
NSLeftArrowFunctionKey = 0xF702, |
|||
NSRightArrowFunctionKey = 0xF703, |
|||
NSF1FunctionKey = 0xF704, |
|||
NSF2FunctionKey = 0xF705, |
|||
NSF3FunctionKey = 0xF706, |
|||
NSF4FunctionKey = 0xF707, |
|||
NSF5FunctionKey = 0xF708, |
|||
NSF6FunctionKey = 0xF709, |
|||
NSF7FunctionKey = 0xF70A, |
|||
NSF8FunctionKey = 0xF70B, |
|||
NSF9FunctionKey = 0xF70C, |
|||
NSF10FunctionKey = 0xF70D, |
|||
NSF11FunctionKey = 0xF70E, |
|||
NSF12FunctionKey = 0xF70F, |
|||
NSF13FunctionKey = 0xF710, |
|||
NSF14FunctionKey = 0xF711, |
|||
NSF15FunctionKey = 0xF712, |
|||
NSF16FunctionKey = 0xF713, |
|||
NSF17FunctionKey = 0xF714, |
|||
NSF18FunctionKey = 0xF715, |
|||
NSF19FunctionKey = 0xF716, |
|||
NSF20FunctionKey = 0xF717, |
|||
NSF21FunctionKey = 0xF718, |
|||
NSF22FunctionKey = 0xF719, |
|||
NSF23FunctionKey = 0xF71A, |
|||
NSF24FunctionKey = 0xF71B, |
|||
NSF25FunctionKey = 0xF71C, |
|||
NSF26FunctionKey = 0xF71D, |
|||
NSF27FunctionKey = 0xF71E, |
|||
NSF28FunctionKey = 0xF71F, |
|||
NSF29FunctionKey = 0xF720, |
|||
NSF30FunctionKey = 0xF721, |
|||
NSF31FunctionKey = 0xF722, |
|||
NSF32FunctionKey = 0xF723, |
|||
NSF33FunctionKey = 0xF724, |
|||
NSF34FunctionKey = 0xF725, |
|||
NSF35FunctionKey = 0xF726, |
|||
NSInsertFunctionKey = 0xF727, |
|||
NSDeleteFunctionKey = 0xF728, |
|||
NSHomeFunctionKey = 0xF729, |
|||
NSBeginFunctionKey = 0xF72A, |
|||
NSEndFunctionKey = 0xF72B, |
|||
NSPageUpFunctionKey = 0xF72C, |
|||
NSPageDownFunctionKey = 0xF72D, |
|||
NSPrintScreenFunctionKey = 0xF72E, |
|||
NSScrollLockFunctionKey = 0xF72F, |
|||
NSPauseFunctionKey = 0xF730, |
|||
NSSysReqFunctionKey = 0xF731, |
|||
NSBreakFunctionKey = 0xF732, |
|||
NSResetFunctionKey = 0xF733, |
|||
NSStopFunctionKey = 0xF734, |
|||
NSMenuFunctionKey = 0xF735, |
|||
NSUserFunctionKey = 0xF736, |
|||
NSSystemFunctionKey = 0xF737, |
|||
NSPrintFunctionKey = 0xF738, |
|||
NSClearLineFunctionKey = 0xF739, |
|||
NSClearDisplayFunctionKey = 0xF73A, |
|||
NSInsertLineFunctionKey = 0xF73B, |
|||
NSDeleteLineFunctionKey = 0xF73C, |
|||
NSInsertCharFunctionKey = 0xF73D, |
|||
NSDeleteCharFunctionKey = 0xF73E, |
|||
NSPrevFunctionKey = 0xF73F, |
|||
NSNextFunctionKey = 0xF740, |
|||
NSSelectFunctionKey = 0xF741, |
|||
NSExecuteFunctionKey = 0xF742, |
|||
NSUndoFunctionKey = 0xF743, |
|||
NSRedoFunctionKey = 0xF744, |
|||
NSFindFunctionKey = 0xF745, |
|||
NSHelpFunctionKey = 0xF746, |
|||
NSModeSwitchFunctionKey = 0xF747 |
|||
} |
|||
|
|||
private static Dictionary<Key, OsxUnicodeSpecialKey> s_osxKeys = new Dictionary<Key, OsxUnicodeSpecialKey> |
|||
{ |
|||
{Key.Up, OsxUnicodeSpecialKey.NSUpArrowFunctionKey }, |
|||
{Key.Down, OsxUnicodeSpecialKey.NSDownArrowFunctionKey }, |
|||
{Key.Left, OsxUnicodeSpecialKey.NSLeftArrowFunctionKey }, |
|||
{Key.Right, OsxUnicodeSpecialKey.NSRightArrowFunctionKey }, |
|||
{ Key.F1, OsxUnicodeSpecialKey.NSF1FunctionKey }, |
|||
{ Key.F2, OsxUnicodeSpecialKey.NSF2FunctionKey }, |
|||
{ Key.F3, OsxUnicodeSpecialKey.NSF3FunctionKey }, |
|||
{ Key.F4, OsxUnicodeSpecialKey.NSF4FunctionKey }, |
|||
{ Key.F5, OsxUnicodeSpecialKey.NSF5FunctionKey }, |
|||
{ Key.F6, OsxUnicodeSpecialKey.NSF6FunctionKey }, |
|||
{ Key.F7, OsxUnicodeSpecialKey.NSF7FunctionKey }, |
|||
{ Key.F8, OsxUnicodeSpecialKey.NSF8FunctionKey }, |
|||
{ Key.F9, OsxUnicodeSpecialKey.NSF9FunctionKey }, |
|||
{ Key.F10, OsxUnicodeSpecialKey.NSF10FunctionKey }, |
|||
{ Key.F11, OsxUnicodeSpecialKey.NSF11FunctionKey }, |
|||
{ Key.F12, OsxUnicodeSpecialKey.NSF12FunctionKey }, |
|||
{ Key.F13, OsxUnicodeSpecialKey.NSF13FunctionKey }, |
|||
{ Key.F14, OsxUnicodeSpecialKey.NSF14FunctionKey }, |
|||
{ Key.F15, OsxUnicodeSpecialKey.NSF15FunctionKey }, |
|||
{ Key.F16, OsxUnicodeSpecialKey.NSF16FunctionKey }, |
|||
{ Key.F17, OsxUnicodeSpecialKey.NSF17FunctionKey }, |
|||
{ Key.F18, OsxUnicodeSpecialKey.NSF18FunctionKey }, |
|||
{ Key.F19, OsxUnicodeSpecialKey.NSF19FunctionKey }, |
|||
{ Key.F20, OsxUnicodeSpecialKey.NSF20FunctionKey }, |
|||
{ Key.F21, OsxUnicodeSpecialKey.NSF21FunctionKey }, |
|||
{ Key.F22, OsxUnicodeSpecialKey.NSF22FunctionKey }, |
|||
{ Key.F23, OsxUnicodeSpecialKey.NSF23FunctionKey }, |
|||
{ Key.F24, OsxUnicodeSpecialKey.NSF24FunctionKey }, |
|||
{ Key.Insert, OsxUnicodeSpecialKey.NSInsertFunctionKey }, |
|||
{ Key.Delete, OsxUnicodeSpecialKey.NSDeleteFunctionKey }, |
|||
{ Key.Home, OsxUnicodeSpecialKey.NSHomeFunctionKey }, |
|||
//{ Key.Begin, OsxUnicodeSpecialKey.NSBeginFunctionKey },
|
|||
{ Key.End, OsxUnicodeSpecialKey.NSEndFunctionKey }, |
|||
{ Key.PageUp, OsxUnicodeSpecialKey.NSPageUpFunctionKey }, |
|||
{ Key.PageDown, OsxUnicodeSpecialKey.NSPageDownFunctionKey }, |
|||
{ Key.PrintScreen, OsxUnicodeSpecialKey.NSPrintScreenFunctionKey }, |
|||
{ Key.Scroll, OsxUnicodeSpecialKey.NSScrollLockFunctionKey }, |
|||
//{ Key.SysReq, OsxUnicodeSpecialKey.NSSysReqFunctionKey },
|
|||
//{ Key.Break, OsxUnicodeSpecialKey.NSBreakFunctionKey },
|
|||
//{ Key.Reset, OsxUnicodeSpecialKey.NSResetFunctionKey },
|
|||
//{ Key.Stop, OsxUnicodeSpecialKey.NSStopFunctionKey },
|
|||
//{ Key.Menu, OsxUnicodeSpecialKey.NSMenuFunctionKey },
|
|||
//{ Key.UserFunction, OsxUnicodeSpecialKey.NSUserFunctionKey },
|
|||
//{ Key.SystemFunction, OsxUnicodeSpecialKey.NSSystemFunctionKey },
|
|||
{ Key.Print, OsxUnicodeSpecialKey.NSPrintFunctionKey }, |
|||
//{ Key.ClearLine, OsxUnicodeSpecialKey.NSClearLineFunctionKey },
|
|||
//{ Key.ClearDisplay, OsxUnicodeSpecialKey.NSClearDisplayFunctionKey },
|
|||
}; |
|||
|
|||
public static string ConvertOSXSpecialKeyCodes(Key key) |
|||
{ |
|||
if (s_osxKeys.ContainsKey(key)) |
|||
{ |
|||
return ((char)s_osxKeys[key]).ToString(); |
|||
} |
|||
else |
|||
{ |
|||
if (key >= Key.D0 && key <= Key.D9) |
|||
{ |
|||
return key.ToString().Replace("D", ""); |
|||
} |
|||
|
|||
return key.ToString().ToLower(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
Compat issues with assembly Avalonia.Styling: |
|||
MembersMustExist : Member 'public System.IObservable<System.Object> Avalonia.Controls.ResourceNodeExtensions.GetResourceObservable(Avalonia.IStyledElement, System.Object, System.Func<System.Object, System.Object>)' does not exist in the implementation but it does exist in the contract. |
|||
Total Issues: 1 |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue