Are you using a Wacom Cintiq21UX Tablet?
If your not then that code will not work you will need to look here
As far as segmentation fault you need some code to handle errors so instead
of your code crashing it will print a message like "Wacom Cintiq21UX Tablet Not Found"
These are not devices. A device would be "cintiq21ux"
These are functions to interact with the "pad, stylus, eraser, cursor" parts of the "cintiq21ux"
Lastly you posted this in the wrong forum this forum is for working example code you should post stuff like with in GTK+ Programming