Reputation: 45
Currently i have this gtk2 code:
GList *input_devices = gdk_devices_list();
while(input_devices)
{
GdkDevice *device = (GdkDevice*)input_devices->data;
for(int i = 0; i < gdk_device_get_n_axes(device); i++)
{
GdkDeviceAxis* axis = &device->axes[i];
printf("[%f .. %f]\n", axis->min, axis->max);
}
input_devices = g_list_next(input_devices);
}
I'm trying to port that to gtk3, and i do not understand how to get axis minimal and maximal values.
Is it even possible with current GDK3 API?
Upvotes: 1
Views: 169
Reputation: 26
The axis limit API accidentially ended up as private, upstream is aware of it and looks into making it publically available in GTK+ 3.10.
Upvotes: 1
Reputation: 57854
The min and max values don't seem to be exposed in the GDK 3 API. However, looking at the source code, it seems that the X and Y tilt axes can range from -1.0 to 1.0, and pressure and wheel axes can range from 0.0 to 1.0. Presumably, X and Y coordinate axes are screen-dependent.
Upvotes: 0
Reputation: 11454
AFAIK, there is no GDK 3, GDK has been mostly replaced by cairo. There's a GTK 2 to GTK 3 porting guide, but input devices seem not covered. So you're asking a good question...
Upvotes: 0