Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5b42f83f
Commit
5b42f83f
authored
Dec 14, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #905 from Hixie/bindings
Rename Pointerer to Gesturer.
parents
53575aa7
d29970df
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
21 deletions
+21
-21
binding.dart
packages/flutter/lib/src/gestures/binding.dart
+3
-3
slider.dart
packages/flutter/lib/src/material/slider.dart
+1
-1
switch.dart
packages/flutter/lib/src/material/switch.dart
+1
-1
toggleable.dart
packages/flutter/lib/src/material/toggleable.dart
+1
-1
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+1
-1
binding.dart
packages/flutter/lib/src/widgets/binding.dart
+1
-1
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+4
-4
gesture_detector.dart
packages/flutter/lib/src/widgets/gesture_detector.dart
+8
-8
rendering_tester.dart
packages/unit/test/rendering/rendering_tester.dart
+1
-1
No files found.
packages/flutter/lib/src/gestures/binding.dart
View file @
5b42f83f
...
...
@@ -16,7 +16,7 @@ import 'events.dart';
import
'hit_test.dart'
;
import
'pointer_router.dart'
;
abstract
class
Pointe
rer
extends
BindingBase
implements
HitTestTarget
,
HitTestable
{
abstract
class
Gestu
rer
extends
BindingBase
implements
HitTestTarget
,
HitTestable
{
void
initInstances
()
{
super
.
initInstances
();
...
...
@@ -24,8 +24,8 @@ abstract class Pointerer extends BindingBase implements HitTestTarget, HitTestab
ui
.
window
.
onPointerPacket
=
_handlePointerPacket
;
}
static
Pointe
rer
_instance
;
static
Pointe
rer
get
instance
=>
_instance
;
static
Gestu
rer
_instance
;
static
Gestu
rer
get
instance
=>
_instance
;
void
_handlePointerPacket
(
ByteData
serializedPacket
)
{
final
mojo_bindings
.
Message
message
=
new
mojo_bindings
.
Message
(
...
...
packages/flutter/lib/src/material/slider.dart
View file @
5b42f83f
...
...
@@ -86,7 +86,7 @@ class _RenderSlider extends RenderConstrainedBox {
_activeColor
=
activeColor
,
super
(
additionalConstraints:
const
BoxConstraints
.
tightFor
(
width:
_kTrackWidth
+
2
*
_kReactionRadius
,
height:
2
*
_kReactionRadius
))
{
assert
(
value
!=
null
&&
value
>=
0.0
&&
value
<=
1.0
);
_drag
=
new
HorizontalDragGestureRecognizer
(
router:
Pointerer
.
instance
.
pointerRouter
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
)
_drag
=
new
HorizontalDragGestureRecognizer
(
router:
Gesturer
.
instance
.
pointerRouter
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
)
..
onStart
=
_handleDragStart
..
onUpdate
=
_handleDragUpdate
..
onEnd
=
_handleDragEnd
;
...
...
packages/flutter/lib/src/material/switch.dart
View file @
5b42f83f
...
...
@@ -115,7 +115,7 @@ class _RenderSwitch extends RenderToggleable {
)
{
_activeTrackColor
=
activeTrackColor
;
_inactiveTrackColor
=
inactiveTrackColor
;
_drag
=
new
HorizontalDragGestureRecognizer
(
router:
Pointerer
.
instance
.
pointerRouter
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
)
_drag
=
new
HorizontalDragGestureRecognizer
(
router:
Gesturer
.
instance
.
pointerRouter
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
)
..
onStart
=
_handleDragStart
..
onUpdate
=
_handleDragUpdate
..
onEnd
=
_handleDragEnd
;
...
...
packages/flutter/lib/src/material/toggleable.dart
View file @
5b42f83f
...
...
@@ -29,7 +29,7 @@ abstract class RenderToggleable extends RenderConstrainedBox {
assert
(
value
!=
null
);
assert
(
activeColor
!=
null
);
assert
(
inactiveColor
!=
null
);
_tap
=
new
TapGestureRecognizer
(
router:
Pointerer
.
instance
.
pointerRouter
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
)
_tap
=
new
TapGestureRecognizer
(
router:
Gesturer
.
instance
.
pointerRouter
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
)
..
onTapDown
=
_handleTapDown
..
onTap
=
_handleTap
..
onTapUp
=
_handleTapUp
...
...
packages/flutter/lib/src/rendering/binding.dart
View file @
5b42f83f
...
...
@@ -85,7 +85,7 @@ void debugDumpLayerTree() {
/// A concrete binding for applications that use the Rendering framework
/// directly. This is the glue that binds the framework to the Flutter engine.
class
RenderingFlutterBinding
extends
BindingBase
with
Scheduler
,
Renderer
,
Pointe
rer
{
class
RenderingFlutterBinding
extends
BindingBase
with
Scheduler
,
Renderer
,
Gestu
rer
{
RenderingFlutterBinding
({
RenderBox
root
})
{
renderView
.
child
=
root
;
}
...
...
packages/flutter/lib/src/widgets/binding.dart
View file @
5b42f83f
...
...
@@ -20,7 +20,7 @@ class BindingObserver {
/// A concrete binding for applications based on the Widgets framework.
/// This is the glue that binds the framework to the Flutter engine.
class
WidgetFlutterBinding
extends
BindingBase
with
Scheduler
,
Pointe
rer
,
Renderer
{
class
WidgetFlutterBinding
extends
BindingBase
with
Scheduler
,
Gestu
rer
,
Renderer
{
WidgetFlutterBinding
.
_
();
...
...
packages/flutter/lib/src/widgets/drag_target.dart
View file @
5b42f83f
...
...
@@ -96,7 +96,7 @@ class Draggable<T> extends DraggableBase<T> {
GestureRecognizer
createRecognizer
(
PointerRouter
router
,
DragStartCallback
starter
)
{
return
new
MultiTapGestureRecognizer
(
router:
router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
,
onTapDown:
starter
);
}
...
...
@@ -123,7 +123,7 @@ class LongPressDraggable<T> extends DraggableBase<T> {
GestureRecognizer
createRecognizer
(
PointerRouter
router
,
DragStartCallback
starter
)
{
return
new
MultiTapGestureRecognizer
(
router:
router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
,
longTapDelay:
kLongPressTimeout
,
onLongTapDown:
(
Point
position
,
int
pointer
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
...
...
@@ -135,7 +135,7 @@ class LongPressDraggable<T> extends DraggableBase<T> {
class
_DraggableState
<
T
>
extends
State
<
DraggableBase
<
T
>>
implements
GestureArenaMember
{
PointerRouter
get
router
=>
Pointe
rer
.
instance
.
pointerRouter
;
PointerRouter
get
router
=>
Gestu
rer
.
instance
.
pointerRouter
;
void
initState
()
{
super
.
initState
();
...
...
@@ -146,7 +146,7 @@ class _DraggableState<T> extends State<DraggableBase<T>> implements GestureArena
Map
<
int
,
GestureArenaEntry
>
_activePointers
=
<
int
,
GestureArenaEntry
>{};
void
_routePointer
(
PointerEvent
event
)
{
_activePointers
[
event
.
pointer
]
=
Pointe
rer
.
instance
.
gestureArena
.
add
(
event
.
pointer
,
this
);
_activePointers
[
event
.
pointer
]
=
Gestu
rer
.
instance
.
gestureArena
.
add
(
event
.
pointer
,
this
);
_recognizer
.
addPointer
(
event
);
}
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
5b42f83f
...
...
@@ -121,7 +121,7 @@ class GestureDetector extends StatefulComponent {
}
class
_GestureDetectorState
extends
State
<
GestureDetector
>
{
PointerRouter
get
_router
=>
Pointe
rer
.
instance
.
pointerRouter
;
PointerRouter
get
_router
=>
Gestu
rer
.
instance
.
pointerRouter
;
TapGestureRecognizer
_tap
;
DoubleTapGestureRecognizer
_doubleTap
;
...
...
@@ -165,7 +165,7 @@ class _GestureDetectorState extends State<GestureDetector> {
if
(
config
.
onTapDown
==
null
&&
config
.
onTapUp
==
null
&&
config
.
onTap
==
null
&&
config
.
onTapCancel
==
null
)
{
_tap
=
_ensureDisposed
(
_tap
);
}
else
{
_tap
??=
new
TapGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_tap
??=
new
TapGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_tap
..
onTapDown
=
config
.
onTapDown
..
onTapUp
=
config
.
onTapUp
...
...
@@ -178,7 +178,7 @@ class _GestureDetectorState extends State<GestureDetector> {
if
(
config
.
onDoubleTap
==
null
)
{
_doubleTap
=
_ensureDisposed
(
_doubleTap
);
}
else
{
_doubleTap
??=
new
DoubleTapGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_doubleTap
??=
new
DoubleTapGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_doubleTap
.
onDoubleTap
=
config
.
onDoubleTap
;
}
}
...
...
@@ -187,7 +187,7 @@ class _GestureDetectorState extends State<GestureDetector> {
if
(
config
.
onLongPress
==
null
)
{
_longPress
=
_ensureDisposed
(
_longPress
);
}
else
{
_longPress
??=
new
LongPressGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_longPress
??=
new
LongPressGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_longPress
.
onLongPress
=
config
.
onLongPress
;
}
}
...
...
@@ -196,7 +196,7 @@ class _GestureDetectorState extends State<GestureDetector> {
if
(
config
.
onVerticalDragStart
==
null
&&
config
.
onVerticalDragUpdate
==
null
&&
config
.
onVerticalDragEnd
==
null
)
{
_verticalDrag
=
_ensureDisposed
(
_verticalDrag
);
}
else
{
_verticalDrag
??=
new
VerticalDragGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_verticalDrag
??=
new
VerticalDragGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_verticalDrag
..
onStart
=
config
.
onVerticalDragStart
..
onUpdate
=
config
.
onVerticalDragUpdate
...
...
@@ -208,7 +208,7 @@ class _GestureDetectorState extends State<GestureDetector> {
if
(
config
.
onHorizontalDragStart
==
null
&&
config
.
onHorizontalDragUpdate
==
null
&&
config
.
onHorizontalDragEnd
==
null
)
{
_horizontalDrag
=
_ensureDisposed
(
_horizontalDrag
);
}
else
{
_horizontalDrag
??=
new
HorizontalDragGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_horizontalDrag
??=
new
HorizontalDragGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_horizontalDrag
..
onStart
=
config
.
onHorizontalDragStart
..
onUpdate
=
config
.
onHorizontalDragUpdate
...
...
@@ -221,7 +221,7 @@ class _GestureDetectorState extends State<GestureDetector> {
_pan
=
_ensureDisposed
(
_pan
);
}
else
{
assert
(
_scale
==
null
);
// Scale is a superset of pan; just use scale
_pan
??=
new
PanGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_pan
??=
new
PanGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_pan
..
onStart
=
config
.
onPanStart
..
onUpdate
=
config
.
onPanUpdate
...
...
@@ -234,7 +234,7 @@ class _GestureDetectorState extends State<GestureDetector> {
_scale
=
_ensureDisposed
(
_scale
);
}
else
{
assert
(
_pan
==
null
);
// Scale is a superset of pan; just use scale
_scale
??=
new
ScaleGestureRecognizer
(
router:
_router
,
gestureArena:
Pointe
rer
.
instance
.
gestureArena
);
_scale
??=
new
ScaleGestureRecognizer
(
router:
_router
,
gestureArena:
Gestu
rer
.
instance
.
gestureArena
);
_scale
..
onStart
=
config
.
onScaleStart
..
onUpdate
=
config
.
onScaleUpdate
...
...
packages/unit/test/rendering/rendering_tester.dart
View file @
5b42f83f
...
...
@@ -25,7 +25,7 @@ enum EnginePhase {
composite
}
class
TestRenderingFlutterBinding
extends
BindingBase
with
Scheduler
,
Renderer
,
Pointe
rer
{
class
TestRenderingFlutterBinding
extends
BindingBase
with
Scheduler
,
Renderer
,
Gestu
rer
{
void
initRenderView
()
{
if
(
renderView
==
null
)
{
renderView
=
new
TestRenderView
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment