Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
1ab7f161
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1ab7f161
编写于
9月 08, 2015
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1081 from abarth/rm_base
Remove package:sky/base
上级
8289caaf
f7095035
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
61 addition
and
82 deletion
+61
-82
sky/packages/sky/lib/README.md
sky/packages/sky/lib/README.md
+2
-8
sky/packages/sky/lib/base/README.md
sky/packages/sky/lib/base/README.md
+0
-45
sky/packages/sky/lib/gestures/long_press.dart
sky/packages/sky/lib/gestures/long_press.dart
+1
-1
sky/packages/sky/lib/gestures/pointer_router.dart
sky/packages/sky/lib/gestures/pointer_router.dart
+0
-0
sky/packages/sky/lib/gestures/recognizer.dart
sky/packages/sky/lib/gestures/recognizer.dart
+2
-2
sky/packages/sky/lib/mojo/asset_bundle.dart
sky/packages/sky/lib/mojo/asset_bundle.dart
+1
-1
sky/packages/sky/lib/mojo/image_resource.dart
sky/packages/sky/lib/mojo/image_resource.dart
+0
-0
sky/packages/sky/lib/mojo/net/image_cache.dart
sky/packages/sky/lib/mojo/net/image_cache.dart
+1
-1
sky/packages/sky/lib/rendering.dart
sky/packages/sky/lib/rendering.dart
+3
-0
sky/packages/sky/lib/src/painting/README.md
sky/packages/sky/lib/src/painting/README.md
+2
-2
sky/packages/sky/lib/src/painting/box_painter.dart
sky/packages/sky/lib/src/painting/box_painter.dart
+1
-1
sky/packages/sky/lib/src/rendering/README.md
sky/packages/sky/lib/src/rendering/README.md
+0
-1
sky/packages/sky/lib/src/rendering/box.dart
sky/packages/sky/lib/src/rendering/box.dart
+1
-1
sky/packages/sky/lib/src/rendering/debug.dart
sky/packages/sky/lib/src/rendering/debug.dart
+0
-0
sky/packages/sky/lib/src/rendering/hit_test.dart
sky/packages/sky/lib/src/rendering/hit_test.dart
+0
-0
sky/packages/sky/lib/src/rendering/node.dart
sky/packages/sky/lib/src/rendering/node.dart
+31
-0
sky/packages/sky/lib/src/rendering/object.dart
sky/packages/sky/lib/src/rendering/object.dart
+4
-4
sky/packages/sky/lib/src/rendering/sky_binding.dart
sky/packages/sky/lib/src/rendering/sky_binding.dart
+2
-2
sky/packages/sky/lib/src/widgets/README.md
sky/packages/sky/lib/src/widgets/README.md
+0
-1
sky/packages/sky/lib/src/widgets/basic.dart
sky/packages/sky/lib/src/widgets/basic.dart
+2
-2
sky/packages/sky/lib/src/widgets/drag_target.dart
sky/packages/sky/lib/src/widgets/drag_target.dart
+1
-3
sky/packages/sky/lib/src/widgets/framework.dart
sky/packages/sky/lib/src/widgets/framework.dart
+2
-2
sky/unit/test/gestures/long_press_test.dart
sky/unit/test/gestures/long_press_test.dart
+1
-1
sky/unit/test/gestures/pointer_router_test.dart
sky/unit/test/gestures/pointer_router_test.dart
+1
-1
sky/unit/test/gestures/scroll_test.dart
sky/unit/test/gestures/scroll_test.dart
+1
-1
sky/unit/test/gestures/show_press_test.dart
sky/unit/test/gestures/show_press_test.dart
+1
-1
sky/unit/test/gestures/tap_test.dart
sky/unit/test/gestures/tap_test.dart
+1
-1
未找到文件。
sky/packages/sky/lib/README.md
浏览文件 @
1ab7f161
...
...
@@ -8,12 +8,6 @@ The bottom-most layer is the Sky Platform, which is exposed to Dart
code as
[
various `dart:` packages
](
https://api.dartlang.org/
)
,
including
`dart:sky`
.
The
[
base/
](
base/
)
directory contains libraries that extend these core
APIs to provide base classes for tree structures
(
[
base/node.dart
](
base/node.dart
)
), hit testing
(
[
base/hit_test.dart
](
base/hit_test.dart
)
), and debugging
(
[
base/debug.dart
](
base/debug.dart
)
).
Above this layer is the
[
animation
](
animation.dart
)
library,
which provides core animation primitives, and the
[
gestures/
](
gestures/
)
directory, which define a gesture recognition and disambiguation system.
...
...
@@ -49,8 +43,8 @@ Here is a diagram summarizing all this:
| | | painting | |
+-+ +------------+ |
| gestures/ | animation | |
+-----------+---
+
--------+ |
|
base/ | mojo/
|
+-----------+---
-
--------+ |
|
mojo/
|
+------------+--+-+----+------+ -------
| dart:sky | | | Host |
+--------+---+ | | APIs | C++
...
...
sky/packages/sky/lib/base/README.md
已删除
100644 → 0
浏览文件 @
8289caaf
Sky Base
========
AbstractNode
------------
The
[
node.dart
](
node.dart
)
file defines a class,
`AbstractNode`
, which
can be used to build mutable trees.
*
When a subclass is changing the parent of a child, it should
call either parent.adoptChild(child) or parent.dropChild(child)
as appropriate. Subclasses should expose an API for
manipulating the tree if you want to (e.g. a setter for a
'child' property, or an 'add()' method to manipulate a list).
*
You can see the current parent by querying 'parent'.
*
You can see the current attachment state by querying
'attached'. The root of any tree that is to be considered
attached should be manually attached by calling 'attach()'.
Other than that, don't call 'attach()' or 'detach()'. This is
all managed automatically assuming you call the 'adoptChild()'
and 'dropChild()' methods appropriately.
*
Subclasses that have children must override 'attach()' and
'detach()' as described below.
*
Nodes always have a 'depth' greater than their ancestors'.
There's no guarantee regarding depth between siblings. The
depth of a node is used to ensure that nodes are processed in
depth order. The 'depth' of a child can be more than one
greater than the 'depth' of the parent, because the 'depth'
values are never decreased: all that matters is that it's
greater than the parent. Consider a tree with a root node A, a
child B, and a grandchild C. Initially, A will have 'depth' 0,
B 'depth' 1, and C 'depth' 2. If C is moved to be a child of A,
sibling of B, then the numbers won't change. C's 'depth' will
still be 2. This is all managed automatically assuming you call
'adoptChild()' and 'dropChild()' appropriately.
Dependencies
------------
No dependencies except for
`dart:sky`
and Dart's core libraries.
sky/packages/sky/lib/gestures/long_press.dart
浏览文件 @
1ab7f161
...
...
@@ -4,9 +4,9 @@
import
'dart:sky'
as
sky
;
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/constants.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
import
'package:sky/gestures/recognizer.dart'
;
typedef
void
GestureLongPressListener
(
);
...
...
sky/packages/sky/lib/
base
/pointer_router.dart
→
sky/packages/sky/lib/
gestures
/pointer_router.dart
浏览文件 @
1ab7f161
文件已移动
sky/packages/sky/lib/gestures/recognizer.dart
浏览文件 @
1ab7f161
...
...
@@ -5,11 +5,11 @@
import
'dart:async'
;
import
'dart:sky'
as
sky
;
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/constants.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
export
'package:sky/
base
/pointer_router.dart'
show
PointerRouter
;
export
'package:sky/
gestures
/pointer_router.dart'
show
PointerRouter
;
abstract
class
GestureRecognizer
extends
GestureArenaMember
{
GestureRecognizer
({
PointerRouter
router
})
:
_router
=
router
;
...
...
sky/packages/sky/lib/mojo/asset_bundle.dart
浏览文件 @
1ab7f161
...
...
@@ -9,7 +9,7 @@ import 'dart:typed_data';
import
'package:mojo/core.dart'
as
core
;
import
'package:mojo_services/mojo/asset_bundle/asset_bundle.mojom.dart'
;
import
'package:sky/
base
/image_resource.dart'
;
import
'package:sky/
mojo
/image_resource.dart'
;
import
'package:sky/mojo/net/fetch.dart'
;
import
'package:sky/mojo/net/image_cache.dart'
as
image_cache
;
import
'package:sky/mojo/shell.dart'
as
shell
;
...
...
sky/packages/sky/lib/
base
/image_resource.dart
→
sky/packages/sky/lib/
mojo
/image_resource.dart
浏览文件 @
1ab7f161
文件已移动
sky/packages/sky/lib/mojo/net/image_cache.dart
浏览文件 @
1ab7f161
...
...
@@ -7,7 +7,7 @@ import 'dart:collection';
import
'dart:sky'
as
sky
;
import
'package:mojo/mojo/url_response.mojom.dart'
;
import
'package:sky/
base
/image_resource.dart'
;
import
'package:sky/
mojo
/image_resource.dart'
;
import
'package:sky/mojo/net/fetch.dart'
;
final
HashMap
<
String
,
ImageResource
>
_cache
=
new
Map
<
String
,
ImageResource
>();
...
...
sky/packages/sky/lib/rendering.dart
浏览文件 @
1ab7f161
...
...
@@ -10,10 +10,13 @@ library rendering;
export
'package:sky/src/rendering/auto_layout.dart'
;
export
'package:sky/src/rendering/block.dart'
;
export
'package:sky/src/rendering/box.dart'
;
export
'package:sky/src/rendering/debug.dart'
;
export
'package:sky/src/rendering/flex.dart'
;
export
'package:sky/src/rendering/grid.dart'
;
export
'package:sky/src/rendering/hit_test.dart'
;
export
'package:sky/src/rendering/image.dart'
;
export
'package:sky/src/rendering/layer.dart'
;
export
'package:sky/src/rendering/node.dart'
;
export
'package:sky/src/rendering/object.dart'
;
export
'package:sky/src/rendering/paragraph.dart'
;
export
'package:sky/src/rendering/proxy_box.dart'
;
...
...
sky/packages/sky/lib/src/painting/README.md
浏览文件 @
1ab7f161
This directory contains painting-related libraries that only depend on
core Dart libraries
,
`../base/*`
, and
[
animation.dart
](
../animation.dart
)
. Note
that
[
animation.dart
](
../animation.dart
)
depends on the Newton Dart library.
core Dart libraries
and
[
animation.dart
](
../
../animation.dart
)
. Note
that
[
animation.dart
](
../
../
animation.dart
)
depends on the Newton Dart library.
sky/packages/sky/lib/src/painting/box_painter.dart
浏览文件 @
1ab7f161
...
...
@@ -6,7 +6,7 @@ import 'dart:math' as math;
import
'dart:sky'
as
sky
;
import
'dart:sky'
show
Point
,
Offset
,
Size
,
Rect
,
Color
,
Paint
,
Path
;
import
'package:sky/
base
/image_resource.dart'
;
import
'package:sky/
mojo
/image_resource.dart'
;
import
'package:sky/src/painting/shadows.dart'
;
/// An immutable set of offsets in each of the four cardinal directions
...
...
sky/packages/sky/lib/src/rendering/README.md
浏览文件 @
1ab7f161
...
...
@@ -385,6 +385,5 @@ Dependencies
------------
*
[
`package:sky/animation.dart`
](
../../animation.dart
)
*
[
`package:sky/base`
](
../../base
)
*
[
`package:sky/mojo`
](
../../mojo
)
*
[
`package:sky/painting.dart`
](
../../painting.dart
)
sky/packages/sky/lib/src/rendering/box.dart
浏览文件 @
1ab7f161
...
...
@@ -5,8 +5,8 @@
import
'dart:math'
as
math
;
import
'dart:sky'
as
sky
;
import
'package:sky/base/debug.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/debug.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:vector_math/vector_math.dart'
;
...
...
sky/packages/sky/lib/
base
/debug.dart
→
sky/packages/sky/lib/
src/rendering
/debug.dart
浏览文件 @
1ab7f161
文件已移动
sky/packages/sky/lib/
base
/hit_test.dart
→
sky/packages/sky/lib/
src/rendering
/hit_test.dart
浏览文件 @
1ab7f161
文件已移动
sky/packages/sky/lib/
base
/node.dart
→
sky/packages/sky/lib/
src/rendering
/node.dart
浏览文件 @
1ab7f161
...
...
@@ -6,6 +6,37 @@
///
/// AbstractNode has as notion of depth, attachment, and parent, but does not
/// have a model for children.
///
/// * When a subclass is changing the parent of a child, it should
/// call either parent.adoptChild(child) or parent.dropChild(child)
/// as appropriate. Subclasses should expose an API for
/// manipulating the tree if you want to (e.g. a setter for a
/// 'child' property, or an 'add()' method to manipulate a list).
///
/// * You can see the current parent by querying 'parent'.
///
/// * You can see the current attachment state by querying
/// 'attached'. The root of any tree that is to be considered
/// attached should be manually attached by calling 'attach()'.
/// Other than that, don't call 'attach()' or 'detach()'. This is
/// all managed automatically assuming you call the 'adoptChild()'
/// and 'dropChild()' methods appropriately.
///
/// * Subclasses that have children must override 'attach()' and
/// 'detach()' as described below.
///
/// * Nodes always have a 'depth' greater than their ancestors'.
/// There's no guarantee regarding depth between siblings. The
/// depth of a node is used to ensure that nodes are processed in
/// depth order. The 'depth' of a child can be more than one
/// greater than the 'depth' of the parent, because the 'depth'
/// values are never decreased: all that matters is that it's
/// greater than the parent. Consider a tree with a root node A, a
/// child B, and a grandchild C. Initially, A will have 'depth' 0,
/// B 'depth' 1, and C 'depth' 2. If C is moved to be a child of A,
/// sibling of B, then the numbers won't change. C's 'depth' will
/// still be 2. This is all managed automatically assuming you call
/// 'adoptChild()' and 'dropChild()' appropriately.
class
AbstractNode
{
// AbstractNode represents a node in a tree.
...
...
sky/packages/sky/lib/src/rendering/object.dart
浏览文件 @
1ab7f161
...
...
@@ -7,14 +7,14 @@ import 'dart:sky' as sky;
import
'dart:sky'
show
Point
,
Offset
,
Size
,
Rect
,
Color
,
Paint
,
Path
;
import
'package:sky/animation.dart'
;
import
'package:sky/base/debug.dart'
;
import
'package:sky/base/hit_test.dart'
;
import
'package:sky/base/node.dart'
;
import
'package:sky/src/rendering/debug.dart'
;
import
'package:sky/src/rendering/hit_test.dart'
;
import
'package:sky/src/rendering/layer.dart'
;
import
'package:sky/src/rendering/node.dart'
;
import
'package:vector_math/vector_math.dart'
;
export
'dart:sky'
show
Point
,
Offset
,
Size
,
Rect
,
Color
,
Paint
,
Path
;
export
'package:sky/
base
/hit_test.dart'
show
EventDisposition
,
HitTestTarget
,
HitTestEntry
,
HitTestResult
;
export
'package:sky/
src/rendering
/hit_test.dart'
show
EventDisposition
,
HitTestTarget
,
HitTestEntry
,
HitTestResult
;
/// Base class for data associated with a [RenderObject] by its parent
///
...
...
sky/packages/sky/lib/src/rendering/sky_binding.dart
浏览文件 @
1ab7f161
...
...
@@ -5,10 +5,10 @@
import
'dart:sky'
as
sky
;
import
'package:sky/animation.dart'
;
import
'package:sky/base/hit_test.dart'
;
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:sky/src/rendering/hit_test.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/rendering/view.dart'
;
...
...
sky/packages/sky/lib/src/widgets/README.md
浏览文件 @
1ab7f161
...
...
@@ -501,7 +501,6 @@ Dependencies
*
`package:vector_math`
*
[
`package:sky/animation.dart`
](
../../animation.dart
)
*
[
`package:sky/base`
](
../../base
)
*
[
`package:sky/painting.dart`
](
../../painting.dart
)
*
[
`package:sky/rendering.dart`
](
../../rendering.dart
)
*
[
`package:sky/theme`
](
../../theme
)
sky/packages/sky/lib/src/widgets/basic.dart
浏览文件 @
1ab7f161
...
...
@@ -6,8 +6,8 @@ import 'dart:sky' as sky;
import
'package:vector_math/vector_math.dart'
;
import
'package:sky/base/image_resource.dart'
;
import
'package:sky/mojo/asset_bundle.dart'
;
import
'package:sky/mojo/image_resource.dart'
;
import
'package:sky/mojo/net/image_cache.dart'
as
image_cache
;
import
'package:sky/src/painting/text_painter.dart'
;
import
'package:sky/src/painting/text_style.dart'
;
...
...
@@ -25,11 +25,11 @@ import 'package:sky/src/rendering/viewport.dart';
import
'package:sky/src/widgets/default_text_style.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
export
'package:sky/base/hit_test.dart'
show
EventDisposition
,
combineEventDispositions
;
export
'package:sky/src/painting/text_style.dart'
;
export
'package:sky/src/rendering/block.dart'
show
BlockDirection
;
export
'package:sky/src/rendering/box.dart'
show
BoxConstraints
;
export
'package:sky/src/rendering/flex.dart'
show
FlexJustifyContent
,
FlexAlignItems
,
FlexDirection
;
export
'package:sky/src/rendering/hit_test.dart'
show
EventDisposition
,
combineEventDispositions
;
export
'package:sky/src/rendering/object.dart'
show
Point
,
Offset
,
Size
,
Rect
,
Color
,
Paint
,
Path
;
export
'package:sky/src/rendering/proxy_box.dart'
show
BackgroundImage
,
BoxDecoration
,
BoxDecorationPosition
,
BoxShadow
,
Border
,
BorderSide
,
EdgeDims
,
Shape
;
export
'package:sky/src/rendering/shifted_box.dart'
show
ShrinkWrap
;
...
...
sky/packages/sky/lib/src/widgets/drag_target.dart
浏览文件 @
1ab7f161
...
...
@@ -4,9 +4,7 @@
import
'dart:collection'
;
import
'package:sky/base/hit_test.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/rendering/sky_binding.dart'
;
import
'package:sky/rendering.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
...
...
sky/packages/sky/lib/src/widgets/framework.dart
浏览文件 @
1ab7f161
...
...
@@ -7,15 +7,15 @@ import 'dart:collection';
import
'dart:sky'
as
sky
;
import
'package:sky/animation.dart'
;
import
'package:sky/base/hit_test.dart'
;
import
'package:sky/mojo/activity.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:sky/src/rendering/hit_test.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/rendering/sky_binding.dart'
;
import
'package:sky/src/rendering/view.dart'
;
export
'package:sky/base/hit_test.dart'
show
EventDisposition
,
combineEventDispositions
;
export
'package:sky/src/rendering/box.dart'
show
BoxConstraints
,
BoxDecoration
,
Border
,
BorderSide
,
EdgeDims
;
export
'package:sky/src/rendering/hit_test.dart'
show
EventDisposition
,
combineEventDispositions
;
export
'package:sky/src/rendering/object.dart'
show
Point
,
Offset
,
Size
,
Rect
,
Color
,
Paint
,
Path
;
final
bool
_shouldLogRenderDuration
=
false
;
// see also 'enableProfilingLoop' argument to runApp()
...
...
sky/unit/test/gestures/long_press_test.dart
浏览文件 @
1ab7f161
import
'package:quiver/testing/async.dart'
;
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/long_press.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
import
'package:sky/gestures/show_press.dart'
;
import
'package:test/test.dart'
;
...
...
sky/unit/test/
base
/pointer_router_test.dart
→
sky/unit/test/
gestures
/pointer_router_test.dart
浏览文件 @
1ab7f161
import
'dart:sky'
as
sky
;
import
'package:sky/
base
/pointer_router.dart'
;
import
'package:sky/
gestures
/pointer_router.dart'
;
import
'package:test/test.dart'
;
import
'../engine/mock_events.dart'
;
...
...
sky/unit/test/gestures/scroll_test.dart
浏览文件 @
1ab7f161
import
'dart:sky'
as
sky
;
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
import
'package:sky/gestures/scroll.dart'
;
import
'package:sky/gestures/tap.dart'
;
import
'package:test/test.dart'
;
...
...
sky/unit/test/gestures/show_press_test.dart
浏览文件 @
1ab7f161
import
'package:quiver/testing/async.dart'
;
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
import
'package:sky/gestures/show_press.dart'
;
import
'package:test/test.dart'
;
...
...
sky/unit/test/gestures/tap_test.dart
浏览文件 @
1ab7f161
import
'package:sky/base/pointer_router.dart'
;
import
'package:sky/gestures/arena.dart'
;
import
'package:sky/gestures/pointer_router.dart'
;
import
'package:sky/gestures/tap.dart'
;
import
'package:test/test.dart'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录