summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/GestureHandler.cs
blob: 0d1bb93d4007fc0f4201deb7d39c80547ab62680 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.ComponentModel;
using ElmSharp;

namespace Xamarin.Forms.Platform.Tizen
{
	public abstract class GestureHandler : IGestureController, INotifyPropertyChanged, IRegisterable
	{
		public IGestureRecognizer Recognizer { get; private set; }

		public abstract GestureLayer.GestureType Type { get; }

		public virtual double Timeout { get; }

		protected GestureHandler(IGestureRecognizer recognizer)
		{
			Recognizer = recognizer;
		}

		public virtual event PropertyChangedEventHandler PropertyChanged;

		protected abstract void OnStarted(View sender, object data);

		protected abstract void OnMoved(View sender, object data);

		protected abstract void OnCompleted(View sender, object data);

		protected abstract void OnCanceled(View sender, object data);

		void IGestureController.SendStarted(View sender, object data)
		{
			OnStarted(sender, data);
		}

		void IGestureController.SendCompleted(View sender, object data)
		{
			OnCompleted(sender, data);
		}

		void IGestureController.SendMoved(View sender, object data)
		{
			OnMoved(sender, data);
		}

		void IGestureController.SendCanceled(View sender, object data)
		{
			OnCanceled(sender, data);
		}
	}
}