浏览代码

Merge branch 'shiyun/skia' of https://github.com/Unity-Technologies/com.unity.uiwidgets into shiyun/skia

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
c67e811f
共有 7 个文件被更改,包括 15 次插入21 次删除
  1. 7
      com.unity.uiwidgets/Runtime/cupertino/app.cs
  2. 2
      com.unity.uiwidgets/Runtime/foundation/binding.cs
  3. 6
      com.unity.uiwidgets/Runtime/gestures/mouse_tracking.cs
  4. 4
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  5. 13
      com.unity.uiwidgets/Runtime/widgets/binding.cs
  6. 2
      com.unity.uiwidgets/Runtime/widgets/framework.cs
  7. 2
      com.unity.uiwidgets/Runtime/widgets/text.cs

7
com.unity.uiwidgets/Runtime/cupertino/app.cs


Dictionary<LogicalKeySet, Intent> shortcuts = null,
Dictionary<LocalKey, ActionFactory> actions = null
) : base(key: key) {
D.assert(routes != null);
D.assert(navigatorObservers != null);
D.assert(showPerformanceOverlay != null);
D.assert(checkerboardRasterCacheImages != null);
D.assert(checkerboardOffscreenLayers != null);
D.assert(showSemanticsDebugger != null);
D.assert(debugShowCheckedModeBanner != null);
supportedLocales = supportedLocales ?? new List<Locale> {new Locale("en", "US")};
this.navigatorKey = navigatorKey;

2
com.unity.uiwidgets/Runtime/foundation/binding.cs


Timeline.finishSync();
}
static bool _debugInitialized = false;
bool _debugInitialized = false;
public Window window => Window.instance;

6
com.unity.uiwidgets/Runtime/gestures/mouse_tracking.cs


MouseDetectorAnnotationFinder annotationFinder
) {
D.assert(_router != null);
D.assert(router != null);
D.assert(annotationFinder != null);
_router = router;
router.addGlobalRoute(_handleEvent);

if (Event is PointerSignalEvent)
return;
int device = Event.device;
_MouseState existingState = _mouseStates[device];
_MouseState existingState = _mouseStates.getOrDefault(device);
if (!_shouldMarkStateDirty(existingState, Event))
return;
PointerEvent previousEvent = existingState?.latestEvent;

_MouseState targetState = null;
if (targetEvent != null) {
targetState = _mouseStates[targetEvent.device];
targetState = _mouseStates.getOrDefault(targetEvent.device);
if (targetState == null) {
targetState = new _MouseState(initialEvent: targetEvent);
_mouseStates[targetState.device] = targetState;

4
com.unity.uiwidgets/Runtime/widgets/basic.cs


this.softWrap = softWrap;
this.overflow = overflow;
this.textScaleFactor = textScaleFactor;
this.maxLines = maxLines ?? 0;
this.maxLines = maxLines;
this.locale = locale;
this.strutStyle = strutStyle;
this.textWidthBasis = textWidthBasis;

public readonly bool softWrap;
public readonly TextOverflow overflow;
public readonly float textScaleFactor;
public readonly int maxLines;
public readonly int? maxLines;
public readonly Locale locale;
public readonly StrutStyle strutStyle;
public readonly TextWidthBasis textWidthBasis;

13
com.unity.uiwidgets/Runtime/widgets/binding.cs


}
public class WidgetsBinding : RendererBinding {
public static WidgetsBinding instance {
get { return _instance; }
public new static WidgetsBinding instance {
get { return (WidgetsBinding) RendererBinding.instance; }
static WidgetsBinding _instance;
protected override void initInstances() {
base.initInstances();

get { return _buildOwner; }
}
BuildOwner _buildOwner = new BuildOwner();
BuildOwner _buildOwner;
public FocusManager focusManager {
get { return _buildOwner.focusManager; }

public class UiWidgetsBinding : WidgetsBinding {
// todo
public static WidgetsBinding ensureInitialized() {
if (WidgetsBinding.instance == null)
new UiWidgetsBinding();
if (WidgetsBinding.instance == null) {
return new UiWidgetsBinding();
}
return WidgetsBinding.instance;
}
}

2
com.unity.uiwidgets/Runtime/widgets/framework.cs


public T dependOnInheritedWidgetOfExactType<T>(object aspect = null) where T : InheritedWidget {
D.assert(_debugCheckStateIsActiveForAncestorLookup());
InheritedElement ancestor = _inheritedWidgets == null ? null : _inheritedWidgets[typeof(T)];
InheritedElement ancestor = _inheritedWidgets == null ? null : _inheritedWidgets.getOrDefault(typeof(T));
if (ancestor != null) {
D.assert(ancestor is InheritedElement);

2
com.unity.uiwidgets/Runtime/widgets/text.cs


public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
style?.debugFillProperties(properties);
properties.add(new EnumProperty<TextAlign>("textAlign", textAlign.Value, defaultValue: null));
properties.add(new EnumProperty<TextAlign?>("textAlign", textAlign, defaultValue: null));
properties.add(new FlagProperty("softWrap", value: softWrap, ifTrue: "wrapping at box width", ifFalse: "no wrapping except at line break characters", showName: true));
properties.add(new EnumProperty<TextOverflow>("overflow", overflow, defaultValue: null));
properties.add(new IntProperty("maxLines", maxLines, defaultValue: null));

正在加载...
取消
保存