Skip to content

Commit 0235237

Browse files
committed
Add invalid coord
1 parent 688f923 commit 0235237

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Gestures/Gesture.vala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,23 @@ namespace Gala {
3535
}
3636

3737
public class Gesture {
38+
public const float INVALID_COORD = float.MAX;
39+
3840
public Clutter.EventType type;
3941
public GestureDirection direction;
4042
public int fingers;
4143
public Clutter.InputDeviceType performed_on_device_type;
4244

4345
/**
4446
* The x coordinate of the initial contact point for the gesture.
45-
* Doesn't have to be set.
47+
* Doesn't have to be set. In that case it is set to {@link INVALID_COORD}.
4648
*/
47-
public float origin_x;
49+
public float origin_x = INVALID_COORD;
4850

4951
/**
5052
* The y coordinate of the initial contact point for the gesture.
51-
* Doesn't have to be set.
53+
* Doesn't have to be set. In that case it is set to {@link INVALID_COORD}.
5254
*/
53-
public float origin_y;
55+
public float origin_y = INVALID_COORD;
5456
}
5557
}

0 commit comments

Comments
 (0)