Method

GtkWidgetget_pointer

Declaration [src]

void
gtk_widget_get_pointer (
  GtkWidget* widget,
  gint* x,
  gint* y
)

Description [src]

Obtains the location of the mouse pointer in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that return TRUE for gtk_widget_get_has_window(); and are relative to widget->allocation.x, widget->allocation.y otherwise.

Deprecated since:3.4

Use gdk_window_get_device_position() instead.

Parameters

x gint*
 

Return location for the X coordinate, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
y gint*
 

Return location for the Y coordinate, or NULL.

 The argument will be set by the function.
 The argument can be NULL.