Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
62c6f657
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
62c6f657
编写于
6月 05, 2017
作者:
I
Ian Hickson
提交者:
GitHub
6月 05, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add breadcrumbs from dart:ui to other docs. (#3741)
上级
8686a458
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
84 addition
and
2 deletion
+84
-2
lib/ui/window.dart
lib/ui/window.dart
+84
-2
未找到文件。
lib/ui/window.dart
浏览文件 @
62c6f657
...
...
@@ -32,6 +32,11 @@ typedef void PlatformMessageCallback(String name, ByteData data, PlatformMessage
/// notifications. For example, if the users pulls out the battery from the
/// device, no notification will be sent before the application is suddenly
/// terminated, along with the rest of the operating system.
///
/// See also:
///
/// * [WidgetsBindingObserver], for a mechanism to observe the lifecycle state
/// from the widgets layer.
enum
AppLifecycleState
{
/// The application is visible and responding to user input.
resumed
,
...
...
@@ -71,6 +76,14 @@ enum AppLifecycleState {
///
/// For a generic class that represents distances around a rectangle, see the
/// [EdgeInsets] class.
///
/// See also:
///
/// * [WidgetsBindingObserver], for a widgets layer mechanism to receive
/// notifications when the padding changes.
/// * [MediaQuery.of], a simpler mechanism for the same.
/// * [Scaffold], which automatically applies the padding in material design
/// applications.
class
WindowPadding
{
const
WindowPadding
.
_
({
this
.
left
,
this
.
top
,
this
.
right
,
this
.
bottom
});
...
...
@@ -93,14 +106,21 @@ class WindowPadding {
/// An identifier used to select a user's language and formatting preferences,
/// consisting of a language and a country. This is a subset of locale
/// identifiers as defined by BCP 47.
///
/// See also:
///
/// * [Window.locale], which specifies the system's currently selected
/// [Locale].
class
Locale
{
/// Creates a new Locale object. The first argument is the
/// primary language subtag, the second is the region subtag.
///
/// For example:
///
/// const Locale swissFrench = const Locale('fr', 'CH');
/// const Locale canadianFrench = const Locale('fr', 'CA');
/// ```dart
/// const Locale swissFrench = const Locale('fr', 'CH');
/// const Locale canadianFrench = const Locale('fr', 'CA');
/// ```
const
Locale
(
this
.
languageCode
,
this
.
countryCode
);
/// The primary language subtag for the locale.
...
...
@@ -149,11 +169,24 @@ class Window {
/// hardware itself, the device drivers, or a hard-coded value stored in the
/// operating system or firmware, and may be inaccurate, sometimes by a
/// significant margin.
///
/// The Flutter framework operates in logical pixels, so it is rarely
/// necessary to directly deal with this property.
///
/// See also:
///
/// * [WidgetsBindingObserver], for a mechanism at the widgets layer to
/// observe when this value changes.
double
get
devicePixelRatio
=>
_devicePixelRatio
;
double
_devicePixelRatio
=
1.0
;
/// The dimensions of the rectangle into which the application will be drawn,
/// in physical pixels.
///
/// See also:
///
/// * [WidgetsBindingObserver], for a mechanism at the widgets layer to
/// observe when this value changes.
Size
get
physicalSize
=>
_physicalSize
;
Size
_physicalSize
=
Size
.
zero
;
...
...
@@ -162,6 +195,14 @@ class Window {
/// likely place system UI (such as the Android system notification area), or
/// which might be rendered outside of the physical display (e.g. overscan
/// regions on television screens).
///
/// See also:
///
/// * [WidgetsBindingObserver], for a mechanism at the widgets layer to
/// observe when this value changes.
/// * [MediaQuery.of], a simpler mechanism for the same.
/// * [Scaffold], which automatically applies the padding in material design
/// applications.
WindowPadding
get
padding
=>
_padding
;
WindowPadding
_padding
=
WindowPadding
.
zero
;
...
...
@@ -177,10 +218,20 @@ class Window {
/// should, if possible, use to render their user interface.
///
/// The [onLocaleChanged] callback is called whenever this value changes.
///
/// See also:
///
/// * [WidgetsBindingObserver], for a mechanism at the widgets layer to
/// observe when this value changes.
Locale
get
locale
=>
_locale
;
Locale
_locale
;
/// A callback that is invoked whenever [locale] changes value.
///
/// See also:
///
/// * [WidgetsBindingObserver], for a mechanism at the widgets layer to
/// observe when this callback is invoked.
VoidCallback
onLocaleChanged
;
/// A callback that is invoked to notify the application that it is an
...
...
@@ -192,15 +243,34 @@ class Window {
/// The [onDrawFrame] callback is invoked immediately after [onBeginFrame],
/// after draining any microtasks (e.g. completions of any [Future]s) queued
/// by the [onBeginFrame] handler.
///
/// See also:
///
/// * [SchedulerBinding], the Flutter framework class which manages the
/// scheduling of frames.
/// * [RendererBinding], the Flutter framework class which manages layout and
/// painting.
FrameCallback
onBeginFrame
;
/// A callback that is invoked for each frame after [onBeginFrame] has
/// completed and after the microtask queue has been drained. This can be
/// used to implement a second phase of frame rendering that happens
/// after any deferred work queued by the [onBeginFrame] phase.
///
/// See also:
///
/// * [SchedulerBinding], the Flutter framework class which manages the
/// scheduling of frames.
/// * [RendererBinding], the Flutter framework class which manages layout and
/// painting.
VoidCallback
onDrawFrame
;
/// A callback that is invoked when pointer data is available.
///
/// See also:
///
/// * [GestureBinding], the Flutter framework class which manages pointer
/// events.
PointerDataPacketCallback
onPointerDataPacket
;
/// The route or path that the operating system requested when the application
...
...
@@ -210,6 +280,11 @@ class Window {
/// Requests that, at the next appropriate opportunity, the [onBeginFrame]
/// and [onDrawFrame] callbacks be invoked.
///
/// See also:
///
/// * [SchedulerBinding], the Flutter framework class which manages the
/// scheduling of frames.
void
scheduleFrame
()
native
"Window_scheduleFrame"
;
/// Updates the application's rendering on the GPU with the newly provided
...
...
@@ -229,6 +304,13 @@ class Window {
/// [SceneBuilder.addPicture]. With the [SceneBuilder.build] method you can
/// then obtain a [Scene] object, which you can display to the user via this
/// [render] function.
///
/// See also:
///
/// * [SchedulerBinding], the Flutter framework class which manages the
/// scheduling of frames.
/// * [RendererBinding], the Flutter framework class which manages layout and
/// painting.
void
render
(
Scene
scene
)
native
"Window_render"
;
/// Whether the user has requested that [updateSemantics] be called when
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录