Results 1 to 3 of 3
Howdy all. I'm writing a program using Gtk, and I'm trying to get 2 things to happen simultaneously.
My program traverses multiple images in a single directory, with the images ...
- 07-12-2007 #1
Gtk+ do 2 actions simultaneously
Howdy all. I'm writing a program using Gtk, and I'm trying to get 2 things to happen simultaneously.
My program traverses multiple images in a single directory, with the images inside of a Scrolled Window. When I change to a new image, I call this function:
reset_scrollbars() moves the scrollbars back to the upper-left position. The problem is that these two actions do appear simultaneously: you see the image jump back to the upper-left and then change.Code:void image_viewer_viewer_set_image(viewer *v, char *img_path) { GtkWidget *image = v->image; gtk_image_set_from_file(GTK_IMAGE(image), img_path); reset_scrollbars(v); }
I was wondering if there's any way to have both of these things appear simultaneously.DISTRO=Arch
Registered Linux User #388732
- 07-13-2007 #2Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
- 08-05-2007 #3
I'm not sure I understand what you mean by online and offline(presence).
Also, I made a typo in my post: the actions currently do NOT happen simultaneously.
I think that this would involve some form of double-buffering: write both changes to the offscreen copy, and then replace the onscreen version. Unfortunately, I have no idea how to do that.DISTRO=Arch
Registered Linux User #388732


Reply With Quote
