Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
7e128249
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,发现更多精彩内容 >>
未验证
提交
7e128249
编写于
5月 14, 2020
作者:
C
Chris Bracken
提交者:
GitHub
5月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
null-annotate lib/ui/pointer.dart (#18354)
上级
4afc2b4d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
60 addition
and
60 deletion
+60
-60
lib/ui/pointer.dart
lib/ui/pointer.dart
+30
-30
lib/web_ui/lib/src/ui/pointer.dart
lib/web_ui/lib/src/ui/pointer.dart
+30
-30
未找到文件。
lib/ui/pointer.dart
浏览文件 @
7e128249
...
...
@@ -102,50 +102,50 @@ class PointerData {
});
/// Time of event dispatch, relative to an arbitrary timeline.
final
Duration
timeStamp
;
final
Duration
/*!*/
timeStamp
;
/// How the pointer has changed since the last report.
final
PointerChange
change
;
final
PointerChange
/*!*/
change
;
/// The kind of input device for which the event was generated.
final
PointerDeviceKind
kind
;
final
PointerDeviceKind
/*!*/
kind
;
/// The kind of signal for a pointer signal event.
final
PointerSignalKind
signalKind
;
final
PointerSignalKind
/*?*/
signalKind
;
/// Unique identifier for the pointing device, reused across interactions.
final
int
device
;
final
int
/*!*/
device
;
/// Unique identifier for the pointer.
///
/// This field changes for each new pointer down event. Framework uses this
/// identifier to determine hit test result.
final
int
pointerIdentifier
;
final
int
/*!*/
pointerIdentifier
;
/// X coordinate of the position of the pointer, in physical pixels in the
/// global coordinate space.
final
double
physicalX
;
final
double
/*!*/
physicalX
;
/// Y coordinate of the position of the pointer, in physical pixels in the
/// global coordinate space.
final
double
physicalY
;
final
double
/*!*/
physicalY
;
/// The distance of pointer movement on X coordinate in physical pixels.
final
double
physicalDeltaX
;
final
double
/*!*/
physicalDeltaX
;
/// The distance of pointer movement on Y coordinate in physical pixels.
final
double
physicalDeltaY
;
final
double
/*!*/
physicalDeltaY
;
/// Bit field using the *Button constants (primaryMouseButton,
/// secondaryStylusButton, etc). For example, if this has the value 6 and the
/// [kind] is [PointerDeviceKind.invertedStylus], then this indicates an
/// upside-down stylus with both its primary and secondary buttons pressed.
final
int
buttons
;
final
int
/*!*/
buttons
;
/// Set if an application from a different security domain is in any way
/// obscuring this application's window. (Aspirational; not currently
/// implemented.)
final
bool
obscured
;
final
bool
/*!*/
obscured
;
/// Set if this pointer data was synthesized by pointer data packet converter.
/// pointer data packet converter will synthesize additional pointer datas if
...
...
@@ -153,34 +153,34 @@ class PointerData {
///
/// For example, a down pointer data will be synthesized if the converter receives
/// a move pointer data while the pointer is not previously down.
final
bool
synthesized
;
final
bool
/*!*/
synthesized
;
/// The pressure of the touch as a number ranging from 0.0, indicating a touch
/// with no discernible pressure, to 1.0, indicating a touch with "normal"
/// pressure, and possibly beyond, indicating a stronger touch. For devices
/// that do not detect pressure (e.g. mice), returns 1.0.
final
double
pressure
;
final
double
/*!*/
pressure
;
/// The minimum value that [pressure] can return for this pointer. For devices
/// that do not detect pressure (e.g. mice), returns 1.0. This will always be
/// a number less than or equal to 1.0.
final
double
pressureMin
;
final
double
/*!*/
pressureMin
;
/// The maximum value that [pressure] can return for this pointer. For devices
/// that do not detect pressure (e.g. mice), returns 1.0. This will always be
/// a greater than or equal to 1.0.
final
double
pressureMax
;
final
double
/*!*/
pressureMax
;
/// The distance of the detected object from the input surface (e.g. the
/// distance of a stylus or finger from a touch screen), in arbitrary units on
/// an arbitrary (not necessarily linear) scale. If the pointer is down, this
/// is 0.0 by definition.
final
double
distance
;
final
double
/*!*/
distance
;
/// The maximum value that a distance can return for this pointer. If this
/// input device cannot detect "hover touch" input events, then this will be
/// 0.0.
final
double
distanceMax
;
final
double
/*!*/
distanceMax
;
/// The area of the screen being pressed, scaled to a value between 0 and 1.
/// The value of size can be used to determine fat touch events. This value
...
...
@@ -188,21 +188,21 @@ class PointerData {
/// the range of detectable values. So, for example, the value of 0.1 could
/// mean a touch with the tip of the finger, 0.2 a touch with full finger,
/// and 0.3 the full palm.
final
double
size
;
final
double
/*!*/
size
;
/// The radius of the contact ellipse along the major axis, in logical pixels.
final
double
radiusMajor
;
final
double
/*!*/
radiusMajor
;
/// The radius of the contact ellipse along the minor axis, in logical pixels.
final
double
radiusMinor
;
final
double
/*!*/
radiusMinor
;
/// The minimum value that could be reported for radiusMajor and radiusMinor
/// for this pointer, in logical pixels.
final
double
radiusMin
;
final
double
/*!*/
radiusMin
;
/// The minimum value that could be reported for radiusMajor and radiusMinor
/// for this pointer, in logical pixels.
final
double
radiusMax
;
final
double
/*!*/
radiusMax
;
/// For PointerDeviceKind.touch events:
///
...
...
@@ -229,7 +229,7 @@ class PointerData {
/// indicate that the stylus would go down in the negative y-axis direction;
/// pi/4 would indicate that the stylus goes up and to the right, -pi/2 would
/// indicate that the stylus goes to the left, etc).
final
double
orientation
;
final
double
/*!*/
orientation
;
/// For PointerDeviceKind.stylus and PointerDeviceKind.invertedStylus events:
///
...
...
@@ -241,20 +241,20 @@ class PointerData {
/// perpendicular to the input surface (thus 0.0 indicates the stylus is
/// orthogonal to the plane of the input surface, while pi/2 indicates that
/// the stylus is flat on that surface).
final
double
tilt
;
final
double
/*!*/
tilt
;
/// Opaque platform-specific data associated with the event.
final
int
platformData
;
final
int
/*!*/
platformData
;
/// For events with signalKind of PointerSignalKind.scroll:
///
/// The amount to scroll in the x direction, in physical pixels.
final
double
scrollDeltaX
;
final
double
/*!*/
scrollDeltaX
;
/// For events with signalKind of PointerSignalKind.scroll:
///
/// The amount to scroll in the y direction, in physical pixels.
final
double
scrollDeltaY
;
final
double
/*!*/
scrollDeltaY
;
@override
String
toString
()
=>
'PointerData(x:
$physicalX
, y:
$physicalY
)'
;
...
...
@@ -296,10 +296,10 @@ class PointerData {
/// A sequence of reports about the state of pointers.
class
PointerDataPacket
{
/// Creates a packet of pointer data reports.
const
PointerDataPacket
({
this
.
data
=
const
<
PointerData
>[]
});
const
PointerDataPacket
({
this
.
data
=
const
<
PointerData
>[]
})
:
assert
(
data
!=
null
)
;
/// Data about the individual pointers in this packet.
///
/// This list might contain multiple pieces of data about the same pointer.
final
List
<
PointerData
>
data
;
final
List
<
PointerData
/*!*/
>
/*!*/
data
;
}
lib/web_ui/lib/src/ui/pointer.dart
浏览文件 @
7e128249
...
...
@@ -102,50 +102,50 @@ class PointerData {
});
/// Time of event dispatch, relative to an arbitrary timeline.
final
Duration
timeStamp
;
final
Duration
/*!*/
timeStamp
;
/// How the pointer has changed since the last report.
final
PointerChange
change
;
final
PointerChange
/*!*/
change
;
/// The kind of input device for which the event was generated.
final
PointerDeviceKind
kind
;
final
PointerDeviceKind
/*!*/
kind
;
/// The kind of signal for a pointer signal event.
final
PointerSignalKind
signalKind
;
final
PointerSignalKind
/*?*/
signalKind
;
/// Unique identifier for the pointing device, reused across interactions.
final
int
device
;
final
int
/*!*/
device
;
/// Unique identifier for the pointer.
///
/// This field changes for each new pointer down event. Framework uses this
/// identifier to determine hit test result.
final
int
pointerIdentifier
;
final
int
/*!*/
pointerIdentifier
;
/// X coordinate of the position of the pointer, in physical pixels in the
/// global coordinate space.
final
double
physicalX
;
final
double
/*!*/
physicalX
;
/// Y coordinate of the position of the pointer, in physical pixels in the
/// global coordinate space.
final
double
physicalY
;
final
double
/*!*/
physicalY
;
/// The distance of pointer movement on X coordinate in physical pixels.
final
double
physicalDeltaX
;
final
double
/*!*/
physicalDeltaX
;
/// The distance of pointer movement on Y coordinate in physical pixels.
final
double
physicalDeltaY
;
final
double
/*!*/
physicalDeltaY
;
/// Bit field using the *Button constants (primaryMouseButton,
/// secondaryStylusButton, etc). For example, if this has the value 6 and the
/// [kind] is [PointerDeviceKind.invertedStylus], then this indicates an
/// upside-down stylus with both its primary and secondary buttons pressed.
final
int
buttons
;
final
int
/*!*/
buttons
;
/// Set if an application from a different security domain is in any way
/// obscuring this application's window. (Aspirational; not currently
/// implemented.)
final
bool
obscured
;
final
bool
/*!*/
obscured
;
/// Set if this pointer data was synthesized by pointer data packet converter.
/// pointer data packet converter will synthesize additional pointer datas if
...
...
@@ -153,34 +153,34 @@ class PointerData {
///
/// For example, a down pointer data will be synthesized if the converter receives
/// a move pointer data while the pointer is not previously down.
final
bool
synthesized
;
final
bool
/*!*/
synthesized
;
/// The pressure of the touch as a number ranging from 0.0, indicating a touch
/// with no discernible pressure, to 1.0, indicating a touch with "normal"
/// pressure, and possibly beyond, indicating a stronger touch. For devices
/// that do not detect pressure (e.g. mice), returns 1.0.
final
double
pressure
;
final
double
/*!*/
pressure
;
/// The minimum value that [pressure] can return for this pointer. For devices
/// that do not detect pressure (e.g. mice), returns 1.0. This will always be
/// a number less than or equal to 1.0.
final
double
pressureMin
;
final
double
/*!*/
pressureMin
;
/// The maximum value that [pressure] can return for this pointer. For devices
/// that do not detect pressure (e.g. mice), returns 1.0. This will always be
/// a greater than or equal to 1.0.
final
double
pressureMax
;
final
double
/*!*/
pressureMax
;
/// The distance of the detected object from the input surface (e.g. the
/// distance of a stylus or finger from a touch screen), in arbitrary units on
/// an arbitrary (not necessarily linear) scale. If the pointer is down, this
/// is 0.0 by definition.
final
double
distance
;
final
double
/*!*/
distance
;
/// The maximum value that a distance can return for this pointer. If this
/// input device cannot detect "hover touch" input events, then this will be
/// 0.0.
final
double
distanceMax
;
final
double
/*!*/
distanceMax
;
/// The area of the screen being pressed, scaled to a value between 0 and 1.
/// The value of size can be used to determine fat touch events. This value
...
...
@@ -188,21 +188,21 @@ class PointerData {
/// the range of detectable values. So, for example, the value of 0.1 could
/// mean a touch with the tip of the finger, 0.2 a touch with full finger,
/// and 0.3 the full palm.
final
double
size
;
final
double
/*!*/
size
;
/// The radius of the contact ellipse along the major axis, in logical pixels.
final
double
radiusMajor
;
final
double
/*!*/
radiusMajor
;
/// The radius of the contact ellipse along the minor axis, in logical pixels.
final
double
radiusMinor
;
final
double
/*!*/
radiusMinor
;
/// The minimum value that could be reported for radiusMajor and radiusMinor
/// for this pointer, in logical pixels.
final
double
radiusMin
;
final
double
/*!*/
radiusMin
;
/// The minimum value that could be reported for radiusMajor and radiusMinor
/// for this pointer, in logical pixels.
final
double
radiusMax
;
final
double
/*!*/
radiusMax
;
/// For PointerDeviceKind.touch events:
///
...
...
@@ -229,7 +229,7 @@ class PointerData {
/// indicate that the stylus would go down in the negative y-axis direction;
/// pi/4 would indicate that the stylus goes up and to the right, -pi/2 would
/// indicate that the stylus goes to the left, etc).
final
double
orientation
;
final
double
/*!*/
orientation
;
/// For PointerDeviceKind.stylus and PointerDeviceKind.invertedStylus events:
///
...
...
@@ -241,20 +241,20 @@ class PointerData {
/// perpendicular to the input surface (thus 0.0 indicates the stylus is
/// orthogonal to the plane of the input surface, while pi/2 indicates that
/// the stylus is flat on that surface).
final
double
tilt
;
final
double
/*!*/
tilt
;
/// Opaque platform-specific data associated with the event.
final
int
platformData
;
final
int
/*!*/
platformData
;
/// For events with signalKind of PointerSignalKind.scroll:
///
/// The amount to scroll in the x direction, in physical pixels.
final
double
scrollDeltaX
;
final
double
/*!*/
scrollDeltaX
;
/// For events with signalKind of PointerSignalKind.scroll:
///
/// The amount to scroll in the y direction, in physical pixels.
final
double
scrollDeltaY
;
final
double
/*!*/
scrollDeltaY
;
@override
String
toString
()
=>
'
$runtimeType
(x:
$physicalX
, y:
$physicalY
)'
;
...
...
@@ -296,10 +296,10 @@ class PointerData {
/// A sequence of reports about the state of pointers.
class
PointerDataPacket
{
/// Creates a packet of pointer data reports.
const
PointerDataPacket
({
this
.
data
=
const
<
PointerData
>[]});
const
PointerDataPacket
({
this
.
data
=
const
<
PointerData
>[]})
:
assert
(
data
!=
null
)
;
/// Data about the individual pointers in this packet.
///
/// This list might contain multiple pieces of data about the same pointer.
final
List
<
PointerData
>
data
;
final
List
<
PointerData
/*!*/
>
/*!*/
data
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录