Package: gdk
Function gdk:window-begin-draw-frame
Lambda Listgdk:window-begin-draw-frame (window region) ArgumentsReturn ValueA gdk:drawing-context object that should be used to draw the contents of the window, the returned context is owned by GDK. Details Indicates that you are beginning the process of redrawing region on window, and provides you with a gdk:drawing-context object. If window is a toplevel gdk:window object, backed by a native window implementation, a backing store (offscreen buffer) large enough to contain region will be created. The backing store will be initialized with the background color or background surface for window. Then, all drawing operations performed on window will be diverted to the backing store. When you call the gdk:window-end-draw-frame function, the contents of the backing store will be copied to window, making it visible on screen. Only the part of window contained in region will be modified, that is, drawing operations are clipped to region. The net result of all this is to remove flicker, because the user sees the finished product appear all at once when you call the gdk:window-end-draw-frame function. If you draw to the window directly without calling the gdk:window-begin-draw-frame function, the user may see flicker as individual drawing operations are performed in sequence. When using GTK, the widget system automatically places calls to the gdk:window-begin-draw-frame and gdk:window-end-draw-frame functions around emissions of the "draw" signal. That is, if you are drawing the contents of the widget yourself, you can assume that the widget has a cleared background, is already set as the clip region, and already has a backing store. Therefore in most cases, application code in GTK does not need to call the gdk:window-begin-draw-frame function explicitly. | See also |
2023-3-13