c - Using glib and gtk+ to control ftdi device over USB -
i developing simple application in c gtk+2.0 gui, on linux of course, application designed control device connected on usb port , using ftdi driver emulate rs232 asynchronious protocol on usb port.
i wanted create event driven control, signals in gtk used detect when button clicked et cetera. found glib library this, have read in documentation seems clear. know must use functions g_io_add_watch() add event detected, can define functions "triggered" event , example "g_io_in" means triggered when there output device. cannot find usefull examples on web.
the other thing is, not understand how use gtk+2.0 , glib @ once, because both have own program loops detect events (gtk_main() gtk+2.0 , gmainloop in glib).
i greatfull if share interesting examples, links, tutorials et cetera. maybe need know more specific vocabulary, because cannot find usefull on web solve problem. thanks!
gtk+ uses glib, , main loop not exception. means gtk+ loop gmainloop, hence glib functions can used it.
here reference gtk+ code prove this.
Comments
Post a Comment