Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
ad5e8783
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,发现更多精彩内容 >>
提交
ad5e8783
编写于
3月 03, 2016
作者:
I
Ian Hickson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more dart:ui dartdocs
上级
9255c950
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
43 addition
and
10 deletion
+43
-10
sky/engine/bindings/dart_ui.dart
sky/engine/bindings/dart_ui.dart
+7
-0
sky/engine/core/dart/painting.dart
sky/engine/core/dart/painting.dart
+20
-3
sky/engine/core/dart/window.dart
sky/engine/core/dart/window.dart
+16
-7
未找到文件。
sky/engine/bindings/dart_ui.dart
浏览文件 @
ad5e8783
...
@@ -2,6 +2,13 @@
...
@@ -2,6 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
/// Built-in types and core primitives for a Flutter application.
///
/// This library exposes the lowest-level services that Flutter frameworks use
/// to bootstrap applications, such as methods to obtain handles for the mojo
/// IPC system, classes for driving the graphics and text layout and rendering
/// subsystems, callbacks for integrating with the engine scheduler and the
/// pointer input system, and functions for image decoding.
library
dart_ui
;
library
dart_ui
;
import
'dart:async'
;
import
'dart:async'
;
...
...
sky/engine/core/dart/painting.dart
浏览文件 @
ad5e8783
...
@@ -4,21 +4,36 @@
...
@@ -4,21 +4,36 @@
part of
dart_ui
;
part of
dart_ui
;
/// Opaque handle to raw decoded image data (pixels).
///
/// To obtain an Image object, use the [decodeImageFromDataPipe] or
/// [decodeImageFromList] functions.
///
/// To draw an Image, use one of the methods on the [Canvas] class, such as
/// [drawImage].
abstract
class
Image
extends
NativeFieldWrapperClass2
{
abstract
class
Image
extends
NativeFieldWrapperClass2
{
/// The number of image pixels along the image's horizontal axis.
int
get
width
native
"Image_width"
;
int
get
width
native
"Image_width"
;
/// The number of image pixels along the image's vertical axis.
int
get
height
native
"Image_height"
;
int
get
height
native
"Image_height"
;
/// Release the resources used by this object. The object is no longer usable
/// after this method is called.
void
dispose
()
native
"Image_dispose"
;
void
dispose
()
native
"Image_dispose"
;
String
toString
()
=>
'[
$width
\
u00D7
$height
]'
;
String
toString
()
=>
'[
$width
\
u00D7
$height
]'
;
}
}
typedef
void
_ImageDecoderCallback
(
Image
result
);
/// Callback signature for [decodeImageFromDataPipe] and [decodeImageFromList].
typedef
void
ImageDecoderCallback
(
Image
result
);
void
decodeImageFromDataPipe
(
int
handle
,
_ImageDecoderCallback
callback
)
/// Convert an image file from a mojo pipe into an [Image] object.
void
decodeImageFromDataPipe
(
int
handle
,
ImageDecoderCallback
callback
)
native
"decodeImageFromDataPipe"
;
native
"decodeImageFromDataPipe"
;
void
decodeImageFromList
(
Uint8List
list
,
_ImageDecoderCallback
callback
)
/// Convert an image file from a byte array into an [Image] object.
void
decodeImageFromList
(
Uint8List
list
,
ImageDecoderCallback
callback
)
native
"decodeImageFromList"
;
native
"decodeImageFromList"
;
class
Path
extends
NativeFieldWrapperClass2
{
class
Path
extends
NativeFieldWrapperClass2
{
...
@@ -335,6 +350,8 @@ abstract class Picture extends NativeFieldWrapperClass2 {
...
@@ -335,6 +350,8 @@ abstract class Picture extends NativeFieldWrapperClass2 {
/// canvas the option of just taking a ref.
/// canvas the option of just taking a ref.
void
playback
(
Canvas
canvas
)
native
"Picture_playback"
;
void
playback
(
Canvas
canvas
)
native
"Picture_playback"
;
/// Release the resources used by this object. The object is no longer usable
/// after this method is called.
void
dispose
()
native
"Picture_dispose"
;
void
dispose
()
native
"Picture_dispose"
;
}
}
...
...
sky/engine/core/dart/window.dart
浏览文件 @
ad5e8783
...
@@ -4,10 +4,17 @@
...
@@ -4,10 +4,17 @@
part of
dart_ui
;
part of
dart_ui
;
/// Signature of callbacks that have no arguments and return no data.
typedef
void
VoidCallback
(
);
typedef
void
VoidCallback
(
);
typedef
void
_FrameCallback
(
Duration
duration
);
typedef
void
_PointerPacketCallback
(
ByteData
serializedPacket
);
/// Signature for [Window.onBeginFrame].
typedef
void
_AppLifecycleStateCallback
(
AppLifecycleState
state
);
typedef
void
FrameCallback
(
Duration
duration
);
/// Signature for [Window.onPointerPacket].
typedef
void
PointerPacketCallback
(
ByteData
serializedPacket
);
/// Signature for [Window.onAppLifecycleStateChanged].
typedef
void
AppLifecycleStateCallback
(
AppLifecycleState
state
);
/// States that an application can be in.
/// States that an application can be in.
///
///
...
@@ -103,19 +110,19 @@ class Window {
...
@@ -103,19 +110,19 @@ class Window {
/// A callback that is invoked when there is a transition in the application's
/// A callback that is invoked when there is a transition in the application's
/// lifecycle (such as pausing or resuming).
/// lifecycle (such as pausing or resuming).
_
AppLifecycleStateCallback
onAppLifecycleStateChanged
;
AppLifecycleStateCallback
onAppLifecycleStateChanged
;
/// A callback that is invoked to notify the application that it is an
/// A callback that is invoked to notify the application that it is an
/// appropriate time to provide a scene using the [SceneBuilder] API and the
/// appropriate time to provide a scene using the [SceneBuilder] API and the
/// [render()] method. When possible, this is driven by the hardware VSync
/// [render()] method. When possible, this is driven by the hardware VSync
/// signal. This is only called if [scheduleFrame()] has been called since the
/// signal. This is only called if [scheduleFrame()] has been called since the
/// last time this callback was invoked.
/// last time this callback was invoked.
_
FrameCallback
onBeginFrame
;
FrameCallback
onBeginFrame
;
/// A callback that is invoked when pointer data is available. The data is
/// A callback that is invoked when pointer data is available. The data is
/// provided in the form of a raw byte stream containing an encoded mojo
/// provided in the form of a raw byte stream containing an encoded mojo
/// PointerPacket.
/// PointerPacket.
_
PointerPacketCallback
onPointerPacket
;
PointerPacketCallback
onPointerPacket
;
/// The route or path that the operating system requested when the application
/// The route or path that the operating system requested when the application
/// was launched.
/// was launched.
...
@@ -140,5 +147,7 @@ class Window {
...
@@ -140,5 +147,7 @@ class Window {
void
flushRealTimeEvents
()
native
"Scheduler_FlushRealTimeEvents"
;
void
flushRealTimeEvents
()
native
"Scheduler_FlushRealTimeEvents"
;
}
}
/// The [Window] singleton.
/// The [Window] singleton. This object exposes the size of the display, the
/// core scheduler API, the input event callback, the graphics drawing API, and
/// other such core services.
final
Window
window
=
new
Window
.
_
();
final
Window
window
=
new
Window
.
_
();
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录