Function

Gdkevents_get_angle

Declaration [src]

gboolean
gdk_events_get_angle (
  GdkEvent* event1,
  GdkEvent* event2,
  gdouble* angle
)

Description [src]

If both events contain X/Y information, this function will return TRUE and return in angle the relative angle from event1 to event2. The rotation direction for positive angles is from the positive X axis towards the positive Y axis.

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.
angle gdouble*
 

Return location for the relative angle between both events.

 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 angle could be calculated.