Hi All, I am new here and desperately looking for some help. I am creating a GUI in X which will display an image sequence. I used Motif and created all the Widgets I needed and used DrawingAreaWidget where my images should be displayed. Now, I have a separate program say video.c which is dealing with my images (in Jpeg) and ultimately it is giving me an RGB buffer which I pass to my GUI application. I understand that I can use XCreateImage followed by XPutImage to draw the Image. The problem is my program video.c makes changes to this RGB buffer and everytime the change is made, I need to display that in my GUI. So, How do I give this buffer as input to XtAppMainLoop every time the buffer is updated. Can I just write a separate function which can draw to DrawingArea using XPutImage, Is that possible? or do I have to somehow give my buffer as input to XtAppMainLoop. Any help on this matter will be very very highly appreciated. Please, I really am not getting a clue how should I proceed. |
|||

Andriy Konoval
XmNexposeCallback from XmDrawingArea
You can write your XmNexposeCallback callback function where you will be able to draw to DrawingArea using XPutImage.