Function

Gdkevents_get_distance

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 GdkEvent
 

First GdkEvent.

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

Second GdkEvent.

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

Return location for the distance.

 The argument will be set by the function.
 The called function takes ownership of the data, and is responsible for freeing it.

Return value

Returns: gboolean
 

TRUE if the distance could be calculated.