static void
print_property(Display *dpy, XDevice* dev, Atom property)
{
- XIPropertyInfo *propinfo;
Atom act_type;
char *name;
int act_format;
unsigned char *data, *ptr;
int j;
- propinfo = XQueryDeviceProperty(dpy, dev, property);
- if (!propinfo)
- return;
-
name = XGetAtomName(dpy, property);
printf("\t%s (%d):\t", name, property);
- if (XGetDeviceProperty(dpy, dev, property, 0, 1000, False, False,
+ if (XGetDeviceProperty(dpy, dev, property, 0, 1000, False,
AnyPropertyType, &act_type, &act_format,
&nitems, &bytes_after, &data) == Success)
{
} else
printf("\tFetch failure\n");
- if (propinfo->pending || propinfo->range || propinfo->immutable || propinfo->fromClient)
- {
- printf("\t\t%s%s%s%s", ((propinfo->pending) ? "[pending]" : ""),
- ((propinfo->range) ? "[range]" : ""),
- ((propinfo->immutable) ? "[immutable]" : ""),
- ((propinfo->fromClient) ? "[client]" : ""));
- printf("\n");
- }
-
- if (propinfo->num_values)
- {
- long *values = propinfo->values;
- printf("\t\tvalid values: ");
- while(values && propinfo->num_values--)
- printf("%ld ", *values++);
- printf("\n");
- }
-
- XFree(propinfo);
-
}
int list_props(Display *dpy, int argc, char** argv, char* name, char *desc)