remove every reference to gtk because it doesn't work. It makes the frame buffer freeze somehow if you add a custom thread. Use openCV instead. To intercept commands to the app use cvWaitKey(), to show point and information use cvPutText(). It isn't pretty, but it should work.