Is (x,y) int or double?



How come that in GdkEventMotion the x and y coordinates are of type
gdouble, but in the function gdk_window_get_pointer() the x and y
coordinates are of type gint.

Yet, in GGAD (still the best documentation) this is the example:

  double x, y;

  x = event->motion.x;
  y = event->motion.y;

  if (event->motion.is_hint)
    gdk_window_get_pointer(event->window, &x, &y, NULL);

I thought the idea with double as coordinates was for input devices that
are more fine grained then the normal mouse. But then this extra precision
is lost if you use gdk_window_get_pointer().

It's the same thing in both gtk 1.2 and gtk 2.0. Also, the flag "gint16
is_hint" in GdkEventMotion sounds like it should be a gboolean in gtk 2.0.
But I guess it's a lot of these things left from the earlier days.

Maybe it's something for gtk 3.0.

-- 
/Dennis




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]