void mySliderCallback(enum mtouch_slider_names slidername) { printf("The slider %d just changed its postion.\r\n", slidername); } main() { ... MTOUCH_Slider_SetPositionChangedCallback(mySliderCallback); ... while(1) { MTOUCH_Service_Mainloop(); } }