Function

Gdkevents_get_distance

since: 3.0

Declaration [src]

gboolean
gdk_events_get_distance (
  GdkEvent* event1,
  GdkEvent* event2,
  gdouble* distance
)

Description [src]

If both events have X/Y information, the distance between both coordinates (as in a straight line going from event1 to event2) will be returned.

Available since: 3.0

Parameters

event1

Type: GdkEvent

First GdkEvent.

The data is owned by the caller of the function.
event2

Type: GdkEvent

Second GdkEvent.

The data is owned by the caller of the function.
distance

Type: gdouble*

Return location for the distance.

The argument will be set by the function.

Return value

Type: gboolean

TRUE if the distance could be calculated.