ci: compile the manual
[nit.git] / lib / mnit / input.nit
index 3bc2ceb..7987c27 100644 (file)
@@ -1,7 +1,5 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2011-2013 Alexis Laferrière <alexis.laf@xymus.net>
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -18,6 +16,8 @@
 # Implemented independantly for each platforms and technologies.
 module input
 
+import android::input_events is conditional(android)
+
 # Input to the App, propagated through `App::input`.
 interface InputEvent
 end
@@ -34,10 +34,19 @@ interface PointerEvent
 
        # Is down? either going down or already down
        fun pressed: Bool is abstract
-       fun depressed: Bool is abstract
+
+       # Is it not currently pressed down? The opposite of `pressed`.
+       fun depressed: Bool do return not pressed
 
        # Is this a movement event?
        fun is_move: Bool is abstract
+
+       # Unique identifier of this pointer among other active pointers
+       #
+       # This value is useful to differentiate between pointers (or fingers) on
+       # multi-touch systems. This value does not change for the same pointer
+       # while it touches the screen.
+       fun pointer_id: Int do return 0
 end
 
 # A motion event on screen composed of many `PointerEvent`